@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
|
@@ -2,7 +2,7 @@ import { APIResource } from "../../../core/resource.mjs";
|
|
|
2
2
|
import * as BulkAPI from "./bulk.mjs";
|
|
3
3
|
import { Bulk, BulkMoveParams, BulkMoveResponse } from "./bulk.mjs";
|
|
4
4
|
import * as UploadAPI from "./upload.mjs";
|
|
5
|
-
import { Upload, UploadCompleteUploadParams, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileParams, UploadUploadFromURLAndProcessParams, UploadUploadFromURLParams } from "./upload.mjs";
|
|
5
|
+
import { Upload, UploadCompleteUploadParams, UploadCompleteUploadResponse, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileAndProcessResponse, UploadUploadFileParams, UploadUploadFileResponse, UploadUploadFromURLAndProcessParams, UploadUploadFromURLAndProcessResponse, UploadUploadFromURLParams, UploadUploadFromURLResponse } from "./upload.mjs";
|
|
6
6
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
7
7
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
8
8
|
export declare class Materials extends APIResource {
|
|
@@ -13,35 +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
|
-
* 'id',
|
|
30
|
-
* );
|
|
28
|
+
* const material = await client.v1.materials.retrieve('id');
|
|
31
29
|
* ```
|
|
32
30
|
*/
|
|
33
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
31
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<MaterialRetrieveResponse>;
|
|
34
32
|
/**
|
|
35
|
-
* Update material
|
|
33
|
+
* Update a material
|
|
36
34
|
*
|
|
37
35
|
* @example
|
|
38
36
|
* ```ts
|
|
39
|
-
* const
|
|
40
|
-
* 'id',
|
|
41
|
-
* );
|
|
37
|
+
* const material = await client.v1.materials.update('id');
|
|
42
38
|
* ```
|
|
43
39
|
*/
|
|
44
|
-
update(id: string,
|
|
40
|
+
update(id: string, options?: RequestOptions): APIPromise<MaterialUpdateResponse>;
|
|
45
41
|
/**
|
|
46
42
|
* Get all materials for organization
|
|
47
43
|
*
|
|
@@ -66,14 +62,15 @@ export declare class Materials extends APIResource {
|
|
|
66
62
|
*
|
|
67
63
|
* @example
|
|
68
64
|
* ```ts
|
|
69
|
-
* const
|
|
70
|
-
*
|
|
65
|
+
* const response = await client.v1.materials.createAndProcess(
|
|
66
|
+
* {
|
|
71
67
|
* content: { type: 'text' },
|
|
72
68
|
* name: 'Chapter 1 - Introduction',
|
|
73
|
-
* }
|
|
69
|
+
* },
|
|
70
|
+
* );
|
|
74
71
|
* ```
|
|
75
72
|
*/
|
|
76
|
-
createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<
|
|
73
|
+
createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<MaterialCreateAndProcessResponse>;
|
|
77
74
|
/**
|
|
78
75
|
* Create batch upload URLs for multiple materials
|
|
79
76
|
*
|
|
@@ -98,22 +95,21 @@ export declare class Materials extends APIResource {
|
|
|
98
95
|
*
|
|
99
96
|
* @example
|
|
100
97
|
* ```ts
|
|
101
|
-
* const
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* });
|
|
98
|
+
* const response = await client.v1.materials.generate({
|
|
99
|
+
* name: 'Photosynthesis Study Plan',
|
|
100
|
+
* topic: 'Photosynthesis in plants',
|
|
101
|
+
* type: 'notes',
|
|
102
|
+
* });
|
|
107
103
|
* ```
|
|
108
104
|
*/
|
|
109
|
-
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<
|
|
105
|
+
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<MaterialGenerateResponse>;
|
|
110
106
|
/**
|
|
111
107
|
* Uses AI to generate study materials like outlines, notes, summaries, etc. from a
|
|
112
108
|
* given topic and waits for processing to complete
|
|
113
109
|
*
|
|
114
110
|
* @example
|
|
115
111
|
* ```ts
|
|
116
|
-
* const
|
|
112
|
+
* const response =
|
|
117
113
|
* await client.v1.materials.generateAndProcess({
|
|
118
114
|
* name: 'Photosynthesis Study Plan',
|
|
119
115
|
* topic: 'Photosynthesis in plants',
|
|
@@ -121,7 +117,7 @@ export declare class Materials extends APIResource {
|
|
|
121
117
|
* });
|
|
122
118
|
* ```
|
|
123
119
|
*/
|
|
124
|
-
generateAndProcess(body: MaterialGenerateAndProcessParams, options?: RequestOptions): APIPromise<
|
|
120
|
+
generateAndProcess(body: MaterialGenerateAndProcessParams, options?: RequestOptions): APIPromise<MaterialGenerateAndProcessResponse>;
|
|
125
121
|
/**
|
|
126
122
|
* Get debug information for a material including extracted content
|
|
127
123
|
*
|
|
@@ -132,83 +128,666 @@ export declare class Materials extends APIResource {
|
|
|
132
128
|
* );
|
|
133
129
|
* ```
|
|
134
130
|
*/
|
|
135
|
-
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 {
|
|
136
742
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* ```ts
|
|
141
|
-
* const response = await client.v1.materials.getDownloadURL(
|
|
142
|
-
* 'id',
|
|
143
|
-
* );
|
|
144
|
-
* ```
|
|
743
|
+
* Content details
|
|
145
744
|
*/
|
|
146
|
-
|
|
745
|
+
content: unknown;
|
|
147
746
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* @example
|
|
151
|
-
* ```ts
|
|
152
|
-
* const materialResponse = await client.v1.materials.move(
|
|
153
|
-
* 'id',
|
|
154
|
-
* { folderId: 'folderId' },
|
|
155
|
-
* );
|
|
156
|
-
* ```
|
|
747
|
+
* Content type
|
|
157
748
|
*/
|
|
158
|
-
|
|
749
|
+
contentType: string;
|
|
159
750
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* @example
|
|
163
|
-
* ```ts
|
|
164
|
-
* const materialResponse = await client.v1.materials.rename(
|
|
165
|
-
* 'id',
|
|
166
|
-
* { name: 'New Material Name' },
|
|
167
|
-
* );
|
|
168
|
-
* ```
|
|
751
|
+
* Processed images
|
|
169
752
|
*/
|
|
170
|
-
|
|
753
|
+
images: Array<MaterialGetDebugInfoResponse.Image>;
|
|
171
754
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* @example
|
|
175
|
-
* ```ts
|
|
176
|
-
* const materialResponse =
|
|
177
|
-
* await client.v1.materials.reprocess('id');
|
|
178
|
-
* ```
|
|
755
|
+
* Material ID
|
|
179
756
|
*/
|
|
180
|
-
|
|
757
|
+
materialId: string;
|
|
181
758
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
* ```ts
|
|
186
|
-
* const response = await client.v1.materials.search({
|
|
187
|
-
* query: 'What is photosynthesis?',
|
|
188
|
-
* });
|
|
189
|
-
* ```
|
|
759
|
+
* Material metadata
|
|
190
760
|
*/
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
export interface Content {
|
|
761
|
+
metadata: unknown;
|
|
194
762
|
/**
|
|
195
|
-
*
|
|
763
|
+
* Material name
|
|
196
764
|
*/
|
|
197
|
-
|
|
765
|
+
name: string;
|
|
198
766
|
/**
|
|
199
|
-
*
|
|
767
|
+
* Processing status
|
|
200
768
|
*/
|
|
201
|
-
|
|
769
|
+
status: string;
|
|
202
770
|
/**
|
|
203
|
-
*
|
|
771
|
+
* Transcript structure for videos
|
|
204
772
|
*/
|
|
205
|
-
|
|
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 {
|
|
206
785
|
/**
|
|
207
|
-
*
|
|
786
|
+
* Temporary download URL
|
|
208
787
|
*/
|
|
209
|
-
|
|
788
|
+
downloadUrl: string;
|
|
210
789
|
}
|
|
211
|
-
export interface
|
|
790
|
+
export interface MaterialMoveResponse {
|
|
212
791
|
/**
|
|
213
792
|
* Material ID
|
|
214
793
|
*/
|
|
@@ -216,7 +795,7 @@ export interface GeneratedMaterialResponse {
|
|
|
216
795
|
/**
|
|
217
796
|
* Material content
|
|
218
797
|
*/
|
|
219
|
-
content:
|
|
798
|
+
content: MaterialMoveResponse.Content;
|
|
220
799
|
/**
|
|
221
800
|
* Content type
|
|
222
801
|
*/
|
|
@@ -245,20 +824,20 @@ export interface GeneratedMaterialResponse {
|
|
|
245
824
|
* Last update timestamp
|
|
246
825
|
*/
|
|
247
826
|
updatedAt: string;
|
|
248
|
-
/**
|
|
249
|
-
* Generation metadata
|
|
250
|
-
*/
|
|
251
|
-
generationMetadata?: unknown;
|
|
252
827
|
/**
|
|
253
828
|
* Material metadata
|
|
254
829
|
*/
|
|
255
830
|
metadata?: unknown;
|
|
831
|
+
/**
|
|
832
|
+
* References that this material cites
|
|
833
|
+
*/
|
|
834
|
+
references?: Array<MaterialMoveResponse.Reference>;
|
|
256
835
|
/**
|
|
257
836
|
* Usage information
|
|
258
837
|
*/
|
|
259
838
|
usage?: unknown;
|
|
260
839
|
}
|
|
261
|
-
export declare namespace
|
|
840
|
+
export declare namespace MaterialMoveResponse {
|
|
262
841
|
/**
|
|
263
842
|
* Material content
|
|
264
843
|
*/
|
|
@@ -271,8 +850,18 @@ export declare namespace GeneratedMaterialResponse {
|
|
|
271
850
|
text?: string;
|
|
272
851
|
url?: string;
|
|
273
852
|
}
|
|
853
|
+
interface Reference {
|
|
854
|
+
/**
|
|
855
|
+
* Reference title
|
|
856
|
+
*/
|
|
857
|
+
title: string;
|
|
858
|
+
/**
|
|
859
|
+
* Reference URL
|
|
860
|
+
*/
|
|
861
|
+
url?: string;
|
|
862
|
+
}
|
|
274
863
|
}
|
|
275
|
-
export interface
|
|
864
|
+
export interface MaterialRenameResponse {
|
|
276
865
|
/**
|
|
277
866
|
* Material ID
|
|
278
867
|
*/
|
|
@@ -280,7 +869,7 @@ export interface MaterialResponse {
|
|
|
280
869
|
/**
|
|
281
870
|
* Material content
|
|
282
871
|
*/
|
|
283
|
-
content:
|
|
872
|
+
content: MaterialRenameResponse.Content;
|
|
284
873
|
/**
|
|
285
874
|
* Content type
|
|
286
875
|
*/
|
|
@@ -313,12 +902,16 @@ export interface MaterialResponse {
|
|
|
313
902
|
* Material metadata
|
|
314
903
|
*/
|
|
315
904
|
metadata?: unknown;
|
|
905
|
+
/**
|
|
906
|
+
* References that this material cites
|
|
907
|
+
*/
|
|
908
|
+
references?: Array<MaterialRenameResponse.Reference>;
|
|
316
909
|
/**
|
|
317
910
|
* Usage information
|
|
318
911
|
*/
|
|
319
912
|
usage?: unknown;
|
|
320
913
|
}
|
|
321
|
-
export declare namespace
|
|
914
|
+
export declare namespace MaterialRenameResponse {
|
|
322
915
|
/**
|
|
323
916
|
* Material content
|
|
324
917
|
*/
|
|
@@ -331,82 +924,90 @@ export declare namespace MaterialResponse {
|
|
|
331
924
|
text?: string;
|
|
332
925
|
url?: string;
|
|
333
926
|
}
|
|
334
|
-
|
|
335
|
-
export interface MaterialListResponse {
|
|
336
|
-
materials?: Array<MaterialResponse>;
|
|
337
|
-
page?: number;
|
|
338
|
-
totalCount?: number;
|
|
339
|
-
totalPages?: number;
|
|
340
|
-
}
|
|
341
|
-
export type MaterialCreateBatchUploadURLsResponse = Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
342
|
-
export declare namespace MaterialCreateBatchUploadURLsResponse {
|
|
343
|
-
interface MaterialCreateBatchUploadURLsResponseItem {
|
|
927
|
+
interface Reference {
|
|
344
928
|
/**
|
|
345
|
-
*
|
|
346
|
-
*/
|
|
347
|
-
materialId: string;
|
|
348
|
-
/**
|
|
349
|
-
* Material name
|
|
350
|
-
*/
|
|
351
|
-
name: string;
|
|
352
|
-
/**
|
|
353
|
-
* S3 key
|
|
929
|
+
* Reference title
|
|
354
930
|
*/
|
|
355
|
-
|
|
931
|
+
title: string;
|
|
356
932
|
/**
|
|
357
|
-
*
|
|
933
|
+
* Reference URL
|
|
358
934
|
*/
|
|
359
|
-
|
|
935
|
+
url?: string;
|
|
360
936
|
}
|
|
361
937
|
}
|
|
362
|
-
export interface
|
|
938
|
+
export interface MaterialReprocessResponse {
|
|
363
939
|
/**
|
|
364
|
-
*
|
|
940
|
+
* Material ID
|
|
365
941
|
*/
|
|
366
|
-
|
|
942
|
+
_id: string;
|
|
367
943
|
/**
|
|
368
|
-
*
|
|
944
|
+
* Material content
|
|
369
945
|
*/
|
|
370
|
-
|
|
946
|
+
content: MaterialReprocessResponse.Content;
|
|
371
947
|
/**
|
|
372
|
-
*
|
|
948
|
+
* Content type
|
|
373
949
|
*/
|
|
374
|
-
|
|
950
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
375
951
|
/**
|
|
376
|
-
*
|
|
952
|
+
* Creation timestamp
|
|
377
953
|
*/
|
|
378
|
-
|
|
954
|
+
createdAt: string;
|
|
379
955
|
/**
|
|
380
|
-
*
|
|
956
|
+
* Folder ID
|
|
381
957
|
*/
|
|
382
|
-
|
|
958
|
+
folderId: string | null;
|
|
383
959
|
/**
|
|
384
960
|
* Material name
|
|
385
961
|
*/
|
|
386
962
|
name: string;
|
|
387
963
|
/**
|
|
388
|
-
*
|
|
964
|
+
* Organization ID
|
|
389
965
|
*/
|
|
390
|
-
|
|
966
|
+
organizationId: string;
|
|
391
967
|
/**
|
|
392
|
-
*
|
|
968
|
+
* Material status
|
|
393
969
|
*/
|
|
394
|
-
|
|
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;
|
|
395
987
|
}
|
|
396
|
-
export declare namespace
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
988
|
+
export declare namespace MaterialReprocessResponse {
|
|
989
|
+
/**
|
|
990
|
+
* Material content
|
|
991
|
+
*/
|
|
992
|
+
interface Content {
|
|
993
|
+
filename?: string;
|
|
994
|
+
fileSize?: number;
|
|
995
|
+
mimeType?: string;
|
|
401
996
|
s3Key?: string;
|
|
402
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;
|
|
403
1010
|
}
|
|
404
|
-
}
|
|
405
|
-
export interface MaterialGetDownloadURLResponse {
|
|
406
|
-
/**
|
|
407
|
-
* Temporary download URL
|
|
408
|
-
*/
|
|
409
|
-
downloadUrl: string;
|
|
410
1011
|
}
|
|
411
1012
|
export interface MaterialSearchResponse {
|
|
412
1013
|
/**
|
|
@@ -471,7 +1072,7 @@ export interface MaterialCreateParams {
|
|
|
471
1072
|
/**
|
|
472
1073
|
* Content details
|
|
473
1074
|
*/
|
|
474
|
-
content: Content;
|
|
1075
|
+
content: MaterialCreateParams.Content;
|
|
475
1076
|
/**
|
|
476
1077
|
* Name of the material
|
|
477
1078
|
*/
|
|
@@ -480,16 +1081,43 @@ export interface MaterialCreateParams {
|
|
|
480
1081
|
* Folder ID to place the material in
|
|
481
1082
|
*/
|
|
482
1083
|
folderId?: string;
|
|
483
|
-
}
|
|
484
|
-
export interface MaterialUpdateParams {
|
|
485
1084
|
/**
|
|
486
|
-
*
|
|
1085
|
+
* References that this material cites
|
|
487
1086
|
*/
|
|
488
|
-
|
|
1087
|
+
references?: Array<MaterialCreateParams.Reference>;
|
|
1088
|
+
}
|
|
1089
|
+
export declare namespace MaterialCreateParams {
|
|
489
1090
|
/**
|
|
490
|
-
*
|
|
1091
|
+
* Content details
|
|
491
1092
|
*/
|
|
492
|
-
|
|
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
|
+
}
|
|
493
1121
|
}
|
|
494
1122
|
export interface MaterialListParams {
|
|
495
1123
|
/**
|
|
@@ -513,7 +1141,7 @@ export interface MaterialCreateAndProcessParams {
|
|
|
513
1141
|
/**
|
|
514
1142
|
* Content details
|
|
515
1143
|
*/
|
|
516
|
-
content: Content;
|
|
1144
|
+
content: MaterialCreateAndProcessParams.Content;
|
|
517
1145
|
/**
|
|
518
1146
|
* Name of the material
|
|
519
1147
|
*/
|
|
@@ -526,11 +1154,48 @@ export interface MaterialCreateAndProcessParams {
|
|
|
526
1154
|
* Polling interval in milliseconds (default: 2 seconds)
|
|
527
1155
|
*/
|
|
528
1156
|
pollIntervalMs?: number;
|
|
1157
|
+
/**
|
|
1158
|
+
* References that this material cites
|
|
1159
|
+
*/
|
|
1160
|
+
references?: Array<MaterialCreateAndProcessParams.Reference>;
|
|
529
1161
|
/**
|
|
530
1162
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
531
1163
|
*/
|
|
532
1164
|
timeoutMs?: number;
|
|
533
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
|
+
}
|
|
534
1199
|
export interface MaterialCreateBatchUploadURLsParams {
|
|
535
1200
|
/**
|
|
536
1201
|
* Array of materials to create
|
|
@@ -586,6 +1251,22 @@ export interface MaterialGenerateParams {
|
|
|
586
1251
|
* Target education level
|
|
587
1252
|
*/
|
|
588
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
|
+
}
|
|
589
1270
|
}
|
|
590
1271
|
export interface MaterialGenerateAndProcessParams {
|
|
591
1272
|
/**
|
|
@@ -620,11 +1301,27 @@ export interface MaterialGenerateAndProcessParams {
|
|
|
620
1301
|
* Polling interval in milliseconds (default: 2 seconds)
|
|
621
1302
|
*/
|
|
622
1303
|
pollIntervalMs?: number;
|
|
1304
|
+
/**
|
|
1305
|
+
* References that this material cites
|
|
1306
|
+
*/
|
|
1307
|
+
references?: Array<MaterialGenerateAndProcessParams.Reference>;
|
|
623
1308
|
/**
|
|
624
1309
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
625
1310
|
*/
|
|
626
1311
|
timeoutMs?: number;
|
|
627
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
|
+
}
|
|
628
1325
|
export interface MaterialGetDownloadURLParams {
|
|
629
1326
|
/**
|
|
630
1327
|
* URL expiration time in seconds (default: 3600)
|
|
@@ -662,8 +1359,8 @@ export interface MaterialSearchParams {
|
|
|
662
1359
|
topK?: number;
|
|
663
1360
|
}
|
|
664
1361
|
export declare namespace Materials {
|
|
665
|
-
export { type
|
|
666
|
-
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, };
|
|
667
1364
|
export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
|
|
668
1365
|
}
|
|
669
1366
|
//# sourceMappingURL=materials.d.mts.map
|