studyfetch-sdk 0.1.0a18__py3-none-any.whl → 0.1.0a19__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 (38) hide show
  1. studyfetch_sdk/_models.py +1 -1
  2. studyfetch_sdk/_version.py +1 -1
  3. studyfetch_sdk/resources/v1/__init__.py +14 -0
  4. studyfetch_sdk/resources/v1/assignment_grader.py +81 -1
  5. studyfetch_sdk/resources/v1/components.py +36 -4
  6. studyfetch_sdk/resources/v1/data_analyst/__init__.py +47 -0
  7. studyfetch_sdk/resources/v1/data_analyst/data_analyst.py +582 -0
  8. studyfetch_sdk/resources/v1/data_analyst/sessions.py +222 -0
  9. studyfetch_sdk/resources/v1/data_analyst/test.py +190 -0
  10. studyfetch_sdk/resources/v1/materials/materials.py +130 -2
  11. studyfetch_sdk/resources/v1/materials/upload.py +262 -0
  12. studyfetch_sdk/resources/v1/usage/analyst.py +143 -15
  13. studyfetch_sdk/resources/v1/v1.py +98 -0
  14. studyfetch_sdk/types/v1/__init__.py +5 -0
  15. studyfetch_sdk/types/v1/assignment_grader_response.py +20 -1
  16. studyfetch_sdk/types/v1/component.py +9 -1
  17. studyfetch_sdk/types/v1/component_create_params.py +57 -1
  18. studyfetch_sdk/types/v1/component_list_params.py +9 -1
  19. studyfetch_sdk/types/v1/content_param.py +23 -0
  20. studyfetch_sdk/types/v1/data_analyst/__init__.py +5 -0
  21. studyfetch_sdk/types/v1/data_analyst/session_retrieve_params.py +11 -0
  22. studyfetch_sdk/types/v1/data_analyst_retrieve_session_params.py +13 -0
  23. studyfetch_sdk/types/v1/data_analyst_send_message_params.py +54 -0
  24. studyfetch_sdk/types/v1/data_analyst_stream_params.py +28 -0
  25. studyfetch_sdk/types/v1/material_create_and_process_params.py +27 -0
  26. studyfetch_sdk/types/v1/material_create_params.py +4 -17
  27. studyfetch_sdk/types/v1/materials/__init__.py +2 -0
  28. studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +26 -0
  29. studyfetch_sdk/types/v1/materials/upload_upload_url_and_process_params.py +26 -0
  30. studyfetch_sdk/types/v1/usage/__init__.py +3 -0
  31. studyfetch_sdk/types/v1/usage/analyst_get_test_questions_params.py +18 -0
  32. studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_params.py +18 -0
  33. studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_response.py +35 -0
  34. studyfetch_sdk/types/v1/usage/analyst_list_events_params.py +7 -0
  35. {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/METADATA +1 -1
  36. {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/RECORD +38 -22
  37. {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/WHEEL +0 -0
  38. {studyfetch_sdk-0.1.0a18.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/licenses/LICENSE +0 -0
@@ -23,6 +23,8 @@ from ....types.v1.materials import (
23
23
  upload_complete_upload_params,
24
24
  upload_upload_from_url_params,
25
25
  upload_create_presigned_url_params,
26
+ upload_upload_url_and_process_params,
27
+ upload_upload_file_and_process_params,
26
28
  )
27
29
  from ....types.v1.materials.upload_create_presigned_url_response import UploadCreatePresignedURLResponse
28
30
 
@@ -198,6 +200,67 @@ class UploadResource(SyncAPIResource):
198
200
  cast_to=Material,
199
201
  )
200
202
 
203
+ def upload_file_and_process(
204
+ self,
205
+ *,
206
+ file: FileTypes,
207
+ name: str,
208
+ folder_id: str | NotGiven = NOT_GIVEN,
209
+ poll_interval_ms: float | NotGiven = NOT_GIVEN,
210
+ timeout_ms: float | NotGiven = NOT_GIVEN,
211
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
212
+ # The extra values given here take precedence over values defined on the client or passed to this method.
213
+ extra_headers: Headers | None = None,
214
+ extra_query: Query | None = None,
215
+ extra_body: Body | None = None,
216
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
217
+ ) -> Material:
218
+ """Uploads a file and waits for processing to finish before returning.
219
+
220
+ Useful for
221
+ synchronous API usage.
222
+
223
+ Args:
224
+ name: Material name
225
+
226
+ folder_id: Folder ID (optional)
227
+
228
+ poll_interval_ms: Polling interval in milliseconds (default: 2000)
229
+
230
+ timeout_ms: Processing timeout in milliseconds (default: 300000)
231
+
232
+ extra_headers: Send extra headers
233
+
234
+ extra_query: Add additional query parameters to the request
235
+
236
+ extra_body: Add additional JSON properties to the request
237
+
238
+ timeout: Override the client-level default timeout for this request, in seconds
239
+ """
240
+ body = deepcopy_minimal(
241
+ {
242
+ "file": file,
243
+ "name": name,
244
+ "folder_id": folder_id,
245
+ "poll_interval_ms": poll_interval_ms,
246
+ "timeout_ms": timeout_ms,
247
+ }
248
+ )
249
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
250
+ # It should be noted that the actual Content-Type header that will be
251
+ # sent to the server will contain a `boundary` parameter, e.g.
252
+ # multipart/form-data; boundary=---abc--
253
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
254
+ return self._post(
255
+ "/api/v1/materials/upload/file-and-process",
256
+ body=maybe_transform(body, upload_upload_file_and_process_params.UploadUploadFileAndProcessParams),
257
+ files=files,
258
+ options=make_request_options(
259
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
260
+ ),
261
+ cast_to=Material,
262
+ )
263
+
201
264
  def upload_from_url(
202
265
  self,
203
266
  *,
@@ -245,6 +308,62 @@ class UploadResource(SyncAPIResource):
245
308
  cast_to=Material,
246
309
  )
247
310
 
311
+ def upload_url_and_process(
312
+ self,
313
+ *,
314
+ name: str,
315
+ url: str,
316
+ folder_id: str | NotGiven = NOT_GIVEN,
317
+ poll_interval_ms: float | NotGiven = NOT_GIVEN,
318
+ timeout_ms: float | NotGiven = NOT_GIVEN,
319
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
320
+ # The extra values given here take precedence over values defined on the client or passed to this method.
321
+ extra_headers: Headers | None = None,
322
+ extra_query: Query | None = None,
323
+ extra_body: Body | None = None,
324
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
325
+ ) -> Material:
326
+ """
327
+ Fetches content from URL and waits for processing to finish before returning.
328
+ Useful for synchronous API usage.
329
+
330
+ Args:
331
+ name: Material name
332
+
333
+ url: URL to fetch content from
334
+
335
+ folder_id: Folder ID (optional)
336
+
337
+ poll_interval_ms: Polling interval in milliseconds (default: 2 seconds)
338
+
339
+ timeout_ms: Maximum time to wait for processing in milliseconds (default: 5 minutes)
340
+
341
+ extra_headers: Send extra headers
342
+
343
+ extra_query: Add additional query parameters to the request
344
+
345
+ extra_body: Add additional JSON properties to the request
346
+
347
+ timeout: Override the client-level default timeout for this request, in seconds
348
+ """
349
+ return self._post(
350
+ "/api/v1/materials/upload/url-and-process",
351
+ body=maybe_transform(
352
+ {
353
+ "name": name,
354
+ "url": url,
355
+ "folder_id": folder_id,
356
+ "poll_interval_ms": poll_interval_ms,
357
+ "timeout_ms": timeout_ms,
358
+ },
359
+ upload_upload_url_and_process_params.UploadUploadURLAndProcessParams,
360
+ ),
361
+ options=make_request_options(
362
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
363
+ ),
364
+ cast_to=Material,
365
+ )
366
+
248
367
 
249
368
  class AsyncUploadResource(AsyncAPIResource):
250
369
  @cached_property
@@ -415,6 +534,69 @@ class AsyncUploadResource(AsyncAPIResource):
415
534
  cast_to=Material,
416
535
  )
417
536
 
537
+ async def upload_file_and_process(
538
+ self,
539
+ *,
540
+ file: FileTypes,
541
+ name: str,
542
+ folder_id: str | NotGiven = NOT_GIVEN,
543
+ poll_interval_ms: float | NotGiven = NOT_GIVEN,
544
+ timeout_ms: float | NotGiven = NOT_GIVEN,
545
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
546
+ # The extra values given here take precedence over values defined on the client or passed to this method.
547
+ extra_headers: Headers | None = None,
548
+ extra_query: Query | None = None,
549
+ extra_body: Body | None = None,
550
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
551
+ ) -> Material:
552
+ """Uploads a file and waits for processing to finish before returning.
553
+
554
+ Useful for
555
+ synchronous API usage.
556
+
557
+ Args:
558
+ name: Material name
559
+
560
+ folder_id: Folder ID (optional)
561
+
562
+ poll_interval_ms: Polling interval in milliseconds (default: 2000)
563
+
564
+ timeout_ms: Processing timeout in milliseconds (default: 300000)
565
+
566
+ extra_headers: Send extra headers
567
+
568
+ extra_query: Add additional query parameters to the request
569
+
570
+ extra_body: Add additional JSON properties to the request
571
+
572
+ timeout: Override the client-level default timeout for this request, in seconds
573
+ """
574
+ body = deepcopy_minimal(
575
+ {
576
+ "file": file,
577
+ "name": name,
578
+ "folder_id": folder_id,
579
+ "poll_interval_ms": poll_interval_ms,
580
+ "timeout_ms": timeout_ms,
581
+ }
582
+ )
583
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
584
+ # It should be noted that the actual Content-Type header that will be
585
+ # sent to the server will contain a `boundary` parameter, e.g.
586
+ # multipart/form-data; boundary=---abc--
587
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
588
+ return await self._post(
589
+ "/api/v1/materials/upload/file-and-process",
590
+ body=await async_maybe_transform(
591
+ body, upload_upload_file_and_process_params.UploadUploadFileAndProcessParams
592
+ ),
593
+ files=files,
594
+ options=make_request_options(
595
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
596
+ ),
597
+ cast_to=Material,
598
+ )
599
+
418
600
  async def upload_from_url(
419
601
  self,
420
602
  *,
@@ -462,6 +644,62 @@ class AsyncUploadResource(AsyncAPIResource):
462
644
  cast_to=Material,
463
645
  )
464
646
 
647
+ async def upload_url_and_process(
648
+ self,
649
+ *,
650
+ name: str,
651
+ url: str,
652
+ folder_id: str | NotGiven = NOT_GIVEN,
653
+ poll_interval_ms: float | NotGiven = NOT_GIVEN,
654
+ timeout_ms: float | NotGiven = NOT_GIVEN,
655
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
656
+ # The extra values given here take precedence over values defined on the client or passed to this method.
657
+ extra_headers: Headers | None = None,
658
+ extra_query: Query | None = None,
659
+ extra_body: Body | None = None,
660
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
661
+ ) -> Material:
662
+ """
663
+ Fetches content from URL and waits for processing to finish before returning.
664
+ Useful for synchronous API usage.
665
+
666
+ Args:
667
+ name: Material name
668
+
669
+ url: URL to fetch content from
670
+
671
+ folder_id: Folder ID (optional)
672
+
673
+ poll_interval_ms: Polling interval in milliseconds (default: 2 seconds)
674
+
675
+ timeout_ms: Maximum time to wait for processing in milliseconds (default: 5 minutes)
676
+
677
+ extra_headers: Send extra headers
678
+
679
+ extra_query: Add additional query parameters to the request
680
+
681
+ extra_body: Add additional JSON properties to the request
682
+
683
+ timeout: Override the client-level default timeout for this request, in seconds
684
+ """
685
+ return await self._post(
686
+ "/api/v1/materials/upload/url-and-process",
687
+ body=await async_maybe_transform(
688
+ {
689
+ "name": name,
690
+ "url": url,
691
+ "folder_id": folder_id,
692
+ "poll_interval_ms": poll_interval_ms,
693
+ "timeout_ms": timeout_ms,
694
+ },
695
+ upload_upload_url_and_process_params.UploadUploadURLAndProcessParams,
696
+ ),
697
+ options=make_request_options(
698
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
699
+ ),
700
+ cast_to=Material,
701
+ )
702
+
465
703
 
466
704
  class UploadResourceWithRawResponse:
467
705
  def __init__(self, upload: UploadResource) -> None:
@@ -476,9 +714,15 @@ class UploadResourceWithRawResponse:
476
714
  self.upload_file = to_raw_response_wrapper(
477
715
  upload.upload_file,
478
716
  )
717
+ self.upload_file_and_process = to_raw_response_wrapper(
718
+ upload.upload_file_and_process,
719
+ )
479
720
  self.upload_from_url = to_raw_response_wrapper(
480
721
  upload.upload_from_url,
481
722
  )
723
+ self.upload_url_and_process = to_raw_response_wrapper(
724
+ upload.upload_url_and_process,
725
+ )
482
726
 
483
727
 
484
728
  class AsyncUploadResourceWithRawResponse:
@@ -494,9 +738,15 @@ class AsyncUploadResourceWithRawResponse:
494
738
  self.upload_file = async_to_raw_response_wrapper(
495
739
  upload.upload_file,
496
740
  )
741
+ self.upload_file_and_process = async_to_raw_response_wrapper(
742
+ upload.upload_file_and_process,
743
+ )
497
744
  self.upload_from_url = async_to_raw_response_wrapper(
498
745
  upload.upload_from_url,
499
746
  )
747
+ self.upload_url_and_process = async_to_raw_response_wrapper(
748
+ upload.upload_url_and_process,
749
+ )
500
750
 
501
751
 
502
752
  class UploadResourceWithStreamingResponse:
@@ -512,9 +762,15 @@ class UploadResourceWithStreamingResponse:
512
762
  self.upload_file = to_streamed_response_wrapper(
513
763
  upload.upload_file,
514
764
  )
765
+ self.upload_file_and_process = to_streamed_response_wrapper(
766
+ upload.upload_file_and_process,
767
+ )
515
768
  self.upload_from_url = to_streamed_response_wrapper(
516
769
  upload.upload_from_url,
517
770
  )
771
+ self.upload_url_and_process = to_streamed_response_wrapper(
772
+ upload.upload_url_and_process,
773
+ )
518
774
 
519
775
 
520
776
  class AsyncUploadResourceWithStreamingResponse:
@@ -530,6 +786,12 @@ class AsyncUploadResourceWithStreamingResponse:
530
786
  self.upload_file = async_to_streamed_response_wrapper(
531
787
  upload.upload_file,
532
788
  )
789
+ self.upload_file_and_process = async_to_streamed_response_wrapper(
790
+ upload.upload_file_and_process,
791
+ )
533
792
  self.upload_from_url = async_to_streamed_response_wrapper(
534
793
  upload.upload_from_url,
535
794
  )
795
+ self.upload_url_and_process = async_to_streamed_response_wrapper(
796
+ upload.upload_url_and_process,
797
+ )
@@ -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 analyst_list_events_params
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
- """Get test results for users and groups in JWT"""
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, extra_query=extra_query, extra_body=extra_body, timeout=timeout
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
- ) -> None:
75
- """Get chat messages for users and groups in JWT"""
76
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
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, extra_query=extra_query, extra_body=extra_body, timeout=timeout
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=NoneType,
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
- """Get test results for users and groups in JWT"""
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, extra_query=extra_query, extra_body=extra_body, timeout=timeout
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
- ) -> None:
211
- """Get chat messages for users and groups in JWT"""
212
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
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, extra_query=extra_query, extra_body=extra_body, timeout=timeout
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=NoneType,
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
  ),