@studyfetch/sdk 1.33.0 → 1.35.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 +35 -0
  2. package/README.md +1 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts.map +1 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs.map +1 -1
  7. package/package.json +4 -5
  8. package/resources/v1/assignment-grader/assignment-grader.d.mts +313 -0
  9. package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -0
  10. package/resources/v1/assignment-grader/assignment-grader.d.ts +313 -0
  11. package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -0
  12. package/resources/v1/assignment-grader/assignment-grader.js +87 -0
  13. package/resources/v1/assignment-grader/assignment-grader.js.map +1 -0
  14. package/resources/v1/assignment-grader/assignment-grader.mjs +82 -0
  15. package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -0
  16. package/resources/v1/assignment-grader/index.d.mts +3 -0
  17. package/resources/v1/assignment-grader/index.d.mts.map +1 -0
  18. package/resources/v1/assignment-grader/index.d.ts +3 -0
  19. package/resources/v1/assignment-grader/index.d.ts.map +1 -0
  20. package/resources/v1/assignment-grader/index.js +9 -0
  21. package/resources/v1/assignment-grader/index.js.map +1 -0
  22. package/resources/v1/assignment-grader/index.mjs +4 -0
  23. package/resources/v1/assignment-grader/index.mjs.map +1 -0
  24. package/resources/v1/assignment-grader/rubric-templates.d.mts +238 -0
  25. package/resources/v1/assignment-grader/rubric-templates.d.mts.map +1 -0
  26. package/resources/v1/assignment-grader/rubric-templates.d.ts +238 -0
  27. package/resources/v1/assignment-grader/rubric-templates.d.ts.map +1 -0
  28. package/resources/v1/assignment-grader/rubric-templates.js +68 -0
  29. package/resources/v1/assignment-grader/rubric-templates.js.map +1 -0
  30. package/resources/v1/assignment-grader/rubric-templates.mjs +64 -0
  31. package/resources/v1/assignment-grader/rubric-templates.mjs.map +1 -0
  32. package/resources/v1/assignment-grader.d.mts +1 -152
  33. package/resources/v1/assignment-grader.d.mts.map +1 -1
  34. package/resources/v1/assignment-grader.d.ts +1 -152
  35. package/resources/v1/assignment-grader.d.ts.map +1 -1
  36. package/resources/v1/assignment-grader.js +2 -62
  37. package/resources/v1/assignment-grader.js.map +1 -1
  38. package/resources/v1/assignment-grader.mjs +1 -60
  39. package/resources/v1/assignment-grader.mjs.map +1 -1
  40. package/resources/v1/chat-analytics.d.mts +316 -0
  41. package/resources/v1/chat-analytics.d.mts.map +1 -0
  42. package/resources/v1/chat-analytics.d.ts +316 -0
  43. package/resources/v1/chat-analytics.d.ts.map +1 -0
  44. package/resources/v1/chat-analytics.js +50 -0
  45. package/resources/v1/chat-analytics.js.map +1 -0
  46. package/resources/v1/chat-analytics.mjs +46 -0
  47. package/resources/v1/chat-analytics.mjs.map +1 -0
  48. package/resources/v1/components.d.mts +184 -10
  49. package/resources/v1/components.d.mts.map +1 -1
  50. package/resources/v1/components.d.ts +184 -10
  51. package/resources/v1/components.d.ts.map +1 -1
  52. package/resources/v1/components.js.map +1 -1
  53. package/resources/v1/components.mjs.map +1 -1
  54. package/resources/v1/folders.d.mts +528 -21
  55. package/resources/v1/folders.d.mts.map +1 -1
  56. package/resources/v1/folders.d.ts +528 -21
  57. package/resources/v1/folders.d.ts.map +1 -1
  58. package/resources/v1/folders.js +25 -39
  59. package/resources/v1/folders.js.map +1 -1
  60. package/resources/v1/folders.mjs +25 -39
  61. package/resources/v1/folders.mjs.map +1 -1
  62. package/resources/v1/index.d.mts +7 -5
  63. package/resources/v1/index.d.mts.map +1 -1
  64. package/resources/v1/index.d.ts +7 -5
  65. package/resources/v1/index.d.ts.map +1 -1
  66. package/resources/v1/index.js +13 -9
  67. package/resources/v1/index.js.map +1 -1
  68. package/resources/v1/index.mjs +5 -3
  69. package/resources/v1/index.mjs.map +1 -1
  70. package/resources/v1/materials/index.d.mts +3 -3
  71. package/resources/v1/materials/index.d.mts.map +1 -1
  72. package/resources/v1/materials/index.d.ts +3 -3
  73. package/resources/v1/materials/index.d.ts.map +1 -1
  74. package/resources/v1/materials/index.js.map +1 -1
  75. package/resources/v1/materials/index.mjs.map +1 -1
  76. package/resources/v1/materials/materials.d.mts +548 -92
  77. package/resources/v1/materials/materials.d.mts.map +1 -1
  78. package/resources/v1/materials/materials.d.ts +548 -92
  79. package/resources/v1/materials/materials.d.ts.map +1 -1
  80. package/resources/v1/materials/materials.js +36 -34
  81. package/resources/v1/materials/materials.js.map +1 -1
  82. package/resources/v1/materials/materials.mjs +36 -34
  83. package/resources/v1/materials/materials.mjs.map +1 -1
  84. package/resources/v1/materials/test.d.mts +29 -30
  85. package/resources/v1/materials/test.d.mts.map +1 -1
  86. package/resources/v1/materials/test.d.ts +29 -30
  87. package/resources/v1/materials/test.d.ts.map +1 -1
  88. package/resources/v1/materials/test.js +14 -15
  89. package/resources/v1/materials/test.js.map +1 -1
  90. package/resources/v1/materials/test.mjs +14 -15
  91. package/resources/v1/materials/test.mjs.map +1 -1
  92. package/resources/v1/materials/upload.d.mts +312 -23
  93. package/resources/v1/materials/upload.d.mts.map +1 -1
  94. package/resources/v1/materials/upload.d.ts +312 -23
  95. package/resources/v1/materials/upload.d.ts.map +1 -1
  96. package/resources/v1/materials/upload.js +9 -9
  97. package/resources/v1/materials/upload.js.map +1 -1
  98. package/resources/v1/materials/upload.mjs +9 -9
  99. package/resources/v1/materials/upload.mjs.map +1 -1
  100. package/resources/v1/usage-analyst.d.mts +99 -0
  101. package/resources/v1/usage-analyst.d.mts.map +1 -0
  102. package/resources/v1/usage-analyst.d.ts +99 -0
  103. package/resources/v1/usage-analyst.d.ts.map +1 -0
  104. package/resources/v1/{usage/analyst.js → usage-analyst.js} +9 -9
  105. package/resources/v1/usage-analyst.js.map +1 -0
  106. package/resources/v1/{usage/analyst.mjs → usage-analyst.mjs} +7 -7
  107. package/resources/v1/usage-analyst.mjs.map +1 -0
  108. package/resources/v1/usage.d.mts +109 -1
  109. package/resources/v1/usage.d.mts.map +1 -1
  110. package/resources/v1/usage.d.ts +109 -1
  111. package/resources/v1/usage.d.ts.map +1 -1
  112. package/resources/v1/usage.js +55 -2
  113. package/resources/v1/usage.js.map +1 -1
  114. package/resources/v1/usage.mjs +53 -1
  115. package/resources/v1/usage.mjs.map +1 -1
  116. package/resources/v1/v1.d.mts +20 -12
  117. package/resources/v1/v1.d.mts.map +1 -1
  118. package/resources/v1/v1.d.ts +20 -12
  119. package/resources/v1/v1.d.ts.map +1 -1
  120. package/resources/v1/v1.js +14 -6
  121. package/resources/v1/v1.js.map +1 -1
  122. package/resources/v1/v1.mjs +15 -7
  123. package/resources/v1/v1.mjs.map +1 -1
  124. package/src/client.ts +2 -0
  125. package/src/resources/v1/assignment-grader/assignment-grader.ts +421 -0
  126. package/src/resources/v1/assignment-grader/index.ts +16 -0
  127. package/src/resources/v1/assignment-grader/rubric-templates.ts +305 -0
  128. package/src/resources/v1/assignment-grader.ts +1 -196
  129. package/src/resources/v1/chat-analytics.ts +413 -0
  130. package/src/resources/v1/components.ts +265 -10
  131. package/src/resources/v1/folders.ts +659 -51
  132. package/src/resources/v1/index.ts +48 -11
  133. package/src/resources/v1/materials/index.ts +23 -14
  134. package/src/resources/v1/materials/materials.ts +824 -216
  135. package/src/resources/v1/materials/test.ts +38 -39
  136. package/src/resources/v1/materials/upload.ts +411 -30
  137. package/src/resources/v1/{usage/analyst.ts → usage-analyst.ts} +24 -23
  138. package/src/resources/v1/usage.ts +179 -1
  139. package/src/resources/v1/v1.ts +106 -29
  140. package/src/version.ts +1 -1
  141. package/version.d.mts +1 -1
  142. package/version.d.ts +1 -1
  143. package/version.js +1 -1
  144. package/version.mjs +1 -1
  145. package/resources/v1/usage/analyst.d.mts +0 -99
  146. package/resources/v1/usage/analyst.d.mts.map +0 -1
  147. package/resources/v1/usage/analyst.d.ts +0 -99
  148. package/resources/v1/usage/analyst.d.ts.map +0 -1
  149. package/resources/v1/usage/analyst.js.map +0 -1
  150. package/resources/v1/usage/analyst.mjs.map +0 -1
  151. package/resources/v1/usage/index.d.mts +0 -3
  152. package/resources/v1/usage/index.d.mts.map +0 -1
  153. package/resources/v1/usage/index.d.ts +0 -3
  154. package/resources/v1/usage/index.d.ts.map +0 -1
  155. package/resources/v1/usage/index.js +0 -9
  156. package/resources/v1/usage/index.js.map +0 -1
  157. package/resources/v1/usage/index.mjs +0 -4
  158. package/resources/v1/usage/index.mjs.map +0 -1
  159. package/resources/v1/usage/usage.d.mts +0 -114
  160. package/resources/v1/usage/usage.d.mts.map +0 -1
  161. package/resources/v1/usage/usage.d.ts +0 -114
  162. package/resources/v1/usage/usage.d.ts.map +0 -1
  163. package/resources/v1/usage/usage.js +0 -67
  164. package/resources/v1/usage/usage.js.map +0 -1
  165. package/resources/v1/usage/usage.mjs +0 -62
  166. package/resources/v1/usage/usage.mjs.map +0 -1
  167. package/src/resources/v1/usage/index.ts +0 -15
  168. package/src/resources/v1/usage/usage.ts +0 -200
