@papr/memory 1.5.1 → 1.7.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +13 -25
  3. package/client.d.mts +2 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js +0 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +0 -3
  10. package/client.mjs.map +1 -1
  11. package/internal/shim-types.d.mts +11 -22
  12. package/internal/shim-types.d.mts.map +1 -0
  13. package/internal/shim-types.d.ts +11 -22
  14. package/internal/shim-types.d.ts.map +1 -0
  15. package/internal/shim-types.js +4 -0
  16. package/internal/shim-types.js.map +1 -0
  17. package/internal/shim-types.mjs +3 -0
  18. package/internal/shim-types.mjs.map +1 -0
  19. package/internal/shims.d.mts +2 -2
  20. package/internal/shims.d.mts.map +1 -1
  21. package/internal/shims.d.ts +2 -2
  22. package/internal/shims.d.ts.map +1 -1
  23. package/internal/uploads.js.map +1 -1
  24. package/internal/uploads.mjs.map +1 -1
  25. package/package.json +1 -4
  26. package/resources/index.d.mts +1 -2
  27. package/resources/index.d.mts.map +1 -1
  28. package/resources/index.d.ts +1 -2
  29. package/resources/index.d.ts.map +1 -1
  30. package/resources/index.js +1 -3
  31. package/resources/index.js.map +1 -1
  32. package/resources/index.mjs +0 -1
  33. package/resources/index.mjs.map +1 -1
  34. package/resources/memory.d.mts +106 -19
  35. package/resources/memory.d.mts.map +1 -1
  36. package/resources/memory.d.ts +106 -19
  37. package/resources/memory.d.ts.map +1 -1
  38. package/resources/memory.js +9 -1
  39. package/resources/memory.js.map +1 -1
  40. package/resources/memory.mjs +9 -1
  41. package/resources/memory.mjs.map +1 -1
  42. package/resources/user.d.mts +49 -6
  43. package/resources/user.d.mts.map +1 -1
  44. package/resources/user.d.ts +49 -6
  45. package/resources/user.d.ts.map +1 -1
  46. package/resources/user.js +16 -2
  47. package/resources/user.js.map +1 -1
  48. package/resources/user.mjs +16 -2
  49. package/resources/user.mjs.map +1 -1
  50. package/src/client.ts +4 -10
  51. package/src/internal/shim-types.ts +26 -0
  52. package/src/internal/shims.ts +2 -2
  53. package/src/internal/uploads.ts +1 -1
  54. package/src/resources/index.ts +2 -6
  55. package/src/resources/memory.ts +153 -21
  56. package/src/resources/user.ts +66 -5
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. package/version.mjs +1 -1
  62. package/resources/document.d.mts +0 -103
  63. package/resources/document.d.mts.map +0 -1
  64. package/resources/document.d.ts +0 -103
  65. package/resources/document.d.ts.map +0 -1
  66. package/resources/document.js +0 -33
  67. package/resources/document.js.map +0 -1
  68. package/resources/document.mjs +0 -29
  69. package/resources/document.mjs.map +0 -1
  70. package/src/internal/shim-types.d.ts +0 -28
  71. package/src/resources/document.ts +0 -140
@@ -1,7 +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 DocumentAPI from './document';
4
+ import * as MemoryAPI from './memory';
5
5
  import { APIPromise } from '../core/api-promise';
6
6
  import { buildHeaders } from '../internal/headers';
7
7
  import { RequestOptions } from '../internal/request-options';
