studyfetch-sdk 0.1.0a1__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/__init__.py +100 -0
- studyfetch_sdk/_base_client.py +1992 -0
- studyfetch_sdk/_client.py +403 -0
- studyfetch_sdk/_compat.py +219 -0
- studyfetch_sdk/_constants.py +14 -0
- studyfetch_sdk/_exceptions.py +108 -0
- studyfetch_sdk/_files.py +123 -0
- studyfetch_sdk/_models.py +808 -0
- studyfetch_sdk/_qs.py +150 -0
- studyfetch_sdk/_resource.py +43 -0
- studyfetch_sdk/_response.py +832 -0
- studyfetch_sdk/_streaming.py +333 -0
- studyfetch_sdk/_types.py +219 -0
- studyfetch_sdk/_utils/__init__.py +57 -0
- studyfetch_sdk/_utils/_logs.py +25 -0
- studyfetch_sdk/_utils/_proxy.py +65 -0
- studyfetch_sdk/_utils/_reflection.py +42 -0
- studyfetch_sdk/_utils/_resources_proxy.py +24 -0
- studyfetch_sdk/_utils/_streams.py +12 -0
- studyfetch_sdk/_utils/_sync.py +86 -0
- studyfetch_sdk/_utils/_transform.py +447 -0
- studyfetch_sdk/_utils/_typing.py +151 -0
- studyfetch_sdk/_utils/_utils.py +422 -0
- studyfetch_sdk/_version.py +4 -0
- studyfetch_sdk/lib/.keep +4 -0
- studyfetch_sdk/py.typed +0 -0
- studyfetch_sdk/resources/__init__.py +19 -0
- studyfetch_sdk/resources/v1/__init__.py +215 -0
- studyfetch_sdk/resources/v1/audio_recaps/__init__.py +33 -0
- studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py +328 -0
- studyfetch_sdk/resources/v1/audio_recaps/sections.py +250 -0
- studyfetch_sdk/resources/v1/auth/__init__.py +61 -0
- studyfetch_sdk/resources/v1/auth/auth.py +620 -0
- studyfetch_sdk/resources/v1/auth/login.py +374 -0
- studyfetch_sdk/resources/v1/auth/number_2fa.py +457 -0
- studyfetch_sdk/resources/v1/auth/organization_invites.py +160 -0
- studyfetch_sdk/resources/v1/chat/__init__.py +47 -0
- studyfetch_sdk/resources/v1/chat/chat.py +576 -0
- studyfetch_sdk/resources/v1/chat/sessions.py +222 -0
- studyfetch_sdk/resources/v1/chat/test.py +190 -0
- studyfetch_sdk/resources/v1/components.py +943 -0
- studyfetch_sdk/resources/v1/embed/__init__.py +33 -0
- studyfetch_sdk/resources/v1/embed/component.py +278 -0
- studyfetch_sdk/resources/v1/embed/embed.py +346 -0
- studyfetch_sdk/resources/v1/explainers.py +216 -0
- studyfetch_sdk/resources/v1/flashcards.py +783 -0
- studyfetch_sdk/resources/v1/folders.py +744 -0
- studyfetch_sdk/resources/v1/materials/__init__.py +61 -0
- studyfetch_sdk/resources/v1/materials/bulk.py +134 -0
- studyfetch_sdk/resources/v1/materials/materials.py +1029 -0
- studyfetch_sdk/resources/v1/materials/test.py +290 -0
- studyfetch_sdk/resources/v1/materials/upload.py +410 -0
- studyfetch_sdk/resources/v1/organizations/__init__.py +103 -0
- studyfetch_sdk/resources/v1/organizations/api_keys.py +260 -0
- studyfetch_sdk/resources/v1/organizations/logo/__init__.py +33 -0
- studyfetch_sdk/resources/v1/organizations/logo/logo.py +166 -0
- studyfetch_sdk/resources/v1/organizations/logo/upload.py +184 -0
- studyfetch_sdk/resources/v1/organizations/organizations.py +428 -0
- studyfetch_sdk/resources/v1/organizations/profile/__init__.py +47 -0
- studyfetch_sdk/resources/v1/organizations/profile/models.py +134 -0
- studyfetch_sdk/resources/v1/organizations/profile/profile.py +248 -0
- studyfetch_sdk/resources/v1/organizations/profile/team.py +462 -0
- studyfetch_sdk/resources/v1/organizations/team/__init__.py +33 -0
- studyfetch_sdk/resources/v1/organizations/team/invite.py +236 -0
- studyfetch_sdk/resources/v1/organizations/team/team.py +564 -0
- studyfetch_sdk/resources/v1/organizations/theme.py +184 -0
- studyfetch_sdk/resources/v1/organizations/usage.py +160 -0
- studyfetch_sdk/resources/v1/scenarios/__init__.py +61 -0
- studyfetch_sdk/resources/v1/scenarios/component.py +330 -0
- studyfetch_sdk/resources/v1/scenarios/scenarios.py +708 -0
- studyfetch_sdk/resources/v1/scenarios/sessions.py +236 -0
- studyfetch_sdk/resources/v1/scenarios/submissions/__init__.py +33 -0
- studyfetch_sdk/resources/v1/scenarios/submissions/submissions.py +102 -0
- studyfetch_sdk/resources/v1/scenarios/submissions/user.py +210 -0
- studyfetch_sdk/resources/v1/tests/__init__.py +33 -0
- studyfetch_sdk/resources/v1/tests/component.py +160 -0
- studyfetch_sdk/resources/v1/tests/tests.py +682 -0
- studyfetch_sdk/resources/v1/upload/__init__.py +33 -0
- studyfetch_sdk/resources/v1/upload/component.py +388 -0
- studyfetch_sdk/resources/v1/upload/upload.py +102 -0
- studyfetch_sdk/resources/v1/usage.py +1126 -0
- studyfetch_sdk/resources/v1/v1.py +518 -0
- studyfetch_sdk/types/__init__.py +3 -0
- studyfetch_sdk/types/v1/__init__.py +52 -0
- studyfetch_sdk/types/v1/admin/__init__.py +3 -0
- studyfetch_sdk/types/v1/admin/organizations/__init__.py +3 -0
- studyfetch_sdk/types/v1/admin/organizations/models/__init__.py +3 -0
- studyfetch_sdk/types/v1/audio_recaps/__init__.py +3 -0
- studyfetch_sdk/types/v1/auth/__init__.py +13 -0
- studyfetch_sdk/types/v1/auth/login_authenticate_params.py +15 -0
- studyfetch_sdk/types/v1/auth/login_verify_2fa_params.py +15 -0
- studyfetch_sdk/types/v1/auth/login_verify_backup_code_params.py +17 -0
- studyfetch_sdk/types/v1/auth/number_2fa_disable_params.py +12 -0
- studyfetch_sdk/types/v1/auth/number_2fa_enable_params.py +12 -0
- studyfetch_sdk/types/v1/auth/number_2fa_regenerate_backup_codes_params.py +12 -0
- studyfetch_sdk/types/v1/auth/number_2fa_send_code_params.py +12 -0
- studyfetch_sdk/types/v1/auth_register_new_user_params.py +23 -0
- studyfetch_sdk/types/v1/auth_request_password_reset_params.py +12 -0
- studyfetch_sdk/types/v1/auth_reset_password_params.py +17 -0
- studyfetch_sdk/types/v1/chat/__init__.py +5 -0
- studyfetch_sdk/types/v1/chat/session_retrieve_params.py +11 -0
- studyfetch_sdk/types/v1/chat_retrieve_session_params.py +13 -0
- studyfetch_sdk/types/v1/chat_send_message_params.py +54 -0
- studyfetch_sdk/types/v1/chat_stream_params.py +28 -0
- studyfetch_sdk/types/v1/component_create_params.py +29 -0
- studyfetch_sdk/types/v1/component_create_response.py +46 -0
- studyfetch_sdk/types/v1/component_embed_params.py +99 -0
- studyfetch_sdk/types/v1/component_embed_response.py +38 -0
- studyfetch_sdk/types/v1/component_list_params.py +14 -0
- studyfetch_sdk/types/v1/component_list_response.py +49 -0
- studyfetch_sdk/types/v1/component_retrieve_response.py +46 -0
- studyfetch_sdk/types/v1/component_update_params.py +12 -0
- studyfetch_sdk/types/v1/component_update_response.py +46 -0
- studyfetch_sdk/types/v1/embed/__init__.py +6 -0
- studyfetch_sdk/types/v1/embed/component_interact_params.py +14 -0
- studyfetch_sdk/types/v1/embed/component_retrieve_params.py +12 -0
- studyfetch_sdk/types/v1/embed_get_theme_params.py +12 -0
- studyfetch_sdk/types/v1/embed_verify_params.py +12 -0
- studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +11 -0
- studyfetch_sdk/types/v1/flashcard_batch_process_params.py +36 -0
- studyfetch_sdk/types/v1/flashcard_batch_process_response.py +39 -0
- studyfetch_sdk/types/v1/flashcard_get_algorithm_info_response.py +37 -0
- studyfetch_sdk/types/v1/flashcard_get_all_params.py +23 -0
- studyfetch_sdk/types/v1/flashcard_get_due_params.py +19 -0
- studyfetch_sdk/types/v1/flashcard_get_stats_params.py +17 -0
- studyfetch_sdk/types/v1/flashcard_get_types_response.py +14 -0
- studyfetch_sdk/types/v1/flashcard_rate_params.py +23 -0
- studyfetch_sdk/types/v1/folder_create_params.py +17 -0
- studyfetch_sdk/types/v1/folder_list_params.py +14 -0
- studyfetch_sdk/types/v1/folder_update_params.py +17 -0
- studyfetch_sdk/types/v1/material_create_params.py +34 -0
- studyfetch_sdk/types/v1/material_create_response.py +62 -0
- studyfetch_sdk/types/v1/material_get_download_url_params.py +13 -0
- studyfetch_sdk/types/v1/material_list_params.py +14 -0
- studyfetch_sdk/types/v1/material_list_response.py +65 -0
- studyfetch_sdk/types/v1/material_retrieve_response.py +62 -0
- studyfetch_sdk/types/v1/materials/__init__.py +8 -0
- studyfetch_sdk/types/v1/materials/upload_upload_file_params.py +20 -0
- studyfetch_sdk/types/v1/materials/upload_upload_file_response.py +62 -0
- studyfetch_sdk/types/v1/materials/upload_upload_from_url_params.py +20 -0
- studyfetch_sdk/types/v1/materials/upload_upload_from_url_response.py +62 -0
- studyfetch_sdk/types/v1/organizations/__init__.py +3 -0
- studyfetch_sdk/types/v1/organizations/logo/__init__.py +3 -0
- studyfetch_sdk/types/v1/organizations/profile/__init__.py +3 -0
- studyfetch_sdk/types/v1/organizations/team/__init__.py +3 -0
- studyfetch_sdk/types/v1/scenario_create_params.py +11 -0
- studyfetch_sdk/types/v1/scenario_update_params.py +11 -0
- studyfetch_sdk/types/v1/scenarios/__init__.py +5 -0
- studyfetch_sdk/types/v1/scenarios/component_update_params.py +11 -0
- studyfetch_sdk/types/v1/scenarios/submissions/__init__.py +3 -0
- studyfetch_sdk/types/v1/test_create_params.py +20 -0
- studyfetch_sdk/types/v1/test_retake_params.py +14 -0
- studyfetch_sdk/types/v1/test_submit_answer_params.py +20 -0
- studyfetch_sdk/types/v1/test_submit_params.py +14 -0
- studyfetch_sdk/types/v1/tests/__init__.py +3 -0
- studyfetch_sdk/types/v1/upload/__init__.py +3 -0
- studyfetch_sdk/types/v1/usage_get_stats_params.py +23 -0
- studyfetch_sdk/types/v1/usage_get_summary_params.py +23 -0
- studyfetch_sdk/types/v1/usage_list_events_params.py +61 -0
- studyfetch_sdk/types/v1/usage_track_chat_params.py +54 -0
- studyfetch_sdk/types/v1/usage_track_event_params.py +128 -0
- studyfetch_sdk-0.1.0a1.dist-info/METADATA +453 -0
- studyfetch_sdk-0.1.0a1.dist-info/RECORD +165 -0
- studyfetch_sdk-0.1.0a1.dist-info/WHEEL +4 -0
- studyfetch_sdk-0.1.0a1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,236 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import httpx
|
6
|
+
|
7
|
+
from ....._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
8
|
+
from ....._compat import cached_property
|
9
|
+
from ....._resource import SyncAPIResource, AsyncAPIResource
|
10
|
+
from ....._response import (
|
11
|
+
to_raw_response_wrapper,
|
12
|
+
to_streamed_response_wrapper,
|
13
|
+
async_to_raw_response_wrapper,
|
14
|
+
async_to_streamed_response_wrapper,
|
15
|
+
)
|
16
|
+
from ....._base_client import make_request_options
|
17
|
+
|
18
|
+
__all__ = ["InviteResource", "AsyncInviteResource"]
|
19
|
+
|
20
|
+
|
21
|
+
class InviteResource(SyncAPIResource):
|
22
|
+
@cached_property
|
23
|
+
def with_raw_response(self) -> InviteResourceWithRawResponse:
|
24
|
+
"""
|
25
|
+
This property can be used as a prefix for any HTTP method call to return
|
26
|
+
the raw response object instead of the parsed content.
|
27
|
+
|
28
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
29
|
+
"""
|
30
|
+
return InviteResourceWithRawResponse(self)
|
31
|
+
|
32
|
+
@cached_property
|
33
|
+
def with_streaming_response(self) -> InviteResourceWithStreamingResponse:
|
34
|
+
"""
|
35
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
36
|
+
|
37
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
38
|
+
"""
|
39
|
+
return InviteResourceWithStreamingResponse(self)
|
40
|
+
|
41
|
+
def create(
|
42
|
+
self,
|
43
|
+
id: str,
|
44
|
+
*,
|
45
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
46
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
47
|
+
extra_headers: Headers | None = None,
|
48
|
+
extra_query: Query | None = None,
|
49
|
+
extra_body: Body | None = None,
|
50
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
51
|
+
) -> None:
|
52
|
+
"""
|
53
|
+
Args:
|
54
|
+
extra_headers: Send extra headers
|
55
|
+
|
56
|
+
extra_query: Add additional query parameters to the request
|
57
|
+
|
58
|
+
extra_body: Add additional JSON properties to the request
|
59
|
+
|
60
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
61
|
+
"""
|
62
|
+
if not id:
|
63
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
64
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
65
|
+
return self._post(
|
66
|
+
f"/api/v1/organizations/{id}/team/invite",
|
67
|
+
options=make_request_options(
|
68
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
69
|
+
),
|
70
|
+
cast_to=NoneType,
|
71
|
+
)
|
72
|
+
|
73
|
+
def retrieve_preview(
|
74
|
+
self,
|
75
|
+
token: str,
|
76
|
+
*,
|
77
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
78
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
79
|
+
extra_headers: Headers | None = None,
|
80
|
+
extra_query: Query | None = None,
|
81
|
+
extra_body: Body | None = None,
|
82
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
83
|
+
) -> None:
|
84
|
+
"""
|
85
|
+
Args:
|
86
|
+
extra_headers: Send extra headers
|
87
|
+
|
88
|
+
extra_query: Add additional query parameters to the request
|
89
|
+
|
90
|
+
extra_body: Add additional JSON properties to the request
|
91
|
+
|
92
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
93
|
+
"""
|
94
|
+
if not token:
|
95
|
+
raise ValueError(f"Expected a non-empty value for `token` but received {token!r}")
|
96
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
97
|
+
return self._get(
|
98
|
+
f"/api/v1/organizations/team/invite/{token}/preview",
|
99
|
+
options=make_request_options(
|
100
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
101
|
+
),
|
102
|
+
cast_to=NoneType,
|
103
|
+
)
|
104
|
+
|
105
|
+
|
106
|
+
class AsyncInviteResource(AsyncAPIResource):
|
107
|
+
@cached_property
|
108
|
+
def with_raw_response(self) -> AsyncInviteResourceWithRawResponse:
|
109
|
+
"""
|
110
|
+
This property can be used as a prefix for any HTTP method call to return
|
111
|
+
the raw response object instead of the parsed content.
|
112
|
+
|
113
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
114
|
+
"""
|
115
|
+
return AsyncInviteResourceWithRawResponse(self)
|
116
|
+
|
117
|
+
@cached_property
|
118
|
+
def with_streaming_response(self) -> AsyncInviteResourceWithStreamingResponse:
|
119
|
+
"""
|
120
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
121
|
+
|
122
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
123
|
+
"""
|
124
|
+
return AsyncInviteResourceWithStreamingResponse(self)
|
125
|
+
|
126
|
+
async def create(
|
127
|
+
self,
|
128
|
+
id: str,
|
129
|
+
*,
|
130
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
131
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
132
|
+
extra_headers: Headers | None = None,
|
133
|
+
extra_query: Query | None = None,
|
134
|
+
extra_body: Body | None = None,
|
135
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
136
|
+
) -> None:
|
137
|
+
"""
|
138
|
+
Args:
|
139
|
+
extra_headers: Send extra headers
|
140
|
+
|
141
|
+
extra_query: Add additional query parameters to the request
|
142
|
+
|
143
|
+
extra_body: Add additional JSON properties to the request
|
144
|
+
|
145
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
146
|
+
"""
|
147
|
+
if not id:
|
148
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
149
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
150
|
+
return await self._post(
|
151
|
+
f"/api/v1/organizations/{id}/team/invite",
|
152
|
+
options=make_request_options(
|
153
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
154
|
+
),
|
155
|
+
cast_to=NoneType,
|
156
|
+
)
|
157
|
+
|
158
|
+
async def retrieve_preview(
|
159
|
+
self,
|
160
|
+
token: str,
|
161
|
+
*,
|
162
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
163
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
164
|
+
extra_headers: Headers | None = None,
|
165
|
+
extra_query: Query | None = None,
|
166
|
+
extra_body: Body | None = None,
|
167
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
168
|
+
) -> None:
|
169
|
+
"""
|
170
|
+
Args:
|
171
|
+
extra_headers: Send extra headers
|
172
|
+
|
173
|
+
extra_query: Add additional query parameters to the request
|
174
|
+
|
175
|
+
extra_body: Add additional JSON properties to the request
|
176
|
+
|
177
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
178
|
+
"""
|
179
|
+
if not token:
|
180
|
+
raise ValueError(f"Expected a non-empty value for `token` but received {token!r}")
|
181
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
182
|
+
return await self._get(
|
183
|
+
f"/api/v1/organizations/team/invite/{token}/preview",
|
184
|
+
options=make_request_options(
|
185
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
186
|
+
),
|
187
|
+
cast_to=NoneType,
|
188
|
+
)
|
189
|
+
|
190
|
+
|
191
|
+
class InviteResourceWithRawResponse:
|
192
|
+
def __init__(self, invite: InviteResource) -> None:
|
193
|
+
self._invite = invite
|
194
|
+
|
195
|
+
self.create = to_raw_response_wrapper(
|
196
|
+
invite.create,
|
197
|
+
)
|
198
|
+
self.retrieve_preview = to_raw_response_wrapper(
|
199
|
+
invite.retrieve_preview,
|
200
|
+
)
|
201
|
+
|
202
|
+
|
203
|
+
class AsyncInviteResourceWithRawResponse:
|
204
|
+
def __init__(self, invite: AsyncInviteResource) -> None:
|
205
|
+
self._invite = invite
|
206
|
+
|
207
|
+
self.create = async_to_raw_response_wrapper(
|
208
|
+
invite.create,
|
209
|
+
)
|
210
|
+
self.retrieve_preview = async_to_raw_response_wrapper(
|
211
|
+
invite.retrieve_preview,
|
212
|
+
)
|
213
|
+
|
214
|
+
|
215
|
+
class InviteResourceWithStreamingResponse:
|
216
|
+
def __init__(self, invite: InviteResource) -> None:
|
217
|
+
self._invite = invite
|
218
|
+
|
219
|
+
self.create = to_streamed_response_wrapper(
|
220
|
+
invite.create,
|
221
|
+
)
|
222
|
+
self.retrieve_preview = to_streamed_response_wrapper(
|
223
|
+
invite.retrieve_preview,
|
224
|
+
)
|
225
|
+
|
226
|
+
|
227
|
+
class AsyncInviteResourceWithStreamingResponse:
|
228
|
+
def __init__(self, invite: AsyncInviteResource) -> None:
|
229
|
+
self._invite = invite
|
230
|
+
|
231
|
+
self.create = async_to_streamed_response_wrapper(
|
232
|
+
invite.create,
|
233
|
+
)
|
234
|
+
self.retrieve_preview = async_to_streamed_response_wrapper(
|
235
|
+
invite.retrieve_preview,
|
236
|
+
)
|