@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.
Files changed (106) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +6 -6
  3. package/package.json +1 -1
  4. package/resources/v1/assignment-grader/assignment-grader.d.mts +15 -151
  5. package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -1
  6. package/resources/v1/assignment-grader/assignment-grader.d.ts +15 -151
  7. package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -1
  8. package/resources/v1/assignment-grader/assignment-grader.js +4 -4
  9. package/resources/v1/assignment-grader/assignment-grader.js.map +1 -1
  10. package/resources/v1/assignment-grader/assignment-grader.mjs +4 -4
  11. package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -1
  12. package/resources/v1/assignment-grader/index.d.mts +2 -2
  13. package/resources/v1/assignment-grader/index.d.mts.map +1 -1
  14. package/resources/v1/assignment-grader/index.d.ts +2 -2
  15. package/resources/v1/assignment-grader/index.d.ts.map +1 -1
  16. package/resources/v1/assignment-grader/rubric-templates.d.mts +16 -136
  17. package/resources/v1/assignment-grader/rubric-templates.d.mts.map +1 -1
  18. package/resources/v1/assignment-grader/rubric-templates.d.ts +16 -136
  19. package/resources/v1/assignment-grader/rubric-templates.d.ts.map +1 -1
  20. package/resources/v1/assignment-grader/rubric-templates.js +3 -3
  21. package/resources/v1/assignment-grader/rubric-templates.js.map +1 -1
  22. package/resources/v1/assignment-grader/rubric-templates.mjs +3 -3
  23. package/resources/v1/assignment-grader/rubric-templates.mjs.map +1 -1
  24. package/resources/v1/chat-analytics.d.mts +11 -106
  25. package/resources/v1/chat-analytics.d.mts.map +1 -1
  26. package/resources/v1/chat-analytics.d.ts +11 -106
  27. package/resources/v1/chat-analytics.d.ts.map +1 -1
  28. package/resources/v1/chat-analytics.js +4 -4
  29. package/resources/v1/chat-analytics.js.map +1 -1
  30. package/resources/v1/chat-analytics.mjs +4 -4
  31. package/resources/v1/chat-analytics.mjs.map +1 -1
  32. package/resources/v1/components.d.mts +20 -154
  33. package/resources/v1/components.d.mts.map +1 -1
  34. package/resources/v1/components.d.ts +20 -154
  35. package/resources/v1/components.d.ts.map +1 -1
  36. package/resources/v1/components.js +14 -8
  37. package/resources/v1/components.js.map +1 -1
  38. package/resources/v1/components.mjs +14 -8
  39. package/resources/v1/components.mjs.map +1 -1
  40. package/resources/v1/folders.d.mts +45 -232
  41. package/resources/v1/folders.d.mts.map +1 -1
  42. package/resources/v1/folders.d.ts +45 -232
  43. package/resources/v1/folders.d.ts.map +1 -1
  44. package/resources/v1/folders.js.map +1 -1
  45. package/resources/v1/folders.mjs.map +1 -1
  46. package/resources/v1/index.d.mts +5 -5
  47. package/resources/v1/index.d.mts.map +1 -1
  48. package/resources/v1/index.d.ts +5 -5
  49. package/resources/v1/index.d.ts.map +1 -1
  50. package/resources/v1/index.js.map +1 -1
  51. package/resources/v1/index.mjs.map +1 -1
  52. package/resources/v1/materials/index.d.mts +2 -3
  53. package/resources/v1/materials/index.d.mts.map +1 -1
  54. package/resources/v1/materials/index.d.ts +2 -3
  55. package/resources/v1/materials/index.d.ts.map +1 -1
  56. package/resources/v1/materials/index.js +1 -3
  57. package/resources/v1/materials/index.js.map +1 -1
  58. package/resources/v1/materials/index.mjs +0 -1
  59. package/resources/v1/materials/index.mjs.map +1 -1
  60. package/resources/v1/materials/materials.d.mts +66 -469
  61. package/resources/v1/materials/materials.d.mts.map +1 -1
  62. package/resources/v1/materials/materials.d.ts +66 -469
  63. package/resources/v1/materials/materials.d.ts.map +1 -1
  64. package/resources/v1/materials/materials.js +24 -23
  65. package/resources/v1/materials/materials.js.map +1 -1
  66. package/resources/v1/materials/materials.mjs +24 -23
  67. package/resources/v1/materials/materials.mjs.map +1 -1
  68. package/resources/v1/materials/upload.d.mts +12 -311
  69. package/resources/v1/materials/upload.d.mts.map +1 -1
  70. package/resources/v1/materials/upload.d.ts +12 -311
  71. package/resources/v1/materials/upload.d.ts.map +1 -1
  72. package/resources/v1/materials/upload.js +5 -5
  73. package/resources/v1/materials/upload.js.map +1 -1
  74. package/resources/v1/materials/upload.mjs +5 -5
  75. package/resources/v1/materials/upload.mjs.map +1 -1
  76. package/resources/v1/v1.d.mts +10 -10
  77. package/resources/v1/v1.d.mts.map +1 -1
  78. package/resources/v1/v1.d.ts +10 -10
  79. package/resources/v1/v1.d.ts.map +1 -1
  80. package/resources/v1/v1.js.map +1 -1
  81. package/resources/v1/v1.mjs.map +1 -1
  82. package/src/resources/v1/assignment-grader/assignment-grader.ts +20 -188
  83. package/src/resources/v1/assignment-grader/index.ts +3 -3
  84. package/src/resources/v1/assignment-grader/rubric-templates.ts +17 -165
  85. package/src/resources/v1/chat-analytics.ts +11 -128
  86. package/src/resources/v1/components.ts +20 -223
  87. package/src/resources/v1/folders.ts +52 -276
  88. package/src/resources/v1/index.ts +7 -14
  89. package/src/resources/v1/materials/index.ts +3 -20
  90. package/src/resources/v1/materials/materials.ts +194 -743
  91. package/src/resources/v1/materials/upload.ts +14 -405
  92. package/src/resources/v1/v1.ts +14 -28
  93. package/src/version.ts +1 -1
  94. package/version.d.mts +1 -1
  95. package/version.d.ts +1 -1
  96. package/version.js +1 -1
  97. package/version.mjs +1 -1
  98. package/resources/v1/materials/test.d.mts +0 -136
  99. package/resources/v1/materials/test.d.mts.map +0 -1
  100. package/resources/v1/materials/test.d.ts +0 -136
  101. package/resources/v1/materials/test.d.ts.map +0 -1
  102. package/resources/v1/materials/test.js +0 -56
  103. package/resources/v1/materials/test.js.map +0 -1
  104. package/resources/v1/materials/test.mjs +0 -52
  105. package/resources/v1/materials/test.mjs.map +0 -1
  106. package/src/resources/v1/materials/test.ts +0 -175