@@ -2,9 +2,9 @@ import { APIResource } from "../../../core/resource.mjs";
2
2
  import * as BulkAPI from "./bulk.mjs";
3
3
  import { Bulk, BulkMoveParams, BulkMoveResponse } from "./bulk.mjs";
4
4
  import * as TestAPI from "./test.mjs";
5
- import { Test, TestPerformOcrResponse, TestProcessEpubResponse, TestProcessImageResponse, TestProcessVideoResponse } from "./test.mjs";
5
+ import { Test, TestTestEpubProcessingResponse, TestTestImageProcessingResponse, TestTestOcrResponse, TestTestVideoProcessingResponse } from "./test.mjs";
6
6
  import * as UploadAPI from "./upload.mjs";
7
- import { Complete, Upload, UploadCompleteUploadParams, UploadCreatePresignedURLParams, UploadCreatePresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileParams, UploadUploadFromURLParams, UploadUploadURLAndProcessParams } from "./upload.mjs";
7
+ import { Upload, UploadCompleteUploadParams, UploadCompleteUploadResponse, UploadGetPresignedURLParams, UploadGetPresignedURLResponse, UploadUploadFileAndProcessParams, UploadUploadFileAndProcessResponse, UploadUploadFileParams, UploadUploadFileResponse, UploadUploadFromURLAndProcessParams, UploadUploadFromURLAndProcessResponse, UploadUploadFromURLParams, UploadUploadFromURLResponse } from "./upload.mjs";
8
8
  import { APIPromise } from "../../../core/api-promise.mjs";
