studyfetch-sdk 0.1.0a17__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 (58) 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/bulk.py +60 -7
  11. studyfetch_sdk/resources/v1/materials/materials.py +250 -57
  12. studyfetch_sdk/resources/v1/materials/test.py +29 -25
  13. studyfetch_sdk/resources/v1/materials/upload.py +402 -14
  14. studyfetch_sdk/resources/v1/usage/analyst.py +143 -15
  15. studyfetch_sdk/resources/v1/v1.py +98 -0
  16. studyfetch_sdk/types/v1/__init__.py +12 -0
  17. studyfetch_sdk/types/v1/assignment_grader_response.py +20 -1
  18. studyfetch_sdk/types/v1/component.py +9 -1
  19. studyfetch_sdk/types/v1/component_create_params.py +57 -1
  20. studyfetch_sdk/types/v1/component_list_params.py +9 -1
  21. studyfetch_sdk/types/v1/content_param.py +23 -0
  22. studyfetch_sdk/types/v1/data_analyst/__init__.py +5 -0
  23. studyfetch_sdk/types/v1/data_analyst/session_retrieve_params.py +11 -0
  24. studyfetch_sdk/types/v1/data_analyst_retrieve_session_params.py +13 -0
  25. studyfetch_sdk/types/v1/data_analyst_send_message_params.py +54 -0
  26. studyfetch_sdk/types/v1/data_analyst_stream_params.py +28 -0
  27. studyfetch_sdk/types/v1/material_batch_create_params.py +29 -0
  28. studyfetch_sdk/types/v1/material_batch_create_response.py +27 -0
  29. studyfetch_sdk/types/v1/material_create_and_process_params.py +27 -0
  30. studyfetch_sdk/types/v1/material_create_params.py +4 -17
  31. studyfetch_sdk/types/v1/material_debug_response.py +47 -0
  32. studyfetch_sdk/types/v1/material_get_download_url_params.py +3 -2
  33. studyfetch_sdk/types/v1/material_get_download_url_response.py +12 -0
  34. studyfetch_sdk/types/v1/material_move_params.py +15 -0
  35. studyfetch_sdk/types/v1/material_rename_params.py +12 -0
  36. studyfetch_sdk/types/v1/material_search_params.py +3 -6
  37. studyfetch_sdk/types/v1/material_search_response.py +54 -0
  38. studyfetch_sdk/types/v1/materials/__init__.py +11 -0
  39. studyfetch_sdk/types/v1/materials/bulk_move_params.py +18 -0
  40. studyfetch_sdk/types/v1/materials/bulk_move_response.py +15 -0
  41. studyfetch_sdk/types/v1/materials/test_perform_ocr_response.py +19 -0
  42. studyfetch_sdk/types/v1/materials/test_process_epub_response.py +30 -0
  43. studyfetch_sdk/types/v1/materials/test_process_image_response.py +30 -0
  44. studyfetch_sdk/types/v1/materials/test_process_video_response.py +25 -0
  45. studyfetch_sdk/types/v1/materials/upload_complete_upload_params.py +20 -0
  46. studyfetch_sdk/types/v1/materials/upload_create_presigned_url_params.py +23 -0
  47. studyfetch_sdk/types/v1/materials/upload_create_presigned_url_response.py +18 -0
  48. studyfetch_sdk/types/v1/materials/upload_upload_file_and_process_params.py +26 -0
  49. studyfetch_sdk/types/v1/materials/upload_upload_url_and_process_params.py +26 -0
  50. studyfetch_sdk/types/v1/usage/__init__.py +3 -0
  51. studyfetch_sdk/types/v1/usage/analyst_get_test_questions_params.py +18 -0
  52. studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_params.py +18 -0
  53. studyfetch_sdk/types/v1/usage/analyst_list_chat_messages_response.py +35 -0
  54. studyfetch_sdk/types/v1/usage/analyst_list_events_params.py +7 -0
  55. {studyfetch_sdk-0.1.0a17.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/METADATA +1 -1
  56. {studyfetch_sdk-0.1.0a17.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/RECORD +58 -26
  57. {studyfetch_sdk-0.1.0a17.dist-info → studyfetch_sdk-0.1.0a19.dist-info}/WHEEL +0 -0
  58. {studyfetch_sdk-0.1.0a17.dist-info → studyfetch_sdk-0.1.0a19.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 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
  ),
@@ -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,6 +12,7 @@ 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
17
  from .chat.chat import (
15
18
  ChatResource,
@@ -44,6 +47,12 @@ from .flashcards import (
44
47
  AsyncFlashcardsResourceWithStreamingResponse,
45
48
  )
46
49
  from ..._resource import SyncAPIResource, AsyncAPIResource
50
+ from ..._response import (
51
+ to_raw_response_wrapper,
52
+ to_streamed_response_wrapper,
53
+ async_to_raw_response_wrapper,
54
+ async_to_streamed_response_wrapper,
55
+ )
47
56
  from .embed.embed import (
48
57
  EmbedResource,
49
58
  AsyncEmbedResource,
@@ -76,6 +85,7 @@ from .upload.upload import (
76
85
  UploadResourceWithStreamingResponse,
77
86
  AsyncUploadResourceWithStreamingResponse,
78
87
  )
88
+ from ..._base_client import make_request_options
79
89
  from .assignment_grader import (
80
90
  AssignmentGraderResource,
81
91
  AsyncAssignmentGraderResource,
@@ -108,6 +118,14 @@ from .audio_recaps.audio_recaps import (
108
118
  AudioRecapsResourceWithStreamingResponse,
109
119
  AsyncAudioRecapsResourceWithStreamingResponse,
110
120
  )
121
+ from .data_analyst.data_analyst import (
122
+ DataAnalystResource,
123
+ AsyncDataAnalystResource,
124
+ DataAnalystResourceWithRawResponse,
125
+ AsyncDataAnalystResourceWithRawResponse,
126
+ DataAnalystResourceWithStreamingResponse,
127
+ AsyncDataAnalystResourceWithStreamingResponse,
128
+ )
111
129
 
112
130
  __all__ = ["V1Resource", "AsyncV1Resource"]
113
131
 
@@ -165,6 +183,10 @@ class V1Resource(SyncAPIResource):
165
183
  def assignment_grader(self) -> AssignmentGraderResource:
166
184
  return AssignmentGraderResource(self._client)
167
185
 
186
+ @cached_property
187
+ def data_analyst(self) -> DataAnalystResource:
188
+ return DataAnalystResource(self._client)
189
+
168
190
  @cached_property
169
191
  def with_raw_response(self) -> V1ResourceWithRawResponse:
170
192
  """
@@ -184,6 +206,26 @@ class V1Resource(SyncAPIResource):
184
206
  """
185
207
  return V1ResourceWithStreamingResponse(self)
186
208
 
209
+ def test_mongodb(
210
+ self,
211
+ *,
212
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
213
+ # The extra values given here take precedence over values defined on the client or passed to this method.
214
+ extra_headers: Headers | None = None,
215
+ extra_query: Query | None = None,
216
+ extra_body: Body | None = None,
217
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
218
+ ) -> None:
219
+ """Test MongoDB connection and get outbound IP"""
220
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
221
+ return self._get(
222
+ "/api/v1/test-mongodb",
223
+ options=make_request_options(
224
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
225
+ ),
226
+ cast_to=NoneType,
227
+ )
228
+
187
229
 
188
230
  class AsyncV1Resource(AsyncAPIResource):
189
231
  @cached_property
@@ -238,6 +280,10 @@ class AsyncV1Resource(AsyncAPIResource):
238
280
  def assignment_grader(self) -> AsyncAssignmentGraderResource:
239
281
  return AsyncAssignmentGraderResource(self._client)
240
282
 
283
+ @cached_property
284
+ def data_analyst(self) -> AsyncDataAnalystResource:
285
+ return AsyncDataAnalystResource(self._client)
286
+
241
287
  @cached_property
242
288
  def with_raw_response(self) -> AsyncV1ResourceWithRawResponse:
243
289
  """
@@ -257,11 +303,35 @@ class AsyncV1Resource(AsyncAPIResource):
257
303
  """
258
304
  return AsyncV1ResourceWithStreamingResponse(self)
259
305
 
306
+ async def test_mongodb(
307
+ self,
308
+ *,
309
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
310
+ # The extra values given here take precedence over values defined on the client or passed to this method.
311
+ extra_headers: Headers | None = None,
312
+ extra_query: Query | None = None,
313
+ extra_body: Body | None = None,
314
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
315
+ ) -> None:
316
+ """Test MongoDB connection and get outbound IP"""
317
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
318
+ return await self._get(
319
+ "/api/v1/test-mongodb",
320
+ options=make_request_options(
321
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
322
+ ),
323
+ cast_to=NoneType,
324
+ )
325
+
260
326
 
261
327
  class V1ResourceWithRawResponse:
262
328
  def __init__(self, v1: V1Resource) -> None:
263
329
  self._v1 = v1
264
330
 
331
+ self.test_mongodb = to_raw_response_wrapper(
332
+ v1.test_mongodb,
333
+ )
334
+
265
335
  @cached_property
266
336
  def materials(self) -> MaterialsResourceWithRawResponse:
267
337
  return MaterialsResourceWithRawResponse(self._v1.materials)
@@ -314,11 +384,19 @@ class V1ResourceWithRawResponse:
314
384
  def assignment_grader(self) -> AssignmentGraderResourceWithRawResponse:
315
385
  return AssignmentGraderResourceWithRawResponse(self._v1.assignment_grader)
316
386
 
387
+ @cached_property
388
+ def data_analyst(self) -> DataAnalystResourceWithRawResponse:
389
+ return DataAnalystResourceWithRawResponse(self._v1.data_analyst)
390
+
317
391
 
318
392
  class AsyncV1ResourceWithRawResponse:
319
393
  def __init__(self, v1: AsyncV1Resource) -> None:
320
394
  self._v1 = v1
321
395
 
396
+ self.test_mongodb = async_to_raw_response_wrapper(
397
+ v1.test_mongodb,
398
+ )
399
+
322
400
  @cached_property
323
401
  def materials(self) -> AsyncMaterialsResourceWithRawResponse:
324
402
  return AsyncMaterialsResourceWithRawResponse(self._v1.materials)
@@ -371,11 +449,19 @@ class AsyncV1ResourceWithRawResponse:
371
449
  def assignment_grader(self) -> AsyncAssignmentGraderResourceWithRawResponse:
372
450
  return AsyncAssignmentGraderResourceWithRawResponse(self._v1.assignment_grader)
373
451
 
452
+ @cached_property
453
+ def data_analyst(self) -> AsyncDataAnalystResourceWithRawResponse:
454
+ return AsyncDataAnalystResourceWithRawResponse(self._v1.data_analyst)
455
+
374
456
 
375
457
  class V1ResourceWithStreamingResponse:
376
458
  def __init__(self, v1: V1Resource) -> None:
377
459
  self._v1 = v1
378
460
 
461
+ self.test_mongodb = to_streamed_response_wrapper(
462
+ v1.test_mongodb,
463
+ )
464
+
379
465
  @cached_property
380
466
  def materials(self) -> MaterialsResourceWithStreamingResponse:
381
467
  return MaterialsResourceWithStreamingResponse(self._v1.materials)
@@ -428,11 +514,19 @@ class V1ResourceWithStreamingResponse:
428
514
  def assignment_grader(self) -> AssignmentGraderResourceWithStreamingResponse:
429
515
  return AssignmentGraderResourceWithStreamingResponse(self._v1.assignment_grader)
430
516
 
517
+ @cached_property
518
+ def data_analyst(self) -> DataAnalystResourceWithStreamingResponse:
519
+ return DataAnalystResourceWithStreamingResponse(self._v1.data_analyst)
520
+
431
521
 
432
522
  class AsyncV1ResourceWithStreamingResponse:
433
523
  def __init__(self, v1: AsyncV1Resource) -> None:
434
524
  self._v1 = v1
435
525
 
526
+ self.test_mongodb = async_to_streamed_response_wrapper(
527
+ v1.test_mongodb,
528
+ )
529
+
436
530
  @cached_property
437
531
  def materials(self) -> AsyncMaterialsResourceWithStreamingResponse:
438
532
  return AsyncMaterialsResourceWithStreamingResponse(self._v1.materials)
@@ -484,3 +578,7 @@ class AsyncV1ResourceWithStreamingResponse:
484
578
  @cached_property
485
579
  def assignment_grader(self) -> AsyncAssignmentGraderResourceWithStreamingResponse:
486
580
  return AsyncAssignmentGraderResourceWithStreamingResponse(self._v1.assignment_grader)
581
+
582
+ @cached_property
583
+ def data_analyst(self) -> AsyncDataAnalystResourceWithStreamingResponse:
584
+ return AsyncDataAnalystResourceWithStreamingResponse(self._v1.data_analyst)
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from .material import Material as Material
6
6
  from .component import Component as Component
7
+ from .content_param import ContentParam as ContentParam
7
8
  from .chat_stream_params import ChatStreamParams as ChatStreamParams
8
9
  from .folder_list_params import FolderListParams as FolderListParams
9
10
  from .test_create_params import TestCreateParams as TestCreateParams
@@ -13,11 +14,13 @@ from .embed_verify_params import EmbedVerifyParams as EmbedVerifyParams
13
14
  from .folder_create_params import FolderCreateParams as FolderCreateParams
14
15
  from .folder_update_params import FolderUpdateParams as FolderUpdateParams
15
16
  from .material_list_params import MaterialListParams as MaterialListParams
17
+ from .material_move_params import MaterialMoveParams as MaterialMoveParams
16
18
  from .component_list_params import ComponentListParams as ComponentListParams
17
19
  from .flashcard_rate_params import FlashcardRateParams as FlashcardRateParams
18
20
  from .embed_get_theme_params import EmbedGetThemeParams as EmbedGetThemeParams
19
21
  from .material_create_params import MaterialCreateParams as MaterialCreateParams
20
22
  from .material_list_response import MaterialListResponse as MaterialListResponse
23
+ from .material_rename_params import MaterialRenameParams as MaterialRenameParams
21
24
  from .material_search_params import MaterialSearchParams as MaterialSearchParams
22
25
  from .scenario_create_params import ScenarioCreateParams as ScenarioCreateParams
23
26
  from .scenario_update_params import ScenarioUpdateParams as ScenarioUpdateParams
@@ -27,22 +30,31 @@ from .component_create_params import ComponentCreateParams as ComponentCreatePar
27
30
  from .component_list_response import ComponentListResponse as ComponentListResponse
28
31
  from .component_update_params import ComponentUpdateParams as ComponentUpdateParams
29
32
  from .explainer_create_params import ExplainerCreateParams as ExplainerCreateParams
33
+ from .material_debug_response import MaterialDebugResponse as MaterialDebugResponse
30
34
  from .chat_send_message_params import ChatSendMessageParams as ChatSendMessageParams
31
35
  from .flashcard_get_all_params import FlashcardGetAllParams as FlashcardGetAllParams
32
36
  from .flashcard_get_due_params import FlashcardGetDueParams as FlashcardGetDueParams
37
+ from .material_search_response import MaterialSearchResponse as MaterialSearchResponse
33
38
  from .usage_get_summary_params import UsageGetSummaryParams as UsageGetSummaryParams
34
39
  from .usage_list_events_params import UsageListEventsParams as UsageListEventsParams
35
40
  from .test_submit_answer_params import TestSubmitAnswerParams as TestSubmitAnswerParams
36
41
  from .assignment_grader_response import AssignmentGraderResponse as AssignmentGraderResponse
42
+ from .data_analyst_stream_params import DataAnalystStreamParams as DataAnalystStreamParams
37
43
  from .flashcard_get_stats_params import FlashcardGetStatsParams as FlashcardGetStatsParams
38
44
  from .flashcard_get_types_response import FlashcardGetTypesResponse as FlashcardGetTypesResponse
45
+ from .material_batch_create_params import MaterialBatchCreateParams as MaterialBatchCreateParams
39
46
  from .scenario_submit_answer_params import ScenarioSubmitAnswerParams as ScenarioSubmitAnswerParams
40
47
  from .flashcard_batch_process_params import FlashcardBatchProcessParams as FlashcardBatchProcessParams
48
+ from .material_batch_create_response import MaterialBatchCreateResponse as MaterialBatchCreateResponse
41
49
  from .assignment_grader_create_params import AssignmentGraderCreateParams as AssignmentGraderCreateParams
42
50
  from .component_generate_embed_params import ComponentGenerateEmbedParams as ComponentGenerateEmbedParams
43
51
  from .explainer_handle_webhook_params import ExplainerHandleWebhookParams as ExplainerHandleWebhookParams
52
+ from .data_analyst_send_message_params import DataAnalystSendMessageParams as DataAnalystSendMessageParams
44
53
  from .flashcard_batch_process_response import FlashcardBatchProcessResponse as FlashcardBatchProcessResponse
45
54
  from .flashcard_get_algorithm_response import FlashcardGetAlgorithmResponse as FlashcardGetAlgorithmResponse
46
55
  from .material_get_download_url_params import MaterialGetDownloadURLParams as MaterialGetDownloadURLParams
47
56
  from .component_generate_embed_response import ComponentGenerateEmbedResponse as ComponentGenerateEmbedResponse
48
57
  from .assignment_grader_get_all_response import AssignmentGraderGetAllResponse as AssignmentGraderGetAllResponse
58
+ from .material_create_and_process_params import MaterialCreateAndProcessParams as MaterialCreateAndProcessParams
59
+ from .material_get_download_url_response import MaterialGetDownloadURLResponse as MaterialGetDownloadURLResponse
60
+ from .data_analyst_retrieve_session_params import DataAnalystRetrieveSessionParams as DataAnalystRetrieveSessionParams
@@ -1,5 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ from typing import Optional
3
4
  from datetime import datetime
4
5
 
5
6
  from pydantic import Field as FieldInfo
@@ -10,7 +11,10 @@ __all__ = ["AssignmentGraderResponse"]
10
11
 
11
12
 
12
13
  class AssignmentGraderResponse(BaseModel):
13
- id: str
14
+ api_v: float = FieldInfo(alias="__v")
15
+ """Version key"""
16
+
17
+ api_id: str = FieldInfo(alias="_id")
14
18
  """Assignment grader ID"""
15
19
 
16
20
  created_at: datetime = FieldInfo(alias="createdAt")
@@ -19,8 +23,23 @@ class AssignmentGraderResponse(BaseModel):
19
23
  grade: float
20
24
  """Overall grade percentage"""
21
25
 
26
+ organization_id: str = FieldInfo(alias="organizationId")
27
+ """Organization ID"""
28
+
22
29
  rubric: object
23
30
  """Grading results"""
24
31
 
25
32
  title: str
26
33
  """Assignment title"""
34
+
35
+ updated_at: datetime = FieldInfo(alias="updatedAt")
36
+ """Update timestamp"""
37
+
38
+ material_id: Optional[str] = FieldInfo(alias="materialId", default=None)
39
+ """Material ID"""
40
+
41
+ text_to_grade: Optional[str] = FieldInfo(alias="textToGrade", default=None)
42
+ """Text that was graded"""
43
+
44
+ user_id: Optional[str] = FieldInfo(alias="userId", default=None)
45
+ """User ID"""
@@ -34,7 +34,15 @@ class Component(BaseModel):
34
34
  """Component status"""
35
35
 
36
36
  type: Literal[
37
- "chat", "flashcards", "scenarios", "practice_test", "audio_recap", "tutor_me", "explainers", "uploads"
37
+ "chat",
38
+ "data_analyst",
39
+ "flashcards",
40
+ "scenarios",
41
+ "practice_test",
42
+ "audio_recap",
43
+ "tutor_me",
44
+ "explainers",
45
+ "uploads",
38
46
  ]
39
47
  """Component type"""
40
48
 
@@ -11,6 +11,7 @@ __all__ = [
11
11
  "ComponentCreateParams",
12
12
  "Config",
13
13
  "ConfigChatConfigDto",
14
+ "ConfigDataAnalystConfigDto",
14
15
  "ConfigFlashcardsConfigDto",
15
16
  "ConfigScenariosConfigDto",
16
17
  "ConfigScenariosConfigDtoCharacter",
@@ -32,7 +33,17 @@ class ComponentCreateParams(TypedDict, total=False):
32
33
  """Name of the component"""
33
34
 
34
35
  type: Required[
35
- Literal["chat", "flashcards", "scenarios", "practice_test", "audio_recap", "tutor_me", "explainers", "uploads"]
36
+ Literal[
37
+ "chat",
38
+ "data_analyst",
39
+ "flashcards",
40
+ "scenarios",
41
+ "practice_test",
42
+ "audio_recap",
43
+ "tutor_me",
44
+ "explainers",
45
+ "uploads",
46
+ ]
36
47
  ]
37
48
  """Type of component to create"""
38
49
 
@@ -84,6 +95,50 @@ class ConfigChatConfigDto(TypedDict, total=False):
84
95
  """Temperature for response generation"""
85
96
 
86
97
 
98
+ class ConfigDataAnalystConfigDto(TypedDict, total=False):
99
+ model: Required[str]
100
+ """AI model to use"""
101
+
102
+ enable_component_creation: Annotated[bool, PropertyInfo(alias="enableComponentCreation")]
103
+ """Enable component creation"""
104
+
105
+ enable_follow_ups: Annotated[bool, PropertyInfo(alias="enableFollowUps")]
106
+ """Enable follow-up questions"""
107
+
108
+ enable_history: Annotated[bool, PropertyInfo(alias="enableHistory")]
109
+ """Enable conversation history"""
110
+
111
+ enable_rag_search: Annotated[bool, PropertyInfo(alias="enableRAGSearch")]
112
+ """Enable RAG search"""
113
+
114
+ enable_voice: Annotated[bool, PropertyInfo(alias="enableVoice")]
115
+ """Enable voice interactions"""
116
+
117
+ enable_web_search: Annotated[bool, PropertyInfo(alias="enableWebSearch")]
118
+ """Enable web search"""
119
+
120
+ folders: List[str]
121
+ """Folder IDs"""
122
+
123
+ group_ids: Annotated[List[str], PropertyInfo(alias="groupIds")]
124
+ """Group IDs to filter data"""
125
+
126
+ materials: List[str]
127
+ """Material IDs"""
128
+
129
+ max_steps: Annotated[float, PropertyInfo(alias="maxSteps")]
130
+ """Maximum steps for multi-step tool calls"""
131
+
132
+ max_tokens: Annotated[float, PropertyInfo(alias="maxTokens")]
133
+ """Maximum tokens for response"""
134
+
135
+ system_prompt: Annotated[str, PropertyInfo(alias="systemPrompt")]
136
+ """System prompt for the data analyst"""
137
+
138
+ temperature: float
139
+ """Temperature for response generation"""
140
+
141
+
87
142
  class ConfigFlashcardsConfigDto(TypedDict, total=False):
88
143
  card_types: Annotated[List[str], PropertyInfo(alias="cardTypes")]
89
144
  """Types of flashcards"""
@@ -359,6 +414,7 @@ class ConfigTutorMeConfigDto(TypedDict, total=False):
359
414
 
360
415
  Config: TypeAlias = Union[
361
416
  ConfigChatConfigDto,
417
+ ConfigDataAnalystConfigDto,
362
418
  ConfigFlashcardsConfigDto,
363
419
  ConfigScenariosConfigDto,
364
420
  ConfigPracticeTestConfigDto,