studyfetch-sdk 0.1.0a5__py3-none-any.whl → 0.1.0a6__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/__init__.py +12 -12
- studyfetch_sdk/resources/v1/chat/chat.py +13 -15
- studyfetch_sdk/resources/v1/components.py +40 -37
- studyfetch_sdk/resources/v1/explainers.py +80 -0
- studyfetch_sdk/resources/v1/flashcards.py +15 -15
- studyfetch_sdk/resources/v1/materials/materials.py +19 -20
- studyfetch_sdk/resources/v1/materials/upload.py +19 -20
- studyfetch_sdk/resources/v1/scenarios/scenarios.py +13 -13
- studyfetch_sdk/resources/v1/scenarios/submissions/user.py +50 -50
- studyfetch_sdk/resources/v1/v1.py +48 -48
- studyfetch_sdk/types/v1/__init__.py +7 -12
- studyfetch_sdk/types/v1/{chat_retrieve_session_params.py → chat_get_session_params.py} +2 -2
- studyfetch_sdk/types/v1/{component_create_response.py → component.py} +2 -2
- studyfetch_sdk/types/v1/{component_embed_params.py → component_generate_embed_params.py} +2 -2
- studyfetch_sdk/types/v1/{component_embed_response.py → component_generate_embed_response.py} +2 -2
- studyfetch_sdk/types/v1/component_list_response.py +5 -46
- studyfetch_sdk/types/v1/{flashcard_get_algorithm_info_response.py → flashcard_get_algorithm_response.py} +2 -2
- studyfetch_sdk/types/v1/{material_create_response.py → material.py} +2 -2
- studyfetch_sdk/types/v1/material_list_response.py +5 -60
- studyfetch_sdk/types/v1/materials/__init__.py +0 -2
- studyfetch_sdk/types/v1/{scenario_submit_params.py → scenario_submit_answer_params.py} +2 -2
- {studyfetch_sdk-0.1.0a5.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/METADATA +28 -12
- {studyfetch_sdk-0.1.0a5.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/RECORD +26 -38
- studyfetch_sdk/types/v1/admin/__init__.py +0 -3
- studyfetch_sdk/types/v1/admin/organizations/__init__.py +0 -3
- studyfetch_sdk/types/v1/admin/organizations/models/__init__.py +0 -3
- studyfetch_sdk/types/v1/component_retrieve_response.py +0 -48
- studyfetch_sdk/types/v1/component_update_response.py +0 -48
- studyfetch_sdk/types/v1/material_retrieve_response.py +0 -62
- studyfetch_sdk/types/v1/materials/upload_upload_file_response.py +0 -62
- studyfetch_sdk/types/v1/materials/upload_upload_from_url_response.py +0 -62
- studyfetch_sdk/types/v1/organizations/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/logo/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/profile/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/team/__init__.py +0 -3
- {studyfetch_sdk-0.1.0a5.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a5.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/licenses/LICENSE +0 -0
@@ -121,10 +121,6 @@ class V1Resource(SyncAPIResource):
|
|
121
121
|
def materials(self) -> MaterialsResource:
|
122
122
|
return MaterialsResource(self._client)
|
123
123
|
|
124
|
-
@cached_property
|
125
|
-
def usage(self) -> UsageResource:
|
126
|
-
return UsageResource(self._client)
|
127
|
-
|
128
124
|
@cached_property
|
129
125
|
def folders(self) -> FoldersResource:
|
130
126
|
return FoldersResource(self._client)
|
@@ -133,6 +129,10 @@ class V1Resource(SyncAPIResource):
|
|
133
129
|
def components(self) -> ComponentsResource:
|
134
130
|
return ComponentsResource(self._client)
|
135
131
|
|
132
|
+
@cached_property
|
133
|
+
def usage(self) -> UsageResource:
|
134
|
+
return UsageResource(self._client)
|
135
|
+
|
136
136
|
@cached_property
|
137
137
|
def embed(self) -> EmbedResource:
|
138
138
|
return EmbedResource(self._client)
|
@@ -141,10 +141,6 @@ class V1Resource(SyncAPIResource):
|
|
141
141
|
def chat(self) -> ChatResource:
|
142
142
|
return ChatResource(self._client)
|
143
143
|
|
144
|
-
@cached_property
|
145
|
-
def flashcards(self) -> FlashcardsResource:
|
146
|
-
return FlashcardsResource(self._client)
|
147
|
-
|
148
144
|
@cached_property
|
149
145
|
def tests(self) -> TestsResource:
|
150
146
|
return TestsResource(self._client)
|
@@ -153,6 +149,10 @@ class V1Resource(SyncAPIResource):
|
|
153
149
|
def audio_recaps(self) -> AudioRecapsResource:
|
154
150
|
return AudioRecapsResource(self._client)
|
155
151
|
|
152
|
+
@cached_property
|
153
|
+
def flashcards(self) -> FlashcardsResource:
|
154
|
+
return FlashcardsResource(self._client)
|
155
|
+
|
156
156
|
@cached_property
|
157
157
|
def scenarios(self) -> ScenariosResource:
|
158
158
|
return ScenariosResource(self._client)
|
@@ -194,10 +194,6 @@ class AsyncV1Resource(AsyncAPIResource):
|
|
194
194
|
def materials(self) -> AsyncMaterialsResource:
|
195
195
|
return AsyncMaterialsResource(self._client)
|
196
196
|
|
197
|
-
@cached_property
|
198
|
-
def usage(self) -> AsyncUsageResource:
|
199
|
-
return AsyncUsageResource(self._client)
|
200
|
-
|
201
197
|
@cached_property
|
202
198
|
def folders(self) -> AsyncFoldersResource:
|
203
199
|
return AsyncFoldersResource(self._client)
|
@@ -206,6 +202,10 @@ class AsyncV1Resource(AsyncAPIResource):
|
|
206
202
|
def components(self) -> AsyncComponentsResource:
|
207
203
|
return AsyncComponentsResource(self._client)
|
208
204
|
|
205
|
+
@cached_property
|
206
|
+
def usage(self) -> AsyncUsageResource:
|
207
|
+
return AsyncUsageResource(self._client)
|
208
|
+
|
209
209
|
@cached_property
|
210
210
|
def embed(self) -> AsyncEmbedResource:
|
211
211
|
return AsyncEmbedResource(self._client)
|
@@ -214,10 +214,6 @@ class AsyncV1Resource(AsyncAPIResource):
|
|
214
214
|
def chat(self) -> AsyncChatResource:
|
215
215
|
return AsyncChatResource(self._client)
|
216
216
|
|
217
|
-
@cached_property
|
218
|
-
def flashcards(self) -> AsyncFlashcardsResource:
|
219
|
-
return AsyncFlashcardsResource(self._client)
|
220
|
-
|
221
217
|
@cached_property
|
222
218
|
def tests(self) -> AsyncTestsResource:
|
223
219
|
return AsyncTestsResource(self._client)
|
@@ -226,6 +222,10 @@ class AsyncV1Resource(AsyncAPIResource):
|
|
226
222
|
def audio_recaps(self) -> AsyncAudioRecapsResource:
|
227
223
|
return AsyncAudioRecapsResource(self._client)
|
228
224
|
|
225
|
+
@cached_property
|
226
|
+
def flashcards(self) -> AsyncFlashcardsResource:
|
227
|
+
return AsyncFlashcardsResource(self._client)
|
228
|
+
|
229
229
|
@cached_property
|
230
230
|
def scenarios(self) -> AsyncScenariosResource:
|
231
231
|
return AsyncScenariosResource(self._client)
|
@@ -270,10 +270,6 @@ class V1ResourceWithRawResponse:
|
|
270
270
|
def materials(self) -> MaterialsResourceWithRawResponse:
|
271
271
|
return MaterialsResourceWithRawResponse(self._v1.materials)
|
272
272
|
|
273
|
-
@cached_property
|
274
|
-
def usage(self) -> UsageResourceWithRawResponse:
|
275
|
-
return UsageResourceWithRawResponse(self._v1.usage)
|
276
|
-
|
277
273
|
@cached_property
|
278
274
|
def folders(self) -> FoldersResourceWithRawResponse:
|
279
275
|
return FoldersResourceWithRawResponse(self._v1.folders)
|
@@ -282,6 +278,10 @@ class V1ResourceWithRawResponse:
|
|
282
278
|
def components(self) -> ComponentsResourceWithRawResponse:
|
283
279
|
return ComponentsResourceWithRawResponse(self._v1.components)
|
284
280
|
|
281
|
+
@cached_property
|
282
|
+
def usage(self) -> UsageResourceWithRawResponse:
|
283
|
+
return UsageResourceWithRawResponse(self._v1.usage)
|
284
|
+
|
285
285
|
@cached_property
|
286
286
|
def embed(self) -> EmbedResourceWithRawResponse:
|
287
287
|
return EmbedResourceWithRawResponse(self._v1.embed)
|
@@ -290,10 +290,6 @@ class V1ResourceWithRawResponse:
|
|
290
290
|
def chat(self) -> ChatResourceWithRawResponse:
|
291
291
|
return ChatResourceWithRawResponse(self._v1.chat)
|
292
292
|
|
293
|
-
@cached_property
|
294
|
-
def flashcards(self) -> FlashcardsResourceWithRawResponse:
|
295
|
-
return FlashcardsResourceWithRawResponse(self._v1.flashcards)
|
296
|
-
|
297
293
|
@cached_property
|
298
294
|
def tests(self) -> TestsResourceWithRawResponse:
|
299
295
|
return TestsResourceWithRawResponse(self._v1.tests)
|
@@ -302,6 +298,10 @@ class V1ResourceWithRawResponse:
|
|
302
298
|
def audio_recaps(self) -> AudioRecapsResourceWithRawResponse:
|
303
299
|
return AudioRecapsResourceWithRawResponse(self._v1.audio_recaps)
|
304
300
|
|
301
|
+
@cached_property
|
302
|
+
def flashcards(self) -> FlashcardsResourceWithRawResponse:
|
303
|
+
return FlashcardsResourceWithRawResponse(self._v1.flashcards)
|
304
|
+
|
305
305
|
@cached_property
|
306
306
|
def scenarios(self) -> ScenariosResourceWithRawResponse:
|
307
307
|
return ScenariosResourceWithRawResponse(self._v1.scenarios)
|
@@ -327,10 +327,6 @@ class AsyncV1ResourceWithRawResponse:
|
|
327
327
|
def materials(self) -> AsyncMaterialsResourceWithRawResponse:
|
328
328
|
return AsyncMaterialsResourceWithRawResponse(self._v1.materials)
|
329
329
|
|
330
|
-
@cached_property
|
331
|
-
def usage(self) -> AsyncUsageResourceWithRawResponse:
|
332
|
-
return AsyncUsageResourceWithRawResponse(self._v1.usage)
|
333
|
-
|
334
330
|
@cached_property
|
335
331
|
def folders(self) -> AsyncFoldersResourceWithRawResponse:
|
336
332
|
return AsyncFoldersResourceWithRawResponse(self._v1.folders)
|
@@ -339,6 +335,10 @@ class AsyncV1ResourceWithRawResponse:
|
|
339
335
|
def components(self) -> AsyncComponentsResourceWithRawResponse:
|
340
336
|
return AsyncComponentsResourceWithRawResponse(self._v1.components)
|
341
337
|
|
338
|
+
@cached_property
|
339
|
+
def usage(self) -> AsyncUsageResourceWithRawResponse:
|
340
|
+
return AsyncUsageResourceWithRawResponse(self._v1.usage)
|
341
|
+
|
342
342
|
@cached_property
|
343
343
|
def embed(self) -> AsyncEmbedResourceWithRawResponse:
|
344
344
|
return AsyncEmbedResourceWithRawResponse(self._v1.embed)
|
@@ -347,10 +347,6 @@ class AsyncV1ResourceWithRawResponse:
|
|
347
347
|
def chat(self) -> AsyncChatResourceWithRawResponse:
|
348
348
|
return AsyncChatResourceWithRawResponse(self._v1.chat)
|
349
349
|
|
350
|
-
@cached_property
|
351
|
-
def flashcards(self) -> AsyncFlashcardsResourceWithRawResponse:
|
352
|
-
return AsyncFlashcardsResourceWithRawResponse(self._v1.flashcards)
|
353
|
-
|
354
350
|
@cached_property
|
355
351
|
def tests(self) -> AsyncTestsResourceWithRawResponse:
|
356
352
|
return AsyncTestsResourceWithRawResponse(self._v1.tests)
|
@@ -359,6 +355,10 @@ class AsyncV1ResourceWithRawResponse:
|
|
359
355
|
def audio_recaps(self) -> AsyncAudioRecapsResourceWithRawResponse:
|
360
356
|
return AsyncAudioRecapsResourceWithRawResponse(self._v1.audio_recaps)
|
361
357
|
|
358
|
+
@cached_property
|
359
|
+
def flashcards(self) -> AsyncFlashcardsResourceWithRawResponse:
|
360
|
+
return AsyncFlashcardsResourceWithRawResponse(self._v1.flashcards)
|
361
|
+
|
362
362
|
@cached_property
|
363
363
|
def scenarios(self) -> AsyncScenariosResourceWithRawResponse:
|
364
364
|
return AsyncScenariosResourceWithRawResponse(self._v1.scenarios)
|
@@ -384,10 +384,6 @@ class V1ResourceWithStreamingResponse:
|
|
384
384
|
def materials(self) -> MaterialsResourceWithStreamingResponse:
|
385
385
|
return MaterialsResourceWithStreamingResponse(self._v1.materials)
|
386
386
|
|
387
|
-
@cached_property
|
388
|
-
def usage(self) -> UsageResourceWithStreamingResponse:
|
389
|
-
return UsageResourceWithStreamingResponse(self._v1.usage)
|
390
|
-
|
391
387
|
@cached_property
|
392
388
|
def folders(self) -> FoldersResourceWithStreamingResponse:
|
393
389
|
return FoldersResourceWithStreamingResponse(self._v1.folders)
|
@@ -396,6 +392,10 @@ class V1ResourceWithStreamingResponse:
|
|
396
392
|
def components(self) -> ComponentsResourceWithStreamingResponse:
|
397
393
|
return ComponentsResourceWithStreamingResponse(self._v1.components)
|
398
394
|
|
395
|
+
@cached_property
|
396
|
+
def usage(self) -> UsageResourceWithStreamingResponse:
|
397
|
+
return UsageResourceWithStreamingResponse(self._v1.usage)
|
398
|
+
|
399
399
|
@cached_property
|
400
400
|
def embed(self) -> EmbedResourceWithStreamingResponse:
|
401
401
|
return EmbedResourceWithStreamingResponse(self._v1.embed)
|
@@ -404,10 +404,6 @@ class V1ResourceWithStreamingResponse:
|
|
404
404
|
def chat(self) -> ChatResourceWithStreamingResponse:
|
405
405
|
return ChatResourceWithStreamingResponse(self._v1.chat)
|
406
406
|
|
407
|
-
@cached_property
|
408
|
-
def flashcards(self) -> FlashcardsResourceWithStreamingResponse:
|
409
|
-
return FlashcardsResourceWithStreamingResponse(self._v1.flashcards)
|
410
|
-
|
411
407
|
@cached_property
|
412
408
|
def tests(self) -> TestsResourceWithStreamingResponse:
|
413
409
|
return TestsResourceWithStreamingResponse(self._v1.tests)
|
@@ -416,6 +412,10 @@ class V1ResourceWithStreamingResponse:
|
|
416
412
|
def audio_recaps(self) -> AudioRecapsResourceWithStreamingResponse:
|
417
413
|
return AudioRecapsResourceWithStreamingResponse(self._v1.audio_recaps)
|
418
414
|
|
415
|
+
@cached_property
|
416
|
+
def flashcards(self) -> FlashcardsResourceWithStreamingResponse:
|
417
|
+
return FlashcardsResourceWithStreamingResponse(self._v1.flashcards)
|
418
|
+
|
419
419
|
@cached_property
|
420
420
|
def scenarios(self) -> ScenariosResourceWithStreamingResponse:
|
421
421
|
return ScenariosResourceWithStreamingResponse(self._v1.scenarios)
|
@@ -441,10 +441,6 @@ class AsyncV1ResourceWithStreamingResponse:
|
|
441
441
|
def materials(self) -> AsyncMaterialsResourceWithStreamingResponse:
|
442
442
|
return AsyncMaterialsResourceWithStreamingResponse(self._v1.materials)
|
443
443
|
|
444
|
-
@cached_property
|
445
|
-
def usage(self) -> AsyncUsageResourceWithStreamingResponse:
|
446
|
-
return AsyncUsageResourceWithStreamingResponse(self._v1.usage)
|
447
|
-
|
448
444
|
@cached_property
|
449
445
|
def folders(self) -> AsyncFoldersResourceWithStreamingResponse:
|
450
446
|
return AsyncFoldersResourceWithStreamingResponse(self._v1.folders)
|
@@ -453,6 +449,10 @@ class AsyncV1ResourceWithStreamingResponse:
|
|
453
449
|
def components(self) -> AsyncComponentsResourceWithStreamingResponse:
|
454
450
|
return AsyncComponentsResourceWithStreamingResponse(self._v1.components)
|
455
451
|
|
452
|
+
@cached_property
|
453
|
+
def usage(self) -> AsyncUsageResourceWithStreamingResponse:
|
454
|
+
return AsyncUsageResourceWithStreamingResponse(self._v1.usage)
|
455
|
+
|
456
456
|
@cached_property
|
457
457
|
def embed(self) -> AsyncEmbedResourceWithStreamingResponse:
|
458
458
|
return AsyncEmbedResourceWithStreamingResponse(self._v1.embed)
|
@@ -461,10 +461,6 @@ class AsyncV1ResourceWithStreamingResponse:
|
|
461
461
|
def chat(self) -> AsyncChatResourceWithStreamingResponse:
|
462
462
|
return AsyncChatResourceWithStreamingResponse(self._v1.chat)
|
463
463
|
|
464
|
-
@cached_property
|
465
|
-
def flashcards(self) -> AsyncFlashcardsResourceWithStreamingResponse:
|
466
|
-
return AsyncFlashcardsResourceWithStreamingResponse(self._v1.flashcards)
|
467
|
-
|
468
464
|
@cached_property
|
469
465
|
def tests(self) -> AsyncTestsResourceWithStreamingResponse:
|
470
466
|
return AsyncTestsResourceWithStreamingResponse(self._v1.tests)
|
@@ -473,6 +469,10 @@ class AsyncV1ResourceWithStreamingResponse:
|
|
473
469
|
def audio_recaps(self) -> AsyncAudioRecapsResourceWithStreamingResponse:
|
474
470
|
return AsyncAudioRecapsResourceWithStreamingResponse(self._v1.audio_recaps)
|
475
471
|
|
472
|
+
@cached_property
|
473
|
+
def flashcards(self) -> AsyncFlashcardsResourceWithStreamingResponse:
|
474
|
+
return AsyncFlashcardsResourceWithStreamingResponse(self._v1.flashcards)
|
475
|
+
|
476
476
|
@cached_property
|
477
477
|
def scenarios(self) -> AsyncScenariosResourceWithStreamingResponse:
|
478
478
|
return AsyncScenariosResourceWithStreamingResponse(self._v1.scenarios)
|
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
+
from .material import Material as Material
|
6
|
+
from .component import Component as Component
|
5
7
|
from .chat_stream_params import ChatStreamParams as ChatStreamParams
|
6
8
|
from .folder_list_params import FolderListParams as FolderListParams
|
7
9
|
from .test_create_params import TestCreateParams as TestCreateParams
|
@@ -13,37 +15,30 @@ from .folder_update_params import FolderUpdateParams as FolderUpdateParams
|
|
13
15
|
from .material_list_params import MaterialListParams as MaterialListParams
|
14
16
|
from .component_list_params import ComponentListParams as ComponentListParams
|
15
17
|
from .flashcard_rate_params import FlashcardRateParams as FlashcardRateParams
|
16
|
-
from .component_embed_params import ComponentEmbedParams as ComponentEmbedParams
|
17
18
|
from .embed_get_theme_params import EmbedGetThemeParams as EmbedGetThemeParams
|
18
19
|
from .material_create_params import MaterialCreateParams as MaterialCreateParams
|
19
20
|
from .material_list_response import MaterialListResponse as MaterialListResponse
|
20
21
|
from .scenario_create_params import ScenarioCreateParams as ScenarioCreateParams
|
21
|
-
from .scenario_submit_params import ScenarioSubmitParams as ScenarioSubmitParams
|
22
22
|
from .scenario_update_params import ScenarioUpdateParams as ScenarioUpdateParams
|
23
23
|
from .usage_get_stats_params import UsageGetStatsParams as UsageGetStatsParams
|
24
|
+
from .chat_get_session_params import ChatGetSessionParams as ChatGetSessionParams
|
24
25
|
from .component_create_params import ComponentCreateParams as ComponentCreateParams
|
25
26
|
from .component_list_response import ComponentListResponse as ComponentListResponse
|
26
27
|
from .component_update_params import ComponentUpdateParams as ComponentUpdateParams
|
27
28
|
from .explainer_create_params import ExplainerCreateParams as ExplainerCreateParams
|
28
29
|
from .chat_send_message_params import ChatSendMessageParams as ChatSendMessageParams
|
29
|
-
from .component_embed_response import ComponentEmbedResponse as ComponentEmbedResponse
|
30
30
|
from .flashcard_get_all_params import FlashcardGetAllParams as FlashcardGetAllParams
|
31
31
|
from .flashcard_get_due_params import FlashcardGetDueParams as FlashcardGetDueParams
|
32
|
-
from .material_create_response import MaterialCreateResponse as MaterialCreateResponse
|
33
32
|
from .usage_get_summary_params import UsageGetSummaryParams as UsageGetSummaryParams
|
34
33
|
from .usage_list_events_params import UsageListEventsParams as UsageListEventsParams
|
35
|
-
from .component_create_response import ComponentCreateResponse as ComponentCreateResponse
|
36
|
-
from .component_update_response import ComponentUpdateResponse as ComponentUpdateResponse
|
37
34
|
from .test_submit_answer_params import TestSubmitAnswerParams as TestSubmitAnswerParams
|
38
35
|
from .flashcard_get_stats_params import FlashcardGetStatsParams as FlashcardGetStatsParams
|
39
|
-
from .material_retrieve_response import MaterialRetrieveResponse as MaterialRetrieveResponse
|
40
|
-
from .component_retrieve_response import ComponentRetrieveResponse as ComponentRetrieveResponse
|
41
|
-
from .chat_retrieve_session_params import ChatRetrieveSessionParams as ChatRetrieveSessionParams
|
42
36
|
from .flashcard_get_types_response import FlashcardGetTypesResponse as FlashcardGetTypesResponse
|
37
|
+
from .scenario_submit_answer_params import ScenarioSubmitAnswerParams as ScenarioSubmitAnswerParams
|
43
38
|
from .flashcard_batch_process_params import FlashcardBatchProcessParams as FlashcardBatchProcessParams
|
39
|
+
from .component_generate_embed_params import ComponentGenerateEmbedParams as ComponentGenerateEmbedParams
|
44
40
|
from .explainer_handle_webhook_params import ExplainerHandleWebhookParams as ExplainerHandleWebhookParams
|
45
41
|
from .flashcard_batch_process_response import FlashcardBatchProcessResponse as FlashcardBatchProcessResponse
|
42
|
+
from .flashcard_get_algorithm_response import FlashcardGetAlgorithmResponse as FlashcardGetAlgorithmResponse
|
46
43
|
from .material_get_download_url_params import MaterialGetDownloadURLParams as MaterialGetDownloadURLParams
|
47
|
-
from .
|
48
|
-
FlashcardGetAlgorithmInfoResponse as FlashcardGetAlgorithmInfoResponse,
|
49
|
-
)
|
44
|
+
from .component_generate_embed_response import ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse
|
@@ -6,8 +6,8 @@ from typing_extensions import Required, Annotated, TypedDict
|
|
6
6
|
|
7
7
|
from ..._utils import PropertyInfo
|
8
8
|
|
9
|
-
__all__ = ["
|
9
|
+
__all__ = ["ChatGetSessionParams"]
|
10
10
|
|
11
11
|
|
12
|
-
class
|
12
|
+
class ChatGetSessionParams(TypedDict, total=False):
|
13
13
|
user_id: Required[Annotated[str, PropertyInfo(alias="userId")]]
|
@@ -8,10 +8,10 @@ from pydantic import Field as FieldInfo
|
|
8
8
|
|
9
9
|
from ..._models import BaseModel
|
10
10
|
|
11
|
-
__all__ = ["
|
11
|
+
__all__ = ["Component"]
|
12
12
|
|
13
13
|
|
14
|
-
class
|
14
|
+
class Component(BaseModel):
|
15
15
|
api_id: str = FieldInfo(alias="_id")
|
16
16
|
"""Component ID (MongoDB ObjectId)"""
|
17
17
|
|
@@ -7,10 +7,10 @@ from typing_extensions import Annotated, TypedDict
|
|
7
7
|
|
8
8
|
from ..._utils import PropertyInfo
|
9
9
|
|
10
|
-
__all__ = ["
|
10
|
+
__all__ = ["ComponentGenerateEmbedParams", "Features", "Theme"]
|
11
11
|
|
12
12
|
|
13
|
-
class
|
13
|
+
class ComponentGenerateEmbedParams(TypedDict, total=False):
|
14
14
|
expiry_hours: Annotated[float, PropertyInfo(alias="expiryHours")]
|
15
15
|
"""Token expiry time in hours"""
|
16
16
|
|
studyfetch_sdk/types/v1/{component_embed_response.py → component_generate_embed_response.py}
RENAMED
@@ -7,7 +7,7 @@ from pydantic import Field as FieldInfo
|
|
7
7
|
|
8
8
|
from ..._models import BaseModel
|
9
9
|
|
10
|
-
__all__ = ["
|
10
|
+
__all__ = ["ComponentGenerateEmbedResponse", "Options"]
|
11
11
|
|
12
12
|
|
13
13
|
class Options(BaseModel):
|
@@ -18,7 +18,7 @@ class Options(BaseModel):
|
|
18
18
|
"""Embed width"""
|
19
19
|
|
20
20
|
|
21
|
-
class
|
21
|
+
class ComponentGenerateEmbedResponse(BaseModel):
|
22
22
|
token: str
|
23
23
|
"""JWT token for authentication"""
|
24
24
|
|
@@ -1,51 +1,10 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from typing import List
|
4
|
-
from
|
5
|
-
from typing_extensions import Literal, TypeAlias
|
3
|
+
from typing import List
|
4
|
+
from typing_extensions import TypeAlias
|
6
5
|
|
7
|
-
from
|
6
|
+
from .component import Component
|
8
7
|
|
9
|
-
|
8
|
+
__all__ = ["ComponentListResponse"]
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
class ComponentListResponseItem(BaseModel):
|
15
|
-
api_id: str = FieldInfo(alias="_id")
|
16
|
-
"""Component ID (MongoDB ObjectId)"""
|
17
|
-
|
18
|
-
component_id: str = FieldInfo(alias="componentId")
|
19
|
-
"""Unique component identifier"""
|
20
|
-
|
21
|
-
config: object
|
22
|
-
"""Component configuration"""
|
23
|
-
|
24
|
-
created_at: datetime = FieldInfo(alias="createdAt")
|
25
|
-
"""Creation timestamp"""
|
26
|
-
|
27
|
-
name: str
|
28
|
-
"""Component name"""
|
29
|
-
|
30
|
-
organization: str
|
31
|
-
"""Organization ID"""
|
32
|
-
|
33
|
-
status: Literal["active", "inactive", "draft"]
|
34
|
-
"""Component status"""
|
35
|
-
|
36
|
-
type: Literal[
|
37
|
-
"chat", "flashcards", "scenarios", "practice_test", "audio_recap", "tutor_me", "explainers", "uploads"
|
38
|
-
]
|
39
|
-
"""Component type"""
|
40
|
-
|
41
|
-
updated_at: datetime = FieldInfo(alias="updatedAt")
|
42
|
-
"""Last update timestamp"""
|
43
|
-
|
44
|
-
usage: object
|
45
|
-
"""Usage statistics"""
|
46
|
-
|
47
|
-
description: Optional[str] = None
|
48
|
-
"""Component description"""
|
49
|
-
|
50
|
-
|
51
|
-
ComponentListResponse: TypeAlias = List[ComponentListResponseItem]
|
10
|
+
ComponentListResponse: TypeAlias = List[Component]
|
@@ -4,7 +4,7 @@ from typing import Dict, List, Optional
|
|
4
4
|
|
5
5
|
from ..._models import BaseModel
|
6
6
|
|
7
|
-
__all__ = ["
|
7
|
+
__all__ = ["FlashcardGetAlgorithmResponse", "Intervals", "Ratings"]
|
8
8
|
|
9
9
|
|
10
10
|
class Intervals(BaseModel):
|
@@ -26,7 +26,7 @@ class Ratings(BaseModel):
|
|
26
26
|
"""Rating name"""
|
27
27
|
|
28
28
|
|
29
|
-
class
|
29
|
+
class FlashcardGetAlgorithmResponse(BaseModel):
|
30
30
|
algorithm: Optional[str] = None
|
31
31
|
"""Algorithm name"""
|
32
32
|
|
@@ -8,7 +8,7 @@ from pydantic import Field as FieldInfo
|
|
8
8
|
|
9
9
|
from ..._models import BaseModel
|
10
10
|
|
11
|
-
__all__ = ["
|
11
|
+
__all__ = ["Material", "Content"]
|
12
12
|
|
13
13
|
|
14
14
|
class Content(BaseModel):
|
@@ -27,7 +27,7 @@ class Content(BaseModel):
|
|
27
27
|
url: Optional[str] = None
|
28
28
|
|
29
29
|
|
30
|
-
class
|
30
|
+
class Material(BaseModel):
|
31
31
|
api_id: str = FieldInfo(alias="_id")
|
32
32
|
"""Material ID"""
|
33
33
|
|
@@ -1,65 +1,10 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
from typing import List
|
4
|
-
from
|
5
|
-
from typing_extensions import Literal, TypeAlias
|
3
|
+
from typing import List
|
4
|
+
from typing_extensions import TypeAlias
|
6
5
|
|
7
|
-
from
|
6
|
+
from .material import Material
|
8
7
|
|
9
|
-
|
8
|
+
__all__ = ["MaterialListResponse"]
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
class MaterialListResponseItemContent(BaseModel):
|
15
|
-
filename: Optional[str] = None
|
16
|
-
|
17
|
-
file_size: Optional[float] = FieldInfo(alias="fileSize", default=None)
|
18
|
-
|
19
|
-
mime_type: Optional[str] = FieldInfo(alias="mimeType", default=None)
|
20
|
-
|
21
|
-
s3_key: Optional[str] = FieldInfo(alias="s3Key", default=None)
|
22
|
-
|
23
|
-
s3_url: Optional[str] = FieldInfo(alias="s3Url", default=None)
|
24
|
-
|
25
|
-
text: Optional[str] = None
|
26
|
-
|
27
|
-
url: Optional[str] = None
|
28
|
-
|
29
|
-
|
30
|
-
class MaterialListResponseItem(BaseModel):
|
31
|
-
api_id: str = FieldInfo(alias="_id")
|
32
|
-
"""Material ID"""
|
33
|
-
|
34
|
-
content: MaterialListResponseItemContent
|
35
|
-
"""Material content"""
|
36
|
-
|
37
|
-
content_type: Literal["text", "pdf", "video", "audio", "image", "epub"] = FieldInfo(alias="contentType")
|
38
|
-
"""Content type"""
|
39
|
-
|
40
|
-
created_at: datetime = FieldInfo(alias="createdAt")
|
41
|
-
"""Creation timestamp"""
|
42
|
-
|
43
|
-
folder_id: Optional[str] = FieldInfo(alias="folderId", default=None)
|
44
|
-
"""Folder ID"""
|
45
|
-
|
46
|
-
name: str
|
47
|
-
"""Material name"""
|
48
|
-
|
49
|
-
organization_id: str = FieldInfo(alias="organizationId")
|
50
|
-
"""Organization ID"""
|
51
|
-
|
52
|
-
status: Literal["active", "processing", "pending_upload", "error", "deleted"]
|
53
|
-
"""Material status"""
|
54
|
-
|
55
|
-
updated_at: datetime = FieldInfo(alias="updatedAt")
|
56
|
-
"""Last update timestamp"""
|
57
|
-
|
58
|
-
metadata: Optional[object] = None
|
59
|
-
"""Material metadata"""
|
60
|
-
|
61
|
-
usage: Optional[object] = None
|
62
|
-
"""Usage information"""
|
63
|
-
|
64
|
-
|
65
|
-
MaterialListResponse: TypeAlias = List[MaterialListResponseItem]
|
10
|
+
MaterialListResponse: TypeAlias = List[Material]
|
@@ -3,6 +3,4 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
5
|
from .upload_upload_file_params import UploadUploadFileParams as UploadUploadFileParams
|
6
|
-
from .upload_upload_file_response import UploadUploadFileResponse as UploadUploadFileResponse
|
7
6
|
from .upload_upload_from_url_params import UploadUploadFromURLParams as UploadUploadFromURLParams
|
8
|
-
from .upload_upload_from_url_response import UploadUploadFromURLResponse as UploadUploadFromURLResponse
|
@@ -7,10 +7,10 @@ from typing_extensions import Required, Annotated, TypedDict
|
|
7
7
|
|
8
8
|
from ..._utils import PropertyInfo
|
9
9
|
|
10
|
-
__all__ = ["
|
10
|
+
__all__ = ["ScenarioSubmitAnswerParams"]
|
11
11
|
|
12
12
|
|
13
|
-
class
|
13
|
+
class ScenarioSubmitAnswerParams(TypedDict, total=False):
|
14
14
|
conversation_history: Required[Annotated[Iterable[object], PropertyInfo(alias="conversationHistory")]]
|
15
15
|
"""Conversation history"""
|
16
16
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: studyfetch_sdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a6
|
4
4
|
Summary: The official Python library for the studyfetch-sdk API
|
5
5
|
Project-URL: Homepage, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
|
6
6
|
Project-URL: Repository, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
|
@@ -46,7 +46,7 @@ It is generated with [Stainless](https://www.stainless.com/).
|
|
46
46
|
|
47
47
|
## Documentation
|
48
48
|
|
49
|
-
The
|
49
|
+
The full API of this library can be found in [api.md](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/tree/main/api.md).
|
50
50
|
|
51
51
|
## Installation
|
52
52
|
|
@@ -67,7 +67,9 @@ client = StudyfetchSDK(
|
|
67
67
|
api_key=os.environ.get("STUDYFETCH_SDK_API_KEY"), # This is the default and can be omitted
|
68
68
|
)
|
69
69
|
|
70
|
-
client.v1.auth.
|
70
|
+
client.v1.auth.number_2fa.send_code(
|
71
|
+
email="user@example.com",
|
72
|
+
)
|
71
73
|
```
|
72
74
|
|
73
75
|
While you can provide an `api_key` keyword argument,
|
@@ -90,7 +92,9 @@ client = AsyncStudyfetchSDK(
|
|
90
92
|
|
91
93
|
|
92
94
|
async def main() -> None:
|
93
|
-
await client.v1.auth.
|
95
|
+
await client.v1.auth.number_2fa.send_code(
|
96
|
+
email="user@example.com",
|
97
|
+
)
|
94
98
|
|
95
99
|
|
96
100
|
asyncio.run(main())
|
@@ -122,7 +126,9 @@ async def main() -> None:
|
|
122
126
|
api_key="My API Key",
|
123
127
|
http_client=DefaultAioHttpClient(),
|
124
128
|
) as client:
|
125
|
-
await client.v1.auth.
|
129
|
+
await client.v1.auth.number_2fa.send_code(
|
130
|
+
email="user@example.com",
|
131
|
+
)
|
126
132
|
|
127
133
|
|
128
134
|
asyncio.run(main())
|
@@ -187,7 +193,9 @@ from studyfetch_sdk import StudyfetchSDK
|
|
187
193
|
client = StudyfetchSDK()
|
188
194
|
|
189
195
|
try:
|
190
|
-
client.v1.auth.
|
196
|
+
client.v1.auth.number_2fa.send_code(
|
197
|
+
email="user@example.com",
|
198
|
+
)
|
191
199
|
except studyfetch_sdk.APIConnectionError as e:
|
192
200
|
print("The server could not be reached")
|
193
201
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
@@ -230,7 +238,9 @@ client = StudyfetchSDK(
|
|
230
238
|
)
|
231
239
|
|
232
240
|
# Or, configure per-request:
|
233
|
-
client.with_options(max_retries=5).v1.auth.
|
241
|
+
client.with_options(max_retries=5).v1.auth.number_2fa.send_code(
|
242
|
+
email="user@example.com",
|
243
|
+
)
|
234
244
|
```
|
235
245
|
|
236
246
|
### Timeouts
|
@@ -253,7 +263,9 @@ client = StudyfetchSDK(
|
|
253
263
|
)
|
254
264
|
|
255
265
|
# Override per-request:
|
256
|
-
client.with_options(timeout=5.0).v1.auth.
|
266
|
+
client.with_options(timeout=5.0).v1.auth.number_2fa.send_code(
|
267
|
+
email="user@example.com",
|
268
|
+
)
|
257
269
|
```
|
258
270
|
|
259
271
|
On timeout, an `APITimeoutError` is thrown.
|
@@ -294,11 +306,13 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
294
306
|
from studyfetch_sdk import StudyfetchSDK
|
295
307
|
|
296
308
|
client = StudyfetchSDK()
|
297
|
-
response = client.v1.auth.with_raw_response.
|
309
|
+
response = client.v1.auth.number_2fa.with_raw_response.send_code(
|
310
|
+
email="user@example.com",
|
311
|
+
)
|
298
312
|
print(response.headers.get('X-My-Header'))
|
299
313
|
|
300
|
-
|
301
|
-
print(
|
314
|
+
number_2fa = response.parse() # get the object that `v1.auth.number_2fa.send_code()` would have returned
|
315
|
+
print(number_2fa)
|
302
316
|
```
|
303
317
|
|
304
318
|
These methods return an [`APIResponse`](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/tree/main/src/studyfetch_sdk/_response.py) object.
|
@@ -312,7 +326,9 @@ The above interface eagerly reads the full response body when you make the reque
|
|
312
326
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
313
327
|
|
314
328
|
```python
|
315
|
-
with client.v1.auth.with_streaming_response.
|
329
|
+
with client.v1.auth.number_2fa.with_streaming_response.send_code(
|
330
|
+
email="user@example.com",
|
331
|
+
) as response:
|
316
332
|
print(response.headers.get("X-My-Header"))
|
317
333
|
|
318
334
|
for line in response.iter_lines():
|