@studyfetch/sdk 1.39.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 +21 -0
- package/README.md +6 -6
- package/package.json +1 -1
- package/resources/v1/assignment-grader/assignment-grader.d.mts +21 -39
- package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.d.ts +21 -39
- package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.js.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -1
- package/resources/v1/assignment-grader/index.d.mts +1 -1
- package/resources/v1/assignment-grader/index.d.mts.map +1 -1
- package/resources/v1/assignment-grader/index.d.ts +1 -1
- package/resources/v1/assignment-grader/index.d.ts.map +1 -1
- package/resources/v1/assignment-grader/index.js.map +1 -1
- package/resources/v1/assignment-grader/index.mjs.map +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 +2 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -2
- 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 +857 -139
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +857 -139
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +30 -24
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +30 -24
- 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 +5 -5
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +5 -5
- 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/assignment-grader/assignment-grader.ts +25 -46
- package/src/resources/v1/assignment-grader/index.ts +1 -0
- package/src/resources/v1/folders.ts +98 -2
- package/src/resources/v1/index.ts +10 -3
- package/src/resources/v1/materials/index.ts +14 -3
- package/src/resources/v1/materials/materials.ts +1063 -131
- package/src/resources/v1/materials/upload.ts +533 -14
- package/src/resources/v1/v1.ts +41 -27
- 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,15 +48,25 @@ 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
|
|
|
58
|
+
/**
|
|
59
|
+
* Update a material
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const material = await client.v1.materials.update('id');
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
update(id: string, options?: RequestOptions): APIPromise<MaterialUpdateResponse> {
|
|
67
|
+
return this._client.patch(path`/api/v1/materials/${id}`, options);
|
|
68
|
+
}
|
|
69
|
+
|
|
55
70
|
/**
|
|
56
71
|
* Get all materials for organization
|
|
57
72
|
*
|
|
@@ -88,17 +103,18 @@ export class Materials extends APIResource {
|
|
|
88
103
|
*
|
|
89
104
|
* @example
|
|
90
105
|
* ```ts
|
|
91
|
-
* const
|
|
92
|
-
*
|
|
106
|
+
* const response = await client.v1.materials.createAndProcess(
|
|
107
|
+
* {
|
|
93
108
|
* content: { type: 'text' },
|
|
94
109
|
* name: 'Chapter 1 - Introduction',
|
|
95
|
-
* }
|
|
110
|
+
* },
|
|
111
|
+
* );
|
|
96
112
|
* ```
|
|
97
113
|
*/
|
|
98
114
|
createAndProcess(
|
|
99
115
|
body: MaterialCreateAndProcessParams,
|
|
100
116
|
options?: RequestOptions,
|
|
101
|
-
): APIPromise<
|
|
117
|
+
): APIPromise<MaterialCreateAndProcessResponse> {
|
|
102
118
|
return this._client.post('/api/v1/materials/upload-and-process', { body, ...options });
|
|
103
119
|
}
|
|
104
120
|
|
|
@@ -132,15 +148,14 @@ export class Materials extends APIResource {
|
|
|
132
148
|
*
|
|
133
149
|
* @example
|
|
134
150
|
* ```ts
|
|
135
|
-
* const
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* });
|
|
151
|
+
* const response = await client.v1.materials.generate({
|
|
152
|
+
* name: 'Photosynthesis Study Plan',
|
|
153
|
+
* topic: 'Photosynthesis in plants',
|
|
154
|
+
* type: 'notes',
|
|
155
|
+
* });
|
|
141
156
|
* ```
|
|
142
157
|
*/
|
|
143
|
-
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<
|
|
158
|
+
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<MaterialGenerateResponse> {
|
|
144
159
|
return this._client.post('/api/v1/materials/generate', { body, ...options });
|
|
145
160
|
}
|
|
146
161
|
|
|
@@ -150,7 +165,7 @@ export class Materials extends APIResource {
|
|
|
150
165
|
*
|
|
151
166
|
* @example
|
|
152
167
|
* ```ts
|
|
153
|
-
* const
|
|
168
|
+
* const response =
|
|
154
169
|
* await client.v1.materials.generateAndProcess({
|
|
155
170
|
* name: 'Photosynthesis Study Plan',
|
|
156
171
|
* topic: 'Photosynthesis in plants',
|
|
@@ -161,7 +176,7 @@ export class Materials extends APIResource {
|
|
|
161
176
|
generateAndProcess(
|
|
162
177
|
body: MaterialGenerateAndProcessParams,
|
|
163
178
|
options?: RequestOptions,
|
|
164
|
-
): APIPromise<
|
|
179
|
+
): APIPromise<MaterialGenerateAndProcessResponse> {
|
|
165
180
|
return this._client.post('/api/v1/materials/generate-and-process', { body, ...options });
|
|
166
181
|
}
|
|
167
182
|
|
|
@@ -202,13 +217,12 @@ export class Materials extends APIResource {
|
|
|
202
217
|
*
|
|
203
218
|
* @example
|
|
204
219
|
* ```ts
|
|
205
|
-
* const
|
|
206
|
-
* '
|
|
207
|
-
*
|
|
208
|
-
* );
|
|
220
|
+
* const response = await client.v1.materials.move('id', {
|
|
221
|
+
* folderId: 'folderId',
|
|
222
|
+
* });
|
|
209
223
|
* ```
|
|
210
224
|
*/
|
|
211
|
-
move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<
|
|
225
|
+
move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialMoveResponse> {
|
|
212
226
|
return this._client.post(path`/api/v1/materials/${id}/move`, { body, ...options });
|
|
213
227
|
}
|
|
214
228
|
|
|
@@ -217,67 +231,824 @@ export class Materials extends APIResource {
|
|
|
217
231
|
*
|
|
218
232
|
* @example
|
|
219
233
|
* ```ts
|
|
220
|
-
* const
|
|
221
|
-
* '
|
|
222
|
-
*
|
|
223
|
-
* );
|
|
234
|
+
* const response = await client.v1.materials.rename('id', {
|
|
235
|
+
* name: 'New Material Name',
|
|
236
|
+
* });
|
|
224
237
|
* ```
|
|
225
238
|
*/
|
|
226
|
-
rename(
|
|
239
|
+
rename(
|
|
240
|
+
id: string,
|
|
241
|
+
body: MaterialRenameParams,
|
|
242
|
+
options?: RequestOptions,
|
|
243
|
+
): APIPromise<MaterialRenameResponse> {
|
|
227
244
|
return this._client.post(path`/api/v1/materials/${id}/rename`, { body, ...options });
|
|
228
245
|
}
|
|
229
246
|
|
|
230
247
|
/**
|
|
231
|
-
* Reprocess material to regenerate embeddings and extract content
|
|
232
|
-
*
|
|
233
|
-
* @example
|
|
234
|
-
* ```ts
|
|
235
|
-
* const
|
|
236
|
-
*
|
|
237
|
-
|
|
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
|
+
* });
|
|
267
|
+
* ```
|
|
268
|
+
*/
|
|
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>;
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Material ID
|
|
238
1006
|
*/
|
|
239
|
-
|
|
240
|
-
return this._client.post(path`/api/v1/materials/${id}/reprocess`, options);
|
|
241
|
-
}
|
|
1007
|
+
materialId: string;
|
|
242
1008
|
|
|
243
1009
|
/**
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* @example
|
|
247
|
-
* ```ts
|
|
248
|
-
* const response = await client.v1.materials.search({
|
|
249
|
-
* query: 'What is photosynthesis?',
|
|
250
|
-
* });
|
|
251
|
-
* ```
|
|
1010
|
+
* Material metadata
|
|
252
1011
|
*/
|
|
253
|
-
|
|
254
|
-
return this._client.post('/api/v1/materials/search', { body, ...options });
|
|
255
|
-
}
|
|
256
|
-
}
|
|
1012
|
+
metadata: unknown;
|
|
257
1013
|
|
|
258
|
-
export interface Content {
|
|
259
1014
|
/**
|
|
260
|
-
*
|
|
1015
|
+
* Material name
|
|
261
1016
|
*/
|
|
262
|
-
|
|
1017
|
+
name: string;
|
|
263
1018
|
|
|
264
1019
|
/**
|
|
265
|
-
*
|
|
1020
|
+
* Processing status
|
|
266
1021
|
*/
|
|
267
|
-
|
|
1022
|
+
status: string;
|
|
268
1023
|
|
|
269
1024
|
/**
|
|
270
|
-
*
|
|
1025
|
+
* Transcript structure for videos
|
|
271
1026
|
*/
|
|
272
|
-
|
|
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
|
+
}
|
|
273
1043
|
|
|
1044
|
+
export interface MaterialGetDownloadURLResponse {
|
|
274
1045
|
/**
|
|
275
|
-
*
|
|
1046
|
+
* Temporary download URL
|
|
276
1047
|
*/
|
|
277
|
-
|
|
1048
|
+
downloadUrl: string;
|
|
278
1049
|
}
|
|
279
1050
|
|
|
280
|
-
export interface
|
|
1051
|
+
export interface MaterialMoveResponse {
|
|
281
1052
|
/**
|
|
282
1053
|
* Material ID
|
|
283
1054
|
*/
|
|
@@ -286,7 +1057,7 @@ export interface GeneratedMaterialResponse {
|
|
|
286
1057
|
/**
|
|
287
1058
|
* Material content
|
|
288
1059
|
*/
|
|
289
|
-
content:
|
|
1060
|
+
content: MaterialMoveResponse.Content;
|
|
290
1061
|
|
|
291
1062
|
/**
|
|
292
1063
|
* Content type
|
|
@@ -324,14 +1095,14 @@ export interface GeneratedMaterialResponse {
|
|
|
324
1095
|
updatedAt: string;
|
|
325
1096
|
|
|
326
1097
|
/**
|
|
327
|
-
*
|
|
1098
|
+
* Material metadata
|
|
328
1099
|
*/
|
|
329
|
-
|
|
1100
|
+
metadata?: unknown;
|
|
330
1101
|
|
|
331
1102
|
/**
|
|
332
|
-
*
|
|
1103
|
+
* References that this material cites
|
|
333
1104
|
*/
|
|
334
|
-
|
|
1105
|
+
references?: Array<MaterialMoveResponse.Reference>;
|
|
335
1106
|
|
|
336
1107
|
/**
|
|
337
1108
|
* Usage information
|
|
@@ -339,7 +1110,7 @@ export interface GeneratedMaterialResponse {
|
|
|
339
1110
|
usage?: unknown;
|
|
340
1111
|
}
|
|
341
1112
|
|
|
342
|
-
export namespace
|
|
1113
|
+
export namespace MaterialMoveResponse {
|
|
343
1114
|
/**
|
|
344
1115
|
* Material content
|
|
345
1116
|
*/
|
|
@@ -358,9 +1129,21 @@ export namespace GeneratedMaterialResponse {
|
|
|
358
1129
|
|
|
359
1130
|
url?: string;
|
|
360
1131
|
}
|
|
1132
|
+
|
|
1133
|
+
export interface Reference {
|
|
1134
|
+
/**
|
|
1135
|
+
* Reference title
|
|
1136
|
+
*/
|
|
1137
|
+
title: string;
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Reference URL
|
|
1141
|
+
*/
|
|
1142
|
+
url?: string;
|
|
1143
|
+
}
|
|
361
1144
|
}
|
|
362
1145
|
|
|
363
|
-
export interface
|
|
1146
|
+
export interface MaterialRenameResponse {
|
|
364
1147
|
/**
|
|
365
1148
|
* Material ID
|
|
366
1149
|
*/
|
|
@@ -369,7 +1152,7 @@ export interface MaterialResponse {
|
|
|
369
1152
|
/**
|
|
370
1153
|
* Material content
|
|
371
1154
|
*/
|
|
372
|
-
content:
|
|
1155
|
+
content: MaterialRenameResponse.Content;
|
|
373
1156
|
|
|
374
1157
|
/**
|
|
375
1158
|
* Content type
|
|
@@ -411,13 +1194,18 @@ export interface MaterialResponse {
|
|
|
411
1194
|
*/
|
|
412
1195
|
metadata?: unknown;
|
|
413
1196
|
|
|
1197
|
+
/**
|
|
1198
|
+
* References that this material cites
|
|
1199
|
+
*/
|
|
1200
|
+
references?: Array<MaterialRenameResponse.Reference>;
|
|
1201
|
+
|
|
414
1202
|
/**
|
|
415
1203
|
* Usage information
|
|
416
1204
|
*/
|
|
417
1205
|
usage?: unknown;
|
|
418
1206
|
}
|
|
419
1207
|
|
|
420
|
-
export namespace
|
|
1208
|
+
export namespace MaterialRenameResponse {
|
|
421
1209
|
/**
|
|
422
1210
|
* Material content
|
|
423
1211
|
*/
|
|
@@ -436,70 +1224,45 @@ export namespace MaterialResponse {
|
|
|
436
1224
|
|
|
437
1225
|
url?: string;
|
|
438
1226
|
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
export interface MaterialListResponse {
|
|
442
|
-
materials?: Array<MaterialResponse>;
|
|
443
|
-
|
|
444
|
-
page?: number;
|
|
445
|
-
|
|
446
|
-
totalCount?: number;
|
|
447
|
-
|
|
448
|
-
totalPages?: number;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
export type MaterialCreateBatchUploadURLsResponse =
|
|
452
|
-
Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
453
|
-
|
|
454
|
-
export namespace MaterialCreateBatchUploadURLsResponse {
|
|
455
|
-
export interface MaterialCreateBatchUploadURLsResponseItem {
|
|
456
|
-
/**
|
|
457
|
-
* Material ID
|
|
458
|
-
*/
|
|
459
|
-
materialId: string;
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Material name
|
|
463
|
-
*/
|
|
464
|
-
name: string;
|
|
465
1227
|
|
|
1228
|
+
export interface Reference {
|
|
466
1229
|
/**
|
|
467
|
-
*
|
|
1230
|
+
* Reference title
|
|
468
1231
|
*/
|
|
469
|
-
|
|
1232
|
+
title: string;
|
|
470
1233
|
|
|
471
1234
|
/**
|
|
472
|
-
*
|
|
1235
|
+
* Reference URL
|
|
473
1236
|
*/
|
|
474
|
-
|
|
1237
|
+
url?: string;
|
|
475
1238
|
}
|
|
476
1239
|
}
|
|
477
1240
|
|
|
478
|
-
export interface
|
|
1241
|
+
export interface MaterialReprocessResponse {
|
|
479
1242
|
/**
|
|
480
|
-
*
|
|
1243
|
+
* Material ID
|
|
481
1244
|
*/
|
|
482
|
-
|
|
1245
|
+
_id: string;
|
|
483
1246
|
|
|
484
1247
|
/**
|
|
485
|
-
*
|
|
1248
|
+
* Material content
|
|
486
1249
|
*/
|
|
487
|
-
|
|
1250
|
+
content: MaterialReprocessResponse.Content;
|
|
488
1251
|
|
|
489
1252
|
/**
|
|
490
|
-
*
|
|
1253
|
+
* Content type
|
|
491
1254
|
*/
|
|
492
|
-
|
|
1255
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
493
1256
|
|
|
494
1257
|
/**
|
|
495
|
-
*
|
|
1258
|
+
* Creation timestamp
|
|
496
1259
|
*/
|
|
497
|
-
|
|
1260
|
+
createdAt: string;
|
|
498
1261
|
|
|
499
1262
|
/**
|
|
500
|
-
*
|
|
1263
|
+
* Folder ID
|
|
501
1264
|
*/
|
|
502
|
-
|
|
1265
|
+
folderId: string | null;
|
|
503
1266
|
|
|
504
1267
|
/**
|
|
505
1268
|
* Material name
|
|
@@ -507,35 +1270,67 @@ export interface MaterialGetDebugInfoResponse {
|
|
|
507
1270
|
name: string;
|
|
508
1271
|
|
|
509
1272
|
/**
|
|
510
|
-
*
|
|
1273
|
+
* Organization ID
|
|
511
1274
|
*/
|
|
512
|
-
|
|
1275
|
+
organizationId: string;
|
|
513
1276
|
|
|
514
1277
|
/**
|
|
515
|
-
*
|
|
1278
|
+
* Material status
|
|
516
1279
|
*/
|
|
517
|
-
|
|
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;
|
|
518
1301
|
}
|
|
519
1302
|
|
|
520
|
-
export namespace
|
|
521
|
-
|
|
522
|
-
|
|
1303
|
+
export namespace MaterialReprocessResponse {
|
|
1304
|
+
/**
|
|
1305
|
+
* Material content
|
|
1306
|
+
*/
|
|
1307
|
+
export interface Content {
|
|
1308
|
+
filename?: string;
|
|
523
1309
|
|
|
524
|
-
|
|
1310
|
+
fileSize?: number;
|
|
525
1311
|
|
|
526
|
-
|
|
1312
|
+
mimeType?: string;
|
|
527
1313
|
|
|
528
1314
|
s3Key?: string;
|
|
529
1315
|
|
|
530
1316
|
s3Url?: string;
|
|
1317
|
+
|
|
1318
|
+
text?: string;
|
|
1319
|
+
|
|
1320
|
+
url?: string;
|
|
531
1321
|
}
|
|
532
|
-
}
|
|
533
1322
|
|
|
534
|
-
export interface
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
1323
|
+
export interface Reference {
|
|
1324
|
+
/**
|
|
1325
|
+
* Reference title
|
|
1326
|
+
*/
|
|
1327
|
+
title: string;
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Reference URL
|
|
1331
|
+
*/
|
|
1332
|
+
url?: string;
|
|
1333
|
+
}
|
|
539
1334
|
}
|
|
540
1335
|
|
|
541
1336
|
export interface MaterialSearchResponse {
|
|
@@ -615,7 +1410,7 @@ export interface MaterialCreateParams {
|
|
|
615
1410
|
/**
|
|
616
1411
|
* Content details
|
|
617
1412
|
*/
|
|
618
|
-
content: Content;
|
|
1413
|
+
content: MaterialCreateParams.Content;
|
|
619
1414
|
|
|
620
1415
|
/**
|
|
621
1416
|
* Name of the material
|
|
@@ -626,6 +1421,50 @@ export interface MaterialCreateParams {
|
|
|
626
1421
|
* Folder ID to place the material in
|
|
627
1422
|
*/
|
|
628
1423
|
folderId?: string;
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* References that this material cites
|
|
1427
|
+
*/
|
|
1428
|
+
references?: Array<MaterialCreateParams.Reference>;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
export namespace MaterialCreateParams {
|
|
1432
|
+
/**
|
|
1433
|
+
* Content details
|
|
1434
|
+
*/
|
|
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
|
+
}
|
|
629
1468
|
}
|
|
630
1469
|
|
|
631
1470
|
export interface MaterialListParams {
|
|
@@ -654,7 +1493,7 @@ export interface MaterialCreateAndProcessParams {
|
|
|
654
1493
|
/**
|
|
655
1494
|
* Content details
|
|
656
1495
|
*/
|
|
657
|
-
content: Content;
|
|
1496
|
+
content: MaterialCreateAndProcessParams.Content;
|
|
658
1497
|
|
|
659
1498
|
/**
|
|
660
1499
|
* Name of the material
|
|
@@ -671,12 +1510,56 @@ export interface MaterialCreateAndProcessParams {
|
|
|
671
1510
|
*/
|
|
672
1511
|
pollIntervalMs?: number;
|
|
673
1512
|
|
|
1513
|
+
/**
|
|
1514
|
+
* References that this material cites
|
|
1515
|
+
*/
|
|
1516
|
+
references?: Array<MaterialCreateAndProcessParams.Reference>;
|
|
1517
|
+
|
|
674
1518
|
/**
|
|
675
1519
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
676
1520
|
*/
|
|
677
1521
|
timeoutMs?: number;
|
|
678
1522
|
}
|
|
679
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
|
+
|
|
680
1563
|
export interface MaterialCreateBatchUploadURLsParams {
|
|
681
1564
|
/**
|
|
682
1565
|
* Array of materials to create
|
|
@@ -743,6 +1626,25 @@ export interface MaterialGenerateParams {
|
|
|
743
1626
|
* Target education level
|
|
744
1627
|
*/
|
|
745
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
|
+
}
|
|
746
1648
|
}
|
|
747
1649
|
|
|
748
1650
|
export interface MaterialGenerateAndProcessParams {
|
|
@@ -786,12 +1688,31 @@ export interface MaterialGenerateAndProcessParams {
|
|
|
786
1688
|
*/
|
|
787
1689
|
pollIntervalMs?: number;
|
|
788
1690
|
|
|
1691
|
+
/**
|
|
1692
|
+
* References that this material cites
|
|
1693
|
+
*/
|
|
1694
|
+
references?: Array<MaterialGenerateAndProcessParams.Reference>;
|
|
1695
|
+
|
|
789
1696
|
/**
|
|
790
1697
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
791
1698
|
*/
|
|
792
1699
|
timeoutMs?: number;
|
|
793
1700
|
}
|
|
794
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
|
+
|
|
795
1716
|
export interface MaterialGetDownloadURLParams {
|
|
796
1717
|
/**
|
|
797
1718
|
* URL expiration time in seconds (default: 3600)
|
|
@@ -840,13 +1761,19 @@ Materials.Bulk = Bulk;
|
|
|
840
1761
|
|
|
841
1762
|
export declare namespace Materials {
|
|
842
1763
|
export {
|
|
843
|
-
type
|
|
844
|
-
type
|
|
845
|
-
type
|
|
1764
|
+
type MaterialCreateResponse as MaterialCreateResponse,
|
|
1765
|
+
type MaterialRetrieveResponse as MaterialRetrieveResponse,
|
|
1766
|
+
type MaterialUpdateResponse as MaterialUpdateResponse,
|
|
846
1767
|
type MaterialListResponse as MaterialListResponse,
|
|
1768
|
+
type MaterialCreateAndProcessResponse as MaterialCreateAndProcessResponse,
|
|
847
1769
|
type MaterialCreateBatchUploadURLsResponse as MaterialCreateBatchUploadURLsResponse,
|
|
1770
|
+
type MaterialGenerateResponse as MaterialGenerateResponse,
|
|
1771
|
+
type MaterialGenerateAndProcessResponse as MaterialGenerateAndProcessResponse,
|
|
848
1772
|
type MaterialGetDebugInfoResponse as MaterialGetDebugInfoResponse,
|
|
849
1773
|
type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse,
|
|
1774
|
+
type MaterialMoveResponse as MaterialMoveResponse,
|
|
1775
|
+
type MaterialRenameResponse as MaterialRenameResponse,
|
|
1776
|
+
type MaterialReprocessResponse as MaterialReprocessResponse,
|
|
850
1777
|
type MaterialSearchResponse as MaterialSearchResponse,
|
|
851
1778
|
type MaterialCreateParams as MaterialCreateParams,
|
|
852
1779
|
type MaterialListParams as MaterialListParams,
|
|
@@ -862,7 +1789,12 @@ export declare namespace Materials {
|
|
|
862
1789
|
|
|
863
1790
|
export {
|
|
864
1791
|
Upload as Upload,
|
|
1792
|
+
type UploadCompleteUploadResponse as UploadCompleteUploadResponse,
|
|
865
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,
|
|
866
1798
|
type UploadCompleteUploadParams as UploadCompleteUploadParams,
|
|
867
1799
|
type UploadGetPresignedURLParams as UploadGetPresignedURLParams,
|
|
868
1800
|
type UploadUploadFileParams as UploadUploadFileParams,
|