@studyfetch/sdk 1.36.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 +14 -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 +45 -232
- package/resources/v1/folders.d.mts.map +1 -1
- package/resources/v1/folders.d.ts +45 -232
- 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 +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 +66 -469
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +66 -469
- 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 +52 -276
- package/src/resources/v1/index.ts +7 -14
- package/src/resources/v1/materials/index.ts +3 -20
- package/src/resources/v1/materials/materials.ts +194 -743
- package/src/resources/v1/materials/upload.ts +14 -405
- package/src/resources/v1/v1.ts +14 -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,630 +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
|
-
* 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 interface MaterialListResponse {
|
|
428
|
-
/**
|
|
429
|
-
* Array of materials
|
|
430
|
-
*/
|
|
431
|
-
data: Array<unknown>;
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Number of items per page
|
|
435
|
-
*/
|
|
436
|
-
limit: number;
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Current page number
|
|
440
|
-
*/
|
|
441
|
-
page: number;
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Total number of materials
|
|
445
|
-
*/
|
|
446
|
-
total: number;
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Total number of pages
|
|
450
|
-
*/
|
|
451
|
-
totalPages: number;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export interface MaterialCreateAndProcessResponse {
|
|
455
|
-
/**
|
|
456
|
-
* Material ID
|
|
457
|
-
*/
|
|
458
|
-
_id: string;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Material content
|
|
462
|
-
*/
|
|
463
|
-
content: MaterialCreateAndProcessResponse.Content;
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Content type
|
|
467
|
-
*/
|
|
468
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Creation timestamp
|
|
472
|
-
*/
|
|
473
|
-
createdAt: string;
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* Folder ID
|
|
477
|
-
*/
|
|
478
|
-
folderId: string | null;
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Material name
|
|
482
|
-
*/
|
|
483
|
-
name: string;
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Organization ID
|
|
487
|
-
*/
|
|
488
|
-
organizationId: string;
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Material status
|
|
492
|
-
*/
|
|
493
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Last update timestamp
|
|
497
|
-
*/
|
|
498
|
-
updatedAt: string;
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Material metadata
|
|
502
|
-
*/
|
|
503
|
-
metadata?: unknown;
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Usage information
|
|
507
|
-
*/
|
|
508
|
-
usage?: unknown;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
export namespace MaterialCreateAndProcessResponse {
|
|
512
|
-
/**
|
|
513
|
-
* Material content
|
|
514
|
-
*/
|
|
515
|
-
export interface Content {
|
|
516
|
-
filename?: string;
|
|
517
|
-
|
|
518
|
-
fileSize?: number;
|
|
519
|
-
|
|
520
|
-
mimeType?: string;
|
|
521
|
-
|
|
522
|
-
s3Key?: string;
|
|
523
|
-
|
|
524
|
-
s3Url?: string;
|
|
525
|
-
|
|
526
|
-
text?: string;
|
|
527
|
-
|
|
528
|
-
url?: string;
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
export type MaterialCreateBatchUploadURLsResponse =
|
|
533
|
-
Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
534
|
-
|
|
535
|
-
export namespace MaterialCreateBatchUploadURLsResponse {
|
|
536
|
-
export interface MaterialCreateBatchUploadURLsResponseItem {
|
|
537
|
-
/**
|
|
538
|
-
* Material ID
|
|
539
|
-
*/
|
|
540
|
-
materialId: string;
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* Material name
|
|
544
|
-
*/
|
|
545
|
-
name: string;
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* S3 key
|
|
549
|
-
*/
|
|
550
|
-
s3Key: string;
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Presigned upload URL
|
|
554
|
-
*/
|
|
555
|
-
uploadUrl: string;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
export interface MaterialGenerateResponse {
|
|
560
|
-
/**
|
|
561
|
-
* Material ID
|
|
562
|
-
*/
|
|
563
|
-
_id: string;
|
|
564
|
-
|
|
565
|
-
/**
|
|
566
|
-
* Material content
|
|
567
|
-
*/
|
|
568
|
-
content: MaterialGenerateResponse.Content;
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* Content type
|
|
572
|
-
*/
|
|
573
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Creation timestamp
|
|
577
|
-
*/
|
|
578
|
-
createdAt: string;
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* Folder ID
|
|
582
|
-
*/
|
|
583
|
-
folderId: string | null;
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Material name
|
|
587
|
-
*/
|
|
588
|
-
name: string;
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* Organization ID
|
|
592
|
-
*/
|
|
593
|
-
organizationId: string;
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
* Material status
|
|
597
|
-
*/
|
|
598
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* Last update timestamp
|
|
602
|
-
*/
|
|
603
|
-
updatedAt: string;
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* Generation metadata
|
|
607
|
-
*/
|
|
608
|
-
generationMetadata?: unknown;
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
* Material metadata
|
|
612
|
-
*/
|
|
613
|
-
metadata?: unknown;
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* Usage information
|
|
617
|
-
*/
|
|
618
|
-
usage?: unknown;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
export namespace MaterialGenerateResponse {
|
|
622
|
-
/**
|
|
623
|
-
* Material content
|
|
624
|
-
*/
|
|
625
|
-
export interface Content {
|
|
626
|
-
filename?: string;
|
|
627
|
-
|
|
628
|
-
fileSize?: number;
|
|
629
|
-
|
|
630
|
-
mimeType?: string;
|
|
631
|
-
|
|
632
|
-
s3Key?: string;
|
|
633
|
-
|
|
634
|
-
s3Url?: string;
|
|
635
|
-
|
|
636
|
-
text?: string;
|
|
637
|
-
|
|
638
|
-
url?: string;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
export interface MaterialGenerateAndProcessResponse {
|
|
643
|
-
/**
|
|
644
|
-
* Material ID
|
|
645
|
-
*/
|
|
646
|
-
_id: string;
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Material content
|
|
650
|
-
*/
|
|
651
|
-
content: MaterialGenerateAndProcessResponse.Content;
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* Content type
|
|
655
|
-
*/
|
|
656
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* Creation timestamp
|
|
660
|
-
*/
|
|
661
|
-
createdAt: string;
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Folder ID
|
|
665
|
-
*/
|
|
666
|
-
folderId: string | null;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Material name
|
|
670
|
-
*/
|
|
671
|
-
name: string;
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* Organization ID
|
|
675
|
-
*/
|
|
676
|
-
organizationId: string;
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* Material status
|
|
680
|
-
*/
|
|
681
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* Last update timestamp
|
|
685
|
-
*/
|
|
686
|
-
updatedAt: string;
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
* Generation metadata
|
|
690
|
-
*/
|
|
691
|
-
generationMetadata?: unknown;
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* Material metadata
|
|
695
|
-
*/
|
|
696
|
-
metadata?: unknown;
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* Usage information
|
|
700
|
-
*/
|
|
701
|
-
usage?: unknown;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
export namespace MaterialGenerateAndProcessResponse {
|
|
705
|
-
/**
|
|
706
|
-
* Material content
|
|
707
|
-
*/
|
|
708
|
-
export interface Content {
|
|
709
|
-
filename?: string;
|
|
710
|
-
|
|
711
|
-
fileSize?: number;
|
|
712
|
-
|
|
713
|
-
mimeType?: string;
|
|
714
|
-
|
|
715
|
-
s3Key?: string;
|
|
716
|
-
|
|
717
|
-
s3Url?: string;
|
|
718
|
-
|
|
719
|
-
text?: string;
|
|
720
|
-
|
|
721
|
-
url?: string;
|
|
157
|
+
* type: 'notes',
|
|
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 });
|
|
722
166
|
}
|
|
723
|
-
}
|
|
724
167
|
|
|
725
|
-
export interface MaterialGetDebugInfoResponse {
|
|
726
168
|
/**
|
|
727
|
-
*
|
|
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
|
+
* ```
|
|
728
177
|
*/
|
|
729
|
-
|
|
178
|
+
getDebugInfo(id: string, options?: RequestOptions): APIPromise<MaterialGetDebugInfoResponse> {
|
|
179
|
+
return this._client.get(path`/api/v1/materials/${id}/debug`, options);
|
|
180
|
+
}
|
|
730
181
|
|
|
731
182
|
/**
|
|
732
|
-
*
|
|
183
|
+
* Get temporary download URL for material
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* const response = await client.v1.materials.getDownloadURL(
|
|
188
|
+
* 'id',
|
|
189
|
+
* );
|
|
190
|
+
* ```
|
|
733
191
|
*/
|
|
734
|
-
|
|
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
|
+
}
|
|
735
199
|
|
|
736
200
|
/**
|
|
737
|
-
*
|
|
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
|
+
* ```
|
|
738
210
|
*/
|
|
739
|
-
|
|
211
|
+
move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
212
|
+
return this._client.post(path`/api/v1/materials/${id}/move`, { body, ...options });
|
|
213
|
+
}
|
|
740
214
|
|
|
741
215
|
/**
|
|
742
|
-
*
|
|
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
|
+
* ```
|
|
743
225
|
*/
|
|
744
|
-
|
|
226
|
+
rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
227
|
+
return this._client.post(path`/api/v1/materials/${id}/rename`, { body, ...options });
|
|
228
|
+
}
|
|
745
229
|
|
|
746
230
|
/**
|
|
747
|
-
*
|
|
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
|
+
* ```
|
|
748
238
|
*/
|
|
749
|
-
|
|
239
|
+
reprocess(id: string, options?: RequestOptions): APIPromise<MaterialResponse> {
|
|
240
|
+
return this._client.post(path`/api/v1/materials/${id}/reprocess`, options);
|
|
241
|
+
}
|
|
750
242
|
|
|
751
243
|
/**
|
|
752
|
-
*
|
|
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
|
+
* ```
|
|
753
252
|
*/
|
|
754
|
-
|
|
253
|
+
search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse> {
|
|
254
|
+
return this._client.post('/api/v1/materials/search', { body, ...options });
|
|
255
|
+
}
|
|
256
|
+
}
|
|
755
257
|
|
|
258
|
+
export interface Content {
|
|
756
259
|
/**
|
|
757
|
-
*
|
|
260
|
+
* Type of content
|
|
758
261
|
*/
|
|
759
|
-
|
|
262
|
+
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
760
263
|
|
|
761
264
|
/**
|
|
762
|
-
*
|
|
265
|
+
* URL to fetch content from
|
|
763
266
|
*/
|
|
764
|
-
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
export namespace MaterialGetDebugInfoResponse {
|
|
768
|
-
export interface Image {
|
|
769
|
-
id?: string;
|
|
770
|
-
|
|
771
|
-
description?: string;
|
|
267
|
+
sourceUrl?: string;
|
|
772
268
|
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
s3Url?: string;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
269
|
+
/**
|
|
270
|
+
* Text content (for text type)
|
|
271
|
+
*/
|
|
272
|
+
text?: string;
|
|
780
273
|
|
|
781
|
-
export interface MaterialGetDownloadURLResponse {
|
|
782
274
|
/**
|
|
783
|
-
*
|
|
275
|
+
* URL to the content (for url type)
|
|
784
276
|
*/
|
|
785
|
-
|
|
277
|
+
url?: string;
|
|
786
278
|
}
|
|
787
279
|
|
|
788
|
-
export interface
|
|
280
|
+
export interface GeneratedMaterialResponse {
|
|
789
281
|
/**
|
|
790
282
|
* Material ID
|
|
791
283
|
*/
|
|
@@ -794,7 +286,7 @@ export interface MaterialMoveResponse {
|
|
|
794
286
|
/**
|
|
795
287
|
* Material content
|
|
796
288
|
*/
|
|
797
|
-
content:
|
|
289
|
+
content: GeneratedMaterialResponse.Content;
|
|
798
290
|
|
|
799
291
|
/**
|
|
800
292
|
* Content type
|
|
@@ -831,6 +323,11 @@ export interface MaterialMoveResponse {
|
|
|
831
323
|
*/
|
|
832
324
|
updatedAt: string;
|
|
833
325
|
|
|
326
|
+
/**
|
|
327
|
+
* Generation metadata
|
|
328
|
+
*/
|
|
329
|
+
generationMetadata?: unknown;
|
|
330
|
+
|
|
834
331
|
/**
|
|
835
332
|
* Material metadata
|
|
836
333
|
*/
|
|
@@ -842,7 +339,7 @@ export interface MaterialMoveResponse {
|
|
|
842
339
|
usage?: unknown;
|
|
843
340
|
}
|
|
844
341
|
|
|
845
|
-
export namespace
|
|
342
|
+
export namespace GeneratedMaterialResponse {
|
|
846
343
|
/**
|
|
847
344
|
* Material content
|
|
848
345
|
*/
|
|
@@ -863,7 +360,7 @@ export namespace MaterialMoveResponse {
|
|
|
863
360
|
}
|
|
864
361
|
}
|
|
865
362
|
|
|
866
|
-
export interface
|
|
363
|
+
export interface MaterialResponse {
|
|
867
364
|
/**
|
|
868
365
|
* Material ID
|
|
869
366
|
*/
|
|
@@ -872,7 +369,7 @@ export interface MaterialRenameResponse {
|
|
|
872
369
|
/**
|
|
873
370
|
* Material content
|
|
874
371
|
*/
|
|
875
|
-
content:
|
|
372
|
+
content: MaterialResponse.Content;
|
|
876
373
|
|
|
877
374
|
/**
|
|
878
375
|
* Content type
|
|
@@ -920,7 +417,7 @@ export interface MaterialRenameResponse {
|
|
|
920
417
|
usage?: unknown;
|
|
921
418
|
}
|
|
922
419
|
|
|
923
|
-
export namespace
|
|
420
|
+
export namespace MaterialResponse {
|
|
924
421
|
/**
|
|
925
422
|
* Material content
|
|
926
423
|
*/
|
|
@@ -941,84 +438,106 @@ export namespace MaterialRenameResponse {
|
|
|
941
438
|
}
|
|
942
439
|
}
|
|
943
440
|
|
|
944
|
-
export interface
|
|
945
|
-
|
|
946
|
-
* Material ID
|
|
947
|
-
*/
|
|
948
|
-
_id: string;
|
|
441
|
+
export interface MaterialListResponse {
|
|
442
|
+
materials?: Array<MaterialResponse>;
|
|
949
443
|
|
|
950
|
-
|
|
951
|
-
* Material content
|
|
952
|
-
*/
|
|
953
|
-
content: MaterialReprocessResponse.Content;
|
|
444
|
+
page?: number;
|
|
954
445
|
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
446
|
+
totalCount?: number;
|
|
447
|
+
|
|
448
|
+
totalPages?: number;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export type MaterialCreateBatchUploadURLsResponse =
|
|
452
|
+
Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
|
|
453
|
+
|
|
454
|
+
export namespace MaterialCreateBatchUploadURLsResponse {
|
|
455
|
+
export interface MaterialCreateBatchUploadURLsResponseItem {
|
|
456
|
+
/**
|
|
457
|
+
* Material ID
|
|
458
|
+
*/
|
|
459
|
+
materialId: string;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Material name
|
|
463
|
+
*/
|
|
464
|
+
name: string;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* S3 key
|
|
468
|
+
*/
|
|
469
|
+
s3Key: string;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Presigned upload URL
|
|
473
|
+
*/
|
|
474
|
+
uploadUrl: string;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
959
477
|
|
|
478
|
+
export interface MaterialGetDebugInfoResponse {
|
|
960
479
|
/**
|
|
961
|
-
*
|
|
480
|
+
* Content details
|
|
962
481
|
*/
|
|
963
|
-
|
|
482
|
+
content: unknown;
|
|
964
483
|
|
|
965
484
|
/**
|
|
966
|
-
*
|
|
485
|
+
* Content type
|
|
967
486
|
*/
|
|
968
|
-
|
|
487
|
+
contentType: string;
|
|
969
488
|
|
|
970
489
|
/**
|
|
971
|
-
*
|
|
490
|
+
* Processed images
|
|
972
491
|
*/
|
|
973
|
-
|
|
492
|
+
images: Array<MaterialGetDebugInfoResponse.Image>;
|
|
974
493
|
|
|
975
494
|
/**
|
|
976
|
-
*
|
|
495
|
+
* Material ID
|
|
977
496
|
*/
|
|
978
|
-
|
|
497
|
+
materialId: string;
|
|
979
498
|
|
|
980
499
|
/**
|
|
981
|
-
* Material
|
|
500
|
+
* Material metadata
|
|
982
501
|
*/
|
|
983
|
-
|
|
502
|
+
metadata: unknown;
|
|
984
503
|
|
|
985
504
|
/**
|
|
986
|
-
*
|
|
505
|
+
* Material name
|
|
987
506
|
*/
|
|
988
|
-
|
|
507
|
+
name: string;
|
|
989
508
|
|
|
990
509
|
/**
|
|
991
|
-
*
|
|
510
|
+
* Processing status
|
|
992
511
|
*/
|
|
993
|
-
|
|
512
|
+
status: string;
|
|
994
513
|
|
|
995
514
|
/**
|
|
996
|
-
*
|
|
515
|
+
* Transcript structure for videos
|
|
997
516
|
*/
|
|
998
|
-
|
|
517
|
+
transcriptStructure: unknown | null;
|
|
999
518
|
}
|
|
1000
519
|
|
|
1001
|
-
export namespace
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
*/
|
|
1005
|
-
export interface Content {
|
|
1006
|
-
filename?: string;
|
|
520
|
+
export namespace MaterialGetDebugInfoResponse {
|
|
521
|
+
export interface Image {
|
|
522
|
+
id?: string;
|
|
1007
523
|
|
|
1008
|
-
|
|
524
|
+
description?: string;
|
|
1009
525
|
|
|
1010
|
-
|
|
526
|
+
pageIndex?: number;
|
|
1011
527
|
|
|
1012
528
|
s3Key?: string;
|
|
1013
529
|
|
|
1014
530
|
s3Url?: string;
|
|
1015
|
-
|
|
1016
|
-
text?: string;
|
|
1017
|
-
|
|
1018
|
-
url?: string;
|
|
1019
531
|
}
|
|
1020
532
|
}
|
|
1021
533
|
|
|
534
|
+
export interface MaterialGetDownloadURLResponse {
|
|
535
|
+
/**
|
|
536
|
+
* Temporary download URL
|
|
537
|
+
*/
|
|
538
|
+
downloadUrl: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
1022
541
|
export interface MaterialSearchResponse {
|
|
1023
542
|
/**
|
|
1024
543
|
* Whether results were filtered by scope
|
|
@@ -1096,7 +615,7 @@ export interface MaterialCreateParams {
|
|
|
1096
615
|
/**
|
|
1097
616
|
* Content details
|
|
1098
617
|
*/
|
|
1099
|
-
content:
|
|
618
|
+
content: Content;
|
|
1100
619
|
|
|
1101
620
|
/**
|
|
1102
621
|
* Name of the material
|
|
@@ -1109,33 +628,6 @@ export interface MaterialCreateParams {
|
|
|
1109
628
|
folderId?: string;
|
|
1110
629
|
}
|
|
1111
630
|
|
|
1112
|
-
export namespace MaterialCreateParams {
|
|
1113
|
-
/**
|
|
1114
|
-
* Content details
|
|
1115
|
-
*/
|
|
1116
|
-
export interface Content {
|
|
1117
|
-
/**
|
|
1118
|
-
* Type of content
|
|
1119
|
-
*/
|
|
1120
|
-
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1121
|
-
|
|
1122
|
-
/**
|
|
1123
|
-
* URL to fetch content from
|
|
1124
|
-
*/
|
|
1125
|
-
sourceUrl?: string;
|
|
1126
|
-
|
|
1127
|
-
/**
|
|
1128
|
-
* Text content (for text type)
|
|
1129
|
-
*/
|
|
1130
|
-
text?: string;
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
* URL to the content (for url type)
|
|
1134
|
-
*/
|
|
1135
|
-
url?: string;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
631
|
export interface MaterialListParams {
|
|
1140
632
|
/**
|
|
1141
633
|
* Filter by folder ID
|
|
@@ -1151,13 +643,18 @@ export interface MaterialListParams {
|
|
|
1151
643
|
* Page number (default: 1)
|
|
1152
644
|
*/
|
|
1153
645
|
page?: string;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Search materials by name
|
|
649
|
+
*/
|
|
650
|
+
search?: string;
|
|
1154
651
|
}
|
|
1155
652
|
|
|
1156
653
|
export interface MaterialCreateAndProcessParams {
|
|
1157
654
|
/**
|
|
1158
655
|
* Content details
|
|
1159
656
|
*/
|
|
1160
|
-
content:
|
|
657
|
+
content: Content;
|
|
1161
658
|
|
|
1162
659
|
/**
|
|
1163
660
|
* Name of the material
|
|
@@ -1180,33 +677,6 @@ export interface MaterialCreateAndProcessParams {
|
|
|
1180
677
|
timeoutMs?: number;
|
|
1181
678
|
}
|
|
1182
679
|
|
|
1183
|
-
export namespace MaterialCreateAndProcessParams {
|
|
1184
|
-
/**
|
|
1185
|
-
* Content details
|
|
1186
|
-
*/
|
|
1187
|
-
export interface Content {
|
|
1188
|
-
/**
|
|
1189
|
-
* Type of content
|
|
1190
|
-
*/
|
|
1191
|
-
type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
|
|
1192
|
-
|
|
1193
|
-
/**
|
|
1194
|
-
* URL to fetch content from
|
|
1195
|
-
*/
|
|
1196
|
-
sourceUrl?: string;
|
|
1197
|
-
|
|
1198
|
-
/**
|
|
1199
|
-
* Text content (for text type)
|
|
1200
|
-
*/
|
|
1201
|
-
text?: string;
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* URL to the content (for url type)
|
|
1205
|
-
*/
|
|
1206
|
-
url?: string;
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
680
|
export interface MaterialCreateBatchUploadURLsParams {
|
|
1211
681
|
/**
|
|
1212
682
|
* Array of materials to create
|
|
@@ -1367,22 +837,16 @@ export interface MaterialSearchParams {
|
|
|
1367
837
|
|
|
1368
838
|
Materials.Upload = Upload;
|
|
1369
839
|
Materials.Bulk = Bulk;
|
|
1370
|
-
Materials.Test = Test;
|
|
1371
840
|
|
|
1372
841
|
export declare namespace Materials {
|
|
1373
842
|
export {
|
|
1374
|
-
type
|
|
1375
|
-
type
|
|
843
|
+
type Content as Content,
|
|
844
|
+
type GeneratedMaterialResponse as GeneratedMaterialResponse,
|
|
845
|
+
type MaterialResponse as MaterialResponse,
|
|
1376
846
|
type MaterialListResponse as MaterialListResponse,
|
|
1377
|
-
type MaterialCreateAndProcessResponse as MaterialCreateAndProcessResponse,
|
|
1378
847
|
type MaterialCreateBatchUploadURLsResponse as MaterialCreateBatchUploadURLsResponse,
|
|
1379
|
-
type MaterialGenerateResponse as MaterialGenerateResponse,
|
|
1380
|
-
type MaterialGenerateAndProcessResponse as MaterialGenerateAndProcessResponse,
|
|
1381
848
|
type MaterialGetDebugInfoResponse as MaterialGetDebugInfoResponse,
|
|
1382
849
|
type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse,
|
|
1383
|
-
type MaterialMoveResponse as MaterialMoveResponse,
|
|
1384
|
-
type MaterialRenameResponse as MaterialRenameResponse,
|
|
1385
|
-
type MaterialReprocessResponse as MaterialReprocessResponse,
|
|
1386
850
|
type MaterialSearchResponse as MaterialSearchResponse,
|
|
1387
851
|
type MaterialCreateParams as MaterialCreateParams,
|
|
1388
852
|
type MaterialListParams as MaterialListParams,
|
|
@@ -1398,12 +862,7 @@ export declare namespace Materials {
|
|
|
1398
862
|
|
|
1399
863
|
export {
|
|
1400
864
|
Upload as Upload,
|
|
1401
|
-
type UploadCompleteUploadResponse as UploadCompleteUploadResponse,
|
|
1402
865
|
type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse,
|
|
1403
|
-
type UploadUploadFileResponse as UploadUploadFileResponse,
|
|
1404
|
-
type UploadUploadFileAndProcessResponse as UploadUploadFileAndProcessResponse,
|
|
1405
|
-
type UploadUploadFromURLResponse as UploadUploadFromURLResponse,
|
|
1406
|
-
type UploadUploadFromURLAndProcessResponse as UploadUploadFromURLAndProcessResponse,
|
|
1407
866
|
type UploadCompleteUploadParams as UploadCompleteUploadParams,
|
|
1408
867
|
type UploadGetPresignedURLParams as UploadGetPresignedURLParams,
|
|
1409
868
|
type UploadUploadFileParams as UploadUploadFileParams,
|
|
@@ -1413,12 +872,4 @@ export declare namespace Materials {
|
|
|
1413
872
|
};
|
|
1414
873
|
|
|
1415
874
|
export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
|
|
1416
|
-
|
|
1417
|
-
export {
|
|
1418
|
-
Test as Test,
|
|
1419
|
-
type TestTestEpubProcessingResponse as TestTestEpubProcessingResponse,
|
|
1420
|
-
type TestTestImageProcessingResponse as TestTestImageProcessingResponse,
|
|
1421
|
-
type TestTestOcrResponse as TestTestOcrResponse,
|
|
1422
|
-
type TestTestVideoProcessingResponse as TestTestVideoProcessingResponse,
|
|
1423
|
-
};
|
|
1424
875
|
}
|