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,428 +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 .theme import (
|
8
|
-
ThemeResource,
|
9
|
-
AsyncThemeResource,
|
10
|
-
ThemeResourceWithRawResponse,
|
11
|
-
AsyncThemeResourceWithRawResponse,
|
12
|
-
ThemeResourceWithStreamingResponse,
|
13
|
-
AsyncThemeResourceWithStreamingResponse,
|
14
|
-
)
|
15
|
-
from .usage import (
|
16
|
-
UsageResource,
|
17
|
-
AsyncUsageResource,
|
18
|
-
UsageResourceWithRawResponse,
|
19
|
-
AsyncUsageResourceWithRawResponse,
|
20
|
-
UsageResourceWithStreamingResponse,
|
21
|
-
AsyncUsageResourceWithStreamingResponse,
|
22
|
-
)
|
23
|
-
from .api_keys import (
|
24
|
-
APIKeysResource,
|
25
|
-
AsyncAPIKeysResource,
|
26
|
-
APIKeysResourceWithRawResponse,
|
27
|
-
AsyncAPIKeysResourceWithRawResponse,
|
28
|
-
APIKeysResourceWithStreamingResponse,
|
29
|
-
AsyncAPIKeysResourceWithStreamingResponse,
|
30
|
-
)
|
31
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
32
|
-
from .logo.logo import (
|
33
|
-
LogoResource,
|
34
|
-
AsyncLogoResource,
|
35
|
-
LogoResourceWithRawResponse,
|
36
|
-
AsyncLogoResourceWithRawResponse,
|
37
|
-
LogoResourceWithStreamingResponse,
|
38
|
-
AsyncLogoResourceWithStreamingResponse,
|
39
|
-
)
|
40
|
-
from .team.team import (
|
41
|
-
TeamResource,
|
42
|
-
AsyncTeamResource,
|
43
|
-
TeamResourceWithRawResponse,
|
44
|
-
AsyncTeamResourceWithRawResponse,
|
45
|
-
TeamResourceWithStreamingResponse,
|
46
|
-
AsyncTeamResourceWithStreamingResponse,
|
47
|
-
)
|
48
|
-
from ...._compat import cached_property
|
49
|
-
from ...._resource import SyncAPIResource, AsyncAPIResource
|
50
|
-
from ...._response import (
|
51
|
-
to_raw_response_wrapper,
|
52
|
-
to_streamed_response_wrapper,
|
53
|
-
async_to_raw_response_wrapper,
|
54
|
-
async_to_streamed_response_wrapper,
|
55
|
-
)
|
56
|
-
from ...._base_client import make_request_options
|
57
|
-
from .profile.profile import (
|
58
|
-
ProfileResource,
|
59
|
-
AsyncProfileResource,
|
60
|
-
ProfileResourceWithRawResponse,
|
61
|
-
AsyncProfileResourceWithRawResponse,
|
62
|
-
ProfileResourceWithStreamingResponse,
|
63
|
-
AsyncProfileResourceWithStreamingResponse,
|
64
|
-
)
|
65
|
-
|
66
|
-
__all__ = ["OrganizationsResource", "AsyncOrganizationsResource"]
|
67
|
-
|
68
|
-
|
69
|
-
class OrganizationsResource(SyncAPIResource):
|
70
|
-
@cached_property
|
71
|
-
def profile(self) -> ProfileResource:
|
72
|
-
return ProfileResource(self._client)
|
73
|
-
|
74
|
-
@cached_property
|
75
|
-
def api_keys(self) -> APIKeysResource:
|
76
|
-
return APIKeysResource(self._client)
|
77
|
-
|
78
|
-
@cached_property
|
79
|
-
def usage(self) -> UsageResource:
|
80
|
-
return UsageResource(self._client)
|
81
|
-
|
82
|
-
@cached_property
|
83
|
-
def theme(self) -> ThemeResource:
|
84
|
-
return ThemeResource(self._client)
|
85
|
-
|
86
|
-
@cached_property
|
87
|
-
def logo(self) -> LogoResource:
|
88
|
-
return LogoResource(self._client)
|
89
|
-
|
90
|
-
@cached_property
|
91
|
-
def team(self) -> TeamResource:
|
92
|
-
return TeamResource(self._client)
|
93
|
-
|
94
|
-
@cached_property
|
95
|
-
def with_raw_response(self) -> OrganizationsResourceWithRawResponse:
|
96
|
-
"""
|
97
|
-
This property can be used as a prefix for any HTTP method call to return
|
98
|
-
the raw response object instead of the parsed content.
|
99
|
-
|
100
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
101
|
-
"""
|
102
|
-
return OrganizationsResourceWithRawResponse(self)
|
103
|
-
|
104
|
-
@cached_property
|
105
|
-
def with_streaming_response(self) -> OrganizationsResourceWithStreamingResponse:
|
106
|
-
"""
|
107
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
108
|
-
|
109
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
110
|
-
"""
|
111
|
-
return OrganizationsResourceWithStreamingResponse(self)
|
112
|
-
|
113
|
-
def retrieve(
|
114
|
-
self,
|
115
|
-
id: str,
|
116
|
-
*,
|
117
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
118
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
119
|
-
extra_headers: Headers | None = None,
|
120
|
-
extra_query: Query | None = None,
|
121
|
-
extra_body: Body | None = None,
|
122
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
123
|
-
) -> None:
|
124
|
-
"""
|
125
|
-
Args:
|
126
|
-
extra_headers: Send extra headers
|
127
|
-
|
128
|
-
extra_query: Add additional query parameters to the request
|
129
|
-
|
130
|
-
extra_body: Add additional JSON properties to the request
|
131
|
-
|
132
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
133
|
-
"""
|
134
|
-
if not id:
|
135
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
136
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
137
|
-
return self._get(
|
138
|
-
f"/api/v1/organizations/{id}",
|
139
|
-
options=make_request_options(
|
140
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
141
|
-
),
|
142
|
-
cast_to=NoneType,
|
143
|
-
)
|
144
|
-
|
145
|
-
def update(
|
146
|
-
self,
|
147
|
-
id: str,
|
148
|
-
*,
|
149
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
150
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
151
|
-
extra_headers: Headers | None = None,
|
152
|
-
extra_query: Query | None = None,
|
153
|
-
extra_body: Body | None = None,
|
154
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
155
|
-
) -> None:
|
156
|
-
"""
|
157
|
-
Args:
|
158
|
-
extra_headers: Send extra headers
|
159
|
-
|
160
|
-
extra_query: Add additional query parameters to the request
|
161
|
-
|
162
|
-
extra_body: Add additional JSON properties to the request
|
163
|
-
|
164
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
165
|
-
"""
|
166
|
-
if not id:
|
167
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
168
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
169
|
-
return self._put(
|
170
|
-
f"/api/v1/organizations/{id}",
|
171
|
-
options=make_request_options(
|
172
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
173
|
-
),
|
174
|
-
cast_to=NoneType,
|
175
|
-
)
|
176
|
-
|
177
|
-
|
178
|
-
class AsyncOrganizationsResource(AsyncAPIResource):
|
179
|
-
@cached_property
|
180
|
-
def profile(self) -> AsyncProfileResource:
|
181
|
-
return AsyncProfileResource(self._client)
|
182
|
-
|
183
|
-
@cached_property
|
184
|
-
def api_keys(self) -> AsyncAPIKeysResource:
|
185
|
-
return AsyncAPIKeysResource(self._client)
|
186
|
-
|
187
|
-
@cached_property
|
188
|
-
def usage(self) -> AsyncUsageResource:
|
189
|
-
return AsyncUsageResource(self._client)
|
190
|
-
|
191
|
-
@cached_property
|
192
|
-
def theme(self) -> AsyncThemeResource:
|
193
|
-
return AsyncThemeResource(self._client)
|
194
|
-
|
195
|
-
@cached_property
|
196
|
-
def logo(self) -> AsyncLogoResource:
|
197
|
-
return AsyncLogoResource(self._client)
|
198
|
-
|
199
|
-
@cached_property
|
200
|
-
def team(self) -> AsyncTeamResource:
|
201
|
-
return AsyncTeamResource(self._client)
|
202
|
-
|
203
|
-
@cached_property
|
204
|
-
def with_raw_response(self) -> AsyncOrganizationsResourceWithRawResponse:
|
205
|
-
"""
|
206
|
-
This property can be used as a prefix for any HTTP method call to return
|
207
|
-
the raw response object instead of the parsed content.
|
208
|
-
|
209
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
210
|
-
"""
|
211
|
-
return AsyncOrganizationsResourceWithRawResponse(self)
|
212
|
-
|
213
|
-
@cached_property
|
214
|
-
def with_streaming_response(self) -> AsyncOrganizationsResourceWithStreamingResponse:
|
215
|
-
"""
|
216
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
217
|
-
|
218
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
219
|
-
"""
|
220
|
-
return AsyncOrganizationsResourceWithStreamingResponse(self)
|
221
|
-
|
222
|
-
async def retrieve(
|
223
|
-
self,
|
224
|
-
id: str,
|
225
|
-
*,
|
226
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
227
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
228
|
-
extra_headers: Headers | None = None,
|
229
|
-
extra_query: Query | None = None,
|
230
|
-
extra_body: Body | None = None,
|
231
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
232
|
-
) -> None:
|
233
|
-
"""
|
234
|
-
Args:
|
235
|
-
extra_headers: Send extra headers
|
236
|
-
|
237
|
-
extra_query: Add additional query parameters to the request
|
238
|
-
|
239
|
-
extra_body: Add additional JSON properties to the request
|
240
|
-
|
241
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
242
|
-
"""
|
243
|
-
if not id:
|
244
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
245
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
246
|
-
return await self._get(
|
247
|
-
f"/api/v1/organizations/{id}",
|
248
|
-
options=make_request_options(
|
249
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
250
|
-
),
|
251
|
-
cast_to=NoneType,
|
252
|
-
)
|
253
|
-
|
254
|
-
async def update(
|
255
|
-
self,
|
256
|
-
id: str,
|
257
|
-
*,
|
258
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
259
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
260
|
-
extra_headers: Headers | None = None,
|
261
|
-
extra_query: Query | None = None,
|
262
|
-
extra_body: Body | None = None,
|
263
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
264
|
-
) -> None:
|
265
|
-
"""
|
266
|
-
Args:
|
267
|
-
extra_headers: Send extra headers
|
268
|
-
|
269
|
-
extra_query: Add additional query parameters to the request
|
270
|
-
|
271
|
-
extra_body: Add additional JSON properties to the request
|
272
|
-
|
273
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
274
|
-
"""
|
275
|
-
if not id:
|
276
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
277
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
278
|
-
return await self._put(
|
279
|
-
f"/api/v1/organizations/{id}",
|
280
|
-
options=make_request_options(
|
281
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
282
|
-
),
|
283
|
-
cast_to=NoneType,
|
284
|
-
)
|
285
|
-
|
286
|
-
|
287
|
-
class OrganizationsResourceWithRawResponse:
|
288
|
-
def __init__(self, organizations: OrganizationsResource) -> None:
|
289
|
-
self._organizations = organizations
|
290
|
-
|
291
|
-
self.retrieve = to_raw_response_wrapper(
|
292
|
-
organizations.retrieve,
|
293
|
-
)
|
294
|
-
self.update = to_raw_response_wrapper(
|
295
|
-
organizations.update,
|
296
|
-
)
|
297
|
-
|
298
|
-
@cached_property
|
299
|
-
def profile(self) -> ProfileResourceWithRawResponse:
|
300
|
-
return ProfileResourceWithRawResponse(self._organizations.profile)
|
301
|
-
|
302
|
-
@cached_property
|
303
|
-
def api_keys(self) -> APIKeysResourceWithRawResponse:
|
304
|
-
return APIKeysResourceWithRawResponse(self._organizations.api_keys)
|
305
|
-
|
306
|
-
@cached_property
|
307
|
-
def usage(self) -> UsageResourceWithRawResponse:
|
308
|
-
return UsageResourceWithRawResponse(self._organizations.usage)
|
309
|
-
|
310
|
-
@cached_property
|
311
|
-
def theme(self) -> ThemeResourceWithRawResponse:
|
312
|
-
return ThemeResourceWithRawResponse(self._organizations.theme)
|
313
|
-
|
314
|
-
@cached_property
|
315
|
-
def logo(self) -> LogoResourceWithRawResponse:
|
316
|
-
return LogoResourceWithRawResponse(self._organizations.logo)
|
317
|
-
|
318
|
-
@cached_property
|
319
|
-
def team(self) -> TeamResourceWithRawResponse:
|
320
|
-
return TeamResourceWithRawResponse(self._organizations.team)
|
321
|
-
|
322
|
-
|
323
|
-
class AsyncOrganizationsResourceWithRawResponse:
|
324
|
-
def __init__(self, organizations: AsyncOrganizationsResource) -> None:
|
325
|
-
self._organizations = organizations
|
326
|
-
|
327
|
-
self.retrieve = async_to_raw_response_wrapper(
|
328
|
-
organizations.retrieve,
|
329
|
-
)
|
330
|
-
self.update = async_to_raw_response_wrapper(
|
331
|
-
organizations.update,
|
332
|
-
)
|
333
|
-
|
334
|
-
@cached_property
|
335
|
-
def profile(self) -> AsyncProfileResourceWithRawResponse:
|
336
|
-
return AsyncProfileResourceWithRawResponse(self._organizations.profile)
|
337
|
-
|
338
|
-
@cached_property
|
339
|
-
def api_keys(self) -> AsyncAPIKeysResourceWithRawResponse:
|
340
|
-
return AsyncAPIKeysResourceWithRawResponse(self._organizations.api_keys)
|
341
|
-
|
342
|
-
@cached_property
|
343
|
-
def usage(self) -> AsyncUsageResourceWithRawResponse:
|
344
|
-
return AsyncUsageResourceWithRawResponse(self._organizations.usage)
|
345
|
-
|
346
|
-
@cached_property
|
347
|
-
def theme(self) -> AsyncThemeResourceWithRawResponse:
|
348
|
-
return AsyncThemeResourceWithRawResponse(self._organizations.theme)
|
349
|
-
|
350
|
-
@cached_property
|
351
|
-
def logo(self) -> AsyncLogoResourceWithRawResponse:
|
352
|
-
return AsyncLogoResourceWithRawResponse(self._organizations.logo)
|
353
|
-
|
354
|
-
@cached_property
|
355
|
-
def team(self) -> AsyncTeamResourceWithRawResponse:
|
356
|
-
return AsyncTeamResourceWithRawResponse(self._organizations.team)
|
357
|
-
|
358
|
-
|
359
|
-
class OrganizationsResourceWithStreamingResponse:
|
360
|
-
def __init__(self, organizations: OrganizationsResource) -> None:
|
361
|
-
self._organizations = organizations
|
362
|
-
|
363
|
-
self.retrieve = to_streamed_response_wrapper(
|
364
|
-
organizations.retrieve,
|
365
|
-
)
|
366
|
-
self.update = to_streamed_response_wrapper(
|
367
|
-
organizations.update,
|
368
|
-
)
|
369
|
-
|
370
|
-
@cached_property
|
371
|
-
def profile(self) -> ProfileResourceWithStreamingResponse:
|
372
|
-
return ProfileResourceWithStreamingResponse(self._organizations.profile)
|
373
|
-
|
374
|
-
@cached_property
|
375
|
-
def api_keys(self) -> APIKeysResourceWithStreamingResponse:
|
376
|
-
return APIKeysResourceWithStreamingResponse(self._organizations.api_keys)
|
377
|
-
|
378
|
-
@cached_property
|
379
|
-
def usage(self) -> UsageResourceWithStreamingResponse:
|
380
|
-
return UsageResourceWithStreamingResponse(self._organizations.usage)
|
381
|
-
|
382
|
-
@cached_property
|
383
|
-
def theme(self) -> ThemeResourceWithStreamingResponse:
|
384
|
-
return ThemeResourceWithStreamingResponse(self._organizations.theme)
|
385
|
-
|
386
|
-
@cached_property
|
387
|
-
def logo(self) -> LogoResourceWithStreamingResponse:
|
388
|
-
return LogoResourceWithStreamingResponse(self._organizations.logo)
|
389
|
-
|
390
|
-
@cached_property
|
391
|
-
def team(self) -> TeamResourceWithStreamingResponse:
|
392
|
-
return TeamResourceWithStreamingResponse(self._organizations.team)
|
393
|
-
|
394
|
-
|
395
|
-
class AsyncOrganizationsResourceWithStreamingResponse:
|
396
|
-
def __init__(self, organizations: AsyncOrganizationsResource) -> None:
|
397
|
-
self._organizations = organizations
|
398
|
-
|
399
|
-
self.retrieve = async_to_streamed_response_wrapper(
|
400
|
-
organizations.retrieve,
|
401
|
-
)
|
402
|
-
self.update = async_to_streamed_response_wrapper(
|
403
|
-
organizations.update,
|
404
|
-
)
|
405
|
-
|
406
|
-
@cached_property
|
407
|
-
def profile(self) -> AsyncProfileResourceWithStreamingResponse:
|
408
|
-
return AsyncProfileResourceWithStreamingResponse(self._organizations.profile)
|
409
|
-
|
410
|
-
@cached_property
|
411
|
-
def api_keys(self) -> AsyncAPIKeysResourceWithStreamingResponse:
|
412
|
-
return AsyncAPIKeysResourceWithStreamingResponse(self._organizations.api_keys)
|
413
|
-
|
414
|
-
@cached_property
|
415
|
-
def usage(self) -> AsyncUsageResourceWithStreamingResponse:
|
416
|
-
return AsyncUsageResourceWithStreamingResponse(self._organizations.usage)
|
417
|
-
|
418
|
-
@cached_property
|
419
|
-
def theme(self) -> AsyncThemeResourceWithStreamingResponse:
|
420
|
-
return AsyncThemeResourceWithStreamingResponse(self._organizations.theme)
|
421
|
-
|
422
|
-
@cached_property
|
423
|
-
def logo(self) -> AsyncLogoResourceWithStreamingResponse:
|
424
|
-
return AsyncLogoResourceWithStreamingResponse(self._organizations.logo)
|
425
|
-
|
426
|
-
@cached_property
|
427
|
-
def team(self) -> AsyncTeamResourceWithStreamingResponse:
|
428
|
-
return AsyncTeamResourceWithStreamingResponse(self._organizations.team)
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
-
|
3
|
-
from .team import (
|
4
|
-
TeamResource,
|
5
|
-
AsyncTeamResource,
|
6
|
-
TeamResourceWithRawResponse,
|
7
|
-
AsyncTeamResourceWithRawResponse,
|
8
|
-
TeamResourceWithStreamingResponse,
|
9
|
-
AsyncTeamResourceWithStreamingResponse,
|
10
|
-
)
|
11
|
-
from .models import (
|
12
|
-
ModelsResource,
|
13
|
-
AsyncModelsResource,
|
14
|
-
ModelsResourceWithRawResponse,
|
15
|
-
AsyncModelsResourceWithRawResponse,
|
16
|
-
ModelsResourceWithStreamingResponse,
|
17
|
-
AsyncModelsResourceWithStreamingResponse,
|
18
|
-
)
|
19
|
-
from .profile import (
|
20
|
-
ProfileResource,
|
21
|
-
AsyncProfileResource,
|
22
|
-
ProfileResourceWithRawResponse,
|
23
|
-
AsyncProfileResourceWithRawResponse,
|
24
|
-
ProfileResourceWithStreamingResponse,
|
25
|
-
AsyncProfileResourceWithStreamingResponse,
|
26
|
-
)
|
27
|
-
|
28
|
-
__all__ = [
|
29
|
-
"ModelsResource",
|
30
|
-
"AsyncModelsResource",
|
31
|
-
"ModelsResourceWithRawResponse",
|
32
|
-
"AsyncModelsResourceWithRawResponse",
|
33
|
-
"ModelsResourceWithStreamingResponse",
|
34
|
-
"AsyncModelsResourceWithStreamingResponse",
|
35
|
-
"TeamResource",
|
36
|
-
"AsyncTeamResource",
|
37
|
-
"TeamResourceWithRawResponse",
|
38
|
-
"AsyncTeamResourceWithRawResponse",
|
39
|
-
"TeamResourceWithStreamingResponse",
|
40
|
-
"AsyncTeamResourceWithStreamingResponse",
|
41
|
-
"ProfileResource",
|
42
|
-
"AsyncProfileResource",
|
43
|
-
"ProfileResourceWithRawResponse",
|
44
|
-
"AsyncProfileResourceWithRawResponse",
|
45
|
-
"ProfileResourceWithStreamingResponse",
|
46
|
-
"AsyncProfileResourceWithStreamingResponse",
|
47
|
-
]
|
@@ -1,134 +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 ....._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__ = ["ModelsResource", "AsyncModelsResource"]
|
19
|
-
|
20
|
-
|
21
|
-
class ModelsResource(SyncAPIResource):
|
22
|
-
@cached_property
|
23
|
-
def with_raw_response(self) -> ModelsResourceWithRawResponse:
|
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 ModelsResourceWithRawResponse(self)
|
31
|
-
|
32
|
-
@cached_property
|
33
|
-
def with_streaming_response(self) -> ModelsResourceWithStreamingResponse:
|
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 ModelsResourceWithStreamingResponse(self)
|
40
|
-
|
41
|
-
def retrieve_available(
|
42
|
-
self,
|
43
|
-
*,
|
44
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
45
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
46
|
-
extra_headers: Headers | None = None,
|
47
|
-
extra_query: Query | None = None,
|
48
|
-
extra_body: Body | None = None,
|
49
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
50
|
-
) -> None:
|
51
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
52
|
-
return self._get(
|
53
|
-
"/api/v1/organizations/profile/models/available",
|
54
|
-
options=make_request_options(
|
55
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
56
|
-
),
|
57
|
-
cast_to=NoneType,
|
58
|
-
)
|
59
|
-
|
60
|
-
|
61
|
-
class AsyncModelsResource(AsyncAPIResource):
|
62
|
-
@cached_property
|
63
|
-
def with_raw_response(self) -> AsyncModelsResourceWithRawResponse:
|
64
|
-
"""
|
65
|
-
This property can be used as a prefix for any HTTP method call to return
|
66
|
-
the raw response object instead of the parsed content.
|
67
|
-
|
68
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
69
|
-
"""
|
70
|
-
return AsyncModelsResourceWithRawResponse(self)
|
71
|
-
|
72
|
-
@cached_property
|
73
|
-
def with_streaming_response(self) -> AsyncModelsResourceWithStreamingResponse:
|
74
|
-
"""
|
75
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
76
|
-
|
77
|
-
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
78
|
-
"""
|
79
|
-
return AsyncModelsResourceWithStreamingResponse(self)
|
80
|
-
|
81
|
-
async def retrieve_available(
|
82
|
-
self,
|
83
|
-
*,
|
84
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
85
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
86
|
-
extra_headers: Headers | None = None,
|
87
|
-
extra_query: Query | None = None,
|
88
|
-
extra_body: Body | None = None,
|
89
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
90
|
-
) -> None:
|
91
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
92
|
-
return await self._get(
|
93
|
-
"/api/v1/organizations/profile/models/available",
|
94
|
-
options=make_request_options(
|
95
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
96
|
-
),
|
97
|
-
cast_to=NoneType,
|
98
|
-
)
|
99
|
-
|
100
|
-
|
101
|
-
class ModelsResourceWithRawResponse:
|
102
|
-
def __init__(self, models: ModelsResource) -> None:
|
103
|
-
self._models = models
|
104
|
-
|
105
|
-
self.retrieve_available = to_raw_response_wrapper(
|
106
|
-
models.retrieve_available,
|
107
|
-
)
|
108
|
-
|
109
|
-
|
110
|
-
class AsyncModelsResourceWithRawResponse:
|
111
|
-
def __init__(self, models: AsyncModelsResource) -> None:
|
112
|
-
self._models = models
|
113
|
-
|
114
|
-
self.retrieve_available = async_to_raw_response_wrapper(
|
115
|
-
models.retrieve_available,
|
116
|
-
)
|
117
|
-
|
118
|
-
|
119
|
-
class ModelsResourceWithStreamingResponse:
|
120
|
-
def __init__(self, models: ModelsResource) -> None:
|
121
|
-
self._models = models
|
122
|
-
|
123
|
-
self.retrieve_available = to_streamed_response_wrapper(
|
124
|
-
models.retrieve_available,
|
125
|
-
)
|
126
|
-
|
127
|
-
|
128
|
-
class AsyncModelsResourceWithStreamingResponse:
|
129
|
-
def __init__(self, models: AsyncModelsResource) -> None:
|
130
|
-
self._models = models
|
131
|
-
|
132
|
-
self.retrieve_available = async_to_streamed_response_wrapper(
|
133
|
-
models.retrieve_available,
|
134
|
-
)
|