9
9
  import { RequestOptions } from "../../../internal/request-options.mjs";
10
10
  export declare class Materials extends APIResource {
@@ -22,7 +22,7 @@ export declare class Materials extends APIResource {
22
22
  * });
23
23
  * ```
24
24
  */
25
- create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<Material>;
25
+ create(body: MaterialCreateParams, options?: RequestOptions): APIPromise<MaterialCreateResponse>;
26
26
  /**
27
27
  * Get material by ID
28
28
  *
@@ -31,7 +31,7 @@ export declare class Materials extends APIResource {
31
31
  * const material = await client.v1.materials.retrieve('id');
32
32
  * ```
33
33
  */
34
- retrieve(id: string, options?: RequestOptions): APIPromise<Material>;
34
+ retrieve(id: string, options?: RequestOptions): APIPromise<MaterialRetrieveResponse>;
35
35
  /**
36
36
  * Get all materials for organization
37
37
  *
@@ -50,30 +50,13 @@ export declare class Materials extends APIResource {
50
50
  * ```
51
51
  */
52
52
  delete(id: string, options?: RequestOptions): APIPromise<void>;
53
- /**
54
- * Create batch upload URLs for multiple materials
55
- *
56
- * @example
57
- * ```ts
58
- * const response = await client.v1.materials.batchCreate({
59
- * materials: [
60
- * {
61
- * contentType: 'application/pdf',
62
- * filename: 'document.pdf',
63
- * name: 'Chapter 1',
64
- * },
65
- * ],
66
- * });
67
- * ```
68
- */
69
- batchCreate(body: MaterialBatchCreateParams, options?: RequestOptions): APIPromise<MaterialBatchCreateResponse>;
70
53
  /**
71
54
  * Creates a material and waits for processing to finish before returning. Useful
72
55
  * for synchronous API usage.
73
56
  *
74
57
  * @example
75
58
  * ```ts
76
- * const material = await client.v1.materials.createAndProcess(
59
+ * const response = await client.v1.materials.createAndProcess(
77
60
  * {
78
61
  * content: { type: 'text' },
79
62
  * name: 'Chapter 1 - Introduction',
@@ -81,38 +64,46 @@ export declare class Materials extends APIResource {
81
64
  * );
82
65
  * ```
83
66
  */