@@ -1,37 +1,36 @@
1
1
  import { APIResource } from "../../../core/resource.js";
2
2
  import * as BulkAPI from "./bulk.js";
3
3
  import { Bulk, BulkMoveParams, BulkMoveResponse } from "./bulk.js";
4
- import * as TestAPI from "./test.js";
5
- import { Test, TestTestEpubProcessingResponse, TestTestImageProcessingResponse, TestTestOcrResponse, TestTestVideoProcessingResponse } from "./test.js";
6
4
  import * as UploadAPI from "./upload.js";
7
- import { Upload, UploadCompleteUploadParams, UploadCompleteUploadResponse, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileAndProcessResponse, UploadUploadFileParams, UploadUploadFileResponse, UploadUploadFromURLAndProcessParams, UploadUploadFromURLAndProcessResponse, UploadUploadFromURLParams, UploadUploadFromURLResponse } from "./upload.js";
5
+ import { Upload, UploadCompleteUploadParams, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileParams, UploadUploadFromURLAndProcessParams, UploadUploadFromURLParams } from "./upload.js";
8
6
  import { APIPromise } from "../../../core/api-promise.js";
9
7
  import { RequestOptions } from "../../../internal/request-options.js";
10
8
  export declare class Materials extends APIResource {
11
9
  upload: UploadAPI.Upload;
12
10
  bulk: BulkAPI.Bulk;
13
- test: TestAPI.Test;
14
11
  /**
15
12
  * Create a new material
16
13
  *
17
14
  * @example
18
15
  * ```ts
19
- * const material = await client.v1.materials.create({
16
+ * const materialResponse = await client.v1.materials.create({
20
17
  * content: { type: 'text' },
21
18
  * name: 'Chapter 1 - Introduction',
22
19
  * });
23
20
  * ```
24
21
  */
25
- create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<MaterialCreateResponse>;
22
+ create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<MaterialResponse>;
26
23
  /**
27
24
  * Get material by ID
28
25
  *
29
26
  * @example
30
27
  * ```ts
31
- * const material = await client.v1.materials.retrieve('id');
28
+ * const materialResponse = await client.v1.materials.retrieve(
29
+ * 'id',
30
+ * );
32
31
  * ```
33
32
  */
34
- retrieve(id: string, options?: RequestOptions): APIPromise<MaterialRetrieveResponse>;
33
+ retrieve(id: string, options?: RequestOptions): APIPromise<MaterialResponse>;
35
34
  /**
36
35
  * Get all materials for organization
37
36
  *
@@ -56,15 +55,14 @@ export declare class Materials extends APIResource {
56
55
  *
57
56
  * @example
58
57
  * ```ts
59
- * const response = await client.v1.materials.createAndProcess(
60
- * {
58
+ * const materialResponse =
59
+ * await client.v1.materials.createAndProcess({
61
60
  * content: { type: 'text' },
62
61
  * name: 'Chapter 1 - Introduction',
63
- * },
64
- * );
62
+ * });
65
63
  * ```
66
64
  */
67
- createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<MaterialCreateAndProcessResponse>;
65
+ createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<MaterialResponse>;
68
66
  /**
69
67
  * Create batch upload URLs for multiple materials
70
68
  *
@@ -89,21 +87,22 @@ export declare class Materials extends APIResource {
89
87
  *
90
88
  * @example
91
89
  * ```ts
92
- * const response = await client.v1.materials.generate({
93
- * name: 'Photosynthesis Study Plan',
94
- * topic: 'Photosynthesis in plants',
95
- * type: 'notes',
96
- * });
90
+ * const generatedMaterialResponse =
91
+ * await client.v1.materials.generate({
92
+ * name: 'Photosynthesis Study Plan',
93
+ * topic: 'Photosynthesis in plants',
94
+ * type: 'notes',
95
+ * });
97
96
  * ```
98
97
  */
99
- generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<MaterialGenerateResponse>;
98
+ generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<GeneratedMaterialResponse>;
100
99
  /**
101
100
  * Uses AI to generate study materials like outlines, notes, summaries, etc. from a
102
101
  * given topic and waits for processing to complete
103
102
  *
104
103
  * @example
105
104
  * ```ts
106
- * const response =
105
+ * const generatedMaterialResponse =
107
106
  * await client.v1.materials.generateAndProcess({
108
107
  * name: 'Photosynthesis Study Plan',
109
108
  * topic: 'Photosynthesis in plants',
@@ -111,7 +110,7 @@ export declare class Materials extends APIResource {
111
110
  * });
112
111
  * ```
113
112
  */
114
- generateAndProcess(body: MaterialGenerateAndProcessParams, options?: RequestOptions): APIPromise<MaterialGenerateAndProcessResponse>;
113
+ generateAndProcess(body: MaterialGenerateAndProcessParams, options?: RequestOptions): APIPromise<GeneratedMaterialResponse>;
115
114
  /**
116
115
  * Get debug information for a material including extracted content
117
116
  *
@@ -139,32 +138,35 @@ export declare class Materials extends APIResource {
139
138
  *
140
139
  * @example
141
140
  * ```ts
142
- * const response = await client.v1.materials.move('id', {
143
- * folderId: 'folderId',
144
- * });
141
+ * const materialResponse = await client.v1.materials.move(
142
+ * 'id',
143
+ * { folderId: 'folderId' },
144
+ * );
145
145
  * ```
146
146
  */
147
- move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialMoveResponse>;
147
+ move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialResponse>;
148
148
  /**
149
149
  * Rename a material
150
150
  *
151
151
  * @example
152
152
  * ```ts
153
- * const response = await client.v1.materials.rename('id', {
154
- * name: 'New Material Name',
155
- * });
153
+ * const materialResponse = await client.v1.materials.rename(
154
+ * 'id',
155
+ * { name: 'New Material Name' },
156
+ * );
156
157
  * ```
157
158
  */
158
- rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<MaterialRenameResponse>;
159
+ rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<MaterialResponse>;
159
160
  /**
160
161
  * Reprocess material to regenerate embeddings and extract content
161
162
  *
162
163
  * @example
163
164
  * ```ts
164
- * const response = await client.v1.materials.reprocess('id');
165
+ * const materialResponse =
166
+ * await client.v1.materials.reprocess('id');
165
167
  * ```
166
168
  */
167
- reprocess(id: string, options?: RequestOptions): APIPromise<MaterialReprocessResponse>;
169
+ reprocess(id: string, options?: RequestOptions): APIPromise<MaterialResponse>;
168
170
  /**
169
171
  * Search materials using RAG (Retrieval-Augmented Generation)
170
172
  *
@@ -177,67 +179,25 @@ export declare class Materials extends APIResource {
177
179
  */
178
180
  search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse>;
179
181
  }
