@studyfetch/sdk 1.41.0 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +6 -6
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/package.json +1 -1
- package/resources/v1/components.d.mts +28 -0
- package/resources/v1/components.d.mts.map +1 -1
- package/resources/v1/components.d.ts +28 -0
- package/resources/v1/components.d.ts.map +1 -1
- package/resources/v1/folders.d.mts +2 -77
- package/resources/v1/folders.d.mts.map +1 -1
- package/resources/v1/folders.d.ts +2 -77
- package/resources/v1/folders.d.ts.map +1 -1
- package/resources/v1/folders.js.map +1 -1
- package/resources/v1/folders.mjs.map +1 -1
- package/resources/v1/index.d.mts +2 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/materials/index.d.mts +2 -2
- package/resources/v1/materials/index.d.mts.map +1 -1
- package/resources/v1/materials/index.d.ts +2 -2
- package/resources/v1/materials/index.d.ts.map +1 -1
- package/resources/v1/materials/index.js.map +1 -1
- package/resources/v1/materials/index.mjs.map +1 -1
- package/resources/v1/materials/materials.d.mts +241 -805
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +241 -805
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +54 -22
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +54 -22
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +14 -407
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +14 -407
- package/resources/v1/materials/upload.d.ts.map +1 -1
- package/resources/v1/materials/upload.js +5 -5
- package/resources/v1/materials/upload.js.map +1 -1
- package/resources/v1/materials/upload.mjs +5 -5
- package/resources/v1/materials/upload.mjs.map +1 -1
- package/resources/v1/pdf-generator/get.d.mts +61 -0
- package/resources/v1/pdf-generator/get.d.mts.map +1 -0
- package/resources/v1/pdf-generator/get.d.ts +61 -0
- package/resources/v1/pdf-generator/get.d.ts.map +1 -0
- package/resources/v1/pdf-generator/get.js +9 -0
- package/resources/v1/pdf-generator/get.js.map +1 -0
- package/resources/v1/pdf-generator/get.mjs +5 -0
- package/resources/v1/pdf-generator/get.mjs.map +1 -0
- package/resources/v1/pdf-generator/index.d.mts +3 -0
- package/resources/v1/pdf-generator/index.d.mts.map +1 -0
- package/resources/v1/pdf-generator/index.d.ts +3 -0
- package/resources/v1/pdf-generator/index.d.ts.map +1 -0
- package/resources/v1/pdf-generator/index.js +9 -0
- package/resources/v1/pdf-generator/index.js.map +1 -0
- package/resources/v1/pdf-generator/index.mjs +4 -0
- package/resources/v1/pdf-generator/index.mjs.map +1 -0
- package/resources/v1/pdf-generator/pdf-generator.d.mts +80 -0
- package/resources/v1/pdf-generator/pdf-generator.d.mts.map +1 -0
- package/resources/v1/pdf-generator/pdf-generator.d.ts +80 -0
- package/resources/v1/pdf-generator/pdf-generator.d.ts.map +1 -0
- package/resources/v1/pdf-generator/pdf-generator.js +70 -0
- package/resources/v1/pdf-generator/pdf-generator.js.map +1 -0
- package/resources/v1/pdf-generator/pdf-generator.mjs +65 -0
- package/resources/v1/pdf-generator/pdf-generator.mjs.map +1 -0
- package/resources/v1/pdf-generator.d.mts +2 -0
- package/resources/v1/pdf-generator.d.mts.map +1 -0
- package/resources/v1/pdf-generator.d.ts +2 -0
- package/resources/v1/pdf-generator.d.ts.map +1 -0
- package/resources/v1/pdf-generator.js +6 -0
- package/resources/v1/pdf-generator.js.map +1 -0
- package/resources/v1/pdf-generator.mjs +3 -0
- package/resources/v1/pdf-generator.mjs.map +1 -0
- package/resources/v1/v1.d.mts +6 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -0
- package/resources/v1/v1.mjs.map +1 -1
- package/src/internal/to-file.ts +1 -1
- package/src/resources/v1/components.ts +35 -0
- package/src/resources/v1/folders.ts +2 -98
- package/src/resources/v1/index.ts +14 -9
- package/src/resources/v1/materials/index.ts +7 -14
- package/src/resources/v1/materials/materials.ts +252 -988
- package/src/resources/v1/materials/upload.ts +16 -520
- package/src/resources/v1/pdf-generator/get.ts +75 -0
- package/src/resources/v1/pdf-generator/index.ts +10 -0
- package/src/resources/v1/pdf-generator/pdf-generator.ts +112 -0
- package/src/resources/v1/pdf-generator.ts +3 -0
- package/src/resources/v1/v1.ts +32 -18
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as MaterialsAPI from "./materials.mjs";
|
|
2
3
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
4
|
import { type Uploadable } from "../../../core/uploads.mjs";
|
|
4
5
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
@@ -8,14 +9,14 @@ export declare class Upload extends APIResource {
|
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
10
11
|
* ```ts
|
|
11
|
-
* const
|
|
12
|
+
* const materialResponse =
|
|
12
13
|
* await client.v1.materials.upload.completeUpload({
|
|
13
14
|
* materialId: 'materialId',
|
|
14
15
|
* s3Key: 's3Key',
|
|
15
16
|
* });
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
|
-
completeUpload(body: UploadCompleteUploadParams, options?: RequestOptions): APIPromise<
|
|
19
|
+
completeUpload(body: UploadCompleteUploadParams, options?: RequestOptions): APIPromise<MaterialsAPI.MaterialResponse>;
|
|
19
20
|
/**
|
|
20
21
|
* Get presigned URL for direct S3 upload
|
|
21
22
|
*
|
|
@@ -35,129 +36,55 @@ export declare class Upload extends APIResource {
|
|
|
35
36
|
*
|
|
36
37
|
* @example
|
|
37
38
|
* ```ts
|
|
38
|
-
* const
|
|
39
|
+
* const materialResponse =
|
|
39
40
|
* await client.v1.materials.upload.uploadFile({
|
|
40
41
|
* file: fs.createReadStream('path/to/file'),
|
|
41
42
|
* name: 'name',
|
|
42
43
|
* });
|
|
43
44
|
* ```
|
|
44
45
|
*/
|
|
45
|
-
uploadFile(body: UploadUploadFileParams, options?: RequestOptions): APIPromise<
|
|
46
|
+
uploadFile(body: UploadUploadFileParams, options?: RequestOptions): APIPromise<MaterialsAPI.MaterialResponse>;
|
|
46
47
|
/**
|
|
47
48
|
* Uploads a file and waits for processing to finish before returning. Useful for
|
|
48
49
|
* synchronous API usage.
|
|
49
50
|
*
|
|
50
51
|
* @example
|
|
51
52
|
* ```ts
|
|
52
|
-
* const
|
|
53
|
+
* const materialResponse =
|
|
53
54
|
* await client.v1.materials.upload.uploadFileAndProcess({
|
|
54
55
|
* file: fs.createReadStream('path/to/file'),
|
|
55
56
|
* name: 'name',
|
|
56
57
|
* });
|
|
57
58
|
* ```
|
|
58
59
|
*/
|
|
59
|
-
uploadFileAndProcess(body: UploadUploadFileAndProcessParams, options?: RequestOptions): APIPromise<
|
|
60
|
+
uploadFileAndProcess(body: UploadUploadFileAndProcessParams, options?: RequestOptions): APIPromise<MaterialsAPI.MaterialResponse>;
|
|
60
61
|
/**
|
|
61
62
|
* Upload material from URL
|
|
62
63
|
*
|
|
63
64
|
* @example
|
|
64
65
|
* ```ts
|
|
65
|
-
* const
|
|
66
|
+
* const materialResponse =
|
|
66
67
|
* await client.v1.materials.upload.uploadFromURL({
|
|
67
68
|
* name: 'name',
|
|
68
69
|
* url: 'url',
|
|
69
70
|
* });
|
|
70
71
|
* ```
|
|
71
72
|
*/
|
|
72
|
-
uploadFromURL(body: UploadUploadFromURLParams, options?: RequestOptions): APIPromise<
|
|
73
|
+
uploadFromURL(body: UploadUploadFromURLParams, options?: RequestOptions): APIPromise<MaterialsAPI.MaterialResponse>;
|
|
73
74
|
/**
|
|
74
75
|
* Fetches content from URL and waits for processing to finish before returning.
|
|
75
76
|
* Useful for synchronous API usage.
|
|
76
77
|
*
|
|
77
78
|
* @example
|
|
78
79
|
* ```ts
|
|
79
|
-
* const
|
|
80
|
+
* const materialResponse =
|
|
80
81
|
* await client.v1.materials.upload.uploadFromURLAndProcess({
|
|
81
82
|
* name: 'My Document',
|
|
82
83
|
* url: 'https://example.com/document.pdf',
|
|
83
84
|
* });
|
|
84
85
|
* ```
|
|
85
86
|
*/
|
|
86
|
-
uploadFromURLAndProcess(body: UploadUploadFromURLAndProcessParams, options?: RequestOptions): APIPromise<
|
|
87
|
-
}
|
|
88
|
-
export interface UploadCompleteUploadResponse {
|
|
89
|
-
/**
|
|
90
|
-
* Material ID
|
|
91
|
-
*/
|
|
92
|
-
_id: string;
|
|
93
|
-
/**
|
|
94
|
-
* Material content
|
|
95
|
-
*/
|
|
96
|
-
content: UploadCompleteUploadResponse.Content;
|
|
97
|
-
/**
|
|
98
|
-
* Content type
|
|
99
|
-
*/
|
|
100
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
101
|
-
/**
|
|
102
|
-
* Creation timestamp
|
|
103
|
-
*/
|
|
104
|
-
createdAt: string;
|
|
105
|
-
/**
|
|
106
|
-
* Folder ID
|
|
107
|
-
*/
|
|
108
|
-
folderId: string | null;
|
|
109
|
-
/**
|
|
110
|
-
* Material name
|
|
111
|
-
*/
|
|
112
|
-
name: string;
|
|
113
|
-
/**
|
|
114
|
-
* Organization ID
|
|
115
|
-
*/
|
|
116
|
-
organizationId: string;
|
|
117
|
-
/**
|
|
118
|
-
* Material status
|
|
119
|
-
*/
|
|
120
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
121
|
-
/**
|
|
122
|
-
* Last update timestamp
|
|
123
|
-
*/
|
|
124
|
-
updatedAt: string;
|
|
125
|
-
/**
|
|
126
|
-
* Material metadata
|
|
127
|
-
*/
|
|
128
|
-
metadata?: unknown;
|
|
129
|
-
/**
|
|
130
|
-
* References that this material cites
|
|
131
|
-
*/
|
|
132
|
-
references?: Array<UploadCompleteUploadResponse.Reference>;
|
|
133
|
-
/**
|
|
134
|
-
* Usage information
|
|
135
|
-
*/
|
|
136
|
-
usage?: unknown;
|
|
137
|
-
}
|
|
138
|
-
export declare namespace UploadCompleteUploadResponse {
|
|
139
|
-
/**
|
|
140
|
-
* Material content
|
|
141
|
-
*/
|
|
142
|
-
interface Content {
|
|
143
|
-
filename?: string;
|
|
144
|
-
fileSize?: number;
|
|
145
|
-
mimeType?: string;
|
|
146
|
-
s3Key?: string;
|
|
147
|
-
s3Url?: string;
|
|
148
|
-
text?: string;
|
|
149
|
-
url?: string;
|
|
150
|
-
}
|
|
151
|
-
interface Reference {
|
|
152
|
-
/**
|
|
153
|
-
* Reference title
|
|
154
|
-
*/
|
|
155
|
-
title: string;
|
|
156
|
-
/**
|
|
157
|
-
* Reference URL
|
|
158
|
-
*/
|
|
159
|
-
url?: string;
|
|
160
|
-
}
|
|
87
|
+
uploadFromURLAndProcess(body: UploadUploadFromURLAndProcessParams, options?: RequestOptions): APIPromise<MaterialsAPI.MaterialResponse>;
|
|
161
88
|
}
|
|
162
89
|
export interface UploadGetPresignedURLResponse {
|
|
163
90
|
/**
|
|
@@ -173,302 +100,6 @@ export interface UploadGetPresignedURLResponse {
|
|
|
173
100
|
*/
|
|
174
101
|
uploadUrl: string;
|
|
175
102
|
}
|
|
176
|
-
export interface UploadUploadFileResponse {
|
|
177
|
-
/**
|
|
178
|
-
* Material ID
|
|
179
|
-
*/
|
|
180
|
-
_id: string;
|
|
181
|
-
/**
|
|
182
|
-
* Material content
|
|
183
|
-
*/
|
|
184
|
-
content: UploadUploadFileResponse.Content;
|
|
185
|
-
/**
|
|
186
|
-
* Content type
|
|
187
|
-
*/
|
|
188
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
189
|
-
/**
|
|
190
|
-
* Creation timestamp
|
|
191
|
-
*/
|
|
192
|
-
createdAt: string;
|
|
193
|
-
/**
|
|
194
|
-
* Folder ID
|
|
195
|
-
*/
|
|
196
|
-
folderId: string | null;
|
|
197
|
-
/**
|
|
198
|
-
* Material name
|
|
199
|
-
*/
|
|
200
|
-
name: string;
|
|
201
|
-
/**
|
|
202
|
-
* Organization ID
|
|
203
|
-
*/
|
|
204
|
-
organizationId: string;
|
|
205
|
-
/**
|
|
206
|
-
* Material status
|
|
207
|
-
*/
|
|
208
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
209
|
-
/**
|
|
210
|
-
* Last update timestamp
|
|
211
|
-
*/
|
|
212
|
-
updatedAt: string;
|
|
213
|
-
/**
|
|
214
|
-
* Material metadata
|
|
215
|
-
*/
|
|
216
|
-
metadata?: unknown;
|
|
217
|
-
/**
|
|
218
|
-
* References that this material cites
|
|
219
|
-
*/
|
|
220
|
-
references?: Array<UploadUploadFileResponse.Reference>;
|
|
221
|
-
/**
|
|
222
|
-
* Usage information
|
|
223
|
-
*/
|
|
224
|
-
usage?: unknown;
|
|
225
|
-
}
|
|
226
|
-
export declare namespace UploadUploadFileResponse {
|
|
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
|
-
interface Reference {
|
|
240
|
-
/**
|
|
241
|
-
* Reference title
|
|
242
|
-
*/
|
|
243
|
-
title: string;
|
|
244
|
-
/**
|
|
245
|
-
* Reference URL
|
|
246
|
-
*/
|
|
247
|
-
url?: string;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
export interface UploadUploadFileAndProcessResponse {
|
|
251
|
-
/**
|
|
252
|
-
* Material ID
|
|
253
|
-
*/
|
|
254
|
-
_id: string;
|
|
255
|
-
/**
|
|
256
|
-
* Material content
|
|
257
|
-
*/
|
|
258
|
-
content: UploadUploadFileAndProcessResponse.Content;
|
|
259
|
-
/**
|
|
260
|
-
* Content type
|
|
261
|
-
*/
|
|
262
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
263
|
-
/**
|
|
264
|
-
* Creation timestamp
|
|
265
|
-
*/
|
|
266
|
-
createdAt: string;
|
|
267
|
-
/**
|
|
268
|
-
* Folder ID
|
|
269
|
-
*/
|
|
270
|
-
folderId: string | null;
|
|
271
|
-
/**
|
|
272
|
-
* Material name
|
|
273
|
-
*/
|
|
274
|
-
name: string;
|
|
275
|
-
/**
|
|
276
|
-
* Organization ID
|
|
277
|
-
*/
|
|
278
|
-
organizationId: string;
|
|
279
|
-
/**
|
|
280
|
-
* Material status
|
|
281
|
-
*/
|
|
282
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
283
|
-
/**
|
|
284
|
-
* Last update timestamp
|
|
285
|
-
*/
|
|
286
|
-
updatedAt: string;
|
|
287
|
-
/**
|
|
288
|
-
* Material metadata
|
|
289
|
-
*/
|
|
290
|
-
metadata?: unknown;
|
|
291
|
-
/**
|
|
292
|
-
* References that this material cites
|
|
293
|
-
*/
|
|
294
|
-
references?: Array<UploadUploadFileAndProcessResponse.Reference>;
|
|
295
|
-
/**
|
|
296
|
-
* Usage information
|
|
297
|
-
*/
|
|
298
|
-
usage?: unknown;
|
|
299
|
-
}
|
|
300
|
-
export declare namespace UploadUploadFileAndProcessResponse {
|
|
301
|
-
/**
|
|
302
|
-
* Material content
|
|
303
|
-
*/
|
|
304
|
-
interface Content {
|
|
305
|
-
filename?: string;
|
|
306
|
-
fileSize?: number;
|
|
307
|
-
mimeType?: string;
|
|
308
|
-
s3Key?: string;
|
|
309
|
-
s3Url?: string;
|
|
310
|
-
text?: string;
|
|
311
|
-
url?: string;
|
|
312
|
-
}
|
|
313
|
-
interface Reference {
|
|
314
|
-
/**
|
|
315
|
-
* Reference title
|
|
316
|
-
*/
|
|
317
|
-
title: string;
|
|
318
|
-
/**
|
|
319
|
-
* Reference URL
|
|
320
|
-
*/
|
|
321
|
-
url?: string;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
export interface UploadUploadFromURLResponse {
|
|
325
|
-
/**
|
|
326
|
-
* Material ID
|
|
327
|
-
*/
|
|
328
|
-
_id: string;
|
|
329
|
-
/**
|
|
330
|
-
* Material content
|
|
331
|
-
*/
|
|
332
|
-
content: UploadUploadFromURLResponse.Content;
|
|
333
|
-
/**
|
|
334
|
-
* Content type
|
|
335
|
-
*/
|
|
336
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
337
|
-
/**
|
|
338
|
-
* Creation timestamp
|
|
339
|
-
*/
|
|
340
|
-
createdAt: string;
|
|
341
|
-
/**
|
|
342
|
-
* Folder ID
|
|
343
|
-
*/
|
|
344
|
-
folderId: string | null;
|
|
345
|
-
/**
|
|
346
|
-
* Material name
|
|
347
|
-
*/
|
|
348
|
-
name: string;
|
|
349
|
-
/**
|
|
350
|
-
* Organization ID
|
|
351
|
-
*/
|
|
352
|
-
organizationId: string;
|
|
353
|
-
/**
|
|
354
|
-
* Material status
|
|
355
|
-
*/
|
|
356
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
357
|
-
/**
|
|
358
|
-
* Last update timestamp
|
|
359
|
-
*/
|
|
360
|
-
updatedAt: string;
|
|
361
|
-
/**
|
|
362
|
-
* Material metadata
|
|
363
|
-
*/
|
|
364
|
-
metadata?: unknown;
|
|
365
|
-
/**
|
|
366
|
-
* References that this material cites
|
|
367
|
-
*/
|
|
368
|
-
references?: Array<UploadUploadFromURLResponse.Reference>;
|
|
369
|
-
/**
|
|
370
|
-
* Usage information
|
|
371
|
-
*/
|
|
372
|
-
usage?: unknown;
|
|
373
|
-
}
|
|
374
|
-
export declare namespace UploadUploadFromURLResponse {
|
|
375
|
-
/**
|
|
376
|
-
* Material content
|
|
377
|
-
*/
|
|
378
|
-
interface Content {
|
|
379
|
-
filename?: string;
|
|
380
|
-
fileSize?: number;
|
|
381
|
-
mimeType?: string;
|
|
382
|
-
s3Key?: string;
|
|
383
|
-
s3Url?: string;
|
|
384
|
-
text?: string;
|
|
385
|
-
url?: string;
|
|
386
|
-
}
|
|
387
|
-
interface Reference {
|
|
388
|
-
/**
|
|
389
|
-
* Reference title
|
|
390
|
-
*/
|
|
391
|
-
title: string;
|
|
392
|
-
/**
|
|
393
|
-
* Reference URL
|
|
394
|
-
*/
|
|
395
|
-
url?: string;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
export interface UploadUploadFromURLAndProcessResponse {
|
|
399
|
-
/**
|
|
400
|
-
* Material ID
|
|
401
|
-
*/
|
|
402
|
-
_id: string;
|
|
403
|
-
/**
|
|
404
|
-
* Material content
|
|
405
|
-
*/
|
|
406
|
-
content: UploadUploadFromURLAndProcessResponse.Content;
|
|
407
|
-
/**
|
|
408
|
-
* Content type
|
|
409
|
-
*/
|
|
410
|
-
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
411
|
-
/**
|
|
412
|
-
* Creation timestamp
|
|
413
|
-
*/
|
|
414
|
-
createdAt: string;
|
|
415
|
-
/**
|
|
416
|
-
* Folder ID
|
|
417
|
-
*/
|
|
418
|
-
folderId: string | null;
|
|
419
|
-
/**
|
|
420
|
-
* Material name
|
|
421
|
-
*/
|
|
422
|
-
name: string;
|
|
423
|
-
/**
|
|
424
|
-
* Organization ID
|
|
425
|
-
*/
|
|
426
|
-
organizationId: string;
|
|
427
|
-
/**
|
|
428
|
-
* Material status
|
|
429
|
-
*/
|
|
430
|
-
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
431
|
-
/**
|
|
432
|
-
* Last update timestamp
|
|
433
|
-
*/
|
|
434
|
-
updatedAt: string;
|
|
435
|
-
/**
|
|
436
|
-
* Material metadata
|
|
437
|
-
*/
|
|
438
|
-
metadata?: unknown;
|
|
439
|
-
/**
|
|
440
|
-
* References that this material cites
|
|
441
|
-
*/
|
|
442
|
-
references?: Array<UploadUploadFromURLAndProcessResponse.Reference>;
|
|
443
|
-
/**
|
|
444
|
-
* Usage information
|
|
445
|
-
*/
|
|
446
|
-
usage?: unknown;
|
|
447
|
-
}
|
|
448
|
-
export declare namespace UploadUploadFromURLAndProcessResponse {
|
|
449
|
-
/**
|
|
450
|
-
* Material content
|
|
451
|
-
*/
|
|
452
|
-
interface Content {
|
|
453
|
-
filename?: string;
|
|
454
|
-
fileSize?: number;
|
|
455
|
-
mimeType?: string;
|
|
456
|
-
s3Key?: string;
|
|
457
|
-
s3Url?: string;
|
|
458
|
-
text?: string;
|
|
459
|
-
url?: string;
|
|
460
|
-
}
|
|
461
|
-
interface Reference {
|
|
462
|
-
/**
|
|
463
|
-
* Reference title
|
|
464
|
-
*/
|
|
465
|
-
title: string;
|
|
466
|
-
/**
|
|
467
|
-
* Reference URL
|
|
468
|
-
*/
|
|
469
|
-
url?: string;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
103
|
export interface UploadCompleteUploadParams {
|
|
473
104
|
/**
|
|
474
105
|
* Material ID from presigned URL response
|
|
@@ -503,19 +134,7 @@ export interface UploadGetPresignedURLParams {
|
|
|
503
134
|
/**
|
|
504
135
|
* References that this material cites
|
|
505
136
|
*/
|
|
506
|
-
references?: Array<
|
|
507
|
-
}
|
|
508
|
-
export declare namespace UploadGetPresignedURLParams {
|
|
509
|
-
interface Reference {
|
|
510
|
-
/**
|
|
511
|
-
* Reference title
|
|
512
|
-
*/
|
|
513
|
-
title: string;
|
|
514
|
-
/**
|
|
515
|
-
* Reference URL
|
|
516
|
-
*/
|
|
517
|
-
url?: string;
|
|
518
|
-
}
|
|
137
|
+
references?: Array<MaterialsAPI.Reference>;
|
|
519
138
|
}
|
|
520
139
|
export interface UploadUploadFileParams {
|
|
521
140
|
file: Uploadable;
|
|
@@ -593,25 +212,13 @@ export interface UploadUploadFromURLAndProcessParams {
|
|
|
593
212
|
/**
|
|
594
213
|
* References that this material cites
|
|
595
214
|
*/
|
|
596
|
-
references?: Array<
|
|
215
|
+
references?: Array<MaterialsAPI.Reference>;
|
|
597
216
|
/**
|
|
598
217
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
599
218
|
*/
|
|
600
219
|
timeoutMs?: number;
|
|
601
220
|
}
|
|
602
|
-
export declare namespace UploadUploadFromURLAndProcessParams {
|
|
603
|
-
interface Reference {
|
|
604
|
-
/**
|
|
605
|
-
* Reference title
|
|
606
|
-
*/
|
|
607
|
-
title: string;
|
|
608
|
-
/**
|
|
609
|
-
* Reference URL
|
|
610
|
-
*/
|
|
611
|
-
url?: string;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
221
|
export declare namespace Upload {
|
|
615
|
-
export { type
|
|
222
|
+
export { 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, };
|
|
616
223
|
}
|
|
617
224
|
//# sourceMappingURL=upload.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/materials/upload.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,E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