84
- createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<Material>;
67
+ createAndProcess(body: MaterialCreateAndProcessParams, options?: RequestOptions): APIPromise<MaterialCreateAndProcessResponse>;
85
68
  /**
86
- * Get debug information for a material including extracted content
69
+ * Create batch upload URLs for multiple materials
87
70
  *
88
71
  * @example
89
72
  * ```ts
90
- * const response = await client.v1.materials.debug('id');
73
+ * const response =
74
+ * await client.v1.materials.createBatchUploadURLs({
75
+ * materials: [
76
+ * {
77
+ * contentType: 'application/pdf',
78
+ * filename: 'document.pdf',
79
+ * name: 'Chapter 1',
80
+ * },
81
+ * ],
82
+ * });
91
83
  * ```
92
84
  */
93
- debug(id: string, options?: RequestOptions): APIPromise<MaterialDebugResponse>;
85
+ createBatchUploadURLs(body: MaterialCreateBatchUploadURLsParams, options?: RequestOptions): APIPromise<MaterialCreateBatchUploadURLsResponse>;
94
86
  /**
95
87
  * Uses AI to generate study materials like outlines, notes, summaries, etc. from a
96
88
  * given topic. Returns immediately without waiting for processing.
97
89
  *
98
90
  * @example
99
91
  * ```ts
100
- * const generatedMaterial =
101
- * await client.v1.materials.generate({
102
- * name: 'Photosynthesis Study Plan',
103
- * topic: 'Photosynthesis in plants',
104
- * type: 'notes',
105
- * });
92
+ * const response = await client.v1.materials.generate({
93
+ * name: 'Photosynthesis Study Plan',
94
+ * topic: 'Photosynthesis in plants',
95
+ * type: 'notes',
96
+ * });
106
97
  * ```
107
98
  */
108
- generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<GeneratedMaterial>;
99
+ generate(body: MaterialGenerateParams, options?: RequestOptions): APIPromise<MaterialGenerateResponse>;
109
100
  /**
110
101
  * Uses AI to generate study materials like outlines, notes, summaries, etc. from a
111
102
  * given topic and waits for processing to complete
112
103
  *
113
104
  * @example
114
105
  * ```ts
115
- * const generatedMaterial =
106
+ * const response =
116
107
  * await client.v1.materials.generateAndProcess({
117
108
  * name: 'Photosynthesis Study Plan',
118
109
  * topic: 'Photosynthesis in plants',
@@ -120,7 +111,18 @@ export declare class Materials extends APIResource {
120
111
  * });
121
112
  * ```
122
113
  */
