studyfetch-sdk 0.1.0a18__py3-none-any.whl → 0.1.0a20__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/_models.py +24 -3
- studyfetch_sdk/_version.py +1 -1
- studyfetch_sdk/resources/v1/__init__.py +0 -84
- studyfetch_sdk/resources/v1/assignment_grader.py +81 -1
- studyfetch_sdk/resources/v1/components.py +36 -4
- studyfetch_sdk/resources/v1/materials/materials.py +130 -2
- studyfetch_sdk/resources/v1/materials/upload.py +286 -0
- studyfetch_sdk/resources/v1/usage/analyst.py +143 -15
- studyfetch_sdk/resources/v1/v1.py +66 -192
- studyfetch_sdk/types/v1/__init__.py +2 -20
- studyfetch_sdk/types/v1/assignment_grader_response.py +20 -1
- studyfetch_sdk/types/v1/component.py +9 -1
- studyfetch_sdk/types/v1/component_create_params.py +81 -1
- studyfetch_sdk/types/v1/component_generate_embed_params.py +7 -1
- studyfetch_sdk/types/v1/component_list_params.py +9 -1
- studyfetch_sdk/types/v1/content_param.py +23 -0
- studyfetch_sdk/types/v1/material_create_and_process_params.py +27 -0
- studyfetch_sdk/types/v1/material_create_params.py +4 -17
- studyfetch_sdk/types/v1/materials/__init__.py +2 -0
- studyfetch_sdk/types/v1/materials/upload_create_presigned_url_params.py +3 -0
- studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +29 -0
- studyfetch_sdk/types/v1/materials/upload_upload_file_params.py +3 -0
- studyfetch_sdk/types/v1/materials/upload_upload_url_and_process_params.py +26 -0
- studyfetch_sdk/types/v1/usage/__init__.py +3 -0
- studyfetch_sdk/types/v1/usage/analyst_get_test_questions_params.py +18 -0
- studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_params.py +18 -0
- studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_response.py +35 -0
- studyfetch_sdk/types/v1/usage/analyst_list_events_params.py +7 -0
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a20.dist-info}/METADATA +1 -1
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a20.dist-info}/RECORD +32 -71
- studyfetch_sdk/resources/v1/audio_recaps/__init__.py +0 -33
- studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py +0 -328
- studyfetch_sdk/resources/v1/audio_recaps/sections.py +0 -250
- studyfetch_sdk/resources/v1/chat/__init__.py +0 -47
- studyfetch_sdk/resources/v1/chat/chat.py +0 -574
- studyfetch_sdk/resources/v1/chat/sessions.py +0 -222
- studyfetch_sdk/resources/v1/chat/test.py +0 -190
- studyfetch_sdk/resources/v1/explainers.py +0 -441
- studyfetch_sdk/resources/v1/flashcards.py +0 -783
- studyfetch_sdk/resources/v1/scenarios/__init__.py +0 -61
- studyfetch_sdk/resources/v1/scenarios/component.py +0 -426
- studyfetch_sdk/resources/v1/scenarios/scenarios.py +0 -936
- studyfetch_sdk/resources/v1/scenarios/sessions.py +0 -236
- studyfetch_sdk/resources/v1/scenarios/submissions/__init__.py +0 -33
- studyfetch_sdk/resources/v1/scenarios/submissions/submissions.py +0 -102
- studyfetch_sdk/resources/v1/scenarios/submissions/user.py +0 -210
- studyfetch_sdk/resources/v1/tests/__init__.py +0 -33
- studyfetch_sdk/resources/v1/tests/component.py +0 -160
- studyfetch_sdk/resources/v1/tests/tests.py +0 -682
- studyfetch_sdk/types/v1/audio_recaps/__init__.py +0 -3
- studyfetch_sdk/types/v1/chat/__init__.py +0 -5
- studyfetch_sdk/types/v1/chat/session_retrieve_params.py +0 -11
- studyfetch_sdk/types/v1/chat_get_session_params.py +0 -13
- studyfetch_sdk/types/v1/chat_send_message_params.py +0 -54
- studyfetch_sdk/types/v1/chat_stream_params.py +0 -28
- studyfetch_sdk/types/v1/explainer_create_params.py +0 -45
- studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +0 -53
- studyfetch_sdk/types/v1/flashcard_batch_process_params.py +0 -36
- studyfetch_sdk/types/v1/flashcard_batch_process_response.py +0 -39
- studyfetch_sdk/types/v1/flashcard_get_algorithm_response.py +0 -37
- studyfetch_sdk/types/v1/flashcard_get_all_params.py +0 -23
- studyfetch_sdk/types/v1/flashcard_get_due_params.py +0 -19
- studyfetch_sdk/types/v1/flashcard_get_stats_params.py +0 -17
- studyfetch_sdk/types/v1/flashcard_get_types_response.py +0 -14
- studyfetch_sdk/types/v1/flashcard_rate_params.py +0 -23
- studyfetch_sdk/types/v1/scenario_create_params.py +0 -48
- studyfetch_sdk/types/v1/scenario_submit_answer_params.py +0 -18
- studyfetch_sdk/types/v1/scenario_update_params.py +0 -45
- studyfetch_sdk/types/v1/scenarios/__init__.py +0 -5
- studyfetch_sdk/types/v1/scenarios/component_update_params.py +0 -45
- studyfetch_sdk/types/v1/scenarios/submissions/__init__.py +0 -3
- studyfetch_sdk/types/v1/test_create_params.py +0 -20
- studyfetch_sdk/types/v1/test_retake_params.py +0 -14
- studyfetch_sdk/types/v1/test_submit_answer_params.py +0 -20
- studyfetch_sdk/types/v1/test_submit_params.py +0 -14
- studyfetch_sdk/types/v1/tests/__init__.py +0 -3
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a20.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a20.dist-info}/licenses/LICENSE +0 -0
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
+
from typing import List
|
5
6
|
from typing_extensions import Literal
|
6
7
|
|
7
8
|
import httpx
|
@@ -17,7 +18,12 @@ from ...._response import (
|
|
17
18
|
async_to_streamed_response_wrapper,
|
18
19
|
)
|
19
20
|
from ...._base_client import make_request_options
|
20
|
-
from ....types.v1.usage import
|
21
|
+
from ....types.v1.usage import (
|
22
|
+
analyst_list_events_params,
|
23
|
+
analyst_get_test_questions_params,
|
24
|
+
analyst_list_chat_messages_params,
|
25
|
+
)
|
26
|
+
from ....types.v1.usage.analyst_list_chat_messages_response import AnalystListChatMessagesResponse
|
21
27
|
|
22
28
|
__all__ = ["AnalystResource", "AsyncAnalystResource"]
|
23
29
|
|
@@ -45,6 +51,8 @@ class AnalystResource(SyncAPIResource):
|
|
45
51
|
def get_test_questions(
|
46
52
|
self,
|
47
53
|
*,
|
54
|
+
group_ids: List[str] | NotGiven = NOT_GIVEN,
|
55
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
48
56
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
49
57
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
50
58
|
extra_headers: Headers | None = None,
|
@@ -52,12 +60,37 @@ class AnalystResource(SyncAPIResource):
|
|
52
60
|
extra_body: Body | None = None,
|
53
61
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
54
62
|
) -> None:
|
55
|
-
"""
|
63
|
+
"""
|
64
|
+
Get test results with full question data for user or group
|
65
|
+
|
66
|
+
Args:
|
67
|
+
group_ids: Array of group IDs to filter
|
68
|
+
|
69
|
+
user_id: User ID to get test results for
|
70
|
+
|
71
|
+
extra_headers: Send extra headers
|
72
|
+
|
73
|
+
extra_query: Add additional query parameters to the request
|
74
|
+
|
75
|
+
extra_body: Add additional JSON properties to the request
|
76
|
+
|
77
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
78
|
+
"""
|
56
79
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
57
80
|
return self._get(
|
58
81
|
"/api/v1/usage-analyst/test-questions",
|
59
82
|
options=make_request_options(
|
60
|
-
extra_headers=extra_headers,
|
83
|
+
extra_headers=extra_headers,
|
84
|
+
extra_query=extra_query,
|
85
|
+
extra_body=extra_body,
|
86
|
+
timeout=timeout,
|
87
|
+
query=maybe_transform(
|
88
|
+
{
|
89
|
+
"group_ids": group_ids,
|
90
|
+
"user_id": user_id,
|
91
|
+
},
|
92
|
+
analyst_get_test_questions_params.AnalystGetTestQuestionsParams,
|
93
|
+
),
|
61
94
|
),
|
62
95
|
cast_to=NoneType,
|
63
96
|
)
|
@@ -65,21 +98,47 @@ class AnalystResource(SyncAPIResource):
|
|
65
98
|
def list_chat_messages(
|
66
99
|
self,
|
67
100
|
*,
|
101
|
+
group_ids: List[str] | NotGiven = NOT_GIVEN,
|
102
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
68
103
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
69
104
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
70
105
|
extra_headers: Headers | None = None,
|
71
106
|
extra_query: Query | None = None,
|
72
107
|
extra_body: Body | None = None,
|
73
108
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
74
|
-
) ->
|
75
|
-
"""
|
76
|
-
|
109
|
+
) -> AnalystListChatMessagesResponse:
|
110
|
+
"""
|
111
|
+
Get all chat messages from sessions for user or group
|
112
|
+
|
113
|
+
Args:
|
114
|
+
group_ids: Array of group IDs to filter
|
115
|
+
|
116
|
+
user_id: User ID to get chat messages for
|
117
|
+
|
118
|
+
extra_headers: Send extra headers
|
119
|
+
|
120
|
+
extra_query: Add additional query parameters to the request
|
121
|
+
|
122
|
+
extra_body: Add additional JSON properties to the request
|
123
|
+
|
124
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
125
|
+
"""
|
77
126
|
return self._get(
|
78
127
|
"/api/v1/usage-analyst/chat-messages",
|
79
128
|
options=make_request_options(
|
80
|
-
extra_headers=extra_headers,
|
129
|
+
extra_headers=extra_headers,
|
130
|
+
extra_query=extra_query,
|
131
|
+
extra_body=extra_body,
|
132
|
+
timeout=timeout,
|
133
|
+
query=maybe_transform(
|
134
|
+
{
|
135
|
+
"group_ids": group_ids,
|
136
|
+
"user_id": user_id,
|
137
|
+
},
|
138
|
+
analyst_list_chat_messages_params.AnalystListChatMessagesParams,
|
139
|
+
),
|
81
140
|
),
|
82
|
-
cast_to=
|
141
|
+
cast_to=AnalystListChatMessagesResponse,
|
83
142
|
)
|
84
143
|
|
85
144
|
def list_events(
|
@@ -112,6 +171,8 @@ class AnalystResource(SyncAPIResource):
|
|
112
171
|
"student_performance",
|
113
172
|
],
|
114
173
|
start_date: str,
|
174
|
+
group_ids: List[str] | NotGiven = NOT_GIVEN,
|
175
|
+
user_ids: List[str] | NotGiven = NOT_GIVEN,
|
115
176
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
116
177
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
117
178
|
extra_headers: Headers | None = None,
|
@@ -129,6 +190,10 @@ class AnalystResource(SyncAPIResource):
|
|
129
190
|
|
130
191
|
start_date: Start date for filtering (ISO 8601)
|
131
192
|
|
193
|
+
group_ids: Array of group IDs to filter
|
194
|
+
|
195
|
+
user_ids: Array of user IDs to filter
|
196
|
+
|
132
197
|
extra_headers: Send extra headers
|
133
198
|
|
134
199
|
extra_query: Add additional query parameters to the request
|
@@ -150,6 +215,8 @@ class AnalystResource(SyncAPIResource):
|
|
150
215
|
"end_date": end_date,
|
151
216
|
"event_type": event_type,
|
152
217
|
"start_date": start_date,
|
218
|
+
"group_ids": group_ids,
|
219
|
+
"user_ids": user_ids,
|
153
220
|
},
|
154
221
|
analyst_list_events_params.AnalystListEventsParams,
|
155
222
|
),
|
@@ -181,6 +248,8 @@ class AsyncAnalystResource(AsyncAPIResource):
|
|
181
248
|
async def get_test_questions(
|
182
249
|
self,
|
183
250
|
*,
|
251
|
+
group_ids: List[str] | NotGiven = NOT_GIVEN,
|
252
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
184
253
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
185
254
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
186
255
|
extra_headers: Headers | None = None,
|
@@ -188,12 +257,37 @@ class AsyncAnalystResource(AsyncAPIResource):
|
|
188
257
|
extra_body: Body | None = None,
|
189
258
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
190
259
|
) -> None:
|
191
|
-
"""
|
260
|
+
"""
|
261
|
+
Get test results with full question data for user or group
|
262
|
+
|
263
|
+
Args:
|
264
|
+
group_ids: Array of group IDs to filter
|
265
|
+
|
266
|
+
user_id: User ID to get test results for
|
267
|
+
|
268
|
+
extra_headers: Send extra headers
|
269
|
+
|
270
|
+
extra_query: Add additional query parameters to the request
|
271
|
+
|
272
|
+
extra_body: Add additional JSON properties to the request
|
273
|
+
|
274
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
275
|
+
"""
|
192
276
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
193
277
|
return await self._get(
|
194
278
|
"/api/v1/usage-analyst/test-questions",
|
195
279
|
options=make_request_options(
|
196
|
-
extra_headers=extra_headers,
|
280
|
+
extra_headers=extra_headers,
|
281
|
+
extra_query=extra_query,
|
282
|
+
extra_body=extra_body,
|
283
|
+
timeout=timeout,
|
284
|
+
query=await async_maybe_transform(
|
285
|
+
{
|
286
|
+
"group_ids": group_ids,
|
287
|
+
"user_id": user_id,
|
288
|
+
},
|
289
|
+
analyst_get_test_questions_params.AnalystGetTestQuestionsParams,
|
290
|
+
),
|
197
291
|
),
|
198
292
|
cast_to=NoneType,
|
199
293
|
)
|
@@ -201,21 +295,47 @@ class AsyncAnalystResource(AsyncAPIResource):
|
|
201
295
|
async def list_chat_messages(
|
202
296
|
self,
|
203
297
|
*,
|
298
|
+
group_ids: List[str] | NotGiven = NOT_GIVEN,
|
299
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
204
300
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
205
301
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
206
302
|
extra_headers: Headers | None = None,
|
207
303
|
extra_query: Query | None = None,
|
208
304
|
extra_body: Body | None = None,
|
209
305
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
210
|
-
) ->
|
211
|
-
"""
|
212
|
-
|
306
|
+
) -> AnalystListChatMessagesResponse:
|
307
|
+
"""
|
308
|
+
Get all chat messages from sessions for user or group
|
309
|
+
|
310
|
+
Args:
|
311
|
+
group_ids: Array of group IDs to filter
|
312
|
+
|
313
|
+
user_id: User ID to get chat messages for
|
314
|
+
|
315
|
+
extra_headers: Send extra headers
|
316
|
+
|
317
|
+
extra_query: Add additional query parameters to the request
|
318
|
+
|
319
|
+
extra_body: Add additional JSON properties to the request
|
320
|
+
|
321
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
322
|
+
"""
|
213
323
|
return await self._get(
|
214
324
|
"/api/v1/usage-analyst/chat-messages",
|
215
325
|
options=make_request_options(
|
216
|
-
extra_headers=extra_headers,
|
326
|
+
extra_headers=extra_headers,
|
327
|
+
extra_query=extra_query,
|
328
|
+
extra_body=extra_body,
|
329
|
+
timeout=timeout,
|
330
|
+
query=await async_maybe_transform(
|
331
|
+
{
|
332
|
+
"group_ids": group_ids,
|
333
|
+
"user_id": user_id,
|
334
|
+
},
|
335
|
+
analyst_list_chat_messages_params.AnalystListChatMessagesParams,
|
336
|
+
),
|
217
337
|
),
|
218
|
-
cast_to=
|
338
|
+
cast_to=AnalystListChatMessagesResponse,
|
219
339
|
)
|
220
340
|
|
221
341
|
async def list_events(
|
@@ -248,6 +368,8 @@ class AsyncAnalystResource(AsyncAPIResource):
|
|
248
368
|
"student_performance",
|
249
369
|
],
|
250
370
|
start_date: str,
|
371
|
+
group_ids: List[str] | NotGiven = NOT_GIVEN,
|
372
|
+
user_ids: List[str] | NotGiven = NOT_GIVEN,
|
251
373
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
252
374
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
253
375
|
extra_headers: Headers | None = None,
|
@@ -265,6 +387,10 @@ class AsyncAnalystResource(AsyncAPIResource):
|
|
265
387
|
|
266
388
|
start_date: Start date for filtering (ISO 8601)
|
267
389
|
|
390
|
+
group_ids: Array of group IDs to filter
|
391
|
+
|
392
|
+
user_ids: Array of user IDs to filter
|
393
|
+
|
268
394
|
extra_headers: Send extra headers
|
269
395
|
|
270
396
|
extra_query: Add additional query parameters to the request
|
@@ -286,6 +412,8 @@ class AsyncAnalystResource(AsyncAPIResource):
|
|
286
412
|
"end_date": end_date,
|
287
413
|
"event_type": event_type,
|
288
414
|
"start_date": start_date,
|
415
|
+
"group_ids": group_ids,
|
416
|
+
"user_ids": user_ids,
|
289
417
|
},
|
290
418
|
analyst_list_events_params.AnalystListEventsParams,
|
291
419
|
),
|
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
+
import httpx
|
6
|
+
|
5
7
|
from .folders import (
|
6
8
|
FoldersResource,
|
7
9
|
AsyncFoldersResource,
|
@@ -10,15 +12,8 @@ from .folders import (
|
|
10
12
|
FoldersResourceWithStreamingResponse,
|
11
13
|
AsyncFoldersResourceWithStreamingResponse,
|
12
14
|
)
|
15
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
13
16
|
from ..._compat import cached_property
|
14
|
-
from .chat.chat import (
|
15
|
-
ChatResource,
|
16
|
-
AsyncChatResource,
|
17
|
-
ChatResourceWithRawResponse,
|
18
|
-
AsyncChatResourceWithRawResponse,
|
19
|
-
ChatResourceWithStreamingResponse,
|
20
|
-
AsyncChatResourceWithStreamingResponse,
|
21
|
-
)
|
22
17
|
from .components import (
|
23
18
|
ComponentsResource,
|
24
19
|
AsyncComponentsResource,
|
@@ -27,23 +22,13 @@ from .components import (
|
|
27
22
|
ComponentsResourceWithStreamingResponse,
|
28
23
|
AsyncComponentsResourceWithStreamingResponse,
|
29
24
|
)
|
30
|
-
from .explainers import (
|
31
|
-
ExplainersResource,
|
32
|
-
AsyncExplainersResource,
|
33
|
-
ExplainersResourceWithRawResponse,
|
34
|
-
AsyncExplainersResourceWithRawResponse,
|
35
|
-
ExplainersResourceWithStreamingResponse,
|
36
|
-
AsyncExplainersResourceWithStreamingResponse,
|
37
|
-
)
|
38
|
-
from .flashcards import (
|
39
|
-
FlashcardsResource,
|
40
|
-
AsyncFlashcardsResource,
|
41
|
-
FlashcardsResourceWithRawResponse,
|
42
|
-
AsyncFlashcardsResourceWithRawResponse,
|
43
|
-
FlashcardsResourceWithStreamingResponse,
|
44
|
-
AsyncFlashcardsResourceWithStreamingResponse,
|
45
|
-
)
|
46
25
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
26
|
+
from ..._response import (
|
27
|
+
to_raw_response_wrapper,
|
28
|
+
to_streamed_response_wrapper,
|
29
|
+
async_to_raw_response_wrapper,
|
30
|
+
async_to_streamed_response_wrapper,
|
31
|
+
)
|
47
32
|
from .embed.embed import (
|
48
33
|
EmbedResource,
|
49
34
|
AsyncEmbedResource,
|
@@ -52,14 +37,6 @@ from .embed.embed import (
|
|
52
37
|
EmbedResourceWithStreamingResponse,
|
53
38
|
AsyncEmbedResourceWithStreamingResponse,
|
54
39
|
)
|
55
|
-
from .tests.tests import (
|
56
|
-
TestsResource,
|
57
|
-
AsyncTestsResource,
|
58
|
-
TestsResourceWithRawResponse,
|
59
|
-
AsyncTestsResourceWithRawResponse,
|
60
|
-
TestsResourceWithStreamingResponse,
|
61
|
-
AsyncTestsResourceWithStreamingResponse,
|
62
|
-
)
|
63
40
|
from .usage.usage import (
|
64
41
|
UsageResource,
|
65
42
|
AsyncUsageResource,
|
@@ -76,6 +53,7 @@ from .upload.upload import (
|
|
76
53
|
UploadResourceWithStreamingResponse,
|
77
54
|
AsyncUploadResourceWithStreamingResponse,
|
78
55
|
)
|
56
|
+
from ..._base_client import make_request_options
|
79
57
|
from .assignment_grader import (
|
80
58
|
AssignmentGraderResource,
|
81
59
|
AsyncAssignmentGraderResource,
|
@@ -92,22 +70,6 @@ from .materials.materials import (
|
|
92
70
|
MaterialsResourceWithStreamingResponse,
|
93
71
|
AsyncMaterialsResourceWithStreamingResponse,
|
94
72
|
)
|
95
|
-
from .scenarios.scenarios import (
|
96
|
-
ScenariosResource,
|
97
|
-
AsyncScenariosResource,
|
98
|
-
ScenariosResourceWithRawResponse,
|
99
|
-
AsyncScenariosResourceWithRawResponse,
|
100
|
-
ScenariosResourceWithStreamingResponse,
|
101
|
-
AsyncScenariosResourceWithStreamingResponse,
|
102
|
-
)
|
103
|
-
from .audio_recaps.audio_recaps import (
|
104
|
-
AudioRecapsResource,
|
105
|
-
AsyncAudioRecapsResource,
|
106
|
-
AudioRecapsResourceWithRawResponse,
|
107
|
-
AsyncAudioRecapsResourceWithRawResponse,
|
108
|
-
AudioRecapsResourceWithStreamingResponse,
|
109
|
-
AsyncAudioRecapsResourceWithStreamingResponse,
|
110
|
-
)
|
111
73
|
|
112
74
|
__all__ = ["V1Resource", "AsyncV1Resource"]
|
113
75
|
|
@@ -133,30 +95,6 @@ class V1Resource(SyncAPIResource):
|
|
133
95
|
def embed(self) -> EmbedResource:
|
134
96
|
return EmbedResource(self._client)
|
135
97
|
|
136
|
-
@cached_property
|
137
|
-
def chat(self) -> ChatResource:
|
138
|
-
return ChatResource(self._client)
|
139
|
-
|
140
|
-
@cached_property
|
141
|
-
def tests(self) -> TestsResource:
|
142
|
-
return TestsResource(self._client)
|
143
|
-
|
144
|
-
@cached_property
|
145
|
-
def audio_recaps(self) -> AudioRecapsResource:
|
146
|
-
return AudioRecapsResource(self._client)
|
147
|
-
|
148
|
-
@cached_property
|
149
|
-
def flashcards(self) -> FlashcardsResource:
|
150
|
-
return FlashcardsResource(self._client)
|
151
|
-
|
152
|
-
@cached_property
|
153
|
-
def scenarios(self) -> ScenariosResource:
|
154
|
-
return ScenariosResource(self._client)
|
155
|
-
|
156
|
-
@cached_property
|
157
|
-
def explainers(self) -> ExplainersResource:
|
158
|
-
return ExplainersResource(self._client)
|
159
|
-
|
160
98
|
@cached_property
|
161
99
|
def upload(self) -> UploadResource:
|
162
100
|
return UploadResource(self._client)
|
@@ -184,6 +122,26 @@ class V1Resource(SyncAPIResource):
|
|
184
122
|
"""
|
185
123
|
return V1ResourceWithStreamingResponse(self)
|
186
124
|
|
125
|
+
def test_mongodb(
|
126
|
+
self,
|
127
|
+
*,
|
128
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
129
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
130
|
+
extra_headers: Headers | None = None,
|
131
|
+
extra_query: Query | None = None,
|
132
|
+
extra_body: Body | None = None,
|
133
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
134
|
+
) -> None:
|
135
|
+
"""Test MongoDB connection and get outbound IP"""
|
136
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
137
|
+
return self._get(
|
138
|
+
"/api/v1/test-mongodb",
|
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
|
+
|
187
145
|
|
188
146
|
class AsyncV1Resource(AsyncAPIResource):
|
189
147
|
@cached_property
|
@@ -206,30 +164,6 @@ class AsyncV1Resource(AsyncAPIResource):
|
|
206
164
|
def embed(self) -> AsyncEmbedResource:
|
207
165
|
return AsyncEmbedResource(self._client)
|
208
166
|
|
209
|
-
@cached_property
|
210
|
-
def chat(self) -> AsyncChatResource:
|
211
|
-
return AsyncChatResource(self._client)
|
212
|
-
|
213
|
-
@cached_property
|
214
|
-
def tests(self) -> AsyncTestsResource:
|
215
|
-
return AsyncTestsResource(self._client)
|
216
|
-
|
217
|
-
@cached_property
|
218
|
-
def audio_recaps(self) -> AsyncAudioRecapsResource:
|
219
|
-
return AsyncAudioRecapsResource(self._client)
|
220
|
-
|
221
|
-
@cached_property
|
222
|
-
def flashcards(self) -> AsyncFlashcardsResource:
|
223
|
-
return AsyncFlashcardsResource(self._client)
|
224
|
-
|
225
|
-
@cached_property
|
226
|
-
def scenarios(self) -> AsyncScenariosResource:
|
227
|
-
return AsyncScenariosResource(self._client)
|
228
|
-
|
229
|
-
@cached_property
|
230
|
-
def explainers(self) -> AsyncExplainersResource:
|
231
|
-
return AsyncExplainersResource(self._client)
|
232
|
-
|
233
167
|
@cached_property
|
234
168
|
def upload(self) -> AsyncUploadResource:
|
235
169
|
return AsyncUploadResource(self._client)
|
@@ -257,11 +191,35 @@ class AsyncV1Resource(AsyncAPIResource):
|
|
257
191
|
"""
|
258
192
|
return AsyncV1ResourceWithStreamingResponse(self)
|
259
193
|
|
194
|
+
async def test_mongodb(
|
195
|
+
self,
|
196
|
+
*,
|
197
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
198
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
199
|
+
extra_headers: Headers | None = None,
|
200
|
+
extra_query: Query | None = None,
|
201
|
+
extra_body: Body | None = None,
|
202
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
203
|
+
) -> None:
|
204
|
+
"""Test MongoDB connection and get outbound IP"""
|
205
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
206
|
+
return await self._get(
|
207
|
+
"/api/v1/test-mongodb",
|
208
|
+
options=make_request_options(
|
209
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
210
|
+
),
|
211
|
+
cast_to=NoneType,
|
212
|
+
)
|
213
|
+
|
260
214
|
|
261
215
|
class V1ResourceWithRawResponse:
|
262
216
|
def __init__(self, v1: V1Resource) -> None:
|
263
217
|
self._v1 = v1
|
264
218
|
|
219
|
+
self.test_mongodb = to_raw_response_wrapper(
|
220
|
+
v1.test_mongodb,
|
221
|
+
)
|
222
|
+
|
265
223
|
@cached_property
|
266
224
|
def materials(self) -> MaterialsResourceWithRawResponse:
|
267
225
|
return MaterialsResourceWithRawResponse(self._v1.materials)
|
@@ -282,30 +240,6 @@ class V1ResourceWithRawResponse:
|
|
282
240
|
def embed(self) -> EmbedResourceWithRawResponse:
|
283
241
|
return EmbedResourceWithRawResponse(self._v1.embed)
|
284
242
|
|
285
|
-
@cached_property
|
286
|
-
def chat(self) -> ChatResourceWithRawResponse:
|
287
|
-
return ChatResourceWithRawResponse(self._v1.chat)
|
288
|
-
|
289
|
-
@cached_property
|
290
|
-
def tests(self) -> TestsResourceWithRawResponse:
|
291
|
-
return TestsResourceWithRawResponse(self._v1.tests)
|
292
|
-
|
293
|
-
@cached_property
|
294
|
-
def audio_recaps(self) -> AudioRecapsResourceWithRawResponse:
|
295
|
-
return AudioRecapsResourceWithRawResponse(self._v1.audio_recaps)
|
296
|
-
|
297
|
-
@cached_property
|
298
|
-
def flashcards(self) -> FlashcardsResourceWithRawResponse:
|
299
|
-
return FlashcardsResourceWithRawResponse(self._v1.flashcards)
|
300
|
-
|
301
|
-
@cached_property
|
302
|
-
def scenarios(self) -> ScenariosResourceWithRawResponse:
|
303
|
-
return ScenariosResourceWithRawResponse(self._v1.scenarios)
|
304
|
-
|
305
|
-
@cached_property
|
306
|
-
def explainers(self) -> ExplainersResourceWithRawResponse:
|
307
|
-
return ExplainersResourceWithRawResponse(self._v1.explainers)
|
308
|
-
|
309
243
|
@cached_property
|
310
244
|
def upload(self) -> UploadResourceWithRawResponse:
|
311
245
|
return UploadResourceWithRawResponse(self._v1.upload)
|
@@ -319,6 +253,10 @@ class AsyncV1ResourceWithRawResponse:
|
|
319
253
|
def __init__(self, v1: AsyncV1Resource) -> None:
|
320
254
|
self._v1 = v1
|
321
255
|
|
256
|
+
self.test_mongodb = async_to_raw_response_wrapper(
|
257
|
+
v1.test_mongodb,
|
258
|
+
)
|
259
|
+
|
322
260
|
@cached_property
|
323
261
|
def materials(self) -> AsyncMaterialsResourceWithRawResponse:
|
324
262
|
return AsyncMaterialsResourceWithRawResponse(self._v1.materials)
|
@@ -339,30 +277,6 @@ class AsyncV1ResourceWithRawResponse:
|
|
339
277
|
def embed(self) -> AsyncEmbedResourceWithRawResponse:
|
340
278
|
return AsyncEmbedResourceWithRawResponse(self._v1.embed)
|
341
279
|
|
342
|
-
@cached_property
|
343
|
-
def chat(self) -> AsyncChatResourceWithRawResponse:
|
344
|
-
return AsyncChatResourceWithRawResponse(self._v1.chat)
|
345
|
-
|
346
|
-
@cached_property
|
347
|
-
def tests(self) -> AsyncTestsResourceWithRawResponse:
|
348
|
-
return AsyncTestsResourceWithRawResponse(self._v1.tests)
|
349
|
-
|
350
|
-
@cached_property
|
351
|
-
def audio_recaps(self) -> AsyncAudioRecapsResourceWithRawResponse:
|
352
|
-
return AsyncAudioRecapsResourceWithRawResponse(self._v1.audio_recaps)
|
353
|
-
|
354
|
-
@cached_property
|
355
|
-
def flashcards(self) -> AsyncFlashcardsResourceWithRawResponse:
|
356
|
-
return AsyncFlashcardsResourceWithRawResponse(self._v1.flashcards)
|
357
|
-
|
358
|
-
@cached_property
|
359
|
-
def scenarios(self) -> AsyncScenariosResourceWithRawResponse:
|
360
|
-
return AsyncScenariosResourceWithRawResponse(self._v1.scenarios)
|
361
|
-
|
362
|
-
@cached_property
|
363
|
-
def explainers(self) -> AsyncExplainersResourceWithRawResponse:
|
364
|
-
return AsyncExplainersResourceWithRawResponse(self._v1.explainers)
|
365
|
-
|
366
280
|
@cached_property
|
367
281
|
def upload(self) -> AsyncUploadResourceWithRawResponse:
|
368
282
|
return AsyncUploadResourceWithRawResponse(self._v1.upload)
|
@@ -376,6 +290,10 @@ class V1ResourceWithStreamingResponse:
|
|
376
290
|
def __init__(self, v1: V1Resource) -> None:
|
377
291
|
self._v1 = v1
|
378
292
|
|
293
|
+
self.test_mongodb = to_streamed_response_wrapper(
|
294
|
+
v1.test_mongodb,
|
295
|
+
)
|
296
|
+
|
379
297
|
@cached_property
|
380
298
|
def materials(self) -> MaterialsResourceWithStreamingResponse:
|
381
299
|
return MaterialsResourceWithStreamingResponse(self._v1.materials)
|
@@ -396,30 +314,6 @@ class V1ResourceWithStreamingResponse:
|
|
396
314
|
def embed(self) -> EmbedResourceWithStreamingResponse:
|
397
315
|
return EmbedResourceWithStreamingResponse(self._v1.embed)
|
398
316
|
|
399
|
-
@cached_property
|
400
|
-
def chat(self) -> ChatResourceWithStreamingResponse:
|
401
|
-
return ChatResourceWithStreamingResponse(self._v1.chat)
|
402
|
-
|
403
|
-
@cached_property
|
404
|
-
def tests(self) -> TestsResourceWithStreamingResponse:
|
405
|
-
return TestsResourceWithStreamingResponse(self._v1.tests)
|
406
|
-
|
407
|
-
@cached_property
|
408
|
-
def audio_recaps(self) -> AudioRecapsResourceWithStreamingResponse:
|
409
|
-
return AudioRecapsResourceWithStreamingResponse(self._v1.audio_recaps)
|
410
|
-
|
411
|
-
@cached_property
|
412
|
-
def flashcards(self) -> FlashcardsResourceWithStreamingResponse:
|
413
|
-
return FlashcardsResourceWithStreamingResponse(self._v1.flashcards)
|
414
|
-
|
415
|
-
@cached_property
|
416
|
-
def scenarios(self) -> ScenariosResourceWithStreamingResponse:
|
417
|
-
return ScenariosResourceWithStreamingResponse(self._v1.scenarios)
|
418
|
-
|
419
|
-
@cached_property
|
420
|
-
def explainers(self) -> ExplainersResourceWithStreamingResponse:
|
421
|
-
return ExplainersResourceWithStreamingResponse(self._v1.explainers)
|
422
|
-
|
423
317
|
@cached_property
|
424
318
|
def upload(self) -> UploadResourceWithStreamingResponse:
|
425
319
|
return UploadResourceWithStreamingResponse(self._v1.upload)
|
@@ -433,6 +327,10 @@ class AsyncV1ResourceWithStreamingResponse:
|
|
433
327
|
def __init__(self, v1: AsyncV1Resource) -> None:
|
434
328
|
self._v1 = v1
|
435
329
|
|
330
|
+
self.test_mongodb = async_to_streamed_response_wrapper(
|
331
|
+
v1.test_mongodb,
|
332
|
+
)
|
333
|
+
|
436
334
|
@cached_property
|
437
335
|
def materials(self) -> AsyncMaterialsResourceWithStreamingResponse:
|
438
336
|
return AsyncMaterialsResourceWithStreamingResponse(self._v1.materials)
|
@@ -453,30 +351,6 @@ class AsyncV1ResourceWithStreamingResponse:
|
|
453
351
|
def embed(self) -> AsyncEmbedResourceWithStreamingResponse:
|
454
352
|
return AsyncEmbedResourceWithStreamingResponse(self._v1.embed)
|
455
353
|
|
456
|
-
@cached_property
|
457
|
-
def chat(self) -> AsyncChatResourceWithStreamingResponse:
|
458
|
-
return AsyncChatResourceWithStreamingResponse(self._v1.chat)
|
459
|
-
|
460
|
-
@cached_property
|
461
|
-
def tests(self) -> AsyncTestsResourceWithStreamingResponse:
|
462
|
-
return AsyncTestsResourceWithStreamingResponse(self._v1.tests)
|
463
|
-
|
464
|
-
@cached_property
|
465
|
-
def audio_recaps(self) -> AsyncAudioRecapsResourceWithStreamingResponse:
|
466
|
-
return AsyncAudioRecapsResourceWithStreamingResponse(self._v1.audio_recaps)
|
467
|
-
|
468
|
-
@cached_property
|
469
|
-
def flashcards(self) -> AsyncFlashcardsResourceWithStreamingResponse:
|
470
|
-
return AsyncFlashcardsResourceWithStreamingResponse(self._v1.flashcards)
|
471
|
-
|
472
|
-
@cached_property
|
473
|
-
def scenarios(self) -> AsyncScenariosResourceWithStreamingResponse:
|
474
|
-
return AsyncScenariosResourceWithStreamingResponse(self._v1.scenarios)
|
475
|
-
|
476
|
-
@cached_property
|
477
|
-
def explainers(self) -> AsyncExplainersResourceWithStreamingResponse:
|
478
|
-
return AsyncExplainersResourceWithStreamingResponse(self._v1.explainers)
|
479
|
-
|
480
354
|
@cached_property
|
481
355
|
def upload(self) -> AsyncUploadResourceWithStreamingResponse:
|
482
356
|
return AsyncUploadResourceWithStreamingResponse(self._v1.upload)
|