@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
|
@@ -2,7 +2,7 @@ import { APIResource } from "../../../core/resource.js";
|
|
|
2
2
|
import * as BulkAPI from "./bulk.js";
|
|
3
3
|
import { Bulk, BulkMoveParams, BulkMoveResponse } from "./bulk.js";
|
|
4
4
|
import * as UploadAPI from "./upload.js";
|
|
5
|
-
import { Upload, UploadCompleteUploadParams, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileParams, UploadUploadFromURLAndProcessParams, UploadUploadFromURLParams } from "./upload.js";
|
|
5
|
+
import { Upload, UploadCompleteUploadParams, UploadCompleteUploadResponse, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileAndProcessResponse, UploadUploadFileParams, UploadUploadFileResponse, UploadUploadFromURLAndProcessParams, UploadUploadFromURLAndProcessResponse, UploadUploadFromURLParams, UploadUploadFromURLResponse } from "./upload.js";
|
|
6
6
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
7
7
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
8
8
|
export declare class Materials extends APIResource {
|
|
@@ -13,24 +13,31 @@ export declare class Materials extends APIResource {
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* const
|
|
16
|
+
* const material = await client.v1.materials.create({
|
|
17
17
|
* content: { type: 'text' },
|
|
18
18
|
* name: 'Chapter 1 - Introduction',
|
|
19
19
|
* });
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<
|
|
22
|
+
create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<MaterialCreateResponse>;
|
|
23
23
|
/**
|
|
24
24
|
* Get material by ID
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* ```ts
|
|
28
|
-
* const
|
|
29
|
-
*
|
|
30
|
-
|
|
28
|
+
* const material = await client.v1.materials.retrieve('id');
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<MaterialRetrieveResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Update a material
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const material = await client.v1.materials.update('id');
|
|
31
38
|
* ```
|
|
32
39
|
*/
|
|
33
|
-
|
|
40
|
+
update(id: string, options?: RequestOptions): APIPromise<MaterialUpdateResponse>;
|
|
34
41
|
/**
|
|
35
42
|
* Get all materials for organization
|
|
36
43
|
*
|
|
@@ -55,14 +62,15 @@ export declare class Materials extends APIResource {
|
|
|
55
62
|
*
|
|
56
63
|
* @example
|
|
57
64
|
* ```ts
|
|
58
|
-
* const
|
|
59
|
-
*
|
|
65
|
+
* const response = await client.v1.materials.createAndProcess(
|
|
66
|
+
* {
|
|
60
67
|
* content: { type: 'text' },
|
|
61
68
|
* name: 'Chapter 1 - Introduction',
|
|
62
|
-
* }
|
|
69
|
+
* },
|
|
70
|
+
* );
|
|
63
71
|
* ```
|
|
64
72
|
*/
|
|
65
|
-
createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<
|
|
73
|
+
createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<MaterialCreateAndProcessResponse>;
|
|
66
74
|
/**
|
|
67
75
|
* Create batch upload URLs for multiple materials
|
|
68
76
|
*
|
|
@@ -87,22 +95,21 @@ export declare class Materials extends APIResource {
|
|
|
87
95
|
*
|
|
88
96
|
* @example
|
|
89
97
|
* ```ts
|
|
90
|
-
* const
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* });
|
|
98
|
+
* const response = await client.v1.materials.generate({
|
|
99
|
+
* name: 'Photosynthesis Study Plan',
|
|
100
|
+
* topic: 'Photosynthesis in plants',
|
|
101
|
+
* type: 'notes',
|
|
102
|
+
* });
|
|
96
103
|
* ```
|
|
97
104
|
*/
|
|
98
|
-
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<
|
|
105
|
+
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<MaterialGenerateResponse>;
|
|
99
106
|
/**
|
|
100
107
|
* Uses AI to generate study materials like outlines, notes, summaries, etc. from a
|
|
101
108
|
* given topic and waits for processing to complete
|
|
102
109
|
*
|
|
103
110
|
* @example
|
|
104
111
|
* ```ts
|
|
105
|
-
* const
|
|
112
|
+
* const response =
|
|
106
113
|
* await client.v1.materials.generateAndProcess({
|
|
107
114
|
* name: 'Photosynthesis Study Plan',
|
|
108
115
|
* topic: 'Photosynthesis in plants',
|
|
@@ -110,7 +117,7 @@ export declare class Materials extends APIResource {
|
|
|
110
117
|
* });
|
|
111
118
|
* ```
|
|
112
119
|
*/
|
|
113
|
-
generateAndProcess(body: MaterialGenerateAndProcessParams, options?: RequestOptions): APIPromise<
|
|
120
|
+
generateAndProcess(body: MaterialGenerateAndProcessParams, options?: RequestOptions): APIPromise<MaterialGenerateAndProcessResponse>;
|
|
114
121
|
/**
|
|
115
122
|
* Get debug information for a material including extracted content
|
|
116
123
|
*
|
|
@@ -121,83 +128,666 @@ export declare class Materials extends APIResource {
|
|
|
121
128
|
* );
|
|
122
129
|
* ```
|
|
123
130
|
*/
|
|
124
|
-
getDebugInfo(id: string, options?: RequestOptions): APIPromise<MaterialGetDebugInfoResponse>;
|
|
131
|
+
getDebugInfo(id: string, options?: RequestOptions): APIPromise<MaterialGetDebugInfoResponse>;
|
|
132
|
+
/**
|
|
133
|
+
* Get temporary download URL for material
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```ts
|
|
137
|
+
* const response = await client.v1.materials.getDownloadURL(
|
|
138
|
+
* 'id',
|
|
139
|
+
* );
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
getDownloadURL(id: string, query?: MaterialGetDownloadURLParams | null | undefined, options?: RequestOptions): APIPromise<MaterialGetDownloadURLResponse>;
|
|
143
|
+
/**
|
|
144
|
+
* Move material to a different folder
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* const response = await client.v1.materials.move('id', {
|
|
149
|
+
* folderId: 'folderId',
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialMoveResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Rename a material
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```ts
|
|
159
|
+
* const response = await client.v1.materials.rename('id', {
|
|
160
|
+
* name: 'New Material Name',
|
|
161
|
+
* });
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<MaterialRenameResponse>;
|
|
165
|
+
/**
|
|
166
|
+
* Reprocess material to regenerate embeddings and extract content
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```ts
|
|
170
|
+
* const response = await client.v1.materials.reprocess('id');
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
reprocess(id: string, options?: RequestOptions): APIPromise<MaterialReprocessResponse>;
|
|
174
|
+
/**
|
|
175
|
+
* Search materials using RAG (Retrieval-Augmented Generation)
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```ts
|
|
179
|
+
* const response = await client.v1.materials.search({
|
|
180
|
+
* query: 'What is photosynthesis?',
|
|
181
|
+
* });
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse>;
|
|
185
|
+
}
|
|
186
|
+
export interface MaterialCreateResponse {
|
|
187
|
+
/**
|
|
188
|
+
* Material ID
|
|
189
|
+
*/
|
|
190
|
+
_id: string;
|
|
191
|
+
/**
|
|
192
|
+
* Material content
|
|
193
|
+
*/
|
|
194
|
+
content: MaterialCreateResponse.Content;
|
|
195
|
+
/**
|
|
196
|
+
* Content type
|
|
197
|
+
*/
|
|
198
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
199
|
+
/**
|
|
200
|
+
* Creation timestamp
|
|
201
|
+
*/
|
|
202
|
+
createdAt: string;
|
|
203
|
+
/**
|
|
204
|
+
* Folder ID
|
|
205
|
+
*/
|
|
206
|
+
folderId: string | null;
|
|
207
|
+
/**
|
|
208
|
+
* Material name
|
|
209
|
+
*/
|
|
210
|
+
name: string;
|
|
211
|
+
/**
|
|
212
|
+
* Organization ID
|
|
213
|
+
*/
|
|
214
|
+
organizationId: string;
|
|
215
|
+
/**
|
|
216
|
+
* Material status
|
|
217
|
+
*/
|
|
218
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
219
|
+
/**
|
|
220
|
+
* Last update timestamp
|
|
221
|
+
*/
|
|
222
|
+
updatedAt: string;
|
|
223
|
+
/**
|
|
224
|
+
* Material metadata
|
|
225
|
+
*/
|
|
226
|
+
metadata?: unknown;
|
|
227
|
+
/**
|
|
228
|
+
* References that this material cites
|
|
229
|
+
*/
|
|
230
|
+
references?: Array<MaterialCreateResponse.Reference>;
|
|
231
|
+
/**
|
|
232
|
+
* Usage information
|
|
233
|
+
*/
|
|
234
|
+
usage?: unknown;
|
|
235
|
+
}
|
|
236
|
+
export declare namespace MaterialCreateResponse {
|
|
237
|
+
/**
|
|
238
|
+
* Material content
|
|
239
|
+
*/
|
|
240
|
+
interface Content {
|
|
241
|
+
filename?: string;
|
|
242
|
+
fileSize?: number;
|
|
243
|
+
mimeType?: string;
|
|
244
|
+
s3Key?: string;
|
|
245
|
+
s3Url?: string;
|
|
246
|
+
text?: string;
|
|
247
|
+
url?: string;
|
|
248
|
+
}
|
|
249
|
+
interface Reference {
|
|
250
|
+
/**
|
|
251
|
+
* Reference title
|
|
252
|
+
*/
|
|
253
|
+
title: string;
|
|
254
|
+
/**
|
|
255
|
+
* Reference URL
|
|
256
|
+
*/
|
|
257
|
+
url?: string;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
export interface MaterialRetrieveResponse {
|
|
261
|
+
/**
|
|
262
|
+
* Material ID
|
|
263
|
+
*/
|
|
264
|
+
_id: string;
|
|
265
|
+
/**
|
|
266
|
+
* Material content
|
|
267
|
+
*/
|
|
268
|
+
content: MaterialRetrieveResponse.Content;
|
|
269
|
+
/**
|
|
270
|
+
* Content type
|
|
271
|
+
*/
|
|
272
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
273
|
+
/**
|
|
274
|
+
* Creation timestamp
|
|
275
|
+
*/
|
|
276
|
+
createdAt: string;
|
|
277
|
+
/**
|
|
278
|
+
* Folder ID
|
|
279
|
+
*/
|
|
280
|
+
folderId: string | null;
|
|
281
|
+
/**
|
|
282
|
+
* Material name
|
|
283
|
+
*/
|
|
284
|
+
name: string;
|
|
285
|
+
/**
|
|
286
|
+
* Organization ID
|
|
287
|
+
*/
|
|
288
|
+
organizationId: string;
|
|
289
|
+
/**
|
|
290
|
+
* Material status
|
|
291
|
+
*/
|
|
292
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
293
|
+
/**
|
|
294
|
+
* Last update timestamp
|
|
295
|
+
*/
|
|
296
|
+
updatedAt: string;
|
|
297
|
+
/**
|
|
298
|
+
* Material metadata
|
|
299
|
+
*/
|
|
300
|
+
metadata?: unknown;
|
|
301
|
+
/**
|
|
302
|
+
* References that this material cites
|
|
303
|
+
*/
|
|
304
|
+
references?: Array<MaterialRetrieveResponse.Reference>;
|
|
305
|
+
/**
|
|
306
|
+
* Usage information
|
|
307
|
+
*/
|
|
308
|
+
usage?: unknown;
|
|
309
|
+
}
|
|
310
|
+
export declare namespace MaterialRetrieveResponse {
|
|
311
|
+
/**
|
|
312
|
+
* Material content
|
|
313
|
+
*/
|
|
314
|
+
interface Content {
|
|
315
|
+
filename?: string;
|
|
316
|
+
fileSize?: number;
|
|
317
|
+
mimeType?: string;
|
|
318
|
+
s3Key?: string;
|
|
319
|
+
s3Url?: string;
|
|
320
|
+
text?: string;
|
|
321
|
+
url?: string;
|
|
322
|
+
}
|
|
323
|
+
interface Reference {
|
|
324
|
+
/**
|
|
325
|
+
* Reference title
|
|
326
|
+
*/
|
|
327
|
+
title: string;
|
|
328
|
+
/**
|
|
329
|
+
* Reference URL
|
|
330
|
+
*/
|
|
331
|
+
url?: string;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
export interface MaterialUpdateResponse {
|
|
335
|
+
/**
|
|
336
|
+
* Material ID
|
|
337
|
+
*/
|
|
338
|
+
_id: string;
|
|
339
|
+
/**
|
|
340
|
+
* Material content
|
|
341
|
+
*/
|
|
342
|
+
content: MaterialUpdateResponse.Content;
|
|
343
|
+
/**
|
|
344
|
+
* Content type
|
|
345
|
+
*/
|
|
346
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
347
|
+
/**
|
|
348
|
+
* Creation timestamp
|
|
349
|
+
*/
|
|
350
|
+
createdAt: string;
|
|
351
|
+
/**
|
|
352
|
+
* Folder ID
|
|
353
|
+
*/
|
|
354
|
+
folderId: string | null;
|
|
355
|
+
/**
|
|
356
|
+
* Material name
|
|
357
|
+
*/
|
|
358
|
+
name: string;
|
|
359
|
+
/**
|
|
360
|
+
* Organization ID
|
|
361
|
+
*/
|
|
362
|
+
organizationId: string;
|
|
363
|
+
/**
|
|
364
|
+
* Material status
|
|
365
|
+
*/
|
|
366
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
367
|
+
/**
|
|
368
|
+
* Last update timestamp
|
|
369
|
+
*/
|
|
370
|
+
updatedAt: string;
|
|
371
|
+
/**
|
|
372
|
+
* Material metadata
|
|
373
|
+
*/
|
|
374
|
+
metadata?: unknown;
|
|
375
|
+
/**
|
|
376
|
+
* References that this material cites
|
|
377
|
+
*/
|
|
378
|
+
references?: Array<MaterialUpdateResponse.Reference>;
|
|
379
|
+
/**
|
|
380
|
+
* Usage information
|
|
381
|
+
*/
|
|
382
|
+
usage?: unknown;
|
|
383
|
+
}
|
|
384
|
+
export declare namespace MaterialUpdateResponse {
|
|
385
|
+
/**
|
|
386
|
+
* Material content
|
|
387
|
+
*/
|
|
388
|
+
interface Content {
|
|
389
|
+
filename?: string;
|
|
390
|
+
fileSize?: number;
|
|
391
|
+
mimeType?: string;
|
|
392
|
+
s3Key?: string;
|
|
393
|
+
s3Url?: string;
|
|
394
|
+
text?: string;
|
|
395
|
+
url?: string;
|
|
396
|
+
}
|
|
397
|
+
interface Reference {
|
|
398
|
+
/**
|
|
399
|
+
* Reference title
|
|
400
|
+
*/
|
|
401
|
+
title: string;
|
|
402
|
+
/**
|
|
403
|
+
* Reference URL
|
|
404
|
+
*/
|
|
405
|
+
url?: string;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
export interface MaterialListResponse {
|
|
409
|
+
materials?: Array<MaterialListResponse.Material>;
|
|
410
|
+
page?: number;
|
|
411
|
+
totalCount?: number;
|
|
412
|
+
totalPages?: number;
|
|
413
|
+
}
|
|
414
|
+
export declare namespace MaterialListResponse {
|
|
415
|
+
interface Material {
|
|
416
|
+
/**
|
|
417
|
+
* Material ID
|
|
418
|
+
*/
|
|
419
|
+
_id: string;
|
|
420
|
+
/**
|
|
421
|
+
* Material content
|
|
422
|
+
*/
|
|
423
|
+
content: Material.Content;
|
|
424
|
+
/**
|
|
425
|
+
* Content type
|
|
426
|
+
*/
|
|
427
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
428
|
+
/**
|
|
429
|
+
* Creation timestamp
|
|
430
|
+
*/
|
|
431
|
+
createdAt: string;
|
|
432
|
+
/**
|
|
433
|
+
* Folder ID
|
|
434
|
+
*/
|
|
435
|
+
folderId: string | null;
|
|
436
|
+
/**
|
|
437
|
+
* Material name
|
|
438
|
+
*/
|
|
439
|
+
name: string;
|
|
440
|
+
/**
|
|
441
|
+
* Organization ID
|
|
442
|
+
*/
|
|
443
|
+
organizationId: string;
|
|
444
|
+
/**
|
|
445
|
+
* Material status
|
|
446
|
+
*/
|
|
447
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
448
|
+
/**
|
|
449
|
+
* Last update timestamp
|
|
450
|
+
*/
|
|
451
|
+
updatedAt: string;
|
|
452
|
+
/**
|
|
453
|
+
* Material metadata
|
|
454
|
+
*/
|
|
455
|
+
metadata?: unknown;
|
|
456
|
+
/**
|
|
457
|
+
* References that this material cites
|
|
458
|
+
*/
|
|
459
|
+
references?: Array<Material.Reference>;
|
|
460
|
+
/**
|
|
461
|
+
* Usage information
|
|
462
|
+
*/
|
|
463
|
+
usage?: unknown;
|
|
464
|
+
}
|
|
465
|
+
namespace Material {
|
|
466
|
+
/**
|
|
467
|
+
* Material content
|
|
468
|
+
*/
|
|
469
|
+
interface Content {
|
|
470
|
+
filename?: string;
|
|
471
|
+
fileSize?: number;
|
|
472
|
+
mimeType?: string;
|
|
473
|
+
s3Key?: string;
|
|
474
|
+
s3Url?: string;
|
|
475
|
+
text?: string;
|
|
476
|
+
url?: string;
|
|
477
|
+
}
|
|
478
|
+
interface Reference {
|
|
479
|
+
/**
|
|
480
|
+
* Reference title
|
|
481
|
+
*/
|
|
482
|
+
title: string;
|
|
483
|
+
/**
|
|
484
|
+
* Reference URL
|
|
485
|
+
*/
|
|
486
|
+
url?: string;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
export interface MaterialCreateAndProcessResponse {
|
|
491
|
+
/**
|
|
492
|
+
* Material ID
|
|
493
|
+
*/
|
|
494
|
+
_id: string;
|
|
495
|
+
/**
|
|
496
|
+
* Material content
|
|
497
|
+
*/
|
|
498
|
+
content: MaterialCreateAndProcessResponse.Content;
|
|
499
|
+
/**
|
|
500
|
+
* Content type
|
|
501
|
+
*/
|
|
502
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
503
|
+
/**
|
|
504
|
+
* Creation timestamp
|
|
505
|
+
*/
|
|
506
|
+
createdAt: string;
|
|
507
|
+
/**
|
|
508
|
+
* Folder ID
|
|
509
|
+
*/
|
|
510
|
+
folderId: string | null;
|
|
511
|
+
/**
|
|
512
|
+
* Material name
|
|
513
|
+
*/
|
|
514
|
+
name: string;
|
|
515
|
+
/**
|
|
516
|
+
* Organization ID
|
|
517
|
+
*/
|
|
518
|
+
organizationId: string;
|
|
519
|
+
/**
|
|
520
|
+
* Material status
|
|
521
|
+
*/
|
|
522
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
523
|
+
/**
|
|
524
|
+
* Last update timestamp
|
|
525
|
+
*/
|
|
526
|
+
updatedAt: string;
|
|
527
|
+
/**
|
|
528
|
+
* Material metadata
|
|
529
|
+
*/
|
|
530
|
+
metadata?: unknown;
|
|
531
|
+
/**
|
|
532
|
+
* References that this material cites
|
|
533
|
+
*/
|
|
534
|
+
references?: Array<MaterialCreateAndProcessResponse.Reference>;
|
|
535
|
+
/**
|
|
536
|
+
* Usage information
|
|
537
|
+
*/
|
|
538
|
+
usage?: unknown;
|
|
539
|
+
}
|
|
540
|
+
export declare namespace MaterialCreateAndProcessResponse {
|
|
541
|
+
/**
|
|
542
|
+
* Material content
|
|
543
|
+
*/
|
|
544
|
+
interface Content {
|
|
545
|
+
filename?: string;
|
|
546
|
+
fileSize?: number;
|
|
547
|
+
mimeType?: string;
|
|
548
|
+
s3Key?: string;
|
|
549
|
+
s3Url?: string;
|
|
550
|
+
text?: string;
|
|
551
|
+
url?: string;
|
|
552
|
+
}
|
|
553
|
+
interface Reference {
|
|
554
|
+
/**
|
|
555
|
+
* Reference title
|
|
556
|
+
*/
|
|
557
|
+
title: string;
|
|
558
|
+
/**
|
|
559
|
+
* Reference URL
|
|
560
|
+
*/
|
|
561
|
+
url?: string;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
export type MaterialCreateBatchUploadURLsResponse = Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
565
|
+
export declare namespace MaterialCreateBatchUploadURLsResponse {
|
|
566
|
+
interface MaterialCreateBatchUploadURLsResponseItem {
|
|
567
|
+
/**
|
|
568
|
+
* Material ID
|
|
569
|
+
*/
|
|
570
|
+
materialId: string;
|
|
571
|
+
/**
|
|
572
|
+
* Material name
|
|
573
|
+
*/
|
|
574
|
+
name: string;
|
|
575
|
+
/**
|
|
576
|
+
* S3 key
|
|
577
|
+
*/
|
|
578
|
+
s3Key: string;
|
|
579
|
+
/**
|
|
580
|
+
* Presigned upload URL
|
|
581
|
+
*/
|
|
582
|
+
uploadUrl: string;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
export interface MaterialGenerateResponse {
|
|
586
|
+
/**
|
|
587
|
+
* Material ID
|
|
588
|
+
*/
|
|
589
|
+
_id: string;
|
|
590
|
+
/**
|
|
591
|
+
* Material content
|
|
592
|
+
*/
|
|
593
|
+
content: MaterialGenerateResponse.Content;
|
|
594
|
+
/**
|
|
595
|
+
* Content type
|
|
596
|
+
*/
|
|
597
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
598
|
+
/**
|
|
599
|
+
* Creation timestamp
|
|
600
|
+
*/
|
|
601
|
+
createdAt: string;
|
|
602
|
+
/**
|
|
603
|
+
* Folder ID
|
|
604
|
+
*/
|
|
605
|
+
folderId: string | null;
|
|
606
|
+
/**
|
|
607
|
+
* Material name
|
|
608
|
+
*/
|
|
609
|
+
name: string;
|
|
610
|
+
/**
|
|
611
|
+
* Organization ID
|
|
612
|
+
*/
|
|
613
|
+
organizationId: string;
|
|
614
|
+
/**
|
|
615
|
+
* Material status
|
|
616
|
+
*/
|
|
617
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
618
|
+
/**
|
|
619
|
+
* Last update timestamp
|
|
620
|
+
*/
|
|
621
|
+
updatedAt: string;
|
|
622
|
+
/**
|
|
623
|
+
* Generation metadata
|
|
624
|
+
*/
|
|
625
|
+
generationMetadata?: unknown;
|
|
626
|
+
/**
|
|
627
|
+
* Material metadata
|
|
628
|
+
*/
|
|
629
|
+
metadata?: unknown;
|
|
630
|
+
/**
|
|
631
|
+
* References that this material cites
|
|
632
|
+
*/
|
|
633
|
+
references?: Array<MaterialGenerateResponse.Reference>;
|
|
634
|
+
/**
|
|
635
|
+
* Usage information
|
|
636
|
+
*/
|
|
637
|
+
usage?: unknown;
|
|
638
|
+
}
|
|
639
|
+
export declare namespace MaterialGenerateResponse {
|
|
640
|
+
/**
|
|
641
|
+
* Material content
|
|
642
|
+
*/
|
|
643
|
+
interface Content {
|
|
644
|
+
filename?: string;
|
|
645
|
+
fileSize?: number;
|
|
646
|
+
mimeType?: string;
|
|
647
|
+
s3Key?: string;
|
|
648
|
+
s3Url?: string;
|
|
649
|
+
text?: string;
|
|
650
|
+
url?: string;
|
|
651
|
+
}
|
|
652
|
+
interface Reference {
|
|
653
|
+
/**
|
|
654
|
+
* Reference title
|
|
655
|
+
*/
|
|
656
|
+
title: string;
|
|
657
|
+
/**
|
|
658
|
+
* Reference URL
|
|
659
|
+
*/
|
|
660
|
+
url?: string;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
export interface MaterialGenerateAndProcessResponse {
|
|
664
|
+
/**
|
|
665
|
+
* Material ID
|
|
666
|
+
*/
|
|
667
|
+
_id: string;
|
|
668
|
+
/**
|
|
669
|
+
* Material content
|
|
670
|
+
*/
|
|
671
|
+
content: MaterialGenerateAndProcessResponse.Content;
|
|
672
|
+
/**
|
|
673
|
+
* Content type
|
|
674
|
+
*/
|
|
675
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
676
|
+
/**
|
|
677
|
+
* Creation timestamp
|
|
678
|
+
*/
|
|
679
|
+
createdAt: string;
|
|
680
|
+
/**
|
|
681
|
+
* Folder ID
|
|
682
|
+
*/
|
|
683
|
+
folderId: string | null;
|
|
684
|
+
/**
|
|
685
|
+
* Material name
|
|
686
|
+
*/
|
|
687
|
+
name: string;
|
|
688
|
+
/**
|
|
689
|
+
* Organization ID
|
|
690
|
+
*/
|
|
691
|
+
organizationId: string;
|
|
692
|
+
/**
|
|
693
|
+
* Material status
|
|
694
|
+
*/
|
|
695
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
696
|
+
/**
|
|
697
|
+
* Last update timestamp
|
|
698
|
+
*/
|
|
699
|
+
updatedAt: string;
|
|
700
|
+
/**
|
|
701
|
+
* Generation metadata
|
|
702
|
+
*/
|
|
703
|
+
generationMetadata?: unknown;
|
|
704
|
+
/**
|
|
705
|
+
* Material metadata
|
|
706
|
+
*/
|
|
707
|
+
metadata?: unknown;
|
|
708
|
+
/**
|
|
709
|
+
* References that this material cites
|
|
710
|
+
*/
|
|
711
|
+
references?: Array<MaterialGenerateAndProcessResponse.Reference>;
|
|
712
|
+
/**
|
|
713
|
+
* Usage information
|
|
714
|
+
*/
|
|
715
|
+
usage?: unknown;
|
|
716
|
+
}
|
|
717
|
+
export declare namespace MaterialGenerateAndProcessResponse {
|
|
718
|
+
/**
|
|
719
|
+
* Material content
|
|
720
|
+
*/
|
|
721
|
+
interface Content {
|
|
722
|
+
filename?: string;
|
|
723
|
+
fileSize?: number;
|
|
724
|
+
mimeType?: string;
|
|
725
|
+
s3Key?: string;
|
|
726
|
+
s3Url?: string;
|
|
727
|
+
text?: string;
|
|
728
|
+
url?: string;
|
|
729
|
+
}
|
|
730
|
+
interface Reference {
|
|
731
|
+
/**
|
|
732
|
+
* Reference title
|
|
733
|
+
*/
|
|
734
|
+
title: string;
|
|
735
|
+
/**
|
|
736
|
+
* Reference URL
|
|
737
|
+
*/
|
|
738
|
+
url?: string;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
export interface MaterialGetDebugInfoResponse {
|
|
125
742
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* ```ts
|
|
130
|
-
* const response = await client.v1.materials.getDownloadURL(
|
|
131
|
-
* 'id',
|
|
132
|
-
* );
|
|
133
|
-
* ```
|
|
743
|
+
* Content details
|
|
134
744
|
*/
|
|
135
|
-
|
|
745
|
+
content: unknown;
|
|
136
746
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* ```ts
|
|
141
|
-
* const materialResponse = await client.v1.materials.move(
|
|
142
|
-
* 'id',
|
|
143
|
-
* { folderId: 'folderId' },
|
|
144
|
-
* );
|
|
145
|
-
* ```
|
|
747
|
+
* Content type
|
|
146
748
|
*/
|
|
147
|
-
|
|
749
|
+
contentType: string;
|
|
148
750
|
/**
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* @example
|
|
152
|
-
* ```ts
|
|
153
|
-
* const materialResponse = await client.v1.materials.rename(
|
|
154
|
-
* 'id',
|
|
155
|
-
* { name: 'New Material Name' },
|
|
156
|
-
* );
|
|
157
|
-
* ```
|
|
751
|
+
* Processed images
|
|
158
752
|
*/
|
|
159
|
-
|
|
753
|
+
images: Array<MaterialGetDebugInfoResponse.Image>;
|
|
160
754
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* @example
|
|
164
|
-
* ```ts
|
|
165
|
-
* const materialResponse =
|
|
166
|
-
* await client.v1.materials.reprocess('id');
|
|
167
|
-
* ```
|
|
755
|
+
* Material ID
|
|
168
756
|
*/
|
|
169
|
-
|
|
757
|
+
materialId: string;
|
|
170
758
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* @example
|
|
174
|
-
* ```ts
|
|
175
|
-
* const response = await client.v1.materials.search({
|
|
176
|
-
* query: 'What is photosynthesis?',
|
|
177
|
-
* });
|
|
178
|
-
* ```
|
|
759
|
+
* Material metadata
|
|
179
760
|
*/
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
export interface Content {
|
|
761
|
+
metadata: unknown;
|
|
183
762
|
/**
|
|
184
|
-
*
|
|
763
|
+
* Material name
|
|
185
764
|
*/
|
|
186
|
-
|
|
765
|
+
name: string;
|
|
187
766
|
/**
|
|
188
|
-
*
|
|
767
|
+
* Processing status
|
|
189
768
|
*/
|
|
190
|
-
|
|
769
|
+
status: string;
|
|
191
770
|
/**
|
|
192
|
-
*
|
|
771
|
+
* Transcript structure for videos
|
|
193
772
|
*/
|
|
194
|
-
|
|
773
|
+
transcriptStructure: unknown | null;
|
|
774
|
+
}
|
|
775
|
+
export declare namespace MaterialGetDebugInfoResponse {
|
|
776
|
+
interface Image {
|
|
777
|
+
id?: string;
|
|
778
|
+
description?: string;
|
|
779
|
+
pageIndex?: number;
|
|
780
|
+
s3Key?: string;
|
|
781
|
+
s3Url?: string;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
export interface MaterialGetDownloadURLResponse {
|
|
195
785
|
/**
|
|
196
|
-
*
|
|
786
|
+
* Temporary download URL
|
|
197
787
|
*/
|
|
198
|
-
|
|
788
|
+
downloadUrl: string;
|
|
199
789
|
}
|
|
200
|
-
export interface
|
|
790
|
+
export interface MaterialMoveResponse {
|
|
201
791
|
/**
|
|
202
792
|
* Material ID
|
|
203
793
|
*/
|
|
@@ -205,7 +795,7 @@ export interface GeneratedMaterialResponse {
|
|
|
205
795
|
/**
|
|
206
796
|
* Material content
|
|
207
797
|
*/
|
|
208
|
-
content:
|
|
798
|
+
content: MaterialMoveResponse.Content;
|
|
209
799
|
/**
|
|
210
800
|
* Content type
|
|
211
801
|
*/
|
|
@@ -234,20 +824,20 @@ export interface GeneratedMaterialResponse {
|
|
|
234
824
|
* Last update timestamp
|
|
235
825
|
*/
|
|
236
826
|
updatedAt: string;
|
|
237
|
-
/**
|
|
238
|
-
* Generation metadata
|
|
239
|
-
*/
|
|
240
|
-
generationMetadata?: unknown;
|
|
241
827
|
/**
|
|
242
828
|
* Material metadata
|
|
243
829
|
*/
|
|
244
830
|
metadata?: unknown;
|
|
831
|
+
/**
|
|
832
|
+
* References that this material cites
|
|
833
|
+
*/
|
|
834
|
+
references?: Array<MaterialMoveResponse.Reference>;
|
|
245
835
|
/**
|
|
246
836
|
* Usage information
|
|
247
837
|
*/
|
|
248
838
|
usage?: unknown;
|
|
249
839
|
}
|
|
250
|
-
export declare namespace
|
|
840
|
+
export declare namespace MaterialMoveResponse {
|
|
251
841
|
/**
|
|
252
842
|
* Material content
|
|
253
843
|
*/
|
|
@@ -260,8 +850,18 @@ export declare namespace GeneratedMaterialResponse {
|
|
|
260
850
|
text?: string;
|
|
261
851
|
url?: string;
|
|
262
852
|
}
|
|
853
|
+
interface Reference {
|
|
854
|
+
/**
|
|
855
|
+
* Reference title
|
|
856
|
+
*/
|
|
857
|
+
title: string;
|
|
858
|
+
/**
|
|
859
|
+
* Reference URL
|
|
860
|
+
*/
|
|
861
|
+
url?: string;
|
|
862
|
+
}
|
|
263
863
|
}
|
|
264
|
-
export interface
|
|
864
|
+
export interface MaterialRenameResponse {
|
|
265
865
|
/**
|
|
266
866
|
* Material ID
|
|
267
867
|
*/
|
|
@@ -269,7 +869,7 @@ export interface MaterialResponse {
|
|
|
269
869
|
/**
|
|
270
870
|
* Material content
|
|
271
871
|
*/
|
|
272
|
-
content:
|
|
872
|
+
content: MaterialRenameResponse.Content;
|
|
273
873
|
/**
|
|
274
874
|
* Content type
|
|
275
875
|
*/
|
|
@@ -302,12 +902,16 @@ export interface MaterialResponse {
|
|
|
302
902
|
* Material metadata
|
|
303
903
|
*/
|
|
304
904
|
metadata?: unknown;
|
|
905
|
+
/**
|
|
906
|
+
* References that this material cites
|
|
907
|
+
*/
|
|
908
|
+
references?: Array<MaterialRenameResponse.Reference>;
|
|
305
909
|
/**
|
|
306
910
|
* Usage information
|
|
307
911
|
*/
|
|
308
912
|
usage?: unknown;
|
|
309
913
|
}
|
|
310
|
-
export declare namespace
|
|
914
|
+
export declare namespace MaterialRenameResponse {
|
|
311
915
|
/**
|
|
312
916
|
* Material content
|
|
313
917
|
*/
|
|
@@ -320,82 +924,90 @@ export declare namespace MaterialResponse {
|
|
|
320
924
|
text?: string;
|
|
321
925
|
url?: string;
|
|
322
926
|
}
|
|
323
|
-
|
|
324
|
-
export interface MaterialListResponse {
|
|
325
|
-
materials?: Array<MaterialResponse>;
|
|
326
|
-
page?: number;
|
|
327
|
-
totalCount?: number;
|
|
328
|
-
totalPages?: number;
|
|
329
|
-
}
|
|
330
|
-
export type MaterialCreateBatchUploadURLsResponse = Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
331
|
-
export declare namespace MaterialCreateBatchUploadURLsResponse {
|
|
332
|
-
interface MaterialCreateBatchUploadURLsResponseItem {
|
|
333
|
-
/**
|
|
334
|
-
* Material ID
|
|
335
|
-
*/
|
|
336
|
-
materialId: string;
|
|
337
|
-
/**
|
|
338
|
-
* Material name
|
|
339
|
-
*/
|
|
340
|
-
name: string;
|
|
927
|
+
interface Reference {
|
|
341
928
|
/**
|
|
342
|
-
*
|
|
929
|
+
* Reference title
|
|
343
930
|
*/
|
|
344
|
-
|
|
931
|
+
title: string;
|
|
345
932
|
/**
|
|
346
|
-
*
|
|
933
|
+
* Reference URL
|
|
347
934
|
*/
|
|
348
|
-
|
|
935
|
+
url?: string;
|
|
349
936
|
}
|
|
350
937
|
}
|
|
351
|
-
export interface
|
|
938
|
+
export interface MaterialReprocessResponse {
|
|
352
939
|
/**
|
|
353
|
-
*
|
|
940
|
+
* Material ID
|
|
354
941
|
*/
|
|
355
|
-
|
|
942
|
+
_id: string;
|
|
356
943
|
/**
|
|
357
|
-
*
|
|
944
|
+
* Material content
|
|
358
945
|
*/
|
|
359
|
-
|
|
946
|
+
content: MaterialReprocessResponse.Content;
|
|
360
947
|
/**
|
|
361
|
-
*
|
|
948
|
+
* Content type
|
|
362
949
|
*/
|
|
363
|
-
|
|
950
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
364
951
|
/**
|
|
365
|
-
*
|
|
952
|
+
* Creation timestamp
|
|
366
953
|
*/
|
|
367
|
-
|
|
954
|
+
createdAt: string;
|
|
368
955
|
/**
|
|
369
|
-
*
|
|
956
|
+
* Folder ID
|
|
370
957
|
*/
|
|
371
|
-
|
|
958
|
+
folderId: string | null;
|
|
372
959
|
/**
|
|
373
960
|
* Material name
|
|
374
961
|
*/
|
|
375
962
|
name: string;
|
|
376
963
|
/**
|
|
377
|
-
*
|
|
964
|
+
* Organization ID
|
|
378
965
|
*/
|
|
379
|
-
|
|
966
|
+
organizationId: string;
|
|
380
967
|
/**
|
|
381
|
-
*
|
|
968
|
+
* Material status
|
|
382
969
|
*/
|
|
383
|
-
|
|
970
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
971
|
+
/**
|
|
972
|
+
* Last update timestamp
|
|
973
|
+
*/
|
|
974
|
+
updatedAt: string;
|
|
975
|
+
/**
|
|
976
|
+
* Material metadata
|
|
977
|
+
*/
|
|
978
|
+
metadata?: unknown;
|
|
979
|
+
/**
|
|
980
|
+
* References that this material cites
|
|
981
|
+
*/
|
|
982
|
+
references?: Array<MaterialReprocessResponse.Reference>;
|
|
983
|
+
/**
|
|
984
|
+
* Usage information
|
|
985
|
+
*/
|
|
986
|
+
usage?: unknown;
|
|
384
987
|
}
|
|
385
|
-
export declare namespace
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
988
|
+
export declare namespace MaterialReprocessResponse {
|
|
989
|
+
/**
|
|
990
|
+
* Material content
|
|
991
|
+
*/
|
|
992
|
+
interface Content {
|
|
993
|
+
filename?: string;
|
|
994
|
+
fileSize?: number;
|
|
995
|
+
mimeType?: string;
|
|
390
996
|
s3Key?: string;
|
|
391
997
|
s3Url?: string;
|
|
998
|
+
text?: string;
|
|
999
|
+
url?: string;
|
|
1000
|
+
}
|
|
1001
|
+
interface Reference {
|
|
1002
|
+
/**
|
|
1003
|
+
* Reference title
|
|
1004
|
+
*/
|
|
1005
|
+
title: string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Reference URL
|
|
1008
|
+
*/
|
|
1009
|
+
url?: string;
|
|
392
1010
|
}
|
|
393
|
-
}
|
|
394
|
-
export interface MaterialGetDownloadURLResponse {
|
|
395
|
-
/**
|
|
396
|
-
* Temporary download URL
|
|
397
|
-
*/
|
|
398
|
-
downloadUrl: string;
|
|
399
1011
|
}
|
|
400
1012
|
export interface MaterialSearchResponse {
|
|
401
1013
|
/**
|
|
@@ -460,7 +1072,7 @@ export interface MaterialCreateParams {
|
|
|
460
1072
|
/**
|
|
461
1073
|
* Content details
|
|
462
1074
|
*/
|
|
463
|
-
content: Content;
|
|
1075
|
+
content: MaterialCreateParams.Content;
|
|
464
1076
|
/**
|
|
465
1077
|
* Name of the material
|
|
466
1078
|
*/
|
|
@@ -469,6 +1081,43 @@ export interface MaterialCreateParams {
|
|
|
469
1081
|
* Folder ID to place the material in
|
|
470
1082
|
*/
|
|
471
1083
|
folderId?: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* References that this material cites
|
|
1086
|
+
*/
|
|
1087
|
+
references?: Array<MaterialCreateParams.Reference>;
|
|
1088
|
+
}
|
|
1089
|
+
export declare namespace MaterialCreateParams {
|
|
1090
|
+
/**
|
|
1091
|
+
* Content details
|
|
1092
|
+
*/
|
|
1093
|
+
interface Content {
|
|
1094
|
+
/**
|
|
1095
|
+
* Type of content
|
|
1096
|
+
*/
|
|
1097
|
+
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1098
|
+
/**
|
|
1099
|
+
* URL to fetch content from
|
|
1100
|
+
*/
|
|
1101
|
+
sourceUrl?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* Text content (for text type)
|
|
1104
|
+
*/
|
|
1105
|
+
text?: string;
|
|
1106
|
+
/**
|
|
1107
|
+
* URL to the content (for url type)
|
|
1108
|
+
*/
|
|
1109
|
+
url?: string;
|
|
1110
|
+
}
|
|
1111
|
+
interface Reference {
|
|
1112
|
+
/**
|
|
1113
|
+
* Reference title
|
|
1114
|
+
*/
|
|
1115
|
+
title: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* Reference URL
|
|
1118
|
+
*/
|
|
1119
|
+
url?: string;
|
|
1120
|
+
}
|
|
472
1121
|
}
|
|
473
1122
|
export interface MaterialListParams {
|
|
474
1123
|
/**
|
|
@@ -492,7 +1141,7 @@ export interface MaterialCreateAndProcessParams {
|
|
|
492
1141
|
/**
|
|
493
1142
|
* Content details
|
|
494
1143
|
*/
|
|
495
|
-
content: Content;
|
|
1144
|
+
content: MaterialCreateAndProcessParams.Content;
|
|
496
1145
|
/**
|
|
497
1146
|
* Name of the material
|
|
498
1147
|
*/
|
|
@@ -505,11 +1154,48 @@ export interface MaterialCreateAndProcessParams {
|
|
|
505
1154
|
* Polling interval in milliseconds (default: 2 seconds)
|
|
506
1155
|
*/
|
|
507
1156
|
pollIntervalMs?: number;
|
|
1157
|
+
/**
|
|
1158
|
+
* References that this material cites
|
|
1159
|
+
*/
|
|
1160
|
+
references?: Array<MaterialCreateAndProcessParams.Reference>;
|
|
508
1161
|
/**
|
|
509
1162
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
510
1163
|
*/
|
|
511
1164
|
timeoutMs?: number;
|
|
512
1165
|
}
|
|
1166
|
+
export declare namespace MaterialCreateAndProcessParams {
|
|
1167
|
+
/**
|
|
1168
|
+
* Content details
|
|
1169
|
+
*/
|
|
1170
|
+
interface Content {
|
|
1171
|
+
/**
|
|
1172
|
+
* Type of content
|
|
1173
|
+
*/
|
|
1174
|
+
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1175
|
+
/**
|
|
1176
|
+
* URL to fetch content from
|
|
1177
|
+
*/
|
|
1178
|
+
sourceUrl?: string;
|
|
1179
|
+
/**
|
|
1180
|
+
* Text content (for text type)
|
|
1181
|
+
*/
|
|
1182
|
+
text?: string;
|
|
1183
|
+
/**
|
|
1184
|
+
* URL to the content (for url type)
|
|
1185
|
+
*/
|
|
1186
|
+
url?: string;
|
|
1187
|
+
}
|
|
1188
|
+
interface Reference {
|
|
1189
|
+
/**
|
|
1190
|
+
* Reference title
|
|
1191
|
+
*/
|
|
1192
|
+
title: string;
|
|
1193
|
+
/**
|
|
1194
|
+
* Reference URL
|
|
1195
|
+
*/
|
|
1196
|
+
url?: string;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
513
1199
|
export interface MaterialCreateBatchUploadURLsParams {
|
|
514
1200
|
/**
|
|
515
1201
|
* Array of materials to create
|
|
@@ -565,6 +1251,22 @@ export interface MaterialGenerateParams {
|
|
|
565
1251
|
* Target education level
|
|
566
1252
|
*/
|
|
567
1253
|
level?: 'high_school' | 'college' | 'professional';
|
|
1254
|
+
/**
|
|
1255
|
+
* References that this material cites
|
|
1256
|
+
*/
|
|
1257
|
+
references?: Array<MaterialGenerateParams.Reference>;
|
|
1258
|
+
}
|
|
1259
|
+
export declare namespace MaterialGenerateParams {
|
|
1260
|
+
interface Reference {
|
|
1261
|
+
/**
|
|
1262
|
+
* Reference title
|
|
1263
|
+
*/
|
|
1264
|
+
title: string;
|
|
1265
|
+
/**
|
|
1266
|
+
* Reference URL
|
|
1267
|
+
*/
|
|
1268
|
+
url?: string;
|
|
1269
|
+
}
|
|
568
1270
|
}
|
|
569
1271
|
export interface MaterialGenerateAndProcessParams {
|
|
570
1272
|
/**
|
|
@@ -599,11 +1301,27 @@ export interface MaterialGenerateAndProcessParams {
|
|
|
599
1301
|
* Polling interval in milliseconds (default: 2 seconds)
|
|
600
1302
|
*/
|
|
601
1303
|
pollIntervalMs?: number;
|
|
1304
|
+
/**
|
|
1305
|
+
* References that this material cites
|
|
1306
|
+
*/
|
|
1307
|
+
references?: Array<MaterialGenerateAndProcessParams.Reference>;
|
|
602
1308
|
/**
|
|
603
1309
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
604
1310
|
*/
|
|
605
1311
|
timeoutMs?: number;
|
|
606
1312
|
}
|
|
1313
|
+
export declare namespace MaterialGenerateAndProcessParams {
|
|
1314
|
+
interface Reference {
|
|
1315
|
+
/**
|
|
1316
|
+
* Reference title
|
|
1317
|
+
*/
|
|
1318
|
+
title: string;
|
|
1319
|
+
/**
|
|
1320
|
+
* Reference URL
|
|
1321
|
+
*/
|
|
1322
|
+
url?: string;
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
607
1325
|
export interface MaterialGetDownloadURLParams {
|
|
608
1326
|
/**
|
|
609
1327
|
* URL expiration time in seconds (default: 3600)
|
|
@@ -641,8 +1359,8 @@ export interface MaterialSearchParams {
|
|
|
641
1359
|
topK?: number;
|
|
642
1360
|
}
|
|
643
1361
|
export declare namespace Materials {
|
|
644
|
-
export { type
|
|
645
|
-
export { Upload as Upload, type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse, type UploadCompleteUploadParams as UploadCompleteUploadParams, type UploadGetPresignedURLParams as UploadGetPresignedURLParams, type UploadUploadFileParams as UploadUploadFileParams, type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams, type UploadUploadFromURLParams as UploadUploadFromURLParams, type UploadUploadFromURLAndProcessParams as UploadUploadFromURLAndProcessParams, };
|
|
1362
|
+
export { type MaterialCreateResponse as MaterialCreateResponse, type MaterialRetrieveResponse as MaterialRetrieveResponse, type MaterialUpdateResponse as MaterialUpdateResponse, type MaterialListResponse as MaterialListResponse, type MaterialCreateAndProcessResponse as MaterialCreateAndProcessResponse, type MaterialCreateBatchUploadURLsResponse as MaterialCreateBatchUploadURLsResponse, type MaterialGenerateResponse as MaterialGenerateResponse, type MaterialGenerateAndProcessResponse as MaterialGenerateAndProcessResponse, type MaterialGetDebugInfoResponse as MaterialGetDebugInfoResponse, type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse, type MaterialMoveResponse as MaterialMoveResponse, type MaterialRenameResponse as MaterialRenameResponse, type MaterialReprocessResponse as MaterialReprocessResponse, type MaterialSearchResponse as MaterialSearchResponse, type MaterialCreateParams as MaterialCreateParams, type MaterialListParams as MaterialListParams, type MaterialCreateAndProcessParams as MaterialCreateAndProcessParams, type MaterialCreateBatchUploadURLsParams as MaterialCreateBatchUploadURLsParams, type MaterialGenerateParams as MaterialGenerateParams, type MaterialGenerateAndProcessParams as MaterialGenerateAndProcessParams, type MaterialGetDownloadURLParams as MaterialGetDownloadURLParams, type MaterialMoveParams as MaterialMoveParams, type MaterialRenameParams as MaterialRenameParams, type MaterialSearchParams as MaterialSearchParams, };
|
|
1363
|
+
export { Upload as Upload, type UploadCompleteUploadResponse as UploadCompleteUploadResponse, type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse, type UploadUploadFileResponse as UploadUploadFileResponse, type UploadUploadFileAndProcessResponse as UploadUploadFileAndProcessResponse, type UploadUploadFromURLResponse as UploadUploadFromURLResponse, type UploadUploadFromURLAndProcessResponse as UploadUploadFromURLAndProcessResponse, type UploadCompleteUploadParams as UploadCompleteUploadParams, type UploadGetPresignedURLParams as UploadGetPresignedURLParams, type UploadUploadFileParams as UploadUploadFileParams, type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams, type UploadUploadFromURLParams as UploadUploadFromURLParams, type UploadUploadFromURLAndProcessParams as UploadUploadFromURLAndProcessParams, };
|
|
646
1364
|
export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
|
|
647
1365
|
}
|
|
648
1366
|
//# sourceMappingURL=materials.d.ts.map
|