@studyfetch/sdk 1.41.0 → 1.42.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 +9 -0
- package/README.md +6 -6
- package/package.json +1 -1
- package/resources/v1/folders.d.mts +2 -77
- package/resources/v1/folders.d.mts.map +1 -1
- package/resources/v1/folders.d.ts +2 -77
- package/resources/v1/folders.d.ts.map +1 -1
- package/resources/v1/folders.js.map +1 -1
- package/resources/v1/folders.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/materials/index.d.mts +2 -2
- package/resources/v1/materials/index.d.mts.map +1 -1
- package/resources/v1/materials/index.d.ts +2 -2
- package/resources/v1/materials/index.d.ts.map +1 -1
- package/resources/v1/materials/index.js.map +1 -1
- package/resources/v1/materials/index.mjs.map +1 -1
- package/resources/v1/materials/materials.d.mts +179 -834
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +179 -834
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +29 -22
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +29 -22
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +14 -407
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +14 -407
- package/resources/v1/materials/upload.d.ts.map +1 -1
- package/resources/v1/materials/upload.js +5 -5
- package/resources/v1/materials/upload.js.map +1 -1
- package/resources/v1/materials/upload.mjs +5 -5
- package/resources/v1/materials/upload.mjs.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/folders.ts +2 -98
- package/src/resources/v1/index.ts +5 -9
- package/src/resources/v1/materials/index.ts +5 -14
- package/src/resources/v1/materials/materials.ts +165 -1018
- package/src/resources/v1/materials/upload.ts +16 -520
- package/src/resources/v1/v1.ts +10 -18
- 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
|
@@ -7,17 +7,12 @@ import * as UploadAPI from './upload';
|
|
|
7
7
|
import {
|
|
8
8
|
Upload,
|
|
9
9
|
UploadCompleteUploadParams,
|
|
10
|
-
UploadCompleteUploadResponse,
|
|
11
10
|
UploadGetPresignedURLParams,
|
|
12
11
|
UploadGetPresignedURLResponse,
|
|
13
12
|
UploadUploadFileAndProcessParams,
|
|
14
|
-
UploadUploadFileAndProcessResponse,
|
|
15
13
|
UploadUploadFileParams,
|
|
16
|
-
UploadUploadFileResponse,
|
|
17
14
|
UploadUploadFromURLAndProcessParams,
|
|
18
|
-
UploadUploadFromURLAndProcessResponse,
|
|
19
15
|
UploadUploadFromURLParams,
|
|
20
|
-
UploadUploadFromURLResponse,
|
|
21
16
|
} from './upload';
|
|
22
17
|
import { APIPromise } from '../../../core/api-promise';
|
|
23
18
|
import { buildHeaders } from '../../../internal/headers';
|
|
@@ -33,13 +28,13 @@ export class Materials extends APIResource {
|
|
|
33
28
|
*
|
|
34
29
|
* @example
|
|
35
30
|
* ```ts
|
|
36
|
-
* const
|
|
31
|
+
* const materialResponse = await client.v1.materials.create({
|
|
37
32
|
* content: { type: 'text' },
|
|
38
33
|
* name: 'Chapter 1 - Introduction',
|
|
39
34
|
* });
|
|
40
35
|
* ```
|
|
41
36
|
*/
|
|
42
|
-
create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<
|
|
37
|
+
create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
43
38
|
return this._client.post('/api/v1/materials', { body, ...options });
|
|
44
39
|
}
|
|
45
40
|
|
|
@@ -48,10 +43,12 @@ export class Materials extends APIResource {
|
|
|
48
43
|
*
|
|
49
44
|
* @example
|
|
50
45
|
* ```ts
|
|
51
|
-
* const
|
|
46
|
+
* const materialResponse = await client.v1.materials.retrieve(
|
|
47
|
+
* 'id',
|
|
48
|
+
* );
|
|
52
49
|
* ```
|
|
53
50
|
*/
|
|
54
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
51
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
55
52
|
return this._client.get(path`/api/v1/materials/${id}`, options);
|
|
56
53
|
}
|
|
57
54
|
|
|
@@ -60,11 +57,13 @@ export class Materials extends APIResource {
|
|
|
60
57
|
*
|
|
61
58
|
* @example
|
|
62
59
|
* ```ts
|
|
63
|
-
* const
|
|
60
|
+
* const materialResponse = await client.v1.materials.update(
|
|
61
|
+
* 'id',
|
|
62
|
+
* );
|
|
64
63
|
* ```
|
|
65
64
|
*/
|
|
66
|
-
update(id: string, options?: RequestOptions): APIPromise<
|
|
67
|
-
return this._client.patch(path`/api/v1/materials/${id}`, options);
|
|
65
|
+
update(id: string, body: MaterialUpdateParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
66
|
+
return this._client.patch(path`/api/v1/materials/${id}`, { body, ...options });
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
/**
|
|
@@ -103,18 +102,17 @@ export class Materials extends APIResource {
|
|
|
103
102
|
*
|
|
104
103
|
* @example
|
|
105
104
|
* ```ts
|
|
106
|
-
* const
|
|
107
|
-
* {
|
|
105
|
+
* const materialResponse =
|
|
106
|
+
* await client.v1.materials.createAndProcess({
|
|
108
107
|
* content: { type: 'text' },
|
|
109
108
|
* name: 'Chapter 1 - Introduction',
|
|
110
|
-
* }
|
|
111
|
-
* );
|
|
109
|
+
* });
|
|
112
110
|
* ```
|
|
113
111
|
*/
|
|
114
112
|
createAndProcess(
|
|
115
113
|
body: MaterialCreateAndProcessParams,
|
|
116
114
|
options?: RequestOptions,
|
|
117
|
-
): APIPromise<
|
|
115
|
+
): APIPromise<MaterialResponse> {
|
|
118
116
|
return this._client.post('/api/v1/materials/upload-and-process', { body, ...options });
|
|
119
117
|
}
|
|
120
118
|
|
|
@@ -148,14 +146,15 @@ export class Materials extends APIResource {
|
|
|
148
146
|
*
|
|
149
147
|
* @example
|
|
150
148
|
* ```ts
|
|
151
|
-
* const
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
149
|
+
* const generatedMaterialResponse =
|
|
150
|
+
* await client.v1.materials.generate({
|
|
151
|
+
* name: 'Photosynthesis Study Plan',
|
|
152
|
+
* topic: 'Photosynthesis in plants',
|
|
153
|
+
* type: 'notes',
|
|
154
|
+
* });
|
|
156
155
|
* ```
|
|
157
156
|
*/
|
|
158
|
-
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<
|
|
157
|
+
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<GeneratedMaterialResponse> {
|
|
159
158
|
return this._client.post('/api/v1/materials/generate', { body, ...options });
|
|
160
159
|
}
|
|
161
160
|
|
|
@@ -165,7 +164,7 @@ export class Materials extends APIResource {
|
|
|
165
164
|
*
|
|
166
165
|
* @example
|
|
167
166
|
* ```ts
|
|
168
|
-
* const
|
|
167
|
+
* const generatedMaterialResponse =
|
|
169
168
|
* await client.v1.materials.generateAndProcess({
|
|
170
169
|
* name: 'Photosynthesis Study Plan',
|
|
171
170
|
* topic: 'Photosynthesis in plants',
|
|
@@ -176,7 +175,7 @@ export class Materials extends APIResource {
|
|
|
176
175
|
generateAndProcess(
|
|
177
176
|
body: MaterialGenerateAndProcessParams,
|
|
178
177
|
options?: RequestOptions,
|
|
179
|
-
): APIPromise<
|
|
178
|
+
): APIPromise<GeneratedMaterialResponse> {
|
|
180
179
|
return this._client.post('/api/v1/materials/generate-and-process', { body, ...options });
|
|
181
180
|
}
|
|
182
181
|
|
|
@@ -217,12 +216,13 @@ export class Materials extends APIResource {
|
|
|
217
216
|
*
|
|
218
217
|
* @example
|
|
219
218
|
* ```ts
|
|
220
|
-
* const
|
|
221
|
-
*
|
|
222
|
-
* }
|
|
219
|
+
* const materialResponse = await client.v1.materials.move(
|
|
220
|
+
* 'id',
|
|
221
|
+
* { folderId: 'folderId' },
|
|
222
|
+
* );
|
|
223
223
|
* ```
|
|
224
224
|
*/
|
|
225
|
-
move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<
|
|
225
|
+
move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
226
226
|
return this._client.post(path`/api/v1/materials/${id}/move`, { body, ...options });
|
|
227
227
|
}
|
|
228
228
|
|
|
@@ -231,824 +231,67 @@ export class Materials extends APIResource {
|
|
|
231
231
|
*
|
|
232
232
|
* @example
|
|
233
233
|
* ```ts
|
|
234
|
-
* const
|
|
235
|
-
*
|
|
236
|
-
* }
|
|
237
|
-
*
|
|
238
|
-
*/
|
|
239
|
-
rename(
|
|
240
|
-
id: string,
|
|
241
|
-
body: MaterialRenameParams,
|
|
242
|
-
options?: RequestOptions,
|
|
243
|
-
): APIPromise<MaterialRenameResponse> {
|
|
244
|
-
return this._client.post(path`/api/v1/materials/${id}/rename`, { body, ...options });
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Reprocess material to regenerate embeddings and extract content
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* ```ts
|
|
252
|
-
* const response = await client.v1.materials.reprocess('id');
|
|
253
|
-
* ```
|
|
254
|
-
*/
|
|
255
|
-
reprocess(id: string, options?: RequestOptions): APIPromise<MaterialReprocessResponse> {
|
|
256
|
-
return this._client.post(path`/api/v1/materials/${id}/reprocess`, options);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Search materials using RAG (Retrieval-Augmented Generation)
|
|
261
|
-
*
|
|
262
|
-
* @example
|
|
263
|
-
* ```ts
|
|
264
|
-
* const response = await client.v1.materials.search({
|
|
265
|
-
* query: 'What is photosynthesis?',
|
|
266
|
-
* });
|
|
234
|
+
* const materialResponse = await client.v1.materials.rename(
|
|
235
|
+
* 'id',
|
|
236
|
+
* { name: 'New Material Name' },
|
|
237
|
+
* );
|
|
267
238
|
* ```
|
|
268
239
|
*/
|
|
269
|
-
|
|
270
|
-
return this._client.post(
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export interface MaterialCreateResponse {
|
|
275
|
-
/**
|
|
276
|
-
* Material ID
|
|
277
|
-
*/
|
|
278
|
-
_id: string;
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Material content
|
|
282
|
-
*/
|
|
283
|
-
content: MaterialCreateResponse.Content;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Content type
|
|
287
|
-
*/
|
|
288
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Creation timestamp
|
|
292
|
-
*/
|
|
293
|
-
createdAt: string;
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Folder ID
|
|
297
|
-
*/
|
|
298
|
-
folderId: string | null;
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Material name
|
|
302
|
-
*/
|
|
303
|
-
name: string;
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Organization ID
|
|
307
|
-
*/
|
|
308
|
-
organizationId: string;
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Material status
|
|
312
|
-
*/
|
|
313
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Last update timestamp
|
|
317
|
-
*/
|
|
318
|
-
updatedAt: string;
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Material metadata
|
|
322
|
-
*/
|
|
323
|
-
metadata?: unknown;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* References that this material cites
|
|
327
|
-
*/
|
|
328
|
-
references?: Array<MaterialCreateResponse.Reference>;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Usage information
|
|
332
|
-
*/
|
|
333
|
-
usage?: unknown;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
export namespace MaterialCreateResponse {
|
|
337
|
-
/**
|
|
338
|
-
* Material content
|
|
339
|
-
*/
|
|
340
|
-
export interface Content {
|
|
341
|
-
filename?: string;
|
|
342
|
-
|
|
343
|
-
fileSize?: number;
|
|
344
|
-
|
|
345
|
-
mimeType?: string;
|
|
346
|
-
|
|
347
|
-
s3Key?: string;
|
|
348
|
-
|
|
349
|
-
s3Url?: string;
|
|
350
|
-
|
|
351
|
-
text?: string;
|
|
352
|
-
|
|
353
|
-
url?: string;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
export interface Reference {
|
|
357
|
-
/**
|
|
358
|
-
* Reference title
|
|
359
|
-
*/
|
|
360
|
-
title: string;
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Reference URL
|
|
364
|
-
*/
|
|
365
|
-
url?: string;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export interface MaterialRetrieveResponse {
|
|
370
|
-
/**
|
|
371
|
-
* Material ID
|
|
372
|
-
*/
|
|
373
|
-
_id: string;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Material content
|
|
377
|
-
*/
|
|
378
|
-
content: MaterialRetrieveResponse.Content;
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Content type
|
|
382
|
-
*/
|
|
383
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Creation timestamp
|
|
387
|
-
*/
|
|
388
|
-
createdAt: string;
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Folder ID
|
|
392
|
-
*/
|
|
393
|
-
folderId: string | null;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Material name
|
|
397
|
-
*/
|
|
398
|
-
name: string;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Organization ID
|
|
402
|
-
*/
|
|
403
|
-
organizationId: string;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Material status
|
|
407
|
-
*/
|
|
408
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Last update timestamp
|
|
412
|
-
*/
|
|
413
|
-
updatedAt: string;
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* Material metadata
|
|
417
|
-
*/
|
|
418
|
-
metadata?: unknown;
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* References that this material cites
|
|
422
|
-
*/
|
|
423
|
-
references?: Array<MaterialRetrieveResponse.Reference>;
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Usage information
|
|
427
|
-
*/
|
|
428
|
-
usage?: unknown;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
export namespace MaterialRetrieveResponse {
|
|
432
|
-
/**
|
|
433
|
-
* Material content
|
|
434
|
-
*/
|
|
435
|
-
export interface Content {
|
|
436
|
-
filename?: string;
|
|
437
|
-
|
|
438
|
-
fileSize?: number;
|
|
439
|
-
|
|
440
|
-
mimeType?: string;
|
|
441
|
-
|
|
442
|
-
s3Key?: string;
|
|
443
|
-
|
|
444
|
-
s3Url?: string;
|
|
445
|
-
|
|
446
|
-
text?: string;
|
|
447
|
-
|
|
448
|
-
url?: string;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
export interface Reference {
|
|
452
|
-
/**
|
|
453
|
-
* Reference title
|
|
454
|
-
*/
|
|
455
|
-
title: string;
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Reference URL
|
|
459
|
-
*/
|
|
460
|
-
url?: string;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
export interface MaterialUpdateResponse {
|
|
465
|
-
/**
|
|
466
|
-
* Material ID
|
|
467
|
-
*/
|
|
468
|
-
_id: string;
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Material content
|
|
472
|
-
*/
|
|
473
|
-
content: MaterialUpdateResponse.Content;
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* Content type
|
|
477
|
-
*/
|
|
478
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Creation timestamp
|
|
482
|
-
*/
|
|
483
|
-
createdAt: string;
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Folder ID
|
|
487
|
-
*/
|
|
488
|
-
folderId: string | null;
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Material name
|
|
492
|
-
*/
|
|
493
|
-
name: string;
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Organization ID
|
|
497
|
-
*/
|
|
498
|
-
organizationId: string;
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Material status
|
|
502
|
-
*/
|
|
503
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Last update timestamp
|
|
507
|
-
*/
|
|
508
|
-
updatedAt: string;
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* Material metadata
|
|
512
|
-
*/
|
|
513
|
-
metadata?: unknown;
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* References that this material cites
|
|
517
|
-
*/
|
|
518
|
-
references?: Array<MaterialUpdateResponse.Reference>;
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* Usage information
|
|
522
|
-
*/
|
|
523
|
-
usage?: unknown;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
export namespace MaterialUpdateResponse {
|
|
527
|
-
/**
|
|
528
|
-
* Material content
|
|
529
|
-
*/
|
|
530
|
-
export interface Content {
|
|
531
|
-
filename?: string;
|
|
532
|
-
|
|
533
|
-
fileSize?: number;
|
|
534
|
-
|
|
535
|
-
mimeType?: string;
|
|
536
|
-
|
|
537
|
-
s3Key?: string;
|
|
538
|
-
|
|
539
|
-
s3Url?: string;
|
|
540
|
-
|
|
541
|
-
text?: string;
|
|
542
|
-
|
|
543
|
-
url?: string;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
export interface Reference {
|
|
547
|
-
/**
|
|
548
|
-
* Reference title
|
|
549
|
-
*/
|
|
550
|
-
title: string;
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Reference URL
|
|
554
|
-
*/
|
|
555
|
-
url?: string;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
export interface MaterialListResponse {
|
|
560
|
-
materials?: Array<MaterialListResponse.Material>;
|
|
561
|
-
|
|
562
|
-
page?: number;
|
|
563
|
-
|
|
564
|
-
totalCount?: number;
|
|
565
|
-
|
|
566
|
-
totalPages?: number;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
export namespace MaterialListResponse {
|
|
570
|
-
export interface Material {
|
|
571
|
-
/**
|
|
572
|
-
* Material ID
|
|
573
|
-
*/
|
|
574
|
-
_id: string;
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* Material content
|
|
578
|
-
*/
|
|
579
|
-
content: Material.Content;
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* Content type
|
|
583
|
-
*/
|
|
584
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* Creation timestamp
|
|
588
|
-
*/
|
|
589
|
-
createdAt: string;
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* Folder ID
|
|
593
|
-
*/
|
|
594
|
-
folderId: string | null;
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Material name
|
|
598
|
-
*/
|
|
599
|
-
name: string;
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Organization ID
|
|
603
|
-
*/
|
|
604
|
-
organizationId: string;
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Material status
|
|
608
|
-
*/
|
|
609
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
610
|
-
|
|
611
|
-
/**
|
|
612
|
-
* Last update timestamp
|
|
613
|
-
*/
|
|
614
|
-
updatedAt: string;
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* Material metadata
|
|
618
|
-
*/
|
|
619
|
-
metadata?: unknown;
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* References that this material cites
|
|
623
|
-
*/
|
|
624
|
-
references?: Array<Material.Reference>;
|
|
625
|
-
|
|
626
|
-
/**
|
|
627
|
-
* Usage information
|
|
628
|
-
*/
|
|
629
|
-
usage?: unknown;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
export namespace Material {
|
|
633
|
-
/**
|
|
634
|
-
* Material content
|
|
635
|
-
*/
|
|
636
|
-
export interface Content {
|
|
637
|
-
filename?: string;
|
|
638
|
-
|
|
639
|
-
fileSize?: number;
|
|
640
|
-
|
|
641
|
-
mimeType?: string;
|
|
642
|
-
|
|
643
|
-
s3Key?: string;
|
|
644
|
-
|
|
645
|
-
s3Url?: string;
|
|
646
|
-
|
|
647
|
-
text?: string;
|
|
648
|
-
|
|
649
|
-
url?: string;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
export interface Reference {
|
|
653
|
-
/**
|
|
654
|
-
* Reference title
|
|
655
|
-
*/
|
|
656
|
-
title: string;
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* Reference URL
|
|
660
|
-
*/
|
|
661
|
-
url?: string;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
export interface MaterialCreateAndProcessResponse {
|
|
667
|
-
/**
|
|
668
|
-
* Material ID
|
|
669
|
-
*/
|
|
670
|
-
_id: string;
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Material content
|
|
674
|
-
*/
|
|
675
|
-
content: MaterialCreateAndProcessResponse.Content;
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* Content type
|
|
679
|
-
*/
|
|
680
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* Creation timestamp
|
|
684
|
-
*/
|
|
685
|
-
createdAt: string;
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* Folder ID
|
|
689
|
-
*/
|
|
690
|
-
folderId: string | null;
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* Material name
|
|
694
|
-
*/
|
|
695
|
-
name: string;
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* Organization ID
|
|
699
|
-
*/
|
|
700
|
-
organizationId: string;
|
|
701
|
-
|
|
702
|
-
/**
|
|
703
|
-
* Material status
|
|
704
|
-
*/
|
|
705
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* Last update timestamp
|
|
709
|
-
*/
|
|
710
|
-
updatedAt: string;
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* Material metadata
|
|
714
|
-
*/
|
|
715
|
-
metadata?: unknown;
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* References that this material cites
|
|
719
|
-
*/
|
|
720
|
-
references?: Array<MaterialCreateAndProcessResponse.Reference>;
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* Usage information
|
|
724
|
-
*/
|
|
725
|
-
usage?: unknown;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
export namespace MaterialCreateAndProcessResponse {
|
|
729
|
-
/**
|
|
730
|
-
* Material content
|
|
731
|
-
*/
|
|
732
|
-
export interface Content {
|
|
733
|
-
filename?: string;
|
|
734
|
-
|
|
735
|
-
fileSize?: number;
|
|
736
|
-
|
|
737
|
-
mimeType?: string;
|
|
738
|
-
|
|
739
|
-
s3Key?: string;
|
|
740
|
-
|
|
741
|
-
s3Url?: string;
|
|
742
|
-
|
|
743
|
-
text?: string;
|
|
744
|
-
|
|
745
|
-
url?: string;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
export interface Reference {
|
|
749
|
-
/**
|
|
750
|
-
* Reference title
|
|
751
|
-
*/
|
|
752
|
-
title: string;
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* Reference URL
|
|
756
|
-
*/
|
|
757
|
-
url?: string;
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
export type MaterialCreateBatchUploadURLsResponse =
|
|
762
|
-
Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
763
|
-
|
|
764
|
-
export namespace MaterialCreateBatchUploadURLsResponse {
|
|
765
|
-
export interface MaterialCreateBatchUploadURLsResponseItem {
|
|
766
|
-
/**
|
|
767
|
-
* Material ID
|
|
768
|
-
*/
|
|
769
|
-
materialId: string;
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* Material name
|
|
773
|
-
*/
|
|
774
|
-
name: string;
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* S3 key
|
|
778
|
-
*/
|
|
779
|
-
s3Key: string;
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* Presigned upload URL
|
|
783
|
-
*/
|
|
784
|
-
uploadUrl: string;
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
export interface MaterialGenerateResponse {
|
|
789
|
-
/**
|
|
790
|
-
* Material ID
|
|
791
|
-
*/
|
|
792
|
-
_id: string;
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
* Material content
|
|
796
|
-
*/
|
|
797
|
-
content: MaterialGenerateResponse.Content;
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
* Content type
|
|
801
|
-
*/
|
|
802
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* Creation timestamp
|
|
806
|
-
*/
|
|
807
|
-
createdAt: string;
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Folder ID
|
|
811
|
-
*/
|
|
812
|
-
folderId: string | null;
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* Material name
|
|
816
|
-
*/
|
|
817
|
-
name: string;
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* Organization ID
|
|
821
|
-
*/
|
|
822
|
-
organizationId: string;
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* Material status
|
|
826
|
-
*/
|
|
827
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* Last update timestamp
|
|
831
|
-
*/
|
|
832
|
-
updatedAt: string;
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* Generation metadata
|
|
836
|
-
*/
|
|
837
|
-
generationMetadata?: unknown;
|
|
838
|
-
|
|
839
|
-
/**
|
|
840
|
-
* Material metadata
|
|
841
|
-
*/
|
|
842
|
-
metadata?: unknown;
|
|
843
|
-
|
|
844
|
-
/**
|
|
845
|
-
* References that this material cites
|
|
846
|
-
*/
|
|
847
|
-
references?: Array<MaterialGenerateResponse.Reference>;
|
|
848
|
-
|
|
849
|
-
/**
|
|
850
|
-
* Usage information
|
|
851
|
-
*/
|
|
852
|
-
usage?: unknown;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
export namespace MaterialGenerateResponse {
|
|
856
|
-
/**
|
|
857
|
-
* Material content
|
|
858
|
-
*/
|
|
859
|
-
export interface Content {
|
|
860
|
-
filename?: string;
|
|
861
|
-
|
|
862
|
-
fileSize?: number;
|
|
863
|
-
|
|
864
|
-
mimeType?: string;
|
|
865
|
-
|
|
866
|
-
s3Key?: string;
|
|
867
|
-
|
|
868
|
-
s3Url?: string;
|
|
869
|
-
|
|
870
|
-
text?: string;
|
|
871
|
-
|
|
872
|
-
url?: string;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
export interface Reference {
|
|
876
|
-
/**
|
|
877
|
-
* Reference title
|
|
878
|
-
*/
|
|
879
|
-
title: string;
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* Reference URL
|
|
883
|
-
*/
|
|
884
|
-
url?: string;
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
export interface MaterialGenerateAndProcessResponse {
|
|
889
|
-
/**
|
|
890
|
-
* Material ID
|
|
891
|
-
*/
|
|
892
|
-
_id: string;
|
|
893
|
-
|
|
894
|
-
/**
|
|
895
|
-
* Material content
|
|
896
|
-
*/
|
|
897
|
-
content: MaterialGenerateAndProcessResponse.Content;
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* Content type
|
|
901
|
-
*/
|
|
902
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
903
|
-
|
|
904
|
-
/**
|
|
905
|
-
* Creation timestamp
|
|
906
|
-
*/
|
|
907
|
-
createdAt: string;
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* Folder ID
|
|
911
|
-
*/
|
|
912
|
-
folderId: string | null;
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* Material name
|
|
916
|
-
*/
|
|
917
|
-
name: string;
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
* Organization ID
|
|
921
|
-
*/
|
|
922
|
-
organizationId: string;
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* Material status
|
|
926
|
-
*/
|
|
927
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
928
|
-
|
|
929
|
-
/**
|
|
930
|
-
* Last update timestamp
|
|
931
|
-
*/
|
|
932
|
-
updatedAt: string;
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* Generation metadata
|
|
936
|
-
*/
|
|
937
|
-
generationMetadata?: unknown;
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* Material metadata
|
|
941
|
-
*/
|
|
942
|
-
metadata?: unknown;
|
|
943
|
-
|
|
944
|
-
/**
|
|
945
|
-
* References that this material cites
|
|
946
|
-
*/
|
|
947
|
-
references?: Array<MaterialGenerateAndProcessResponse.Reference>;
|
|
948
|
-
|
|
949
|
-
/**
|
|
950
|
-
* Usage information
|
|
951
|
-
*/
|
|
952
|
-
usage?: unknown;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
export namespace MaterialGenerateAndProcessResponse {
|
|
956
|
-
/**
|
|
957
|
-
* Material content
|
|
958
|
-
*/
|
|
959
|
-
export interface Content {
|
|
960
|
-
filename?: string;
|
|
961
|
-
|
|
962
|
-
fileSize?: number;
|
|
963
|
-
|
|
964
|
-
mimeType?: string;
|
|
965
|
-
|
|
966
|
-
s3Key?: string;
|
|
967
|
-
|
|
968
|
-
s3Url?: string;
|
|
969
|
-
|
|
970
|
-
text?: string;
|
|
971
|
-
|
|
972
|
-
url?: string;
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
export interface Reference {
|
|
976
|
-
/**
|
|
977
|
-
* Reference title
|
|
978
|
-
*/
|
|
979
|
-
title: string;
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* Reference URL
|
|
983
|
-
*/
|
|
984
|
-
url?: string;
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
export interface MaterialGetDebugInfoResponse {
|
|
989
|
-
/**
|
|
990
|
-
* Content details
|
|
991
|
-
*/
|
|
992
|
-
content: unknown;
|
|
993
|
-
|
|
994
|
-
/**
|
|
995
|
-
* Content type
|
|
996
|
-
*/
|
|
997
|
-
contentType: string;
|
|
998
|
-
|
|
999
|
-
/**
|
|
1000
|
-
* Processed images
|
|
1001
|
-
*/
|
|
1002
|
-
images: Array<MaterialGetDebugInfoResponse.Image>;
|
|
240
|
+
rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
241
|
+
return this._client.post(path`/api/v1/materials/${id}/rename`, { body, ...options });
|
|
242
|
+
}
|
|
1003
243
|
|
|
1004
244
|
/**
|
|
1005
|
-
*
|
|
245
|
+
* Reprocess material to regenerate embeddings and extract content
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* ```ts
|
|
249
|
+
* const materialResponse =
|
|
250
|
+
* await client.v1.materials.reprocess('id');
|
|
251
|
+
* ```
|
|
1006
252
|
*/
|
|
1007
|
-
|
|
253
|
+
reprocess(id: string, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
254
|
+
return this._client.post(path`/api/v1/materials/${id}/reprocess`, options);
|
|
255
|
+
}
|
|
1008
256
|
|
|
1009
257
|
/**
|
|
1010
|
-
*
|
|
258
|
+
* Search materials using RAG (Retrieval-Augmented Generation)
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```ts
|
|
262
|
+
* const response = await client.v1.materials.search({
|
|
263
|
+
* query: 'What is photosynthesis?',
|
|
264
|
+
* });
|
|
265
|
+
* ```
|
|
1011
266
|
*/
|
|
1012
|
-
|
|
267
|
+
search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse> {
|
|
268
|
+
return this._client.post('/api/v1/materials/search', { body, ...options });
|
|
269
|
+
}
|
|
270
|
+
}
|
|
1013
271
|
|
|
272
|
+
export interface Content {
|
|
1014
273
|
/**
|
|
1015
|
-
*
|
|
274
|
+
* Type of content
|
|
1016
275
|
*/
|
|
1017
|
-
|
|
276
|
+
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1018
277
|
|
|
1019
278
|
/**
|
|
1020
|
-
*
|
|
279
|
+
* URL to fetch content from
|
|
1021
280
|
*/
|
|
1022
|
-
|
|
281
|
+
sourceUrl?: string;
|
|
1023
282
|
|
|
1024
283
|
/**
|
|
1025
|
-
*
|
|
284
|
+
* Text content (for text type)
|
|
1026
285
|
*/
|
|
1027
|
-
|
|
1028
|
-
}
|
|
286
|
+
text?: string;
|
|
1029
287
|
|
|
1030
|
-
export namespace MaterialGetDebugInfoResponse {
|
|
1031
|
-
export interface Image {
|
|
1032
|
-
id?: string;
|
|
1033
|
-
|
|
1034
|
-
description?: string;
|
|
1035
|
-
|
|
1036
|
-
pageIndex?: number;
|
|
1037
|
-
|
|
1038
|
-
s3Key?: string;
|
|
1039
|
-
|
|
1040
|
-
s3Url?: string;
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
export interface MaterialGetDownloadURLResponse {
|
|
1045
288
|
/**
|
|
1046
|
-
*
|
|
289
|
+
* URL to the content (for url type)
|
|
1047
290
|
*/
|
|
1048
|
-
|
|
291
|
+
url?: string;
|
|
1049
292
|
}
|
|
1050
293
|
|
|
1051
|
-
export interface
|
|
294
|
+
export interface GeneratedMaterialResponse {
|
|
1052
295
|
/**
|
|
1053
296
|
* Material ID
|
|
1054
297
|
*/
|
|
@@ -1057,7 +300,7 @@ export interface MaterialMoveResponse {
|
|
|
1057
300
|
/**
|
|
1058
301
|
* Material content
|
|
1059
302
|
*/
|
|
1060
|
-
content:
|
|
303
|
+
content: GeneratedMaterialResponse.Content;
|
|
1061
304
|
|
|
1062
305
|
/**
|
|
1063
306
|
* Content type
|
|
@@ -1094,6 +337,11 @@ export interface MaterialMoveResponse {
|
|
|
1094
337
|
*/
|
|
1095
338
|
updatedAt: string;
|
|
1096
339
|
|
|
340
|
+
/**
|
|
341
|
+
* Generation metadata
|
|
342
|
+
*/
|
|
343
|
+
generationMetadata?: unknown;
|
|
344
|
+
|
|
1097
345
|
/**
|
|
1098
346
|
* Material metadata
|
|
1099
347
|
*/
|
|
@@ -1102,7 +350,7 @@ export interface MaterialMoveResponse {
|
|
|
1102
350
|
/**
|
|
1103
351
|
* References that this material cites
|
|
1104
352
|
*/
|
|
1105
|
-
references?: Array<
|
|
353
|
+
references?: Array<Reference>;
|
|
1106
354
|
|
|
1107
355
|
/**
|
|
1108
356
|
* Usage information
|
|
@@ -1110,7 +358,7 @@ export interface MaterialMoveResponse {
|
|
|
1110
358
|
usage?: unknown;
|
|
1111
359
|
}
|
|
1112
360
|
|
|
1113
|
-
export namespace
|
|
361
|
+
export namespace GeneratedMaterialResponse {
|
|
1114
362
|
/**
|
|
1115
363
|
* Material content
|
|
1116
364
|
*/
|
|
@@ -1129,21 +377,9 @@ export namespace MaterialMoveResponse {
|
|
|
1129
377
|
|
|
1130
378
|
url?: string;
|
|
1131
379
|
}
|
|
1132
|
-
|
|
1133
|
-
export interface Reference {
|
|
1134
|
-
/**
|
|
1135
|
-
* Reference title
|
|
1136
|
-
*/
|
|
1137
|
-
title: string;
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
* Reference URL
|
|
1141
|
-
*/
|
|
1142
|
-
url?: string;
|
|
1143
|
-
}
|
|
1144
380
|
}
|
|
1145
381
|
|
|
1146
|
-
export interface
|
|
382
|
+
export interface MaterialResponse {
|
|
1147
383
|
/**
|
|
1148
384
|
* Material ID
|
|
1149
385
|
*/
|
|
@@ -1152,7 +388,7 @@ export interface MaterialRenameResponse {
|
|
|
1152
388
|
/**
|
|
1153
389
|
* Material content
|
|
1154
390
|
*/
|
|
1155
|
-
content:
|
|
391
|
+
content: MaterialResponse.Content;
|
|
1156
392
|
|
|
1157
393
|
/**
|
|
1158
394
|
* Content type
|
|
@@ -1197,7 +433,7 @@ export interface MaterialRenameResponse {
|
|
|
1197
433
|
/**
|
|
1198
434
|
* References that this material cites
|
|
1199
435
|
*/
|
|
1200
|
-
references?: Array<
|
|
436
|
+
references?: Array<Reference>;
|
|
1201
437
|
|
|
1202
438
|
/**
|
|
1203
439
|
* Usage information
|
|
@@ -1205,7 +441,7 @@ export interface MaterialRenameResponse {
|
|
|
1205
441
|
usage?: unknown;
|
|
1206
442
|
}
|
|
1207
443
|
|
|
1208
|
-
export namespace
|
|
444
|
+
export namespace MaterialResponse {
|
|
1209
445
|
/**
|
|
1210
446
|
* Material content
|
|
1211
447
|
*/
|
|
@@ -1224,45 +460,82 @@ export namespace MaterialRenameResponse {
|
|
|
1224
460
|
|
|
1225
461
|
url?: string;
|
|
1226
462
|
}
|
|
463
|
+
}
|
|
1227
464
|
|
|
1228
|
-
|
|
465
|
+
export interface Reference {
|
|
466
|
+
/**
|
|
467
|
+
* Reference title
|
|
468
|
+
*/
|
|
469
|
+
title: string;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Reference URL
|
|
473
|
+
*/
|
|
474
|
+
url?: string;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface MaterialListResponse {
|
|
478
|
+
materials?: Array<MaterialResponse>;
|
|
479
|
+
|
|
480
|
+
page?: number;
|
|
481
|
+
|
|
482
|
+
totalCount?: number;
|
|
483
|
+
|
|
484
|
+
totalPages?: number;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export type MaterialCreateBatchUploadURLsResponse =
|
|
488
|
+
Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
489
|
+
|
|
490
|
+
export namespace MaterialCreateBatchUploadURLsResponse {
|
|
491
|
+
export interface MaterialCreateBatchUploadURLsResponseItem {
|
|
1229
492
|
/**
|
|
1230
|
-
*
|
|
493
|
+
* Material ID
|
|
1231
494
|
*/
|
|
1232
|
-
|
|
495
|
+
materialId: string;
|
|
1233
496
|
|
|
1234
497
|
/**
|
|
1235
|
-
*
|
|
498
|
+
* Material name
|
|
1236
499
|
*/
|
|
1237
|
-
|
|
500
|
+
name: string;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* S3 key
|
|
504
|
+
*/
|
|
505
|
+
s3Key: string;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Presigned upload URL
|
|
509
|
+
*/
|
|
510
|
+
uploadUrl: string;
|
|
1238
511
|
}
|
|
1239
512
|
}
|
|
1240
513
|
|
|
1241
|
-
export interface
|
|
514
|
+
export interface MaterialGetDebugInfoResponse {
|
|
1242
515
|
/**
|
|
1243
|
-
*
|
|
516
|
+
* Content details
|
|
1244
517
|
*/
|
|
1245
|
-
|
|
518
|
+
content: unknown;
|
|
1246
519
|
|
|
1247
520
|
/**
|
|
1248
|
-
*
|
|
521
|
+
* Content type
|
|
1249
522
|
*/
|
|
1250
|
-
|
|
523
|
+
contentType: string;
|
|
1251
524
|
|
|
1252
525
|
/**
|
|
1253
|
-
*
|
|
526
|
+
* Processed images
|
|
1254
527
|
*/
|
|
1255
|
-
|
|
528
|
+
images: Array<MaterialGetDebugInfoResponse.Image>;
|
|
1256
529
|
|
|
1257
530
|
/**
|
|
1258
|
-
*
|
|
531
|
+
* Material ID
|
|
1259
532
|
*/
|
|
1260
|
-
|
|
533
|
+
materialId: string;
|
|
1261
534
|
|
|
1262
535
|
/**
|
|
1263
|
-
*
|
|
536
|
+
* Material metadata
|
|
1264
537
|
*/
|
|
1265
|
-
|
|
538
|
+
metadata: unknown;
|
|
1266
539
|
|
|
1267
540
|
/**
|
|
1268
541
|
* Material name
|
|
@@ -1270,67 +543,35 @@ export interface MaterialReprocessResponse {
|
|
|
1270
543
|
name: string;
|
|
1271
544
|
|
|
1272
545
|
/**
|
|
1273
|
-
*
|
|
1274
|
-
*/
|
|
1275
|
-
organizationId: string;
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* Material status
|
|
1279
|
-
*/
|
|
1280
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
1281
|
-
|
|
1282
|
-
/**
|
|
1283
|
-
* Last update timestamp
|
|
1284
|
-
*/
|
|
1285
|
-
updatedAt: string;
|
|
1286
|
-
|
|
1287
|
-
/**
|
|
1288
|
-
* Material metadata
|
|
1289
|
-
*/
|
|
1290
|
-
metadata?: unknown;
|
|
1291
|
-
|
|
1292
|
-
/**
|
|
1293
|
-
* References that this material cites
|
|
546
|
+
* Processing status
|
|
1294
547
|
*/
|
|
1295
|
-
|
|
548
|
+
status: string;
|
|
1296
549
|
|
|
1297
550
|
/**
|
|
1298
|
-
*
|
|
551
|
+
* Transcript structure for videos
|
|
1299
552
|
*/
|
|
1300
|
-
|
|
553
|
+
transcriptStructure: unknown | null;
|
|
1301
554
|
}
|
|
1302
555
|
|
|
1303
|
-
export namespace
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
*/
|
|
1307
|
-
export interface Content {
|
|
1308
|
-
filename?: string;
|
|
556
|
+
export namespace MaterialGetDebugInfoResponse {
|
|
557
|
+
export interface Image {
|
|
558
|
+
id?: string;
|
|
1309
559
|
|
|
1310
|
-
|
|
560
|
+
description?: string;
|
|
1311
561
|
|
|
1312
|
-
|
|
562
|
+
pageIndex?: number;
|
|
1313
563
|
|
|
1314
564
|
s3Key?: string;
|
|
1315
565
|
|
|
1316
566
|
s3Url?: string;
|
|
1317
|
-
|
|
1318
|
-
text?: string;
|
|
1319
|
-
|
|
1320
|
-
url?: string;
|
|
1321
567
|
}
|
|
568
|
+
}
|
|
1322
569
|
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
/**
|
|
1330
|
-
* Reference URL
|
|
1331
|
-
*/
|
|
1332
|
-
url?: string;
|
|
1333
|
-
}
|
|
570
|
+
export interface MaterialGetDownloadURLResponse {
|
|
571
|
+
/**
|
|
572
|
+
* Temporary download URL
|
|
573
|
+
*/
|
|
574
|
+
downloadUrl: string;
|
|
1334
575
|
}
|
|
1335
576
|
|
|
1336
577
|
export interface MaterialSearchResponse {
|
|
@@ -1410,7 +651,7 @@ export interface MaterialCreateParams {
|
|
|
1410
651
|
/**
|
|
1411
652
|
* Content details
|
|
1412
653
|
*/
|
|
1413
|
-
content:
|
|
654
|
+
content: Content;
|
|
1414
655
|
|
|
1415
656
|
/**
|
|
1416
657
|
* Name of the material
|
|
@@ -1425,35 +666,17 @@ export interface MaterialCreateParams {
|
|
|
1425
666
|
/**
|
|
1426
667
|
* References that this material cites
|
|
1427
668
|
*/
|
|
1428
|
-
references?: Array<
|
|
669
|
+
references?: Array<Reference>;
|
|
1429
670
|
}
|
|
1430
671
|
|
|
1431
|
-
export
|
|
672
|
+
export interface MaterialUpdateParams {
|
|
1432
673
|
/**
|
|
1433
|
-
*
|
|
674
|
+
* Array of references to update (optional)
|
|
1434
675
|
*/
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
* Type of content
|
|
1438
|
-
*/
|
|
1439
|
-
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1440
|
-
|
|
1441
|
-
/**
|
|
1442
|
-
* URL to fetch content from
|
|
1443
|
-
*/
|
|
1444
|
-
sourceUrl?: string;
|
|
1445
|
-
|
|
1446
|
-
/**
|
|
1447
|
-
* Text content (for text type)
|
|
1448
|
-
*/
|
|
1449
|
-
text?: string;
|
|
1450
|
-
|
|
1451
|
-
/**
|
|
1452
|
-
* URL to the content (for url type)
|
|
1453
|
-
*/
|
|
1454
|
-
url?: string;
|
|
1455
|
-
}
|
|
676
|
+
references?: Array<MaterialUpdateParams.Reference>;
|
|
677
|
+
}
|
|
1456
678
|
|
|
679
|
+
export namespace MaterialUpdateParams {
|
|
1457
680
|
export interface Reference {
|
|
1458
681
|
/**
|
|
1459
682
|
* Reference title
|
|
@@ -1461,7 +684,7 @@ export namespace MaterialCreateParams {
|
|
|
1461
684
|
title: string;
|
|
1462
685
|
|
|
1463
686
|
/**
|
|
1464
|
-
* Reference URL
|
|
687
|
+
* Reference URL (optional)
|
|
1465
688
|
*/
|
|
1466
689
|
url?: string;
|
|
1467
690
|
}
|
|
@@ -1493,7 +716,7 @@ export interface MaterialCreateAndProcessParams {
|
|
|
1493
716
|
/**
|
|
1494
717
|
* Content details
|
|
1495
718
|
*/
|
|
1496
|
-
content:
|
|
719
|
+
content: Content;
|
|
1497
720
|
|
|
1498
721
|
/**
|
|
1499
722
|
* Name of the material
|
|
@@ -1513,7 +736,7 @@ export interface MaterialCreateAndProcessParams {
|
|
|
1513
736
|
/**
|
|
1514
737
|
* References that this material cites
|
|
1515
738
|
*/
|
|
1516
|
-
references?: Array<
|
|
739
|
+
references?: Array<Reference>;
|
|
1517
740
|
|
|
1518
741
|
/**
|
|
1519
742
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
@@ -1521,45 +744,6 @@ export interface MaterialCreateAndProcessParams {
|
|
|
1521
744
|
timeoutMs?: number;
|
|
1522
745
|
}
|
|
1523
746
|
|
|
1524
|
-
export namespace MaterialCreateAndProcessParams {
|
|
1525
|
-
/**
|
|
1526
|
-
* Content details
|
|
1527
|
-
*/
|
|
1528
|
-
export interface Content {
|
|
1529
|
-
/**
|
|
1530
|
-
* Type of content
|
|
1531
|
-
*/
|
|
1532
|
-
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1533
|
-
|
|
1534
|
-
/**
|
|
1535
|
-
* URL to fetch content from
|
|
1536
|
-
*/
|
|
1537
|
-
sourceUrl?: string;
|
|
1538
|
-
|
|
1539
|
-
/**
|
|
1540
|
-
* Text content (for text type)
|
|
1541
|
-
*/
|
|
1542
|
-
text?: string;
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* URL to the content (for url type)
|
|
1546
|
-
*/
|
|
1547
|
-
url?: string;
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
export interface Reference {
|
|
1551
|
-
/**
|
|
1552
|
-
* Reference title
|
|
1553
|
-
*/
|
|
1554
|
-
title: string;
|
|
1555
|
-
|
|
1556
|
-
/**
|
|
1557
|
-
* Reference URL
|
|
1558
|
-
*/
|
|
1559
|
-
url?: string;
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
747
|
export interface MaterialCreateBatchUploadURLsParams {
|
|
1564
748
|
/**
|
|
1565
749
|
* Array of materials to create
|
|
@@ -1630,21 +814,7 @@ export interface MaterialGenerateParams {
|
|
|
1630
814
|
/**
|
|
1631
815
|
* References that this material cites
|
|
1632
816
|
*/
|
|
1633
|
-
references?: Array<
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
export namespace MaterialGenerateParams {
|
|
1637
|
-
export interface Reference {
|
|
1638
|
-
/**
|
|
1639
|
-
* Reference title
|
|
1640
|
-
*/
|
|
1641
|
-
title: string;
|
|
1642
|
-
|
|
1643
|
-
/**
|
|
1644
|
-
* Reference URL
|
|
1645
|
-
*/
|
|
1646
|
-
url?: string;
|
|
1647
|
-
}
|
|
817
|
+
references?: Array<Reference>;
|
|
1648
818
|
}
|
|
1649
819
|
|
|
1650
820
|
export interface MaterialGenerateAndProcessParams {
|
|
@@ -1691,7 +861,7 @@ export interface MaterialGenerateAndProcessParams {
|
|
|
1691
861
|
/**
|
|
1692
862
|
* References that this material cites
|
|
1693
863
|
*/
|
|
1694
|
-
references?: Array<
|
|
864
|
+
references?: Array<Reference>;
|
|
1695
865
|
|
|
1696
866
|
/**
|
|
1697
867
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
@@ -1699,20 +869,6 @@ export interface MaterialGenerateAndProcessParams {
|
|
|
1699
869
|
timeoutMs?: number;
|
|
1700
870
|
}
|
|
1701
871
|
|
|
1702
|
-
export namespace MaterialGenerateAndProcessParams {
|
|
1703
|
-
export interface Reference {
|
|
1704
|
-
/**
|
|
1705
|
-
* Reference title
|
|
1706
|
-
*/
|
|
1707
|
-
title: string;
|
|
1708
|
-
|
|
1709
|
-
/**
|
|
1710
|
-
* Reference URL
|
|
1711
|
-
*/
|
|
1712
|
-
url?: string;
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
872
|
export interface MaterialGetDownloadURLParams {
|
|
1717
873
|
/**
|
|
1718
874
|
* URL expiration time in seconds (default: 3600)
|
|
@@ -1761,21 +917,17 @@ Materials.Bulk = Bulk;
|
|
|
1761
917
|
|
|
1762
918
|
export declare namespace Materials {
|
|
1763
919
|
export {
|
|
1764
|
-
type
|
|
1765
|
-
type
|
|
1766
|
-
type
|
|
920
|
+
type Content as Content,
|
|
921
|
+
type GeneratedMaterialResponse as GeneratedMaterialResponse,
|
|
922
|
+
type MaterialResponse as MaterialResponse,
|
|
923
|
+
type Reference as Reference,
|
|
1767
924
|
type MaterialListResponse as MaterialListResponse,
|
|
1768
|
-
type MaterialCreateAndProcessResponse as MaterialCreateAndProcessResponse,
|
|
1769
925
|
type MaterialCreateBatchUploadURLsResponse as MaterialCreateBatchUploadURLsResponse,
|
|
1770
|
-
type MaterialGenerateResponse as MaterialGenerateResponse,
|
|
1771
|
-
type MaterialGenerateAndProcessResponse as MaterialGenerateAndProcessResponse,
|
|
1772
926
|
type MaterialGetDebugInfoResponse as MaterialGetDebugInfoResponse,
|
|
1773
927
|
type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse,
|
|
1774
|
-
type MaterialMoveResponse as MaterialMoveResponse,
|
|
1775
|
-
type MaterialRenameResponse as MaterialRenameResponse,
|
|
1776
|
-
type MaterialReprocessResponse as MaterialReprocessResponse,
|
|
1777
928
|
type MaterialSearchResponse as MaterialSearchResponse,
|
|
1778
929
|
type MaterialCreateParams as MaterialCreateParams,
|
|
930
|
+
type MaterialUpdateParams as MaterialUpdateParams,
|
|
1779
931
|
type MaterialListParams as MaterialListParams,
|
|
1780
932
|
type MaterialCreateAndProcessParams as MaterialCreateAndProcessParams,
|
|
1781
933
|
type MaterialCreateBatchUploadURLsParams as MaterialCreateBatchUploadURLsParams,
|
|
@@ -1789,12 +941,7 @@ export declare namespace Materials {
|
|
|
1789
941
|
|
|
1790
942
|
export {
|
|
1791
943
|
Upload as Upload,
|
|
1792
|
-
type UploadCompleteUploadResponse as UploadCompleteUploadResponse,
|
|
1793
944
|
type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse,
|
|
1794
|
-
type UploadUploadFileResponse as UploadUploadFileResponse,
|
|
1795
|
-
type UploadUploadFileAndProcessResponse as UploadUploadFileAndProcessResponse,
|
|
1796
|
-
type UploadUploadFromURLResponse as UploadUploadFromURLResponse,
|
|
1797
|
-
type UploadUploadFromURLAndProcessResponse as UploadUploadFromURLAndProcessResponse,
|
|
1798
945
|
type UploadCompleteUploadParams as UploadCompleteUploadParams,
|
|
1799
946
|
type UploadGetPresignedURLParams as UploadGetPresignedURLParams,
|
|
1800
947
|
type UploadUploadFileParams as UploadUploadFileParams,
|