studyfetch-sdk 0.1.0a1__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 (165) hide show
  1. studyfetch_sdk/__init__.py +100 -0
  2. studyfetch_sdk/_base_client.py +1992 -0
  3. studyfetch_sdk/_client.py +403 -0
  4. studyfetch_sdk/_compat.py +219 -0
  5. studyfetch_sdk/_constants.py +14 -0
  6. studyfetch_sdk/_exceptions.py +108 -0
  7. studyfetch_sdk/_files.py +123 -0
  8. studyfetch_sdk/_models.py +808 -0
  9. studyfetch_sdk/_qs.py +150 -0
  10. studyfetch_sdk/_resource.py +43 -0
  11. studyfetch_sdk/_response.py +832 -0
  12. studyfetch_sdk/_streaming.py +333 -0
  13. studyfetch_sdk/_types.py +219 -0
  14. studyfetch_sdk/_utils/__init__.py +57 -0
  15. studyfetch_sdk/_utils/_logs.py +25 -0
  16. studyfetch_sdk/_utils/_proxy.py +65 -0
  17. studyfetch_sdk/_utils/_reflection.py +42 -0
  18. studyfetch_sdk/_utils/_resources_proxy.py +24 -0
  19. studyfetch_sdk/_utils/_streams.py +12 -0
  20. studyfetch_sdk/_utils/_sync.py +86 -0
  21. studyfetch_sdk/_utils/_transform.py +447 -0
  22. studyfetch_sdk/_utils/_typing.py +151 -0
  23. studyfetch_sdk/_utils/_utils.py +422 -0
  24. studyfetch_sdk/_version.py +4 -0
  25. studyfetch_sdk/lib/.keep +4 -0
  26. studyfetch_sdk/py.typed +0 -0
  27. studyfetch_sdk/resources/__init__.py +19 -0
  28. studyfetch_sdk/resources/v1/__init__.py +215 -0
  29. studyfetch_sdk/resources/v1/audio_recaps/__init__.py +33 -0
  30. studyfetch_sdk/resources/v1/audio_recaps/audio_recaps.py +328 -0
  31. studyfetch_sdk/resources/v1/audio_recaps/sections.py +250 -0
  32. studyfetch_sdk/resources/v1/auth/__init__.py +61 -0
  33. studyfetch_sdk/resources/v1/auth/auth.py +620 -0
  34. studyfetch_sdk/resources/v1/auth/login.py +374 -0
  35. studyfetch_sdk/resources/v1/auth/number_2fa.py +457 -0
  36. studyfetch_sdk/resources/v1/auth/organization_invites.py +160 -0
  37. studyfetch_sdk/resources/v1/chat/__init__.py +47 -0
  38. studyfetch_sdk/resources/v1/chat/chat.py +576 -0
  39. studyfetch_sdk/resources/v1/chat/sessions.py +222 -0
  40. studyfetch_sdk/resources/v1/chat/test.py +190 -0
  41. studyfetch_sdk/resources/v1/components.py +943 -0
  42. studyfetch_sdk/resources/v1/embed/__init__.py +33 -0
  43. studyfetch_sdk/resources/v1/embed/component.py +278 -0
  44. studyfetch_sdk/resources/v1/embed/embed.py +346 -0
  45. studyfetch_sdk/resources/v1/explainers.py +216 -0
  46. studyfetch_sdk/resources/v1/flashcards.py +783 -0
  47. studyfetch_sdk/resources/v1/folders.py +744 -0
  48. studyfetch_sdk/resources/v1/materials/__init__.py +61 -0
  49. studyfetch_sdk/resources/v1/materials/bulk.py +134 -0
  50. studyfetch_sdk/resources/v1/materials/materials.py +1029 -0
  51. studyfetch_sdk/resources/v1/materials/test.py +290 -0
  52. studyfetch_sdk/resources/v1/materials/upload.py +410 -0
  53. studyfetch_sdk/resources/v1/organizations/__init__.py +103 -0
  54. studyfetch_sdk/resources/v1/organizations/api_keys.py +260 -0
  55. studyfetch_sdk/resources/v1/organizations/logo/__init__.py +33 -0
  56. studyfetch_sdk/resources/v1/organizations/logo/logo.py +166 -0
  57. studyfetch_sdk/resources/v1/organizations/logo/upload.py +184 -0
  58. studyfetch_sdk/resources/v1/organizations/organizations.py +428 -0
  59. studyfetch_sdk/resources/v1/organizations/profile/__init__.py +47 -0
  60. studyfetch_sdk/resources/v1/organizations/profile/models.py +134 -0
  61. studyfetch_sdk/resources/v1/organizations/profile/profile.py +248 -0
  62. studyfetch_sdk/resources/v1/organizations/profile/team.py +462 -0
  63. studyfetch_sdk/resources/v1/organizations/team/__init__.py +33 -0
  64. studyfetch_sdk/resources/v1/organizations/team/invite.py +236 -0
  65. studyfetch_sdk/resources/v1/organizations/team/team.py +564 -0
  66. studyfetch_sdk/resources/v1/organizations/theme.py +184 -0
  67. studyfetch_sdk/resources/v1/organizations/usage.py +160 -0
  68. studyfetch_sdk/resources/v1/scenarios/__init__.py +61 -0
  69. studyfetch_sdk/resources/v1/scenarios/component.py +330 -0
  70. studyfetch_sdk/resources/v1/scenarios/scenarios.py +708 -0
  71. studyfetch_sdk/resources/v1/scenarios/sessions.py +236 -0
  72. studyfetch_sdk/resources/v1/scenarios/submissions/__init__.py +33 -0
  73. studyfetch_sdk/resources/v1/scenarios/submissions/submissions.py +102 -0
  74. studyfetch_sdk/resources/v1/scenarios/submissions/user.py +210 -0
  75. studyfetch_sdk/resources/v1/tests/__init__.py +33 -0
  76. studyfetch_sdk/resources/v1/tests/component.py +160 -0
  77. studyfetch_sdk/resources/v1/tests/tests.py +682 -0
  78. studyfetch_sdk/resources/v1/upload/__init__.py +33 -0
  79. studyfetch_sdk/resources/v1/upload/component.py +388 -0
  80. studyfetch_sdk/resources/v1/upload/upload.py +102 -0
  81. studyfetch_sdk/resources/v1/usage.py +1126 -0
  82. studyfetch_sdk/resources/v1/v1.py +518 -0
  83. studyfetch_sdk/types/__init__.py +3 -0
  84. studyfetch_sdk/types/v1/__init__.py +52 -0
  85. studyfetch_sdk/types/v1/admin/__init__.py +3 -0
  86. studyfetch_sdk/types/v1/admin/organizations/__init__.py +3 -0
  87. studyfetch_sdk/types/v1/admin/organizations/models/__init__.py +3 -0
  88. studyfetch_sdk/types/v1/audio_recaps/__init__.py +3 -0
  89. studyfetch_sdk/types/v1/auth/__init__.py +13 -0
  90. studyfetch_sdk/types/v1/auth/login_authenticate_params.py +15 -0
  91. studyfetch_sdk/types/v1/auth/login_verify_2fa_params.py +15 -0
  92. studyfetch_sdk/types/v1/auth/login_verify_backup_code_params.py +17 -0
  93. studyfetch_sdk/types/v1/auth/number_2fa_disable_params.py +12 -0
  94. studyfetch_sdk/types/v1/auth/number_2fa_enable_params.py +12 -0
  95. studyfetch_sdk/types/v1/auth/number_2fa_regenerate_backup_codes_params.py +12 -0
  96. studyfetch_sdk/types/v1/auth/number_2fa_send_code_params.py +12 -0
  97. studyfetch_sdk/types/v1/auth_register_new_user_params.py +23 -0
  98. studyfetch_sdk/types/v1/auth_request_password_reset_params.py +12 -0
  99. studyfetch_sdk/types/v1/auth_reset_password_params.py +17 -0
  100. studyfetch_sdk/types/v1/chat/__init__.py +5 -0
  101. studyfetch_sdk/types/v1/chat/session_retrieve_params.py +11 -0
  102. studyfetch_sdk/types/v1/chat_retrieve_session_params.py +13 -0
  103. studyfetch_sdk/types/v1/chat_send_message_params.py +54 -0
  104. studyfetch_sdk/types/v1/chat_stream_params.py +28 -0
  105. studyfetch_sdk/types/v1/component_create_params.py +29 -0
  106. studyfetch_sdk/types/v1/component_create_response.py +46 -0
  107. studyfetch_sdk/types/v1/component_embed_params.py +99 -0
  108. studyfetch_sdk/types/v1/component_embed_response.py +38 -0
  109. studyfetch_sdk/types/v1/component_list_params.py +14 -0
  110. studyfetch_sdk/types/v1/component_list_response.py +49 -0
  111. studyfetch_sdk/types/v1/component_retrieve_response.py +46 -0
  112. studyfetch_sdk/types/v1/component_update_params.py +12 -0
  113. studyfetch_sdk/types/v1/component_update_response.py +46 -0
  114. studyfetch_sdk/types/v1/embed/__init__.py +6 -0
  115. studyfetch_sdk/types/v1/embed/component_interact_params.py +14 -0
  116. studyfetch_sdk/types/v1/embed/component_retrieve_params.py +12 -0
  117. studyfetch_sdk/types/v1/embed_get_theme_params.py +12 -0
  118. studyfetch_sdk/types/v1/embed_verify_params.py +12 -0
  119. studyfetch_sdk/types/v1/explainer_handle_webhook_params.py +11 -0
  120. studyfetch_sdk/types/v1/flashcard_batch_process_params.py +36 -0
  121. studyfetch_sdk/types/v1/flashcard_batch_process_response.py +39 -0
  122. studyfetch_sdk/types/v1/flashcard_get_algorithm_info_response.py +37 -0
  123. studyfetch_sdk/types/v1/flashcard_get_all_params.py +23 -0
  124. studyfetch_sdk/types/v1/flashcard_get_due_params.py +19 -0
  125. studyfetch_sdk/types/v1/flashcard_get_stats_params.py +17 -0
  126. studyfetch_sdk/types/v1/flashcard_get_types_response.py +14 -0
  127. studyfetch_sdk/types/v1/flashcard_rate_params.py +23 -0
  128. studyfetch_sdk/types/v1/folder_create_params.py +17 -0
  129. studyfetch_sdk/types/v1/folder_list_params.py +14 -0
  130. studyfetch_sdk/types/v1/folder_update_params.py +17 -0
  131. studyfetch_sdk/types/v1/material_create_params.py +34 -0
  132. studyfetch_sdk/types/v1/material_create_response.py +62 -0
  133. studyfetch_sdk/types/v1/material_get_download_url_params.py +13 -0
  134. studyfetch_sdk/types/v1/material_list_params.py +14 -0
  135. studyfetch_sdk/types/v1/material_list_response.py +65 -0
  136. studyfetch_sdk/types/v1/material_retrieve_response.py +62 -0
  137. studyfetch_sdk/types/v1/materials/__init__.py +8 -0
  138. studyfetch_sdk/types/v1/materials/upload_upload_file_params.py +20 -0
  139. studyfetch_sdk/types/v1/materials/upload_upload_file_response.py +62 -0
  140. studyfetch_sdk/types/v1/materials/upload_upload_from_url_params.py +20 -0
  141. studyfetch_sdk/types/v1/materials/upload_upload_from_url_response.py +62 -0
  142. studyfetch_sdk/types/v1/organizations/__init__.py +3 -0
  143. studyfetch_sdk/types/v1/organizations/logo/__init__.py +3 -0
  144. studyfetch_sdk/types/v1/organizations/profile/__init__.py +3 -0
  145. studyfetch_sdk/types/v1/organizations/team/__init__.py +3 -0
  146. studyfetch_sdk/types/v1/scenario_create_params.py +11 -0
  147. studyfetch_sdk/types/v1/scenario_update_params.py +11 -0
  148. studyfetch_sdk/types/v1/scenarios/__init__.py +5 -0
  149. studyfetch_sdk/types/v1/scenarios/component_update_params.py +11 -0
  150. studyfetch_sdk/types/v1/scenarios/submissions/__init__.py +3 -0
  151. studyfetch_sdk/types/v1/test_create_params.py +20 -0
  152. studyfetch_sdk/types/v1/test_retake_params.py +14 -0
  153. studyfetch_sdk/types/v1/test_submit_answer_params.py +20 -0
  154. studyfetch_sdk/types/v1/test_submit_params.py +14 -0
  155. studyfetch_sdk/types/v1/tests/__init__.py +3 -0
  156. studyfetch_sdk/types/v1/upload/__init__.py +3 -0
  157. studyfetch_sdk/types/v1/usage_get_stats_params.py +23 -0
  158. studyfetch_sdk/types/v1/usage_get_summary_params.py +23 -0
  159. studyfetch_sdk/types/v1/usage_list_events_params.py +61 -0
  160. studyfetch_sdk/types/v1/usage_track_chat_params.py +54 -0
  161. studyfetch_sdk/types/v1/usage_track_event_params.py +128 -0
  162. studyfetch_sdk-0.1.0a1.dist-info/METADATA +453 -0
  163. studyfetch_sdk-0.1.0a1.dist-info/RECORD +165 -0
  164. studyfetch_sdk-0.1.0a1.dist-info/WHEEL +4 -0
  165. studyfetch_sdk-0.1.0a1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,62 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from ...._models import BaseModel