123
- generateAndProcess(body: MaterialGenerateAndProcessParams, options?: RequestOptions): APIPromise<GeneratedMaterial>;
114
+ generateAndProcess(body: MaterialGenerateAndProcessParams, options?: RequestOptions): APIPromise<MaterialGenerateAndProcessResponse>;
115
+ /**
116
+ * Get debug information for a material including extracted content
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * const response = await client.v1.materials.getDebugInfo(
121
+ * 'id',
122
+ * );
123
+ * ```
124
+ */
125
+ getDebugInfo(id: string, options?: RequestOptions): APIPromise<MaterialGetDebugInfoResponse>;
124
126
  /**
125
127
  * Get temporary download URL for material
126
128
  *
@@ -137,32 +139,32 @@ export declare class Materials extends APIResource {
137
139
  *
138
140
  * @example
139
141
  * ```ts
140
- * const material = await client.v1.materials.move('id', {
142
+ * const response = await client.v1.materials.move('id', {
141
143
  * folderId: 'folderId',
142
144
  * });
143
145
  * ```
144
146
  */
145
- move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<Material>;
147
+ move(id: string, body: MaterialMoveParams, options?: RequestOptions): APIPromise<MaterialMoveResponse>;
146
148
  /**
147
149
  * Rename a material
148
150
  *
149
151
  * @example
150
152
  * ```ts
151
- * const material = await client.v1.materials.rename('id', {
153
+ * const response = await client.v1.materials.rename('id', {
152
154
  * name: 'New Material Name',
153
155
  * });
154
156
  * ```
155
157
  */
156
- rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<Material>;
158
+ rename(id: string, body: MaterialRenameParams, options?: RequestOptions): APIPromise<MaterialRenameResponse>;
157
159
  /**
158
160
  * Reprocess material to regenerate embeddings and extract content
159
161
  *
160
162
  * @example
161
163
  * ```ts
162
- * const material = await client.v1.materials.reprocess('id');
164
+ * const response = await client.v1.materials.reprocess('id');
163
165
  * ```
164
166
  */
165
- reprocess(id: string, options?: RequestOptions): APIPromise<Material>;
167
+ reprocess(id: string, options?: RequestOptions): APIPromise<MaterialReprocessResponse>;
166
168
  /**
167
169
  * Search materials using RAG (Retrieval-Augmented Generation)
168
170
  *
@@ -175,25 +177,67 @@ export declare class Materials extends APIResource {
175
177
  */
176
178
  search(body: MaterialSearchParams, options?: RequestOptions): APIPromise<MaterialSearchResponse>;
177
179
  }
