@papr/memory 1.5.0 → 1.6.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/CHANGELOG.md +32 -0
- package/README.md +13 -25
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/package.json +1 -4
- package/resources/document.d.mts +1 -88
- package/resources/document.d.mts.map +1 -1
- package/resources/document.d.ts +1 -88
- package/resources/document.d.ts.map +1 -1
- package/resources/document.js +0 -24
- package/resources/document.js.map +1 -1
- package/resources/document.mjs +0 -24
- package/resources/document.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/memory.d.mts +94 -17
- package/resources/memory.d.mts.map +1 -1
- package/resources/memory.d.ts +94 -17
- package/resources/memory.d.ts.map +1 -1
- package/resources/memory.js +9 -1
- package/resources/memory.js.map +1 -1
- package/resources/memory.mjs +9 -1
- package/resources/memory.mjs.map +1 -1
- package/resources/user.d.mts +5 -5
- package/resources/user.d.mts.map +1 -1
- package/resources/user.d.ts +5 -5
- package/resources/user.d.ts.map +1 -1
- package/resources/user.js +2 -2
- package/resources/user.mjs +2 -2
- package/src/client.ts +2 -7
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/internal/uploads.ts +1 -1
- package/src/resources/document.ts +2 -120
- package/src/resources/index.ts +1 -6
- package/src/resources/memory.ts +137 -19
- package/src/resources/user.ts +5 -5
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/src/internal/shim-types.d.ts +0 -28
|
@@ -85,10 +85,10 @@ const getPlatformProperties = (): PlatformProperties => {
|
|
|
85
85
|
return {
|
|
86
86
|
'X-Stainless-Lang': 'js',
|
|
87
87
|
'X-Stainless-Package-Version': VERSION,
|
|
88
|
-
'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform),
|
|
89
|
-
'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch),
|
|
88
|
+
'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform ?? 'unknown'),
|
|
89
|
+
'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch ?? 'unknown'),
|
|
90
90
|
'X-Stainless-Runtime': 'node',
|
|
91
|
-
'X-Stainless-Runtime-Version': (globalThis as any).process.version,
|
|
91
|
+
'X-Stainless-Runtime-Version': (globalThis as any).process.version ?? 'unknown',
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shims for types that we can't always rely on being available globally.
|
|
5
|
+
*
|
|
6
|
+
* Note: these only exist at the type-level, there is no corresponding runtime
|
|
7
|
+
* version for any of these symbols.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
type NeverToAny<T> = T extends never ? any : T;
|
|
11
|
+
|
|
12
|
+
/** @ts-ignore */
|
|
13
|
+
type _DOMReadableStream<R = any> = globalThis.ReadableStream<R>;
|
|
14
|
+
|
|
15
|
+
/** @ts-ignore */
|
|
16
|
+
type _NodeReadableStream<R = any> = import('stream/web').ReadableStream<R>;
|
|
17
|
+
|
|
18
|
+
type _ConditionalNodeReadableStream<R = any> =
|
|
19
|
+
typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream<R>;
|
|
20
|
+
|
|
21
|
+
type _ReadableStream<R = any> = NeverToAny<
|
|
22
|
+
| ([0] extends [1 & _DOMReadableStream<R>] ? never : _DOMReadableStream<R>)
|
|
23
|
+
| ([0] extends [1 & _ConditionalNodeReadableStream<R>] ? never : _ConditionalNodeReadableStream<R>)
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export type { _ReadableStream as ReadableStream };
|
package/src/internal/shims.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* messages in cases where an environment isn't fully supported.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import type { Fetch } from './builtin-types';
|
|
11
|
+
import type { ReadableStream } from './shim-types';
|
|
12
12
|
|
|
13
13
|
export function getDefaultFetch(): Fetch {
|
|
14
14
|
if (typeof fetch !== 'undefined') {
|
package/src/internal/uploads.ts
CHANGED
|
@@ -138,7 +138,7 @@ export const createForm = async <T = Record<string, unknown>>(
|
|
|
138
138
|
|
|
139
139
|
// We check for Blob not File because Bun.File doesn't inherit from File,
|
|
140
140
|
// but they both inherit from Blob and have a `name` property at runtime.
|
|
141
|
-
const isNamedBlob = (value:
|
|
141
|
+
const isNamedBlob = (value: unknown) => value instanceof Blob && 'name' in value;
|
|
142
142
|
|
|
143
143
|
const isUploadable = (value: unknown) =>
|
|
144
144
|
typeof value === 'object' &&
|
|
@@ -1,38 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../internal/request-options';
|
|
6
4
|
|
|
7
|
-
export class Document extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Upload a document (PDF/HTML/TXT) to be processed and added to memory.
|
|
10
|
-
*
|
|
11
|
-
* **Authentication Required**:
|
|
12
|
-
* One of the following authentication methods must be used:
|
|
13
|
-
* - Bearer token in `Authorization` header
|
|
14
|
-
* - API Key in `X-API-Key` header
|
|
15
|
-
* - Session token in `X-Session-Token` header
|
|
16
|
-
*
|
|
17
|
-
* **Required Headers**:
|
|
18
|
-
* - Content-Type: multipart/form-data
|
|
19
|
-
* - X-Client-Type: (e.g., 'papr_plugin', 'browser_extension')
|
|
20
|
-
*
|
|
21
|
-
* **Form Data**:
|
|
22
|
-
* - file: The document file to upload (PDF/HTML/TXT)
|
|
23
|
-
* - metadata: (optional) JSON string containing additional metadata
|
|
24
|
-
*/
|
|
25
|
-
upload(
|
|
26
|
-
params: DocumentUploadParams | null | undefined = {},
|
|
27
|
-
options?: RequestOptions,
|
|
28
|
-
): APIPromise<DocumentUploadResponse> {
|
|
29
|
-
const { post_objectId, skip_background_processing } = params ?? {};
|
|
30
|
-
return this._client.post('/v1/document', {
|
|
31
|
-
query: { post_objectId, skip_background_processing },
|
|
32
|
-
...options,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
5
|
+
export class Document extends APIResource {}
|
|
36
6
|
|
|
37
7
|
/**
|
|
38
8
|
* Response model for a single memory item in add_memory response
|
|
@@ -47,94 +17,6 @@ export interface AddMemoryItem {
|
|
|
47
17
|
memoryChunkIds?: Array<string>;
|
|
48
18
|
}
|
|
49
19
|
|
|
50
|
-
export interface DocumentUploadResponse {
|
|
51
|
-
/**
|
|
52
|
-
* Status and progress of the document upload
|
|
53
|
-
*/
|
|
54
|
-
document_status: DocumentUploadResponse.DocumentStatus;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* HTTP status code
|
|
58
|
-
*/
|
|
59
|
-
code?: number;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Additional error details or context
|
|
63
|
-
*/
|
|
64
|
-
details?: unknown;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Error message if failed
|
|
68
|
-
*/
|
|
69
|
-
error?: string | null;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* For backward compatibility
|
|
73
|
-
*/
|
|
74
|
-
memories?: Array<AddMemoryItem> | null;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* List of memory items created from the document
|
|
78
|
-
*/
|
|
79
|
-
memory_items?: Array<AddMemoryItem>;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Human-readable status message
|
|
83
|
-
*/
|
|
84
|
-
message?: string | null;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* 'success', 'processing', 'error', etc.
|
|
88
|
-
*/
|
|
89
|
-
status?: string;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export namespace DocumentUploadResponse {
|
|
93
|
-
/**
|
|
94
|
-
* Status and progress of the document upload
|
|
95
|
-
*/
|
|
96
|
-
export interface DocumentStatus {
|
|
97
|
-
/**
|
|
98
|
-
* 0.0 to 1.0 for percentage
|
|
99
|
-
*/
|
|
100
|
-
progress: number;
|
|
101
|
-
|
|
102
|
-
current_filename?: string | null;
|
|
103
|
-
|
|
104
|
-
current_page?: number | null;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Error message if failed
|
|
108
|
-
*/
|
|
109
|
-
error?: string | null;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Processing status type
|
|
113
|
-
*/
|
|
114
|
-
status_type?: 'processing' | 'completed' | 'failed' | 'not_found' | 'queued' | 'cancelled' | null;
|
|
115
|
-
|
|
116
|
-
total_pages?: number | null;
|
|
117
|
-
|
|
118
|
-
upload_id?: string | null;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface DocumentUploadParams {
|
|
123
|
-
/**
|
|
124
|
-
* Optional Post objectId for updating status
|
|
125
|
-
*/
|
|
126
|
-
post_objectId?: string | null;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* If True, skips adding background tasks for processing
|
|
130
|
-
*/
|
|
131
|
-
skip_background_processing?: boolean;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
20
|
export declare namespace Document {
|
|
135
|
-
export {
|
|
136
|
-
type AddMemoryItem as AddMemoryItem,
|
|
137
|
-
type DocumentUploadResponse as DocumentUploadResponse,
|
|
138
|
-
type DocumentUploadParams as DocumentUploadParams,
|
|
139
|
-
};
|
|
21
|
+
export { type AddMemoryItem as AddMemoryItem };
|
|
140
22
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
Document,
|
|
5
|
-
type AddMemoryItem,
|
|
6
|
-
type DocumentUploadResponse,
|
|
7
|
-
type DocumentUploadParams,
|
|
8
|
-
} from './document';
|
|
3
|
+
export { Document, type AddMemoryItem } from './document';
|
|
9
4
|
export {
|
|
10
5
|
Memory,
|
|
11
6
|
type AddMemory,
|
package/src/resources/memory.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as MemoryAPI from './memory';
|
|
4
5
|
import * as DocumentAPI from './document';
|
|
5
6
|
import { APIPromise } from '../core/api-promise';
|
|
6
7
|
import { buildHeaders } from '../internal/headers';
|
|
@@ -83,6 +84,7 @@ export class Memory extends APIResource {
|
|
|
83
84
|
* const addMemoryResponse = await client.memory.add({
|
|
84
85
|
* content:
|
|
85
86
|
* 'Meeting notes from the product planning session',
|
|
87
|
+
* type: 'text',
|
|
86
88
|
* });
|
|
87
89
|
* ```
|
|
88
90
|
*/
|
|
@@ -114,9 +116,11 @@ export class Memory extends APIResource {
|
|
|
114
116
|
* {
|
|
115
117
|
* content:
|
|
116
118
|
* 'Meeting notes from the product planning session',
|
|
119
|
+
* type: 'text',
|
|
117
120
|
* },
|
|
118
121
|
* {
|
|
119
122
|
* content: 'Follow-up tasks from the planning meeting',
|
|
123
|
+
* type: 'text',
|
|
120
124
|
* },
|
|
121
125
|
* ],
|
|
122
126
|
* });
|
|
@@ -164,11 +168,16 @@ export class Memory extends APIResource {
|
|
|
164
168
|
*
|
|
165
169
|
* The API supports response compression for improved performance. Responses larger than 1KB will be automatically compressed when this header is present.
|
|
166
170
|
*
|
|
171
|
+
* **User Resolution Precedence:**
|
|
172
|
+
* - If both user_id and external_user_id are provided, user_id takes precedence.
|
|
173
|
+
* - If only external_user_id is provided, it will be resolved to the internal user.
|
|
174
|
+
* - If neither is provided, the authenticated user is used.
|
|
175
|
+
*
|
|
167
176
|
* @example
|
|
168
177
|
* ```ts
|
|
169
178
|
* const searchResponse = await client.memory.search({
|
|
170
179
|
* query:
|
|
171
|
-
*
|
|
180
|
+
* "Find recurring customer complaints about API performance from the last month. Focus on issues that multiple customers have mentioned and any specific feature requests or workflow improvements they've suggested.",
|
|
172
181
|
* });
|
|
173
182
|
* ```
|
|
174
183
|
*/
|
|
@@ -195,6 +204,11 @@ export interface AddMemory {
|
|
|
195
204
|
*/
|
|
196
205
|
content: string;
|
|
197
206
|
|
|
207
|
+
/**
|
|
208
|
+
* Valid memory types
|
|
209
|
+
*/
|
|
210
|
+
type: MemoryType;
|
|
211
|
+
|
|
198
212
|
/**
|
|
199
213
|
* Context can be conversation history or any relevant context for a memory item
|
|
200
214
|
*/
|
|
@@ -209,11 +223,6 @@ export interface AddMemory {
|
|
|
209
223
|
* Array of relationships that we can use in Graph DB (neo4J)
|
|
210
224
|
*/
|
|
211
225
|
relationships_json?: Array<RelationshipItem> | null;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Content type of the memory item
|
|
215
|
-
*/
|
|
216
|
-
type?: MemoryType;
|
|
217
226
|
}
|
|
218
227
|
|
|
219
228
|
/**
|
|
@@ -266,9 +275,21 @@ export interface MemoryMetadata {
|
|
|
266
275
|
*/
|
|
267
276
|
createdAt?: string | null;
|
|
268
277
|
|
|
269
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Optional object for arbitrary custom metadata fields. Only string, number,
|
|
280
|
+
* boolean, or list of strings allowed. Nested dicts are not allowed.
|
|
281
|
+
*/
|
|
282
|
+
customMetadata?: Record<string, string | number | boolean | Array<string>> | null;
|
|
283
|
+
|
|
284
|
+
'emoji tags'?: Array<string> | null;
|
|
285
|
+
|
|
286
|
+
'emotion tags'?: Array<string> | null;
|
|
287
|
+
|
|
288
|
+
external_user_id?: string | null;
|
|
289
|
+
|
|
290
|
+
external_user_read_access?: Array<string> | null;
|
|
270
291
|
|
|
271
|
-
|
|
292
|
+
external_user_write_access?: Array<string> | null;
|
|
272
293
|
|
|
273
294
|
/**
|
|
274
295
|
* Hierarchical structures to enable navigation from broad topics to specific ones
|
|
@@ -277,13 +298,17 @@ export interface MemoryMetadata {
|
|
|
277
298
|
|
|
278
299
|
location?: string | null;
|
|
279
300
|
|
|
301
|
+
pageId?: string | null;
|
|
302
|
+
|
|
280
303
|
role_read_access?: Array<string> | null;
|
|
281
304
|
|
|
282
305
|
role_write_access?: Array<string> | null;
|
|
283
306
|
|
|
307
|
+
sourceType?: string | null;
|
|
308
|
+
|
|
284
309
|
sourceUrl?: string | null;
|
|
285
310
|
|
|
286
|
-
topics?: string | null;
|
|
311
|
+
topics?: Array<string> | null;
|
|
287
312
|
|
|
288
313
|
user_id?: string | null;
|
|
289
314
|
|
|
@@ -291,6 +316,8 @@ export interface MemoryMetadata {
|
|
|
291
316
|
|
|
292
317
|
user_write_access?: Array<string> | null;
|
|
293
318
|
|
|
319
|
+
workspace_id?: string | null;
|
|
320
|
+
|
|
294
321
|
workspace_read_access?: Array<string> | null;
|
|
295
322
|
|
|
296
323
|
workspace_write_access?: Array<string> | null;
|
|
@@ -313,7 +340,7 @@ export interface RelationshipItem {
|
|
|
313
340
|
|
|
314
341
|
relation_type: string;
|
|
315
342
|
|
|
316
|
-
metadata?: unknown
|
|
343
|
+
metadata?: Record<string, unknown>;
|
|
317
344
|
}
|
|
318
345
|
|
|
319
346
|
export interface SearchResponse {
|
|
@@ -368,7 +395,7 @@ export namespace SearchResponse {
|
|
|
368
395
|
|
|
369
396
|
user_id: string;
|
|
370
397
|
|
|
371
|
-
context?:
|
|
398
|
+
context?: Array<MemoryAPI.ContextItem> | null;
|
|
372
399
|
|
|
373
400
|
conversation_id?: string;
|
|
374
401
|
|
|
@@ -376,6 +403,14 @@ export namespace SearchResponse {
|
|
|
376
403
|
|
|
377
404
|
current_step?: string | null;
|
|
378
405
|
|
|
406
|
+
customMetadata?: Record<string, unknown> | null;
|
|
407
|
+
|
|
408
|
+
external_user_id?: string | null;
|
|
409
|
+
|
|
410
|
+
external_user_read_access?: Array<string> | null;
|
|
411
|
+
|
|
412
|
+
external_user_write_access?: Array<string> | null;
|
|
413
|
+
|
|
379
414
|
file_url?: string | null;
|
|
380
415
|
|
|
381
416
|
filename?: string | null;
|
|
@@ -384,12 +419,16 @@ export namespace SearchResponse {
|
|
|
384
419
|
|
|
385
420
|
location?: string | null;
|
|
386
421
|
|
|
387
|
-
metadata?: string | unknown | null;
|
|
422
|
+
metadata?: string | Record<string, unknown> | null;
|
|
388
423
|
|
|
389
424
|
page?: string | null;
|
|
390
425
|
|
|
391
426
|
page_number?: number | null;
|
|
392
427
|
|
|
428
|
+
role_read_access?: Array<string> | null;
|
|
429
|
+
|
|
430
|
+
role_write_access?: Array<string> | null;
|
|
431
|
+
|
|
393
432
|
source_document_id?: string | null;
|
|
394
433
|
|
|
395
434
|
source_message_id?: string | null;
|
|
@@ -410,8 +449,16 @@ export namespace SearchResponse {
|
|
|
410
449
|
|
|
411
450
|
updated_at?: string | null;
|
|
412
451
|
|
|
452
|
+
user_read_access?: Array<string> | null;
|
|
453
|
+
|
|
454
|
+
user_write_access?: Array<string> | null;
|
|
455
|
+
|
|
413
456
|
workspace_id?: string | null;
|
|
414
457
|
|
|
458
|
+
workspace_read_access?: Array<string> | null;
|
|
459
|
+
|
|
460
|
+
workspace_write_access?: Array<string> | null;
|
|
461
|
+
|
|
415
462
|
[k: string]: unknown;
|
|
416
463
|
}
|
|
417
464
|
|
|
@@ -470,6 +517,10 @@ export namespace SearchResponse {
|
|
|
470
517
|
|
|
471
518
|
emoji_tags?: Array<string> | null;
|
|
472
519
|
|
|
520
|
+
external_user_read_access?: Array<string> | null;
|
|
521
|
+
|
|
522
|
+
external_user_write_access?: Array<string> | null;
|
|
523
|
+
|
|
473
524
|
hierarchical_structures?: string | null;
|
|
474
525
|
|
|
475
526
|
pageId?: string | null;
|
|
@@ -515,6 +566,10 @@ export namespace SearchResponse {
|
|
|
515
566
|
|
|
516
567
|
createdAt?: string | null;
|
|
517
568
|
|
|
569
|
+
external_user_read_access?: Array<string> | null;
|
|
570
|
+
|
|
571
|
+
external_user_write_access?: Array<string> | null;
|
|
572
|
+
|
|
518
573
|
pageId?: string | null;
|
|
519
574
|
|
|
520
575
|
role_read_access?: Array<string> | null;
|
|
@@ -554,6 +609,10 @@ export namespace SearchResponse {
|
|
|
554
609
|
|
|
555
610
|
createdAt?: string | null;
|
|
556
611
|
|
|
612
|
+
external_user_read_access?: Array<string> | null;
|
|
613
|
+
|
|
614
|
+
external_user_write_access?: Array<string> | null;
|
|
615
|
+
|
|
557
616
|
pageId?: string | null;
|
|
558
617
|
|
|
559
618
|
role_read_access?: Array<string> | null;
|
|
@@ -595,6 +654,10 @@ export namespace SearchResponse {
|
|
|
595
654
|
|
|
596
655
|
createdAt?: string | null;
|
|
597
656
|
|
|
657
|
+
external_user_read_access?: Array<string> | null;
|
|
658
|
+
|
|
659
|
+
external_user_write_access?: Array<string> | null;
|
|
660
|
+
|
|
598
661
|
pageId?: string | null;
|
|
599
662
|
|
|
600
663
|
role_read_access?: Array<string> | null;
|
|
@@ -638,6 +701,15 @@ export namespace SearchResponse {
|
|
|
638
701
|
|
|
639
702
|
createdAt?: string | null;
|
|
640
703
|
|
|
704
|
+
/**
|
|
705
|
+
* Due date for the task in ISO 8601 format
|
|
706
|
+
*/
|
|
707
|
+
date?: string | null;
|
|
708
|
+
|
|
709
|
+
external_user_read_access?: Array<string> | null;
|
|
710
|
+
|
|
711
|
+
external_user_write_access?: Array<string> | null;
|
|
712
|
+
|
|
641
713
|
pageId?: string | null;
|
|
642
714
|
|
|
643
715
|
role_read_access?: Array<string> | null;
|
|
@@ -687,6 +759,10 @@ export namespace SearchResponse {
|
|
|
687
759
|
|
|
688
760
|
createdAt?: string | null;
|
|
689
761
|
|
|
762
|
+
external_user_read_access?: Array<string> | null;
|
|
763
|
+
|
|
764
|
+
external_user_write_access?: Array<string> | null;
|
|
765
|
+
|
|
690
766
|
pageId?: string | null;
|
|
691
767
|
|
|
692
768
|
role_read_access?: Array<string> | null;
|
|
@@ -740,6 +816,10 @@ export namespace SearchResponse {
|
|
|
740
816
|
|
|
741
817
|
createdAt?: string | null;
|
|
742
818
|
|
|
819
|
+
external_user_read_access?: Array<string> | null;
|
|
820
|
+
|
|
821
|
+
external_user_write_access?: Array<string> | null;
|
|
822
|
+
|
|
743
823
|
pageId?: string | null;
|
|
744
824
|
|
|
745
825
|
role_read_access?: Array<string> | null;
|
|
@@ -789,6 +869,10 @@ export namespace SearchResponse {
|
|
|
789
869
|
|
|
790
870
|
createdAt?: string | null;
|
|
791
871
|
|
|
872
|
+
external_user_read_access?: Array<string> | null;
|
|
873
|
+
|
|
874
|
+
external_user_write_access?: Array<string> | null;
|
|
875
|
+
|
|
792
876
|
pageId?: string | null;
|
|
793
877
|
|
|
794
878
|
role_read_access?: Array<string> | null;
|
|
@@ -830,6 +914,10 @@ export namespace SearchResponse {
|
|
|
830
914
|
|
|
831
915
|
createdAt?: string | null;
|
|
832
916
|
|
|
917
|
+
external_user_read_access?: Array<string> | null;
|
|
918
|
+
|
|
919
|
+
external_user_write_access?: Array<string> | null;
|
|
920
|
+
|
|
833
921
|
pageId?: string | null;
|
|
834
922
|
|
|
835
923
|
role_read_access?: Array<string> | null;
|
|
@@ -912,6 +1000,11 @@ export namespace MemoryUpdateResponse {
|
|
|
912
1000
|
content?: string | null;
|
|
913
1001
|
|
|
914
1002
|
memoryChunkIds?: Array<string> | null;
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Metadata for memory request
|
|
1006
|
+
*/
|
|
1007
|
+
metadata?: MemoryAPI.MemoryMetadata | null;
|
|
915
1008
|
}
|
|
916
1009
|
|
|
917
1010
|
/**
|
|
@@ -1061,6 +1154,11 @@ export interface MemoryAddParams {
|
|
|
1061
1154
|
*/
|
|
1062
1155
|
content: string;
|
|
1063
1156
|
|
|
1157
|
+
/**
|
|
1158
|
+
* Body param: Valid memory types
|
|
1159
|
+
*/
|
|
1160
|
+
type: MemoryType;
|
|
1161
|
+
|
|
1064
1162
|
/**
|
|
1065
1163
|
* Query param: If True, skips adding background tasks for processing
|
|
1066
1164
|
*/
|
|
@@ -1081,11 +1179,6 @@ export interface MemoryAddParams {
|
|
|
1081
1179
|
* Body param: Array of relationships that we can use in Graph DB (neo4J)
|
|
1082
1180
|
*/
|
|
1083
1181
|
relationships_json?: Array<RelationshipItem> | null;
|
|
1084
|
-
|
|
1085
|
-
/**
|
|
1086
|
-
* Body param: Content type of the memory item
|
|
1087
|
-
*/
|
|
1088
|
-
type?: MemoryType;
|
|
1089
1182
|
}
|
|
1090
1183
|
|
|
1091
1184
|
export interface MemoryAddBatchParams {
|
|
@@ -1103,6 +1196,18 @@ export interface MemoryAddBatchParams {
|
|
|
1103
1196
|
* Body param: Number of items to process in parallel
|
|
1104
1197
|
*/
|
|
1105
1198
|
batch_size?: number | null;
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* Body param: External user ID for all memories in the batch. If provided and
|
|
1202
|
+
* user_id is not, will be resolved to internal user ID.
|
|
1203
|
+
*/
|
|
1204
|
+
external_user_id?: string | null;
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* Body param: Internal user ID for all memories in the batch. If not provided,
|
|
1208
|
+
* developer's user ID will be used.
|
|
1209
|
+
*/
|
|
1210
|
+
user_id?: string | null;
|
|
1106
1211
|
}
|
|
1107
1212
|
|
|
1108
1213
|
export interface MemorySearchParams {
|
|
@@ -1125,6 +1230,18 @@ export interface MemorySearchParams {
|
|
|
1125
1230
|
*/
|
|
1126
1231
|
max_nodes?: number;
|
|
1127
1232
|
|
|
1233
|
+
/**
|
|
1234
|
+
* Body param: Optional external user ID to filter search results by a specific
|
|
1235
|
+
* external user. If both user_id and external_user_id are provided, user_id takes
|
|
1236
|
+
* precedence.
|
|
1237
|
+
*/
|
|
1238
|
+
external_user_id?: string | null;
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Body param: Metadata for memory request
|
|
1242
|
+
*/
|
|
1243
|
+
metadata?: MemoryMetadata | null;
|
|
1244
|
+
|
|
1128
1245
|
/**
|
|
1129
1246
|
* Body param: Whether to enable additional ranking of search results. Default is
|
|
1130
1247
|
* false because results are already ranked when using an LLM for search
|
|
@@ -1134,8 +1251,9 @@ export interface MemorySearchParams {
|
|
|
1134
1251
|
rank_results?: boolean;
|
|
1135
1252
|
|
|
1136
1253
|
/**
|
|
1137
|
-
* Body param: Optional user ID to filter search results by a specific
|
|
1138
|
-
* provided, results are not filtered by user.
|
|
1254
|
+
* Body param: Optional internal user ID to filter search results by a specific
|
|
1255
|
+
* user. If not provided, results are not filtered by user. If both user_id and
|
|
1256
|
+
* external_user_id are provided, user_id takes precedence.
|
|
1139
1257
|
*/
|
|
1140
1258
|
user_id?: string | null;
|
|
1141
1259
|
|
package/src/resources/user.ts
CHANGED
|
@@ -48,8 +48,8 @@ export class User extends APIResource {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Delete user association with developer and the user itself by
|
|
52
|
-
* (\_User.objectId)
|
|
51
|
+
* Delete user association with developer and the user itself by , assume external
|
|
52
|
+
* user_id is provided, and resolve to internal user_id (\_User.objectId)
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
@@ -97,7 +97,7 @@ export interface UserResponse {
|
|
|
97
97
|
|
|
98
98
|
external_id?: string | null;
|
|
99
99
|
|
|
100
|
-
metadata?: unknown | null;
|
|
100
|
+
metadata?: Record<string, unknown> | null;
|
|
101
101
|
|
|
102
102
|
updated_at?: string | null;
|
|
103
103
|
|
|
@@ -167,7 +167,7 @@ export interface UserCreateParams {
|
|
|
167
167
|
|
|
168
168
|
email?: string | null;
|
|
169
169
|
|
|
170
|
-
metadata?: unknown | null;
|
|
170
|
+
metadata?: Record<string, unknown> | null;
|
|
171
171
|
|
|
172
172
|
type?: UserType;
|
|
173
173
|
}
|
|
@@ -177,7 +177,7 @@ export interface UserUpdateParams {
|
|
|
177
177
|
|
|
178
178
|
external_id?: string | null;
|
|
179
179
|
|
|
180
|
-
metadata?: unknown | null;
|
|
180
|
+
metadata?: Record<string, unknown> | null;
|
|
181
181
|
|
|
182
182
|
type?: UserType | null;
|
|
183
183
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.6.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.6.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.6.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.6.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Shims for types that we can't always rely on being available globally.
|
|
5
|
-
*
|
|
6
|
-
* Note: these only exist at the type-level, there is no corresponding runtime
|
|
7
|
-
* version for any of these symbols.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* In order to properly access the global `NodeJS` type, if it's available, we
|
|
12
|
-
* need to make use of declaration shadowing. Without this, any checks for the
|
|
13
|
-
* presence of `NodeJS.ReadableStream` will fail.
|
|
14
|
-
*/
|
|
15
|
-
declare namespace NodeJS {
|
|
16
|
-
interface ReadableStream {}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type HasProperties<T> = keyof T extends never ? false : true;
|
|
20
|
-
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
type _ReadableStream<R = any> =
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
HasProperties<NodeJS.ReadableStream> extends true ? NodeJS.ReadableStream<R> : ReadableStream<R>;
|
|
25
|
-
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
|
|
28
|
-
export { _ReadableStream as ReadableStream };
|