180
- export interface MaterialCreateResponse {
181
- /**
182
- * Material ID
183
- */
184
- _id: string;
185
- /**
186
- * Material content
187
- */
188
- content: MaterialCreateResponse.Content;
189
- /**
190
- * Content type
191
- */
192
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
193
- /**
194
- * Creation timestamp
195
- */
196
- createdAt: string;
197
- /**
198
- * Folder ID
199
- */
200
- folderId: string | null;
201
- /**
202
- * Material name
203
- */
204
- name: string;
182
+ export interface Content {
205
183
  /**
206
- * Organization ID
184
+ * Type of content
207
185
  */
208
- organizationId: string;
186
+ type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
209
187
  /**
210
- * Material status
188
+ * URL to fetch content from
211
189
  */
212
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
190
+ sourceUrl?: string;
213
191
  /**
214
- * Last update timestamp
192
+ * Text content (for text type)
215
193
  */
216
- updatedAt: string;
194
+ text?: string;
217
195
  /**
218
- * Material metadata
196
+ * URL to the content (for url type)
219
197
  */
220
- metadata?: unknown;
221
- /**
222
- * Usage information
223
- */
224
- usage?: unknown;
198
+ url?: string;
225
199
  }
226
- export declare namespace MaterialCreateResponse {
227
- /**
228
- * Material content
229
- */
230
- interface Content {
231
- filename?: string;
232
- fileSize?: number;
233
- mimeType?: string;
234
- s3Key?: string;
235
- s3Url?: string;
236
- text?: string;
237
- url?: string;
238
- }
239
- }
240
- export interface MaterialRetrieveResponse {
200
+ export interface GeneratedMaterialResponse {
241
201
  /**
242
202
  * Material ID
243
203
  */
@@ -245,7 +205,7 @@ export interface MaterialRetrieveResponse {
245
205
  /**
246
206
  * Material content
247
207
  */
248
- content: MaterialRetrieveResponse.Content;
208
+ content: GeneratedMaterialResponse.Content;
249
209
  /**
250
210
  * Content type
251
211
  */
@@ -274,6 +234,10 @@ export interface MaterialRetrieveResponse {
274
234
  * Last update timestamp
275
235
  */
276
236
  updatedAt: string;
237
+ /**
238
+ * Generation metadata
239
+ */
240
+ generationMetadata?: unknown;
277
241
  /**
278
242
  * Material metadata
279
243
  */
@@ -283,7 +247,7 @@ export interface MaterialRetrieveResponse {
283
247
  */
284
248
  usage?: unknown;
285
249
  }
286
- export declare namespace MaterialRetrieveResponse {
250
+ export declare namespace GeneratedMaterialResponse {
287
251
  /**
288
252
  * Material content
289
253
  */
@@ -297,29 +261,7 @@ export declare namespace MaterialRetrieveResponse {
297
261
  url?: string;
298
262
  }
299
263
  }
300
- export interface MaterialListResponse {
301
- /**
302
- * Array of materials
303
- */
304
- data: Array<unknown>;
305
- /**
306
- * Number of items per page
307
- */
308
- limit: number;
309
- /**
310
- * Current page number
311
- */
312
- page: number;
313
- /**
314
- * Total number of materials
315
- */
316
- total: number;
317
- /**
318
- * Total number of pages
319
- */
320
- totalPages: number;
321
- }
322
- export interface MaterialCreateAndProcessResponse {
264
+ export interface MaterialResponse {
323
265
  /**
324
266
  * Material ID
325
267
  */
@@ -327,7 +269,7 @@ export interface MaterialCreateAndProcessResponse {
327
269
  /**
328
270
  * Material content
329
271
  */
330
- content: MaterialCreateAndProcessResponse.Content;
272
+ content: MaterialResponse.Content;
331
273
  /**
332
274
  * Content type
333
275
  */
@@ -365,7 +307,7 @@ export interface MaterialCreateAndProcessResponse {
365
307
  */
366
308
  usage?: unknown;
367
309
  }
368
- export declare namespace MaterialCreateAndProcessResponse {
310
+ export declare namespace MaterialResponse {
369
311
  /**
370
312
  * Material content
371
313
  */
@@ -379,6 +321,12 @@ export declare namespace MaterialCreateAndProcessResponse {
379
321
  url?: string;
380
322
  }
381
323
  }
324
+ export interface MaterialListResponse {
325
+ materials?: Array<MaterialResponse>;
326
+ page?: number;
327
+ totalCount?: number;
328
+ totalPages?: number;
329
+ }
382
330
  export type MaterialCreateBatchUploadURLsResponse = Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
383
331
  export declare namespace MaterialCreateBatchUploadURLsResponse {
384
332
  interface MaterialCreateBatchUploadURLsResponseItem {
@@ -400,134 +348,6 @@ export declare namespace MaterialCreateBatchUploadURLsResponse {
400
348
  uploadUrl: string;
401
349
  }
402
350
  }
403
- export interface MaterialGenerateResponse {
404
- /**
405
- * Material ID
406
- */
407
- _id: string;
408
- /**
409
- * Material content
410
- */
411
- content: MaterialGenerateResponse.Content;
412
- /**
413
- * Content type
414
- */
415
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
416
- /**
417
- * Creation timestamp
418
- */
419
- createdAt: string;
420
- /**
421
- * Folder ID
422
- */
423
- folderId: string | null;
424
- /**
425
- * Material name
426
- */
427
- name: string;
428
- /**
429
- * Organization ID
430
- */
431
- organizationId: string;
432
- /**
433
- * Material status
434
- */
435
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
436
- /**
437
- * Last update timestamp
438
- */
439
- updatedAt: string;
440
- /**
441
- * Generation metadata
442
- */
443
- generationMetadata?: unknown;
444
- /**
445
- * Material metadata
446
- */
447
- metadata?: unknown;
448
- /**
449
- * Usage information
450
- */
451
- usage?: unknown;
452
- }
453
- export declare namespace MaterialGenerateResponse {
454
- /**
455
- * Material content
456
- */
457
- interface Content {
458
- filename?: string;
459
- fileSize?: number;
460
- mimeType?: string;
461
- s3Key?: string;
462
- s3Url?: string;
463
- text?: string;
464
- url?: string;
465
- }
466
- }
467
- export interface MaterialGenerateAndProcessResponse {
468
- /**
469
- * Material ID
470
- */
471
- _id: string;
472
- /**
473
- * Material content
474
- */
475
- content: MaterialGenerateAndProcessResponse.Content;
476
- /**
477
- * Content type
478
- */
479
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
480
- /**
481
- * Creation timestamp
482
- */
483
- createdAt: string;
484
- /**
485
- * Folder ID
486
- */
487
- folderId: string | null;
488
- /**
489
- * Material name
490
- */
491
- name: string;
492
- /**
493
- * Organization ID
494
- */
495
- organizationId: string;
496
- /**
497
- * Material status
498
- */
499
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
500
- /**
501
- * Last update timestamp
502
- */
503
- updatedAt: string;
504
- /**
505
- * Generation metadata
506
- */
507
- generationMetadata?: unknown;
508
- /**
509
- * Material metadata
510
- */
511
- metadata?: unknown;
512
- /**
513
- * Usage information
514
- */
515
- usage?: unknown;
516
- }
517
- export declare namespace MaterialGenerateAndProcessResponse {
518
- /**
519
- * Material content
520
- */
521
- interface Content {
522
- filename?: string;
523
- fileSize?: number;
524
- mimeType?: string;
525
- s3Key?: string;
526
- s3Url?: string;
527
- text?: string;
528
- url?: string;
529
- }
530
- }
531
351
  export interface MaterialGetDebugInfoResponse {
532
352
  /**
533
353
  * Content details
@@ -577,186 +397,6 @@ export interface MaterialGetDownloadURLResponse {
577
397
  */
578
398
  downloadUrl: string;
579
399
  }
580
- export interface MaterialMoveResponse {
581
- /**
582
- * Material ID
583
- */
584
- _id: string;
585
- /**
586
- * Material content
587
- */
588
- content: MaterialMoveResponse.Content;
589
- /**
590
- * Content type
591
- */
592
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
593
- /**
594
- * Creation timestamp
595
- */
596
- createdAt: string;
597
- /**
598
- * Folder ID
599
- */
600
- folderId: string | null;
601
- /**
602
- * Material name
603
- */
604
- name: string;
605
- /**
606
- * Organization ID
607
- */
608
- organizationId: string;
609
- /**
610
- * Material status
611
- */
612
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
613
- /**
614
- * Last update timestamp
615
- */
616
- updatedAt: string;
617
- /**
618
- * Material metadata
619
- */
620
- metadata?: unknown;
621
- /**
622
- * Usage information
623
- */
624
- usage?: unknown;
625
- }
626
- export declare namespace MaterialMoveResponse {
627
- /**
628
- * Material content
629
- */
630
- interface Content {
631
- filename?: string;
632
- fileSize?: number;
633
- mimeType?: string;
634
- s3Key?: string;
635
- s3Url?: string;
636
- text?: string;
637
- url?: string;
638
- }
639
- }
640
- export interface MaterialRenameResponse {
641
- /**
642
- * Material ID
643
- */
644
- _id: string;
645
- /**
646
- * Material content
647
- */
648
- content: MaterialRenameResponse.Content;
649
- /**
650
- * Content type
651
- */
652
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
653
- /**
654
- * Creation timestamp
655
- */
656
- createdAt: string;
657
- /**
658
- * Folder ID
659
- */
660
- folderId: string | null;
661
- /**
662
- * Material name
663
- */
664
- name: string;
665
- /**
666
- * Organization ID
667
- */
668
- organizationId: string;
669
- /**
670
- * Material status
671
- */
672
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
673
- /**
674
- * Last update timestamp
675
- */
676
- updatedAt: string;
677
- /**
678
- * Material metadata
679
- */
680
- metadata?: unknown;
681
- /**
682
- * Usage information
683
- */
684
- usage?: unknown;
685
- }
686
- export declare namespace MaterialRenameResponse {
687
- /**
688
- * Material content
689
- */
690
- interface Content {
691
- filename?: string;
692
- fileSize?: number;
693
- mimeType?: string;
694
- s3Key?: string;
695
- s3Url?: string;
696
- text?: string;
697
- url?: string;
698
- }
699
- }
700
- export interface MaterialReprocessResponse {
701
- /**
702
- * Material ID
703
- */
704
- _id: string;
705
- /**
706
- * Material content
707
- */
708
- content: MaterialReprocessResponse.Content;
709
- /**
710
- * Content type
711
- */
712
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
713
- /**
714
- * Creation timestamp
715
- */
716
- createdAt: string;
717
- /**
718
- * Folder ID
719
- */
720
- folderId: string | null;
721
- /**
722
- * Material name
723
- */
724
- name: string;
725
- /**
726
- * Organization ID
727
- */
728
- organizationId: string;
729
- /**
730
- * Material status
731
- */
732
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
733
- /**
734
- * Last update timestamp
735
- */
736
- updatedAt: string;
737
- /**
738
- * Material metadata
739
- */
740
- metadata?: unknown;
741
- /**
742
- * Usage information
743
- */
744
- usage?: unknown;
745
- }
746
- export declare namespace MaterialReprocessResponse {
747
- /**
748
- * Material content
749
- */
750
- interface Content {
751
- filename?: string;
752
- fileSize?: number;
753
- mimeType?: string;
754
- s3Key?: string;
755
- s3Url?: string;
756
- text?: string;
757
- url?: string;
758
- }
759
- }
760
400
  export interface MaterialSearchResponse {
761
401
  /**
762
402
  * Whether results were filtered by scope
@@ -820,7 +460,7 @@ export interface MaterialCreateParams {
820
460
  /**
821
461
  * Content details
822
462
  */
823
- content: MaterialCreateParams.Content;
463
+ content: Content;
824
464
  /**
825
465
  * Name of the material
826
466
  */
@@ -830,29 +470,6 @@ export interface MaterialCreateParams {
830
470
  */
831
471
  folderId?: string;
832
472
  }
833
- export declare namespace MaterialCreateParams {
834
- /**
835
- * Content details
836
- */
837
- interface Content {
838
- /**
839
- * Type of content
840
- */
841
- type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
842
- /**
843
- * URL to fetch content from
844
- */
845
- sourceUrl?: string;
846
- /**
847
- * Text content (for text type)
848
- */
849
- text?: string;
850
- /**
851
- * URL to the content (for url type)
852
- */
853
- url?: string;
854
- }
855
- }
856
473
  export interface MaterialListParams {
857
474
  /**
858
475
  * Filter by folder ID
@@ -866,12 +483,16 @@ export interface MaterialListParams {
866
483
  * Page number (default: 1)
867
484
  */
868
485
  page?: string;
486
+ /**
487
+ * Search materials by name
488
+ */
489
+ search?: string;
869
490
  }
870
491
  export interface MaterialCreateAndProcessParams {
871
492
  /**
872
493
  * Content details
873
494
  */
874
- content: MaterialCreateAndProcessParams.Content;
495
+ content: Content;
875
496
  /**
876
497
  * Name of the material
877
498
  */
@@ -889,29 +510,6 @@ export interface MaterialCreateAndProcessParams {
889
510
  */
890
511
  timeoutMs?: number;
891
512
  }
892
- export declare namespace MaterialCreateAndProcessParams {
893
- /**
894
- * Content details
895
- */
896
- interface Content {
897
- /**
898
- * Type of content
899
- */
900
- type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
901
- /**
902
- * URL to fetch content from
903
- */
904
- sourceUrl?: string;
905
- /**
906
- * Text content (for text type)
907
- */
908
- text?: string;
909
- /**
910
- * URL to the content (for url type)
911
- */
912
- url?: string;
913
- }
914
- }
915
513
  export interface MaterialCreateBatchUploadURLsParams {
916
514
  /**
917
515
  * Array of materials to create
@@ -1043,9 +641,8 @@ export interface MaterialSearchParams {
1043
641
  topK?: number;
1044
642
  }
1045
643
  export declare namespace Materials {
1046
- export { type MaterialCreateResponse as MaterialCreateResponse, type MaterialRetrieveResponse as MaterialRetrieveResponse, type MaterialListResponse as MaterialListResponse, type MaterialCreateAndProcessResponse as MaterialCreateAndProcessResponse, type MaterialCreateBatchUploadURLsResponse as MaterialCreateBatchUploadURLsResponse, type MaterialGenerateResponse as MaterialGenerateResponse, type MaterialGenerateAndProcessResponse as MaterialGenerateAndProcessResponse, type MaterialGetDebugInfoResponse as MaterialGetDebugInfoResponse, type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse, type MaterialMoveResponse as MaterialMoveResponse, type MaterialRenameResponse as MaterialRenameResponse, type MaterialReprocessResponse as MaterialReprocessResponse, type MaterialSearchResponse as MaterialSearchResponse, type MaterialCreateParams as MaterialCreateParams, type MaterialListParams as MaterialListParams, type MaterialCreateAndProcessParams as MaterialCreateAndProcessParams, type MaterialCreateBatchUploadURLsParams as MaterialCreateBatchUploadURLsParams, type MaterialGenerateParams as MaterialGenerateParams, type MaterialGenerateAndProcessParams as MaterialGenerateAndProcessParams, type MaterialGetDownloadURLParams as MaterialGetDownloadURLParams, type MaterialMoveParams as MaterialMoveParams, type MaterialRenameParams as MaterialRenameParams, type MaterialSearchParams as MaterialSearchParams, };
1047
- export { Upload as Upload, type UploadCompleteUploadResponse as UploadCompleteUploadResponse, type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse, type UploadUploadFileResponse as UploadUploadFileResponse, type UploadUploadFileAndProcessResponse as UploadUploadFileAndProcessResponse, type UploadUploadFromURLResponse as UploadUploadFromURLResponse, type UploadUploadFromURLAndProcessResponse as UploadUploadFromURLAndProcessResponse, type UploadCompleteUploadParams as UploadCompleteUploadParams, type UploadGetPresignedURLParams as UploadGetPresignedURLParams, type UploadUploadFileParams as UploadUploadFileParams, type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams, type UploadUploadFromURLParams as UploadUploadFromURLParams, type UploadUploadFromURLAndProcessParams as UploadUploadFromURLAndProcessParams, };
644
+ export { type Content as Content, type GeneratedMaterialResponse as GeneratedMaterialResponse, type MaterialResponse as MaterialResponse, type MaterialListResponse as MaterialListResponse, type MaterialCreateBatchUploadURLsResponse as MaterialCreateBatchUploadURLsResponse, type MaterialGetDebugInfoResponse as MaterialGetDebugInfoResponse, type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse, type MaterialSearchResponse as MaterialSearchResponse, type MaterialCreateParams as MaterialCreateParams, type MaterialListParams as MaterialListParams, type MaterialCreateAndProcessParams as MaterialCreateAndProcessParams, type MaterialCreateBatchUploadURLsParams as MaterialCreateBatchUploadURLsParams, type MaterialGenerateParams as MaterialGenerateParams, type MaterialGenerateAndProcessParams as MaterialGenerateAndProcessParams, type MaterialGetDownloadURLParams as MaterialGetDownloadURLParams, type MaterialMoveParams as MaterialMoveParams, type MaterialRenameParams as MaterialRenameParams, type MaterialSearchParams as MaterialSearchParams, };
645
+ export { Upload as Upload, type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse, type UploadCompleteUploadParams as UploadCompleteUploadParams, type UploadGetPresignedURLParams as UploadGetPresignedURLParams, type UploadUploadFileParams as UploadUploadFileParams, type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams, type UploadUploadFromURLParams as UploadUploadFromURLParams, type UploadUploadFromURLAndProcessParams as UploadUploadFromURLAndProcessParams, };
1048
646
  export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
1049
- export { Test as Test, type TestTestEpubProcessingResponse as TestTestEpubProcessingResponse, type TestTestImageProcessingResponse as TestTestImageProcessingResponse, type TestTestOcrResponse as TestTestOcrResponse, type TestTestVideoProcessingResponse as TestTestVideoProcessingResponse, };
1050
647
  }
1051
648
  //# sourceMappingURL=materials.d.ts.map