@studyfetch/sdk 1.35.0 → 1.37.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 +23 -0
- package/README.md +6 -6
- package/package.json +1 -1
- package/resources/v1/assignment-grader/assignment-grader.d.mts +15 -151
- package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.d.ts +15 -151
- package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.js +4 -4
- package/resources/v1/assignment-grader/assignment-grader.js.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.mjs +4 -4
- package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -1
- package/resources/v1/assignment-grader/index.d.mts +2 -2
- package/resources/v1/assignment-grader/index.d.mts.map +1 -1
- package/resources/v1/assignment-grader/index.d.ts +2 -2
- package/resources/v1/assignment-grader/index.d.ts.map +1 -1
- package/resources/v1/assignment-grader/rubric-templates.d.mts +16 -136
- package/resources/v1/assignment-grader/rubric-templates.d.mts.map +1 -1
- package/resources/v1/assignment-grader/rubric-templates.d.ts +16 -136
- package/resources/v1/assignment-grader/rubric-templates.d.ts.map +1 -1
- package/resources/v1/assignment-grader/rubric-templates.js +3 -3
- package/resources/v1/assignment-grader/rubric-templates.js.map +1 -1
- package/resources/v1/assignment-grader/rubric-templates.mjs +3 -3
- package/resources/v1/assignment-grader/rubric-templates.mjs.map +1 -1
- package/resources/v1/chat-analytics.d.mts +11 -106
- package/resources/v1/chat-analytics.d.mts.map +1 -1
- package/resources/v1/chat-analytics.d.ts +11 -106
- package/resources/v1/chat-analytics.d.ts.map +1 -1
- package/resources/v1/chat-analytics.js +4 -4
- package/resources/v1/chat-analytics.js.map +1 -1
- package/resources/v1/chat-analytics.mjs +4 -4
- package/resources/v1/chat-analytics.mjs.map +1 -1
- package/resources/v1/components.d.mts +20 -154
- package/resources/v1/components.d.mts.map +1 -1
- package/resources/v1/components.d.ts +20 -154
- package/resources/v1/components.d.ts.map +1 -1
- package/resources/v1/components.js +14 -8
- package/resources/v1/components.js.map +1 -1
- package/resources/v1/components.mjs +14 -8
- package/resources/v1/components.mjs.map +1 -1
- package/resources/v1/folders.d.mts +56 -241
- package/resources/v1/folders.d.mts.map +1 -1
- package/resources/v1/folders.d.ts +56 -241
- package/resources/v1/folders.d.ts.map +1 -1
- package/resources/v1/folders.js +2 -2
- package/resources/v1/folders.js.map +1 -1
- package/resources/v1/folders.mjs +2 -2
- package/resources/v1/folders.mjs.map +1 -1
- package/resources/v1/index.d.mts +5 -5
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +5 -5
- 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 -3
- package/resources/v1/materials/index.d.mts.map +1 -1
- package/resources/v1/materials/index.d.ts +2 -3
- package/resources/v1/materials/index.d.ts.map +1 -1
- package/resources/v1/materials/index.js +1 -3
- package/resources/v1/materials/index.js.map +1 -1
- package/resources/v1/materials/index.mjs +0 -1
- package/resources/v1/materials/index.mjs.map +1 -1
- package/resources/v1/materials/materials.d.mts +74 -510
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +74 -510
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +24 -23
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +24 -23
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +12 -311
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +12 -311
- 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 +10 -10
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +10 -10
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/assignment-grader/assignment-grader.ts +20 -188
- package/src/resources/v1/assignment-grader/index.ts +3 -3
- package/src/resources/v1/assignment-grader/rubric-templates.ts +17 -165
- package/src/resources/v1/chat-analytics.ts +11 -128
- package/src/resources/v1/components.ts +20 -223
- package/src/resources/v1/folders.ts +71 -288
- package/src/resources/v1/index.ts +8 -14
- package/src/resources/v1/materials/index.ts +3 -20
- package/src/resources/v1/materials/materials.ts +201 -795
- package/src/resources/v1/materials/upload.ts +14 -405
- package/src/resources/v1/v1.ts +16 -28
- 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
- package/resources/v1/materials/test.d.mts +0 -136
- package/resources/v1/materials/test.d.mts.map +0 -1
- package/resources/v1/materials/test.d.ts +0 -136
- package/resources/v1/materials/test.d.ts.map +0 -1
- package/resources/v1/materials/test.js +0 -56
- package/resources/v1/materials/test.js.map +0 -1
- package/resources/v1/materials/test.mjs +0 -52
- package/resources/v1/materials/test.mjs.map +0 -1
- package/src/resources/v1/materials/test.ts +0 -175
|
@@ -3,29 +3,16 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as BulkAPI from './bulk';
|
|
5
5
|
import { Bulk, BulkMoveParams, BulkMoveResponse } from './bulk';
|
|
6
|
-
import * as TestAPI from './test';
|
|
7
|
-
import {
|
|
8
|
-
Test,
|
|
9
|
-
TestTestEpubProcessingResponse,
|
|
10
|
-
TestTestImageProcessingResponse,
|
|
11
|
-
TestTestOcrResponse,
|
|
12
|
-
TestTestVideoProcessingResponse,
|
|
13
|
-
} from './test';
|
|
14
6
|
import * as UploadAPI from './upload';
|
|
15
7
|
import {
|
|
16
8
|
Upload,
|
|
17
9
|
UploadCompleteUploadParams,
|
|
18
|
-
UploadCompleteUploadResponse,
|
|
19
10
|
UploadGetPresignedURLParams,
|
|
20
11
|
UploadGetPresignedURLResponse,
|
|
21
12
|
UploadUploadFileAndProcessParams,
|
|
22
|
-
UploadUploadFileAndProcessResponse,
|
|
23
13
|
UploadUploadFileParams,
|
|
24
|
-
UploadUploadFileResponse,
|
|
25
14
|
UploadUploadFromURLAndProcessParams,
|
|
26
|
-
UploadUploadFromURLAndProcessResponse,
|
|
27
15
|
UploadUploadFromURLParams,
|
|
28
|
-
UploadUploadFromURLResponse,
|
|
29
16
|
} from './upload';
|
|
30
17
|
import { APIPromise } from '../../../core/api-promise';
|
|
31
18
|
import { buildHeaders } from '../../../internal/headers';
|
|
@@ -35,20 +22,19 @@ import { path } from '../../../internal/utils/path';
|
|
|
35
22
|
export class Materials extends APIResource {
|
|
36
23
|
upload: UploadAPI.Upload = new UploadAPI.Upload(this._client);
|
|
37
24
|
bulk: BulkAPI.Bulk = new BulkAPI.Bulk(this._client);
|
|
38
|
-
test: TestAPI.Test = new TestAPI.Test(this._client);
|
|
39
25
|
|
|
40
26
|
/**
|
|
41
27
|
* Create a new material
|
|
42
28
|
*
|
|
43
29
|
* @example
|
|
44
30
|
* ```ts
|
|
45
|
-
* const
|
|
31
|
+
* const materialResponse = await client.v1.materials.create({
|
|
46
32
|
* content: { type: 'text' },
|
|
47
33
|
* name: 'Chapter 1 - Introduction',
|
|
48
34
|
* });
|
|
49
35
|
* ```
|
|
50
36
|
*/
|
|
51
|
-
create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<
|
|
37
|
+
create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
52
38
|
return this._client.post('/api/v1/materials', { body, ...options });
|
|
53
39
|
}
|
|
54
40
|
|
|
@@ -57,10 +43,12 @@ export class Materials extends APIResource {
|
|
|
57
43
|
*
|
|
58
44
|
* @example
|
|
59
45
|
* ```ts
|
|
60
|
-
* const
|
|
46
|
+
* const materialResponse = await client.v1.materials.retrieve(
|
|
47
|
+
* 'id',
|
|
48
|
+
* );
|
|
61
49
|
* ```
|
|
62
50
|
*/
|
|
63
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
51
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
64
52
|
return this._client.get(path`/api/v1/materials/${id}`, options);
|
|
65
53
|
}
|
|
66
54
|
|
|
@@ -100,18 +88,17 @@ export class Materials extends APIResource {
|
|
|
100
88
|
*
|
|
101
89
|
* @example
|
|
102
90
|
* ```ts
|
|
103
|
-
* const
|
|
104
|
-
* {
|
|
91
|
+
* const materialResponse =
|
|
92
|
+
* await client.v1.materials.createAndProcess({
|
|
105
93
|
* content: { type: 'text' },
|
|
106
94
|
* name: 'Chapter 1 - Introduction',
|
|
107
|
-
* }
|
|
108
|
-
* );
|
|
95
|
+
* });
|
|
109
96
|
* ```
|
|
110
97
|
*/
|
|
111
98
|
createAndProcess(
|
|
112
99
|
body: MaterialCreateAndProcessParams,
|
|
113
100
|
options?: RequestOptions,
|
|
114
|
-
): APIPromise<
|
|
101
|
+
): APIPromise<MaterialResponse> {
|
|
115
102
|
return this._client.post('/api/v1/materials/upload-and-process', { body, ...options });
|
|
116
103
|
}
|
|
117
104
|
|
|
@@ -145,14 +132,15 @@ export class Materials extends APIResource {
|
|
|
145
132
|
*
|
|
146
133
|
* @example
|
|
147
134
|
* ```ts
|
|
148
|
-
* const
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
135
|
+
* const generatedMaterialResponse =
|
|
136
|
+
* await client.v1.materials.generate({
|
|
137
|
+
* name: 'Photosynthesis Study Plan',
|
|
138
|
+
* topic: 'Photosynthesis in plants',
|
|
139
|
+
* type: 'notes',
|
|
140
|
+
* });
|
|
153
141
|
* ```
|
|
154
142
|
*/
|
|
155
|
-
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<
|
|
143
|
+
generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<GeneratedMaterialResponse> {
|
|
156
144
|
return this._client.post('/api/v1/materials/generate', { body, ...options });
|
|
157
145
|
}
|
|
158
146
|
|
|
@@ -162,685 +150,134 @@ export class Materials extends APIResource {
|
|
|
162
150
|
*
|
|
163
151
|
* @example
|
|
164
152
|
* ```ts
|
|
165
|
-
* const
|
|
153
|
+
* const generatedMaterialResponse =
|
|
166
154
|
* await client.v1.materials.generateAndProcess({
|
|
167
155
|
* name: 'Photosynthesis Study Plan',
|
|
168
156
|
* topic: 'Photosynthesis in plants',
|
|
169
157
|
* type: 'notes',
|
|
170
|
-
* });
|
|
171
|
-
* ```
|
|
172
|
-
*/
|
|
173
|
-
generateAndProcess(
|
|
174
|
-
body: MaterialGenerateAndProcessParams,
|
|
175
|
-
options?: RequestOptions,
|
|
176
|
-
): APIPromise<
|
|
177
|
-
return this._client.post('/api/v1/materials/generate-and-process', { body, ...options });
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Get debug information for a material including extracted content
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```ts
|
|
185
|
-
* const response = await client.v1.materials.getDebugInfo(
|
|
186
|
-
* 'id',
|
|
187
|
-
* );
|
|
188
|
-
* ```
|
|
189
|
-
*/
|
|
190
|
-
getDebugInfo(id: string, options?: RequestOptions): APIPromise<MaterialGetDebugInfoResponse> {
|
|
191
|
-
return this._client.get(path`/api/v1/materials/${id}/debug`, options);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Get temporary download URL for material
|
|
196
|
-
*
|
|
197
|
-
* @example
|
|
198
|
-
* ```ts
|
|
199
|
-
* const response = await client.v1.materials.getDownloadURL(
|
|
200
|
-
* 'id',
|
|
201
|
-
* );
|
|
202
|
-
* ```
|
|
203
|
-
*/
|
|
204
|
-
getDownloadURL(
|
|
205
|
-
id: string,
|
|
206
|
-
query: MaterialGetDownloadURLParams | null | undefined = {},
|
|
207
|
-
options?: RequestOptions,
|
|
208
|
-
): APIPromise<MaterialGetDownloadURLResponse> {
|
|
209
|
-
return this._client.get(path`/api/v1/materials/${id}/download-url`, { query, ...options });
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Move material to a different folder
|
|
214
|
-
*
|
|
215
|
-
* @example
|
|
216
|
-
* ```ts
|
|
217
|
-
* const response = await client.v1.materials.move('id', {
|
|
218
|
-
* folderId: 'folderId',
|
|
219
|
-
* });
|
|
220
|
-
* ```
|
|
221
|
-
*/
|
|
222
|
-
move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialMoveResponse> {
|
|
223
|
-
return this._client.post(path`/api/v1/materials/${id}/move`, { body, ...options });
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Rename a material
|
|
228
|
-
*
|
|
229
|
-
* @example
|
|
230
|
-
* ```ts
|
|
231
|
-
* const response = await client.v1.materials.rename('id', {
|
|
232
|
-
* name: 'New Material Name',
|
|
233
|
-
* });
|
|
234
|
-
* ```
|
|
235
|
-
*/
|
|
236
|
-
rename(
|
|
237
|
-
id: string,
|
|
238
|
-
body: MaterialRenameParams,
|
|
239
|
-
options?: RequestOptions,
|
|
240
|
-
): APIPromise<MaterialRenameResponse> {
|
|
241
|
-
return this._client.post(path`/api/v1/materials/${id}/rename`, { body, ...options });
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Reprocess material to regenerate embeddings and extract content
|
|
246
|
-
*
|
|
247
|
-
* @example
|
|
248
|
-
* ```ts
|
|
249
|
-
* const response = await client.v1.materials.reprocess('id');
|
|
250
|
-
* ```
|
|
251
|
-
*/
|
|
252
|
-
reprocess(id: string, options?: RequestOptions): APIPromise<MaterialReprocessResponse> {
|
|
253
|
-
return this._client.post(path`/api/v1/materials/${id}/reprocess`, options);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Search materials using RAG (Retrieval-Augmented Generation)
|
|
258
|
-
*
|
|
259
|
-
* @example
|
|
260
|
-
* ```ts
|
|
261
|
-
* const response = await client.v1.materials.search({
|
|
262
|
-
* query: 'What is photosynthesis?',
|
|
263
|
-
* });
|
|
264
|
-
* ```
|
|
265
|
-
*/
|
|
266
|
-
search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse> {
|
|
267
|
-
return this._client.post('/api/v1/materials/search', { body, ...options });
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export interface MaterialCreateResponse {
|
|
272
|
-
/**
|
|
273
|
-
* Material ID
|
|
274
|
-
*/
|
|
275
|
-
_id: string;
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Material content
|
|
279
|
-
*/
|
|
280
|
-
content: MaterialCreateResponse.Content;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Content type
|
|
284
|
-
*/
|
|
285
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Creation timestamp
|
|
289
|
-
*/
|
|
290
|
-
createdAt: string;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Folder ID
|
|
294
|
-
*/
|
|
295
|
-
folderId: string | null;
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Material name
|
|
299
|
-
*/
|
|
300
|
-
name: string;
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Organization ID
|
|
304
|
-
*/
|
|
305
|
-
organizationId: string;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Material status
|
|
309
|
-
*/
|
|
310
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Last update timestamp
|
|
314
|
-
*/
|
|
315
|
-
updatedAt: string;
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Material metadata
|
|
319
|
-
*/
|
|
320
|
-
metadata?: unknown;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Usage information
|
|
324
|
-
*/
|
|
325
|
-
usage?: unknown;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
export namespace MaterialCreateResponse {
|
|
329
|
-
/**
|
|
330
|
-
* Material content
|
|
331
|
-
*/
|
|
332
|
-
export interface Content {
|
|
333
|
-
filename?: string;
|
|
334
|
-
|
|
335
|
-
fileSize?: number;
|
|
336
|
-
|
|
337
|
-
mimeType?: string;
|
|
338
|
-
|
|
339
|
-
s3Key?: string;
|
|
340
|
-
|
|
341
|
-
s3Url?: string;
|
|
342
|
-
|
|
343
|
-
text?: string;
|
|
344
|
-
|
|
345
|
-
url?: string;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export interface MaterialRetrieveResponse {
|
|
350
|
-
/**
|
|
351
|
-
* Material ID
|
|
352
|
-
*/
|
|
353
|
-
_id: string;
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Material content
|
|
357
|
-
*/
|
|
358
|
-
content: MaterialRetrieveResponse.Content;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Content type
|
|
362
|
-
*/
|
|
363
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Creation timestamp
|
|
367
|
-
*/
|
|
368
|
-
createdAt: string;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Folder ID
|
|
372
|
-
*/
|
|
373
|
-
folderId: string | null;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Material name
|
|
377
|
-
*/
|
|
378
|
-
name: string;
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Organization ID
|
|
382
|
-
*/
|
|
383
|
-
organizationId: string;
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Material status
|
|
387
|
-
*/
|
|
388
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Last update timestamp
|
|
392
|
-
*/
|
|
393
|
-
updatedAt: string;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Material metadata
|
|
397
|
-
*/
|
|
398
|
-
metadata?: unknown;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Usage information
|
|
402
|
-
*/
|
|
403
|
-
usage?: unknown;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
export namespace MaterialRetrieveResponse {
|
|
407
|
-
/**
|
|
408
|
-
* Material content
|
|
409
|
-
*/
|
|
410
|
-
export interface Content {
|
|
411
|
-
filename?: string;
|
|
412
|
-
|
|
413
|
-
fileSize?: number;
|
|
414
|
-
|
|
415
|
-
mimeType?: string;
|
|
416
|
-
|
|
417
|
-
s3Key?: string;
|
|
418
|
-
|
|
419
|
-
s3Url?: string;
|
|
420
|
-
|
|
421
|
-
text?: string;
|
|
422
|
-
|
|
423
|
-
url?: string;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
export type MaterialListResponse = Array<MaterialListResponse.MaterialListResponseItem>;
|
|
428
|
-
|
|
429
|
-
export namespace MaterialListResponse {
|
|
430
|
-
export interface MaterialListResponseItem {
|
|
431
|
-
/**
|
|
432
|
-
* Material ID
|
|
433
|
-
*/
|
|
434
|
-
_id: string;
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Material content
|
|
438
|
-
*/
|
|
439
|
-
content: MaterialListResponseItem.Content;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Content type
|
|
443
|
-
*/
|
|
444
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* Creation timestamp
|
|
448
|
-
*/
|
|
449
|
-
createdAt: string;
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* Folder ID
|
|
453
|
-
*/
|
|
454
|
-
folderId: string | null;
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* Material name
|
|
458
|
-
*/
|
|
459
|
-
name: string;
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Organization ID
|
|
463
|
-
*/
|
|
464
|
-
organizationId: string;
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* Material status
|
|
468
|
-
*/
|
|
469
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Last update timestamp
|
|
473
|
-
*/
|
|
474
|
-
updatedAt: string;
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* Material metadata
|
|
478
|
-
*/
|
|
479
|
-
metadata?: unknown;
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Usage information
|
|
483
|
-
*/
|
|
484
|
-
usage?: unknown;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
export namespace MaterialListResponseItem {
|
|
488
|
-
/**
|
|
489
|
-
* Material content
|
|
490
|
-
*/
|
|
491
|
-
export interface Content {
|
|
492
|
-
filename?: string;
|
|
493
|
-
|
|
494
|
-
fileSize?: number;
|
|
495
|
-
|
|
496
|
-
mimeType?: string;
|
|
497
|
-
|
|
498
|
-
s3Key?: string;
|
|
499
|
-
|
|
500
|
-
s3Url?: string;
|
|
501
|
-
|
|
502
|
-
text?: string;
|
|
503
|
-
|
|
504
|
-
url?: string;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
export interface MaterialCreateAndProcessResponse {
|
|
510
|
-
/**
|
|
511
|
-
* Material ID
|
|
512
|
-
*/
|
|
513
|
-
_id: string;
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* Material content
|
|
517
|
-
*/
|
|
518
|
-
content: MaterialCreateAndProcessResponse.Content;
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* Content type
|
|
522
|
-
*/
|
|
523
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
* Creation timestamp
|
|
527
|
-
*/
|
|
528
|
-
createdAt: string;
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* Folder ID
|
|
532
|
-
*/
|
|
533
|
-
folderId: string | null;
|
|
534
|
-
|
|
535
|
-
/**
|
|
536
|
-
* Material name
|
|
537
|
-
*/
|
|
538
|
-
name: string;
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Organization ID
|
|
542
|
-
*/
|
|
543
|
-
organizationId: string;
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* Material status
|
|
547
|
-
*/
|
|
548
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* Last update timestamp
|
|
552
|
-
*/
|
|
553
|
-
updatedAt: string;
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* Material metadata
|
|
557
|
-
*/
|
|
558
|
-
metadata?: unknown;
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Usage information
|
|
562
|
-
*/
|
|
563
|
-
usage?: unknown;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
export namespace MaterialCreateAndProcessResponse {
|
|
567
|
-
/**
|
|
568
|
-
* Material content
|
|
569
|
-
*/
|
|
570
|
-
export interface Content {
|
|
571
|
-
filename?: string;
|
|
572
|
-
|
|
573
|
-
fileSize?: number;
|
|
574
|
-
|
|
575
|
-
mimeType?: string;
|
|
576
|
-
|
|
577
|
-
s3Key?: string;
|
|
578
|
-
|
|
579
|
-
s3Url?: string;
|
|
580
|
-
|
|
581
|
-
text?: string;
|
|
582
|
-
|
|
583
|
-
url?: string;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
export type MaterialCreateBatchUploadURLsResponse =
|
|
588
|
-
Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
589
|
-
|
|
590
|
-
export namespace MaterialCreateBatchUploadURLsResponse {
|
|
591
|
-
export interface MaterialCreateBatchUploadURLsResponseItem {
|
|
592
|
-
/**
|
|
593
|
-
* Material ID
|
|
594
|
-
*/
|
|
595
|
-
materialId: string;
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Material name
|
|
599
|
-
*/
|
|
600
|
-
name: string;
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* S3 key
|
|
604
|
-
*/
|
|
605
|
-
s3Key: string;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Presigned upload URL
|
|
609
|
-
*/
|
|
610
|
-
uploadUrl: string;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
export interface MaterialGenerateResponse {
|
|
615
|
-
/**
|
|
616
|
-
* Material ID
|
|
617
|
-
*/
|
|
618
|
-
_id: string;
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* Material content
|
|
622
|
-
*/
|
|
623
|
-
content: MaterialGenerateResponse.Content;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Content type
|
|
627
|
-
*/
|
|
628
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Creation timestamp
|
|
632
|
-
*/
|
|
633
|
-
createdAt: string;
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* Folder ID
|
|
637
|
-
*/
|
|
638
|
-
folderId: string | null;
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
* Material name
|
|
642
|
-
*/
|
|
643
|
-
name: string;
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* Organization ID
|
|
647
|
-
*/
|
|
648
|
-
organizationId: string;
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* Material status
|
|
652
|
-
*/
|
|
653
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
654
|
-
|
|
655
|
-
/**
|
|
656
|
-
* Last update timestamp
|
|
657
|
-
*/
|
|
658
|
-
updatedAt: string;
|
|
659
|
-
|
|
660
|
-
/**
|
|
661
|
-
* Generation metadata
|
|
662
|
-
*/
|
|
663
|
-
generationMetadata?: unknown;
|
|
664
|
-
|
|
665
|
-
/**
|
|
666
|
-
* Material metadata
|
|
667
|
-
*/
|
|
668
|
-
metadata?: unknown;
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* Usage information
|
|
672
|
-
*/
|
|
673
|
-
usage?: unknown;
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
export namespace MaterialGenerateResponse {
|
|
677
|
-
/**
|
|
678
|
-
* Material content
|
|
679
|
-
*/
|
|
680
|
-
export interface Content {
|
|
681
|
-
filename?: string;
|
|
682
|
-
|
|
683
|
-
fileSize?: number;
|
|
684
|
-
|
|
685
|
-
mimeType?: string;
|
|
686
|
-
|
|
687
|
-
s3Key?: string;
|
|
688
|
-
|
|
689
|
-
s3Url?: string;
|
|
690
|
-
|
|
691
|
-
text?: string;
|
|
692
|
-
|
|
693
|
-
url?: string;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
export interface MaterialGenerateAndProcessResponse {
|
|
698
|
-
/**
|
|
699
|
-
* Material ID
|
|
700
|
-
*/
|
|
701
|
-
_id: string;
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* Material content
|
|
705
|
-
*/
|
|
706
|
-
content: MaterialGenerateAndProcessResponse.Content;
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Content type
|
|
710
|
-
*/
|
|
711
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* Creation timestamp
|
|
715
|
-
*/
|
|
716
|
-
createdAt: string;
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* Folder ID
|
|
720
|
-
*/
|
|
721
|
-
folderId: string | null;
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* Material name
|
|
725
|
-
*/
|
|
726
|
-
name: string;
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Organization ID
|
|
730
|
-
*/
|
|
731
|
-
organizationId: string;
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* Material status
|
|
735
|
-
*/
|
|
736
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* Last update timestamp
|
|
740
|
-
*/
|
|
741
|
-
updatedAt: string;
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* Generation metadata
|
|
745
|
-
*/
|
|
746
|
-
generationMetadata?: unknown;
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* Material metadata
|
|
750
|
-
*/
|
|
751
|
-
metadata?: unknown;
|
|
752
|
-
|
|
753
|
-
/**
|
|
754
|
-
* Usage information
|
|
755
|
-
*/
|
|
756
|
-
usage?: unknown;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
export namespace MaterialGenerateAndProcessResponse {
|
|
760
|
-
/**
|
|
761
|
-
* Material content
|
|
762
|
-
*/
|
|
763
|
-
export interface Content {
|
|
764
|
-
filename?: string;
|
|
765
|
-
|
|
766
|
-
fileSize?: number;
|
|
767
|
-
|
|
768
|
-
mimeType?: string;
|
|
769
|
-
|
|
770
|
-
s3Key?: string;
|
|
771
|
-
|
|
772
|
-
s3Url?: string;
|
|
773
|
-
|
|
774
|
-
text?: string;
|
|
775
|
-
|
|
776
|
-
url?: string;
|
|
158
|
+
* });
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
generateAndProcess(
|
|
162
|
+
body: MaterialGenerateAndProcessParams,
|
|
163
|
+
options?: RequestOptions,
|
|
164
|
+
): APIPromise<GeneratedMaterialResponse> {
|
|
165
|
+
return this._client.post('/api/v1/materials/generate-and-process', { body, ...options });
|
|
777
166
|
}
|
|
778
|
-
}
|
|
779
167
|
|
|
780
|
-
export interface MaterialGetDebugInfoResponse {
|
|
781
168
|
/**
|
|
782
|
-
*
|
|
169
|
+
* Get debug information for a material including extracted content
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```ts
|
|
173
|
+
* const response = await client.v1.materials.getDebugInfo(
|
|
174
|
+
* 'id',
|
|
175
|
+
* );
|
|
176
|
+
* ```
|
|
783
177
|
*/
|
|
784
|
-
|
|
178
|
+
getDebugInfo(id: string, options?: RequestOptions): APIPromise<MaterialGetDebugInfoResponse> {
|
|
179
|
+
return this._client.get(path`/api/v1/materials/${id}/debug`, options);
|
|
180
|
+
}
|
|
785
181
|
|
|
786
182
|
/**
|
|
787
|
-
*
|
|
183
|
+
* Get temporary download URL for material
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* const response = await client.v1.materials.getDownloadURL(
|
|
188
|
+
* 'id',
|
|
189
|
+
* );
|
|
190
|
+
* ```
|
|
788
191
|
*/
|
|
789
|
-
|
|
192
|
+
getDownloadURL(
|
|
193
|
+
id: string,
|
|
194
|
+
query: MaterialGetDownloadURLParams | null | undefined = {},
|
|
195
|
+
options?: RequestOptions,
|
|
196
|
+
): APIPromise<MaterialGetDownloadURLResponse> {
|
|
197
|
+
return this._client.get(path`/api/v1/materials/${id}/download-url`, { query, ...options });
|
|
198
|
+
}
|
|
790
199
|
|
|
791
200
|
/**
|
|
792
|
-
*
|
|
201
|
+
* Move material to a different folder
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```ts
|
|
205
|
+
* const materialResponse = await client.v1.materials.move(
|
|
206
|
+
* 'id',
|
|
207
|
+
* { folderId: 'folderId' },
|
|
208
|
+
* );
|
|
209
|
+
* ```
|
|
793
210
|
*/
|
|
794
|
-
|
|
211
|
+
move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
212
|
+
return this._client.post(path`/api/v1/materials/${id}/move`, { body, ...options });
|
|
213
|
+
}
|
|
795
214
|
|
|
796
215
|
/**
|
|
797
|
-
*
|
|
216
|
+
* Rename a material
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```ts
|
|
220
|
+
* const materialResponse = await client.v1.materials.rename(
|
|
221
|
+
* 'id',
|
|
222
|
+
* { name: 'New Material Name' },
|
|
223
|
+
* );
|
|
224
|
+
* ```
|
|
798
225
|
*/
|
|
799
|
-
|
|
226
|
+
rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
227
|
+
return this._client.post(path`/api/v1/materials/${id}/rename`, { body, ...options });
|
|
228
|
+
}
|
|
800
229
|
|
|
801
230
|
/**
|
|
802
|
-
*
|
|
231
|
+
* Reprocess material to regenerate embeddings and extract content
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```ts
|
|
235
|
+
* const materialResponse =
|
|
236
|
+
* await client.v1.materials.reprocess('id');
|
|
237
|
+
* ```
|
|
803
238
|
*/
|
|
804
|
-
|
|
239
|
+
reprocess(id: string, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
240
|
+
return this._client.post(path`/api/v1/materials/${id}/reprocess`, options);
|
|
241
|
+
}
|
|
805
242
|
|
|
806
243
|
/**
|
|
807
|
-
*
|
|
244
|
+
* Search materials using RAG (Retrieval-Augmented Generation)
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* const response = await client.v1.materials.search({
|
|
249
|
+
* query: 'What is photosynthesis?',
|
|
250
|
+
* });
|
|
251
|
+
* ```
|
|
808
252
|
*/
|
|
809
|
-
|
|
253
|
+
search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse> {
|
|
254
|
+
return this._client.post('/api/v1/materials/search', { body, ...options });
|
|
255
|
+
}
|
|
256
|
+
}
|
|
810
257
|
|
|
258
|
+
export interface Content {
|
|
811
259
|
/**
|
|
812
|
-
*
|
|
260
|
+
* Type of content
|
|
813
261
|
*/
|
|
814
|
-
|
|
262
|
+
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
815
263
|
|
|
816
264
|
/**
|
|
817
|
-
*
|
|
265
|
+
* URL to fetch content from
|
|
818
266
|
*/
|
|
819
|
-
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
export namespace MaterialGetDebugInfoResponse {
|
|
823
|
-
export interface Image {
|
|
824
|
-
id?: string;
|
|
825
|
-
|
|
826
|
-
description?: string;
|
|
827
|
-
|
|
828
|
-
pageIndex?: number;
|
|
829
|
-
|
|
830
|
-
s3Key?: string;
|
|
267
|
+
sourceUrl?: string;
|
|
831
268
|
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
269
|
+
/**
|
|
270
|
+
* Text content (for text type)
|
|
271
|
+
*/
|
|
272
|
+
text?: string;
|
|
835
273
|
|
|
836
|
-
export interface MaterialGetDownloadURLResponse {
|
|
837
274
|
/**
|
|
838
|
-
*
|
|
275
|
+
* URL to the content (for url type)
|
|
839
276
|
*/
|
|
840
|
-
|
|
277
|
+
url?: string;
|
|
841
278
|
}
|
|
842
279
|
|
|
843
|
-
export interface
|
|
280
|
+
export interface GeneratedMaterialResponse {
|
|
844
281
|
/**
|
|
845
282
|
* Material ID
|
|
846
283
|
*/
|
|
@@ -849,7 +286,7 @@ export interface MaterialMoveResponse {
|
|
|
849
286
|
/**
|
|
850
287
|
* Material content
|
|
851
288
|
*/
|
|
852
|
-
content:
|
|
289
|
+
content: GeneratedMaterialResponse.Content;
|
|
853
290
|
|
|
854
291
|
/**
|
|
855
292
|
* Content type
|
|
@@ -886,6 +323,11 @@ export interface MaterialMoveResponse {
|
|
|
886
323
|
*/
|
|
887
324
|
updatedAt: string;
|
|
888
325
|
|
|
326
|
+
/**
|
|
327
|
+
* Generation metadata
|
|
328
|
+
*/
|
|
329
|
+
generationMetadata?: unknown;
|
|
330
|
+
|
|
889
331
|
/**
|
|
890
332
|
* Material metadata
|
|
891
333
|
*/
|
|
@@ -897,7 +339,7 @@ export interface MaterialMoveResponse {
|
|
|
897
339
|
usage?: unknown;
|
|
898
340
|
}
|
|
899
341
|
|
|
900
|
-
export namespace
|
|
342
|
+
export namespace GeneratedMaterialResponse {
|
|
901
343
|
/**
|
|
902
344
|
* Material content
|
|
903
345
|
*/
|
|
@@ -918,7 +360,7 @@ export namespace MaterialMoveResponse {
|
|
|
918
360
|
}
|
|
919
361
|
}
|
|
920
362
|
|
|
921
|
-
export interface
|
|
363
|
+
export interface MaterialResponse {
|
|
922
364
|
/**
|
|
923
365
|
* Material ID
|
|
924
366
|
*/
|
|
@@ -927,7 +369,7 @@ export interface MaterialRenameResponse {
|
|
|
927
369
|
/**
|
|
928
370
|
* Material content
|
|
929
371
|
*/
|
|
930
|
-
content:
|
|
372
|
+
content: MaterialResponse.Content;
|
|
931
373
|
|
|
932
374
|
/**
|
|
933
375
|
* Content type
|
|
@@ -975,7 +417,7 @@ export interface MaterialRenameResponse {
|
|
|
975
417
|
usage?: unknown;
|
|
976
418
|
}
|
|
977
419
|
|
|
978
|
-
export namespace
|
|
420
|
+
export namespace MaterialResponse {
|
|
979
421
|
/**
|
|
980
422
|
* Material content
|
|
981
423
|
*/
|
|
@@ -996,84 +438,106 @@ export namespace MaterialRenameResponse {
|
|
|
996
438
|
}
|
|
997
439
|
}
|
|
998
440
|
|
|
999
|
-
export interface
|
|
1000
|
-
|
|
1001
|
-
* Material ID
|
|
1002
|
-
*/
|
|
1003
|
-
_id: string;
|
|
441
|
+
export interface MaterialListResponse {
|
|
442
|
+
materials?: Array<MaterialResponse>;
|
|
1004
443
|
|
|
1005
|
-
|
|
1006
|
-
* Material content
|
|
1007
|
-
*/
|
|
1008
|
-
content: MaterialReprocessResponse.Content;
|
|
444
|
+
page?: number;
|
|
1009
445
|
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
446
|
+
totalCount?: number;
|
|
447
|
+
|
|
448
|
+
totalPages?: number;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export type MaterialCreateBatchUploadURLsResponse =
|
|
452
|
+
Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
1014
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
|
+
|
|
466
|
+
/**
|
|
467
|
+
* S3 key
|
|
468
|
+
*/
|
|
469
|
+
s3Key: string;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Presigned upload URL
|
|
473
|
+
*/
|
|
474
|
+
uploadUrl: string;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export interface MaterialGetDebugInfoResponse {
|
|
1015
479
|
/**
|
|
1016
|
-
*
|
|
480
|
+
* Content details
|
|
1017
481
|
*/
|
|
1018
|
-
|
|
482
|
+
content: unknown;
|
|
1019
483
|
|
|
1020
484
|
/**
|
|
1021
|
-
*
|
|
485
|
+
* Content type
|
|
1022
486
|
*/
|
|
1023
|
-
|
|
487
|
+
contentType: string;
|
|
1024
488
|
|
|
1025
489
|
/**
|
|
1026
|
-
*
|
|
490
|
+
* Processed images
|
|
1027
491
|
*/
|
|
1028
|
-
|
|
492
|
+
images: Array<MaterialGetDebugInfoResponse.Image>;
|
|
1029
493
|
|
|
1030
494
|
/**
|
|
1031
|
-
*
|
|
495
|
+
* Material ID
|
|
1032
496
|
*/
|
|
1033
|
-
|
|
497
|
+
materialId: string;
|
|
1034
498
|
|
|
1035
499
|
/**
|
|
1036
|
-
* Material
|
|
500
|
+
* Material metadata
|
|
1037
501
|
*/
|
|
1038
|
-
|
|
502
|
+
metadata: unknown;
|
|
1039
503
|
|
|
1040
504
|
/**
|
|
1041
|
-
*
|
|
505
|
+
* Material name
|
|
1042
506
|
*/
|
|
1043
|
-
|
|
507
|
+
name: string;
|
|
1044
508
|
|
|
1045
509
|
/**
|
|
1046
|
-
*
|
|
510
|
+
* Processing status
|
|
1047
511
|
*/
|
|
1048
|
-
|
|
512
|
+
status: string;
|
|
1049
513
|
|
|
1050
514
|
/**
|
|
1051
|
-
*
|
|
515
|
+
* Transcript structure for videos
|
|
1052
516
|
*/
|
|
1053
|
-
|
|
517
|
+
transcriptStructure: unknown | null;
|
|
1054
518
|
}
|
|
1055
519
|
|
|
1056
|
-
export namespace
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
*/
|
|
1060
|
-
export interface Content {
|
|
1061
|
-
filename?: string;
|
|
520
|
+
export namespace MaterialGetDebugInfoResponse {
|
|
521
|
+
export interface Image {
|
|
522
|
+
id?: string;
|
|
1062
523
|
|
|
1063
|
-
|
|
524
|
+
description?: string;
|
|
1064
525
|
|
|
1065
|
-
|
|
526
|
+
pageIndex?: number;
|
|
1066
527
|
|
|
1067
528
|
s3Key?: string;
|
|
1068
529
|
|
|
1069
530
|
s3Url?: string;
|
|
1070
|
-
|
|
1071
|
-
text?: string;
|
|
1072
|
-
|
|
1073
|
-
url?: string;
|
|
1074
531
|
}
|
|
1075
532
|
}
|
|
1076
533
|
|
|
534
|
+
export interface MaterialGetDownloadURLResponse {
|
|
535
|
+
/**
|
|
536
|
+
* Temporary download URL
|
|
537
|
+
*/
|
|
538
|
+
downloadUrl: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
1077
541
|
export interface MaterialSearchResponse {
|
|
1078
542
|
/**
|
|
1079
543
|
* Whether results were filtered by scope
|
|
@@ -1151,7 +615,7 @@ export interface MaterialCreateParams {
|
|
|
1151
615
|
/**
|
|
1152
616
|
* Content details
|
|
1153
617
|
*/
|
|
1154
|
-
content:
|
|
618
|
+
content: Content;
|
|
1155
619
|
|
|
1156
620
|
/**
|
|
1157
621
|
* Name of the material
|
|
@@ -1164,45 +628,33 @@ export interface MaterialCreateParams {
|
|
|
1164
628
|
folderId?: string;
|
|
1165
629
|
}
|
|
1166
630
|
|
|
1167
|
-
export
|
|
631
|
+
export interface MaterialListParams {
|
|
1168
632
|
/**
|
|
1169
|
-
*
|
|
633
|
+
* Filter by folder ID
|
|
1170
634
|
*/
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* Type of content
|
|
1174
|
-
*/
|
|
1175
|
-
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
* URL to fetch content from
|
|
1179
|
-
*/
|
|
1180
|
-
sourceUrl?: string;
|
|
635
|
+
folderId?: string;
|
|
1181
636
|
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
637
|
+
/**
|
|
638
|
+
* Number of items per page (default: 20, max: 200)
|
|
639
|
+
*/
|
|
640
|
+
limit?: string;
|
|
1186
641
|
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
642
|
+
/**
|
|
643
|
+
* Page number (default: 1)
|
|
644
|
+
*/
|
|
645
|
+
page?: string;
|
|
1193
646
|
|
|
1194
|
-
export interface MaterialListParams {
|
|
1195
647
|
/**
|
|
1196
|
-
*
|
|
648
|
+
* Search materials by name
|
|
1197
649
|
*/
|
|
1198
|
-
|
|
650
|
+
search?: string;
|
|
1199
651
|
}
|
|
1200
652
|
|
|
1201
653
|
export interface MaterialCreateAndProcessParams {
|
|
1202
654
|
/**
|
|
1203
655
|
* Content details
|
|
1204
656
|
*/
|
|
1205
|
-
content:
|
|
657
|
+
content: Content;
|
|
1206
658
|
|
|
1207
659
|
/**
|
|
1208
660
|
* Name of the material
|
|
@@ -1225,33 +677,6 @@ export interface MaterialCreateAndProcessParams {
|
|
|
1225
677
|
timeoutMs?: number;
|
|
1226
678
|
}
|
|
1227
679
|
|
|
1228
|
-
export namespace MaterialCreateAndProcessParams {
|
|
1229
|
-
/**
|
|
1230
|
-
* Content details
|
|
1231
|
-
*/
|
|
1232
|
-
export interface Content {
|
|
1233
|
-
/**
|
|
1234
|
-
* Type of content
|
|
1235
|
-
*/
|
|
1236
|
-
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* URL to fetch content from
|
|
1240
|
-
*/
|
|
1241
|
-
sourceUrl?: string;
|
|
1242
|
-
|
|
1243
|
-
/**
|
|
1244
|
-
* Text content (for text type)
|
|
1245
|
-
*/
|
|
1246
|
-
text?: string;
|
|
1247
|
-
|
|
1248
|
-
/**
|
|
1249
|
-
* URL to the content (for url type)
|
|
1250
|
-
*/
|
|
1251
|
-
url?: string;
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
680
|
export interface MaterialCreateBatchUploadURLsParams {
|
|
1256
681
|
/**
|
|
1257
682
|
* Array of materials to create
|
|
@@ -1412,22 +837,16 @@ export interface MaterialSearchParams {
|
|
|
1412
837
|
|
|
1413
838
|
Materials.Upload = Upload;
|
|
1414
839
|
Materials.Bulk = Bulk;
|
|
1415
|
-
Materials.Test = Test;
|
|
1416
840
|
|
|
1417
841
|
export declare namespace Materials {
|
|
1418
842
|
export {
|
|
1419
|
-
type
|
|
1420
|
-
type
|
|
843
|
+
type Content as Content,
|
|
844
|
+
type GeneratedMaterialResponse as GeneratedMaterialResponse,
|
|
845
|
+
type MaterialResponse as MaterialResponse,
|
|
1421
846
|
type MaterialListResponse as MaterialListResponse,
|
|
1422
|
-
type MaterialCreateAndProcessResponse as MaterialCreateAndProcessResponse,
|
|
1423
847
|
type MaterialCreateBatchUploadURLsResponse as MaterialCreateBatchUploadURLsResponse,
|
|
1424
|
-
type MaterialGenerateResponse as MaterialGenerateResponse,
|
|
1425
|
-
type MaterialGenerateAndProcessResponse as MaterialGenerateAndProcessResponse,
|
|
1426
848
|
type MaterialGetDebugInfoResponse as MaterialGetDebugInfoResponse,
|
|
1427
849
|
type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse,
|
|
1428
|
-
type MaterialMoveResponse as MaterialMoveResponse,
|
|
1429
|
-
type MaterialRenameResponse as MaterialRenameResponse,
|
|
1430
|
-
type MaterialReprocessResponse as MaterialReprocessResponse,
|
|
1431
850
|
type MaterialSearchResponse as MaterialSearchResponse,
|
|
1432
851
|
type MaterialCreateParams as MaterialCreateParams,
|
|
1433
852
|
type MaterialListParams as MaterialListParams,
|
|
@@ -1443,12 +862,7 @@ export declare namespace Materials {
|
|
|
1443
862
|
|
|
1444
863
|
export {
|
|
1445
864
|
Upload as Upload,
|
|
1446
|
-
type UploadCompleteUploadResponse as UploadCompleteUploadResponse,
|
|
1447
865
|
type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse,
|
|
1448
|
-
type UploadUploadFileResponse as UploadUploadFileResponse,
|
|
1449
|
-
type UploadUploadFileAndProcessResponse as UploadUploadFileAndProcessResponse,
|
|
1450
|
-
type UploadUploadFromURLResponse as UploadUploadFromURLResponse,
|
|
1451
|
-
type UploadUploadFromURLAndProcessResponse as UploadUploadFromURLAndProcessResponse,
|
|
1452
866
|
type UploadCompleteUploadParams as UploadCompleteUploadParams,
|
|
1453
867
|
type UploadGetPresignedURLParams as UploadGetPresignedURLParams,
|
|
1454
868
|
type UploadUploadFileParams as UploadUploadFileParams,
|
|
@@ -1458,12 +872,4 @@ export declare namespace Materials {
|
|
|
1458
872
|
};
|
|
1459
873
|
|
|
1460
874
|
export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
|
|
1461
|
-
|
|
1462
|
-
export {
|
|
1463
|
-
Test as Test,
|
|
1464
|
-
type TestTestEpubProcessingResponse as TestTestEpubProcessingResponse,
|
|
1465
|
-
type TestTestImageProcessingResponse as TestTestImageProcessingResponse,
|
|
1466
|
-
type TestTestOcrResponse as TestTestOcrResponse,
|
|
1467
|
-
type TestTestVideoProcessingResponse as TestTestVideoProcessingResponse,
|
|
1468
|
-
};
|
|
1469
875
|
}
|