studyfetch-sdk 0.1.0a6__py3-none-any.whl → 0.1.0a7__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/auth/__init__.py +0 -14
- studyfetch_sdk/resources/v1/auth/auth.py +0 -32
- studyfetch_sdk/types/v1/auth/__init__.py +0 -2
- {studyfetch_sdk-0.1.0a6.dist-info → studyfetch_sdk-0.1.0a7.dist-info}/METADATA +11 -27
- {studyfetch_sdk-0.1.0a6.dist-info → studyfetch_sdk-0.1.0a7.dist-info}/RECORD +8 -10
- studyfetch_sdk/resources/v1/auth/number_2fa.py +0 -164
- studyfetch_sdk/types/v1/auth/number_2fa_send_code_params.py +0 -12
- {studyfetch_sdk-0.1.0a6.dist-info → studyfetch_sdk-0.1.0a7.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a6.dist-info → studyfetch_sdk-0.1.0a7.dist-info}/licenses/LICENSE +0 -0
studyfetch_sdk/_version.py
CHANGED
@@ -8,22 +8,8 @@ from .auth import (
|
|
8
8
|
AuthResourceWithStreamingResponse,
|
9
9
|
AsyncAuthResourceWithStreamingResponse,
|
10
10
|
)
|
11
|
-
from .number_2fa import (
|
12
|
-
Number2faResource,
|
13
|
-
AsyncNumber2faResource,
|
14
|
-
Number2faResourceWithRawResponse,
|
15
|
-
AsyncNumber2faResourceWithRawResponse,
|
16
|
-
Number2faResourceWithStreamingResponse,
|
17
|
-
AsyncNumber2faResourceWithStreamingResponse,
|
18
|
-
)
|
19
11
|
|
20
12
|
__all__ = [
|
21
|
-
"Number2faResource",
|
22
|
-
"AsyncNumber2faResource",
|
23
|
-
"Number2faResourceWithRawResponse",
|
24
|
-
"AsyncNumber2faResourceWithRawResponse",
|
25
|
-
"Number2faResourceWithStreamingResponse",
|
26
|
-
"AsyncNumber2faResourceWithStreamingResponse",
|
27
13
|
"AuthResource",
|
28
14
|
"AsyncAuthResource",
|
29
15
|
"AuthResourceWithRawResponse",
|
@@ -6,14 +6,6 @@ import httpx
|
|
6
6
|
|
7
7
|
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
8
8
|
from ...._compat import cached_property
|
9
|
-
from .number_2fa import (
|
10
|
-
Number2faResource,
|
11
|
-
AsyncNumber2faResource,
|
12
|
-
Number2faResourceWithRawResponse,
|
13
|
-
AsyncNumber2faResourceWithRawResponse,
|
14
|
-
Number2faResourceWithStreamingResponse,
|
15
|
-
AsyncNumber2faResourceWithStreamingResponse,
|
16
|
-
)
|
17
9
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
18
10
|
from ...._response import (
|
19
11
|
to_raw_response_wrapper,
|
@@ -27,10 +19,6 @@ __all__ = ["AuthResource", "AsyncAuthResource"]
|
|
27
19
|
|
28
20
|
|
29
21
|
class AuthResource(SyncAPIResource):
|
30
|
-
@cached_property
|
31
|
-
def number_2fa(self) -> Number2faResource:
|
32
|
-
return Number2faResource(self._client)
|
33
|
-
|
34
22
|
@cached_property
|
35
23
|
def with_raw_response(self) -> AuthResourceWithRawResponse:
|
36
24
|
"""
|
@@ -72,10 +60,6 @@ class AuthResource(SyncAPIResource):
|
|
72
60
|
|
73
61
|
|
74
62
|
class AsyncAuthResource(AsyncAPIResource):
|
75
|
-
@cached_property
|
76
|
-
def number_2fa(self) -> AsyncNumber2faResource:
|
77
|
-
return AsyncNumber2faResource(self._client)
|
78
|
-
|
79
63
|
@cached_property
|
80
64
|
def with_raw_response(self) -> AsyncAuthResourceWithRawResponse:
|
81
65
|
"""
|
@@ -124,10 +108,6 @@ class AuthResourceWithRawResponse:
|
|
124
108
|
auth.verify_reset_token,
|
125
109
|
)
|
126
110
|
|
127
|
-
@cached_property
|
128
|
-
def number_2fa(self) -> Number2faResourceWithRawResponse:
|
129
|
-
return Number2faResourceWithRawResponse(self._auth.number_2fa)
|
130
|
-
|
131
111
|
|
132
112
|
class AsyncAuthResourceWithRawResponse:
|
133
113
|
def __init__(self, auth: AsyncAuthResource) -> None:
|
@@ -137,10 +117,6 @@ class AsyncAuthResourceWithRawResponse:
|
|
137
117
|
auth.verify_reset_token,
|
138
118
|
)
|
139
119
|
|
140
|
-
@cached_property
|
141
|
-
def number_2fa(self) -> AsyncNumber2faResourceWithRawResponse:
|
142
|
-
return AsyncNumber2faResourceWithRawResponse(self._auth.number_2fa)
|
143
|
-
|
144
120
|
|
145
121
|
class AuthResourceWithStreamingResponse:
|
146
122
|
def __init__(self, auth: AuthResource) -> None:
|
@@ -150,10 +126,6 @@ class AuthResourceWithStreamingResponse:
|
|
150
126
|
auth.verify_reset_token,
|
151
127
|
)
|
152
128
|
|
153
|
-
@cached_property
|
154
|
-
def number_2fa(self) -> Number2faResourceWithStreamingResponse:
|
155
|
-
return Number2faResourceWithStreamingResponse(self._auth.number_2fa)
|
156
|
-
|
157
129
|
|
158
130
|
class AsyncAuthResourceWithStreamingResponse:
|
159
131
|
def __init__(self, auth: AsyncAuthResource) -> None:
|
@@ -162,7 +134,3 @@ class AsyncAuthResourceWithStreamingResponse:
|
|
162
134
|
self.verify_reset_token = async_to_streamed_response_wrapper(
|
163
135
|
auth.verify_reset_token,
|
164
136
|
)
|
165
|
-
|
166
|
-
@cached_property
|
167
|
-
def number_2fa(self) -> AsyncNumber2faResourceWithStreamingResponse:
|
168
|
-
return AsyncNumber2faResourceWithStreamingResponse(self._auth.number_2fa)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: studyfetch_sdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a7
|
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
|
@@ -67,9 +67,7 @@ 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.
|
71
|
-
email="user@example.com",
|
72
|
-
)
|
70
|
+
client.v1.auth.verify_reset_token()
|
73
71
|
```
|
74
72
|
|
75
73
|
While you can provide an `api_key` keyword argument,
|
@@ -92,9 +90,7 @@ client = AsyncStudyfetchSDK(
|
|
92
90
|
|
93
91
|
|
94
92
|
async def main() -> None:
|
95
|
-
await client.v1.auth.
|
96
|
-
email="user@example.com",
|
97
|
-
)
|
93
|
+
await client.v1.auth.verify_reset_token()
|
98
94
|
|
99
95
|
|
100
96
|
asyncio.run(main())
|
@@ -126,9 +122,7 @@ async def main() -> None:
|
|
126
122
|
api_key="My API Key",
|
127
123
|
http_client=DefaultAioHttpClient(),
|
128
124
|
) as client:
|
129
|
-
await client.v1.auth.
|
130
|
-
email="user@example.com",
|
131
|
-
)
|
125
|
+
await client.v1.auth.verify_reset_token()
|
132
126
|
|
133
127
|
|
134
128
|
asyncio.run(main())
|
@@ -193,9 +187,7 @@ from studyfetch_sdk import StudyfetchSDK
|
|
193
187
|
client = StudyfetchSDK()
|
194
188
|
|
195
189
|
try:
|
196
|
-
client.v1.auth.
|
197
|
-
email="user@example.com",
|
198
|
-
)
|
190
|
+
client.v1.auth.verify_reset_token()
|
199
191
|
except studyfetch_sdk.APIConnectionError as e:
|
200
192
|
print("The server could not be reached")
|
201
193
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
@@ -238,9 +230,7 @@ client = StudyfetchSDK(
|
|
238
230
|
)
|
239
231
|
|
240
232
|
# Or, configure per-request:
|
241
|
-
client.with_options(max_retries=5).v1.auth.
|
242
|
-
email="user@example.com",
|
243
|
-
)
|
233
|
+
client.with_options(max_retries=5).v1.auth.verify_reset_token()
|
244
234
|
```
|
245
235
|
|
246
236
|
### Timeouts
|
@@ -263,9 +253,7 @@ client = StudyfetchSDK(
|
|
263
253
|
)
|
264
254
|
|
265
255
|
# Override per-request:
|
266
|
-
client.with_options(timeout=5.0).v1.auth.
|
267
|
-
email="user@example.com",
|
268
|
-
)
|
256
|
+
client.with_options(timeout=5.0).v1.auth.verify_reset_token()
|
269
257
|
```
|
270
258
|
|
271
259
|
On timeout, an `APITimeoutError` is thrown.
|
@@ -306,13 +294,11 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
306
294
|
from studyfetch_sdk import StudyfetchSDK
|
307
295
|
|
308
296
|
client = StudyfetchSDK()
|
309
|
-
response = client.v1.auth.
|
310
|
-
email="user@example.com",
|
311
|
-
)
|
297
|
+
response = client.v1.auth.with_raw_response.verify_reset_token()
|
312
298
|
print(response.headers.get('X-My-Header'))
|
313
299
|
|
314
|
-
|
315
|
-
print(
|
300
|
+
auth = response.parse() # get the object that `v1.auth.verify_reset_token()` would have returned
|
301
|
+
print(auth)
|
316
302
|
```
|
317
303
|
|
318
304
|
These methods return an [`APIResponse`](https://github.com/GoStudyFetchGo/studyfetch-sdk-python/tree/main/src/studyfetch_sdk/_response.py) object.
|
@@ -326,9 +312,7 @@ The above interface eagerly reads the full response body when you make the reque
|
|
326
312
|
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.
|
327
313
|
|
328
314
|
```python
|
329
|
-
with client.v1.auth.
|
330
|
-
email="user@example.com",
|
331
|
-
) as response:
|
315
|
+
with client.v1.auth.with_streaming_response.verify_reset_token() as response:
|
332
316
|
print(response.headers.get("X-My-Header"))
|
333
317
|
|
334
318
|
for line in response.iter_lines():
|
@@ -11,7 +11,7 @@ studyfetch_sdk/_resource.py,sha256=y0aoAqMIYwTAwStuxbpO8XpTPnrSNQQ_ZcgiH5xcntg,1
|
|
11
11
|
studyfetch_sdk/_response.py,sha256=6ph8tSkqF5pNbTo_2Zhizhq2O-Eb67TcksHwyg3aXdc,28864
|
12
12
|
studyfetch_sdk/_streaming.py,sha256=HZoENuPVzWhBn24eH3lnMCvRbWN0EPwvhWYfdlJfw0A,10128
|
13
13
|
studyfetch_sdk/_types.py,sha256=6nvqHGarRGuhs_FL8tJ8sGXXD8XWajNynT2K78GxRUI,6205
|
14
|
-
studyfetch_sdk/_version.py,sha256=
|
14
|
+
studyfetch_sdk/_version.py,sha256=FrQHoamgxDQOY_InsExxDNesNfEIlQMXrDlpSwuVaio,174
|
15
15
|
studyfetch_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
studyfetch_sdk/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
17
|
studyfetch_sdk/_utils/_logs.py,sha256=EoZgOiIkpf2WB_0Ts0Ti7G3o_25v7IsPf_q-yEU6sbY,798
|
@@ -35,9 +35,8 @@ studyfetch_sdk/resources/v1/v1.py,sha256=5noiTRTSDFikwpc1bxuDI8JuUHROl7vUa-hLitp
|
|
35
35
|
studyfetch_sdk/resources/v1/audio_recaps/__init__.py,sha256=X6oJGmyaqUBFChSn8l0r-EHjCZos36O10zfFYWuid2w,1094
|
36
36
|
studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py,sha256=XAfSWFDbjUSp9bKjDVHqLyrEv3kNtTYSaLtWPRFIzdc,12630
|
37
37
|
studyfetch_sdk/resources/v1/audio_recaps/sections.py,sha256=AcYtFSNemNP2T-fJn2nZkrPNNpaEtqiwPNuTpual2Lw,9451
|
38
|
-
studyfetch_sdk/resources/v1/auth/__init__.py,sha256=
|
39
|
-
studyfetch_sdk/resources/v1/auth/auth.py,sha256=
|
40
|
-
studyfetch_sdk/resources/v1/auth/number_2fa.py,sha256=QgfvK7_m-Kko29XYyDSlAWFv6l7xRF8t6ndNAW5kBz8,6195
|
38
|
+
studyfetch_sdk/resources/v1/auth/__init__.py,sha256=wtCDK9mkf_r1OZdx0Sy-V3cMeS2EILJWJZfX06zUL2U,526
|
39
|
+
studyfetch_sdk/resources/v1/auth/auth.py,sha256=Oimc3Jjs2Wq3sWpoCHMPMEeF8S8W5xmaJhrRl4FJevM,5075
|
41
40
|
studyfetch_sdk/resources/v1/chat/__init__.py,sha256=WSv53HDkoj5Ec37hiJlCV2V-ZquTjYyG5hU9cOdZPBk,1426
|
42
41
|
studyfetch_sdk/resources/v1/chat/chat.py,sha256=PFySkZ3HsxthOYe5QZYAKkSwJryo6tE7Tl53f7DscYo,21666
|
43
42
|
studyfetch_sdk/resources/v1/chat/sessions.py,sha256=mjcTJFft2zXyQlqhARz_J5md1BfAD3uhDVp-olow83o,8479
|
@@ -106,8 +105,7 @@ studyfetch_sdk/types/v1/usage_get_stats_params.py,sha256=TQwpTxrPjfa7OA-UdYOVppb
|
|
106
105
|
studyfetch_sdk/types/v1/usage_get_summary_params.py,sha256=ZFd6VwpQxL59a2akaJDRZbJJcNbZ88KU4S6UreCZr4U,768
|
107
106
|
studyfetch_sdk/types/v1/usage_list_events_params.py,sha256=iMhwqdlaEbtyBqlTpAEcTdYCQumwWVmYBo8czDPLm74,1729
|
108
107
|
studyfetch_sdk/types/v1/audio_recaps/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
109
|
-
studyfetch_sdk/types/v1/auth/__init__.py,sha256=
|
110
|
-
studyfetch_sdk/types/v1/auth/number_2fa_send_code_params.py,sha256=kb8JNsBwu45iiCr7FFLSADKccPN4dgIVQWEleTNSr50,336
|
108
|
+
studyfetch_sdk/types/v1/auth/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
111
109
|
studyfetch_sdk/types/v1/chat/__init__.py,sha256=wYABOEkbpJ2giFls8t8N32vNezDWQvFRnPw_giWy58g,207
|
112
110
|
studyfetch_sdk/types/v1/chat/session_retrieve_params.py,sha256=G9P18vHLjgrLTVyWyKv8KGr0Pa4W9e8ZubMysxpty6I,290
|
113
111
|
studyfetch_sdk/types/v1/embed/__init__.py,sha256=PY0v530kkkL8N0ABYvRpyNG0B4-56axqoZ1Gbp6GYq0,303
|
@@ -121,7 +119,7 @@ studyfetch_sdk/types/v1/scenarios/component_update_params.py,sha256=_Rs0wRJtrLMK
|
|
121
119
|
studyfetch_sdk/types/v1/scenarios/submissions/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
122
120
|
studyfetch_sdk/types/v1/tests/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
123
121
|
studyfetch_sdk/types/v1/upload/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
|
124
|
-
studyfetch_sdk-0.1.
|
125
|
-
studyfetch_sdk-0.1.
|
126
|
-
studyfetch_sdk-0.1.
|
127
|
-
studyfetch_sdk-0.1.
|
122
|
+
studyfetch_sdk-0.1.0a7.dist-info/METADATA,sha256=Ogws8-R96EM87u6CseFVEzOobtTwRi0zbLLm9HzboWM,14736
|
123
|
+
studyfetch_sdk-0.1.0a7.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
124
|
+
studyfetch_sdk-0.1.0a7.dist-info/licenses/LICENSE,sha256=CsdbJMegH_AAWljUmVcwW0Cj_GyIm1hjw6qPqPnmdn4,11344
|
125
|
+
studyfetch_sdk-0.1.0a7.dist-info/RECORD,,
|
@@ -1,164 +0,0 @@
|
|
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 ...._utils import maybe_transform, async_maybe_transform
|
9
|
-
from ...._compat import cached_property
|
10
|
-
from ...._resource import SyncAPIResource, AsyncAPIResource
|
11
|
-
from ...._response import (
|
12
|
-
to_raw_response_wrapper,
|
13
|
-
to_streamed_response_wrapper,
|
14
|
-
async_to_raw_response_wrapper,
|
15
|
-
async_to_streamed_response_wrapper,
|
16
|
-
)
|
17
|
-
from ...._base_client import make_request_options
|
18
|
-
from ....types.v1.auth import number_2fa_send_code_params
|
19
|
-
|
20
|
-
__all__ = ["Number2faResource", "AsyncNumber2faResource"]
|
21
|
-
|
22
|
-
|
23
|
-
class Number2faResource(SyncAPIResource):
|
24
|
-
@cached_property
|
25
|
-
def with_raw_response(self) -> Number2faResourceWithRawResponse:
|
26
|
-
"""
|
27
|
-
This property can be used as a prefix for any HTTP method call to return
|
28
|
-
the raw response object instead of the parsed content.
|
29
|
-
|
30
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
31
|
-
"""
|
32
|
-
return Number2faResourceWithRawResponse(self)
|
33
|
-
|
34
|
-
@cached_property
|
35
|
-
def with_streaming_response(self) -> Number2faResourceWithStreamingResponse:
|
36
|
-
"""
|
37
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
38
|
-
|
39
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
40
|
-
"""
|
41
|
-
return Number2faResourceWithStreamingResponse(self)
|
42
|
-
|
43
|
-
def send_code(
|
44
|
-
self,
|
45
|
-
*,
|
46
|
-
email: str,
|
47
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
48
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
49
|
-
extra_headers: Headers | None = None,
|
50
|
-
extra_query: Query | None = None,
|
51
|
-
extra_body: Body | None = None,
|
52
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
53
|
-
) -> None:
|
54
|
-
"""
|
55
|
-
Args:
|
56
|
-
email: Email to send verification code
|
57
|
-
|
58
|
-
extra_headers: Send extra headers
|
59
|
-
|
60
|
-
extra_query: Add additional query parameters to the request
|
61
|
-
|
62
|
-
extra_body: Add additional JSON properties to the request
|
63
|
-
|
64
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
65
|
-
"""
|
66
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
67
|
-
return self._post(
|
68
|
-
"/api/v1/auth/2fa/send-code",
|
69
|
-
body=maybe_transform({"email": email}, number_2fa_send_code_params.Number2faSendCodeParams),
|
70
|
-
options=make_request_options(
|
71
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
72
|
-
),
|
73
|
-
cast_to=NoneType,
|
74
|
-
)
|
75
|
-
|
76
|
-
|
77
|
-
class AsyncNumber2faResource(AsyncAPIResource):
|
78
|
-
@cached_property
|
79
|
-
def with_raw_response(self) -> AsyncNumber2faResourceWithRawResponse:
|
80
|
-
"""
|
81
|
-
This property can be used as a prefix for any HTTP method call to return
|
82
|
-
the raw response object instead of the parsed content.
|
83
|
-
|
84
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
85
|
-
"""
|
86
|
-
return AsyncNumber2faResourceWithRawResponse(self)
|
87
|
-
|
88
|
-
@cached_property
|
89
|
-
def with_streaming_response(self) -> AsyncNumber2faResourceWithStreamingResponse:
|
90
|
-
"""
|
91
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
92
|
-
|
93
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
94
|
-
"""
|
95
|
-
return AsyncNumber2faResourceWithStreamingResponse(self)
|
96
|
-
|
97
|
-
async def send_code(
|
98
|
-
self,
|
99
|
-
*,
|
100
|
-
email: str,
|
101
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
102
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
103
|
-
extra_headers: Headers | None = None,
|
104
|
-
extra_query: Query | None = None,
|
105
|
-
extra_body: Body | None = None,
|
106
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
107
|
-
) -> None:
|
108
|
-
"""
|
109
|
-
Args:
|
110
|
-
email: Email to send verification code
|
111
|
-
|
112
|
-
extra_headers: Send extra headers
|
113
|
-
|
114
|
-
extra_query: Add additional query parameters to the request
|
115
|
-
|
116
|
-
extra_body: Add additional JSON properties to the request
|
117
|
-
|
118
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
119
|
-
"""
|
120
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
121
|
-
return await self._post(
|
122
|
-
"/api/v1/auth/2fa/send-code",
|
123
|
-
body=await async_maybe_transform({"email": email}, number_2fa_send_code_params.Number2faSendCodeParams),
|
124
|
-
options=make_request_options(
|
125
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
126
|
-
),
|
127
|
-
cast_to=NoneType,
|
128
|
-
)
|
129
|
-
|
130
|
-
|
131
|
-
class Number2faResourceWithRawResponse:
|
132
|
-
def __init__(self, number_2fa: Number2faResource) -> None:
|
133
|
-
self._number_2fa = number_2fa
|
134
|
-
|
135
|
-
self.send_code = to_raw_response_wrapper(
|
136
|
-
number_2fa.send_code,
|
137
|
-
)
|
138
|
-
|
139
|
-
|
140
|
-
class AsyncNumber2faResourceWithRawResponse:
|
141
|
-
def __init__(self, number_2fa: AsyncNumber2faResource) -> None:
|
142
|
-
self._number_2fa = number_2fa
|
143
|
-
|
144
|
-
self.send_code = async_to_raw_response_wrapper(
|
145
|
-
number_2fa.send_code,
|
146
|
-
)
|
147
|
-
|
148
|
-
|
149
|
-
class Number2faResourceWithStreamingResponse:
|
150
|
-
def __init__(self, number_2fa: Number2faResource) -> None:
|
151
|
-
self._number_2fa = number_2fa
|
152
|
-
|
153
|
-
self.send_code = to_streamed_response_wrapper(
|
154
|
-
number_2fa.send_code,
|
155
|
-
)
|
156
|
-
|
157
|
-
|
158
|
-
class AsyncNumber2faResourceWithStreamingResponse:
|
159
|
-
def __init__(self, number_2fa: AsyncNumber2faResource) -> None:
|
160
|
-
self._number_2fa = number_2fa
|
161
|
-
|
162
|
-
self.send_code = async_to_streamed_response_wrapper(
|
163
|
-
number_2fa.send_code,
|
164
|
-
)
|
@@ -1,12 +0,0 @@
|
|
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__ = ["Number2faSendCodeParams"]
|
8
|
-
|
9
|
-
|
10
|
-
class Number2faSendCodeParams(TypedDict, total=False):
|
11
|
-
email: Required[str]
|
12
|
-
"""Email to send verification code"""
|
File without changes
|
File without changes
|