@studyfetch/sdk 1.35.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/CHANGELOG.md +23 -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 +56 -241
  41. package/resources/v1/folders.d.mts.map +1 -1
  42. package/resources/v1/folders.d.ts +56 -241
  43. package/resources/v1/folders.d.ts.map +1 -1
  44. package/resources/v1/folders.js +2 -2
  45. package/resources/v1/folders.js.map +1 -1
  46. package/resources/v1/folders.mjs +2 -2
  47. package/resources/v1/folders.mjs.map +1 -1
  48. package/resources/v1/index.d.mts +5 -5
  49. package/resources/v1/index.d.mts.map +1 -1
  50. package/resources/v1/index.d.ts +5 -5
  51. package/resources/v1/index.d.ts.map +1 -1
  52. package/resources/v1/index.js.map +1 -1
  53. package/resources/v1/index.mjs.map +1 -1
  54. package/resources/v1/materials/index.d.mts +2 -3
  55. package/resources/v1/materials/index.d.mts.map +1 -1
  56. package/resources/v1/materials/index.d.ts +2 -3
  57. package/resources/v1/materials/index.d.ts.map +1 -1
  58. package/resources/v1/materials/index.js +1 -3
  59. package/resources/v1/materials/index.js.map +1 -1
  60. package/resources/v1/materials/index.mjs +0 -1
  61. package/resources/v1/materials/index.mjs.map +1 -1
  62. package/resources/v1/materials/materials.d.mts +74 -510
  63. package/resources/v1/materials/materials.d.mts.map +1 -1
  64. package/resources/v1/materials/materials.d.ts +74 -510
  65. package/resources/v1/materials/materials.d.ts.map +1 -1
  66. package/resources/v1/materials/materials.js +24 -23
  67. package/resources/v1/materials/materials.js.map +1 -1
  68. package/resources/v1/materials/materials.mjs +24 -23
  69. package/resources/v1/materials/materials.mjs.map +1 -1
  70. package/resources/v1/materials/upload.d.mts +12 -311
  71. package/resources/v1/materials/upload.d.mts.map +1 -1
  72. package/resources/v1/materials/upload.d.ts +12 -311
  73. package/resources/v1/materials/upload.d.ts.map +1 -1
  74. package/resources/v1/materials/upload.js +5 -5
  75. package/resources/v1/materials/upload.js.map +1 -1
  76. package/resources/v1/materials/upload.mjs +5 -5
  77. package/resources/v1/materials/upload.mjs.map +1 -1
  78. package/resources/v1/v1.d.mts +10 -10
  79. package/resources/v1/v1.d.mts.map +1 -1
  80. package/resources/v1/v1.d.ts +10 -10
  81. package/resources/v1/v1.d.ts.map +1 -1
  82. package/resources/v1/v1.js.map +1 -1
  83. package/resources/v1/v1.mjs.map +1 -1
  84. package/src/resources/v1/assignment-grader/assignment-grader.ts +20 -188
  85. package/src/resources/v1/assignment-grader/index.ts +3 -3
  86. package/src/resources/v1/assignment-grader/rubric-templates.ts +17 -165
  87. package/src/resources/v1/chat-analytics.ts +11 -128
  88. package/src/resources/v1/components.ts +20 -223
  89. package/src/resources/v1/folders.ts +71 -288
  90. package/src/resources/v1/index.ts +8 -14
  91. package/src/resources/v1/materials/index.ts +3 -20
  92. package/src/resources/v1/materials/materials.ts +201 -795
  93. package/src/resources/v1/materials/upload.ts +14 -405
  94. package/src/resources/v1/v1.ts +16 -28
  95. package/src/version.ts +1 -1
  96. package/version.d.mts +1 -1
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
  99. package/version.mjs +1 -1
  100. package/resources/v1/materials/test.d.mts +0 -136
  101. package/resources/v1/materials/test.d.mts.map +0 -1
  102. package/resources/v1/materials/test.d.ts +0 -136
  103. package/resources/v1/materials/test.d.ts.map +0 -1
  104. package/resources/v1/materials/test.js +0 -56
  105. package/resources/v1/materials/test.js.map +0 -1
  106. package/resources/v1/materials/test.mjs +0 -52
  107. package/resources/v1/materials/test.mjs.map +0 -1
  108. package/src/resources/v1/materials/test.ts +0 -175
