@studyfetch/sdk 1.24.0 → 1.26.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.
Files changed (168) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/package.json +1 -1
  3. package/resources/v1/assignment-grader.d.mts +34 -1
  4. package/resources/v1/assignment-grader.d.mts.map +1 -1
  5. package/resources/v1/assignment-grader.d.ts +34 -1
  6. package/resources/v1/assignment-grader.d.ts.map +1 -1
  7. package/resources/v1/assignment-grader.js +15 -0
  8. package/resources/v1/assignment-grader.js.map +1 -1
  9. package/resources/v1/assignment-grader.mjs +15 -0
  10. package/resources/v1/assignment-grader.mjs.map +1 -1
  11. package/resources/v1/chat/chat.d.mts +62 -1
  12. package/resources/v1/chat/chat.d.mts.map +1 -1
  13. package/resources/v1/chat/chat.d.ts +62 -1
  14. package/resources/v1/chat/chat.d.ts.map +1 -1
  15. package/resources/v1/chat/chat.js.map +1 -1
  16. package/resources/v1/chat/chat.mjs.map +1 -1
  17. package/resources/v1/chat/index.d.mts +1 -1
  18. package/resources/v1/chat/index.d.mts.map +1 -1
  19. package/resources/v1/chat/index.d.ts +1 -1
  20. package/resources/v1/chat/index.d.ts.map +1 -1
  21. package/resources/v1/chat/index.js.map +1 -1
  22. package/resources/v1/chat/index.mjs +1 -1
  23. package/resources/v1/chat/index.mjs.map +1 -1
  24. package/resources/v1/components.d.mts +62 -4
  25. package/resources/v1/components.d.mts.map +1 -1
  26. package/resources/v1/components.d.ts +62 -4
  27. package/resources/v1/components.d.ts.map +1 -1
  28. package/resources/v1/data-analyst/data-analyst.d.mts +156 -0
  29. package/resources/v1/data-analyst/data-analyst.d.mts.map +1 -0
  30. package/resources/v1/data-analyst/data-analyst.d.ts +156 -0
  31. package/resources/v1/data-analyst/data-analyst.d.ts.map +1 -0
  32. package/resources/v1/data-analyst/data-analyst.js +99 -0
  33. package/resources/v1/data-analyst/data-analyst.js.map +1 -0
  34. package/resources/v1/data-analyst/data-analyst.mjs +94 -0
  35. package/resources/v1/data-analyst/data-analyst.mjs.map +1 -0
  36. package/resources/v1/data-analyst/index.d.mts +4 -0
  37. package/resources/v1/data-analyst/index.d.mts.map +1 -0
  38. package/resources/v1/data-analyst/index.d.ts +4 -0
  39. package/resources/v1/data-analyst/index.d.ts.map +1 -0
  40. package/resources/v1/data-analyst/index.js +11 -0
  41. package/resources/v1/data-analyst/index.js.map +1 -0
  42. package/resources/v1/data-analyst/index.mjs +5 -0
  43. package/resources/v1/data-analyst/index.mjs.map +1 -0
  44. package/resources/v1/data-analyst/sessions.d.mts +28 -0
  45. package/resources/v1/data-analyst/sessions.d.mts.map +1 -0
  46. package/resources/v1/data-analyst/sessions.d.ts +28 -0
  47. package/resources/v1/data-analyst/sessions.d.ts.map +1 -0
  48. package/resources/v1/data-analyst/sessions.js +38 -0
  49. package/resources/v1/data-analyst/sessions.js.map +1 -0
  50. package/resources/v1/data-analyst/sessions.mjs +34 -0
  51. package/resources/v1/data-analyst/sessions.mjs.map +1 -0
  52. package/resources/v1/data-analyst/test.d.mts +20 -0
  53. package/resources/v1/data-analyst/test.d.mts.map +1 -0
  54. package/resources/v1/data-analyst/test.d.ts +20 -0
  55. package/resources/v1/data-analyst/test.d.ts.map +1 -0
  56. package/resources/v1/data-analyst/test.js +34 -0
  57. package/resources/v1/data-analyst/test.js.map +1 -0
  58. package/resources/v1/data-analyst/test.mjs +30 -0
  59. package/resources/v1/data-analyst/test.mjs.map +1 -0
  60. package/resources/v1/data-analyst.d.mts +2 -0
  61. package/resources/v1/data-analyst.d.mts.map +1 -0
  62. package/resources/v1/data-analyst.d.ts +2 -0
  63. package/resources/v1/data-analyst.d.ts.map +1 -0
  64. package/resources/v1/data-analyst.js +6 -0
  65. package/resources/v1/data-analyst.js.map +1 -0
  66. package/resources/v1/data-analyst.mjs +3 -0
  67. package/resources/v1/data-analyst.mjs.map +1 -0
  68. package/resources/v1/index.d.mts +3 -2
  69. package/resources/v1/index.d.mts.map +1 -1
  70. package/resources/v1/index.d.ts +3 -2
  71. package/resources/v1/index.d.ts.map +1 -1
  72. package/resources/v1/index.js +15 -13
  73. package/resources/v1/index.js.map +1 -1
  74. package/resources/v1/index.mjs +1 -0
  75. package/resources/v1/index.mjs.map +1 -1
  76. package/resources/v1/materials/bulk.d.mts +30 -2
  77. package/resources/v1/materials/bulk.d.mts.map +1 -1
  78. package/resources/v1/materials/bulk.d.ts +30 -2
  79. package/resources/v1/materials/bulk.d.ts.map +1 -1
  80. package/resources/v1/materials/bulk.js +8 -7
  81. package/resources/v1/materials/bulk.js.map +1 -1
  82. package/resources/v1/materials/bulk.mjs +8 -7
  83. package/resources/v1/materials/bulk.mjs.map +1 -1
  84. package/resources/v1/materials/index.d.mts +4 -4
  85. package/resources/v1/materials/index.d.mts.map +1 -1
  86. package/resources/v1/materials/index.d.ts +4 -4
  87. package/resources/v1/materials/index.d.ts.map +1 -1
  88. package/resources/v1/materials/index.js.map +1 -1
  89. package/resources/v1/materials/index.mjs +2 -2
  90. package/resources/v1/materials/index.mjs.map +1 -1
  91. package/resources/v1/materials/materials.d.mts +270 -43
  92. package/resources/v1/materials/materials.d.mts.map +1 -1
  93. package/resources/v1/materials/materials.d.ts +270 -43
  94. package/resources/v1/materials/materials.d.ts.map +1 -1
  95. package/resources/v1/materials/materials.js +64 -44
  96. package/resources/v1/materials/materials.js.map +1 -1
  97. package/resources/v1/materials/materials.mjs +66 -46
  98. package/resources/v1/materials/materials.mjs.map +1 -1
  99. package/resources/v1/materials/test.d.mts +111 -8
  100. package/resources/v1/materials/test.d.mts.map +1 -1
  101. package/resources/v1/materials/test.d.ts +111 -8
  102. package/resources/v1/materials/test.d.ts.map +1 -1
  103. package/resources/v1/materials/test.js +20 -21
  104. package/resources/v1/materials/test.js.map +1 -1
  105. package/resources/v1/materials/test.mjs +20 -21
  106. package/resources/v1/materials/test.mjs.map +1 -1
  107. package/resources/v1/materials/upload.d.mts +149 -5
  108. package/resources/v1/materials/upload.d.mts.map +1 -1
  109. package/resources/v1/materials/upload.d.ts +149 -5
  110. package/resources/v1/materials/upload.d.ts.map +1 -1
  111. package/resources/v1/materials/upload.js +53 -13
  112. package/resources/v1/materials/upload.js.map +1 -1
  113. package/resources/v1/materials/upload.mjs +53 -13
  114. package/resources/v1/materials/upload.mjs.map +1 -1
  115. package/resources/v1/usage/analyst.d.mts +51 -6
  116. package/resources/v1/usage/analyst.d.mts.map +1 -1
  117. package/resources/v1/usage/analyst.d.ts +51 -6
  118. package/resources/v1/usage/analyst.d.ts.map +1 -1
  119. package/resources/v1/usage/analyst.js +8 -9
  120. package/resources/v1/usage/analyst.js.map +1 -1
  121. package/resources/v1/usage/analyst.mjs +8 -9
  122. package/resources/v1/usage/analyst.mjs.map +1 -1
  123. package/resources/v1/usage/index.d.mts +1 -1
  124. package/resources/v1/usage/index.d.mts.map +1 -1
  125. package/resources/v1/usage/index.d.ts +1 -1
  126. package/resources/v1/usage/index.d.ts.map +1 -1
  127. package/resources/v1/usage/index.js.map +1 -1
  128. package/resources/v1/usage/index.mjs +1 -1
  129. package/resources/v1/usage/index.mjs.map +1 -1
  130. package/resources/v1/usage/usage.d.mts +2 -2
  131. package/resources/v1/usage/usage.d.mts.map +1 -1
  132. package/resources/v1/usage/usage.d.ts +2 -2
  133. package/resources/v1/usage/usage.d.ts.map +1 -1
  134. package/resources/v1/usage/usage.js.map +1 -1
  135. package/resources/v1/usage/usage.mjs +1 -1
  136. package/resources/v1/usage/usage.mjs.map +1 -1
  137. package/resources/v1/v1.d.mts +19 -4
  138. package/resources/v1/v1.d.mts.map +1 -1
  139. package/resources/v1/v1.d.ts +19 -4
  140. package/resources/v1/v1.d.ts.map +1 -1
  141. package/resources/v1/v1.js +19 -0
  142. package/resources/v1/v1.js.map +1 -1
  143. package/resources/v1/v1.mjs +20 -1
  144. package/resources/v1/v1.mjs.map +1 -1
  145. package/src/resources/v1/assignment-grader.ts +47 -1
  146. package/src/resources/v1/chat/chat.ts +74 -0
  147. package/src/resources/v1/chat/index.ts +7 -1
  148. package/src/resources/v1/components.ts +76 -0
  149. package/src/resources/v1/data-analyst/data-analyst.ts +233 -0
  150. package/src/resources/v1/data-analyst/index.ts +10 -0
  151. package/src/resources/v1/data-analyst/sessions.ts +46 -0
  152. package/src/resources/v1/data-analyst/test.ts +34 -0
  153. package/src/resources/v1/data-analyst.ts +3 -0
  154. package/src/resources/v1/index.ts +16 -0
  155. package/src/resources/v1/materials/bulk.ts +36 -7
  156. package/src/resources/v1/materials/index.ts +28 -3
  157. package/src/resources/v1/materials/materials.ts +364 -72
  158. package/src/resources/v1/materials/test.ts +141 -25
  159. package/src/resources/v1/materials/upload.ts +200 -13
  160. package/src/resources/v1/usage/analyst.ts +80 -10
  161. package/src/resources/v1/usage/index.ts +7 -1
  162. package/src/resources/v1/usage/usage.ts +14 -2
  163. package/src/resources/v1/v1.ts +60 -1
  164. package/src/version.ts +1 -1
  165. package/version.d.mts +1 -1
  166. package/version.d.ts +1 -1
  167. package/version.js +1 -1
  168. package/version.mjs +1 -1