@@ -83,6 +83,7 @@ export class Memory extends APIResource {
83
83
  * const addMemoryResponse = await client.memory.add({
84
84
  * content:
85
85
  * 'Meeting notes from the product planning session',
86
+ * type: 'text',
86
87
  * });
87
88
  * ```
88
89
  */
@@ -114,9 +115,11 @@ export class Memory extends APIResource {
114
115
  * {
115
116
  * content:
116
117
  * 'Meeting notes from the product planning session',
118
+ * type: 'text',
117
119
  * },
118
120
  * {
119
121
  * content: 'Follow-up tasks from the planning meeting',
122
+ * type: 'text',
120
123
  * },
121
124
  * ],
122
125
  * });
@@ -164,11 +167,16 @@ export class Memory extends APIResource {
164
167
  *
165
168
  * The API supports response compression for improved performance. Responses larger than 1KB will be automatically compressed when this header is present.
166
169
  *
170
+ * **User Resolution Precedence:**
171
+ * - If both user_id and external_user_id are provided, user_id takes precedence.
172
+ * - If only external_user_id is provided, it will be resolved to the internal user.
173
+ * - If neither is provided, the authenticated user is used.
174
+ *
167
175
  * @example
168
176
  * ```ts
169
177
  * const searchResponse = await client.memory.search({
170
178
  * query:
171
- * 'Find recurring customer complaints about API performance from the last month. Focus on issues where customers specifically mentioned timeout errors or slow response times in their conversations.',
179
+ * "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
180
  * });
173
181
  * ```
174
182
  */
@@ -195,6 +203,11 @@ export interface AddMemory {
195
203
  */
196
204
  content: string;
197
205
 
206
+ /**
207
+ * Valid memory types
208
+ */
209
+ type: MemoryType;
210
+
198
211
  /**
199
212
  * Context can be conversation history or any relevant context for a memory item
200
213
  */
@@ -209,11 +222,6 @@ export interface AddMemory {
209
222
  * Array of relationships that we can use in Graph DB (neo4J)
210
223
  */
211
224
  relationships_json?: Array<RelationshipItem> | null;
212
-
213
- /**
214
- * Content type of the memory item
215
- */
216
- type?: MemoryType;
217
225
  }
218
226
 
219
227
  /**
@@ -228,7 +236,7 @@ export interface AddMemoryResponse {
228
236
  /**
229
237
  * List of memory items if successful
230
238
  */
231
- data?: Array<DocumentAPI.AddMemoryItem> | null;
239
+ data?: Array<AddMemoryResponse.Data> | null;
232
240
 
233
241
  /**
234
242
  * Additional error details or context
@@ -246,6 +254,21 @@ export interface AddMemoryResponse {
246
254
  status?: string;
247
255
  }
248
256
 
257
+ export namespace AddMemoryResponse {
258
+ /**
259
+ * Response model for a single memory item in add_memory response
260
+ */
261
+ export interface Data {
262
+ createdAt: string;
263
+
264
+ memoryId: string;
265
+
266
+ objectId: string;
267
+
268
+ memoryChunkIds?: Array<string>;
269
+ }
270
+ }
271
+
249
272
  /**
250
273
  * Context item for memory request
251
274
  */
@@ -266,9 +289,21 @@ export interface MemoryMetadata {
266
289
  */
267
290
  createdAt?: string | null;
268
291
 
269
- 'emoji tags'?: string | null;
292
+ /**
293
+ * Optional object for arbitrary custom metadata fields. Only string, number,
294
+ * boolean, or list of strings allowed. Nested dicts are not allowed.
295
+ */
296
+ customMetadata?: Record<string, string | number | boolean | Array<string>> | null;
270
297
 
271
- 'emotion tags'?: string | null;
298
+ 'emoji tags'?: Array<string> | null;
299
+
300
+ 'emotion tags'?: Array<string> | null;
301
+
302
+ external_user_id?: string | null;
303
+
304
+ external_user_read_access?: Array<string> | null;
305
+
306
+ external_user_write_access?: Array<string> | null;
272
307
 
273
308
  /**
274
309
  * Hierarchical structures to enable navigation from broad topics to specific ones
@@ -277,13 +312,17 @@ export interface MemoryMetadata {
277
312
 
278
313
  location?: string | null;
279
314
 
315
+ pageId?: string | null;
316
+
280
317
  role_read_access?: Array<string> | null;
281
318
 
282
319
  role_write_access?: Array<string> | null;
283
320
 
321
+ sourceType?: string | null;
322
+
284
323
  sourceUrl?: string | null;
285
324
 
286
- topics?: string | null;
325
+ topics?: Array<string> | null;
287
326
 
288
327
  user_id?: string | null;
289
328
 
@@ -291,6 +330,8 @@ export interface MemoryMetadata {
291
330
 
292
331
  user_write_access?: Array<string> | null;
293
332
 
333
+ workspace_id?: string | null;
334
+
294
335
  workspace_read_access?: Array<string> | null;
295
336
 
296
337
  workspace_write_access?: Array<string> | null;
@@ -313,7 +354,7 @@ export interface RelationshipItem {
313
354
 
314
355
  relation_type: string;
315
356
 
316
- metadata?: unknown;
357
+ metadata?: Record<string, unknown>;
317
358
  }
318
359
 
319
360
  export interface SearchResponse {
@@ -368,7 +409,7 @@ export namespace SearchResponse {
368
409
 
369
410
  user_id: string;
370
411
 
371
- context?: string | null;
412
+ context?: Array<MemoryAPI.ContextItem> | null;
372
413
 
373
414
  conversation_id?: string;
374
415
 
@@ -376,6 +417,14 @@ export namespace SearchResponse {
376
417
 
377
418
  current_step?: string | null;
378
419
 
420
+ customMetadata?: Record<string, unknown> | null;
421
+
422
+ external_user_id?: string | null;
423
+
424
+ external_user_read_access?: Array<string> | null;
425
+
426
+ external_user_write_access?: Array<string> | null;
427
+
379
428
  file_url?: string | null;
380
429
 
381
430
  filename?: string | null;
@@ -384,12 +433,16 @@ export namespace SearchResponse {
384
433
 
385
434
  location?: string | null;
386
435
 
387
- metadata?: string | unknown | null;
436
+ metadata?: string | Record<string, unknown> | null;
388
437
 
389
438
  page?: string | null;
390
439
 
391
440
  page_number?: number | null;
392
441
 
442
+ role_read_access?: Array<string> | null;
443
+
444
+ role_write_access?: Array<string> | null;
445
+
393
446
  source_document_id?: string | null;
394
447
 
395
448
  source_message_id?: string | null;
@@ -410,8 +463,16 @@ export namespace SearchResponse {
410
463
 
411
464
  updated_at?: string | null;
412
465
 
466
+ user_read_access?: Array<string> | null;
467
+
468
+ user_write_access?: Array<string> | null;
469
+
413
470
  workspace_id?: string | null;
414
471
 
472
+ workspace_read_access?: Array<string> | null;
473
+
474
+ workspace_write_access?: Array<string> | null;
475
+
415
476
  [k: string]: unknown;
416
477
  }
417
478
 
@@ -470,6 +531,10 @@ export namespace SearchResponse {
470
531
 
471
532
  emoji_tags?: Array<string> | null;
472
533
 
534
+ external_user_read_access?: Array<string> | null;
535
+
536
+ external_user_write_access?: Array<string> | null;
537
+
473
538
  hierarchical_structures?: string | null;
474
539
 
475
540
  pageId?: string | null;
@@ -515,6 +580,10 @@ export namespace SearchResponse {
515
580
 
516
581
  createdAt?: string | null;
517
582
 
583
+ external_user_read_access?: Array<string> | null;
584
+
585
+ external_user_write_access?: Array<string> | null;
586
+
518
587
  pageId?: string | null;
519
588
 
520
589
  role_read_access?: Array<string> | null;
@@ -554,6 +623,10 @@ export namespace SearchResponse {
554
623
 
555
624
  createdAt?: string | null;
556
625
 
626
+ external_user_read_access?: Array<string> | null;
627
+
628
+ external_user_write_access?: Array<string> | null;
629
+
557
630
  pageId?: string | null;
558
631
 
559
632
  role_read_access?: Array<string> | null;
@@ -595,6 +668,10 @@ export namespace SearchResponse {
595
668
 
596
669
  createdAt?: string | null;
597
670
 
671
+ external_user_read_access?: Array<string> | null;
672
+
673
+ external_user_write_access?: Array<string> | null;
674
+
598
675
  pageId?: string | null;
599
676
 
600
677
  role_read_access?: Array<string> | null;
@@ -638,6 +715,15 @@ export namespace SearchResponse {
638
715
 
639
716
  createdAt?: string | null;
640
717
 
718
+ /**
719
+ * Due date for the task in ISO 8601 format
720
+ */
721
+ date?: string | null;
722
+
723
+ external_user_read_access?: Array<string> | null;
724
+
725
+ external_user_write_access?: Array<string> | null;
726
+
641
727
  pageId?: string | null;
642
728
 
643
729
  role_read_access?: Array<string> | null;
@@ -687,6 +773,10 @@ export namespace SearchResponse {
687
773
 
688
774
  createdAt?: string | null;
689
775
 
776
+ external_user_read_access?: Array<string> | null;
777
+
778
+ external_user_write_access?: Array<string> | null;
779
+
690
780
  pageId?: string | null;
691
781
 
692
782
  role_read_access?: Array<string> | null;
@@ -740,6 +830,10 @@ export namespace SearchResponse {
740
830
 
741
831
  createdAt?: string | null;
742
832
 
833
+ external_user_read_access?: Array<string> | null;
834
+
835
+ external_user_write_access?: Array<string> | null;
836
+
743
837
  pageId?: string | null;
744
838
 
745
839
  role_read_access?: Array<string> | null;
@@ -789,6 +883,10 @@ export namespace SearchResponse {
789
883
 
790
884
  createdAt?: string | null;
791
885
 
886
+ external_user_read_access?: Array<string> | null;
887
+
888
+ external_user_write_access?: Array<string> | null;
889
+
792
890
  pageId?: string | null;
793
891
 
794
892
  role_read_access?: Array<string> | null;
@@ -830,6 +928,10 @@ export namespace SearchResponse {
830
928
 
831
929
  createdAt?: string | null;
832
930
 
931
+ external_user_read_access?: Array<string> | null;
932
+
933
+ external_user_write_access?: Array<string> | null;
934
+
833
935
  pageId?: string | null;
834
936
 
835
937
  role_read_access?: Array<string> | null;
@@ -912,6 +1014,11 @@ export namespace MemoryUpdateResponse {
912
1014
  content?: string | null;
913
1015
 
914
1016
  memoryChunkIds?: Array<string> | null;
1017
+
1018
+ /**
1019
+ * Metadata for memory request
1020
+ */
1021
+ metadata?: MemoryAPI.MemoryMetadata | null;
915
1022
  }
916
1023
 
917
1024
  /**
@@ -1061,6 +1168,11 @@ export interface MemoryAddParams {
1061
1168
  */
1062
1169
  content: string;
1063
1170
 
1171
+ /**
1172
+ * Body param: Valid memory types
1173
+ */
1174
+ type: MemoryType;
1175
+
1064
1176
  /**
1065
1177
  * Query param: If True, skips adding background tasks for processing
1066
1178
  */
@@ -1081,11 +1193,6 @@ export interface MemoryAddParams {
1081
1193
  * Body param: Array of relationships that we can use in Graph DB (neo4J)
1082
1194
  */
1083
1195
  relationships_json?: Array<RelationshipItem> | null;
1084
-
1085
- /**
1086
- * Body param: Content type of the memory item
1087
- */
1088
- type?: MemoryType;
1089
1196
  }
1090
1197
 
1091
1198
  export interface MemoryAddBatchParams {
@@ -1103,6 +1210,18 @@ export interface MemoryAddBatchParams {
1103
1210
  * Body param: Number of items to process in parallel
1104
1211
  */
1105
1212
  batch_size?: number | null;
1213
+
1214
+ /**
1215
+ * Body param: External user ID for all memories in the batch. If provided and
1216
+ * user_id is not, will be resolved to internal user ID.
1217
+ */
1218
+ external_user_id?: string | null;
1219
+
1220
+ /**
1221
+ * Body param: Internal user ID for all memories in the batch. If not provided,
1222
+ * developer's user ID will be used.
1223
+ */
1224
+ user_id?: string | null;
1106
1225
  }
1107
1226
 
1108
1227
  export interface MemorySearchParams {
@@ -1125,6 +1244,18 @@ export interface MemorySearchParams {
1125
1244
  */
1126
1245
  max_nodes?: number;
1127
1246
 
1247
+ /**
1248
+ * Body param: Optional external user ID to filter search results by a specific
1249
+ * external user. If both user_id and external_user_id are provided, user_id takes
1250
+ * precedence.
1251
+ */
1252
+ external_user_id?: string | null;
1253
+
1254
+ /**
1255
+ * Body param: Metadata for memory request
1256
+ */
1257
+ metadata?: MemoryMetadata | null;
1258
+
1128
1259
  /**
1129
1260
  * Body param: Whether to enable additional ranking of search results. Default is
1130
1261
  * false because results are already ranked when using an LLM for search
@@ -1134,8 +1265,9 @@ export interface MemorySearchParams {
1134
1265
  rank_results?: boolean;
1135
1266
 
1136
1267
  /**
1137
- * Body param: Optional user ID to filter search results by a specific user. If not
1138
- * provided, results are not filtered by user.
1268
+ * Body param: Optional internal user ID to filter search results by a specific
1269
+ * user. If not provided, results are not filtered by user. If both user_id and
1270
+ * external_user_id are provided, user_id takes precedence.
1139
1271
  */
1140
1272
  user_id?: string | null;
1141
1273
 
@@ -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 UserAPI from './user';
4
5
  import { APIPromise } from '../core/api-promise';
5
6
  import { RequestOptions } from '../internal/request-options';
6
7
  import { path } from '../internal/utils/path';
@@ -48,8 +49,8 @@ export class User extends APIResource {
48
49
  }
49
50
 
50
51
  /**
51
- * Delete user association with developer and the user itself by user_id
52
- * (\_User.objectId)
52
+ * Delete user association with developer and the user itself by , assume external
53
+ * user_id is provided, and resolve to internal user_id (\_User.objectId)
53
54
  *
54
55
  * @example
55
56
  * ```ts
@@ -60,6 +61,21 @@ export class User extends APIResource {
60
61
  return this._client.delete(path`/v1/user/${userID}`, options);
61
62
  }
62
63
 
64
+ /**
65
+ * Create multiple users or link existing users to developer, and add each to the
66
+ * developer's workspace (if one exists).
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const response = await client.user.createBatch({
71
+ * users: [{ external_id: 'user123' }],
72
+ * });
73
+ * ```
74
+ */
75
+ createBatch(body: UserCreateBatchParams, options?: RequestOptions): APIPromise<UserCreateBatchResponse> {
76
+ return this._client.post('/v1/user/batch', { body, ...options });
77
+ }
78
+
63
79
  /**
64
80
  * Get user details by user_id (\_User.objectId) and developer association
65
81
  *
@@ -97,7 +113,7 @@ export interface UserResponse {
97
113
 
98
114
  external_id?: string | null;
99
115
 
100
- metadata?: unknown | null;
116
+ metadata?: Record<string, unknown> | null;
101
117
 
102
118
  updated_at?: string | null;
103
119
 
@@ -162,12 +178,36 @@ export interface UserDeleteResponse {
162
178
  user_id?: string | null;
163
179
  }
164
180
 
181
+ export interface UserCreateBatchResponse {
182
+ /**
183
+ * HTTP status code
184
+ */
185
+ code: number;
186
+
187
+ /**
188
+ * 'success' or 'error'
189
+ */
190
+ status: string;
191
+
192
+ data?: Array<UserResponse> | null;
193
+
194
+ details?: unknown;
195
+
196
+ error?: string | null;
197
+
198
+ page?: number | null;
199
+
200
+ page_size?: number | null;
201
+
202
+ total?: number | null;
203
+ }
204
+
165
205
  export interface UserCreateParams {
166
206
  external_id: string;
167
207
 
168
208
  email?: string | null;
169
209
 
170
- metadata?: unknown | null;
210
+ metadata?: Record<string, unknown> | null;
171
211
 
172
212
  type?: UserType;
173
213
  }