@@ -1,37 +1,36 @@
1
1
  import { APIResource } from "../../../core/resource.mjs";
2
2
  import * as BulkAPI from "./bulk.mjs";
3
3
  import { Bulk, BulkMoveParams, BulkMoveResponse } from "./bulk.mjs";
4
- import * as TestAPI from "./test.mjs";
5
- import { Test, TestTestEpubProcessingResponse, TestTestImageProcessingResponse, TestTestOcrResponse, TestTestVideoProcessingResponse } from "./test.mjs";
6
4
  import * as UploadAPI from "./upload.mjs";
7
- import { Upload, UploadCompleteUploadParams, UploadCompleteUploadResponse, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileAndProcessResponse, UploadUploadFileParams, UploadUploadFileResponse, UploadUploadFromURLAndProcessParams, UploadUploadFromURLAndProcessResponse, UploadUploadFromURLParams, UploadUploadFromURLResponse } from "./upload.mjs";
5
+ import { Upload, UploadCompleteUploadParams, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileParams, UploadUploadFromURLAndProcessParams, UploadUploadFromURLParams } from "./upload.mjs";
8
6
  import { APIPromise } from "../../../core/api-promise.mjs";
9
7
  import { RequestOptions } from "../../../internal/request-options.mjs";
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';
182
+ export interface Content {
193
183
  /**
194
- * Creation timestamp
195
- */
196
- createdAt: string;
197
- /**
198
- * Folder ID
199
- */
200
- folderId: string | null;
201
- /**
202
- * Material name
184
+ * Type of content
203
185
  */
204
- name: string;
186
+ type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
205
187
  /**
206
- * Organization ID
188
+ * URL to fetch content from
207
189
  */
208
- organizationId: string;
190
+ sourceUrl?: string;
209
191
  /**
210
- * Material status
192
+ * Text content (for text type)
211
193
  */
212
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
213
- /**
214
- * Last update timestamp
215
- */
216
- updatedAt: string;
217
- /**
218
- * Material metadata
219
- */
220
- metadata?: unknown;
221
- /**
222
- * Usage information
223
- */
224
- usage?: unknown;
225
- }
226
- export declare namespace MaterialCreateResponse {
194
+ text?: string;
227
195
  /**
228
- * Material content
196
+ * URL to the content (for url type)
229
197
  */
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
- }
198
+ url?: string;
239
199
  }
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,70 +261,7 @@ export declare namespace MaterialRetrieveResponse {
297
261
  url?: string;
298
262
  }
299
263
  }
