studyfetch-sdk 0.1.0a17__py3-none-any.whl → 0.1.0a18__py3-none-any.whl
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.
- studyfetch_sdk/_version.py +1 -1
- studyfetch_sdk/resources/v1/materials/bulk.py +60 -7
- studyfetch_sdk/resources/v1/materials/materials.py +120 -55
- studyfetch_sdk/resources/v1/materials/test.py +29 -25
- studyfetch_sdk/resources/v1/materials/upload.py +140 -14
- studyfetch_sdk/types/v1/__init__.py +7 -0
- studyfetch_sdk/types/v1/material_batch_create_params.py +29 -0
- studyfetch_sdk/types/v1/material_batch_create_response.py +27 -0
- studyfetch_sdk/types/v1/material_debug_response.py +47 -0
- studyfetch_sdk/types/v1/material_get_download_url_params.py +3 -2
- studyfetch_sdk/types/v1/material_get_download_url_response.py +12 -0
- studyfetch_sdk/types/v1/material_move_params.py +15 -0
- studyfetch_sdk/types/v1/material_rename_params.py +12 -0
- studyfetch_sdk/types/v1/material_search_params.py +3 -6
- studyfetch_sdk/types/v1/material_search_response.py +54 -0
- studyfetch_sdk/types/v1/materials/__init__.py +9 -0
- studyfetch_sdk/types/v1/materials/bulk_move_params.py +18 -0
- studyfetch_sdk/types/v1/materials/bulk_move_response.py +15 -0
- studyfetch_sdk/types/v1/materials/test_perform_ocr_response.py +19 -0
- studyfetch_sdk/types/v1/materials/test_process_epub_response.py +30 -0
- studyfetch_sdk/types/v1/materials/test_process_image_response.py +30 -0
- studyfetch_sdk/types/v1/materials/test_process_video_response.py +25 -0
- studyfetch_sdk/types/v1/materials/upload_complete_upload_params.py +20 -0
- studyfetch_sdk/types/v1/materials/upload_create_presigned_url_params.py +23 -0
- studyfetch_sdk/types/v1/materials/upload_create_presigned_url_response.py +18 -0
- {studyfetch_sdk-0.1.0a17.dist-info → studyfetch_sdk-0.1.0a18.dist-info}/METADATA +1 -1
- {studyfetch_sdk-0.1.0a17.dist-info → studyfetch_sdk-0.1.0a18.dist-info}/RECORD +29 -13
- {studyfetch_sdk-0.1.0a17.dist-info → studyfetch_sdk-0.1.0a18.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a17.dist-info → studyfetch_sdk-0.1.0a18.dist-info}/licenses/LICENSE +0 -0
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
import httpx
|
6
6
|
|
7
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers,
|
7
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
8
8
|
from ...._compat import cached_property
|
9
9
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
10
10
|
from ...._response import (
|
@@ -14,6 +14,10 @@ from ...._response import (
|
|
14
14
|
async_to_streamed_response_wrapper,
|
15
15
|
)
|
16
16
|
from ...._base_client import make_request_options
|
17
|
+
from ....types.v1.materials.test_perform_ocr_response import TestPerformOcrResponse
|
18
|
+
from ....types.v1.materials.test_process_epub_response import TestProcessEpubResponse
|
19
|
+
from ....types.v1.materials.test_process_image_response import TestProcessImageResponse
|
20
|
+
from ....types.v1.materials.test_process_video_response import TestProcessVideoResponse
|
17
21
|
|
18
22
|
__all__ = ["TestResource", "AsyncTestResource"]
|
19
23
|
|
@@ -49,14 +53,14 @@ class TestResource(SyncAPIResource):
|
|
49
53
|
extra_query: Query | None = None,
|
50
54
|
extra_body: Body | None = None,
|
51
55
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
52
|
-
) ->
|
53
|
-
|
56
|
+
) -> TestPerformOcrResponse:
|
57
|
+
"""Test OCR functionality with a sample PDF"""
|
54
58
|
return self._post(
|
55
59
|
"/api/v1/materials/test/ocr",
|
56
60
|
options=make_request_options(
|
57
61
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
58
62
|
),
|
59
|
-
cast_to=
|
63
|
+
cast_to=TestPerformOcrResponse,
|
60
64
|
)
|
61
65
|
|
62
66
|
def process_epub(
|
@@ -68,14 +72,14 @@ class TestResource(SyncAPIResource):
|
|
68
72
|
extra_query: Query | None = None,
|
69
73
|
extra_body: Body | None = None,
|
70
74
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
71
|
-
) ->
|
72
|
-
|
75
|
+
) -> TestProcessEpubResponse:
|
76
|
+
"""Test EPUB processing functionality"""
|
73
77
|
return self._post(
|
74
78
|
"/api/v1/materials/test/epub-processing",
|
75
79
|
options=make_request_options(
|
76
80
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
77
81
|
),
|
78
|
-
cast_to=
|
82
|
+
cast_to=TestProcessEpubResponse,
|
79
83
|
)
|
80
84
|
|
81
85
|
def process_image(
|
@@ -87,14 +91,14 @@ class TestResource(SyncAPIResource):
|
|
87
91
|
extra_query: Query | None = None,
|
88
92
|
extra_body: Body | None = None,
|
89
93
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
90
|
-
) ->
|
91
|
-
|
94
|
+
) -> TestProcessImageResponse:
|
95
|
+
"""Test image processing with OCR and AI vision"""
|
92
96
|
return self._post(
|
93
97
|
"/api/v1/materials/test/image-processing",
|
94
98
|
options=make_request_options(
|
95
99
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
96
100
|
),
|
97
|
-
cast_to=
|
101
|
+
cast_to=TestProcessImageResponse,
|
98
102
|
)
|
99
103
|
|
100
104
|
def process_video(
|
@@ -106,14 +110,14 @@ class TestResource(SyncAPIResource):
|
|
106
110
|
extra_query: Query | None = None,
|
107
111
|
extra_body: Body | None = None,
|
108
112
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
109
|
-
) ->
|
110
|
-
|
113
|
+
) -> TestProcessVideoResponse:
|
114
|
+
"""Test video processing setup and dependencies"""
|
111
115
|
return self._post(
|
112
116
|
"/api/v1/materials/test/video-processing",
|
113
117
|
options=make_request_options(
|
114
118
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
115
119
|
),
|
116
|
-
cast_to=
|
120
|
+
cast_to=TestProcessVideoResponse,
|
117
121
|
)
|
118
122
|
|
119
123
|
|
@@ -146,14 +150,14 @@ class AsyncTestResource(AsyncAPIResource):
|
|
146
150
|
extra_query: Query | None = None,
|
147
151
|
extra_body: Body | None = None,
|
148
152
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
149
|
-
) ->
|
150
|
-
|
153
|
+
) -> TestPerformOcrResponse:
|
154
|
+
"""Test OCR functionality with a sample PDF"""
|
151
155
|
return await self._post(
|
152
156
|
"/api/v1/materials/test/ocr",
|
153
157
|
options=make_request_options(
|
154
158
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
155
159
|
),
|
156
|
-
cast_to=
|
160
|
+
cast_to=TestPerformOcrResponse,
|
157
161
|
)
|
158
162
|
|
159
163
|
async def process_epub(
|
@@ -165,14 +169,14 @@ class AsyncTestResource(AsyncAPIResource):
|
|
165
169
|
extra_query: Query | None = None,
|
166
170
|
extra_body: Body | None = None,
|
167
171
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
168
|
-
) ->
|
169
|
-
|
172
|
+
) -> TestProcessEpubResponse:
|
173
|
+
"""Test EPUB processing functionality"""
|
170
174
|
return await self._post(
|
171
175
|
"/api/v1/materials/test/epub-processing",
|
172
176
|
options=make_request_options(
|
173
177
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
174
178
|
),
|
175
|
-
cast_to=
|
179
|
+
cast_to=TestProcessEpubResponse,
|
176
180
|
)
|
177
181
|
|
178
182
|
async def process_image(
|
@@ -184,14 +188,14 @@ class AsyncTestResource(AsyncAPIResource):
|
|
184
188
|
extra_query: Query | None = None,
|
185
189
|
extra_body: Body | None = None,
|
186
190
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
187
|
-
) ->
|
188
|
-
|
191
|
+
) -> TestProcessImageResponse:
|
192
|
+
"""Test image processing with OCR and AI vision"""
|
189
193
|
return await self._post(
|
190
194
|
"/api/v1/materials/test/image-processing",
|
191
195
|
options=make_request_options(
|
192
196
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
193
197
|
),
|
194
|
-
cast_to=
|
198
|
+
cast_to=TestProcessImageResponse,
|
195
199
|
)
|
196
200
|
|
197
201
|
async def process_video(
|
@@ -203,14 +207,14 @@ class AsyncTestResource(AsyncAPIResource):
|
|
203
207
|
extra_query: Query | None = None,
|
204
208
|
extra_body: Body | None = None,
|
205
209
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
206
|
-
) ->
|
207
|
-
|
210
|
+
) -> TestProcessVideoResponse:
|
211
|
+
"""Test video processing setup and dependencies"""
|
208
212
|
return await self._post(
|
209
213
|
"/api/v1/materials/test/video-processing",
|
210
214
|
options=make_request_options(
|
211
215
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
212
216
|
),
|
213
|
-
cast_to=
|
217
|
+
cast_to=TestProcessVideoResponse,
|
214
218
|
)
|
215
219
|
|
216
220
|
|
@@ -6,7 +6,7 @@ from typing import Mapping, cast
|
|
6
6
|
|
7
7
|
import httpx
|
8
8
|
|
9
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers,
|
9
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
|
10
10
|
from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
|
11
11
|
from ...._compat import cached_property
|
12
12
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
@@ -18,7 +18,13 @@ from ...._response import (
|
|
18
18
|
)
|
19
19
|
from ...._base_client import make_request_options
|
20
20
|
from ....types.v1.material import Material
|
21
|
-
from ....types.v1.materials import
|
21
|
+
from ....types.v1.materials import (
|
22
|
+
upload_upload_file_params,
|
23
|
+
upload_complete_upload_params,
|
24
|
+
upload_upload_from_url_params,
|
25
|
+
upload_create_presigned_url_params,
|
26
|
+
)
|
27
|
+
from ....types.v1.materials.upload_create_presigned_url_response import UploadCreatePresignedURLResponse
|
22
28
|
|
23
29
|
__all__ = ["UploadResource", "AsyncUploadResource"]
|
24
30
|
|
@@ -46,39 +52,99 @@ class UploadResource(SyncAPIResource):
|
|
46
52
|
def complete_upload(
|
47
53
|
self,
|
48
54
|
*,
|
55
|
+
material_id: str,
|
56
|
+
organization_id: str,
|
57
|
+
s3_key: str,
|
49
58
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
50
59
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
51
60
|
extra_headers: Headers | None = None,
|
52
61
|
extra_query: Query | None = None,
|
53
62
|
extra_body: Body | None = None,
|
54
63
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
55
|
-
) ->
|
56
|
-
|
64
|
+
) -> Material:
|
65
|
+
"""
|
66
|
+
Complete upload after using presigned URL
|
67
|
+
|
68
|
+
Args:
|
69
|
+
material_id: The ID of the material that was uploaded
|
70
|
+
|
71
|
+
organization_id: The ID of the organization
|
72
|
+
|
73
|
+
s3_key: The S3 key of the uploaded file
|
74
|
+
|
75
|
+
extra_headers: Send extra headers
|
76
|
+
|
77
|
+
extra_query: Add additional query parameters to the request
|
78
|
+
|
79
|
+
extra_body: Add additional JSON properties to the request
|
80
|
+
|
81
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
82
|
+
"""
|
57
83
|
return self._post(
|
58
84
|
"/api/v1/materials/upload/complete",
|
85
|
+
body=maybe_transform(
|
86
|
+
{
|
87
|
+
"material_id": material_id,
|
88
|
+
"organization_id": organization_id,
|
89
|
+
"s3_key": s3_key,
|
90
|
+
},
|
91
|
+
upload_complete_upload_params.UploadCompleteUploadParams,
|
92
|
+
),
|
59
93
|
options=make_request_options(
|
60
94
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
61
95
|
),
|
62
|
-
cast_to=
|
96
|
+
cast_to=Material,
|
63
97
|
)
|
64
98
|
|
65
99
|
def create_presigned_url(
|
66
100
|
self,
|
67
101
|
*,
|
102
|
+
content_type: str,
|
103
|
+
filename: str,
|
104
|
+
name: str,
|
105
|
+
folder_id: str | NotGiven = NOT_GIVEN,
|
68
106
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
69
107
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
70
108
|
extra_headers: Headers | None = None,
|
71
109
|
extra_query: Query | None = None,
|
72
110
|
extra_body: Body | None = None,
|
73
111
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
74
|
-
) ->
|
75
|
-
|
112
|
+
) -> UploadCreatePresignedURLResponse:
|
113
|
+
"""
|
114
|
+
Get presigned URL for direct S3 upload
|
115
|
+
|
116
|
+
Args:
|
117
|
+
content_type: MIME type of the file
|
118
|
+
|
119
|
+
filename: Filename to upload
|
120
|
+
|
121
|
+
name: Display name for the material
|
122
|
+
|
123
|
+
folder_id: Folder ID to place the material in
|
124
|
+
|
125
|
+
extra_headers: Send extra headers
|
126
|
+
|
127
|
+
extra_query: Add additional query parameters to the request
|
128
|
+
|
129
|
+
extra_body: Add additional JSON properties to the request
|
130
|
+
|
131
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
132
|
+
"""
|
76
133
|
return self._post(
|
77
134
|
"/api/v1/materials/upload/presigned-url",
|
135
|
+
body=maybe_transform(
|
136
|
+
{
|
137
|
+
"content_type": content_type,
|
138
|
+
"filename": filename,
|
139
|
+
"name": name,
|
140
|
+
"folder_id": folder_id,
|
141
|
+
},
|
142
|
+
upload_create_presigned_url_params.UploadCreatePresignedURLParams,
|
143
|
+
),
|
78
144
|
options=make_request_options(
|
79
145
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
80
146
|
),
|
81
|
-
cast_to=
|
147
|
+
cast_to=UploadCreatePresignedURLResponse,
|
82
148
|
)
|
83
149
|
|
84
150
|
def upload_file(
|
@@ -203,39 +269,99 @@ class AsyncUploadResource(AsyncAPIResource):
|
|
203
269
|
async def complete_upload(
|
204
270
|
self,
|
205
271
|
*,
|
272
|
+
material_id: str,
|
273
|
+
organization_id: str,
|
274
|
+
s3_key: str,
|
206
275
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
207
276
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
208
277
|
extra_headers: Headers | None = None,
|
209
278
|
extra_query: Query | None = None,
|
210
279
|
extra_body: Body | None = None,
|
211
280
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
212
|
-
) ->
|
213
|
-
|
281
|
+
) -> Material:
|
282
|
+
"""
|
283
|
+
Complete upload after using presigned URL
|
284
|
+
|
285
|
+
Args:
|
286
|
+
material_id: The ID of the material that was uploaded
|
287
|
+
|
288
|
+
organization_id: The ID of the organization
|
289
|
+
|
290
|
+
s3_key: The S3 key of the uploaded file
|
291
|
+
|
292
|
+
extra_headers: Send extra headers
|
293
|
+
|
294
|
+
extra_query: Add additional query parameters to the request
|
295
|
+
|
296
|
+
extra_body: Add additional JSON properties to the request
|
297
|
+
|
298
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
299
|
+
"""
|
214
300
|
return await self._post(
|
215
301
|
"/api/v1/materials/upload/complete",
|
302
|
+
body=await async_maybe_transform(
|
303
|
+
{
|
304
|
+
"material_id": material_id,
|
305
|
+
"organization_id": organization_id,
|
306
|
+
"s3_key": s3_key,
|
307
|
+
},
|
308
|
+
upload_complete_upload_params.UploadCompleteUploadParams,
|
309
|
+
),
|
216
310
|
options=make_request_options(
|
217
311
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
218
312
|
),
|
219
|
-
cast_to=
|
313
|
+
cast_to=Material,
|
220
314
|
)
|
221
315
|
|
222
316
|
async def create_presigned_url(
|
223
317
|
self,
|
224
318
|
*,
|
319
|
+
content_type: str,
|
320
|
+
filename: str,
|
321
|
+
name: str,
|
322
|
+
folder_id: str | NotGiven = NOT_GIVEN,
|
225
323
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
226
324
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
227
325
|
extra_headers: Headers | None = None,
|
228
326
|
extra_query: Query | None = None,
|
229
327
|
extra_body: Body | None = None,
|
230
328
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
231
|
-
) ->
|
232
|
-
|
329
|
+
) -> UploadCreatePresignedURLResponse:
|
330
|
+
"""
|
331
|
+
Get presigned URL for direct S3 upload
|
332
|
+
|
333
|
+
Args:
|
334
|
+
content_type: MIME type of the file
|
335
|
+
|
336
|
+
filename: Filename to upload
|
337
|
+
|
338
|
+
name: Display name for the material
|
339
|
+
|
340
|
+
folder_id: Folder ID to place the material in
|
341
|
+
|
342
|
+
extra_headers: Send extra headers
|
343
|
+
|
344
|
+
extra_query: Add additional query parameters to the request
|
345
|
+
|
346
|
+
extra_body: Add additional JSON properties to the request
|
347
|
+
|
348
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
349
|
+
"""
|
233
350
|
return await self._post(
|
234
351
|
"/api/v1/materials/upload/presigned-url",
|
352
|
+
body=await async_maybe_transform(
|
353
|
+
{
|
354
|
+
"content_type": content_type,
|
355
|
+
"filename": filename,
|
356
|
+
"name": name,
|
357
|
+
"folder_id": folder_id,
|
358
|
+
},
|
359
|
+
upload_create_presigned_url_params.UploadCreatePresignedURLParams,
|
360
|
+
),
|
235
361
|
options=make_request_options(
|
236
362
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
237
363
|
),
|
238
|
-
cast_to=
|
364
|
+
cast_to=UploadCreatePresignedURLResponse,
|
239
365
|
)
|
240
366
|
|
241
367
|
async def upload_file(
|
@@ -13,11 +13,13 @@ from .embed_verify_params import EmbedVerifyParams as EmbedVerifyParams
|
|
13
13
|
from .folder_create_params import FolderCreateParams as FolderCreateParams
|
14
14
|
from .folder_update_params import FolderUpdateParams as FolderUpdateParams
|
15
15
|
from .material_list_params import MaterialListParams as MaterialListParams
|
16
|
+
from .material_move_params import MaterialMoveParams as MaterialMoveParams
|
16
17
|
from .component_list_params import ComponentListParams as ComponentListParams
|
17
18
|
from .flashcard_rate_params import FlashcardRateParams as FlashcardRateParams
|
18
19
|
from .embed_get_theme_params import EmbedGetThemeParams as EmbedGetThemeParams
|
19
20
|
from .material_create_params import MaterialCreateParams as MaterialCreateParams
|
20
21
|
from .material_list_response import MaterialListResponse as MaterialListResponse
|
22
|
+
from .material_rename_params import MaterialRenameParams as MaterialRenameParams
|
21
23
|
from .material_search_params import MaterialSearchParams as MaterialSearchParams
|
22
24
|
from .scenario_create_params import ScenarioCreateParams as ScenarioCreateParams
|
23
25
|
from .scenario_update_params import ScenarioUpdateParams as ScenarioUpdateParams
|
@@ -27,17 +29,21 @@ from .component_create_params import ComponentCreateParams as ComponentCreatePar
|
|
27
29
|
from .component_list_response import ComponentListResponse as ComponentListResponse
|
28
30
|
from .component_update_params import ComponentUpdateParams as ComponentUpdateParams
|
29
31
|
from .explainer_create_params import ExplainerCreateParams as ExplainerCreateParams
|
32
|
+
from .material_debug_response import MaterialDebugResponse as MaterialDebugResponse
|
30
33
|
from .chat_send_message_params import ChatSendMessageParams as ChatSendMessageParams
|
31
34
|
from .flashcard_get_all_params import FlashcardGetAllParams as FlashcardGetAllParams
|
32
35
|
from .flashcard_get_due_params import FlashcardGetDueParams as FlashcardGetDueParams
|
36
|
+
from .material_search_response import MaterialSearchResponse as MaterialSearchResponse
|
33
37
|
from .usage_get_summary_params import UsageGetSummaryParams as UsageGetSummaryParams
|
34
38
|
from .usage_list_events_params import UsageListEventsParams as UsageListEventsParams
|
35
39
|
from .test_submit_answer_params import TestSubmitAnswerParams as TestSubmitAnswerParams
|
36
40
|
from .assignment_grader_response import AssignmentGraderResponse as AssignmentGraderResponse
|
37
41
|
from .flashcard_get_stats_params import FlashcardGetStatsParams as FlashcardGetStatsParams
|
38
42
|
from .flashcard_get_types_response import FlashcardGetTypesResponse as FlashcardGetTypesResponse
|
43
|
+
from .material_batch_create_params import MaterialBatchCreateParams as MaterialBatchCreateParams
|
39
44
|
from .scenario_submit_answer_params import ScenarioSubmitAnswerParams as ScenarioSubmitAnswerParams
|
40
45
|
from .flashcard_batch_process_params import FlashcardBatchProcessParams as FlashcardBatchProcessParams
|
46
|
+
from .material_batch_create_response import MaterialBatchCreateResponse as MaterialBatchCreateResponse
|
41
47
|
from .assignment_grader_create_params import AssignmentGraderCreateParams as AssignmentGraderCreateParams
|
42
48
|
from .component_generate_embed_params import ComponentGenerateEmbedParams as ComponentGenerateEmbedParams
|
43
49
|
from .explainer_handle_webhook_params import ExplainerHandleWebhookParams as ExplainerHandleWebhookParams
|
@@ -46,3 +52,4 @@ from .flashcard_get_algorithm_response import FlashcardGetAlgorithmResponse as F
|
|
46
52
|
from .material_get_download_url_params import MaterialGetDownloadURLParams as MaterialGetDownloadURLParams
|
47
53
|
from .component_generate_embed_response import ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse
|
48
54
|
from .assignment_grader_get_all_response import AssignmentGraderGetAllResponse as AssignmentGraderGetAllResponse
|
55
|
+
from .material_get_download_url_response import MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Iterable
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from ..._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["MaterialBatchCreateParams", "Material"]
|
11
|
+
|
12
|
+
|
13
|
+
class MaterialBatchCreateParams(TypedDict, total=False):
|
14
|
+
materials: Required[Iterable[Material]]
|
15
|
+
"""Array of materials to create"""
|
16
|
+
|
17
|
+
|
18
|
+
class Material(TypedDict, total=False):
|
19
|
+
content_type: Required[Annotated[str, PropertyInfo(alias="contentType")]]
|
20
|
+
"""MIME type"""
|
21
|
+
|
22
|
+
filename: Required[str]
|
23
|
+
"""Filename"""
|
24
|
+
|
25
|
+
name: Required[str]
|
26
|
+
"""Material name"""
|
27
|
+
|
28
|
+
folder_id: Annotated[str, PropertyInfo(alias="folderId")]
|
29
|
+
"""Folder ID"""
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List
|
4
|
+
from typing_extensions import TypeAlias
|
5
|
+
|
6
|
+
from pydantic import Field as FieldInfo
|
7
|
+
|
8
|
+
from ..._models import BaseModel
|
9
|
+
|
10
|
+
__all__ = ["MaterialBatchCreateResponse", "MaterialBatchCreateResponseItem"]
|
11
|
+
|
12
|
+
|
13
|
+
class MaterialBatchCreateResponseItem(BaseModel):
|
14
|
+
material_id: str = FieldInfo(alias="materialId")
|
15
|
+
"""Material ID"""
|
16
|
+
|
17
|
+
name: str
|
18
|
+
"""Material name"""
|
19
|
+
|
20
|
+
s3_key: str = FieldInfo(alias="s3Key")
|
21
|
+
"""S3 key"""
|
22
|
+
|
23
|
+
upload_url: str = FieldInfo(alias="uploadUrl")
|
24
|
+
"""Presigned upload URL"""
|
25
|
+
|
26
|
+
|
27
|
+
MaterialBatchCreateResponse: TypeAlias = List[MaterialBatchCreateResponseItem]
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from typing import List, Optional
|
4
|
+
|
5
|
+
from pydantic import Field as FieldInfo
|
6
|
+
|
7
|
+
from ..._models import BaseModel
|
8
|
+
|
9
|
+
__all__ = ["MaterialDebugResponse", "Image"]
|
10
|
+
|
11
|
+
|
12
|
+
class Image(BaseModel):
|
13
|
+
id: Optional[str] = None
|
14
|
+
|
15
|
+
description: Optional[str] = None
|
16
|
+
|
17
|
+
page_index: Optional[float] = FieldInfo(alias="pageIndex", default=None)
|
18
|
+
|
19
|
+
s3_key: Optional[str] = FieldInfo(alias="s3Key", default=None)
|
20
|
+
|
21
|
+
s3_url: Optional[str] = FieldInfo(alias="s3Url", default=None)
|
22
|
+
|
23
|
+
|
24
|
+
class MaterialDebugResponse(BaseModel):
|
25
|
+
content: object
|
26
|
+
"""Content details"""
|
27
|
+
|
28
|
+
content_type: str = FieldInfo(alias="contentType")
|
29
|
+
"""Content type"""
|
30
|
+
|
31
|
+
images: List[Image]
|
32
|
+
"""Processed images"""
|
33
|
+
|
34
|
+
material_id: str = FieldInfo(alias="materialId")
|
35
|
+
"""Material ID"""
|
36
|
+
|
37
|
+
metadata: object
|
38
|
+
"""Material metadata"""
|
39
|
+
|
40
|
+
name: str
|
41
|
+
"""Material name"""
|
42
|
+
|
43
|
+
status: str
|
44
|
+
"""Processing status"""
|
45
|
+
|
46
|
+
transcript_structure: Optional[object] = FieldInfo(alias="transcriptStructure", default=None)
|
47
|
+
"""Transcript structure for videos"""
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from typing_extensions import
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
6
6
|
|
7
7
|
from ..._utils import PropertyInfo
|
8
8
|
|
@@ -10,4 +10,5 @@ __all__ = ["MaterialGetDownloadURLParams"]
|
|
10
10
|
|
11
11
|
|
12
12
|
class MaterialGetDownloadURLParams(TypedDict, total=False):
|
13
|
-
expires_in:
|
13
|
+
expires_in: Annotated[float, PropertyInfo(alias="expiresIn")]
|
14
|
+
"""URL expiration time in seconds (default: 3600)"""
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from pydantic import Field as FieldInfo
|
4
|
+
|
5
|
+
from ..._models import BaseModel
|
6
|
+
|
7
|
+
__all__ = ["MaterialGetDownloadURLResponse"]
|
8
|
+
|
9
|
+
|
10
|
+
class MaterialGetDownloadURLResponse(BaseModel):
|
11
|
+
download_url: str = FieldInfo(alias="downloadUrl")
|
12
|
+
"""Temporary download URL"""
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from ..._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["MaterialMoveParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class MaterialMoveParams(TypedDict, total=False):
|
14
|
+
folder_id: Required[Annotated[Optional[str], PropertyInfo(alias="folderId")]]
|
15
|
+
"""Target folder ID (null for root)"""
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Required, TypedDict
|
6
|
+
|
7
|
+
__all__ = ["MaterialRenameParams"]
|
8
|
+
|
9
|
+
|
10
|
+
class MaterialRenameParams(TypedDict, total=False):
|
11
|
+
name: Required[str]
|
12
|
+
"""New name for the material"""
|
@@ -15,13 +15,10 @@ class MaterialSearchParams(TypedDict, total=False):
|
|
15
15
|
"""Search query"""
|
16
16
|
|
17
17
|
folder_ids: Annotated[List[str], PropertyInfo(alias="folderIds")]
|
18
|
-
"""
|
19
|
-
Optional: Limit search to materials within specific folders (includes
|
20
|
-
subfolders)
|
21
|
-
"""
|
18
|
+
"""Limit search to materials within specific folders (includes subfolders)"""
|
22
19
|
|
23
20
|
material_ids: Annotated[List[str], PropertyInfo(alias="materialIds")]
|
24
|
-
"""
|
21
|
+
"""Limit search to specific material IDs"""
|
25
22
|
|
26
23
|
top_k: Annotated[float, PropertyInfo(alias="topK")]
|
27
|
-
"""Number of results to return
|
24
|
+
"""Number of results to return"""
|