studyfetch-sdk 0.1.0a4__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.
Files changed (45) hide show
  1. studyfetch_sdk/_version.py +1 -1
  2. studyfetch_sdk/resources/v1/__init__.py +12 -12
  3. studyfetch_sdk/resources/v1/chat/chat.py +13 -15
  4. studyfetch_sdk/resources/v1/components.py +40 -37
  5. studyfetch_sdk/resources/v1/explainers.py +234 -9
  6. studyfetch_sdk/resources/v1/flashcards.py +15 -15
  7. studyfetch_sdk/resources/v1/materials/materials.py +19 -20
  8. studyfetch_sdk/resources/v1/materials/upload.py +19 -20
  9. studyfetch_sdk/resources/v1/scenarios/component.py +116 -12
  10. studyfetch_sdk/resources/v1/scenarios/scenarios.py +255 -19
  11. studyfetch_sdk/resources/v1/scenarios/submissions/user.py +50 -50
  12. studyfetch_sdk/resources/v1/v1.py +48 -48
  13. studyfetch_sdk/types/v1/__init__.py +8 -11
  14. studyfetch_sdk/types/v1/{chat_retrieve_session_params.py → chat_get_session_params.py} +2 -2
  15. studyfetch_sdk/types/v1/{component_create_response.py → component.py} +2 -2
  16. studyfetch_sdk/types/v1/component_create_params.py +60 -6
  17. studyfetch_sdk/types/v1/{component_embed_params.py → component_generate_embed_params.py} +2 -2
  18. studyfetch_sdk/types/v1/{component_embed_response.py → component_generate_embed_response.py} +2 -2
  19. studyfetch_sdk/types/v1/component_list_response.py +5 -46
  20. studyfetch_sdk/types/v1/explainer_create_params.py +45 -0
  21. studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +45 -3
  22. studyfetch_sdk/types/v1/{flashcard_get_algorithm_info_response.py → flashcard_get_algorithm_response.py} +2 -2
  23. studyfetch_sdk/types/v1/{material_create_response.py → material.py} +2 -2
  24. studyfetch_sdk/types/v1/material_list_response.py +5 -60
  25. studyfetch_sdk/types/v1/materials/__init__.py +0 -2
  26. studyfetch_sdk/types/v1/scenario_create_params.py +39 -2
  27. studyfetch_sdk/types/v1/scenario_submit_answer_params.py +18 -0
  28. studyfetch_sdk/types/v1/scenario_update_params.py +39 -2
  29. studyfetch_sdk/types/v1/scenarios/component_update_params.py +39 -2
  30. {studyfetch_sdk-0.1.0a4.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/METADATA +28 -12
  31. {studyfetch_sdk-0.1.0a4.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/RECORD +33 -43
  32. studyfetch_sdk/types/v1/admin/__init__.py +0 -3
  33. studyfetch_sdk/types/v1/admin/organizations/__init__.py +0 -3
  34. studyfetch_sdk/types/v1/admin/organizations/models/__init__.py +0 -3
  35. studyfetch_sdk/types/v1/component_retrieve_response.py +0 -48
  36. studyfetch_sdk/types/v1/component_update_response.py +0 -48
  37. studyfetch_sdk/types/v1/material_retrieve_response.py +0 -62
  38. studyfetch_sdk/types/v1/materials/upload_upload_file_response.py +0 -62
  39. studyfetch_sdk/types/v1/materials/upload_upload_from_url_response.py +0 -62
  40. studyfetch_sdk/types/v1/organizations/__init__.py +0 -3
  41. studyfetch_sdk/types/v1/organizations/logo/__init__.py +0 -3
  42. studyfetch_sdk/types/v1/organizations/profile/__init__.py +0 -3
  43. studyfetch_sdk/types/v1/organizations/team/__init__.py +0 -3
  44. {studyfetch_sdk-0.1.0a4.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/WHEEL +0 -0
  45. {studyfetch_sdk-0.1.0a4.dist-info → studyfetch_sdk-0.1.0a6.dist-info}/licenses/LICENSE +0 -0
@@ -2,6 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Iterable
6
+
5
7
  import httpx
6
8
 
7
9
  from .sessions import (
@@ -23,7 +25,7 @@ from .component import (
23
25
  AsyncComponentResourceWithStreamingResponse,
24
26
  )
25
27
  from ...._compat import cached_property
26
- from ....types.v1 import scenario_create_params, scenario_update_params
28
+ from ....types.v1 import scenario_create_params, scenario_update_params, scenario_submit_answer_params
27
29
  from ...._resource import SyncAPIResource, AsyncAPIResource
28
30
  from ...._response import (
29
31
  to_raw_response_wrapper,
@@ -79,7 +81,18 @@ class ScenariosResource(SyncAPIResource):
79
81
  def create(
80
82
  self,
81
83
  *,
82
- body: str,
84
+ component_id: str,
85
+ name: str,
86
+ characters: Iterable[object] | NotGiven = NOT_GIVEN,
87
+ context: str | NotGiven = NOT_GIVEN,
88
+ description: str | NotGiven = NOT_GIVEN,
89
+ final_answer_prompt: str | NotGiven = NOT_GIVEN,
90
+ format: str | NotGiven = NOT_GIVEN,
91
+ goal: str | NotGiven = NOT_GIVEN,
92
+ greeting_character_id: str | NotGiven = NOT_GIVEN,
93
+ greeting_message: str | NotGiven = NOT_GIVEN,
94
+ requires_final_answer: bool | NotGiven = NOT_GIVEN,
95
+ tools: Iterable[object] | NotGiven = NOT_GIVEN,
83
96
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
84
97
  # The extra values given here take precedence over values defined on the client or passed to this method.
85
98
  extra_headers: Headers | None = None,
@@ -91,6 +104,30 @@ class ScenariosResource(SyncAPIResource):
91
104
  Create a new scenario
92
105
 
93
106
  Args:
107
+ component_id: Associated component ID
108
+
109
+ name: Scenario name
110
+
111
+ characters: Scenario characters
112
+
113
+ context: Scenario context
114
+
115
+ description: Scenario description
116
+
117
+ final_answer_prompt: Prompt for final answer
118
+
119
+ format: Interaction format
120
+
121
+ goal: Scenario goal
122
+
123
+ greeting_character_id: Character ID for greeting
124
+
125
+ greeting_message: Greeting message
126
+
127
+ requires_final_answer: Whether scenario requires a final answer
128
+
129
+ tools: Available tools
130
+
94
131
  extra_headers: Send extra headers
95
132
 
96
133
  extra_query: Add additional query parameters to the request
@@ -102,7 +139,23 @@ class ScenariosResource(SyncAPIResource):
102
139
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
103
140
  return self._post(
104
141
  "/api/v1/scenarios",
105
- body=maybe_transform(body, scenario_create_params.ScenarioCreateParams),
142
+ body=maybe_transform(
143
+ {
144
+ "component_id": component_id,
145
+ "name": name,
146
+ "characters": characters,
147
+ "context": context,
148
+ "description": description,
149
+ "final_answer_prompt": final_answer_prompt,
150
+ "format": format,
151
+ "goal": goal,
152
+ "greeting_character_id": greeting_character_id,
153
+ "greeting_message": greeting_message,
154
+ "requires_final_answer": requires_final_answer,
155
+ "tools": tools,
156
+ },
157
+ scenario_create_params.ScenarioCreateParams,
158
+ ),
106
159
  options=make_request_options(
107
160
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
108
161
  ),
@@ -147,7 +200,18 @@ class ScenariosResource(SyncAPIResource):
147
200
  self,
148
201
  id: str,
149
202
  *,
150
- body: str,
203
+ component_id: str,
204
+ name: str,
205
+ characters: Iterable[object] | NotGiven = NOT_GIVEN,
206
+ context: str | NotGiven = NOT_GIVEN,
207
+ description: str | NotGiven = NOT_GIVEN,
208
+ final_answer_prompt: str | NotGiven = NOT_GIVEN,
209
+ format: str | NotGiven = NOT_GIVEN,
210
+ goal: str | NotGiven = NOT_GIVEN,
211
+ greeting_character_id: str | NotGiven = NOT_GIVEN,
212
+ greeting_message: str | NotGiven = NOT_GIVEN,
213
+ requires_final_answer: bool | NotGiven = NOT_GIVEN,
214
+ tools: Iterable[object] | NotGiven = NOT_GIVEN,
151
215
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
152
216
  # The extra values given here take precedence over values defined on the client or passed to this method.
153
217
  extra_headers: Headers | None = None,
@@ -159,6 +223,30 @@ class ScenariosResource(SyncAPIResource):
159
223
  Update scenario
160
224
 
161
225
  Args:
226
+ component_id: Associated component ID
227
+
228
+ name: Scenario name
229
+
230
+ characters: Scenario characters
231
+
232
+ context: Scenario context
233
+
234
+ description: Scenario description
235
+
236
+ final_answer_prompt: Prompt for final answer
237
+
238
+ format: Interaction format
239
+
240
+ goal: Scenario goal
241
+
242
+ greeting_character_id: Character ID for greeting
243
+
244
+ greeting_message: Greeting message
245
+
246
+ requires_final_answer: Whether scenario requires a final answer
247
+
248
+ tools: Available tools
249
+
162
250
  extra_headers: Send extra headers
163
251
 
164
252
  extra_query: Add additional query parameters to the request
@@ -172,7 +260,23 @@ class ScenariosResource(SyncAPIResource):
172
260
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
173
261
  return self._put(
174
262
  f"/api/v1/scenarios/{id}",
175
- body=maybe_transform(body, scenario_update_params.ScenarioUpdateParams),
263
+ body=maybe_transform(
264
+ {
265
+ "component_id": component_id,
266
+ "name": name,
267
+ "characters": characters,
268
+ "context": context,
269
+ "description": description,
270
+ "final_answer_prompt": final_answer_prompt,
271
+ "format": format,
272
+ "goal": goal,
273
+ "greeting_character_id": greeting_character_id,
274
+ "greeting_message": greeting_message,
275
+ "requires_final_answer": requires_final_answer,
276
+ "tools": tools,
277
+ },
278
+ scenario_update_params.ScenarioUpdateParams,
279
+ ),
176
280
  options=make_request_options(
177
281
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
178
282
  ),
@@ -265,10 +369,12 @@ class ScenariosResource(SyncAPIResource):
265
369
  cast_to=NoneType,
266
370
  )
267
371
 
268
- def submit(
372
+ def submit_answer(
269
373
  self,
270
374
  id: str,
271
375
  *,
376
+ conversation_history: Iterable[object],
377
+ final_answer: str | NotGiven = NOT_GIVEN,
272
378
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
273
379
  # The extra values given here take precedence over values defined on the client or passed to this method.
274
380
  extra_headers: Headers | None = None,
@@ -277,7 +383,13 @@ class ScenariosResource(SyncAPIResource):
277
383
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
278
384
  ) -> None:
279
385
  """
386
+ Submit scenario answer
387
+
280
388
  Args:
389
+ conversation_history: Conversation history
390
+
391
+ final_answer: Final answer for the scenario
392
+
281
393
  extra_headers: Send extra headers
282
394
 
283
395
  extra_query: Add additional query parameters to the request
@@ -291,6 +403,13 @@ class ScenariosResource(SyncAPIResource):
291
403
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
292
404
  return self._post(
293
405
  f"/api/v1/scenarios/{id}/submit",
406
+ body=maybe_transform(
407
+ {
408
+ "conversation_history": conversation_history,
409
+ "final_answer": final_answer,
410
+ },
411
+ scenario_submit_answer_params.ScenarioSubmitAnswerParams,
412
+ ),
294
413
  options=make_request_options(
295
414
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
296
415
  ),
@@ -333,7 +452,18 @@ class AsyncScenariosResource(AsyncAPIResource):
333
452
  async def create(
334
453
  self,
335
454
  *,
336
- body: str,
455
+ component_id: str,
456
+ name: str,
457
+ characters: Iterable[object] | NotGiven = NOT_GIVEN,
458
+ context: str | NotGiven = NOT_GIVEN,
459
+ description: str | NotGiven = NOT_GIVEN,
460
+ final_answer_prompt: str | NotGiven = NOT_GIVEN,
461
+ format: str | NotGiven = NOT_GIVEN,
462
+ goal: str | NotGiven = NOT_GIVEN,
463
+ greeting_character_id: str | NotGiven = NOT_GIVEN,
464
+ greeting_message: str | NotGiven = NOT_GIVEN,
465
+ requires_final_answer: bool | NotGiven = NOT_GIVEN,
466
+ tools: Iterable[object] | NotGiven = NOT_GIVEN,
337
467
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
338
468
  # The extra values given here take precedence over values defined on the client or passed to this method.
339
469
  extra_headers: Headers | None = None,
@@ -345,6 +475,30 @@ class AsyncScenariosResource(AsyncAPIResource):
345
475
  Create a new scenario
346
476
 
347
477
  Args:
478
+ component_id: Associated component ID
479
+
480
+ name: Scenario name
481
+
482
+ characters: Scenario characters
483
+
484
+ context: Scenario context
485
+
486
+ description: Scenario description
487
+
488
+ final_answer_prompt: Prompt for final answer
489
+
490
+ format: Interaction format
491
+
492
+ goal: Scenario goal
493
+
494
+ greeting_character_id: Character ID for greeting
495
+
496
+ greeting_message: Greeting message
497
+
498
+ requires_final_answer: Whether scenario requires a final answer
499
+
500
+ tools: Available tools
501
+
348
502
  extra_headers: Send extra headers
349
503
 
350
504
  extra_query: Add additional query parameters to the request
@@ -356,7 +510,23 @@ class AsyncScenariosResource(AsyncAPIResource):
356
510
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
357
511
  return await self._post(
358
512
  "/api/v1/scenarios",
359
- body=await async_maybe_transform(body, scenario_create_params.ScenarioCreateParams),
513
+ body=await async_maybe_transform(
514
+ {
515
+ "component_id": component_id,
516
+ "name": name,
517
+ "characters": characters,
518
+ "context": context,
519
+ "description": description,
520
+ "final_answer_prompt": final_answer_prompt,
521
+ "format": format,
522
+ "goal": goal,
523
+ "greeting_character_id": greeting_character_id,
524
+ "greeting_message": greeting_message,
525
+ "requires_final_answer": requires_final_answer,
526
+ "tools": tools,
527
+ },
528
+ scenario_create_params.ScenarioCreateParams,
529
+ ),
360
530
  options=make_request_options(
361
531
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
362
532
  ),
@@ -401,7 +571,18 @@ class AsyncScenariosResource(AsyncAPIResource):
401
571
  self,
402
572
  id: str,
403
573
  *,
404
- body: str,
574
+ component_id: str,
575
+ name: str,
576
+ characters: Iterable[object] | NotGiven = NOT_GIVEN,
577
+ context: str | NotGiven = NOT_GIVEN,
578
+ description: str | NotGiven = NOT_GIVEN,
579
+ final_answer_prompt: str | NotGiven = NOT_GIVEN,
580
+ format: str | NotGiven = NOT_GIVEN,
581
+ goal: str | NotGiven = NOT_GIVEN,
582
+ greeting_character_id: str | NotGiven = NOT_GIVEN,
583
+ greeting_message: str | NotGiven = NOT_GIVEN,
584
+ requires_final_answer: bool | NotGiven = NOT_GIVEN,
585
+ tools: Iterable[object] | NotGiven = NOT_GIVEN,
405
586
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
406
587
  # The extra values given here take precedence over values defined on the client or passed to this method.
407
588
  extra_headers: Headers | None = None,
@@ -413,6 +594,30 @@ class AsyncScenariosResource(AsyncAPIResource):
413
594
  Update scenario
414
595
 
415
596
  Args:
597
+ component_id: Associated component ID
598
+
599
+ name: Scenario name
600
+
601
+ characters: Scenario characters
602
+
603
+ context: Scenario context
604
+
605
+ description: Scenario description
606
+
607
+ final_answer_prompt: Prompt for final answer
608
+
609
+ format: Interaction format
610
+
611
+ goal: Scenario goal
612
+
613
+ greeting_character_id: Character ID for greeting
614
+
615
+ greeting_message: Greeting message
616
+
617
+ requires_final_answer: Whether scenario requires a final answer
618
+
619
+ tools: Available tools
620
+
416
621
  extra_headers: Send extra headers
417
622
 
418
623
  extra_query: Add additional query parameters to the request
@@ -426,7 +631,23 @@ class AsyncScenariosResource(AsyncAPIResource):
426
631
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
427
632
  return await self._put(
428
633
  f"/api/v1/scenarios/{id}",
429
- body=await async_maybe_transform(body, scenario_update_params.ScenarioUpdateParams),
634
+ body=await async_maybe_transform(
635
+ {
636
+ "component_id": component_id,
637
+ "name": name,
638
+ "characters": characters,
639
+ "context": context,
640
+ "description": description,
641
+ "final_answer_prompt": final_answer_prompt,
642
+ "format": format,
643
+ "goal": goal,
644
+ "greeting_character_id": greeting_character_id,
645
+ "greeting_message": greeting_message,
646
+ "requires_final_answer": requires_final_answer,
647
+ "tools": tools,
648
+ },
649
+ scenario_update_params.ScenarioUpdateParams,
650
+ ),
430
651
  options=make_request_options(
431
652
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
432
653
  ),
@@ -519,10 +740,12 @@ class AsyncScenariosResource(AsyncAPIResource):
519
740
  cast_to=NoneType,
520
741
  )
521
742
 
522
- async def submit(
743
+ async def submit_answer(
523
744
  self,
524
745
  id: str,
525
746
  *,
747
+ conversation_history: Iterable[object],
748
+ final_answer: str | NotGiven = NOT_GIVEN,
526
749
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
527
750
  # The extra values given here take precedence over values defined on the client or passed to this method.
528
751
  extra_headers: Headers | None = None,
@@ -531,7 +754,13 @@ class AsyncScenariosResource(AsyncAPIResource):
531
754
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
532
755
  ) -> None:
533
756
  """
757
+ Submit scenario answer
758
+
534
759
  Args:
760
+ conversation_history: Conversation history
761
+
762
+ final_answer: Final answer for the scenario
763
+
535
764
  extra_headers: Send extra headers
536
765
 
537
766
  extra_query: Add additional query parameters to the request
@@ -545,6 +774,13 @@ class AsyncScenariosResource(AsyncAPIResource):
545
774
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
546
775
  return await self._post(
547
776
  f"/api/v1/scenarios/{id}/submit",
777
+ body=await async_maybe_transform(
778
+ {
779
+ "conversation_history": conversation_history,
780
+ "final_answer": final_answer,
781
+ },
782
+ scenario_submit_answer_params.ScenarioSubmitAnswerParams,
783
+ ),
548
784
  options=make_request_options(
549
785
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
550
786
  ),
@@ -574,8 +810,8 @@ class ScenariosResourceWithRawResponse:
574
810
  self.get_stats = to_raw_response_wrapper(
575
811
  scenarios.get_stats,
576
812
  )
577
- self.submit = to_raw_response_wrapper(
578
- scenarios.submit,
813
+ self.submit_answer = to_raw_response_wrapper(
814
+ scenarios.submit_answer,
579
815
  )
580
816
 
581
817
  @cached_property
@@ -613,8 +849,8 @@ class AsyncScenariosResourceWithRawResponse:
613
849
  self.get_stats = async_to_raw_response_wrapper(
614
850
  scenarios.get_stats,
615
851
  )
616
- self.submit = async_to_raw_response_wrapper(
617
- scenarios.submit,
852
+ self.submit_answer = async_to_raw_response_wrapper(
853
+ scenarios.submit_answer,
618
854
  )
619
855
 
620
856
  @cached_property
@@ -652,8 +888,8 @@ class ScenariosResourceWithStreamingResponse:
652
888
  self.get_stats = to_streamed_response_wrapper(
653
889
  scenarios.get_stats,
654
890
  )
655
- self.submit = to_streamed_response_wrapper(
656
- scenarios.submit,
891
+ self.submit_answer = to_streamed_response_wrapper(
892
+ scenarios.submit_answer,
657
893
  )
658
894
 
659
895
  @cached_property
@@ -691,8 +927,8 @@ class AsyncScenariosResourceWithStreamingResponse:
691
927
  self.get_stats = async_to_streamed_response_wrapper(
692
928
  scenarios.get_stats,
693
929
  )
694
- self.submit = async_to_streamed_response_wrapper(
695
- scenarios.submit,
930
+ self.submit_answer = async_to_streamed_response_wrapper(
931
+ scenarios.submit_answer,
696
932
  )
697
933
 
698
934
  @cached_property
@@ -38,9 +38,8 @@ class UserResource(SyncAPIResource):
38
38
  """
39
39
  return UserResourceWithStreamingResponse(self)
40
40
 
41
- def retrieve(
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
- f"/api/v1/scenarios/{id}/submissions/user",
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 list(
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 retrieve(
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
- f"/api/v1/scenarios/{id}/submissions/user",
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 list(
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.retrieve = to_raw_response_wrapper(
170
- user.retrieve,
169
+ self.get_all = to_raw_response_wrapper(
170
+ user.get_all,
171
171
  )
172
- self.list = to_raw_response_wrapper(
173
- user.list,
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.retrieve = async_to_raw_response_wrapper(
182
- user.retrieve,
181
+ self.get_all = async_to_raw_response_wrapper(
182
+ user.get_all,
183
183
  )
184
- self.list = async_to_raw_response_wrapper(
185
- user.list,
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.retrieve = to_streamed_response_wrapper(
194
- user.retrieve,
193
+ self.get_all = to_streamed_response_wrapper(
194
+ user.get_all,
195
195
  )
196
- self.list = to_streamed_response_wrapper(
197
- user.list,
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.retrieve = async_to_streamed_response_wrapper(
206
- user.retrieve,
205
+ self.get_all = async_to_streamed_response_wrapper(
206
+ user.get_all,
207
207
  )
208
- self.list = async_to_streamed_response_wrapper(
209
- user.list,
208
+ self.get_by_scenario = async_to_streamed_response_wrapper(
209
+ user.get_by_scenario,
210
210
  )