@@ -2,11 +2,27 @@
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as BulkAPI from './bulk';
5
- import { Bulk } from './bulk';
5
+ import { Bulk, BulkMoveParams, BulkMoveResponse } from './bulk';
6
6
  import * as TestAPI from './test';
7
- import { Test } from './test';
7
+ import {
8
+ Test,
9
+ TestPerformOcrResponse,
10
+ TestProcessEpubResponse,
11
+ TestProcessImageResponse,
12
+ TestProcessVideoResponse,
13
+ } from './test';
8
14
  import * as UploadAPI from './upload';
9
- import { Upload, UploadUploadFileParams, UploadUploadFromURLParams } from './upload';
15
+ import {
16
+ Complete,
17
+ Upload,
18
+ UploadCompleteUploadParams,
19
+ UploadCreatePresignedURLParams,
20
+ UploadCreatePresignedURLResponse,
21
+ UploadUploadFileAndProcessParams,
22
+ UploadUploadFileParams,
23
+ UploadUploadFromURLParams,
24
+ UploadUploadURLAndProcessParams,
25
+ } from './upload';
10
26
  import { APIPromise } from '../../../core/api-promise';
11
27
  import { buildHeaders } from '../../../internal/headers';
12
28
  import { RequestOptions } from '../../../internal/request-options';
