studyfetch-sdk 0.1.0a2__py3-none-any.whl → 0.1.0a4__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 +0 -14
- studyfetch_sdk/resources/v1/auth/__init__.py +0 -28
- studyfetch_sdk/resources/v1/auth/auth.py +0 -504
- studyfetch_sdk/resources/v1/auth/number_2fa.py +1 -294
- studyfetch_sdk/resources/v1/chat/chat.py +7 -7
- studyfetch_sdk/resources/v1/components.py +9 -8
- studyfetch_sdk/resources/v1/flashcards.py +16 -16
- studyfetch_sdk/resources/v1/usage.py +1 -593
- studyfetch_sdk/resources/v1/v1.py +0 -32
- studyfetch_sdk/types/v1/__init__.py +0 -5
- studyfetch_sdk/types/v1/auth/__init__.py +0 -8
- studyfetch_sdk/types/v1/chat_send_message_params.py +3 -3
- studyfetch_sdk/types/v1/component_create_params.py +295 -3
- studyfetch_sdk/types/v1/component_create_response.py +3 -1
- studyfetch_sdk/types/v1/component_embed_params.py +3 -2
- studyfetch_sdk/types/v1/component_list_response.py +3 -1
- studyfetch_sdk/types/v1/component_retrieve_response.py +3 -1
- studyfetch_sdk/types/v1/component_update_response.py +3 -1
- studyfetch_sdk/types/v1/flashcard_get_all_params.py +2 -2
- studyfetch_sdk/types/v1/flashcard_get_due_params.py +1 -1
- studyfetch_sdk/types/v1/flashcard_get_stats_params.py +2 -2
- {studyfetch_sdk-0.1.0a2.dist-info → studyfetch_sdk-0.1.0a4.dist-info}/METADATA +11 -35
- {studyfetch_sdk-0.1.0a2.dist-info → studyfetch_sdk-0.1.0a4.dist-info}/RECORD +26 -54
- studyfetch_sdk/resources/v1/auth/login.py +0 -374
- studyfetch_sdk/resources/v1/auth/organization_invites.py +0 -160
- studyfetch_sdk/resources/v1/organizations/__init__.py +0 -103
- studyfetch_sdk/resources/v1/organizations/api_keys.py +0 -260
- studyfetch_sdk/resources/v1/organizations/logo/__init__.py +0 -33
- studyfetch_sdk/resources/v1/organizations/logo/logo.py +0 -166
- studyfetch_sdk/resources/v1/organizations/logo/upload.py +0 -184
- studyfetch_sdk/resources/v1/organizations/organizations.py +0 -428
- studyfetch_sdk/resources/v1/organizations/profile/__init__.py +0 -47
- studyfetch_sdk/resources/v1/organizations/profile/models.py +0 -134
- studyfetch_sdk/resources/v1/organizations/profile/profile.py +0 -248
- studyfetch_sdk/resources/v1/organizations/profile/team.py +0 -462
- studyfetch_sdk/resources/v1/organizations/team/__init__.py +0 -33
- studyfetch_sdk/resources/v1/organizations/team/invite.py +0 -236
- studyfetch_sdk/resources/v1/organizations/team/team.py +0 -564
- studyfetch_sdk/resources/v1/organizations/theme.py +0 -184
- studyfetch_sdk/resources/v1/organizations/usage.py +0 -210
- studyfetch_sdk/types/v1/auth/login_authenticate_params.py +0 -15
- studyfetch_sdk/types/v1/auth/login_verify_2fa_params.py +0 -15
- studyfetch_sdk/types/v1/auth/login_verify_backup_code_params.py +0 -17
- studyfetch_sdk/types/v1/auth/number_2fa_disable_params.py +0 -12
- studyfetch_sdk/types/v1/auth/number_2fa_enable_params.py +0 -12
- studyfetch_sdk/types/v1/auth/number_2fa_regenerate_backup_codes_params.py +0 -12
- studyfetch_sdk/types/v1/auth_register_new_user_params.py +0 -23
- studyfetch_sdk/types/v1/auth_request_password_reset_params.py +0 -12
- studyfetch_sdk/types/v1/auth_reset_password_params.py +0 -17
- studyfetch_sdk/types/v1/usage_track_chat_params.py +0 -54
- studyfetch_sdk/types/v1/usage_track_event_params.py +0 -128
- {studyfetch_sdk-0.1.0a2.dist-info → studyfetch_sdk-0.1.0a4.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a2.dist-info → studyfetch_sdk-0.1.0a4.dist-info}/licenses/LICENSE +0 -0
@@ -1,564 +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 .invite import (
|
8
|
-
InviteResource,
|
9
|
-
AsyncInviteResource,
|
10
|
-
InviteResourceWithRawResponse,
|
11
|
-
AsyncInviteResourceWithRawResponse,
|
12
|
-
InviteResourceWithStreamingResponse,
|
13
|
-
AsyncInviteResourceWithStreamingResponse,
|
14
|
-
)
|
15
|
-
from ....._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
16
|
-
from ....._compat import cached_property
|
17
|
-
from ....._resource import SyncAPIResource, AsyncAPIResource
|
18
|
-
from ....._response import (
|
19
|
-
to_raw_response_wrapper,
|
20
|
-
to_streamed_response_wrapper,
|
21
|
-
async_to_raw_response_wrapper,
|
22
|
-
async_to_streamed_response_wrapper,
|
23
|
-
)
|
24
|
-
from ....._base_client import make_request_options
|
25
|
-
|
26
|
-
__all__ = ["TeamResource", "AsyncTeamResource"]
|
27
|
-
|
28
|
-
|
29
|
-
class TeamResource(SyncAPIResource):
|
30
|
-
@cached_property
|
31
|
-
def invite(self) -> InviteResource:
|
32
|
-
return InviteResource(self._client)
|
33
|
-
|
34
|
-
@cached_property
|
35
|
-
def with_raw_response(self) -> TeamResourceWithRawResponse:
|
36
|
-
"""
|
37
|
-
This property can be used as a prefix for any HTTP method call to return
|
38
|
-
the raw response object instead of the parsed content.
|
39
|
-
|
40
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
41
|
-
"""
|
42
|
-
return TeamResourceWithRawResponse(self)
|
43
|
-
|
44
|
-
@cached_property
|
45
|
-
def with_streaming_response(self) -> TeamResourceWithStreamingResponse:
|
46
|
-
"""
|
47
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
48
|
-
|
49
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
50
|
-
"""
|
51
|
-
return TeamResourceWithStreamingResponse(self)
|
52
|
-
|
53
|
-
def list(
|
54
|
-
self,
|
55
|
-
id: str,
|
56
|
-
*,
|
57
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
58
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
59
|
-
extra_headers: Headers | None = None,
|
60
|
-
extra_query: Query | None = None,
|
61
|
-
extra_body: Body | None = None,
|
62
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
63
|
-
) -> None:
|
64
|
-
"""
|
65
|
-
Args:
|
66
|
-
extra_headers: Send extra headers
|
67
|
-
|
68
|
-
extra_query: Add additional query parameters to the request
|
69
|
-
|
70
|
-
extra_body: Add additional JSON properties to the request
|
71
|
-
|
72
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
73
|
-
"""
|
74
|
-
if not id:
|
75
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
76
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
77
|
-
return self._get(
|
78
|
-
f"/api/v1/organizations/{id}/team",
|
79
|
-
options=make_request_options(
|
80
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
81
|
-
),
|
82
|
-
cast_to=NoneType,
|
83
|
-
)
|
84
|
-
|
85
|
-
def delete(
|
86
|
-
self,
|
87
|
-
email: str,
|
88
|
-
*,
|
89
|
-
id: str,
|
90
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
91
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
92
|
-
extra_headers: Headers | None = None,
|
93
|
-
extra_query: Query | None = None,
|
94
|
-
extra_body: Body | None = None,
|
95
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
96
|
-
) -> None:
|
97
|
-
"""
|
98
|
-
Args:
|
99
|
-
extra_headers: Send extra headers
|
100
|
-
|
101
|
-
extra_query: Add additional query parameters to the request
|
102
|
-
|
103
|
-
extra_body: Add additional JSON properties to the request
|
104
|
-
|
105
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
106
|
-
"""
|
107
|
-
if not id:
|
108
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
109
|
-
if not email:
|
110
|
-
raise ValueError(f"Expected a non-empty value for `email` but received {email!r}")
|
111
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
112
|
-
return self._delete(
|
113
|
-
f"/api/v1/organizations/{id}/team/{email}",
|
114
|
-
options=make_request_options(
|
115
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
116
|
-
),
|
117
|
-
cast_to=NoneType,
|
118
|
-
)
|
119
|
-
|
120
|
-
def accept_invite(
|
121
|
-
self,
|
122
|
-
*,
|
123
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
124
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
125
|
-
extra_headers: Headers | None = None,
|
126
|
-
extra_query: Query | None = None,
|
127
|
-
extra_body: Body | None = None,
|
128
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
129
|
-
) -> None:
|
130
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
131
|
-
return self._post(
|
132
|
-
"/api/v1/organizations/team/accept-invite",
|
133
|
-
options=make_request_options(
|
134
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
135
|
-
),
|
136
|
-
cast_to=NoneType,
|
137
|
-
)
|
138
|
-
|
139
|
-
def resend_invite(
|
140
|
-
self,
|
141
|
-
email: str,
|
142
|
-
*,
|
143
|
-
id: str,
|
144
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
145
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
146
|
-
extra_headers: Headers | None = None,
|
147
|
-
extra_query: Query | None = None,
|
148
|
-
extra_body: Body | None = None,
|
149
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
150
|
-
) -> None:
|
151
|
-
"""
|
152
|
-
Args:
|
153
|
-
extra_headers: Send extra headers
|
154
|
-
|
155
|
-
extra_query: Add additional query parameters to the request
|
156
|
-
|
157
|
-
extra_body: Add additional JSON properties to the request
|
158
|
-
|
159
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
160
|
-
"""
|
161
|
-
if not id:
|
162
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
163
|
-
if not email:
|
164
|
-
raise ValueError(f"Expected a non-empty value for `email` but received {email!r}")
|
165
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
166
|
-
return self._post(
|
167
|
-
f"/api/v1/organizations/{id}/team/{email}/resend-invite",
|
168
|
-
options=make_request_options(
|
169
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
170
|
-
),
|
171
|
-
cast_to=NoneType,
|
172
|
-
)
|
173
|
-
|
174
|
-
def retrieve_detailed(
|
175
|
-
self,
|
176
|
-
id: str,
|
177
|
-
*,
|
178
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
179
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
180
|
-
extra_headers: Headers | None = None,
|
181
|
-
extra_query: Query | None = None,
|
182
|
-
extra_body: Body | None = None,
|
183
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
184
|
-
) -> None:
|
185
|
-
"""
|
186
|
-
Args:
|
187
|
-
extra_headers: Send extra headers
|
188
|
-
|
189
|
-
extra_query: Add additional query parameters to the request
|
190
|
-
|
191
|
-
extra_body: Add additional JSON properties to the request
|
192
|
-
|
193
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
194
|
-
"""
|
195
|
-
if not id:
|
196
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
197
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
198
|
-
return self._get(
|
199
|
-
f"/api/v1/organizations/{id}/team/detailed",
|
200
|
-
options=make_request_options(
|
201
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
202
|
-
),
|
203
|
-
cast_to=NoneType,
|
204
|
-
)
|
205
|
-
|
206
|
-
def update_role(
|
207
|
-
self,
|
208
|
-
email: str,
|
209
|
-
*,
|
210
|
-
id: str,
|
211
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
212
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
213
|
-
extra_headers: Headers | None = None,
|
214
|
-
extra_query: Query | None = None,
|
215
|
-
extra_body: Body | None = None,
|
216
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
217
|
-
) -> None:
|
218
|
-
"""
|
219
|
-
Args:
|
220
|
-
extra_headers: Send extra headers
|
221
|
-
|
222
|
-
extra_query: Add additional query parameters to the request
|
223
|
-
|
224
|
-
extra_body: Add additional JSON properties to the request
|
225
|
-
|
226
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
227
|
-
"""
|
228
|
-
if not id:
|
229
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
230
|
-
if not email:
|
231
|
-
raise ValueError(f"Expected a non-empty value for `email` but received {email!r}")
|
232
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
233
|
-
return self._put(
|
234
|
-
f"/api/v1/organizations/{id}/team/{email}/role",
|
235
|
-
options=make_request_options(
|
236
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
237
|
-
),
|
238
|
-
cast_to=NoneType,
|
239
|
-
)
|
240
|
-
|
241
|
-
|
242
|
-
class AsyncTeamResource(AsyncAPIResource):
|
243
|
-
@cached_property
|
244
|
-
def invite(self) -> AsyncInviteResource:
|
245
|
-
return AsyncInviteResource(self._client)
|
246
|
-
|
247
|
-
@cached_property
|
248
|
-
def with_raw_response(self) -> AsyncTeamResourceWithRawResponse:
|
249
|
-
"""
|
250
|
-
This property can be used as a prefix for any HTTP method call to return
|
251
|
-
the raw response object instead of the parsed content.
|
252
|
-
|
253
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
254
|
-
"""
|
255
|
-
return AsyncTeamResourceWithRawResponse(self)
|
256
|
-
|
257
|
-
@cached_property
|
258
|
-
def with_streaming_response(self) -> AsyncTeamResourceWithStreamingResponse:
|
259
|
-
"""
|
260
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
261
|
-
|
262
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
263
|
-
"""
|
264
|
-
return AsyncTeamResourceWithStreamingResponse(self)
|
265
|
-
|
266
|
-
async def list(
|
267
|
-
self,
|
268
|
-
id: str,
|
269
|
-
*,
|
270
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
271
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
272
|
-
extra_headers: Headers | None = None,
|
273
|
-
extra_query: Query | None = None,
|
274
|
-
extra_body: Body | None = None,
|
275
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
276
|
-
) -> None:
|
277
|
-
"""
|
278
|
-
Args:
|
279
|
-
extra_headers: Send extra headers
|
280
|
-
|
281
|
-
extra_query: Add additional query parameters to the request
|
282
|
-
|
283
|
-
extra_body: Add additional JSON properties to the request
|
284
|
-
|
285
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
286
|
-
"""
|
287
|
-
if not id:
|
288
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
289
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
290
|
-
return await self._get(
|
291
|
-
f"/api/v1/organizations/{id}/team",
|
292
|
-
options=make_request_options(
|
293
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
294
|
-
),
|
295
|
-
cast_to=NoneType,
|
296
|
-
)
|
297
|
-
|
298
|
-
async def delete(
|
299
|
-
self,
|
300
|
-
email: str,
|
301
|
-
*,
|
302
|
-
id: str,
|
303
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
304
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
305
|
-
extra_headers: Headers | None = None,
|
306
|
-
extra_query: Query | None = None,
|
307
|
-
extra_body: Body | None = None,
|
308
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
309
|
-
) -> None:
|
310
|
-
"""
|
311
|
-
Args:
|
312
|
-
extra_headers: Send extra headers
|
313
|
-
|
314
|
-
extra_query: Add additional query parameters to the request
|
315
|
-
|
316
|
-
extra_body: Add additional JSON properties to the request
|
317
|
-
|
318
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
319
|
-
"""
|
320
|
-
if not id:
|
321
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
322
|
-
if not email:
|
323
|
-
raise ValueError(f"Expected a non-empty value for `email` but received {email!r}")
|
324
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
325
|
-
return await self._delete(
|
326
|
-
f"/api/v1/organizations/{id}/team/{email}",
|
327
|
-
options=make_request_options(
|
328
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
329
|
-
),
|
330
|
-
cast_to=NoneType,
|
331
|
-
)
|
332
|
-
|
333
|
-
async def accept_invite(
|
334
|
-
self,
|
335
|
-
*,
|
336
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
337
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
338
|
-
extra_headers: Headers | None = None,
|
339
|
-
extra_query: Query | None = None,
|
340
|
-
extra_body: Body | None = None,
|
341
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
342
|
-
) -> None:
|
343
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
344
|
-
return await self._post(
|
345
|
-
"/api/v1/organizations/team/accept-invite",
|
346
|
-
options=make_request_options(
|
347
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
348
|
-
),
|
349
|
-
cast_to=NoneType,
|
350
|
-
)
|
351
|
-
|
352
|
-
async def resend_invite(
|
353
|
-
self,
|
354
|
-
email: str,
|
355
|
-
*,
|
356
|
-
id: str,
|
357
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
358
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
359
|
-
extra_headers: Headers | None = None,
|
360
|
-
extra_query: Query | None = None,
|
361
|
-
extra_body: Body | None = None,
|
362
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
363
|
-
) -> None:
|
364
|
-
"""
|
365
|
-
Args:
|
366
|
-
extra_headers: Send extra headers
|
367
|
-
|
368
|
-
extra_query: Add additional query parameters to the request
|
369
|
-
|
370
|
-
extra_body: Add additional JSON properties to the request
|
371
|
-
|
372
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
373
|
-
"""
|
374
|
-
if not id:
|
375
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
376
|
-
if not email:
|
377
|
-
raise ValueError(f"Expected a non-empty value for `email` but received {email!r}")
|
378
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
379
|
-
return await self._post(
|
380
|
-
f"/api/v1/organizations/{id}/team/{email}/resend-invite",
|
381
|
-
options=make_request_options(
|
382
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
383
|
-
),
|
384
|
-
cast_to=NoneType,
|
385
|
-
)
|
386
|
-
|
387
|
-
async def retrieve_detailed(
|
388
|
-
self,
|
389
|
-
id: str,
|
390
|
-
*,
|
391
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
392
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
393
|
-
extra_headers: Headers | None = None,
|
394
|
-
extra_query: Query | None = None,
|
395
|
-
extra_body: Body | None = None,
|
396
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
397
|
-
) -> None:
|
398
|
-
"""
|
399
|
-
Args:
|
400
|
-
extra_headers: Send extra headers
|
401
|
-
|
402
|
-
extra_query: Add additional query parameters to the request
|
403
|
-
|
404
|
-
extra_body: Add additional JSON properties to the request
|
405
|
-
|
406
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
407
|
-
"""
|
408
|
-
if not id:
|
409
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
410
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
411
|
-
return await self._get(
|
412
|
-
f"/api/v1/organizations/{id}/team/detailed",
|
413
|
-
options=make_request_options(
|
414
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
415
|
-
),
|
416
|
-
cast_to=NoneType,
|
417
|
-
)
|
418
|
-
|
419
|
-
async def update_role(
|
420
|
-
self,
|
421
|
-
email: str,
|
422
|
-
*,
|
423
|
-
id: str,
|
424
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
425
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
426
|
-
extra_headers: Headers | None = None,
|
427
|
-
extra_query: Query | None = None,
|
428
|
-
extra_body: Body | None = None,
|
429
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
430
|
-
) -> None:
|
431
|
-
"""
|
432
|
-
Args:
|
433
|
-
extra_headers: Send extra headers
|
434
|
-
|
435
|
-
extra_query: Add additional query parameters to the request
|
436
|
-
|
437
|
-
extra_body: Add additional JSON properties to the request
|
438
|
-
|
439
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
440
|
-
"""
|
441
|
-
if not id:
|
442
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
443
|
-
if not email:
|
444
|
-
raise ValueError(f"Expected a non-empty value for `email` but received {email!r}")
|
445
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
446
|
-
return await self._put(
|
447
|
-
f"/api/v1/organizations/{id}/team/{email}/role",
|
448
|
-
options=make_request_options(
|
449
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
450
|
-
),
|
451
|
-
cast_to=NoneType,
|
452
|
-
)
|
453
|
-
|
454
|
-
|
455
|
-
class TeamResourceWithRawResponse:
|
456
|
-
def __init__(self, team: TeamResource) -> None:
|
457
|
-
self._team = team
|
458
|
-
|
459
|
-
self.list = to_raw_response_wrapper(
|
460
|
-
team.list,
|
461
|
-
)
|
462
|
-
self.delete = to_raw_response_wrapper(
|
463
|
-
team.delete,
|
464
|
-
)
|
465
|
-
self.accept_invite = to_raw_response_wrapper(
|
466
|
-
team.accept_invite,
|
467
|
-
)
|
468
|
-
self.resend_invite = to_raw_response_wrapper(
|
469
|
-
team.resend_invite,
|
470
|
-
)
|
471
|
-
self.retrieve_detailed = to_raw_response_wrapper(
|
472
|
-
team.retrieve_detailed,
|
473
|
-
)
|
474
|
-
self.update_role = to_raw_response_wrapper(
|
475
|
-
team.update_role,
|
476
|
-
)
|
477
|
-
|
478
|
-
@cached_property
|
479
|
-
def invite(self) -> InviteResourceWithRawResponse:
|
480
|
-
return InviteResourceWithRawResponse(self._team.invite)
|
481
|
-
|
482
|
-
|
483
|
-
class AsyncTeamResourceWithRawResponse:
|
484
|
-
def __init__(self, team: AsyncTeamResource) -> None:
|
485
|
-
self._team = team
|
486
|
-
|
487
|
-
self.list = async_to_raw_response_wrapper(
|
488
|
-
team.list,
|
489
|
-
)
|
490
|
-
self.delete = async_to_raw_response_wrapper(
|
491
|
-
team.delete,
|
492
|
-
)
|
493
|
-
self.accept_invite = async_to_raw_response_wrapper(
|
494
|
-
team.accept_invite,
|
495
|
-
)
|
496
|
-
self.resend_invite = async_to_raw_response_wrapper(
|
497
|
-
team.resend_invite,
|
498
|
-
)
|
499
|
-
self.retrieve_detailed = async_to_raw_response_wrapper(
|
500
|
-
team.retrieve_detailed,
|
501
|
-
)
|
502
|
-
self.update_role = async_to_raw_response_wrapper(
|
503
|
-
team.update_role,
|
504
|
-
)
|
505
|
-
|
506
|
-
@cached_property
|
507
|
-
def invite(self) -> AsyncInviteResourceWithRawResponse:
|
508
|
-
return AsyncInviteResourceWithRawResponse(self._team.invite)
|
509
|
-
|
510
|
-
|
511
|
-
class TeamResourceWithStreamingResponse:
|
512
|
-
def __init__(self, team: TeamResource) -> None:
|
513
|
-
self._team = team
|
514
|
-
|
515
|
-
self.list = to_streamed_response_wrapper(
|
516
|
-
team.list,
|
517
|
-
)
|
518
|
-
self.delete = to_streamed_response_wrapper(
|
519
|
-
team.delete,
|
520
|
-
)
|
521
|
-
self.accept_invite = to_streamed_response_wrapper(
|
522
|
-
team.accept_invite,
|
523
|
-
)
|
524
|
-
self.resend_invite = to_streamed_response_wrapper(
|
525
|
-
team.resend_invite,
|
526
|
-
)
|
527
|
-
self.retrieve_detailed = to_streamed_response_wrapper(
|
528
|
-
team.retrieve_detailed,
|
529
|
-
)
|
530
|
-
self.update_role = to_streamed_response_wrapper(
|
531
|
-
team.update_role,
|
532
|
-
)
|
533
|
-
|
534
|
-
@cached_property
|
535
|
-
def invite(self) -> InviteResourceWithStreamingResponse:
|
536
|
-
return InviteResourceWithStreamingResponse(self._team.invite)
|
537
|
-
|
538
|
-
|
539
|
-
class AsyncTeamResourceWithStreamingResponse:
|
540
|
-
def __init__(self, team: AsyncTeamResource) -> None:
|
541
|
-
self._team = team
|
542
|
-
|
543
|
-
self.list = async_to_streamed_response_wrapper(
|
544
|
-
team.list,
|
545
|
-
)
|
546
|
-
self.delete = async_to_streamed_response_wrapper(
|
547
|
-
team.delete,
|
548
|
-
)
|
549
|
-
self.accept_invite = async_to_streamed_response_wrapper(
|
550
|
-
team.accept_invite,
|
551
|
-
)
|
552
|
-
self.resend_invite = async_to_streamed_response_wrapper(
|
553
|
-
team.resend_invite,
|
554
|
-
)
|
555
|
-
self.retrieve_detailed = async_to_streamed_response_wrapper(
|
556
|
-
team.retrieve_detailed,
|
557
|
-
)
|
558
|
-
self.update_role = async_to_streamed_response_wrapper(
|
559
|
-
team.update_role,
|
560
|
-
)
|
561
|
-
|
562
|
-
@cached_property
|
563
|
-
def invite(self) -> AsyncInviteResourceWithStreamingResponse:
|
564
|
-
return AsyncInviteResourceWithStreamingResponse(self._team.invite)
|