studyfetch-sdk 0.1.0a5__py3-none-any.whl → 0.1.0a6__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 +12 -12
- studyfetch_sdk/resources/v1/chat/chat.py +13 -15
- studyfetch_sdk/resources/v1/components.py +40 -37
- studyfetch_sdk/resources/v1/explainers.py +80 -0
- studyfetch_sdk/resources/v1/flashcards.py +15 -15
- studyfetch_sdk/resources/v1/materials/materials.py +19 -20
- studyfetch_sdk/resources/v1/materials/upload.py +19 -20
- studyfetch_sdk/resources/v1/scenarios/scenarios.py +13 -13
- studyfetch_sdk/resources/v1/scenarios/submissions/user.py +50 -50
- studyfetch_sdk/resources/v1/v1.py +48 -48
- studyfetch_sdk/types/v1/__init__.py +7 -12
- studyfetch_sdk/types/v1/{chat_retrieve_session_params.py → chat_get_session_params.py} +2 -2
- studyfetch_sdk/types/v1/{component_create_response.py → component.py} +2 -2
- studyfetch_sdk/types/v1/{component_embed_params.py → component_generate_embed_params.py} +2 -2
- studyfetch_sdk/types/v1/{component_embed_response.py → component_generate_embed_response.py} +2 -2
- studyfetch_sdk/types/v1/component_list_response.py +5 -46
- studyfetch_sdk/types/v1/{flashcard_get_algorithm_info_response.py → flashcard_get_algorithm_response.py} +2 -2
- studyfetch_sdk/types/v1/{material_create_response.py → material.py} +2 -2
- studyfetch_sdk/types/v1/material_list_response.py +5 -60
- studyfetch_sdk/types/v1/materials/__init__.py +0 -2
- studyfetch_sdk/types/v1/{scenario_submit_params.py → scenario_submit_answer_params.py} +2 -2
- {studyfetch_sdk-0.1.0a5.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/METADATA +28 -12
- {studyfetch_sdk-0.1.0a5.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/RECORD +26 -38
- studyfetch_sdk/types/v1/admin/__init__.py +0 -3
- studyfetch_sdk/types/v1/admin/organizations/__init__.py +0 -3
- studyfetch_sdk/types/v1/admin/organizations/models/__init__.py +0 -3
- studyfetch_sdk/types/v1/component_retrieve_response.py +0 -48
- studyfetch_sdk/types/v1/component_update_response.py +0 -48
- studyfetch_sdk/types/v1/material_retrieve_response.py +0 -62
- studyfetch_sdk/types/v1/materials/upload_upload_file_response.py +0 -62
- studyfetch_sdk/types/v1/materials/upload_upload_from_url_response.py +0 -62
- studyfetch_sdk/types/v1/organizations/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/logo/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/profile/__init__.py +0 -3
- studyfetch_sdk/types/v1/organizations/team/__init__.py +0 -3
- {studyfetch_sdk-0.1.0a5.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a5.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/licenses/LICENSE +0 -0
@@ -40,9 +40,8 @@ from ...._response import (
|
|
40
40
|
async_to_streamed_response_wrapper,
|
41
41
|
)
|
42
42
|
from ...._base_client import make_request_options
|
43
|
+
from ....types.v1.material import Material
|
43
44
|
from ....types.v1.material_list_response import MaterialListResponse
|
44
|
-
from ....types.v1.material_create_response import MaterialCreateResponse
|
45
|
-
from ....types.v1.material_retrieve_response import MaterialRetrieveResponse
|
46
45
|
|
47
46
|
__all__ = ["MaterialsResource", "AsyncMaterialsResource"]
|
48
47
|
|
@@ -91,7 +90,7 @@ class MaterialsResource(SyncAPIResource):
|
|
91
90
|
extra_query: Query | None = None,
|
92
91
|
extra_body: Body | None = None,
|
93
92
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
94
|
-
) ->
|
93
|
+
) -> Material:
|
95
94
|
"""
|
96
95
|
Create a new material
|
97
96
|
|
@@ -123,7 +122,7 @@ class MaterialsResource(SyncAPIResource):
|
|
123
122
|
options=make_request_options(
|
124
123
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
125
124
|
),
|
126
|
-
cast_to=
|
125
|
+
cast_to=Material,
|
127
126
|
)
|
128
127
|
|
129
128
|
def retrieve(
|
@@ -136,7 +135,7 @@ class MaterialsResource(SyncAPIResource):
|
|
136
135
|
extra_query: Query | None = None,
|
137
136
|
extra_body: Body | None = None,
|
138
137
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
139
|
-
) ->
|
138
|
+
) -> Material:
|
140
139
|
"""
|
141
140
|
Get material by ID
|
142
141
|
|
@@ -156,7 +155,7 @@ class MaterialsResource(SyncAPIResource):
|
|
156
155
|
options=make_request_options(
|
157
156
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
158
157
|
),
|
159
|
-
cast_to=
|
158
|
+
cast_to=Material,
|
160
159
|
)
|
161
160
|
|
162
161
|
def list(
|
@@ -230,7 +229,7 @@ class MaterialsResource(SyncAPIResource):
|
|
230
229
|
cast_to=NoneType,
|
231
230
|
)
|
232
231
|
|
233
|
-
def
|
232
|
+
def batch_create(
|
234
233
|
self,
|
235
234
|
*,
|
236
235
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -480,7 +479,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
480
479
|
extra_query: Query | None = None,
|
481
480
|
extra_body: Body | None = None,
|
482
481
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
483
|
-
) ->
|
482
|
+
) -> Material:
|
484
483
|
"""
|
485
484
|
Create a new material
|
486
485
|
|
@@ -512,7 +511,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
512
511
|
options=make_request_options(
|
513
512
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
514
513
|
),
|
515
|
-
cast_to=
|
514
|
+
cast_to=Material,
|
516
515
|
)
|
517
516
|
|
518
517
|
async def retrieve(
|
@@ -525,7 +524,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
525
524
|
extra_query: Query | None = None,
|
526
525
|
extra_body: Body | None = None,
|
527
526
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
528
|
-
) ->
|
527
|
+
) -> Material:
|
529
528
|
"""
|
530
529
|
Get material by ID
|
531
530
|
|
@@ -545,7 +544,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
545
544
|
options=make_request_options(
|
546
545
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
547
546
|
),
|
548
|
-
cast_to=
|
547
|
+
cast_to=Material,
|
549
548
|
)
|
550
549
|
|
551
550
|
async def list(
|
@@ -619,7 +618,7 @@ class AsyncMaterialsResource(AsyncAPIResource):
|
|
619
618
|
cast_to=NoneType,
|
620
619
|
)
|
621
620
|
|
622
|
-
async def
|
621
|
+
async def batch_create(
|
623
622
|
self,
|
624
623
|
*,
|
625
624
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -841,8 +840,8 @@ class MaterialsResourceWithRawResponse:
|
|
841
840
|
self.delete = to_raw_response_wrapper(
|
842
841
|
materials.delete,
|
843
842
|
)
|
844
|
-
self.
|
845
|
-
materials.
|
843
|
+
self.batch_create = to_raw_response_wrapper(
|
844
|
+
materials.batch_create,
|
846
845
|
)
|
847
846
|
self.debug = to_raw_response_wrapper(
|
848
847
|
materials.debug,
|
@@ -892,8 +891,8 @@ class AsyncMaterialsResourceWithRawResponse:
|
|
892
891
|
self.delete = async_to_raw_response_wrapper(
|
893
892
|
materials.delete,
|
894
893
|
)
|
895
|
-
self.
|
896
|
-
materials.
|
894
|
+
self.batch_create = async_to_raw_response_wrapper(
|
895
|
+
materials.batch_create,
|
897
896
|
)
|
898
897
|
self.debug = async_to_raw_response_wrapper(
|
899
898
|
materials.debug,
|
@@ -943,8 +942,8 @@ class MaterialsResourceWithStreamingResponse:
|
|
943
942
|
self.delete = to_streamed_response_wrapper(
|
944
943
|
materials.delete,
|
945
944
|
)
|
946
|
-
self.
|
947
|
-
materials.
|
945
|
+
self.batch_create = to_streamed_response_wrapper(
|
946
|
+
materials.batch_create,
|
948
947
|
)
|
949
948
|
self.debug = to_streamed_response_wrapper(
|
950
949
|
materials.debug,
|
@@ -994,8 +993,8 @@ class AsyncMaterialsResourceWithStreamingResponse:
|
|
994
993
|
self.delete = async_to_streamed_response_wrapper(
|
995
994
|
materials.delete,
|
996
995
|
)
|
997
|
-
self.
|
998
|
-
materials.
|
996
|
+
self.batch_create = async_to_streamed_response_wrapper(
|
997
|
+
materials.batch_create,
|
999
998
|
)
|
1000
999
|
self.debug = async_to_streamed_response_wrapper(
|
1001
1000
|
materials.debug,
|
@@ -17,9 +17,8 @@ from ...._response import (
|
|
17
17
|
async_to_streamed_response_wrapper,
|
18
18
|
)
|
19
19
|
from ...._base_client import make_request_options
|
20
|
+
from ....types.v1.material import Material
|
20
21
|
from ....types.v1.materials import upload_upload_file_params, upload_upload_from_url_params
|
21
|
-
from ....types.v1.materials.upload_upload_file_response import UploadUploadFileResponse
|
22
|
-
from ....types.v1.materials.upload_upload_from_url_response import UploadUploadFromURLResponse
|
23
22
|
|
24
23
|
__all__ = ["UploadResource", "AsyncUploadResource"]
|
25
24
|
|
@@ -63,7 +62,7 @@ class UploadResource(SyncAPIResource):
|
|
63
62
|
cast_to=NoneType,
|
64
63
|
)
|
65
64
|
|
66
|
-
def
|
65
|
+
def create_presigned_url(
|
67
66
|
self,
|
68
67
|
*,
|
69
68
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -94,7 +93,7 @@ class UploadResource(SyncAPIResource):
|
|
94
93
|
extra_query: Query | None = None,
|
95
94
|
extra_body: Body | None = None,
|
96
95
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
97
|
-
) ->
|
96
|
+
) -> Material:
|
98
97
|
"""
|
99
98
|
Upload a material file
|
100
99
|
|
@@ -130,7 +129,7 @@ class UploadResource(SyncAPIResource):
|
|
130
129
|
options=make_request_options(
|
131
130
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
132
131
|
),
|
133
|
-
cast_to=
|
132
|
+
cast_to=Material,
|
134
133
|
)
|
135
134
|
|
136
135
|
def upload_from_url(
|
@@ -145,7 +144,7 @@ class UploadResource(SyncAPIResource):
|
|
145
144
|
extra_query: Query | None = None,
|
146
145
|
extra_body: Body | None = None,
|
147
146
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
148
|
-
) ->
|
147
|
+
) -> Material:
|
149
148
|
"""
|
150
149
|
Upload material from URL
|
151
150
|
|
@@ -177,7 +176,7 @@ class UploadResource(SyncAPIResource):
|
|
177
176
|
options=make_request_options(
|
178
177
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
179
178
|
),
|
180
|
-
cast_to=
|
179
|
+
cast_to=Material,
|
181
180
|
)
|
182
181
|
|
183
182
|
|
@@ -220,7 +219,7 @@ class AsyncUploadResource(AsyncAPIResource):
|
|
220
219
|
cast_to=NoneType,
|
221
220
|
)
|
222
221
|
|
223
|
-
async def
|
222
|
+
async def create_presigned_url(
|
224
223
|
self,
|
225
224
|
*,
|
226
225
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -251,7 +250,7 @@ class AsyncUploadResource(AsyncAPIResource):
|
|
251
250
|
extra_query: Query | None = None,
|
252
251
|
extra_body: Body | None = None,
|
253
252
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
254
|
-
) ->
|
253
|
+
) -> Material:
|
255
254
|
"""
|
256
255
|
Upload a material file
|
257
256
|
|
@@ -287,7 +286,7 @@ class AsyncUploadResource(AsyncAPIResource):
|
|
287
286
|
options=make_request_options(
|
288
287
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
289
288
|
),
|
290
|
-
cast_to=
|
289
|
+
cast_to=Material,
|
291
290
|
)
|
292
291
|
|
293
292
|
async def upload_from_url(
|
@@ -302,7 +301,7 @@ class AsyncUploadResource(AsyncAPIResource):
|
|
302
301
|
extra_query: Query | None = None,
|
303
302
|
extra_body: Body | None = None,
|
304
303
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
305
|
-
) ->
|
304
|
+
) -> Material:
|
306
305
|
"""
|
307
306
|
Upload material from URL
|
308
307
|
|
@@ -334,7 +333,7 @@ class AsyncUploadResource(AsyncAPIResource):
|
|
334
333
|
options=make_request_options(
|
335
334
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
336
335
|
),
|
337
|
-
cast_to=
|
336
|
+
cast_to=Material,
|
338
337
|
)
|
339
338
|
|
340
339
|
|
@@ -345,8 +344,8 @@ class UploadResourceWithRawResponse:
|
|
345
344
|
self.complete_upload = to_raw_response_wrapper(
|
346
345
|
upload.complete_upload,
|
347
346
|
)
|
348
|
-
self.
|
349
|
-
upload.
|
347
|
+
self.create_presigned_url = to_raw_response_wrapper(
|
348
|
+
upload.create_presigned_url,
|
350
349
|
)
|
351
350
|
self.upload_file = to_raw_response_wrapper(
|
352
351
|
upload.upload_file,
|
@@ -363,8 +362,8 @@ class AsyncUploadResourceWithRawResponse:
|
|
363
362
|
self.complete_upload = async_to_raw_response_wrapper(
|
364
363
|
upload.complete_upload,
|
365
364
|
)
|
366
|
-
self.
|
367
|
-
upload.
|
365
|
+
self.create_presigned_url = async_to_raw_response_wrapper(
|
366
|
+
upload.create_presigned_url,
|
368
367
|
)
|
369
368
|
self.upload_file = async_to_raw_response_wrapper(
|
370
369
|
upload.upload_file,
|
@@ -381,8 +380,8 @@ class UploadResourceWithStreamingResponse:
|
|
381
380
|
self.complete_upload = to_streamed_response_wrapper(
|
382
381
|
upload.complete_upload,
|
383
382
|
)
|
384
|
-
self.
|
385
|
-
upload.
|
383
|
+
self.create_presigned_url = to_streamed_response_wrapper(
|
384
|
+
upload.create_presigned_url,
|
386
385
|
)
|
387
386
|
self.upload_file = to_streamed_response_wrapper(
|
388
387
|
upload.upload_file,
|
@@ -399,8 +398,8 @@ class AsyncUploadResourceWithStreamingResponse:
|
|
399
398
|
self.complete_upload = async_to_streamed_response_wrapper(
|
400
399
|
upload.complete_upload,
|
401
400
|
)
|
402
|
-
self.
|
403
|
-
upload.
|
401
|
+
self.create_presigned_url = async_to_streamed_response_wrapper(
|
402
|
+
upload.create_presigned_url,
|
404
403
|
)
|
405
404
|
self.upload_file = async_to_streamed_response_wrapper(
|
406
405
|
upload.upload_file,
|
@@ -25,7 +25,7 @@ from .component import (
|
|
25
25
|
AsyncComponentResourceWithStreamingResponse,
|
26
26
|
)
|
27
27
|
from ...._compat import cached_property
|
28
|
-
from ....types.v1 import scenario_create_params,
|
28
|
+
from ....types.v1 import scenario_create_params, scenario_update_params, scenario_submit_answer_params
|
29
29
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
30
30
|
from ...._response import (
|
31
31
|
to_raw_response_wrapper,
|
@@ -369,7 +369,7 @@ class ScenariosResource(SyncAPIResource):
|
|
369
369
|
cast_to=NoneType,
|
370
370
|
)
|
371
371
|
|
372
|
-
def
|
372
|
+
def submit_answer(
|
373
373
|
self,
|
374
374
|
id: str,
|
375
375
|
*,
|
@@ -408,7 +408,7 @@ class ScenariosResource(SyncAPIResource):
|
|
408
408
|
"conversation_history": conversation_history,
|
409
409
|
"final_answer": final_answer,
|
410
410
|
},
|
411
|
-
|
411
|
+
scenario_submit_answer_params.ScenarioSubmitAnswerParams,
|
412
412
|
),
|
413
413
|
options=make_request_options(
|
414
414
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
@@ -740,7 +740,7 @@ class AsyncScenariosResource(AsyncAPIResource):
|
|
740
740
|
cast_to=NoneType,
|
741
741
|
)
|
742
742
|
|
743
|
-
async def
|
743
|
+
async def submit_answer(
|
744
744
|
self,
|
745
745
|
id: str,
|
746
746
|
*,
|
@@ -779,7 +779,7 @@ class AsyncScenariosResource(AsyncAPIResource):
|
|
779
779
|
"conversation_history": conversation_history,
|
780
780
|
"final_answer": final_answer,
|
781
781
|
},
|
782
|
-
|
782
|
+
scenario_submit_answer_params.ScenarioSubmitAnswerParams,
|
783
783
|
),
|
784
784
|
options=make_request_options(
|
785
785
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
@@ -810,8 +810,8 @@ class ScenariosResourceWithRawResponse:
|
|
810
810
|
self.get_stats = to_raw_response_wrapper(
|
811
811
|
scenarios.get_stats,
|
812
812
|
)
|
813
|
-
self.
|
814
|
-
scenarios.
|
813
|
+
self.submit_answer = to_raw_response_wrapper(
|
814
|
+
scenarios.submit_answer,
|
815
815
|
)
|
816
816
|
|
817
817
|
@cached_property
|
@@ -849,8 +849,8 @@ class AsyncScenariosResourceWithRawResponse:
|
|
849
849
|
self.get_stats = async_to_raw_response_wrapper(
|
850
850
|
scenarios.get_stats,
|
851
851
|
)
|
852
|
-
self.
|
853
|
-
scenarios.
|
852
|
+
self.submit_answer = async_to_raw_response_wrapper(
|
853
|
+
scenarios.submit_answer,
|
854
854
|
)
|
855
855
|
|
856
856
|
@cached_property
|
@@ -888,8 +888,8 @@ class ScenariosResourceWithStreamingResponse:
|
|
888
888
|
self.get_stats = to_streamed_response_wrapper(
|
889
889
|
scenarios.get_stats,
|
890
890
|
)
|
891
|
-
self.
|
892
|
-
scenarios.
|
891
|
+
self.submit_answer = to_streamed_response_wrapper(
|
892
|
+
scenarios.submit_answer,
|
893
893
|
)
|
894
894
|
|
895
895
|
@cached_property
|
@@ -927,8 +927,8 @@ class AsyncScenariosResourceWithStreamingResponse:
|
|
927
927
|
self.get_stats = async_to_streamed_response_wrapper(
|
928
928
|
scenarios.get_stats,
|
929
929
|
)
|
930
|
-
self.
|
931
|
-
scenarios.
|
930
|
+
self.submit_answer = async_to_streamed_response_wrapper(
|
931
|
+
scenarios.submit_answer,
|
932
932
|
)
|
933
933
|
|
934
934
|
@cached_property
|
@@ -38,9 +38,8 @@ class UserResource(SyncAPIResource):
|
|
38
38
|
"""
|
39
39
|
return UserResourceWithStreamingResponse(self)
|
40
40
|
|
41
|
-
def
|
41
|
+
def get_all(
|
42
42
|
self,
|
43
|
-
id: str,
|
44
43
|
*,
|
45
44
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
46
45
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
@@ -49,29 +48,18 @@ class UserResource(SyncAPIResource):
|
|
49
48
|
extra_body: Body | None = None,
|
50
49
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
51
50
|
) -> None:
|
52
|
-
"""
|
53
|
-
Args:
|
54
|
-
extra_headers: Send extra headers
|
55
|
-
|
56
|
-
extra_query: Add additional query parameters to the request
|
57
|
-
|
58
|
-
extra_body: Add additional JSON properties to the request
|
59
|
-
|
60
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
61
|
-
"""
|
62
|
-
if not id:
|
63
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
64
51
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
65
52
|
return self._get(
|
66
|
-
|
53
|
+
"/api/v1/scenarios/submissions/user",
|
67
54
|
options=make_request_options(
|
68
55
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
69
56
|
),
|
70
57
|
cast_to=NoneType,
|
71
58
|
)
|
72
59
|
|
73
|
-
def
|
60
|
+
def get_by_scenario(
|
74
61
|
self,
|
62
|
+
id: str,
|
75
63
|
*,
|
76
64
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
77
65
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
@@ -80,9 +68,21 @@ class UserResource(SyncAPIResource):
|
|
80
68
|
extra_body: Body | None = None,
|
81
69
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
82
70
|
) -> None:
|
71
|
+
"""
|
72
|
+
Args:
|
73
|
+
extra_headers: Send extra headers
|
74
|
+
|
75
|
+
extra_query: Add additional query parameters to the request
|
76
|
+
|
77
|
+
extra_body: Add additional JSON properties to the request
|
78
|
+
|
79
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
80
|
+
"""
|
81
|
+
if not id:
|
82
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
83
83
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
84
84
|
return self._get(
|
85
|
-
"/api/v1/scenarios/submissions/user",
|
85
|
+
f"/api/v1/scenarios/{id}/submissions/user",
|
86
86
|
options=make_request_options(
|
87
87
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
88
88
|
),
|
@@ -110,9 +110,8 @@ class AsyncUserResource(AsyncAPIResource):
|
|
110
110
|
"""
|
111
111
|
return AsyncUserResourceWithStreamingResponse(self)
|
112
112
|
|
113
|
-
async def
|
113
|
+
async def get_all(
|
114
114
|
self,
|
115
|
-
id: str,
|
116
115
|
*,
|
117
116
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
118
117
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
@@ -121,29 +120,18 @@ class AsyncUserResource(AsyncAPIResource):
|
|
121
120
|
extra_body: Body | None = None,
|
122
121
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
123
122
|
) -> 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
123
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
137
124
|
return await self._get(
|
138
|
-
|
125
|
+
"/api/v1/scenarios/submissions/user",
|
139
126
|
options=make_request_options(
|
140
127
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
141
128
|
),
|
142
129
|
cast_to=NoneType,
|
143
130
|
)
|
144
131
|
|
145
|
-
async def
|
132
|
+
async def get_by_scenario(
|
146
133
|
self,
|
134
|
+
id: str,
|
147
135
|
*,
|
148
136
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
149
137
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
@@ -152,9 +140,21 @@ class AsyncUserResource(AsyncAPIResource):
|
|
152
140
|
extra_body: Body | None = None,
|
153
141
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
154
142
|
) -> None:
|
143
|
+
"""
|
144
|
+
Args:
|
145
|
+
extra_headers: Send extra headers
|
146
|
+
|
147
|
+
extra_query: Add additional query parameters to the request
|
148
|
+
|
149
|
+
extra_body: Add additional JSON properties to the request
|
150
|
+
|
151
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
152
|
+
"""
|
153
|
+
if not id:
|
154
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
155
155
|
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
156
156
|
return await self._get(
|
157
|
-
"/api/v1/scenarios/submissions/user",
|
157
|
+
f"/api/v1/scenarios/{id}/submissions/user",
|
158
158
|
options=make_request_options(
|
159
159
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
160
160
|
),
|
@@ -166,11 +166,11 @@ class UserResourceWithRawResponse:
|
|
166
166
|
def __init__(self, user: UserResource) -> None:
|
167
167
|
self._user = user
|
168
168
|
|
169
|
-
self.
|
170
|
-
user.
|
169
|
+
self.get_all = to_raw_response_wrapper(
|
170
|
+
user.get_all,
|
171
171
|
)
|
172
|
-
self.
|
173
|
-
user.
|
172
|
+
self.get_by_scenario = to_raw_response_wrapper(
|
173
|
+
user.get_by_scenario,
|
174
174
|
)
|
175
175
|
|
176
176
|
|
@@ -178,11 +178,11 @@ class AsyncUserResourceWithRawResponse:
|
|
178
178
|
def __init__(self, user: AsyncUserResource) -> None:
|
179
179
|
self._user = user
|
180
180
|
|
181
|
-
self.
|
182
|
-
user.
|
181
|
+
self.get_all = async_to_raw_response_wrapper(
|
182
|
+
user.get_all,
|
183
183
|
)
|
184
|
-
self.
|
185
|
-
user.
|
184
|
+
self.get_by_scenario = async_to_raw_response_wrapper(
|
185
|
+
user.get_by_scenario,
|
186
186
|
)
|
187
187
|
|
188
188
|
|
@@ -190,11 +190,11 @@ class UserResourceWithStreamingResponse:
|
|
190
190
|
def __init__(self, user: UserResource) -> None:
|
191
191
|
self._user = user
|
192
192
|
|
193
|
-
self.
|
194
|
-
user.
|
193
|
+
self.get_all = to_streamed_response_wrapper(
|
194
|
+
user.get_all,
|
195
195
|
)
|
196
|
-
self.
|
197
|
-
user.
|
196
|
+
self.get_by_scenario = to_streamed_response_wrapper(
|
197
|
+
user.get_by_scenario,
|
198
198
|
)
|
199
199
|
|
200
200
|
|
@@ -202,9 +202,9 @@ class AsyncUserResourceWithStreamingResponse:
|
|
202
202
|
def __init__(self, user: AsyncUserResource) -> None:
|
203
203
|
self._user = user
|
204
204
|
|
205
|
-
self.
|
206
|
-
user.
|
205
|
+
self.get_all = async_to_streamed_response_wrapper(
|
206
|
+
user.get_all,
|
207
207
|
)
|
208
|
-
self.
|
209
|
-
user.
|
208
|
+
self.get_by_scenario = async_to_streamed_response_wrapper(
|
209
|
+
user.get_by_scenario,
|
210
210
|
)
|