@@ -177,7 +217,7 @@ export interface UserUpdateParams {
177
217
 
178
218
  external_id?: string | null;
179
219
 
180
- metadata?: unknown | null;
220
+ metadata?: Record<string, unknown> | null;
181
221
 
182
222
  type?: UserType | null;
183
223
  }
@@ -192,14 +232,35 @@ export interface UserListParams {
192
232
  page_size?: number;
193
233
  }
194
234
 
235
+ export interface UserCreateBatchParams {
236
+ users: Array<UserCreateBatchParams.User>;
237
+ }
238
+
239
+ export namespace UserCreateBatchParams {
240
+ /**
241
+ * Request model for creating a user
242
+ */
243
+ export interface User {
244
+ external_id: string;
245
+
246
+ email?: string | null;
247
+
248
+ metadata?: Record<string, unknown> | null;
249
+
250
+ type?: UserAPI.UserType;
251
+ }
252
+ }
253
+
195
254
  export declare namespace User {
196
255
  export {
197
256
  type UserResponse as UserResponse,
198
257
  type UserType as UserType,
199
258
  type UserListResponse as UserListResponse,
200
259
  type UserDeleteResponse as UserDeleteResponse,
260
+ type UserCreateBatchResponse as UserCreateBatchResponse,
201
261
  type UserCreateParams as UserCreateParams,
202
262
  type UserUpdateParams as UserUpdateParams,
203
263
  type UserListParams as UserListParams,
264
+ type UserCreateBatchParams as UserCreateBatchParams,
204
265
  };
205
266
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.5.1'; // x-release-please-version
1
+ export const VERSION = '1.7.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.5.1";
1
+ export declare const VERSION = "1.7.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.5.1";
1
+ export declare const VERSION = "1.7.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.5.1'; // x-release-please-version
4
+ exports.VERSION = '1.7.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.5.1'; // x-release-please-version
1
+ export const VERSION = '1.7.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,103 +0,0 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- export declare class Document extends APIResource {
5
- /**
6
- * Upload a document (PDF/HTML/TXT) to be processed and added to memory.
7
- *
8
- * **Authentication Required**:
9
- * One of the following authentication methods must be used:
10
- * - Bearer token in `Authorization` header
11
- * - API Key in `X-API-Key` header
12
- * - Session token in `X-Session-Token` header
13
- *
14
- * **Required Headers**:
15
- * - Content-Type: multipart/form-data
16
- * - X-Client-Type: (e.g., 'papr_plugin', 'browser_extension')
17
- *
18
- * **Form Data**:
19
- * - file: The document file to upload (PDF/HTML/TXT)
20
- * - metadata: (optional) JSON string containing additional metadata
21
- */
22
- upload(params?: DocumentUploadParams | null | undefined, options?: RequestOptions): APIPromise<DocumentUploadResponse>;
23
- }
24
- /**
25
- * Response model for a single memory item in add_memory response
26
- */
27
- export interface AddMemoryItem {
28
- createdAt: string;
29
- memoryId: string;
30
- objectId: string;
31
- memoryChunkIds?: Array<string>;
32
- }
33
- export interface DocumentUploadResponse {
34
- /**
35
- * Status and progress of the document upload
36
- */
37
- document_status: DocumentUploadResponse.DocumentStatus;
38
- /**
39
- * HTTP status code
40
- */
41
- code?: number;
42
- /**
43
- * Additional error details or context
44
- */
45
- details?: unknown;
46
- /**
47
- * Error message if failed
48
- */
49
- error?: string | null;
50
- /**
51
- * For backward compatibility
52
- */
53
- memories?: Array<AddMemoryItem> | null;
54
- /**
55
- * List of memory items created from the document
56
- */
57
- memory_items?: Array<AddMemoryItem>;
58
- /**
59
- * Human-readable status message
60
- */
61
- message?: string | null;
62
- /**
63
- * 'success', 'processing', 'error', etc.
64
- */
65
- status?: string;
66
- }
67
- export declare namespace DocumentUploadResponse {
68
- /**
69
- * Status and progress of the document upload
70
- */
71
- interface DocumentStatus {
72
- /**
73
- * 0.0 to 1.0 for percentage
74
- */
75
- progress: number;
76
- current_filename?: string | null;
77
- current_page?: number | null;
78
- /**
79
- * Error message if failed
80
- */
81
- error?: string | null;
82
- /**
83
- * Processing status type
84
- */
85
- status_type?: 'processing' | 'completed' | 'failed' | 'not_found' | 'queued' | 'cancelled' | null;
86
- total_pages?: number | null;
87
- upload_id?: string | null;
88
- }
89
- }
90
- export interface DocumentUploadParams {
91
- /**
92
- * Optional Post objectId for updating status
93
- */
94
- post_objectId?: string | null;
95
- /**
96
- * If True, skips adding background tasks for processing
97
- */
98
- skip_background_processing?: boolean;
99
- }
100
- export declare namespace Document {
101
- export { type AddMemoryItem as AddMemoryItem, type DocumentUploadResponse as DocumentUploadResponse, type DocumentUploadParams as DocumentUploadParams, };
102
- }
103
- //# sourceMappingURL=document.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document.d.mts","sourceRoot":"","sources":["../src/resources/document.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS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