10
+
11
+ __all__ = ["UploadUploadFromURLResponse", "Content"]
12
+
13
+
14
+ class Content(BaseModel):
15
+ filename: Optional[str] = None
16
+
17
+ file_size: Optional[float] = FieldInfo(alias="fileSize", default=None)
18
+
19
+ mime_type: Optional[str] = FieldInfo(alias="mimeType", default=None)
20
+
21
+ s3_key: Optional[str] = FieldInfo(alias="s3Key", default=None)
22
+
23
+ s3_url: Optional[str] = FieldInfo(alias="s3Url", default=None)
24
+
25
+ text: Optional[str] = None
26
+
27
+ url: Optional[str] = None
28
+
29
+
30
+ class UploadUploadFromURLResponse(BaseModel):
31
+ api_id: str = FieldInfo(alias="_id")
32
+ """Material ID"""
33
+
34
+ content: Content
35
+ """Material content"""
36
+
37
+ content_type: Literal["text", "pdf", "video", "audio", "image", "epub"] = FieldInfo(alias="contentType")
38
+ """Content type"""
39
+
40
+ created_at: datetime = FieldInfo(alias="createdAt")
41
+ """Creation timestamp"""
42
+
43
+ folder_id: Optional[str] = FieldInfo(alias="folderId", default=None)
44
+ """Folder ID"""
45
+
46
+ name: str
47
+ """Material name"""
48
+
49
+ organization_id: str = FieldInfo(alias="organizationId")
50
+ """Organization ID"""
51
+
52
+ status: Literal["active", "processing", "pending_upload", "error", "deleted"]
53
+ """Material status"""
54
+
55
+ updated_at: datetime = FieldInfo(alias="updatedAt")
56
+ """Last update timestamp"""
57
+
58
+ metadata: Optional[object] = None
59
+ """Material metadata"""
60
+
61
+ usage: Optional[object] = None
62
+ """Usage information"""
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -0,0 +1,11 @@
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, TypedDict
6
+
7
+ __all__ = ["ScenarioCreateParams"]
8
+
9
+
10
+ class ScenarioCreateParams(TypedDict, total=False):
11
+ body: Required[str]
@@ -0,0 +1,11 @@
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, TypedDict
6
+
7
+ __all__ = ["ScenarioUpdateParams"]
8
+
9
+
10
+ class ScenarioUpdateParams(TypedDict, total=False):
11
+ body: Required[str]
@@ -0,0 +1,5 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .component_update_params import ComponentUpdateParams as ComponentUpdateParams
@@ -0,0 +1,11 @@
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, TypedDict
6
+
7
+ __all__ = ["ComponentUpdateParams"]
8
+
9
+
10
+ class ComponentUpdateParams(TypedDict, total=False):
11
+ body: Required[str]
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -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__ = ["TestCreateParams"]
10
+
11
+
12
+ class TestCreateParams(TypedDict, total=False):
13
+ component_id: Required[Annotated[str, PropertyInfo(alias="componentId")]]
14
+ """Component ID"""
15
+
16
+ name: str
17
+ """Test name (optional)"""
18
+
19
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
20
+ """User ID (optional)"""
@@ -0,0 +1,14 @@
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 Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["TestRetakeParams"]
10
+
11
+
12
+ class TestRetakeParams(TypedDict, total=False):
13
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
14
+ """User ID (optional)"""
@@ -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__ = ["TestSubmitAnswerParams"]
10
+
11
+
12
+ class TestSubmitAnswerParams(TypedDict, total=False):
13
+ answer: Required[str]
14
+ """User answer"""
15
+
16
+ question_id: Required[Annotated[str, PropertyInfo(alias="questionId")]]
17
+ """Question ID"""
18
+
19
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
20
+ """User ID (optional)"""
@@ -0,0 +1,14 @@
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 Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["TestSubmitParams"]
10
+
11
+
12
+ class TestSubmitParams(TypedDict, total=False):
13
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
14
+ """User ID (optional)"""
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -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 Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["UsageGetStatsParams"]
10
+
11
+
12
+ class UsageGetStatsParams(TypedDict, total=False):
13
+ end_date: Annotated[str, PropertyInfo(alias="endDate")]
14
+ """End date for stats (ISO 8601)"""
15
+
16
+ group_id: Annotated[str, PropertyInfo(alias="groupId")]
17
+ """Filter by group ID"""
18
+
19
+ start_date: Annotated[str, PropertyInfo(alias="startDate")]
20
+ """Start date for stats (ISO 8601)"""
21
+
22
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
23
+ """Filter by user ID"""
@@ -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 Literal, Required, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["UsageGetSummaryParams"]
10
+
11
+
12
+ class UsageGetSummaryParams(TypedDict, total=False):
13
+ end_date: Required[Annotated[str, PropertyInfo(alias="endDate")]]
14
+ """End date for summary (ISO 8601)"""
15
+
16
+ period: Required[Literal["hourly", "daily", "monthly"]]
17
+ """Summary period"""
18
+
19
+ start_date: Required[Annotated[str, PropertyInfo(alias="startDate")]]
20
+ """Start date for summary (ISO 8601)"""
21
+
22
+ group_by: Annotated[Literal["user", "group", "model", "endpoint"], PropertyInfo(alias="groupBy")]
23
+ """Group results by"""
@@ -0,0 +1,61 @@
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, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["UsageListEventsParams"]
10
+
11
+
12
+ class UsageListEventsParams(TypedDict, total=False):
13
+ end_date: Annotated[str, PropertyInfo(alias="endDate")]
14
+ """End date for filtering (ISO 8601)"""
15
+
16
+ event_type: Annotated[
17
+ Literal[
18
+ "material_created",
19
+ "material_uploaded",
20
+ "material_processed",
21
+ "material_deleted",
22
+ "component_created",
23
+ "component_accessed",
24
+ "component_deleted",
25
+ "component_usage",
26
+ "chat_message_sent",
27
+ "chat_session_started",
28
+ "chat_session_ended",
29
+ "test_created",
30
+ "test_started",
31
+ "test_completed",
32
+ "test_question_answered",
33
+ "test_retaken",
34
+ "audio_recap_create",
35
+ "api_call",
36
+ "cache_hit",
37
+ "sso_login",
38
+ "sso_logout",
39
+ "student_performance",
40
+ ],
41
+ PropertyInfo(alias="eventType"),
42
+ ]
43
+ """Filter by event type"""
44
+
45
+ group_id: Annotated[str, PropertyInfo(alias="groupId")]
46
+ """Filter by group ID"""
47
+
48
+ limit: float
49
+ """Number of results to return"""
50
+
51
+ offset: float
52
+ """Offset for pagination"""
53
+
54
+ resource_id: Annotated[str, PropertyInfo(alias="resourceId")]
55
+ """Filter by resource ID"""
56
+
57
+ start_date: Annotated[str, PropertyInfo(alias="startDate")]
58
+ """Start date for filtering (ISO 8601)"""
59
+
60
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
61
+ """Filter by user ID"""
@@ -0,0 +1,54 @@
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, Required, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["UsageTrackChatParams"]
10
+
11
+
12
+ class UsageTrackChatParams(TypedDict, total=False):
13
+ input_tokens: Required[Annotated[float, PropertyInfo(alias="inputTokens")]]
14
+ """Number of input tokens"""
15
+
16
+ model: Required[
17
+ Literal[
18
+ "openai:gpt-4.1",
19
+ "openai:gpt-4o",
20
+ "openai:gpt-4o-mini",
21
+ "openai:gpt-4",
22
+ "openai:gpt-3.5-turbo",
23
+ "openai:o1",
24
+ "openai:o1-mini",
25
+ "openai:o3-mini",
26
+ "anthropic:claude-3-opus",
27
+ "anthropic:claude-3-sonnet",
28
+ "anthropic:claude-3-haiku",
29
+ "google:gemini-pro",
30
+ "meta:llama-3",
31
+ ]
32
+ ]
33
+ """AI model used"""
34
+
35
+ output_tokens: Required[Annotated[float, PropertyInfo(alias="outputTokens")]]
36
+ """Number of output tokens"""
37
+
38
+ session_id: Required[Annotated[str, PropertyInfo(alias="sessionId")]]
39
+ """Chat session ID"""
40
+
41
+ component_id: Annotated[str, PropertyInfo(alias="componentId")]
42
+ """Component ID"""
43
+
44
+ group_id: Annotated[str, PropertyInfo(alias="groupId")]
45
+ """Group ID"""
46
+
47
+ metadata: object
48
+ """Additional metadata"""
49
+
50
+ reasoning_tokens: Annotated[float, PropertyInfo(alias="reasoningTokens")]
51
+ """Number of reasoning tokens"""
52
+
53
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
54
+ """User ID"""
@@ -0,0 +1,128 @@
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, Required, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["UsageTrackEventParams"]
10
+
11
+
12
+ class UsageTrackEventParams(TypedDict, total=False):
13
+ event_type: Required[
14
+ Annotated[
15
+ Literal[
16
+ "material_created",
17
+ "material_uploaded",
18
+ "material_processed",
19
+ "material_deleted",
20
+ "component_created",
21
+ "component_accessed",
22
+ "component_deleted",
23
+ "component_usage",
24
+ "chat_message_sent",
25
+ "chat_session_started",
26
+ "chat_session_ended",
27
+ "test_created",
28
+ "test_started",
29
+ "test_completed",
30
+ "test_question_answered",
31
+ "test_retaken",
32
+ "audio_recap_create",
33
+ "api_call",
34
+ "cache_hit",
35
+ "sso_login",
36
+ "sso_logout",
37
+ "student_performance",
38
+ ],
39
+ PropertyInfo(alias="eventType"),
40
+ ]
41
+ ]
42
+ """Type of usage event"""
43
+
44
+ cache_hit: Annotated[bool, PropertyInfo(alias="cacheHit")]
45
+ """Whether response was served from cache"""
46
+
47
+ component_name: Annotated[str, PropertyInfo(alias="componentName")]
48
+ """Component name"""
49
+
50
+ component_type: Annotated[str, PropertyInfo(alias="componentType")]
51
+ """Component type"""
52
+
53
+ content_size: Annotated[float, PropertyInfo(alias="contentSize")]
54
+ """Size of content in bytes"""
55
+
56
+ endpoint: str
57
+ """API endpoint accessed"""
58
+
59
+ file_size: Annotated[float, PropertyInfo(alias="fileSize")]
60
+ """File size in bytes"""
61
+
62
+ file_type: Annotated[str, PropertyInfo(alias="fileType")]
63
+ """File MIME type"""
64
+
65
+ group_id: Annotated[str, PropertyInfo(alias="groupId")]
66
+ """Group ID for collaborative sessions"""
67
+
68
+ input_tokens: Annotated[float, PropertyInfo(alias="inputTokens")]
69
+ """Number of input tokens"""
70
+
71
+ ip_address: Annotated[str, PropertyInfo(alias="ipAddress")]
72
+ """Client IP address"""
73
+
74
+ metadata: object
75
+ """Additional metadata"""
76
+
77
+ method: str
78
+ """HTTP method used"""
79
+
80
+ model: Literal[
81
+ "openai:gpt-4.1",
82
+ "openai:gpt-4o",
83
+ "openai:gpt-4o-mini",
84
+ "openai:gpt-4",
85
+ "openai:gpt-3.5-turbo",
86
+ "openai:o1",
87
+ "openai:o1-mini",
88
+ "openai:o3-mini",
89
+ "anthropic:claude-3-opus",
90
+ "anthropic:claude-3-sonnet",
91
+ "anthropic:claude-3-haiku",
92
+ "google:gemini-pro",
93
+ "meta:llama-3",
94
+ ]
95
+ """AI model used"""
96
+
97
+ output_tokens: Annotated[float, PropertyInfo(alias="outputTokens")]
98
+ """Number of output tokens"""
99
+
100
+ performance_data: Annotated[object, PropertyInfo(alias="performanceData")]
101
+ """Performance metrics data"""
102
+
103
+ reasoning_tokens: Annotated[float, PropertyInfo(alias="reasoningTokens")]
104
+ """Number of reasoning tokens"""
105
+
106
+ resource_id: Annotated[str, PropertyInfo(alias="resourceId")]
107
+ """Resource ID being accessed"""
108
+
109
+ resource_type: Annotated[str, PropertyInfo(alias="resourceType")]
110
+ """Type of resource"""
111
+
112
+ response_time: Annotated[float, PropertyInfo(alias="responseTime")]
113
+ """Response time in milliseconds"""
114
+
115
+ session_id: Annotated[str, PropertyInfo(alias="sessionId")]
116
+ """Session ID"""
117
+
118
+ status_code: Annotated[float, PropertyInfo(alias="statusCode")]
119
+ """HTTP status code"""
120
+
121
+ total_tokens: Annotated[float, PropertyInfo(alias="totalTokens")]
122
+ """Total number of tokens"""
123
+
124
+ user_agent: Annotated[str, PropertyInfo(alias="userAgent")]
125
+ """Client user agent"""
126
+
127
+ user_id: Annotated[str, PropertyInfo(alias="userId")]
128
+ """User ID"""