studyfetch-sdk 0.1.0a15__py3-none-any.whl → 0.1.0a16__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.
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "studyfetch_sdk"
4
- __version__ = "0.1.0-alpha.15" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.16" # x-release-please-version
@@ -6,7 +6,7 @@ from typing import Mapping, cast
6
6
 
7
7
  import httpx
8
8
 
9
- from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, FileTypes
9
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
10
10
  from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
11
11
  from ...._compat import cached_property
12
12
  from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -23,6 +23,9 @@ from ....types.v1.upload import (
23
23
  component_complete_upload_params,
24
24
  component_get_presigned_url_params,
25
25
  )
26
+ from ....types.v1.upload.component_upload_url_response import ComponentUploadURLResponse
27
+ from ....types.v1.upload.component_upload_file_response import ComponentUploadFileResponse
28
+ from ....types.v1.upload.component_complete_upload_response import ComponentCompleteUploadResponse
26
29
  from ....types.v1.upload.component_get_presigned_url_response import ComponentGetPresignedURLResponse
27
30
 
28
31
  __all__ = ["ComponentResource", "AsyncComponentResource"]
@@ -61,7 +64,7 @@ class ComponentResource(SyncAPIResource):
61
64
  extra_query: Query | None = None,
62
65
  extra_body: Body | None = None,
63
66
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
64
- ) -> None:
67
+ ) -> ComponentCompleteUploadResponse:
65
68
  """
66
69
  Complete a file upload after using presigned URL
67
70
 
@@ -82,7 +85,6 @@ class ComponentResource(SyncAPIResource):
82
85
  """
83
86
  if not component_id:
84
87
  raise ValueError(f"Expected a non-empty value for `component_id` but received {component_id!r}")
85
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
86
88
  return self._post(
87
89
  f"/api/v1/upload/component/{component_id}/complete",
88
90
  body=maybe_transform(
@@ -96,7 +98,7 @@ class ComponentResource(SyncAPIResource):
96
98
  options=make_request_options(
97
99
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
98
100
  ),
99
- cast_to=NoneType,
101
+ cast_to=ComponentCompleteUploadResponse,
100
102
  )
101
103
 
102
104
  def get_presigned_url(
@@ -166,7 +168,7 @@ class ComponentResource(SyncAPIResource):
166
168
  extra_query: Query | None = None,
167
169
  extra_body: Body | None = None,
168
170
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
169
- ) -> None:
171
+ ) -> ComponentUploadFileResponse:
170
172
  """
171
173
  Upload a file to a component
172
174
 
@@ -187,7 +189,6 @@ class ComponentResource(SyncAPIResource):
187
189
  """
188
190
  if not component_id:
189
191
  raise ValueError(f"Expected a non-empty value for `component_id` but received {component_id!r}")
190
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
191
192
  body = deepcopy_minimal(
192
193
  {
193
194
  "file": file,
@@ -199,7 +200,7 @@ class ComponentResource(SyncAPIResource):
199
200
  # It should be noted that the actual Content-Type header that will be
200
201
  # sent to the server will contain a `boundary` parameter, e.g.
201
202
  # multipart/form-data; boundary=---abc--
202
- extra_headers["Content-Type"] = "multipart/form-data"
203
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
203
204
  return self._post(
204
205
  f"/api/v1/upload/component/{component_id}/file",
205
206
  body=maybe_transform(body, component_upload_file_params.ComponentUploadFileParams),
@@ -207,7 +208,7 @@ class ComponentResource(SyncAPIResource):
207
208
  options=make_request_options(
208
209
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
209
210
  ),
210
- cast_to=NoneType,
211
+ cast_to=ComponentUploadFileResponse,
211
212
  )
212
213
 
213
214
  def upload_url(
@@ -224,7 +225,7 @@ class ComponentResource(SyncAPIResource):
224
225
  extra_query: Query | None = None,
225
226
  extra_body: Body | None = None,
226
227
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
227
- ) -> None:
228
+ ) -> ComponentUploadURLResponse:
228
229
  """
229
230
  Upload a file from URL to a component
230
231
 
@@ -247,7 +248,6 @@ class ComponentResource(SyncAPIResource):
247
248
  """
248
249
  if not component_id:
249
250
  raise ValueError(f"Expected a non-empty value for `component_id` but received {component_id!r}")
250
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
251
251
  return self._post(
252
252
  f"/api/v1/upload/component/{component_id}/url",
253
253
  body=maybe_transform(
@@ -262,7 +262,7 @@ class ComponentResource(SyncAPIResource):
262
262
  options=make_request_options(
263
263
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
264
264
  ),
265
- cast_to=NoneType,
265
+ cast_to=ComponentUploadURLResponse,
266
266
  )
267
267
 
268
268
 
@@ -299,7 +299,7 @@ class AsyncComponentResource(AsyncAPIResource):
299
299
  extra_query: Query | None = None,
300
300
  extra_body: Body | None = None,
301
301
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
302
- ) -> None:
302
+ ) -> ComponentCompleteUploadResponse:
303
303
  """
304
304
  Complete a file upload after using presigned URL
305
305
 
@@ -320,7 +320,6 @@ class AsyncComponentResource(AsyncAPIResource):
320
320
  """