@@ -75,107 +91,153 @@ export class Materials extends APIResource {
75
91
  }
76
92
 
77
93
  /**
94
+ * Create batch upload URLs for multiple materials
95
+ *
78
96
  * @example
79
97
  * ```ts
80
- * await client.v1.materials.batchCreate();
98
+ * const response = await client.v1.materials.batchCreate({
99
+ * materials: [
100
+ * {
101
+ * contentType: 'application/pdf',
102
+ * filename: 'document.pdf',
103
+ * name: 'Chapter 1',
104
+ * },
105
+ * ],
106
+ * });
81
107
  * ```
82
108
  */
83
- batchCreate(options?: RequestOptions): APIPromise<void> {
84
- return this._client.post('/api/v1/materials/batch', {
85
- ...options,
86
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
87
- });
109
+ batchCreate(
110
+ body: MaterialBatchCreateParams,
111
+ options?: RequestOptions,
112
+ ): APIPromise<MaterialBatchCreateResponse> {
113
+ return this._client.post('/api/v1/materials/batch', { body, ...options });
88
114
  }
89
115
 
90
116
  /**
117
+ * Creates a material and waits for processing to finish before returning. Useful
118
+ * for synchronous API usage.
119
+ *
91
120
  * @example
92
121
  * ```ts
93
- * await client.v1.materials.debug('id');
122
+ * const material = await client.v1.materials.createAndProcess(
123
+ * {
124
+ * content: { type: 'text' },
125
+ * name: 'Chapter 1 - Introduction',
126
+ * },
127
+ * );
94
128
  * ```
95
129
  */
96
- debug(id: string, options?: RequestOptions): APIPromise<void> {
97
- return this._client.get(path`/api/v1/materials/${id}/debug`, {
98
- ...options,
99
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
100
- });
130
+ createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<Material> {
131
+ return this._client.post('/api/v1/materials/upload-and-process', { body, ...options });
101
132
  }
102
133
 
103
134
  /**
135
+ * Get debug information for a material including extracted content
136
+ *
104
137
  * @example
105
138
  * ```ts
106
- * await client.v1.materials.getDownloadURL('id', {
107
- * expiresIn: 'expiresIn',
108
- * });
139
+ * const response = await client.v1.materials.debug('id');
140
+ * ```
141
+ */
142
+ debug(id: string, options?: RequestOptions): APIPromise<MaterialDebugResponse> {
143
+ return this._client.get(path`/api/v1/materials/${id}/debug`, options);
144
+ }
145
+
146
+ /**
147
+ * Get temporary download URL for material
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * const response = await client.v1.materials.getDownloadURL(
152
+ * 'id',
153
+ * );
109
154
  * ```
110
155
  */
111
156
  getDownloadURL(
112
157
  id: string,
113
- query: MaterialGetDownloadURLParams,
158
+ query: MaterialGetDownloadURLParams | null | undefined = {},
114
159
  options?: RequestOptions,
115
- ): APIPromise<void> {
116
- return this._client.get(path`/api/v1/materials/${id}/download-url`, {
117
- query,
118
- ...options,
119
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
120
- });
160
+ ): APIPromise<MaterialGetDownloadURLResponse> {
161
+ return this._client.get(path`/api/v1/materials/${id}/download-url`, { query, ...options });
121
162
  }
122
163
 
123
164
  /**
165
+ * Move material to a different folder
166
+ *
124
167
  * @example
125
168
  * ```ts
126
- * await client.v1.materials.move('id');
169
+ * const material = await client.v1.materials.move('id', {
170
+ * folderId: 'folderId',
171
+ * });
127
172
  * ```
128
173
  */
129
- move(id: string, options?: RequestOptions): APIPromise<void> {
130
- return this._client.post(path`/api/v1/materials/${id}/move`, {
131
- ...options,
132
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
133
- });
174
+ move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<Material> {
175
+ return this._client.post(path`/api/v1/materials/${id}/move`, { body, ...options });
134
176
  }
135
177
 
136
178
  /**
179
+ * Rename a material
180
+ *
137
181
  * @example
138
182
  * ```ts
139
- * await client.v1.materials.rename('id');
183
+ * const material = await client.v1.materials.rename('id', {
184
+ * name: 'New Material Name',
185
+ * });
140
186
  * ```
141
187
  */
142
- rename(id: string, options?: RequestOptions): APIPromise<void> {
143
- return this._client.post(path`/api/v1/materials/${id}/rename`, {
144
- ...options,
145
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
146
- });
188
+ rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<Material> {
189
+ return this._client.post(path`/api/v1/materials/${id}/rename`, { body, ...options });
147
190
  }
148
191
 
149
192
  /**
193
+ * Reprocess material to regenerate embeddings and extract content
194
+ *
150
195
  * @example
151
196
  * ```ts
152
- * await client.v1.materials.reprocess('id');
197
+ * const material = await client.v1.materials.reprocess('id');
153
198
  * ```
154
199
  */
155
- reprocess(id: string, options?: RequestOptions): APIPromise<void> {
156
- return this._client.post(path`/api/v1/materials/${id}/reprocess`, {
157
- ...options,
158
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
159
- });
200
+ reprocess(id: string, options?: RequestOptions): APIPromise<Material> {
201
+ return this._client.post(path`/api/v1/materials/${id}/reprocess`, options);
160
202
  }
161
203
 
162
204
  /**
163
- * Search materials using RAG
205
+ * Search materials using RAG (Retrieval-Augmented Generation)
164
206
  *
165
207
  * @example
166
208
  * ```ts
167
- * await client.v1.materials.search({ query: 'query' });
209
+ * const response = await client.v1.materials.search({
210
+ * query: 'What is photosynthesis?',
211
+ * });
168
212
  * ```
169
213
  */
170
- search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<void> {
171
- return this._client.post('/api/v1/materials/search', {
172
- body,
173
- ...options,
174
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
175
- });
214
+ search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse> {
215
+ return this._client.post('/api/v1/materials/search', { body, ...options });
176
216
  }
177
217
  }
178
218
 
219
+ export interface Content {
220
+ /**
221
+ * Type of content
222
+ */
223
+ type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
224
+
225
+ /**
226
+ * URL to fetch content from
227
+ */
228
+ sourceUrl?: string;
229
+
230
+ /**
231
+ * Text content (for text type)
232
+ */
233
+ text?: string;
234
+
235
+ /**
236
+ * URL to the content (for url type)
237
+ */
238
+ url?: string;
239
+ }
240
+
179
241
  export interface Material {
180
242
  /**
181
243
  * Material ID
@@ -256,11 +318,173 @@ export namespace Material {
256
318
 
257
319
  export type MaterialListResponse = Array<Material>;
258
320
 
321
+ export type MaterialBatchCreateResponse = Array<MaterialBatchCreateResponse.MaterialBatchCreateResponseItem>;
322
+
323
+ export namespace MaterialBatchCreateResponse {
324
+ export interface MaterialBatchCreateResponseItem {
325
+ /**
326
+ * Material ID
327
+ */
328
+ materialId: string;
329
+
330
+ /**
331
+ * Material name
332
+ */
333
+ name: string;
334
+
335
+ /**
336
+ * S3 key
337
+ */
338
+ s3Key: string;
339
+
340
+ /**
341
+ * Presigned upload URL
342
+ */
343
+ uploadUrl: string;
344
+ }
345
+ }
346
+
347
+ export interface MaterialDebugResponse {
348
+ /**
349
+ * Content details
350
+ */
351
+ content: unknown;
352
+
353
+ /**
354
+ * Content type
355
+ */
356
+ contentType: string;
357
+
358
+ /**
359
+ * Processed images
360
+ */
361
+ images: Array<MaterialDebugResponse.Image>;
362
+
363
+ /**
364
+ * Material ID
365
+ */
366
+ materialId: string;
367
+
368
+ /**
369
+ * Material metadata
370
+ */
371
+ metadata: unknown;
372
+
373
+ /**
374
+ * Material name
375
+ */
376
+ name: string;
377
+
378
+ /**
379
+ * Processing status
380
+ */
381
+ status: string;
382
+
383
+ /**
384
+ * Transcript structure for videos
385
+ */
386
+ transcriptStructure: unknown | null;
387
+ }
388
+
389
+ export namespace MaterialDebugResponse {
390
+ export interface Image {
391
+ id?: string;
392
+
393
+ description?: string;
394
+
395
+ pageIndex?: number;
396
+
397
+ s3Key?: string;
398
+
399
+ s3Url?: string;
400
+ }
401
+ }
402
+
403
+ export interface MaterialGetDownloadURLResponse {
404
+ /**
405
+ * Temporary download URL
406
+ */
407
+ downloadUrl: string;
408
+ }
409
+
410
+ export interface MaterialSearchResponse {
411
+ /**
412
+ * Whether results were filtered by scope
413
+ */
414
+ filtered: boolean;
415
+
416
+ /**
417
+ * Original search query
418
+ */
419
+ query: string;
420
+
421
+ /**
422
+ * Search results
423
+ */
424
+ results: Array<MaterialSearchResponse.Result>;
425
+
426
+ /**
427
+ * Search scope
428
+ */
429
+ scope: MaterialSearchResponse.Scope;
430
+
431
+ /**
432
+ * Total number of results
433
+ */
434
+ totalResults: number;
435
+ }
436
+
437
+ export namespace MaterialSearchResponse {
438
+ export interface Result {
439
+ /**
440
+ * Chunk index within the material
441
+ */
442
+ chunkIndex: number;
443
+
444
+ /**
445
+ * Material information
446
+ */
447
+ material: Result.Material | null;
448
+
449
+ /**
450
+ * Relevance score (0-1)
451
+ */
452
+ score: number;
453
+
454
+ /**
455
+ * Matched text chunk
456
+ */
457
+ text: string;
458
+ }
459
+
460
+ export namespace Result {
461
+ /**
462
+ * Material information
463
+ */
464
+ export interface Material {
465
+ id?: string;
466
+
467
+ contentType?: string;
468
+
469
+ name?: string;
470
+ }
471
+ }
472
+
473
+ /**
474
+ * Search scope
475
+ */
476
+ export interface Scope {
477
+ folderIds?: Array<string>;
478
+
479
+ materialIds?: Array<string>;
480
+ }
481
+ }
482
+
259
483
  export interface MaterialCreateParams {
260
484
  /**
261
485
  * Content details
262
486
  */
263
- content: MaterialCreateParams.Content;
487
+ content: Content;
264
488
 
265
489
  /**
266
490
  * Name of the material
@@ -273,42 +497,90 @@ export interface MaterialCreateParams {
273
497
  folderId?: string;
274
498
  }
275
499
 
276
- export namespace MaterialCreateParams {
500
+ export interface MaterialListParams {
277
501
  /**
278
- * Content details
502
+ * Filter by folder ID
279
503
  */
280
- export interface Content {
504
+ folderId?: string;
505
+ }
506
+
507
+ export interface MaterialBatchCreateParams {
508
+ /**
509
+ * Array of materials to create
510
+ */
511
+ materials: Array<MaterialBatchCreateParams.Material>;
512
+ }
513
+
514
+ export namespace MaterialBatchCreateParams {
515
+ export interface Material {
281
516
  /**
282
- * Type of content
517
+ * MIME type
283
518
  */
284
- type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
519
+ contentType: string;
285
520
 
286
521
  /**
287
- * URL to fetch content from
522
+ * Filename
288
523
  */
289
- sourceUrl?: string;
524
+ filename: string;
290
525
 
291
526
  /**
292
- * Text content (for text type)
527
+ * Material name
293
528
  */
294
- text?: string;
529
+ name: string;
295
530
 
296
531
  /**
297
- * URL to the content (for url type)
532
+ * Folder ID
298
533
  */
299
- url?: string;
534
+ folderId?: string;
300
535
  }
301
536
  }
302
537
 
303
- export interface MaterialListParams {
538
+ export interface MaterialCreateAndProcessParams {
304
539
  /**
305
- * Filter by folder ID
540
+ * Content details
541
+ */
542
+ content: Content;
543
+
544
+ /**
545
+ * Name of the material
546
+ */
547
+ name: string;
548
+
549
+ /**
550
+ * Folder ID to place the material in
306
551
  */
307
552
  folderId?: string;
553
+
554
+ /**
555
+ * Polling interval in milliseconds (default: 2 seconds)
556
+ */
557
+ pollIntervalMs?: number;
558
+
559
+ /**
560
+ * Maximum time to wait for processing in milliseconds (default: 5 minutes)
561
+ */
562
+ timeoutMs?: number;
308
563
  }
309
564
 
310
565
  export interface MaterialGetDownloadURLParams {
311
- expiresIn: string;
566
+ /**
567
+ * URL expiration time in seconds (default: 3600)
568
+ */
569
+ expiresIn?: number;
570
+ }
571
+
572
+ export interface MaterialMoveParams {
573
+ /**
574
+ * Target folder ID (null for root)
575
+ */
576
+ folderId: string | null;
577
+ }
578
+
579
+ export interface MaterialRenameParams {
580
+ /**
581
+ * New name for the material
582
+ */
583
+ name: string;
312
584
  }
313
585
 
314
586
  export interface MaterialSearchParams {
@@ -318,18 +590,17 @@ export interface MaterialSearchParams {
318
590
  query: string;
319
591
 
320
592
  /**
321
- * Optional: Limit search to materials within specific folders (includes
322
- * subfolders)
593
+ * Limit search to materials within specific folders (includes subfolders)
323
594
  */
324
595
  folderIds?: Array<string>;
325
596
 
326
597
  /**
327
- * Optional: Limit search to specific material IDs
598
+ * Limit search to specific material IDs
328
599
  */
329
600
  materialIds?: Array<string>;
330
601
 
331
602
  /**
332
- * Number of results to return (default: 5)
603
+ * Number of results to return
333
604
  */
334
605
  topK?: number;
335
606
  }
@@ -340,21 +611,42 @@ Materials.Test = Test;
340
611
 
341
612
  export declare namespace Materials {
342
613
  export {
614
+ type Content as Content,
343
615
  type Material as Material,
344
616
  type MaterialListResponse as MaterialListResponse,
617
+ type MaterialBatchCreateResponse as MaterialBatchCreateResponse,
618
+ type MaterialDebugResponse as MaterialDebugResponse,
619
+ type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse,
620
+ type MaterialSearchResponse as MaterialSearchResponse,
345
621
  type MaterialCreateParams as MaterialCreateParams,
346
622
  type MaterialListParams as MaterialListParams,
623
+ type MaterialBatchCreateParams as MaterialBatchCreateParams,
624
+ type MaterialCreateAndProcessParams as MaterialCreateAndProcessParams,
347
625
  type MaterialGetDownloadURLParams as MaterialGetDownloadURLParams,
626
+ type MaterialMoveParams as MaterialMoveParams,
627
+ type MaterialRenameParams as MaterialRenameParams,
348
628
  type MaterialSearchParams as MaterialSearchParams,
349
629
  };
350
630
 
351
631
  export {
352
632
  Upload as Upload,
633
+ type Complete as Complete,
634
+ type UploadCreatePresignedURLResponse as UploadCreatePresignedURLResponse,
635
+ type UploadCompleteUploadParams as UploadCompleteUploadParams,
636
+ type UploadCreatePresignedURLParams as UploadCreatePresignedURLParams,
353
637
  type UploadUploadFileParams as UploadUploadFileParams,
638
+ type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams,
354
639
  type UploadUploadFromURLParams as UploadUploadFromURLParams,
640
+ type UploadUploadURLAndProcessParams as UploadUploadURLAndProcessParams,
355
641
  };
356
642
 
357
- export { Bulk as Bulk };
643
+ export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
358
644
 
359
- export { Test as Test };
645
+ export {
646
+ Test as Test,
647
+ type TestPerformOcrResponse as TestPerformOcrResponse,
648
+ type TestProcessEpubResponse as TestProcessEpubResponse,
649
+ type TestProcessImageResponse as TestProcessImageResponse,
650
+ type TestProcessVideoResponse as TestProcessVideoResponse,
651
+ };
360
652
  }