300
- export type MaterialListResponse = Array<MaterialListResponse.MaterialListResponseItem>;
301
- export declare namespace MaterialListResponse {
302
- interface MaterialListResponseItem {
303
- /**
304
- * Material ID
305
- */
306
- _id: string;
307
- /**
308
- * Material content
309
- */
310
- content: MaterialListResponseItem.Content;
311
- /**
312
- * Content type
313
- */
314
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
315
- /**
316
- * Creation timestamp
317
- */
318
- createdAt: string;
319
- /**
320
- * Folder ID
321
- */
322
- folderId: string | null;
323
- /**
324
- * Material name
325
- */
326
- name: string;
327
- /**
328
- * Organization ID
329
- */
330
- organizationId: string;
331
- /**
332
- * Material status
333
- */
334
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
335
- /**
336
- * Last update timestamp
337
- */
338
- updatedAt: string;
339
- /**
340
- * Material metadata
341
- */
342
- metadata?: unknown;
343
- /**
344
- * Usage information
345
- */
346
- usage?: unknown;
347
- }
348
- namespace MaterialListResponseItem {
349
- /**
350
- * Material content
351
- */
352
- interface Content {
353
- filename?: string;
354
- fileSize?: number;
355
- mimeType?: string;
356
- s3Key?: string;
357
- s3Url?: string;
358
- text?: string;
359
- url?: string;
360
- }
361
- }
362
- }
363
- export interface MaterialCreateAndProcessResponse {
264
+ export interface MaterialResponse {
364
265
  /**
365
266
  * Material ID
366
267
  */
@@ -368,7 +269,7 @@ export interface MaterialCreateAndProcessResponse {
368
269
  /**
369
270
  * Material content
370
271
  */
371
- content: MaterialCreateAndProcessResponse.Content;
272
+ content: MaterialResponse.Content;
372
273
  /**
373
274
  * Content type
374
275
  */
@@ -406,7 +307,7 @@ export interface MaterialCreateAndProcessResponse {
406
307
  */
407
308
  usage?: unknown;
408
309
  }
409
- export declare namespace MaterialCreateAndProcessResponse {
310
+ export declare namespace MaterialResponse {
410
311
  /**
411
312
  * Material content
412
313
  */
@@ -420,6 +321,12 @@ export declare namespace MaterialCreateAndProcessResponse {
420
321
  url?: string;
421
322
  }
422
323
  }
324
+ export interface MaterialListResponse {
325
+ materials?: Array<MaterialResponse>;
326
+ page?: number;
327
+ totalCount?: number;
328
+ totalPages?: number;
329
+ }
423
330
  export type MaterialCreateBatchUploadURLsResponse = Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
424
331
  export declare namespace MaterialCreateBatchUploadURLsResponse {
425
332
  interface MaterialCreateBatchUploadURLsResponseItem {
@@ -441,134 +348,6 @@ export declare namespace MaterialCreateBatchUploadURLsResponse {
441
348
  uploadUrl: string;
442
349
  }
443
350
  }
444
- export interface MaterialGenerateResponse {
445
- /**
446
- * Material ID
447
- */
448
- _id: string;
449
- /**
450
- * Material content
451
- */
452
- content: MaterialGenerateResponse.Content;
453
- /**
454
- * Content type
455
- */
456
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
457
- /**
458
- * Creation timestamp
459
- */
460
- createdAt: string;
461
- /**
462
- * Folder ID
463
- */
464
- folderId: string | null;
465
- /**
466
- * Material name
467
- */
468
- name: string;
469
- /**
470
- * Organization ID
471
- */
472
- organizationId: string;
473
- /**
474
- * Material status
475
- */
476
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
477
- /**
478
- * Last update timestamp
479
- */
480
- updatedAt: string;
481
- /**
482
- * Generation metadata
483
- */
484
- generationMetadata?: unknown;
485
- /**
486
- * Material metadata
487
- */
488
- metadata?: unknown;
489
- /**
490
- * Usage information
491
- */
492
- usage?: unknown;
493
- }
494
- export declare namespace MaterialGenerateResponse {
495
- /**
496
- * Material content
497
- */
498
- interface Content {
499
- filename?: string;
500
- fileSize?: number;
501
- mimeType?: string;
502
- s3Key?: string;
503
- s3Url?: string;
504
- text?: string;
505
- url?: string;
506
- }
507
- }
508
- export interface MaterialGenerateAndProcessResponse {
509
- /**
510
- * Material ID
511
- */
512
- _id: string;
513
- /**
514
- * Material content
515
- */
516
- content: MaterialGenerateAndProcessResponse.Content;
517
- /**
518
- * Content type
519
- */
520
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
521
- /**
522
- * Creation timestamp
523
- */
524
- createdAt: string;
525
- /**
526
- * Folder ID
527
- */
528
- folderId: string | null;
529
- /**
530
- * Material name
531
- */
532
- name: string;
533
- /**
534
- * Organization ID
535
- */
536
- organizationId: string;
537
- /**
538
- * Material status
539
- */
540
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
541
- /**
542
- * Last update timestamp
543
- */
544
- updatedAt: string;
545
- /**
546
- * Generation metadata
547
- */
548
- generationMetadata?: unknown;
549
- /**
550
- * Material metadata
551
- */
552
- metadata?: unknown;
553
- /**
554
- * Usage information
555
- */
556
- usage?: unknown;
557
- }
558
- export declare namespace MaterialGenerateAndProcessResponse {
559
- /**
560
- * Material content
561
- */
562
- interface Content {
563
- filename?: string;
564
- fileSize?: number;
565
- mimeType?: string;
566
- s3Key?: string;
567
- s3Url?: string;
568
- text?: string;
569
- url?: string;
570
- }
571
- }
572
351
  export interface MaterialGetDebugInfoResponse {
573
352
  /**
574
353
  * Content details
@@ -618,186 +397,6 @@ export interface MaterialGetDownloadURLResponse {
618
397
  */
619
398
  downloadUrl: string;
620
399
  }
621
- export interface MaterialMoveResponse {
622
- /**
623
- * Material ID
624
- */
625
- _id: string;
626
- /**
627
- * Material content
628
- */
629
- content: MaterialMoveResponse.Content;
630
- /**
631
- * Content type
632
- */
633
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
634
- /**
635
- * Creation timestamp
636
- */
637
- createdAt: string;
638
- /**
639
- * Folder ID
640
- */
641
- folderId: string | null;
642
- /**
643
- * Material name
644
- */
645
- name: string;
646
- /**
647
- * Organization ID
648
- */
649
- organizationId: string;
650
- /**
651
- * Material status
652
- */
653
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
654
- /**
655
- * Last update timestamp
656
- */
657
- updatedAt: string;
658
- /**
659
- * Material metadata
660
- */
661
- metadata?: unknown;
662
- /**
663
- * Usage information
664
- */
665
- usage?: unknown;
666
- }
667
- export declare namespace MaterialMoveResponse {
668
- /**
669
- * Material content
670
- */
671
- interface Content {
672
- filename?: string;
673
- fileSize?: number;
674
- mimeType?: string;
675
- s3Key?: string;
676
- s3Url?: string;
677
- text?: string;
678
- url?: string;
679
- }
680
- }
681
- export interface MaterialRenameResponse {
682
- /**
683
- * Material ID
684
- */
685
- _id: string;
686
- /**
687
- * Material content
688
- */
689
- content: MaterialRenameResponse.Content;
690
- /**
691
- * Content type
692
- */
693
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
694
- /**
695
- * Creation timestamp
696
- */
697
- createdAt: string;
698
- /**
699
- * Folder ID
700
- */
701
- folderId: string | null;
702
- /**
703
- * Material name
704
- */
705
- name: string;
706
- /**
707
- * Organization ID
708
- */
709
- organizationId: string;
710
- /**
711
- * Material status
712
- */
713
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
714
- /**
715
- * Last update timestamp
716
- */
717
- updatedAt: string;
718
- /**
719
- * Material metadata
720
- */
721
- metadata?: unknown;
722
- /**
723
- * Usage information
724
- */
725
- usage?: unknown;
726
- }
727
- export declare namespace MaterialRenameResponse {
728
- /**
729
- * Material content
730
- */
731
- interface Content {
732
- filename?: string;
733
- fileSize?: number;
734
- mimeType?: string;
735
- s3Key?: string;
736
- s3Url?: string;
737
- text?: string;
738
- url?: string;
739
- }
740
- }
741
- export interface MaterialReprocessResponse {
742
- /**
743
- * Material ID
744
- */
745
- _id: string;
746
- /**
747
- * Material content
748
- */
749
- content: MaterialReprocessResponse.Content;
750
- /**
751
- * Content type
752
- */
753
- contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
754
- /**
755
- * Creation timestamp
756
- */
757
- createdAt: string;
758
- /**
759
- * Folder ID
760
- */
761
- folderId: string | null;
762
- /**
763
- * Material name
764
- */
765
- name: string;
766
- /**
767
- * Organization ID
768
- */
769
- organizationId: string;
770
- /**
771
- * Material status
772
- */
773
- status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
774
- /**
775
- * Last update timestamp
776
- */
777
- updatedAt: string;
778
- /**
779
- * Material metadata
780
- */
781
- metadata?: unknown;
782
- /**
783
- * Usage information
784
- */
785
- usage?: unknown;
786
- }
787
- export declare namespace MaterialReprocessResponse {
788
- /**
789
- * Material content
790
- */
791
- interface Content {
792
- filename?: string;
793
- fileSize?: number;
794
- mimeType?: string;
795
- s3Key?: string;
796
- s3Url?: string;
797
- text?: string;
798
- url?: string;
799
- }
800
- }
801
400
  export interface MaterialSearchResponse {
802
401
  /**
803
402
  * Whether results were filtered by scope
@@ -861,7 +460,7 @@ export interface MaterialCreateParams {
861
460
  /**
862
461
  * Content details
863
462
  */
864
- content: MaterialCreateParams.Content;
463
+ content: Content;
865
464
  /**
866
465
  * Name of the material
867
466
  */
@@ -871,40 +470,29 @@ export interface MaterialCreateParams {
871
470
  */
872
471
  folderId?: string;
873
472
  }
874
- export declare namespace MaterialCreateParams {
875
- /**
876
- * Content details
877
- */
878
- interface Content {
879
- /**
880
- * Type of content
881
- */
882
- type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
883
- /**
884
- * URL to fetch content from
885
- */
886
- sourceUrl?: string;
887
- /**
888
- * Text content (for text type)
889
- */
890
- text?: string;
891
- /**
892
- * URL to the content (for url type)
893
- */
894
- url?: string;
895
- }
896
- }
897
473
  export interface MaterialListParams {
898
474
  /**
899
475
  * Filter by folder ID
900
476
  */
901
477
  folderId?: string;
478
+ /**
479
+ * Number of items per page (default: 20, max: 200)
480
+ */
481
+ limit?: string;
482
+ /**
483
+ * Page number (default: 1)
484
+ */
485
+ page?: string;
486
+ /**
487
+ * Search materials by name
488
+ */
489
+ search?: string;
902
490
  }
903
491
  export interface MaterialCreateAndProcessParams {
904
492
  /**
905
493
  * Content details
906
494
  */
907
- content: MaterialCreateAndProcessParams.Content;
495
+ content: Content;
908
496
  /**
909
497
  * Name of the material
910
498
  */
@@ -922,29 +510,6 @@ export interface MaterialCreateAndProcessParams {
922
510
  */
923
511
  timeoutMs?: number;
924
512
  }
925
- export declare namespace MaterialCreateAndProcessParams {
926
- /**
927
- * Content details
928
- */
929
- interface Content {
930
- /**
931
- * Type of content
932
- */
933
- type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
934
- /**
935
- * URL to fetch content from
936
- */
937
- sourceUrl?: string;
938
- /**
939
- * Text content (for text type)
940
- */
941
- text?: string;
942
- /**
943
- * URL to the content (for url type)
944
- */
945
- url?: string;
946
- }
947
- }
948
513
  export interface MaterialCreateBatchUploadURLsParams {
949
514
  /**
950
515
  * Array of materials to create
@@ -1076,9 +641,8 @@ export interface MaterialSearchParams {
1076
641
  topK?: number;
1077
642
  }
1078
643
  export declare namespace Materials {
1079
- 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, };
1080
- 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, };
1081
646
  export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
1082
- export { Test as Test, type TestTestEpubProcessingResponse as TestTestEpubProcessingResponse, type TestTestImageProcessingResponse as TestTestImageProcessingResponse, type TestTestOcrResponse as TestTestOcrResponse, type TestTestVideoProcessingResponse as TestTestVideoProcessingResponse, };
1083
647
  }
1084
648
  //# sourceMappingURL=materials.d.mts.map