321
321
  if not component_id:
322
322
  raise ValueError(f"Expected a non-empty value for `component_id` but received {component_id!r}")
323
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
324
323
  return await self._post(
325
324
  f"/api/v1/upload/component/{component_id}/complete",
326
325
  body=await async_maybe_transform(
@@ -334,7 +333,7 @@ class AsyncComponentResource(AsyncAPIResource):
334
333
  options=make_request_options(
335
334
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
336
335
  ),
337
- cast_to=NoneType,
336
+ cast_to=ComponentCompleteUploadResponse,
338
337
  )
339
338
 
340
339
  async def get_presigned_url(
@@ -404,7 +403,7 @@ class AsyncComponentResource(AsyncAPIResource):
404
403
  extra_query: Query | None = None,
405
404
  extra_body: Body | None = None,
406
405
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
407
- ) -> None:
406
+ ) -> ComponentUploadFileResponse:
408
407
  """
409
408
  Upload a file to a component
410
409
 
@@ -425,7 +424,6 @@ class AsyncComponentResource(AsyncAPIResource):
425
424
  """
426
425
  if not component_id:
427
426
  raise ValueError(f"Expected a non-empty value for `component_id` but received {component_id!r}")
428
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
429
427
  body = deepcopy_minimal(
430
428
  {
431
429
  "file": file,
@@ -437,7 +435,7 @@ class AsyncComponentResource(AsyncAPIResource):
437
435
  # It should be noted that the actual Content-Type header that will be
438
436
  # sent to the server will contain a `boundary` parameter, e.g.
439
437
  # multipart/form-data; boundary=---abc--
440
- extra_headers["Content-Type"] = "multipart/form-data"
438
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
441
439
  return await self._post(
442
440
  f"/api/v1/upload/component/{component_id}/file",
443
441
  body=await async_maybe_transform(body, component_upload_file_params.ComponentUploadFileParams),
@@ -445,7 +443,7 @@ class AsyncComponentResource(AsyncAPIResource):
445
443
  options=make_request_options(
446
444
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
447
445
  ),
448
- cast_to=NoneType,
446
+ cast_to=ComponentUploadFileResponse,
449
447
  )
450
448
 
451
449
  async def upload_url(
@@ -462,7 +460,7 @@ class AsyncComponentResource(AsyncAPIResource):
462
460
  extra_query: Query | None = None,
463
461
  extra_body: Body | None = None,
464
462
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
465
- ) -> None:
463
+ ) -> ComponentUploadURLResponse:
466
464
  """
467
465
  Upload a file from URL to a component
468
466
 
@@ -485,7 +483,6 @@ class AsyncComponentResource(AsyncAPIResource):
485
483
  """
486
484
  if not component_id:
487
485
  raise ValueError(f"Expected a non-empty value for `component_id` but received {component_id!r}")
488
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
489
486
  return await self._post(
490
487
  f"/api/v1/upload/component/{component_id}/url",
491
488
  body=await async_maybe_transform(
@@ -500,7 +497,7 @@ class AsyncComponentResource(AsyncAPIResource):
500
497
  options=make_request_options(
501
498
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
502
499
  ),
503
- cast_to=NoneType,
500
+ cast_to=ComponentUploadURLResponse,
504
501
  )
505
502
 
506
503
 
@@ -91,9 +91,6 @@ class ConfigFlashcardsConfigDto(TypedDict, total=False):
91
91
  difficulty: Literal["easy", "medium", "hard", "mixed"]
92
92
  """Difficulty level"""
93
93
 
94
- enable_spaced_repetition: Annotated[bool, PropertyInfo(alias="enableSpacedRepetition")]
95
- """Enable spaced repetition"""
96
-
97
94
  folders: List[str]
98
95
  """Folder IDs"""
99
96
 
@@ -4,6 +4,9 @@ from __future__ import annotations
4
4
 
5
5
  from .component_upload_url_params import ComponentUploadURLParams as ComponentUploadURLParams
6
6
  from .component_upload_file_params import ComponentUploadFileParams as ComponentUploadFileParams
7
+ from .component_upload_url_response import ComponentUploadURLResponse as ComponentUploadURLResponse
8
+ from .component_upload_file_response import ComponentUploadFileResponse as ComponentUploadFileResponse
7
9
  from .component_complete_upload_params import ComponentCompleteUploadParams as ComponentCompleteUploadParams
10
+ from .component_complete_upload_response import ComponentCompleteUploadResponse as ComponentCompleteUploadResponse
8
11
  from .component_get_presigned_url_params import ComponentGetPresignedURLParams as ComponentGetPresignedURLParams
9
12
  from .component_get_presigned_url_response import ComponentGetPresignedURLResponse as ComponentGetPresignedURLResponse
@@ -0,0 +1,16 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from ...._models import BaseModel
4
+
5
+ __all__ = ["ComponentCompleteUploadResponse"]
6
+
7
+
8
+ class ComponentCompleteUploadResponse(BaseModel):
9
+ id: str
10
+ """The ID of the uploaded material"""
11
+
12
+ name: str
13
+ """The name of the material"""
14
+
15
+ status: str
16
+ """The status of the material"""
@@ -0,0 +1,24 @@
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__ = ["ComponentUploadFileResponse"]
8
+
9
+
10
+ class ComponentUploadFileResponse(BaseModel):
11
+ id: str
12
+ """The ID of the uploaded material"""
13
+
14
+ content_type: str = FieldInfo(alias="contentType")
15
+ """The content type of the material"""
16
+
17
+ name: str
18
+ """The name of the material"""
19
+
20
+ s3_key: str = FieldInfo(alias="s3Key")
21
+ """The S3 key of the uploaded file"""
22
+
23
+ status: str
24
+ """The status of the material"""
@@ -0,0 +1,24 @@
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__ = ["ComponentUploadURLResponse"]
8
+
9
+
10
+ class ComponentUploadURLResponse(BaseModel):
11
+ id: str
12
+ """The ID of the uploaded material"""
13
+
14
+ content_type: str = FieldInfo(alias="contentType")
15
+ """The content type of the material"""
16
+
17
+ name: str
18
+ """The name of the material"""
19
+
20
+ s3_key: str = FieldInfo(alias="s3Key")
21
+ """The S3 key of the uploaded file"""
22
+
23
+ status: str
24
+ """The status of the material"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: studyfetch_sdk
3
- Version: 0.1.0a15
3
+ Version: 0.1.0a16
4
4
  Summary: The official Python library for the studyfetch-sdk API
5
5
  Project-URL: Homepage, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
6
6
  Project-URL: Repository, https://github.com/GoStudyFetchGo/studyfetch-sdk-python
@@ -11,7 +11,7 @@ studyfetch_sdk/_resource.py,sha256=y0aoAqMIYwTAwStuxbpO8XpTPnrSNQQ_ZcgiH5xcntg,1
11
11
  studyfetch_sdk/_response.py,sha256=6ph8tSkqF5pNbTo_2Zhizhq2O-Eb67TcksHwyg3aXdc,28864
12
12
  studyfetch_sdk/_streaming.py,sha256=HZoENuPVzWhBn24eH3lnMCvRbWN0EPwvhWYfdlJfw0A,10128
13
13
  studyfetch_sdk/_types.py,sha256=6nvqHGarRGuhs_FL8tJ8sGXXD8XWajNynT2K78GxRUI,6205
14
- studyfetch_sdk/_version.py,sha256=MGAn60ax2_6gf7WaYfAYE4foJ6HZVOtybHOQr9mRxvQ,175
14
+ studyfetch_sdk/_version.py,sha256=YHFYJd0dBpxqU2_Bn1ubUnUsfR7WQTD3ZpuR4UDyX1k,175
15
15
  studyfetch_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  studyfetch_sdk/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  studyfetch_sdk/_utils/_logs.py,sha256=EoZgOiIkpf2WB_0Ts0Ti7G3o_25v7IsPf_q-yEU6sbY,798
@@ -58,7 +58,7 @@ studyfetch_sdk/resources/v1/tests/__init__.py,sha256=7-K6i3WJPRCoMSOatJEqUhlz74S
58
58
  studyfetch_sdk/resources/v1/tests/component.py,sha256=MJZIo4-ES4tkY9P1FJl8phjkQxGG8FBCe99ar0I_un4,6013
59
59
  studyfetch_sdk/resources/v1/tests/tests.py,sha256=BGwXClZ8YkzegN80R0WDIrvK3WN1-ujtYkfR33ARhVU,24870
60
60
  studyfetch_sdk/resources/v1/upload/__init__.py,sha256=N5r6jpSMe43dezq-6RBAWLVlL3-Z76lU7DG53phDGr8,1041
61
- studyfetch_sdk/resources/v1/upload/component.py,sha256=I7RZ9K1_Meg__pbeBGGvTSg_ugzxcdFiCzibSQNyg78,21794
61
+ studyfetch_sdk/resources/v1/upload/component.py,sha256=7lABKoQke4Ek9loVprcANTMxkPnPPjxgY-pQZsdDsd0,21979
62
62
  studyfetch_sdk/resources/v1/upload/upload.py,sha256=RBkrsVi5_8qIqdYKypnSqj44ONvwW7u2XXIlpuJsKSg,3736
63
63
  studyfetch_sdk/resources/v1/usage/__init__.py,sha256=zUBe7msw9tyZplhmwNkhbCfRigNQQVj4IFpod4uGWZY,1002
64
64
  studyfetch_sdk/resources/v1/usage/analyst.py,sha256=BZC5QVnm6UWacrqodYFGXUodBM_b37I9jClbiXTakJo,13206
@@ -72,7 +72,7 @@ studyfetch_sdk/types/v1/chat_get_session_params.py,sha256=Iv3O6eF4DvTYTBVQVyVR4t
72
72
  studyfetch_sdk/types/v1/chat_send_message_params.py,sha256=BRxjNsVXsqcBbdrp4J5TQGjjNPJ_bz7uXw3pnc-x0oU,1454
73
73
  studyfetch_sdk/types/v1/chat_stream_params.py,sha256=Aqp2Vdsa35PAH-75kaO_ZYlkqGrCgDZ5EyYTTLRAJoE,695
74
74
  studyfetch_sdk/types/v1/component.py,sha256=ye8BDfb0taD0WwEWJDpi4cXH0iwKqzom0SQQA1nbO4c,1166
75
- studyfetch_sdk/types/v1/component_create_params.py,sha256=i8kgVzsTGGYsYkd-sm9Aw7-kO_aQ64QCzmbnssGD5YQ,10382
75
+ studyfetch_sdk/types/v1/component_create_params.py,sha256=wtPCBVQScdZZuREIzmRIoMCCXoK9cVeR-NUA0qFatxo,10254
76
76
  studyfetch_sdk/types/v1/component_generate_embed_params.py,sha256=keiOzDzPCvacAWHQj_OtF2pGjEAqxwjNriBGxRaRQNk,3068
77
77
  studyfetch_sdk/types/v1/component_generate_embed_response.py,sha256=xhbqEpAt_Q7yzD4xjWITs_jXYUD6ElrH4aQfNEunI3Y,922
78
78
  studyfetch_sdk/types/v1/component_list_params.py,sha256=R8NMK7r37CpqmbAWdbs6rEF1LigoYrE3BXksJCCdKEQ,431
@@ -122,15 +122,18 @@ studyfetch_sdk/types/v1/scenarios/__init__.py,sha256=2DyrawNlb-TstNKw0gUMlQaNSq-
122
122
  studyfetch_sdk/types/v1/scenarios/component_update_params.py,sha256=0wsa-_gN17TKmvhQBbCIQmN2gSEuCq2HBWjQaTqhFdk,1171
123
123
  studyfetch_sdk/types/v1/scenarios/submissions/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
124
124
  studyfetch_sdk/types/v1/tests/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
125
- studyfetch_sdk/types/v1/upload/__init__.py,sha256=CcAj2VNEnMv61GoKuDm7dAeLRwRbjez5QfjpxD8D5o4,655
125
+ studyfetch_sdk/types/v1/upload/__init__.py,sha256=G-KdJ3sJGH9LAfnOaGCZA9myrntfZmuhT3OqPOgQSM4,973
126
126
  studyfetch_sdk/types/v1/upload/component_complete_upload_params.py,sha256=B3-7nCdLI4S_q0qa8NBS7gNwL0F8ljYVvEbo9fwCkXQ,687
127
+ studyfetch_sdk/types/v1/upload/component_complete_upload_response.py,sha256=fOWcCnkzzLlYtwKjmdh4X4hlGVOKUNDA1DmnM5jb1ao,378
127
128
  studyfetch_sdk/types/v1/upload/component_get_presigned_url_params.py,sha256=dTGFn9zyOY9z3NNdPw732L3Ln7D1GKA3S8xB3FBPb7c,754
128
129
  studyfetch_sdk/types/v1/upload/component_get_presigned_url_response.py,sha256=RDHDy3IO_qjtnfLHJQ2CX2_uG6_BJI-vwgQk2UJ-aE8,404
129
130
  studyfetch_sdk/types/v1/upload/component_upload_file_params.py,sha256=UTv4EMrj7_hXa-PU68PMEyXn-bnhxcC0V0qO0JN5W-I,652
131
+ studyfetch_sdk/types/v1/upload/component_upload_file_response.py,sha256=3aMMe3Q2tRiZkdhhbtolqhW7O0jxj5ln3OofgbeXm2U,596
130
132
  studyfetch_sdk/types/v1/upload/component_upload_url_params.py,sha256=3wXvto5WWzLYCu0EfQAWQgM73OmbRGhTwe6UnkMW0gM,687
133
+ studyfetch_sdk/types/v1/upload/component_upload_url_response.py,sha256=S0eyja9wnBzce70CN-WCHd_8CdNRcygub_ZMAkyG2a0,594
131
134
  studyfetch_sdk/types/v1/usage/__init__.py,sha256=W93APDYogn9YlFksS696VpAlz_P7W8mt5wfduXWtoVY,214
132
135
  studyfetch_sdk/types/v1/usage/analyst_list_events_params.py,sha256=5ylEgFOsxQ0HNLfyTktNvZx-VuWJHV06HMIfiNnVNHo,1562
133
- studyfetch_sdk-0.1.0a15.dist-info/METADATA,sha256=0iLN0P6fg7BDv52o4q36_foH2HooOyvIBPeIAGyzlo0,15518
134
- studyfetch_sdk-0.1.0a15.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
135
- studyfetch_sdk-0.1.0a15.dist-info/licenses/LICENSE,sha256=CsdbJMegH_AAWljUmVcwW0Cj_GyIm1hjw6qPqPnmdn4,11344
136
- studyfetch_sdk-0.1.0a15.dist-info/RECORD,,
136
+ studyfetch_sdk-0.1.0a16.dist-info/METADATA,sha256=BYLFe3-gJTlF4p9lzo2-9TEaibxZulb7RiIlIBakQco,15518
137
+ studyfetch_sdk-0.1.0a16.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
138
+ studyfetch_sdk-0.1.0a16.dist-info/licenses/LICENSE,sha256=CsdbJMegH_AAWljUmVcwW0Cj_GyIm1hjw6qPqPnmdn4,11344
139
+ studyfetch_sdk-0.1.0a16.dist-info/RECORD,,