@studyfetch/sdk 1.40.0 → 1.41.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 +13 -0
- package/README.md +6 -6
- package/package.json +1 -1
- package/resources/v1/folders.d.mts +77 -2
- package/resources/v1/folders.d.mts.map +1 -1
- package/resources/v1/folders.d.ts +77 -2
- 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 +847 -150
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +847 -150
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +23 -30
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +23 -30
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +417 -12
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +417 -12
- 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 +3 -3
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +3 -3
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/folders.ts +98 -2
- package/src/resources/v1/index.ts +9 -4
- package/src/resources/v1/materials/index.ts +14 -4
- package/src/resources/v1/materials/materials.ts +1051 -146
- package/src/resources/v1/materials/upload.ts +533 -14
- package/src/resources/v1/v1.ts +39 -29
- 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,12 +7,17 @@ import * as UploadAPI from './upload';
|
|
|
7
7
|
import {
|
|
8
8
|
Upload,
|
|
9
9
|
UploadCompleteUploadParams,
|
|
10
|
+
UploadCompleteUploadResponse,
|
|
10
11
|
UploadGetPresignedURLParams,
|
|
11
12
|
UploadGetPresignedURLResponse,
|
|
12
13
|
UploadUploadFileAndProcessParams,
|
|
14
|
+
UploadUploadFileAndProcessResponse,
|
|
13
15
|
UploadUploadFileParams,
|
|
16
|
+
UploadUploadFileResponse,
|
|
14
17
|
UploadUploadFromURLAndProcessParams,
|
|
18
|
+
UploadUploadFromURLAndProcessResponse,
|
|
15
19
|
UploadUploadFromURLParams,
|
|
20
|
+
UploadUploadFromURLResponse,
|
|
16
21
|
} from './upload';
|
|
17
22
|
import { APIPromise } from '../../../core/api-promise';
|
|
18
23
|
import { buildHeaders } from '../../../internal/headers';
|
|
@@ -28,13 +33,13 @@ export class Materials extends APIResource {
|
|
|
28
33
|
*
|
|
29
34
|
* @example
|
|
30
35
|
* ```ts
|
|
31
|
-
* const
|
|
36
|
+
* const material = await client.v1.materials.create({
|
|
32
37
|
* content: { type: 'text' },
|
|
33
38
|
* name: 'Chapter 1 - Introduction',
|
|
34
39
|
* });
|
|
35
40
|
* ```
|
|
36
41
|
*/
|
|
37
|
-
create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<
|
|
42
|
+
create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<MaterialCreateResponse> {
|
|
38
43
|
return this._client.post('/api/v1/materials', { body, ...options });
|
|
39
44
|
}
|
|
40
45
|
|
|
@@ -43,27 +48,23 @@ export class Materials extends APIResource {
|
|
|
43
48
|
*
|
|
44
49
|
* @example
|
|
45
50
|
* ```ts
|
|
46
|
-
* const
|
|
47
|
-
* 'id',
|
|
48
|
-
* );
|
|
51
|
+
* const material = await client.v1.materials.retrieve('id');
|
|
49
52
|
* ```
|
|
50
53
|
*/
|
|
51
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
54
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<MaterialRetrieveResponse> {
|
|
52
55
|
return this._client.get(path`/api/v1/materials/${id}`, options);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
/**
|
|
56
|
-
* Update material
|
|
59
|
+
* Update a material
|
|
57
60
|
*
|
|
58
61
|
* @example
|
|
59
62
|
* ```ts
|
|
60
|
-
* const
|
|
61
|
-
* 'id',
|
|
62
|
-
* );
|
|
63
|
+
* const material = await client.v1.materials.update('id');
|
|
63
64
|
* ```
|
|
64
65
|
*/
|
|
65
|
-
update(id: string,
|
|
66
|
-
return this._client.patch(path`/api/v1/materials/${id}`,
|
|
66
|
+
update(id: string, options?: RequestOptions): APIPromise<MaterialUpdateResponse> {
|
|
67
|
+
return this._client.patch(path`/api/v1/materials/${id}`, options);
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/**
|
|
@@ -102,17 +103,18 @@ export class Materials extends APIResource {
|
|
|
102
103
|
*
|
|
103
104
|
* @example
|
|
104
105
|
* ```ts
|
|
105
|
-
* const
|
|
106
|
-
*
|
|
106
|
+
* const response = await client.v1.materials.createAndProcess(
|
|
107
|
+
* {
|
|
107
108
|
* content: { type: 'text' },
|
|
108
109
|
* name: 'Chapter 1 - Introduction',
|
|
109
|
-
* }
|
|
110
|
+
* },
|
|
111
|
+
* );
|
|
110
112
|
* ```
|
|
111
113
|
*/
|
|
112
114
|
createAndProcess(
|
|
113
115
|
body: MaterialCreateAndProcessParams,
|
|
114
116
|
options?: RequestOptions,
|
|
115
|
-
): APIPromise<
|
|
117
|
+
): APIPromise<MaterialCreateAndProcessResponse> {
|
|
116
118
|
return this._client.post('/api/v1/materials/upload-and-process', { body, ...options });
|
|
117
119
|
}
|
|
118
120
|
|
|
@@ -146,15 +148,14 @@ export class Materials extends APIResource {
|
|
|
146
148
|
*
|
|
147
149
|
* @example
|
|
148
150
|
* ```ts
|
|
149
|
-
* const
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* });
|
|
151
|
+
* const response = await client.v1.materials.generate({
|
|
152
|
+
* name: 'Photosynthesis Study Plan',
|
|
153
|
+
* topic: 'Photosynthesis in plants',
|
|
154
|
+
* type: 'notes',
|
|
155
|
+
* });
|
|
155
156
|
* ```
|
|
156
157
|
*/
|
|
157
|
-
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<
|
|
158
|
+
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<MaterialGenerateResponse> {
|
|
158
159
|
return this._client.post('/api/v1/materials/generate', { body, ...options });
|
|
159
160
|
}
|
|
160
161
|
|
|
@@ -164,7 +165,7 @@ export class Materials extends APIResource {
|
|
|
164
165
|
*
|
|
165
166
|
* @example
|
|
166
167
|
* ```ts
|
|
167
|
-
* const
|
|
168
|
+
* const response =
|
|
168
169
|
* await client.v1.materials.generateAndProcess({
|
|
169
170
|
* name: 'Photosynthesis Study Plan',
|
|
170
171
|
* topic: 'Photosynthesis in plants',
|
|
@@ -175,7 +176,7 @@ export class Materials extends APIResource {
|
|
|
175
176
|
generateAndProcess(
|
|
176
177
|
body: MaterialGenerateAndProcessParams,
|
|
177
178
|
options?: RequestOptions,
|
|
178
|
-
): APIPromise<
|
|
179
|
+
): APIPromise<MaterialGenerateAndProcessResponse> {
|
|
179
180
|
return this._client.post('/api/v1/materials/generate-and-process', { body, ...options });
|
|
180
181
|
}
|
|
181
182
|
|
|
@@ -216,13 +217,12 @@ export class Materials extends APIResource {
|
|
|
216
217
|
*
|
|
217
218
|
* @example
|
|
218
219
|
* ```ts
|
|
219
|
-
* const
|
|
220
|
-
* '
|
|
221
|
-
*
|
|
222
|
-
* );
|
|
220
|
+
* const response = await client.v1.materials.move('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<MaterialMoveResponse> {
|
|
226
226
|
return this._client.post(path`/api/v1/materials/${id}/move`, { body, ...options });
|
|
227
227
|
}
|
|
228
228
|
|
|
@@ -231,67 +231,824 @@ export class Materials extends APIResource {
|
|
|
231
231
|
*
|
|
232
232
|
* @example
|
|
233
233
|
* ```ts
|
|
234
|
-
* const
|
|
235
|
-
* '
|
|
236
|
-
*
|
|
237
|
-
*
|
|
234
|
+
* const response = await client.v1.materials.rename('id', {
|
|
235
|
+
* name: 'New Material Name',
|
|
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
|
+
* });
|
|
238
267
|
* ```
|
|
239
268
|
*/
|
|
240
|
-
|
|
241
|
-
return this._client.post(
|
|
242
|
-
}
|
|
269
|
+
search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse> {
|
|
270
|
+
return this._client.post('/api/v1/materials/search', { body, ...options });
|
|
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>;
|
|
243
1003
|
|
|
244
1004
|
/**
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
* @example
|
|
248
|
-
* ```ts
|
|
249
|
-
* const materialResponse =
|
|
250
|
-
* await client.v1.materials.reprocess('id');
|
|
251
|
-
* ```
|
|
1005
|
+
* Material ID
|
|
252
1006
|
*/
|
|
253
|
-
|
|
254
|
-
return this._client.post(path`/api/v1/materials/${id}/reprocess`, options);
|
|
255
|
-
}
|
|
1007
|
+
materialId: string;
|
|
256
1008
|
|
|
257
1009
|
/**
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
* @example
|
|
261
|
-
* ```ts
|
|
262
|
-
* const response = await client.v1.materials.search({
|
|
263
|
-
* query: 'What is photosynthesis?',
|
|
264
|
-
* });
|
|
265
|
-
* ```
|
|
1010
|
+
* Material metadata
|
|
266
1011
|
*/
|
|
267
|
-
|
|
268
|
-
return this._client.post('/api/v1/materials/search', { body, ...options });
|
|
269
|
-
}
|
|
270
|
-
}
|
|
1012
|
+
metadata: unknown;
|
|
271
1013
|
|
|
272
|
-
export interface Content {
|
|
273
1014
|
/**
|
|
274
|
-
*
|
|
1015
|
+
* Material name
|
|
275
1016
|
*/
|
|
276
|
-
|
|
1017
|
+
name: string;
|
|
277
1018
|
|
|
278
1019
|
/**
|
|
279
|
-
*
|
|
1020
|
+
* Processing status
|
|
280
1021
|
*/
|
|
281
|
-
|
|
1022
|
+
status: string;
|
|
282
1023
|
|
|
283
1024
|
/**
|
|
284
|
-
*
|
|
1025
|
+
* Transcript structure for videos
|
|
285
1026
|
*/
|
|
286
|
-
|
|
1027
|
+
transcriptStructure: unknown | null;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
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
|
+
}
|
|
287
1043
|
|
|
1044
|
+
export interface MaterialGetDownloadURLResponse {
|
|
288
1045
|
/**
|
|
289
|
-
*
|
|
1046
|
+
* Temporary download URL
|
|
290
1047
|
*/
|
|
291
|
-
|
|
1048
|
+
downloadUrl: string;
|
|
292
1049
|
}
|
|
293
1050
|
|
|
294
|
-
export interface
|
|
1051
|
+
export interface MaterialMoveResponse {
|
|
295
1052
|
/**
|
|
296
1053
|
* Material ID
|
|
297
1054
|
*/
|
|
@@ -300,7 +1057,7 @@ export interface GeneratedMaterialResponse {
|
|
|
300
1057
|
/**
|
|
301
1058
|
* Material content
|
|
302
1059
|
*/
|
|
303
|
-
content:
|
|
1060
|
+
content: MaterialMoveResponse.Content;
|
|
304
1061
|
|
|
305
1062
|
/**
|
|
306
1063
|
* Content type
|
|
@@ -338,14 +1095,14 @@ export interface GeneratedMaterialResponse {
|
|
|
338
1095
|
updatedAt: string;
|
|
339
1096
|
|
|
340
1097
|
/**
|
|
341
|
-
*
|
|
1098
|
+
* Material metadata
|
|
342
1099
|
*/
|
|
343
|
-
|
|
1100
|
+
metadata?: unknown;
|
|
344
1101
|
|
|
345
1102
|
/**
|
|
346
|
-
*
|
|
1103
|
+
* References that this material cites
|
|
347
1104
|
*/
|
|
348
|
-
|
|
1105
|
+
references?: Array<MaterialMoveResponse.Reference>;
|
|
349
1106
|
|
|
350
1107
|
/**
|
|
351
1108
|
* Usage information
|
|
@@ -353,7 +1110,7 @@ export interface GeneratedMaterialResponse {
|
|
|
353
1110
|
usage?: unknown;
|
|
354
1111
|
}
|
|
355
1112
|
|
|
356
|
-
export namespace
|
|
1113
|
+
export namespace MaterialMoveResponse {
|
|
357
1114
|
/**
|
|
358
1115
|
* Material content
|
|
359
1116
|
*/
|
|
@@ -372,9 +1129,21 @@ export namespace GeneratedMaterialResponse {
|
|
|
372
1129
|
|
|
373
1130
|
url?: string;
|
|
374
1131
|
}
|
|
1132
|
+
|
|
1133
|
+
export interface Reference {
|
|
1134
|
+
/**
|
|
1135
|
+
* Reference title
|
|
1136
|
+
*/
|
|
1137
|
+
title: string;
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Reference URL
|
|
1141
|
+
*/
|
|
1142
|
+
url?: string;
|
|
1143
|
+
}
|
|
375
1144
|
}
|
|
376
1145
|
|
|
377
|
-
export interface
|
|
1146
|
+
export interface MaterialRenameResponse {
|
|
378
1147
|
/**
|
|
379
1148
|
* Material ID
|
|
380
1149
|
*/
|
|
@@ -383,7 +1152,7 @@ export interface MaterialResponse {
|
|
|
383
1152
|
/**
|
|
384
1153
|
* Material content
|
|
385
1154
|
*/
|
|
386
|
-
content:
|
|
1155
|
+
content: MaterialRenameResponse.Content;
|
|
387
1156
|
|
|
388
1157
|
/**
|
|
389
1158
|
* Content type
|
|
@@ -425,13 +1194,18 @@ export interface MaterialResponse {
|
|
|
425
1194
|
*/
|
|
426
1195
|
metadata?: unknown;
|
|
427
1196
|
|
|
1197
|
+
/**
|
|
1198
|
+
* References that this material cites
|
|
1199
|
+
*/
|
|
1200
|
+
references?: Array<MaterialRenameResponse.Reference>;
|
|
1201
|
+
|
|
428
1202
|
/**
|
|
429
1203
|
* Usage information
|
|
430
1204
|
*/
|
|
431
1205
|
usage?: unknown;
|
|
432
1206
|
}
|
|
433
1207
|
|
|
434
|
-
export namespace
|
|
1208
|
+
export namespace MaterialRenameResponse {
|
|
435
1209
|
/**
|
|
436
1210
|
* Material content
|
|
437
1211
|
*/
|
|
@@ -450,70 +1224,45 @@ export namespace MaterialResponse {
|
|
|
450
1224
|
|
|
451
1225
|
url?: string;
|
|
452
1226
|
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
export interface MaterialListResponse {
|
|
456
|
-
materials?: Array<MaterialResponse>;
|
|
457
|
-
|
|
458
|
-
page?: number;
|
|
459
|
-
|
|
460
|
-
totalCount?: number;
|
|
461
|
-
|
|
462
|
-
totalPages?: number;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export type MaterialCreateBatchUploadURLsResponse =
|
|
466
|
-
Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
467
|
-
|
|
468
|
-
export namespace MaterialCreateBatchUploadURLsResponse {
|
|
469
|
-
export interface MaterialCreateBatchUploadURLsResponseItem {
|
|
470
|
-
/**
|
|
471
|
-
* Material ID
|
|
472
|
-
*/
|
|
473
|
-
materialId: string;
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* Material name
|
|
477
|
-
*/
|
|
478
|
-
name: string;
|
|
479
1227
|
|
|
1228
|
+
export interface Reference {
|
|
480
1229
|
/**
|
|
481
|
-
*
|
|
1230
|
+
* Reference title
|
|
482
1231
|
*/
|
|
483
|
-
|
|
1232
|
+
title: string;
|
|
484
1233
|
|
|
485
1234
|
/**
|
|
486
|
-
*
|
|
1235
|
+
* Reference URL
|
|
487
1236
|
*/
|
|
488
|
-
|
|
1237
|
+
url?: string;
|
|
489
1238
|
}
|
|
490
1239
|
}
|
|
491
1240
|
|
|
492
|
-
export interface
|
|
1241
|
+
export interface MaterialReprocessResponse {
|
|
493
1242
|
/**
|
|
494
|
-
*
|
|
1243
|
+
* Material ID
|
|
495
1244
|
*/
|
|
496
|
-
|
|
1245
|
+
_id: string;
|
|
497
1246
|
|
|
498
1247
|
/**
|
|
499
|
-
*
|
|
1248
|
+
* Material content
|
|
500
1249
|
*/
|
|
501
|
-
|
|
1250
|
+
content: MaterialReprocessResponse.Content;
|
|
502
1251
|
|
|
503
1252
|
/**
|
|
504
|
-
*
|
|
1253
|
+
* Content type
|
|
505
1254
|
*/
|
|
506
|
-
|
|
1255
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
507
1256
|
|
|
508
1257
|
/**
|
|
509
|
-
*
|
|
1258
|
+
* Creation timestamp
|
|
510
1259
|
*/
|
|
511
|
-
|
|
1260
|
+
createdAt: string;
|
|
512
1261
|
|
|
513
1262
|
/**
|
|
514
|
-
*
|
|
1263
|
+
* Folder ID
|
|
515
1264
|
*/
|
|
516
|
-
|
|
1265
|
+
folderId: string | null;
|
|
517
1266
|
|
|
518
1267
|
/**
|
|
519
1268
|
* Material name
|
|
@@ -521,35 +1270,67 @@ export interface MaterialGetDebugInfoResponse {
|
|
|
521
1270
|
name: string;
|
|
522
1271
|
|
|
523
1272
|
/**
|
|
524
|
-
*
|
|
1273
|
+
* Organization ID
|
|
525
1274
|
*/
|
|
526
|
-
|
|
1275
|
+
organizationId: string;
|
|
527
1276
|
|
|
528
1277
|
/**
|
|
529
|
-
*
|
|
1278
|
+
* Material status
|
|
530
1279
|
*/
|
|
531
|
-
|
|
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
|
|
1294
|
+
*/
|
|
1295
|
+
references?: Array<MaterialReprocessResponse.Reference>;
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* Usage information
|
|
1299
|
+
*/
|
|
1300
|
+
usage?: unknown;
|
|
532
1301
|
}
|
|
533
1302
|
|
|
534
|
-
export namespace
|
|
535
|
-
|
|
536
|
-
|
|
1303
|
+
export namespace MaterialReprocessResponse {
|
|
1304
|
+
/**
|
|
1305
|
+
* Material content
|
|
1306
|
+
*/
|
|
1307
|
+
export interface Content {
|
|
1308
|
+
filename?: string;
|
|
537
1309
|
|
|
538
|
-
|
|
1310
|
+
fileSize?: number;
|
|
539
1311
|
|
|
540
|
-
|
|
1312
|
+
mimeType?: string;
|
|
541
1313
|
|
|
542
1314
|
s3Key?: string;
|
|
543
1315
|
|
|
544
1316
|
s3Url?: string;
|
|
1317
|
+
|
|
1318
|
+
text?: string;
|
|
1319
|
+
|
|
1320
|
+
url?: string;
|
|
545
1321
|
}
|
|
546
|
-
}
|
|
547
1322
|
|
|
548
|
-
export interface
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
1323
|
+
export interface Reference {
|
|
1324
|
+
/**
|
|
1325
|
+
* Reference title
|
|
1326
|
+
*/
|
|
1327
|
+
title: string;
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Reference URL
|
|
1331
|
+
*/
|
|
1332
|
+
url?: string;
|
|
1333
|
+
}
|
|
553
1334
|
}
|
|
554
1335
|
|
|
555
1336
|
export interface MaterialSearchResponse {
|
|
@@ -629,7 +1410,7 @@ export interface MaterialCreateParams {
|
|
|
629
1410
|
/**
|
|
630
1411
|
* Content details
|
|
631
1412
|
*/
|
|
632
|
-
content: Content;
|
|
1413
|
+
content: MaterialCreateParams.Content;
|
|
633
1414
|
|
|
634
1415
|
/**
|
|
635
1416
|
* Name of the material
|
|
@@ -640,18 +1421,50 @@ export interface MaterialCreateParams {
|
|
|
640
1421
|
* Folder ID to place the material in
|
|
641
1422
|
*/
|
|
642
1423
|
folderId?: string;
|
|
643
|
-
}
|
|
644
1424
|
|
|
645
|
-
export interface MaterialUpdateParams {
|
|
646
1425
|
/**
|
|
647
|
-
*
|
|
1426
|
+
* References that this material cites
|
|
648
1427
|
*/
|
|
649
|
-
|
|
1428
|
+
references?: Array<MaterialCreateParams.Reference>;
|
|
1429
|
+
}
|
|
650
1430
|
|
|
1431
|
+
export namespace MaterialCreateParams {
|
|
651
1432
|
/**
|
|
652
|
-
*
|
|
1433
|
+
* Content details
|
|
653
1434
|
*/
|
|
654
|
-
|
|
1435
|
+
export interface Content {
|
|
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
|
+
}
|
|
1456
|
+
|
|
1457
|
+
export interface Reference {
|
|
1458
|
+
/**
|
|
1459
|
+
* Reference title
|
|
1460
|
+
*/
|
|
1461
|
+
title: string;
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Reference URL
|
|
1465
|
+
*/
|
|
1466
|
+
url?: string;
|
|
1467
|
+
}
|
|
655
1468
|
}
|
|
656
1469
|
|
|
657
1470
|
export interface MaterialListParams {
|
|
@@ -680,7 +1493,7 @@ export interface MaterialCreateAndProcessParams {
|
|
|
680
1493
|
/**
|
|
681
1494
|
* Content details
|
|
682
1495
|
*/
|
|
683
|
-
content: Content;
|
|
1496
|
+
content: MaterialCreateAndProcessParams.Content;
|
|
684
1497
|
|
|
685
1498
|
/**
|
|
686
1499
|
* Name of the material
|
|
@@ -697,12 +1510,56 @@ export interface MaterialCreateAndProcessParams {
|
|
|
697
1510
|
*/
|
|
698
1511
|
pollIntervalMs?: number;
|
|
699
1512
|
|
|
1513
|
+
/**
|
|
1514
|
+
* References that this material cites
|
|
1515
|
+
*/
|
|
1516
|
+
references?: Array<MaterialCreateAndProcessParams.Reference>;
|
|
1517
|
+
|
|
700
1518
|
/**
|
|
701
1519
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
702
1520
|
*/
|
|
703
1521
|
timeoutMs?: number;
|
|
704
1522
|
}
|
|
705
1523
|
|
|
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
|
+
|
|
706
1563
|
export interface MaterialCreateBatchUploadURLsParams {
|
|
707
1564
|
/**
|
|
708
1565
|
* Array of materials to create
|
|
@@ -769,6 +1626,25 @@ export interface MaterialGenerateParams {
|
|
|
769
1626
|
* Target education level
|
|
770
1627
|
*/
|
|
771
1628
|
level?: 'high_school' | 'college' | 'professional';
|
|
1629
|
+
|
|
1630
|
+
/**
|
|
1631
|
+
* References that this material cites
|
|
1632
|
+
*/
|
|
1633
|
+
references?: Array<MaterialGenerateParams.Reference>;
|
|
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
|
+
}
|
|
772
1648
|
}
|
|
773
1649
|
|
|
774
1650
|
export interface MaterialGenerateAndProcessParams {
|
|
@@ -812,12 +1688,31 @@ export interface MaterialGenerateAndProcessParams {
|
|
|
812
1688
|
*/
|
|
813
1689
|
pollIntervalMs?: number;
|
|
814
1690
|
|
|
1691
|
+
/**
|
|
1692
|
+
* References that this material cites
|
|
1693
|
+
*/
|
|
1694
|
+
references?: Array<MaterialGenerateAndProcessParams.Reference>;
|
|
1695
|
+
|
|
815
1696
|
/**
|
|
816
1697
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
817
1698
|
*/
|
|
818
1699
|
timeoutMs?: number;
|
|
819
1700
|
}
|
|
820
1701
|
|
|
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
|
+
|
|
821
1716
|
export interface MaterialGetDownloadURLParams {
|
|
822
1717
|
/**
|
|
823
1718
|
* URL expiration time in seconds (default: 3600)
|
|
@@ -866,16 +1761,21 @@ Materials.Bulk = Bulk;
|
|
|
866
1761
|
|
|
867
1762
|
export declare namespace Materials {
|
|
868
1763
|
export {
|
|
869
|
-
type
|
|
870
|
-
type
|
|
871
|
-
type
|
|
1764
|
+
type MaterialCreateResponse as MaterialCreateResponse,
|
|
1765
|
+
type MaterialRetrieveResponse as MaterialRetrieveResponse,
|
|
1766
|
+
type MaterialUpdateResponse as MaterialUpdateResponse,
|
|
872
1767
|
type MaterialListResponse as MaterialListResponse,
|
|
1768
|
+
type MaterialCreateAndProcessResponse as MaterialCreateAndProcessResponse,
|
|
873
1769
|
type MaterialCreateBatchUploadURLsResponse as MaterialCreateBatchUploadURLsResponse,
|
|
1770
|
+
type MaterialGenerateResponse as MaterialGenerateResponse,
|
|
1771
|
+
type MaterialGenerateAndProcessResponse as MaterialGenerateAndProcessResponse,
|
|
874
1772
|
type MaterialGetDebugInfoResponse as MaterialGetDebugInfoResponse,
|
|
875
1773
|
type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse,
|
|
1774
|
+
type MaterialMoveResponse as MaterialMoveResponse,
|
|
1775
|
+
type MaterialRenameResponse as MaterialRenameResponse,
|
|
1776
|
+
type MaterialReprocessResponse as MaterialReprocessResponse,
|
|
876
1777
|
type MaterialSearchResponse as MaterialSearchResponse,
|
|
877
1778
|
type MaterialCreateParams as MaterialCreateParams,
|
|
878
|
-
type MaterialUpdateParams as MaterialUpdateParams,
|
|
879
1779
|
type MaterialListParams as MaterialListParams,
|
|
880
1780
|
type MaterialCreateAndProcessParams as MaterialCreateAndProcessParams,
|
|
881
1781
|
type MaterialCreateBatchUploadURLsParams as MaterialCreateBatchUploadURLsParams,
|
|
@@ -889,7 +1789,12 @@ export declare namespace Materials {
|
|
|
889
1789
|
|
|
890
1790
|
export {
|
|
891
1791
|
Upload as Upload,
|
|
1792
|
+
type UploadCompleteUploadResponse as UploadCompleteUploadResponse,
|
|
892
1793
|
type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse,
|
|
1794
|
+
type UploadUploadFileResponse as UploadUploadFileResponse,
|
|
1795
|
+
type UploadUploadFileAndProcessResponse as UploadUploadFileAndProcessResponse,
|
|
1796
|
+
type UploadUploadFromURLResponse as UploadUploadFromURLResponse,
|
|
1797
|
+
type UploadUploadFromURLAndProcessResponse as UploadUploadFromURLAndProcessResponse,
|
|
893
1798
|
type UploadCompleteUploadParams as UploadCompleteUploadParams,
|
|
894
1799
|
type UploadGetPresignedURLParams as UploadGetPresignedURLParams,
|
|
895
1800
|
type UploadUploadFileParams as UploadUploadFileParams,
|