studyfetch-sdk 0.1.0a13__py3-none-any.whl → 0.1.0a15__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/components.py +0 -8
- studyfetch_sdk/resources/v1/materials/materials.py +76 -1
- studyfetch_sdk/resources/v1/upload/component.py +195 -7
- studyfetch_sdk/resources/v1/usage/__init__.py +33 -0
- studyfetch_sdk/resources/v1/usage/analyst.py +354 -0
- studyfetch_sdk/resources/v1/{usage.py → usage/usage.py} +39 -7
- studyfetch_sdk/resources/v1/v1.py +8 -8
- studyfetch_sdk/types/v1/__init__.py +1 -0
- studyfetch_sdk/types/v1/component_create_params.py +0 -3
- studyfetch_sdk/types/v1/material_search_params.py +27 -0
- studyfetch_sdk/types/v1/upload/__init__.py +6 -0
- studyfetch_sdk/types/v1/upload/component_complete_upload_params.py +20 -0
- studyfetch_sdk/types/v1/upload/component_get_presigned_url_params.py +23 -0
- studyfetch_sdk/types/v1/upload/component_get_presigned_url_response.py +15 -0
- studyfetch_sdk/types/v1/upload/component_upload_file_params.py +21 -0
- studyfetch_sdk/types/v1/upload/component_upload_url_params.py +23 -0
- studyfetch_sdk/types/v1/usage/__init__.py +5 -0
- studyfetch_sdk/types/v1/usage/analyst_list_events_params.py +49 -0
- {studyfetch_sdk-0.1.0a13.dist-info → studyfetch_sdk-0.1.0a15.dist-info}/METADATA +1 -1
- {studyfetch_sdk-0.1.0a13.dist-info → studyfetch_sdk-0.1.0a15.dist-info}/RECORD +23 -13
- {studyfetch_sdk-0.1.0a13.dist-info → studyfetch_sdk-0.1.0a15.dist-info}/WHEEL +0 -0
- {studyfetch_sdk-0.1.0a13.dist-info → studyfetch_sdk-0.1.0a15.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,354 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Literal
|
6
|
+
|
7
|
+
import httpx
|
8
|
+
|
9
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
10
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
11
|
+
from ...._compat import cached_property
|
12
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
13
|
+
from ...._response import (
|
14
|
+
to_raw_response_wrapper,
|
15
|
+
to_streamed_response_wrapper,
|
16
|
+
async_to_raw_response_wrapper,
|
17
|
+
async_to_streamed_response_wrapper,
|
18
|
+
)
|
19
|
+
from ...._base_client import make_request_options
|
20
|
+
from ....types.v1.usage import analyst_list_events_params
|
21
|
+
|
22
|
+
__all__ = ["AnalystResource", "AsyncAnalystResource"]
|
23
|
+
|
24
|
+
|
25
|
+
class AnalystResource(SyncAPIResource):
|
26
|
+
@cached_property
|
27
|
+
def with_raw_response(self) -> AnalystResourceWithRawResponse:
|
28
|
+
"""
|
29
|
+
This property can be used as a prefix for any HTTP method call to return
|
30
|
+
the raw response object instead of the parsed content.
|
31
|
+
|
32
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
33
|
+
"""
|
34
|
+
return AnalystResourceWithRawResponse(self)
|
35
|
+
|
36
|
+
@cached_property
|
37
|
+
def with_streaming_response(self) -> AnalystResourceWithStreamingResponse:
|
38
|
+
"""
|
39
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
40
|
+
|
41
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
42
|
+
"""
|
43
|
+
return AnalystResourceWithStreamingResponse(self)
|
44
|
+
|
45
|
+
def get_test_questions(
|
46
|
+
self,
|
47
|
+
*,
|
48
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
49
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
50
|
+
extra_headers: Headers | None = None,
|
51
|
+
extra_query: Query | None = None,
|
52
|
+
extra_body: Body | None = None,
|
53
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
54
|
+
) -> None:
|
55
|
+
"""Get test results for users and groups in JWT"""
|
56
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
57
|
+
return self._get(
|
58
|
+
"/api/v1/usage-analyst/test-questions",
|
59
|
+
options=make_request_options(
|
60
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
61
|
+
),
|
62
|
+
cast_to=NoneType,
|
63
|
+
)
|
64
|
+
|
65
|
+
def list_chat_messages(
|
66
|
+
self,
|
67
|
+
*,
|
68
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
69
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
70
|
+
extra_headers: Headers | None = None,
|
71
|
+
extra_query: Query | None = None,
|
72
|
+
extra_body: Body | None = None,
|
73
|
+
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 {})}
|
77
|
+
return self._get(
|
78
|
+
"/api/v1/usage-analyst/chat-messages",
|
79
|
+
options=make_request_options(
|
80
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
81
|
+
),
|
82
|
+
cast_to=NoneType,
|
83
|
+
)
|
84
|
+
|
85
|
+
def list_events(
|
86
|
+
self,
|
87
|
+
*,
|
88
|
+
end_date: str,
|
89
|
+
event_type: Literal[
|
90
|
+
"material_created",
|
91
|
+
"material_uploaded",
|
92
|
+
"material_processed",
|
93
|
+
"material_deleted",
|
94
|
+
"component_created",
|
95
|
+
"component_accessed",
|
96
|
+
"component_deleted",
|
97
|
+
"component_usage",
|
98
|
+
"chat_message_sent",
|
99
|
+
"chat_session_started",
|
100
|
+
"chat_session_ended",
|
101
|
+
"test_created",
|
102
|
+
"test_started",
|
103
|
+
"test_completed",
|
104
|
+
"test_question_answered",
|
105
|
+
"test_retaken",
|
106
|
+
"audio_recap_create",
|
107
|
+
"assignment_grader_create",
|
108
|
+
"api_call",
|
109
|
+
"cache_hit",
|
110
|
+
"sso_login",
|
111
|
+
"sso_logout",
|
112
|
+
"student_performance",
|
113
|
+
],
|
114
|
+
start_date: str,
|
115
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
116
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
117
|
+
extra_headers: Headers | None = None,
|
118
|
+
extra_query: Query | None = None,
|
119
|
+
extra_body: Body | None = None,
|
120
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
121
|
+
) -> None:
|
122
|
+
"""
|
123
|
+
Get all events based on filters
|
124
|
+
|
125
|
+
Args:
|
126
|
+
end_date: End date for filtering (ISO 8601)
|
127
|
+
|
128
|
+
event_type: Type of usage event to filter
|
129
|
+
|
130
|
+
start_date: Start date for filtering (ISO 8601)
|
131
|
+
|
132
|
+
extra_headers: Send extra headers
|
133
|
+
|
134
|
+
extra_query: Add additional query parameters to the request
|
135
|
+
|
136
|
+
extra_body: Add additional JSON properties to the request
|
137
|
+
|
138
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
139
|
+
"""
|
140
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
141
|
+
return self._get(
|
142
|
+
"/api/v1/usage-analyst/events",
|
143
|
+
options=make_request_options(
|
144
|
+
extra_headers=extra_headers,
|
145
|
+
extra_query=extra_query,
|
146
|
+
extra_body=extra_body,
|
147
|
+
timeout=timeout,
|
148
|
+
query=maybe_transform(
|
149
|
+
{
|
150
|
+
"end_date": end_date,
|
151
|
+
"event_type": event_type,
|
152
|
+
"start_date": start_date,
|
153
|
+
},
|
154
|
+
analyst_list_events_params.AnalystListEventsParams,
|
155
|
+
),
|
156
|
+
),
|
157
|
+
cast_to=NoneType,
|
158
|
+
)
|
159
|
+
|
160
|
+
|
161
|
+
class AsyncAnalystResource(AsyncAPIResource):
|
162
|
+
@cached_property
|
163
|
+
def with_raw_response(self) -> AsyncAnalystResourceWithRawResponse:
|
164
|
+
"""
|
165
|
+
This property can be used as a prefix for any HTTP method call to return
|
166
|
+
the raw response object instead of the parsed content.
|
167
|
+
|
168
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#accessing-raw-response-data-eg-headers
|
169
|
+
"""
|
170
|
+
return AsyncAnalystResourceWithRawResponse(self)
|
171
|
+
|
172
|
+
@cached_property
|
173
|
+
def with_streaming_response(self) -> AsyncAnalystResourceWithStreamingResponse:
|
174
|
+
"""
|
175
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
176
|
+
|
177
|
+
For more information, see https://www.github.com/GoStudyFetchGo/studyfetch-sdk-python#with_streaming_response
|
178
|
+
"""
|
179
|
+
return AsyncAnalystResourceWithStreamingResponse(self)
|
180
|
+
|
181
|
+
async def get_test_questions(
|
182
|
+
self,
|
183
|
+
*,
|
184
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
185
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
186
|
+
extra_headers: Headers | None = None,
|
187
|
+
extra_query: Query | None = None,
|
188
|
+
extra_body: Body | None = None,
|
189
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
190
|
+
) -> None:
|
191
|
+
"""Get test results for users and groups in JWT"""
|
192
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
193
|
+
return await self._get(
|
194
|
+
"/api/v1/usage-analyst/test-questions",
|
195
|
+
options=make_request_options(
|
196
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
197
|
+
),
|
198
|
+
cast_to=NoneType,
|
199
|
+
)
|
200
|
+
|
201
|
+
async def list_chat_messages(
|
202
|
+
self,
|
203
|
+
*,
|
204
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
205
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
206
|
+
extra_headers: Headers | None = None,
|
207
|
+
extra_query: Query | None = None,
|
208
|
+
extra_body: Body | None = None,
|
209
|
+
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 {})}
|
213
|
+
return await self._get(
|
214
|
+
"/api/v1/usage-analyst/chat-messages",
|
215
|
+
options=make_request_options(
|
216
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
217
|
+
),
|
218
|
+
cast_to=NoneType,
|
219
|
+
)
|
220
|
+
|
221
|
+
async def list_events(
|
222
|
+
self,
|
223
|
+
*,
|
224
|
+
end_date: str,
|
225
|
+
event_type: Literal[
|
226
|
+
"material_created",
|
227
|
+
"material_uploaded",
|
228
|
+
"material_processed",
|
229
|
+
"material_deleted",
|
230
|
+
"component_created",
|
231
|
+
"component_accessed",
|
232
|
+
"component_deleted",
|
233
|
+
"component_usage",
|
234
|
+
"chat_message_sent",
|
235
|
+
"chat_session_started",
|
236
|
+
"chat_session_ended",
|
237
|
+
"test_created",
|
238
|
+
"test_started",
|
239
|
+
"test_completed",
|
240
|
+
"test_question_answered",
|
241
|
+
"test_retaken",
|
242
|
+
"audio_recap_create",
|
243
|
+
"assignment_grader_create",
|
244
|
+
"api_call",
|
245
|
+
"cache_hit",
|
246
|
+
"sso_login",
|
247
|
+
"sso_logout",
|
248
|
+
"student_performance",
|
249
|
+
],
|
250
|
+
start_date: str,
|
251
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
252
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
253
|
+
extra_headers: Headers | None = None,
|
254
|
+
extra_query: Query | None = None,
|
255
|
+
extra_body: Body | None = None,
|
256
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
257
|
+
) -> None:
|
258
|
+
"""
|
259
|
+
Get all events based on filters
|
260
|
+
|
261
|
+
Args:
|
262
|
+
end_date: End date for filtering (ISO 8601)
|
263
|
+
|
264
|
+
event_type: Type of usage event to filter
|
265
|
+
|
266
|
+
start_date: Start date for filtering (ISO 8601)
|
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
|
+
"""
|
276
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
277
|
+
return await self._get(
|
278
|
+
"/api/v1/usage-analyst/events",
|
279
|
+
options=make_request_options(
|
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
|
+
"end_date": end_date,
|
287
|
+
"event_type": event_type,
|
288
|
+
"start_date": start_date,
|
289
|
+
},
|
290
|
+
analyst_list_events_params.AnalystListEventsParams,
|
291
|
+
),
|
292
|
+
),
|
293
|
+
cast_to=NoneType,
|
294
|
+
)
|
295
|
+
|
296
|
+
|
297
|
+
class AnalystResourceWithRawResponse:
|
298
|
+
def __init__(self, analyst: AnalystResource) -> None:
|
299
|
+
self._analyst = analyst
|
300
|
+
|
301
|
+
self.get_test_questions = to_raw_response_wrapper(
|
302
|
+
analyst.get_test_questions,
|
303
|
+
)
|
304
|
+
self.list_chat_messages = to_raw_response_wrapper(
|
305
|
+
analyst.list_chat_messages,
|
306
|
+
)
|
307
|
+
self.list_events = to_raw_response_wrapper(
|
308
|
+
analyst.list_events,
|
309
|
+
)
|
310
|
+
|
311
|
+
|
312
|
+
class AsyncAnalystResourceWithRawResponse:
|
313
|
+
def __init__(self, analyst: AsyncAnalystResource) -> None:
|
314
|
+
self._analyst = analyst
|
315
|
+
|
316
|
+
self.get_test_questions = async_to_raw_response_wrapper(
|
317
|
+
analyst.get_test_questions,
|
318
|
+
)
|
319
|
+
self.list_chat_messages = async_to_raw_response_wrapper(
|
320
|
+
analyst.list_chat_messages,
|
321
|
+
)
|
322
|
+
self.list_events = async_to_raw_response_wrapper(
|
323
|
+
analyst.list_events,
|
324
|
+
)
|
325
|
+
|
326
|
+
|
327
|
+
class AnalystResourceWithStreamingResponse:
|
328
|
+
def __init__(self, analyst: AnalystResource) -> None:
|
329
|
+
self._analyst = analyst
|
330
|
+
|
331
|
+
self.get_test_questions = to_streamed_response_wrapper(
|
332
|
+
analyst.get_test_questions,
|
333
|
+
)
|
334
|
+
self.list_chat_messages = to_streamed_response_wrapper(
|
335
|
+
analyst.list_chat_messages,
|
336
|
+
)
|
337
|
+
self.list_events = to_streamed_response_wrapper(
|
338
|
+
analyst.list_events,
|
339
|
+
)
|
340
|
+
|
341
|
+
|
342
|
+
class AsyncAnalystResourceWithStreamingResponse:
|
343
|
+
def __init__(self, analyst: AsyncAnalystResource) -> None:
|
344
|
+
self._analyst = analyst
|
345
|
+
|
346
|
+
self.get_test_questions = async_to_streamed_response_wrapper(
|
347
|
+
analyst.get_test_questions,
|
348
|
+
)
|
349
|
+
self.list_chat_messages = async_to_streamed_response_wrapper(
|
350
|
+
analyst.list_chat_messages,
|
351
|
+
)
|
352
|
+
self.list_events = async_to_streamed_response_wrapper(
|
353
|
+
analyst.list_events,
|
354
|
+
)
|
@@ -6,23 +6,35 @@ from typing_extensions import Literal
|
|
6
6
|
|
7
7
|
import httpx
|
8
8
|
|
9
|
-
from
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
from .analyst import (
|
10
|
+
AnalystResource,
|
11
|
+
AsyncAnalystResource,
|
12
|
+
AnalystResourceWithRawResponse,
|
13
|
+
AsyncAnalystResourceWithRawResponse,
|
14
|
+
AnalystResourceWithStreamingResponse,
|
15
|
+
AsyncAnalystResourceWithStreamingResponse,
|
16
|
+
)
|
17
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
18
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
19
|
+
from ...._compat import cached_property
|
20
|
+
from ....types.v1 import usage_get_stats_params, usage_get_summary_params, usage_list_events_params
|
21
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
22
|
+
from ...._response import (
|
15
23
|
to_raw_response_wrapper,
|
16
24
|
to_streamed_response_wrapper,
|
17
25
|
async_to_raw_response_wrapper,
|
18
26
|
async_to_streamed_response_wrapper,
|
19
27
|
)
|
20
|
-
from
|
28
|
+
from ...._base_client import make_request_options
|
21
29
|
|
22
30
|
__all__ = ["UsageResource", "AsyncUsageResource"]
|
23
31
|
|
24
32
|
|
25
33
|
class UsageResource(SyncAPIResource):
|
34
|
+
@cached_property
|
35
|
+
def analyst(self) -> AnalystResource:
|
36
|
+
return AnalystResource(self._client)
|
37
|
+
|
26
38
|
@cached_property
|
27
39
|
def with_raw_response(self) -> UsageResourceWithRawResponse:
|
28
40
|
"""
|
@@ -250,6 +262,10 @@ class UsageResource(SyncAPIResource):
|
|
250
262
|
|
251
263
|
|
252
264
|
class AsyncUsageResource(AsyncAPIResource):
|
265
|
+
@cached_property
|
266
|
+
def analyst(self) -> AsyncAnalystResource:
|
267
|
+
return AsyncAnalystResource(self._client)
|
268
|
+
|
253
269
|
@cached_property
|
254
270
|
def with_raw_response(self) -> AsyncUsageResourceWithRawResponse:
|
255
271
|
"""
|
@@ -490,6 +506,10 @@ class UsageResourceWithRawResponse:
|
|
490
506
|
usage.list_events,
|
491
507
|
)
|
492
508
|
|
509
|
+
@cached_property
|
510
|
+
def analyst(self) -> AnalystResourceWithRawResponse:
|
511
|
+
return AnalystResourceWithRawResponse(self._usage.analyst)
|
512
|
+
|
493
513
|
|
494
514
|
class AsyncUsageResourceWithRawResponse:
|
495
515
|
def __init__(self, usage: AsyncUsageResource) -> None:
|
@@ -505,6 +525,10 @@ class AsyncUsageResourceWithRawResponse:
|
|
505
525
|
usage.list_events,
|
506
526
|
)
|
507
527
|
|
528
|
+
@cached_property
|
529
|
+
def analyst(self) -> AsyncAnalystResourceWithRawResponse:
|
530
|
+
return AsyncAnalystResourceWithRawResponse(self._usage.analyst)
|
531
|
+
|
508
532
|
|
509
533
|
class UsageResourceWithStreamingResponse:
|
510
534
|
def __init__(self, usage: UsageResource) -> None:
|
@@ -520,6 +544,10 @@ class UsageResourceWithStreamingResponse:
|
|
520
544
|
usage.list_events,
|
521
545
|
)
|
522
546
|
|
547
|
+
@cached_property
|
548
|
+
def analyst(self) -> AnalystResourceWithStreamingResponse:
|
549
|
+
return AnalystResourceWithStreamingResponse(self._usage.analyst)
|
550
|
+
|
523
551
|
|
524
552
|
class AsyncUsageResourceWithStreamingResponse:
|
525
553
|
def __init__(self, usage: AsyncUsageResource) -> None:
|
@@ -534,3 +562,7 @@ class AsyncUsageResourceWithStreamingResponse:
|
|
534
562
|
self.list_events = async_to_streamed_response_wrapper(
|
535
563
|
usage.list_events,
|
536
564
|
)
|
565
|
+
|
566
|
+
@cached_property
|
567
|
+
def analyst(self) -> AsyncAnalystResourceWithStreamingResponse:
|
568
|
+
return AsyncAnalystResourceWithStreamingResponse(self._usage.analyst)
|
@@ -2,14 +2,6 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
|
5
|
-
from .usage import (
|
6
|
-
UsageResource,
|
7
|
-
AsyncUsageResource,
|
8
|
-
UsageResourceWithRawResponse,
|
9
|
-
AsyncUsageResourceWithRawResponse,
|
10
|
-
UsageResourceWithStreamingResponse,
|
11
|
-
AsyncUsageResourceWithStreamingResponse,
|
12
|
-
)
|
13
5
|
from .folders import (
|
14
6
|
FoldersResource,
|
15
7
|
AsyncFoldersResource,
|
@@ -68,6 +60,14 @@ from .tests.tests import (
|
|
68
60
|
TestsResourceWithStreamingResponse,
|
69
61
|
AsyncTestsResourceWithStreamingResponse,
|
70
62
|
)
|
63
|
+
from .usage.usage import (
|
64
|
+
UsageResource,
|
65
|
+
AsyncUsageResource,
|
66
|
+
UsageResourceWithRawResponse,
|
67
|
+
AsyncUsageResourceWithRawResponse,
|
68
|
+
UsageResourceWithStreamingResponse,
|
69
|
+
AsyncUsageResourceWithStreamingResponse,
|
70
|
+
)
|
71
71
|
from .upload.upload import (
|
72
72
|
UploadResource,
|
73
73
|
AsyncUploadResource,
|
@@ -18,6 +18,7 @@ from .flashcard_rate_params import FlashcardRateParams as FlashcardRateParams
|
|
18
18
|
from .embed_get_theme_params import EmbedGetThemeParams as EmbedGetThemeParams
|
19
19
|
from .material_create_params import MaterialCreateParams as MaterialCreateParams
|
20
20
|
from .material_list_response import MaterialListResponse as MaterialListResponse
|
21
|
+
from .material_search_params import MaterialSearchParams as MaterialSearchParams
|
21
22
|
from .scenario_create_params import ScenarioCreateParams as ScenarioCreateParams
|
22
23
|
from .scenario_update_params import ScenarioUpdateParams as ScenarioUpdateParams
|
23
24
|
from .usage_get_stats_params import UsageGetStatsParams as UsageGetStatsParams
|
@@ -31,9 +31,6 @@ class ComponentCreateParams(TypedDict, total=False):
|
|
31
31
|
name: Required[str]
|
32
32
|
"""Name of the component"""
|
33
33
|
|
34
|
-
origin: Required[Literal["chat", "classroom", "upload", "console", "api"]]
|
35
|
-
"""Origin of the component"""
|
36
|
-
|
37
34
|
type: Required[
|
38
35
|
Literal["chat", "flashcards", "scenarios", "practice_test", "audio_recap", "tutor_me", "explainers", "uploads"]
|
39
36
|
]
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import List
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
7
|
+
|
8
|
+
from ..._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["MaterialSearchParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class MaterialSearchParams(TypedDict, total=False):
|
14
|
+
query: Required[str]
|
15
|
+
"""Search query"""
|
16
|
+
|
17
|
+
folder_ids: Annotated[List[str], PropertyInfo(alias="folderIds")]
|
18
|
+
"""
|
19
|
+
Optional: Limit search to materials within specific folders (includes
|
20
|
+
subfolders)
|
21
|
+
"""
|
22
|
+
|
23
|
+
material_ids: Annotated[List[str], PropertyInfo(alias="materialIds")]
|
24
|
+
"""Optional: Limit search to specific material IDs"""
|
25
|
+
|
26
|
+
top_k: Annotated[float, PropertyInfo(alias="topK")]
|
27
|
+
"""Number of results to return (default: 5)"""
|
@@ -1,3 +1,9 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
+
|
5
|
+
from .component_upload_url_params import ComponentUploadURLParams as ComponentUploadURLParams
|
6
|
+
from .component_upload_file_params import ComponentUploadFileParams as ComponentUploadFileParams
|
7
|
+
from .component_complete_upload_params import ComponentCompleteUploadParams as ComponentCompleteUploadParams
|
8
|
+
from .component_get_presigned_url_params import ComponentGetPresignedURLParams as ComponentGetPresignedURLParams
|
9
|
+
from .component_get_presigned_url_response import ComponentGetPresignedURLResponse as ComponentGetPresignedURLResponse
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from ...._utils import PropertyInfo
|
8
|
+
|
9
|
+
__all__ = ["ComponentCompleteUploadParams"]
|
10
|
+
|
11
|
+
|
12
|
+
class ComponentCompleteUploadParams(TypedDict, total=False):
|
13
|
+
material_id: Required[Annotated[str, PropertyInfo(alias="materialId")]]
|
14
|
+
"""The ID of the material that was uploaded"""
|
15
|
+
|
16
|
+
organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]]
|
17
|
+
"""The ID of the organization"""
|
18
|
+
|
19
|
+
s3_key: Required[Annotated[str, PropertyInfo(alias="s3Key")]]
|
20
|
+
"""The S3 key of the uploaded file"""
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from ...._utils import PropertyInfo
|
8
|
+
|
9
|
+
__all__ = ["ComponentGetPresignedURLParams"]
|
10
|
+
|
11
|
+
|
12
|
+
class ComponentGetPresignedURLParams(TypedDict, total=False):
|
13
|
+
content_type: Required[Annotated[str, PropertyInfo(alias="contentType")]]
|
14
|
+
"""The MIME type of the file"""
|
15
|
+
|
16
|
+
filename: Required[str]
|
17
|
+
"""The name of the file to upload"""
|
18
|
+
|
19
|
+
folder_id: Required[Annotated[str, PropertyInfo(alias="folderId")]]
|
20
|
+
"""The ID of the folder to upload to"""
|
21
|
+
|
22
|
+
organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]]
|
23
|
+
"""The ID of the organization"""
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from pydantic import Field as FieldInfo
|
4
|
+
|
5
|
+
from ...._models import BaseModel
|
6
|
+
|
7
|
+
__all__ = ["ComponentGetPresignedURLResponse"]
|
8
|
+
|
9
|
+
|
10
|
+
class ComponentGetPresignedURLResponse(BaseModel):
|
11
|
+
key: str
|
12
|
+
"""The S3 key for the file"""
|
13
|
+
|
14
|
+
upload_url: str = FieldInfo(alias="uploadUrl")
|
15
|
+
"""The presigned URL for uploading"""
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from ...._types import FileTypes
|
8
|
+
from ...._utils import PropertyInfo
|
9
|
+
|
10
|
+
__all__ = ["ComponentUploadFileParams"]
|
11
|
+
|
12
|
+
|
13
|
+
class ComponentUploadFileParams(TypedDict, total=False):
|
14
|
+
file: Required[FileTypes]
|
15
|
+
"""The file to upload"""
|
16
|
+
|
17
|
+
folder_id: Required[Annotated[str, PropertyInfo(alias="folderId")]]
|
18
|
+
"""The ID of the folder to upload to"""
|
19
|
+
|
20
|
+
organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]]
|
21
|
+
"""The ID of the organization"""
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
6
|
+
|
7
|
+
from ...._utils import PropertyInfo
|
8
|
+
|
9
|
+
__all__ = ["ComponentUploadURLParams"]
|
10
|
+
|
11
|
+
|
12
|
+
class ComponentUploadURLParams(TypedDict, total=False):
|
13
|
+
folder_id: Required[Annotated[str, PropertyInfo(alias="folderId")]]
|
14
|
+
"""The ID of the folder to upload to"""
|
15
|
+
|
16
|
+
name: Required[str]
|
17
|
+
"""The name for the uploaded file"""
|
18
|
+
|
19
|
+
organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]]
|
20
|
+
"""The ID of the organization"""
|
21
|
+
|
22
|
+
url: Required[str]
|
23
|
+
"""The URL of the file to upload"""
|