178
- export interface Content {
180
+ export interface MaterialCreateResponse {
179
181
  /**
180
- * Type of content
182
+ * Material ID
181
183
  */
182
- type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
184
+ _id: string;
183
185
  /**
184
- * URL to fetch content from
186
+ * Material content
185
187
  */
186
- sourceUrl?: string;
188
+ content: MaterialCreateResponse.Content;
187
189
  /**
188
- * Text content (for text type)
190
+ * Content type
189
191
  */
190
- text?: string;
192
+ contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
191
193
  /**
192
- * URL to the content (for url type)
194
+ * Creation timestamp
195
+ */
196
+ createdAt: string;
197
+ /**
198
+ * Folder ID
199
+ */
200
+ folderId: string | null;
201
+ /**
202
+ * Material name
203
+ */
204
+ name: string;
205
+ /**
206
+ * Organization ID
207
+ */
208
+ organizationId: string;
209
+ /**
210
+ * Material status
211
+ */
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
193
223
  */
194
- url?: string;
224
+ usage?: unknown;
195
225
  }
196
- export interface GeneratedMaterial {
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 {
197
241
  /**
198
242
  * Material ID
199
243
  */
@@ -201,7 +245,7 @@ export interface GeneratedMaterial {
201
245
  /**
202
246
  * Material content
203
247
  */
204
- content: GeneratedMaterial.Content;
248
+ content: MaterialRetrieveResponse.Content;
205
249
  /**
206
250
  * Content type
207
251
  */
@@ -230,10 +274,6 @@ export interface GeneratedMaterial {
230
274
  * Last update timestamp
231
275
  */
232
276
  updatedAt: string;
233
- /**
234
- * Generation metadata
235
- */
236
- generationMetadata?: unknown;
237
277
  /**
238
278
  * Material metadata
239
279
  */
@@ -243,7 +283,7 @@ export interface GeneratedMaterial {
243
283
  */
244
284
  usage?: unknown;
245
285
  }
246
- export declare namespace GeneratedMaterial {
286
+ export declare namespace MaterialRetrieveResponse {
247
287
  /**
248
288
  * Material content
249
289
  */
@@ -257,7 +297,70 @@ export declare namespace GeneratedMaterial {
257
297
  url?: string;
258
298
  }
259
299
  }
260
- export interface Material {
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 {
261
364
  /**
262
365
  * Material ID
263
366
  */
@@ -265,7 +368,7 @@ export interface Material {
265
368
  /**
266
369
  * Material content
267
370
  */
268
- content: Material.Content;
371
+ content: MaterialCreateAndProcessResponse.Content;
269
372
  /**
270
373
  * Content type
271
374
  */
@@ -303,7 +406,7 @@ export interface Material {
303
406
  */
304
407
  usage?: unknown;
305
408
  }
306
- export declare namespace Material {
409
+ export declare namespace MaterialCreateAndProcessResponse {
307
410
  /**
308
411
  * Material content
309
412
  */
@@ -317,10 +420,9 @@ export declare namespace Material {
317
420
  url?: string;
318
421
  }
319
422
  }
320
- export type MaterialListResponse = Array<Material>;
321
- export type MaterialBatchCreateResponse = Array<MaterialBatchCreateResponse.MaterialBatchCreateResponseItem>;
322
- export declare namespace MaterialBatchCreateResponse {
323
- interface MaterialBatchCreateResponseItem {
423
+ export type MaterialCreateBatchUploadURLsResponse = Array<MaterialCreateBatchUploadURLsResponse.MaterialCreateBatchUploadURLsResponseItem>;
424
+ export declare namespace MaterialCreateBatchUploadURLsResponse {
425
+ interface MaterialCreateBatchUploadURLsResponseItem {
324
426
  /**
325
427
  * Material ID
326
428
  */
@@ -339,7 +441,135 @@ export declare namespace MaterialBatchCreateResponse {
339
441
  uploadUrl: string;
340
442
  }
341
443
  }
342
- export interface MaterialDebugResponse {
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
+ export interface MaterialGetDebugInfoResponse {
343
573
  /**
344
574
  * Content details
345
575
  */
@@ -351,7 +581,7 @@ export interface MaterialDebugResponse {
351
581
  /**
352
582
  * Processed images
353
583
  */
354
- images: Array<MaterialDebugResponse.Image>;
584
+ images: Array<MaterialGetDebugInfoResponse.Image>;
355
585
  /**
356
586
  * Material ID
357
587
  */
@@ -373,7 +603,7 @@ export interface MaterialDebugResponse {
373
603
  */
374
604
  transcriptStructure: unknown | null;
375
605
  }
376
- export declare namespace MaterialDebugResponse {
606
+ export declare namespace MaterialGetDebugInfoResponse {
377
607
  interface Image {
378
608
  id?: string;
379
609
  description?: string;
@@ -388,6 +618,186 @@ export interface MaterialGetDownloadURLResponse {
388
618
  */
389
619
  downloadUrl: string;
390
620
  }
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
+ }
391
801
  export interface MaterialSearchResponse {
392
802
  /**
393
803
  * Whether results were filtered by scope
@@ -451,7 +861,7 @@ export interface MaterialCreateParams {
451
861
  /**
452
862
  * Content details
453
863
  */
454
- content: Content;
864
+ content: MaterialCreateParams.Content;
455
865
  /**
456
866
  * Name of the material
457
867
  */
@@ -461,43 +871,40 @@ export interface MaterialCreateParams {
461
871
  */
462
872
  folderId?: string;
463
873
  }
464
- export interface MaterialListParams {
465
- /**
466
- * Filter by folder ID
467
- */
468
- folderId?: string;
469
- }
470
- export interface MaterialBatchCreateParams {
874
+ export declare namespace MaterialCreateParams {
471
875
  /**
472
- * Array of materials to create
876
+ * Content details
473
877
  */
474
- materials: Array<MaterialBatchCreateParams.Material>;
475
- }
476
- export declare namespace MaterialBatchCreateParams {
477
- interface Material {
878
+ interface Content {
478
879
  /**
479
- * MIME type
880
+ * Type of content
480
881
  */
481
- contentType: string;
882
+ type: 'text' | 'pdf' | 'video' | 'audio' | 'url';
482
883
  /**
483
- * Filename
884
+ * URL to fetch content from
484
885
  */
485
- filename: string;
886
+ sourceUrl?: string;
486
887
  /**
487
- * Material name
888
+ * Text content (for text type)
488
889
  */
489
- name: string;
890
+ text?: string;
490
891
  /**
491
- * Folder ID
892
+ * URL to the content (for url type)
492
893
  */
493
- folderId?: string;
894
+ url?: string;
494
895
  }
495
896
  }
897
+ export interface MaterialListParams {
898
+ /**
899
+ * Filter by folder ID
900
+ */
901
+ folderId?: string;
902
+ }
496
903
  export interface MaterialCreateAndProcessParams {
497
904
  /**
498
905
  * Content details
499
906
  */
500
- content: Content;
907
+ content: MaterialCreateAndProcessParams.Content;
501
908
  /**
502
909
  * Name of the material
503
910
  */
@@ -515,6 +922,55 @@ export interface MaterialCreateAndProcessParams {
515
922
  */
516
923
  timeoutMs?: number;
517
924
  }
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
+ export interface MaterialCreateBatchUploadURLsParams {
949
+ /**
950
+ * Array of materials to create
951
+ */
952
+ materials: Array<MaterialCreateBatchUploadURLsParams.Material>;
953
+ }
954
+ export declare namespace MaterialCreateBatchUploadURLsParams {
955
+ interface Material {
956
+ /**
957
+ * MIME type
958
+ */
959
+ contentType: string;
960
+ /**
961
+ * Filename
962
+ */
963
+ filename: string;
964
+ /**
965
+ * Material name
966
+ */
967
+ name: string;
968
+ /**
969
+ * Folder ID
970
+ */
971
+ folderId?: string;
972
+ }
973
+ }
518
974
  export interface MaterialGenerateParams {
519
975
  /**
520
976
  * Name for the generated material
@@ -620,9 +1076,9 @@ export interface MaterialSearchParams {
620
1076
  topK?: number;
621
1077
  }
622
1078
  export declare namespace Materials {
623
- export { type Content as Content, type GeneratedMaterial as GeneratedMaterial, type Material as Material, type MaterialListResponse as MaterialListResponse, type MaterialBatchCreateResponse as MaterialBatchCreateResponse, type MaterialDebugResponse as MaterialDebugResponse, type MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse, type MaterialSearchResponse as MaterialSearchResponse, type MaterialCreateParams as MaterialCreateParams, type MaterialListParams as MaterialListParams, type MaterialBatchCreateParams as MaterialBatchCreateParams, type MaterialCreateAndProcessParams as MaterialCreateAndProcessParams, type MaterialGenerateParams as MaterialGenerateParams, type MaterialGenerateAndProcessParams as MaterialGenerateAndProcessParams, type MaterialGetDownloadURLParams as MaterialGetDownloadURLParams, type MaterialMoveParams as MaterialMoveParams, type MaterialRenameParams as MaterialRenameParams, type MaterialSearchParams as MaterialSearchParams, };
624
- export { Upload as Upload, type Complete as Complete, type UploadCreatePresignedURLResponse as UploadCreatePresignedURLResponse, type UploadCompleteUploadParams as UploadCompleteUploadParams, type UploadCreatePresignedURLParams as UploadCreatePresignedURLParams, type UploadUploadFileParams as UploadUploadFileParams, type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams, type UploadUploadFromURLParams as UploadUploadFromURLParams, type UploadUploadURLAndProcessParams as UploadUploadURLAndProcessParams, };
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, };
625
1081
  export { Bulk as Bulk, type BulkMoveResponse as BulkMoveResponse, type BulkMoveParams as BulkMoveParams };
626
- export { Test as Test, type TestPerformOcrResponse as TestPerformOcrResponse, type TestProcessEpubResponse as TestProcessEpubResponse, type TestProcessImageResponse as TestProcessImageResponse, type TestProcessVideoResponse as TestProcessVideoResponse, };
1082
+ export { Test as Test, type TestTestEpubProcessingResponse as TestTestEpubProcessingResponse, type TestTestImageProcessingResponse as TestTestImageProcessingResponse, type TestTestOcrResponse as TestTestOcrResponse, type TestTestVideoProcessingResponse as TestTestVideoProcessingResponse, };
627
1083
  }
628
1084
  //# sourceMappingURL=materials.d.mts.map