@studyfetch/sdk 1.40.0 → 1.41.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 +13 -0
- package/README.md +6 -6
- package/package.json +1 -1
- package/resources/v1/folders.d.mts +77 -2
- package/resources/v1/folders.d.mts.map +1 -1
- package/resources/v1/folders.d.ts +77 -2
- 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 +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- 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 +847 -150
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +847 -150
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +23 -30
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +23 -30
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +417 -12
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +417 -12
- 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/v1.d.mts +3 -3
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +3 -3
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/folders.ts +98 -2
- package/src/resources/v1/index.ts +9 -4
- package/src/resources/v1/materials/index.ts +14 -4
- package/src/resources/v1/materials/materials.ts +1051 -146
- package/src/resources/v1/materials/upload.ts +533 -14
- package/src/resources/v1/v1.ts +39 -29
- 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,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as MaterialsAPI from './materials';
|
|
5
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
5
|
import { type Uploadable } from '../../../core/uploads';
|
|
7
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
@@ -13,7 +12,7 @@ export class Upload extends APIResource {
|
|
|
13
12
|
*
|
|
14
13
|
* @example
|
|
15
14
|
* ```ts
|
|
16
|
-
* const
|
|
15
|
+
* const response =
|
|
17
16
|
* await client.v1.materials.upload.completeUpload({
|
|
18
17
|
* materialId: 'materialId',
|
|
19
18
|
* s3Key: 's3Key',
|
|
@@ -23,7 +22,7 @@ export class Upload extends APIResource {
|
|
|
23
22
|
completeUpload(
|
|
24
23
|
body: UploadCompleteUploadParams,
|
|
25
24
|
options?: RequestOptions,
|
|
26
|
-
): APIPromise<
|
|
25
|
+
): APIPromise<UploadCompleteUploadResponse> {
|
|
27
26
|
return this._client.post('/api/v1/materials/upload/complete', { body, ...options });
|
|
28
27
|
}
|
|
29
28
|
|
|
@@ -52,17 +51,14 @@ export class Upload extends APIResource {
|
|
|
52
51
|
*
|
|
53
52
|
* @example
|
|
54
53
|
* ```ts
|
|
55
|
-
* const
|
|
54
|
+
* const response =
|
|
56
55
|
* await client.v1.materials.upload.uploadFile({
|
|
57
56
|
* file: fs.createReadStream('path/to/file'),
|
|
58
57
|
* name: 'name',
|
|
59
58
|
* });
|
|
60
59
|
* ```
|
|
61
60
|
*/
|
|
62
|
-
uploadFile(
|
|
63
|
-
body: UploadUploadFileParams,
|
|
64
|
-
options?: RequestOptions,
|
|
65
|
-
): APIPromise<MaterialsAPI.MaterialResponse> {
|
|
61
|
+
uploadFile(body: UploadUploadFileParams, options?: RequestOptions): APIPromise<UploadUploadFileResponse> {
|
|
66
62
|
return this._client.post(
|
|
67
63
|
'/api/v1/materials/upload',
|
|
68
64
|
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
@@ -75,7 +71,7 @@ export class Upload extends APIResource {
|
|
|
75
71
|
*
|
|
76
72
|
* @example
|
|
77
73
|
* ```ts
|
|
78
|
-
* const
|
|
74
|
+
* const response =
|
|
79
75
|
* await client.v1.materials.upload.uploadFileAndProcess({
|
|
80
76
|
* file: fs.createReadStream('path/to/file'),
|
|
81
77
|
* name: 'name',
|
|
@@ -85,7 +81,7 @@ export class Upload extends APIResource {
|
|
|
85
81
|
uploadFileAndProcess(
|
|
86
82
|
body: UploadUploadFileAndProcessParams,
|
|
87
83
|
options?: RequestOptions,
|
|
88
|
-
): APIPromise<
|
|
84
|
+
): APIPromise<UploadUploadFileAndProcessResponse> {
|
|
89
85
|
return this._client.post(
|
|
90
86
|
'/api/v1/materials/upload/file-and-process',
|
|
91
87
|
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
@@ -97,7 +93,7 @@ export class Upload extends APIResource {
|
|
|
97
93
|
*
|
|
98
94
|
* @example
|
|
99
95
|
* ```ts
|
|
100
|
-
* const
|
|
96
|
+
* const response =
|
|
101
97
|
* await client.v1.materials.upload.uploadFromURL({
|
|
102
98
|
* name: 'name',
|
|
103
99
|
* url: 'url',
|
|
@@ -107,7 +103,7 @@ export class Upload extends APIResource {
|
|
|
107
103
|
uploadFromURL(
|
|
108
104
|
body: UploadUploadFromURLParams,
|
|
109
105
|
options?: RequestOptions,
|
|
110
|
-
): APIPromise<
|
|
106
|
+
): APIPromise<UploadUploadFromURLResponse> {
|
|
111
107
|
return this._client.post('/api/v1/materials/upload/url', { body, ...options });
|
|
112
108
|
}
|
|
113
109
|
|
|
@@ -117,7 +113,7 @@ export class Upload extends APIResource {
|
|
|
117
113
|
*
|
|
118
114
|
* @example
|
|
119
115
|
* ```ts
|
|
120
|
-
* const
|
|
116
|
+
* const response =
|
|
121
117
|
* await client.v1.materials.upload.uploadFromURLAndProcess({
|
|
122
118
|
* name: 'My Document',
|
|
123
119
|
* url: 'https://example.com/document.pdf',
|
|
@@ -127,11 +123,106 @@ export class Upload extends APIResource {
|
|
|
127
123
|
uploadFromURLAndProcess(
|
|
128
124
|
body: UploadUploadFromURLAndProcessParams,
|
|
129
125
|
options?: RequestOptions,
|
|
130
|
-
): APIPromise<
|
|
126
|
+
): APIPromise<UploadUploadFromURLAndProcessResponse> {
|
|
131
127
|
return this._client.post('/api/v1/materials/upload/url-and-process', { body, ...options });
|
|
132
128
|
}
|
|
133
129
|
}
|
|
134
130
|
|
|
131
|
+
export interface UploadCompleteUploadResponse {
|
|
132
|
+
/**
|
|
133
|
+
* Material ID
|
|
134
|
+
*/
|
|
135
|
+
_id: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Material content
|
|
139
|
+
*/
|
|
140
|
+
content: UploadCompleteUploadResponse.Content;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Content type
|
|
144
|
+
*/
|
|
145
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Creation timestamp
|
|
149
|
+
*/
|
|
150
|
+
createdAt: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Folder ID
|
|
154
|
+
*/
|
|
155
|
+
folderId: string | null;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Material name
|
|
159
|
+
*/
|
|
160
|
+
name: string;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Organization ID
|
|
164
|
+
*/
|
|
165
|
+
organizationId: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Material status
|
|
169
|
+
*/
|
|
170
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Last update timestamp
|
|
174
|
+
*/
|
|
175
|
+
updatedAt: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Material metadata
|
|
179
|
+
*/
|
|
180
|
+
metadata?: unknown;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* References that this material cites
|
|
184
|
+
*/
|
|
185
|
+
references?: Array<UploadCompleteUploadResponse.Reference>;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Usage information
|
|
189
|
+
*/
|
|
190
|
+
usage?: unknown;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export namespace UploadCompleteUploadResponse {
|
|
194
|
+
/**
|
|
195
|
+
* Material content
|
|
196
|
+
*/
|
|
197
|
+
export interface Content {
|
|
198
|
+
filename?: string;
|
|
199
|
+
|
|
200
|
+
fileSize?: number;
|
|
201
|
+
|
|
202
|
+
mimeType?: string;
|
|
203
|
+
|
|
204
|
+
s3Key?: string;
|
|
205
|
+
|
|
206
|
+
s3Url?: string;
|
|
207
|
+
|
|
208
|
+
text?: string;
|
|
209
|
+
|
|
210
|
+
url?: string;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface Reference {
|
|
214
|
+
/**
|
|
215
|
+
* Reference title
|
|
216
|
+
*/
|
|
217
|
+
title: string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Reference URL
|
|
221
|
+
*/
|
|
222
|
+
url?: string;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
135
226
|
export interface UploadGetPresignedURLResponse {
|
|
136
227
|
/**
|
|
137
228
|
* Material ID to use for completion
|
|
@@ -149,6 +240,386 @@ export interface UploadGetPresignedURLResponse {
|
|
|
149
240
|
uploadUrl: string;
|
|
150
241
|
}
|
|
151
242
|
|
|
243
|
+
export interface UploadUploadFileResponse {
|
|
244
|
+
/**
|
|
245
|
+
* Material ID
|
|
246
|
+
*/
|
|
247
|
+
_id: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Material content
|
|
251
|
+
*/
|
|
252
|
+
content: UploadUploadFileResponse.Content;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Content type
|
|
256
|
+
*/
|
|
257
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Creation timestamp
|
|
261
|
+
*/
|
|
262
|
+
createdAt: string;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Folder ID
|
|
266
|
+
*/
|
|
267
|
+
folderId: string | null;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Material name
|
|
271
|
+
*/
|
|
272
|
+
name: string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Organization ID
|
|
276
|
+
*/
|
|
277
|
+
organizationId: string;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Material status
|
|
281
|
+
*/
|
|
282
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Last update timestamp
|
|
286
|
+
*/
|
|
287
|
+
updatedAt: string;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Material metadata
|
|
291
|
+
*/
|
|
292
|
+
metadata?: unknown;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* References that this material cites
|
|
296
|
+
*/
|
|
297
|
+
references?: Array<UploadUploadFileResponse.Reference>;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Usage information
|
|
301
|
+
*/
|
|
302
|
+
usage?: unknown;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export namespace UploadUploadFileResponse {
|
|
306
|
+
/**
|
|
307
|
+
* Material content
|
|
308
|
+
*/
|
|
309
|
+
export interface Content {
|
|
310
|
+
filename?: string;
|
|
311
|
+
|
|
312
|
+
fileSize?: number;
|
|
313
|
+
|
|
314
|
+
mimeType?: string;
|
|
315
|
+
|
|
316
|
+
s3Key?: string;
|
|
317
|
+
|
|
318
|
+
s3Url?: string;
|
|
319
|
+
|
|
320
|
+
text?: string;
|
|
321
|
+
|
|
322
|
+
url?: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface Reference {
|
|
326
|
+
/**
|
|
327
|
+
* Reference title
|
|
328
|
+
*/
|
|
329
|
+
title: string;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Reference URL
|
|
333
|
+
*/
|
|
334
|
+
url?: string;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface UploadUploadFileAndProcessResponse {
|
|
339
|
+
/**
|
|
340
|
+
* Material ID
|
|
341
|
+
*/
|
|
342
|
+
_id: string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Material content
|
|
346
|
+
*/
|
|
347
|
+
content: UploadUploadFileAndProcessResponse.Content;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Content type
|
|
351
|
+
*/
|
|
352
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Creation timestamp
|
|
356
|
+
*/
|
|
357
|
+
createdAt: string;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Folder ID
|
|
361
|
+
*/
|
|
362
|
+
folderId: string | null;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Material name
|
|
366
|
+
*/
|
|
367
|
+
name: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Organization ID
|
|
371
|
+
*/
|
|
372
|
+
organizationId: string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Material status
|
|
376
|
+
*/
|
|
377
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Last update timestamp
|
|
381
|
+
*/
|
|
382
|
+
updatedAt: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Material metadata
|
|
386
|
+
*/
|
|
387
|
+
metadata?: unknown;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* References that this material cites
|
|
391
|
+
*/
|
|
392
|
+
references?: Array<UploadUploadFileAndProcessResponse.Reference>;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Usage information
|
|
396
|
+
*/
|
|
397
|
+
usage?: unknown;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export namespace UploadUploadFileAndProcessResponse {
|
|
401
|
+
/**
|
|
402
|
+
* Material content
|
|
403
|
+
*/
|
|
404
|
+
export interface Content {
|
|
405
|
+
filename?: string;
|
|
406
|
+
|
|
407
|
+
fileSize?: number;
|
|
408
|
+
|
|
409
|
+
mimeType?: string;
|
|
410
|
+
|
|
411
|
+
s3Key?: string;
|
|
412
|
+
|
|
413
|
+
s3Url?: string;
|
|
414
|
+
|
|
415
|
+
text?: string;
|
|
416
|
+
|
|
417
|
+
url?: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export interface Reference {
|
|
421
|
+
/**
|
|
422
|
+
* Reference title
|
|
423
|
+
*/
|
|
424
|
+
title: string;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Reference URL
|
|
428
|
+
*/
|
|
429
|
+
url?: string;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export interface UploadUploadFromURLResponse {
|
|
434
|
+
/**
|
|
435
|
+
* Material ID
|
|
436
|
+
*/
|
|
437
|
+
_id: string;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Material content
|
|
441
|
+
*/
|
|
442
|
+
content: UploadUploadFromURLResponse.Content;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Content type
|
|
446
|
+
*/
|
|
447
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Creation timestamp
|
|
451
|
+
*/
|
|
452
|
+
createdAt: string;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Folder ID
|
|
456
|
+
*/
|
|
457
|
+
folderId: string | null;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Material name
|
|
461
|
+
*/
|
|
462
|
+
name: string;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Organization ID
|
|
466
|
+
*/
|
|
467
|
+
organizationId: string;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Material status
|
|
471
|
+
*/
|
|
472
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Last update timestamp
|
|
476
|
+
*/
|
|
477
|
+
updatedAt: string;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Material metadata
|
|
481
|
+
*/
|
|
482
|
+
metadata?: unknown;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* References that this material cites
|
|
486
|
+
*/
|
|
487
|
+
references?: Array<UploadUploadFromURLResponse.Reference>;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Usage information
|
|
491
|
+
*/
|
|
492
|
+
usage?: unknown;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
export namespace UploadUploadFromURLResponse {
|
|
496
|
+
/**
|
|
497
|
+
* Material content
|
|
498
|
+
*/
|
|
499
|
+
export interface Content {
|
|
500
|
+
filename?: string;
|
|
501
|
+
|
|
502
|
+
fileSize?: number;
|
|
503
|
+
|
|
504
|
+
mimeType?: string;
|
|
505
|
+
|
|
506
|
+
s3Key?: string;
|
|
507
|
+
|
|
508
|
+
s3Url?: string;
|
|
509
|
+
|
|
510
|
+
text?: string;
|
|
511
|
+
|
|
512
|
+
url?: string;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export interface Reference {
|
|
516
|
+
/**
|
|
517
|
+
* Reference title
|
|
518
|
+
*/
|
|
519
|
+
title: string;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Reference URL
|
|
523
|
+
*/
|
|
524
|
+
url?: string;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export interface UploadUploadFromURLAndProcessResponse {
|
|
529
|
+
/**
|
|
530
|
+
* Material ID
|
|
531
|
+
*/
|
|
532
|
+
_id: string;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Material content
|
|
536
|
+
*/
|
|
537
|
+
content: UploadUploadFromURLAndProcessResponse.Content;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Content type
|
|
541
|
+
*/
|
|
542
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Creation timestamp
|
|
546
|
+
*/
|
|
547
|
+
createdAt: string;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Folder ID
|
|
551
|
+
*/
|
|
552
|
+
folderId: string | null;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Material name
|
|
556
|
+
*/
|
|
557
|
+
name: string;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Organization ID
|
|
561
|
+
*/
|
|
562
|
+
organizationId: string;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Material status
|
|
566
|
+
*/
|
|
567
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Last update timestamp
|
|
571
|
+
*/
|
|
572
|
+
updatedAt: string;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Material metadata
|
|
576
|
+
*/
|
|
577
|
+
metadata?: unknown;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* References that this material cites
|
|
581
|
+
*/
|
|
582
|
+
references?: Array<UploadUploadFromURLAndProcessResponse.Reference>;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Usage information
|
|
586
|
+
*/
|
|
587
|
+
usage?: unknown;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export namespace UploadUploadFromURLAndProcessResponse {
|
|
591
|
+
/**
|
|
592
|
+
* Material content
|
|
593
|
+
*/
|
|
594
|
+
export interface Content {
|
|
595
|
+
filename?: string;
|
|
596
|
+
|
|
597
|
+
fileSize?: number;
|
|
598
|
+
|
|
599
|
+
mimeType?: string;
|
|
600
|
+
|
|
601
|
+
s3Key?: string;
|
|
602
|
+
|
|
603
|
+
s3Url?: string;
|
|
604
|
+
|
|
605
|
+
text?: string;
|
|
606
|
+
|
|
607
|
+
url?: string;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export interface Reference {
|
|
611
|
+
/**
|
|
612
|
+
* Reference title
|
|
613
|
+
*/
|
|
614
|
+
title: string;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Reference URL
|
|
618
|
+
*/
|
|
619
|
+
url?: string;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
152
623
|
export interface UploadCompleteUploadParams {
|
|
153
624
|
/**
|
|
154
625
|
* Material ID from presigned URL response
|
|
@@ -186,6 +657,25 @@ export interface UploadGetPresignedURLParams {
|
|
|
186
657
|
* Folder ID to place the material in
|
|
187
658
|
*/
|
|
188
659
|
folderId?: string;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* References that this material cites
|
|
663
|
+
*/
|
|
664
|
+
references?: Array<UploadGetPresignedURLParams.Reference>;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
export namespace UploadGetPresignedURLParams {
|
|
668
|
+
export interface Reference {
|
|
669
|
+
/**
|
|
670
|
+
* Reference title
|
|
671
|
+
*/
|
|
672
|
+
title: string;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Reference URL
|
|
676
|
+
*/
|
|
677
|
+
url?: string;
|
|
678
|
+
}
|
|
189
679
|
}
|
|
190
680
|
|
|
191
681
|
export interface UploadUploadFileParams {
|
|
@@ -205,6 +695,11 @@ export interface UploadUploadFileParams {
|
|
|
205
695
|
* Folder ID (optional)
|
|
206
696
|
*/
|
|
207
697
|
folderId?: string;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* JSON string of references array (optional)
|
|
701
|
+
*/
|
|
702
|
+
references?: string;
|
|
208
703
|
}
|
|
209
704
|
|
|
210
705
|
export interface UploadUploadFileAndProcessParams {
|
|
@@ -274,15 +769,39 @@ export interface UploadUploadFromURLAndProcessParams {
|
|
|
274
769
|
*/
|
|
275
770
|
pollIntervalMs?: number;
|
|
276
771
|
|
|
772
|
+
/**
|
|
773
|
+
* References that this material cites
|
|
774
|
+
*/
|
|
775
|
+
references?: Array<UploadUploadFromURLAndProcessParams.Reference>;
|
|
776
|
+
|
|
277
777
|
/**
|
|
278
778
|
* Maximum time to wait for processing in milliseconds (default: 5 minutes)
|
|
279
779
|
*/
|
|
280
780
|
timeoutMs?: number;
|
|
281
781
|
}
|
|
282
782
|
|
|
783
|
+
export namespace UploadUploadFromURLAndProcessParams {
|
|
784
|
+
export interface Reference {
|
|
785
|
+
/**
|
|
786
|
+
* Reference title
|
|
787
|
+
*/
|
|
788
|
+
title: string;
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Reference URL
|
|
792
|
+
*/
|
|
793
|
+
url?: string;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
|
|
283
797
|
export declare namespace Upload {
|
|
284
798
|
export {
|
|
799
|
+
type UploadCompleteUploadResponse as UploadCompleteUploadResponse,
|
|
285
800
|
type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse,
|
|
801
|
+
type UploadUploadFileResponse as UploadUploadFileResponse,
|
|
802
|
+
type UploadUploadFileAndProcessResponse as UploadUploadFileAndProcessResponse,
|
|
803
|
+
type UploadUploadFromURLResponse as UploadUploadFromURLResponse,
|
|
804
|
+
type UploadUploadFromURLAndProcessResponse as UploadUploadFromURLAndProcessResponse,
|
|
286
805
|
type UploadCompleteUploadParams as UploadCompleteUploadParams,
|
|
287
806
|
type UploadGetPresignedURLParams as UploadGetPresignedURLParams,
|
|
288
807
|
type UploadUploadFileParams as UploadUploadFileParams,
|