@studyfetch/sdk 1.32.0 → 1.34.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 +82 -0
- package/README.md +1 -1
- package/package.json +4 -5
- package/resources/v1/assignment-grader/assignment-grader.d.mts +313 -0
- package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -0
- package/resources/v1/assignment-grader/assignment-grader.d.ts +313 -0
- package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -0
- package/resources/v1/assignment-grader/assignment-grader.js +87 -0
- package/resources/v1/assignment-grader/assignment-grader.js.map +1 -0
- package/resources/v1/assignment-grader/assignment-grader.mjs +82 -0
- package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -0
- package/resources/v1/assignment-grader/index.d.mts +3 -0
- package/resources/v1/assignment-grader/index.d.mts.map +1 -0
- package/resources/v1/assignment-grader/index.d.ts +3 -0
- package/resources/v1/assignment-grader/index.d.ts.map +1 -0
- package/resources/v1/assignment-grader/index.js +9 -0
- package/resources/v1/assignment-grader/index.js.map +1 -0
- package/resources/v1/assignment-grader/index.mjs +4 -0
- package/resources/v1/assignment-grader/index.mjs.map +1 -0
- package/resources/v1/assignment-grader/rubric-templates.d.mts +238 -0
- package/resources/v1/assignment-grader/rubric-templates.d.mts.map +1 -0
- package/resources/v1/assignment-grader/rubric-templates.d.ts +238 -0
- package/resources/v1/assignment-grader/rubric-templates.d.ts.map +1 -0
- package/resources/v1/assignment-grader/rubric-templates.js +68 -0
- package/resources/v1/assignment-grader/rubric-templates.js.map +1 -0
- package/resources/v1/assignment-grader/rubric-templates.mjs +64 -0
- package/resources/v1/assignment-grader/rubric-templates.mjs.map +1 -0
- package/resources/v1/assignment-grader.d.mts +1 -152
- package/resources/v1/assignment-grader.d.mts.map +1 -1
- package/resources/v1/assignment-grader.d.ts +1 -152
- package/resources/v1/assignment-grader.d.ts.map +1 -1
- package/resources/v1/assignment-grader.js +2 -62
- package/resources/v1/assignment-grader.js.map +1 -1
- package/resources/v1/assignment-grader.mjs +1 -60
- package/resources/v1/assignment-grader.mjs.map +1 -1
- package/resources/v1/chat-analytics.d.mts +316 -0
- package/resources/v1/chat-analytics.d.mts.map +1 -0
- package/resources/v1/chat-analytics.d.ts +316 -0
- package/resources/v1/chat-analytics.d.ts.map +1 -0
- package/resources/v1/chat-analytics.js +50 -0
- package/resources/v1/chat-analytics.js.map +1 -0
- package/resources/v1/chat-analytics.mjs +46 -0
- package/resources/v1/chat-analytics.mjs.map +1 -0
- package/resources/v1/components.d.mts +184 -10
- package/resources/v1/components.d.mts.map +1 -1
- package/resources/v1/components.d.ts +184 -10
- package/resources/v1/components.d.ts.map +1 -1
- package/resources/v1/components.js.map +1 -1
- package/resources/v1/components.mjs.map +1 -1
- package/resources/v1/index.d.mts +6 -4
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +6 -4
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +13 -9
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +4 -2
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/materials/index.d.mts +3 -3
- package/resources/v1/materials/index.d.mts.map +1 -1
- package/resources/v1/materials/index.d.ts +3 -3
- 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 +548 -92
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +548 -92
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +36 -34
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +36 -34
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/test.d.mts +29 -30
- package/resources/v1/materials/test.d.mts.map +1 -1
- package/resources/v1/materials/test.d.ts +29 -30
- package/resources/v1/materials/test.d.ts.map +1 -1
- package/resources/v1/materials/test.js +14 -15
- package/resources/v1/materials/test.js.map +1 -1
- package/resources/v1/materials/test.mjs +14 -15
- package/resources/v1/materials/test.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +312 -23
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +312 -23
- package/resources/v1/materials/upload.d.ts.map +1 -1
- package/resources/v1/materials/upload.js +9 -9
- package/resources/v1/materials/upload.js.map +1 -1
- package/resources/v1/materials/upload.mjs +9 -9
- package/resources/v1/materials/upload.mjs.map +1 -1
- package/resources/v1/usage-analyst.d.mts +99 -0
- package/resources/v1/usage-analyst.d.mts.map +1 -0
- package/resources/v1/usage-analyst.d.ts +99 -0
- package/resources/v1/usage-analyst.d.ts.map +1 -0
- package/resources/v1/{usage/analyst.js → usage-analyst.js} +9 -9
- package/resources/v1/usage-analyst.js.map +1 -0
- package/resources/v1/{usage/analyst.mjs → usage-analyst.mjs} +7 -7
- package/resources/v1/usage-analyst.mjs.map +1 -0
- package/resources/v1/usage.d.mts +109 -1
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +109 -1
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +55 -2
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +53 -1
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +18 -10
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +18 -10
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +14 -6
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +14 -6
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/assignment-grader/assignment-grader.ts +421 -0
- package/src/resources/v1/assignment-grader/index.ts +16 -0
- package/src/resources/v1/assignment-grader/rubric-templates.ts +305 -0
- package/src/resources/v1/assignment-grader.ts +1 -196
- package/src/resources/v1/chat-analytics.ts +413 -0
- package/src/resources/v1/components.ts +265 -10
- package/src/resources/v1/index.ts +34 -10
- package/src/resources/v1/materials/index.ts +23 -14
- package/src/resources/v1/materials/materials.ts +824 -216
- package/src/resources/v1/materials/test.ts +38 -39
- package/src/resources/v1/materials/upload.ts +411 -30
- package/src/resources/v1/{usage/analyst.ts → usage-analyst.ts} +24 -23
- package/src/resources/v1/usage.ts +179 -1
- package/src/resources/v1/v1.ts +84 -28
- 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
- package/resources/v1/usage/analyst.d.mts +0 -99
- package/resources/v1/usage/analyst.d.mts.map +0 -1
- package/resources/v1/usage/analyst.d.ts +0 -99
- package/resources/v1/usage/analyst.d.ts.map +0 -1
- package/resources/v1/usage/analyst.js.map +0 -1
- package/resources/v1/usage/analyst.mjs.map +0 -1
- package/resources/v1/usage/index.d.mts +0 -3
- package/resources/v1/usage/index.d.mts.map +0 -1
- package/resources/v1/usage/index.d.ts +0 -3
- package/resources/v1/usage/index.d.ts.map +0 -1
- package/resources/v1/usage/index.js +0 -9
- package/resources/v1/usage/index.js.map +0 -1
- package/resources/v1/usage/index.mjs +0 -4
- package/resources/v1/usage/index.mjs.map +0 -1
- package/resources/v1/usage/usage.d.mts +0 -114
- package/resources/v1/usage/usage.d.mts.map +0 -1
- package/resources/v1/usage/usage.d.ts +0 -114
- package/resources/v1/usage/usage.d.ts.map +0 -1
- package/resources/v1/usage/usage.js +0 -67
- package/resources/v1/usage/usage.js.map +0 -1
- package/resources/v1/usage/usage.mjs +0 -62
- package/resources/v1/usage/usage.mjs.map +0 -1
- package/src/resources/v1/usage/index.ts +0 -15
- package/src/resources/v1/usage/usage.ts +0 -200
|
@@ -6,42 +6,41 @@ import { RequestOptions } from '../../../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class Test extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Test
|
|
9
|
+
* Test EPUB processing functionality
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
13
13
|
* const response =
|
|
14
|
-
* await client.v1.materials.test.
|
|
14
|
+
* await client.v1.materials.test.testEpubProcessing();
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
return this._client.post('/api/v1/materials/test/
|
|
17
|
+
testEpubProcessing(options?: RequestOptions): APIPromise<TestTestEpubProcessingResponse> {
|
|
18
|
+
return this._client.post('/api/v1/materials/test/epub-processing', options);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Test
|
|
22
|
+
* Test image processing with OCR and AI vision
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
26
|
* const response =
|
|
27
|
-
* await client.v1.materials.test.
|
|
27
|
+
* await client.v1.materials.test.testImageProcessing();
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
return this._client.post('/api/v1/materials/test/
|
|
30
|
+
testImageProcessing(options?: RequestOptions): APIPromise<TestTestImageProcessingResponse> {
|
|
31
|
+
return this._client.post('/api/v1/materials/test/image-processing', options);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Test
|
|
35
|
+
* Test OCR functionality with a sample PDF
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* ```ts
|
|
39
|
-
* const response =
|
|
40
|
-
* await client.v1.materials.test.processImage();
|
|
39
|
+
* const response = await client.v1.materials.test.testOcr();
|
|
41
40
|
* ```
|
|
42
41
|
*/
|
|
43
|
-
|
|
44
|
-
return this._client.post('/api/v1/materials/test/
|
|
42
|
+
testOcr(options?: RequestOptions): APIPromise<TestTestOcrResponse> {
|
|
43
|
+
return this._client.post('/api/v1/materials/test/ocr', options);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
/**
|
|
@@ -50,32 +49,15 @@ export class Test extends APIResource {
|
|
|
50
49
|
* @example
|
|
51
50
|
* ```ts
|
|
52
51
|
* const response =
|
|
53
|
-
* await client.v1.materials.test.
|
|
52
|
+
* await client.v1.materials.test.testVideoProcessing();
|
|
54
53
|
* ```
|
|
55
54
|
*/
|
|
56
|
-
|
|
55
|
+
testVideoProcessing(options?: RequestOptions): APIPromise<TestTestVideoProcessingResponse> {
|
|
57
56
|
return this._client.post('/api/v1/materials/test/video-processing', options);
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
export interface
|
|
62
|
-
/**
|
|
63
|
-
* First 500 characters of extracted text
|
|
64
|
-
*/
|
|
65
|
-
firstChars: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Test success status
|
|
69
|
-
*/
|
|
70
|
-
success: boolean;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Length of extracted text
|
|
74
|
-
*/
|
|
75
|
-
textLength: number;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface TestProcessEpubResponse {
|
|
60
|
+
export interface TestTestEpubProcessingResponse {
|
|
79
61
|
/**
|
|
80
62
|
* Test success status
|
|
81
63
|
*/
|
|
@@ -107,7 +89,7 @@ export interface TestProcessEpubResponse {
|
|
|
107
89
|
stack?: string;
|
|
108
90
|
}
|
|
109
91
|
|
|
110
|
-
export interface
|
|
92
|
+
export interface TestTestImageProcessingResponse {
|
|
111
93
|
/**
|
|
112
94
|
* Test success status
|
|
113
95
|
*/
|
|
@@ -139,7 +121,24 @@ export interface TestProcessImageResponse {
|
|
|
139
121
|
stack?: string;
|
|
140
122
|
}
|
|
141
123
|
|
|
142
|
-
export interface
|
|
124
|
+
export interface TestTestOcrResponse {
|
|
125
|
+
/**
|
|
126
|
+
* First 500 characters of extracted text
|
|
127
|
+
*/
|
|
128
|
+
firstChars: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Test success status
|
|
132
|
+
*/
|
|
133
|
+
success: boolean;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Length of extracted text
|
|
137
|
+
*/
|
|
138
|
+
textLength: number;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface TestTestVideoProcessingResponse {
|
|
143
142
|
/**
|
|
144
143
|
* Test success status
|
|
145
144
|
*/
|
|
@@ -168,9 +167,9 @@ export interface TestProcessVideoResponse {
|
|
|
168
167
|
|
|
169
168
|
export declare namespace Test {
|
|
170
169
|
export {
|
|
171
|
-
type
|
|
172
|
-
type
|
|
173
|
-
type
|
|
174
|
-
type
|
|
170
|
+
type TestTestEpubProcessingResponse as TestTestEpubProcessingResponse,
|
|
171
|
+
type TestTestImageProcessingResponse as TestTestImageProcessingResponse,
|
|
172
|
+
type TestTestOcrResponse as TestTestOcrResponse,
|
|
173
|
+
type TestTestVideoProcessingResponse as TestTestVideoProcessingResponse,
|
|
175
174
|
};
|
|
176
175
|
}
|
|
@@ -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
|
|
|
@@ -33,17 +32,17 @@ export class Upload extends APIResource {
|
|
|
33
32
|
* @example
|
|
34
33
|
* ```ts
|
|
35
34
|
* const response =
|
|
36
|
-
* await client.v1.materials.upload.
|
|
35
|
+
* await client.v1.materials.upload.getPresignedURL({
|
|
37
36
|
* contentType: 'application/pdf',
|
|
38
37
|
* filename: 'document.pdf',
|
|
39
38
|
* name: 'Chapter 1 Notes',
|
|
40
39
|
* });
|
|
41
40
|
* ```
|
|
42
41
|
*/
|
|
43
|
-
|
|
44
|
-
body:
|
|
42
|
+
getPresignedURL(
|
|
43
|
+
body: UploadGetPresignedURLParams,
|
|
45
44
|
options?: RequestOptions,
|
|
46
|
-
): APIPromise<
|
|
45
|
+
): APIPromise<UploadGetPresignedURLResponse> {
|
|
47
46
|
return this._client.post('/api/v1/materials/upload/presigned-url', { body, ...options });
|
|
48
47
|
}
|
|
49
48
|
|
|
@@ -52,14 +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(body: UploadUploadFileParams, options?: RequestOptions): APIPromise<
|
|
61
|
+
uploadFile(body: UploadUploadFileParams, options?: RequestOptions): APIPromise<UploadUploadFileResponse> {
|
|
63
62
|
return this._client.post(
|
|
64
63
|
'/api/v1/materials/upload',
|
|
65
64
|
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
@@ -72,7 +71,7 @@ export class Upload extends APIResource {
|
|
|
72
71
|
*
|
|
73
72
|
* @example
|
|
74
73
|
* ```ts
|
|
75
|
-
* const
|
|
74
|
+
* const response =
|
|
76
75
|
* await client.v1.materials.upload.uploadFileAndProcess({
|
|
77
76
|
* file: fs.createReadStream('path/to/file'),
|
|
78
77
|
* name: 'name',
|
|
@@ -82,7 +81,7 @@ export class Upload extends APIResource {
|
|
|
82
81
|
uploadFileAndProcess(
|
|
83
82
|
body: UploadUploadFileAndProcessParams,
|
|
84
83
|
options?: RequestOptions,
|
|
85
|
-
): APIPromise<
|
|
84
|
+
): APIPromise<UploadUploadFileAndProcessResponse> {
|
|
86
85
|
return this._client.post(
|
|
87
86
|
'/api/v1/materials/upload/file-and-process',
|
|
88
87
|
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
@@ -94,7 +93,7 @@ export class Upload extends APIResource {
|
|
|
94
93
|
*
|
|
95
94
|
* @example
|
|
96
95
|
* ```ts
|
|
97
|
-
* const
|
|
96
|
+
* const response =
|
|
98
97
|
* await client.v1.materials.upload.uploadFromURL({
|
|
99
98
|
* name: 'name',
|
|
100
99
|
* url: 'url',
|
|
@@ -104,7 +103,7 @@ export class Upload extends APIResource {
|
|
|
104
103
|
uploadFromURL(
|
|
105
104
|
body: UploadUploadFromURLParams,
|
|
106
105
|
options?: RequestOptions,
|
|
107
|
-
): APIPromise<
|
|
106
|
+
): APIPromise<UploadUploadFromURLResponse> {
|
|
108
107
|
return this._client.post('/api/v1/materials/upload/url', { body, ...options });
|
|
109
108
|
}
|
|
110
109
|
|
|
@@ -114,34 +113,100 @@ export class Upload extends APIResource {
|
|
|
114
113
|
*
|
|
115
114
|
* @example
|
|
116
115
|
* ```ts
|
|
117
|
-
* const
|
|
118
|
-
* await client.v1.materials.upload.
|
|
116
|
+
* const response =
|
|
117
|
+
* await client.v1.materials.upload.uploadFromURLAndProcess({
|
|
119
118
|
* name: 'My Document',
|
|
120
119
|
* url: 'https://example.com/document.pdf',
|
|
121
120
|
* });
|
|
122
121
|
* ```
|
|
123
122
|
*/
|
|
124
|
-
|
|
125
|
-
body:
|
|
123
|
+
uploadFromURLAndProcess(
|
|
124
|
+
body: UploadUploadFromURLAndProcessParams,
|
|
126
125
|
options?: RequestOptions,
|
|
127
|
-
): APIPromise<
|
|
126
|
+
): APIPromise<UploadUploadFromURLAndProcessResponse> {
|
|
128
127
|
return this._client.post('/api/v1/materials/upload/url-and-process', { body, ...options });
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
|
|
132
|
-
export interface
|
|
131
|
+
export interface UploadCompleteUploadResponse {
|
|
133
132
|
/**
|
|
134
|
-
* Material ID
|
|
133
|
+
* Material ID
|
|
135
134
|
*/
|
|
136
|
-
|
|
135
|
+
_id: string;
|
|
137
136
|
|
|
138
137
|
/**
|
|
139
|
-
*
|
|
138
|
+
* Material content
|
|
140
139
|
*/
|
|
141
|
-
|
|
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
|
+
* Usage information
|
|
184
|
+
*/
|
|
185
|
+
usage?: unknown;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export namespace UploadCompleteUploadResponse {
|
|
189
|
+
/**
|
|
190
|
+
* Material content
|
|
191
|
+
*/
|
|
192
|
+
export interface Content {
|
|
193
|
+
filename?: string;
|
|
194
|
+
|
|
195
|
+
fileSize?: number;
|
|
196
|
+
|
|
197
|
+
mimeType?: string;
|
|
198
|
+
|
|
199
|
+
s3Key?: string;
|
|
200
|
+
|
|
201
|
+
s3Url?: string;
|
|
202
|
+
|
|
203
|
+
text?: string;
|
|
204
|
+
|
|
205
|
+
url?: string;
|
|
206
|
+
}
|
|
142
207
|
}
|
|
143
208
|
|
|
144
|
-
export interface
|
|
209
|
+
export interface UploadGetPresignedURLResponse {
|
|
145
210
|
/**
|
|
146
211
|
* Material ID to use for completion
|
|
147
212
|
*/
|
|
@@ -158,6 +223,318 @@ export interface UploadCreatePresignedURLResponse {
|
|
|
158
223
|
uploadUrl: string;
|
|
159
224
|
}
|
|
160
225
|
|
|
226
|
+
export interface UploadUploadFileResponse {
|
|
227
|
+
/**
|
|
228
|
+
* Material ID
|
|
229
|
+
*/
|
|
230
|
+
_id: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Material content
|
|
234
|
+
*/
|
|
235
|
+
content: UploadUploadFileResponse.Content;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Content type
|
|
239
|
+
*/
|
|
240
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Creation timestamp
|
|
244
|
+
*/
|
|
245
|
+
createdAt: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Folder ID
|
|
249
|
+
*/
|
|
250
|
+
folderId: string | null;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Material name
|
|
254
|
+
*/
|
|
255
|
+
name: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Organization ID
|
|
259
|
+
*/
|
|
260
|
+
organizationId: string;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Material status
|
|
264
|
+
*/
|
|
265
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Last update timestamp
|
|
269
|
+
*/
|
|
270
|
+
updatedAt: string;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Material metadata
|
|
274
|
+
*/
|
|
275
|
+
metadata?: unknown;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Usage information
|
|
279
|
+
*/
|
|
280
|
+
usage?: unknown;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export namespace UploadUploadFileResponse {
|
|
284
|
+
/**
|
|
285
|
+
* Material content
|
|
286
|
+
*/
|
|
287
|
+
export interface Content {
|
|
288
|
+
filename?: string;
|
|
289
|
+
|
|
290
|
+
fileSize?: number;
|
|
291
|
+
|
|
292
|
+
mimeType?: string;
|
|
293
|
+
|
|
294
|
+
s3Key?: string;
|
|
295
|
+
|
|
296
|
+
s3Url?: string;
|
|
297
|
+
|
|
298
|
+
text?: string;
|
|
299
|
+
|
|
300
|
+
url?: string;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface UploadUploadFileAndProcessResponse {
|
|
305
|
+
/**
|
|
306
|
+
* Material ID
|
|
307
|
+
*/
|
|
308
|
+
_id: string;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Material content
|
|
312
|
+
*/
|
|
313
|
+
content: UploadUploadFileAndProcessResponse.Content;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Content type
|
|
317
|
+
*/
|
|
318
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Creation timestamp
|
|
322
|
+
*/
|
|
323
|
+
createdAt: string;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Folder ID
|
|
327
|
+
*/
|
|
328
|
+
folderId: string | null;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Material name
|
|
332
|
+
*/
|
|
333
|
+
name: string;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Organization ID
|
|
337
|
+
*/
|
|
338
|
+
organizationId: string;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Material status
|
|
342
|
+
*/
|
|
343
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Last update timestamp
|
|
347
|
+
*/
|
|
348
|
+
updatedAt: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Material metadata
|
|
352
|
+
*/
|
|
353
|
+
metadata?: unknown;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Usage information
|
|
357
|
+
*/
|
|
358
|
+
usage?: unknown;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export namespace UploadUploadFileAndProcessResponse {
|
|
362
|
+
/**
|
|
363
|
+
* Material content
|
|
364
|
+
*/
|
|
365
|
+
export interface Content {
|
|
366
|
+
filename?: string;
|
|
367
|
+
|
|
368
|
+
fileSize?: number;
|
|
369
|
+
|
|
370
|
+
mimeType?: string;
|
|
371
|
+
|
|
372
|
+
s3Key?: string;
|
|
373
|
+
|
|
374
|
+
s3Url?: string;
|
|
375
|
+
|
|
376
|
+
text?: string;
|
|
377
|
+
|
|
378
|
+
url?: string;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface UploadUploadFromURLResponse {
|
|
383
|
+
/**
|
|
384
|
+
* Material ID
|
|
385
|
+
*/
|
|
386
|
+
_id: string;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Material content
|
|
390
|
+
*/
|
|
391
|
+
content: UploadUploadFromURLResponse.Content;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Content type
|
|
395
|
+
*/
|
|
396
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Creation timestamp
|
|
400
|
+
*/
|
|
401
|
+
createdAt: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Folder ID
|
|
405
|
+
*/
|
|
406
|
+
folderId: string | null;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Material name
|
|
410
|
+
*/
|
|
411
|
+
name: string;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Organization ID
|
|
415
|
+
*/
|
|
416
|
+
organizationId: string;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Material status
|
|
420
|
+
*/
|
|
421
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Last update timestamp
|
|
425
|
+
*/
|
|
426
|
+
updatedAt: string;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Material metadata
|
|
430
|
+
*/
|
|
431
|
+
metadata?: unknown;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Usage information
|
|
435
|
+
*/
|
|
436
|
+
usage?: unknown;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export namespace UploadUploadFromURLResponse {
|
|
440
|
+
/**
|
|
441
|
+
* Material content
|
|
442
|
+
*/
|
|
443
|
+
export interface Content {
|
|
444
|
+
filename?: string;
|
|
445
|
+
|
|
446
|
+
fileSize?: number;
|
|
447
|
+
|
|
448
|
+
mimeType?: string;
|
|
449
|
+
|
|
450
|
+
s3Key?: string;
|
|
451
|
+
|
|
452
|
+
s3Url?: string;
|
|
453
|
+
|
|
454
|
+
text?: string;
|
|
455
|
+
|
|
456
|
+
url?: string;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export interface UploadUploadFromURLAndProcessResponse {
|
|
461
|
+
/**
|
|
462
|
+
* Material ID
|
|
463
|
+
*/
|
|
464
|
+
_id: string;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Material content
|
|
468
|
+
*/
|
|
469
|
+
content: UploadUploadFromURLAndProcessResponse.Content;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Content type
|
|
473
|
+
*/
|
|
474
|
+
contentType: 'text' | 'pdf' | 'video' | 'audio' | 'image' | 'epub';
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Creation timestamp
|
|
478
|
+
*/
|
|
479
|
+
createdAt: string;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Folder ID
|
|
483
|
+
*/
|
|
484
|
+
folderId: string | null;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Material name
|
|
488
|
+
*/
|
|
489
|
+
name: string;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Organization ID
|
|
493
|
+
*/
|
|
494
|
+
organizationId: string;
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Material status
|
|
498
|
+
*/
|
|
499
|
+
status: 'active' | 'processing' | 'pending_upload' | 'error' | 'deleted';
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Last update timestamp
|
|
503
|
+
*/
|
|
504
|
+
updatedAt: string;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Material metadata
|
|
508
|
+
*/
|
|
509
|
+
metadata?: unknown;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Usage information
|
|
513
|
+
*/
|
|
514
|
+
usage?: unknown;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export namespace UploadUploadFromURLAndProcessResponse {
|
|
518
|
+
/**
|
|
519
|
+
* Material content
|
|
520
|
+
*/
|
|
521
|
+
export interface Content {
|
|
522
|
+
filename?: string;
|
|
523
|
+
|
|
524
|
+
fileSize?: number;
|
|
525
|
+
|
|
526
|
+
mimeType?: string;
|
|
527
|
+
|
|
528
|
+
s3Key?: string;
|
|
529
|
+
|
|
530
|
+
s3Url?: string;
|
|
531
|
+
|
|
532
|
+
text?: string;
|
|
533
|
+
|
|
534
|
+
url?: string;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
161
538
|
export interface UploadCompleteUploadParams {
|
|
162
539
|
/**
|
|
163
540
|
* Material ID from presigned URL response
|
|
@@ -170,7 +547,7 @@ export interface UploadCompleteUploadParams {
|
|
|
170
547
|
s3Key: string;
|
|
171
548
|
}
|
|
172
549
|
|
|
173
|
-
export interface
|
|
550
|
+
export interface UploadGetPresignedURLParams {
|
|
174
551
|
/**
|
|
175
552
|
* MIME type of the file
|
|
176
553
|
*/
|
|
@@ -262,7 +639,7 @@ export interface UploadUploadFromURLParams {
|
|
|
262
639
|
folderId?: string;
|
|
263
640
|
}
|
|
264
641
|
|
|
265
|
-
export interface
|
|
642
|
+
export interface UploadUploadFromURLAndProcessParams {
|
|
266
643
|
/**
|
|
267
644
|
* Material name
|
|
268
645
|
*/
|
|
@@ -291,13 +668,17 @@ export interface UploadUploadURLAndProcessParams {
|
|
|
291
668
|
|
|
292
669
|
export declare namespace Upload {
|
|
293
670
|
export {
|
|
294
|
-
type
|
|
295
|
-
type
|
|
671
|
+
type UploadCompleteUploadResponse as UploadCompleteUploadResponse,
|
|
672
|
+
type UploadGetPresignedURLResponse as UploadGetPresignedURLResponse,
|
|
673
|
+
type UploadUploadFileResponse as UploadUploadFileResponse,
|
|
674
|
+
type UploadUploadFileAndProcessResponse as UploadUploadFileAndProcessResponse,
|
|
675
|
+
type UploadUploadFromURLResponse as UploadUploadFromURLResponse,
|
|
676
|
+
type UploadUploadFromURLAndProcessResponse as UploadUploadFromURLAndProcessResponse,
|
|
296
677
|
type UploadCompleteUploadParams as UploadCompleteUploadParams,
|
|
297
|
-
type
|
|
678
|
+
type UploadGetPresignedURLParams as UploadGetPresignedURLParams,
|
|
298
679
|
type UploadUploadFileParams as UploadUploadFileParams,
|
|
299
680
|
type UploadUploadFileAndProcessParams as UploadUploadFileAndProcessParams,
|
|
300
681
|
type UploadUploadFromURLParams as UploadUploadFromURLParams,
|
|
301
|
-
type
|
|
682
|
+
type UploadUploadFromURLAndProcessParams as UploadUploadFromURLAndProcessParams,
|
|
302
683
|
};
|
|
303
684
|
}
|