groundx 2.3.0__py3-none-any.whl → 2.3.5__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 (82) hide show
  1. groundx/__init__.py +16 -16
  2. groundx/buckets/__init__.py +2 -0
  3. groundx/buckets/client.py +47 -366
  4. groundx/buckets/raw_client.py +628 -0
  5. groundx/client.py +15 -17
  6. groundx/core/__init__.py +5 -0
  7. groundx/core/api_error.py +13 -5
  8. groundx/core/client_wrapper.py +4 -3
  9. groundx/core/force_multipart.py +16 -0
  10. groundx/core/http_client.py +70 -26
  11. groundx/core/http_response.py +55 -0
  12. groundx/core/jsonable_encoder.py +0 -1
  13. groundx/core/pydantic_utilities.py +69 -110
  14. groundx/core/serialization.py +7 -3
  15. groundx/customer/__init__.py +2 -0
  16. groundx/customer/client.py +31 -43
  17. groundx/customer/raw_client.py +91 -0
  18. groundx/documents/__init__.py +2 -0
  19. groundx/documents/client.py +122 -789
  20. groundx/documents/raw_client.py +1404 -0
  21. groundx/errors/__init__.py +2 -0
  22. groundx/errors/bad_request_error.py +4 -3
  23. groundx/errors/unauthorized_error.py +4 -3
  24. groundx/groups/__init__.py +2 -0
  25. groundx/groups/client.py +55 -520
  26. groundx/groups/raw_client.py +901 -0
  27. groundx/health/__init__.py +2 -0
  28. groundx/health/client.py +35 -101
  29. groundx/health/raw_client.py +193 -0
  30. groundx/ingest.py +2 -2
  31. groundx/search/__init__.py +2 -0
  32. groundx/search/client.py +82 -211
  33. groundx/search/raw_client.py +442 -0
  34. groundx/search/types/__init__.py +2 -0
  35. groundx/types/__init__.py +16 -16
  36. groundx/types/bounding_box_detail.py +4 -4
  37. groundx/types/bucket_detail.py +5 -5
  38. groundx/types/bucket_list_response.py +17 -3
  39. groundx/types/bucket_response.py +3 -3
  40. groundx/types/bucket_update_detail.py +4 -4
  41. groundx/types/bucket_update_response.py +3 -3
  42. groundx/types/customer_detail.py +2 -2
  43. groundx/types/customer_response.py +3 -3
  44. groundx/types/document.py +4 -4
  45. groundx/types/document_detail.py +9 -4
  46. groundx/types/document_list_response.py +4 -4
  47. groundx/types/document_local_ingest_request.py +1 -0
  48. groundx/types/document_lookup_response.py +8 -3
  49. groundx/types/document_response.py +3 -3
  50. groundx/types/group_detail.py +4 -4
  51. groundx/types/group_list_response.py +17 -3
  52. groundx/types/group_response.py +3 -3
  53. groundx/types/health_response.py +3 -3
  54. groundx/types/health_response_health.py +3 -3
  55. groundx/types/health_service.py +5 -5
  56. groundx/types/ingest_local_document.py +3 -3
  57. groundx/types/ingest_local_document_metadata.py +9 -4
  58. groundx/types/ingest_remote_document.py +10 -5
  59. groundx/types/ingest_response.py +4 -4
  60. groundx/types/{process_status_response_ingest.py → ingest_status.py} +8 -7
  61. groundx/types/{ingest_response_ingest.py → ingest_status_light.py} +7 -5
  62. groundx/types/ingest_status_progress.py +26 -0
  63. groundx/types/{process_status_response_ingest_progress_errors.py → ingest_status_progress_cancelled.py} +4 -4
  64. groundx/types/{process_status_response_ingest_progress_complete.py → ingest_status_progress_complete.py} +4 -4
  65. groundx/types/{process_status_response_ingest_progress_cancelled.py → ingest_status_progress_errors.py} +4 -4
  66. groundx/types/{process_status_response_ingest_progress_processing.py → ingest_status_progress_processing.py} +4 -4
  67. groundx/types/message_response.py +2 -2
  68. groundx/types/meter_detail.py +2 -2
  69. groundx/types/processes_status_response.py +19 -2
  70. groundx/types/search_response.py +3 -3
  71. groundx/types/search_response_search.py +3 -3
  72. groundx/types/search_result_item.py +5 -5
  73. groundx/types/subscription_detail.py +3 -3
  74. groundx/types/subscription_detail_meters.py +5 -5
  75. groundx/types/website_source.py +4 -4
  76. {groundx-2.3.0.dist-info → groundx-2.3.5.dist-info}/METADATA +1 -1
  77. groundx-2.3.5.dist-info/RECORD +95 -0
  78. groundx/types/process_status_response.py +0 -20
  79. groundx/types/process_status_response_ingest_progress.py +0 -26
  80. groundx-2.3.0.dist-info/RECORD +0 -88
  81. {groundx-2.3.0.dist-info → groundx-2.3.5.dist-info}/LICENSE +0 -0
  82. {groundx-2.3.0.dist-info → groundx-2.3.5.dist-info}/WHEEL +0 -0
groundx/__init__.py CHANGED
@@ -1,5 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+
3
5
  from .types import (
4
6
  BoundingBoxDetail,
5
7
  BucketDetail,
@@ -27,17 +29,16 @@ from .types import (
27
29
  IngestLocalDocumentMetadata,
28
30
  IngestRemoteDocument,
29
31
  IngestResponse,
30
- IngestResponseIngest,
32
+ IngestStatus,
33
+ IngestStatusLight,
34
+ IngestStatusProgress,
35
+ IngestStatusProgressCancelled,
36
+ IngestStatusProgressComplete,
37
+ IngestStatusProgressErrors,
38
+ IngestStatusProgressProcessing,
31
39
  MessageResponse,
32
40
  MeterDetail,
33
41
  ProcessLevel,
34
- ProcessStatusResponse,
35
- ProcessStatusResponseIngest,
36
- ProcessStatusResponseIngestProgress,
37
- ProcessStatusResponseIngestProgressCancelled,
38
- ProcessStatusResponseIngestProgressComplete,
39
- ProcessStatusResponseIngestProgressErrors,
40
- ProcessStatusResponseIngestProgressProcessing,
41
42
  ProcessesStatusResponse,
42
43
  ProcessingStatus,
43
44
  SearchResponse,
@@ -87,17 +88,16 @@ __all__ = [
87
88
  "IngestLocalDocumentMetadata",
88
89
  "IngestRemoteDocument",
89
90
  "IngestResponse",
90
- "IngestResponseIngest",
91
+ "IngestStatus",
92
+ "IngestStatusLight",
93
+ "IngestStatusProgress",
94
+ "IngestStatusProgressCancelled",
95
+ "IngestStatusProgressComplete",
96
+ "IngestStatusProgressErrors",
97
+ "IngestStatusProgressProcessing",
91
98
  "MessageResponse",
92
99
  "MeterDetail",
93
100
  "ProcessLevel",
94
- "ProcessStatusResponse",
95
- "ProcessStatusResponseIngest",
96
- "ProcessStatusResponseIngestProgress",
97
- "ProcessStatusResponseIngestProgressCancelled",
98
- "ProcessStatusResponseIngestProgressComplete",
99
- "ProcessStatusResponseIngestProgressErrors",
100
- "ProcessStatusResponseIngestProgressProcessing",
101
101
  "ProcessesStatusResponse",
102
102
  "ProcessingStatus",
103
103
  "SearchContentRequestId",
@@ -1,2 +1,4 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+
groundx/buckets/client.py CHANGED
@@ -1,19 +1,14 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  import typing
4
- from ..core.client_wrapper import SyncClientWrapper
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
5
6
  from ..core.request_options import RequestOptions
6
7
  from ..types.bucket_list_response import BucketListResponse
7
- from ..core.pydantic_utilities import parse_obj_as
8
- from json.decoder import JSONDecodeError
9
- from ..core.api_error import ApiError
10
8
  from ..types.bucket_response import BucketResponse
11
- from ..errors.bad_request_error import BadRequestError
12
- from ..core.jsonable_encoder import jsonable_encoder
13
- from ..errors.unauthorized_error import UnauthorizedError
14
9
  from ..types.bucket_update_response import BucketUpdateResponse
15
10
  from ..types.message_response import MessageResponse
16
- from ..core.client_wrapper import AsyncClientWrapper
11
+ from .raw_client import AsyncRawBucketsClient, RawBucketsClient
17
12
 
18
13
  # this is used as the default value for optional parameters
19
14
  OMIT = typing.cast(typing.Any, ...)
@@ -21,7 +16,18 @@ OMIT = typing.cast(typing.Any, ...)
21
16
 
22
17
  class BucketsClient:
23
18
  def __init__(self, *, client_wrapper: SyncClientWrapper):
24
- self._client_wrapper = client_wrapper
19
+ self._raw_client = RawBucketsClient(client_wrapper=client_wrapper)
20
+
21
+ @property
22
+ def with_raw_response(self) -> RawBucketsClient:
23
+ """
24
+ Retrieves a raw implementation of this client that returns raw responses.
25
+
26
+ Returns
27
+ -------
28
+ RawBucketsClient
29
+ """
30
+ return self._raw_client
25
31
 
26
32
  def list(
27
33
  self,
@@ -58,28 +64,8 @@ class BucketsClient:
58
64
  )
59
65
  client.buckets.list()
60
66
  """
61
- _response = self._client_wrapper.httpx_client.request(
62
- "v1/bucket",
63
- method="GET",
64
- params={
65
- "n": n,
66
- "nextToken": next_token,
67
- },
68
- request_options=request_options,
69
- )
70
- try:
71
- if 200 <= _response.status_code < 300:
72
- return typing.cast(
73
- BucketListResponse,
74
- parse_obj_as(
75
- type_=BucketListResponse, # type: ignore
76
- object_=_response.json(),
77
- ),
78
- )
79
- _response_json = _response.json()
80
- except JSONDecodeError:
81
- raise ApiError(status_code=_response.status_code, body=_response.text)
82
- raise ApiError(status_code=_response.status_code, body=_response_json)
67
+ _response = self._raw_client.list(n=n, next_token=next_token, request_options=request_options)
68
+ return _response.data
83
69
 
84
70
  def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> BucketResponse:
85
71
  """
@@ -108,41 +94,8 @@ class BucketsClient:
108
94
  name="your_bucket_name",
109
95
  )
110
96
  """
111
- _response = self._client_wrapper.httpx_client.request(
112
- "v1/bucket",
113
- method="POST",
114
- json={
115
- "name": name,
116
- },
117
- headers={
118
- "content-type": "application/json",
119
- },
120
- request_options=request_options,
121
- omit=OMIT,
122
- )
123
- try:
124
- if 200 <= _response.status_code < 300:
125
- return typing.cast(
126
- BucketResponse,
127
- parse_obj_as(
128
- type_=BucketResponse, # type: ignore
129
- object_=_response.json(),
130
- ),
131
- )
132
- if _response.status_code == 400:
133
- raise BadRequestError(
134
- typing.cast(
135
- typing.Optional[typing.Any],
136
- parse_obj_as(
137
- type_=typing.Optional[typing.Any], # type: ignore
138
- object_=_response.json(),
139
- ),
140
- )
141
- )
142
- _response_json = _response.json()
143
- except JSONDecodeError:
144
- raise ApiError(status_code=_response.status_code, body=_response.text)
145
- raise ApiError(status_code=_response.status_code, body=_response_json)
97
+ _response = self._raw_client.create(name=name, request_options=request_options)
98
+ return _response.data
146
99
 
147
100
  def get(self, bucket_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BucketResponse:
148
101
  """
@@ -172,44 +125,8 @@ class BucketsClient:
172
125
  bucket_id=1,
173
126
  )
174
127
  """
175
- _response = self._client_wrapper.httpx_client.request(
176
- f"v1/bucket/{jsonable_encoder(bucket_id)}",
177
- method="GET",
178
- request_options=request_options,
179
- )
180
- try:
181
- if 200 <= _response.status_code < 300:
182
- return typing.cast(
183
- BucketResponse,
184
- parse_obj_as(
185
- type_=BucketResponse, # type: ignore
186
- object_=_response.json(),
187
- ),
188
- )
189
- if _response.status_code == 400:
190
- raise BadRequestError(
191
- typing.cast(
192
- typing.Optional[typing.Any],
193
- parse_obj_as(
194
- type_=typing.Optional[typing.Any], # type: ignore
195
- object_=_response.json(),
196
- ),
197
- )
198
- )
199
- if _response.status_code == 401:
200
- raise UnauthorizedError(
201
- typing.cast(
202
- typing.Optional[typing.Any],
203
- parse_obj_as(
204
- type_=typing.Optional[typing.Any], # type: ignore
205
- object_=_response.json(),
206
- ),
207
- )
208
- )
209
- _response_json = _response.json()
210
- except JSONDecodeError:
211
- raise ApiError(status_code=_response.status_code, body=_response.text)
212
- raise ApiError(status_code=_response.status_code, body=_response_json)
128
+ _response = self._raw_client.get(bucket_id, request_options=request_options)
129
+ return _response.data
213
130
 
214
131
  def update(
215
132
  self, bucket_id: int, *, new_name: str, request_options: typing.Optional[RequestOptions] = None
@@ -245,51 +162,8 @@ class BucketsClient:
245
162
  new_name="your_bucket_name",
246
163
  )
247
164
  """
248
- _response = self._client_wrapper.httpx_client.request(
249
- f"v1/bucket/{jsonable_encoder(bucket_id)}",
250
- method="PUT",
251
- json={
252
- "newName": new_name,
253
- },
254
- headers={
255
- "content-type": "application/json",
256
- },
257
- request_options=request_options,
258
- omit=OMIT,
259
- )
260
- try:
261
- if 200 <= _response.status_code < 300:
262
- return typing.cast(
263
- BucketUpdateResponse,
264
- parse_obj_as(
265
- type_=BucketUpdateResponse, # type: ignore
266
- object_=_response.json(),
267
- ),
268
- )
269
- if _response.status_code == 400:
270
- raise BadRequestError(
271
- typing.cast(
272
- typing.Optional[typing.Any],
273
- parse_obj_as(
274
- type_=typing.Optional[typing.Any], # type: ignore
275
- object_=_response.json(),
276
- ),
277
- )
278
- )
279
- if _response.status_code == 401:
280
- raise UnauthorizedError(
281
- typing.cast(
282
- typing.Optional[typing.Any],
283
- parse_obj_as(
284
- type_=typing.Optional[typing.Any], # type: ignore
285
- object_=_response.json(),
286
- ),
287
- )
288
- )
289
- _response_json = _response.json()
290
- except JSONDecodeError:
291
- raise ApiError(status_code=_response.status_code, body=_response.text)
292
- raise ApiError(status_code=_response.status_code, body=_response_json)
165
+ _response = self._raw_client.update(bucket_id, new_name=new_name, request_options=request_options)
166
+ return _response.data
293
167
 
294
168
  def delete(self, bucket_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> MessageResponse:
295
169
  """
@@ -319,49 +193,24 @@ class BucketsClient:
319
193
  bucket_id=1,
320
194
  )
321
195
  """
322
- _response = self._client_wrapper.httpx_client.request(
323
- f"v1/bucket/{jsonable_encoder(bucket_id)}",
324
- method="DELETE",
325
- request_options=request_options,
326
- )
327
- try:
328
- if 200 <= _response.status_code < 300:
329
- return typing.cast(
330
- MessageResponse,
331
- parse_obj_as(
332
- type_=MessageResponse, # type: ignore
333
- object_=_response.json(),
334
- ),
335
- )
336
- if _response.status_code == 400:
337
- raise BadRequestError(
338
- typing.cast(
339
- typing.Optional[typing.Any],
340
- parse_obj_as(
341
- type_=typing.Optional[typing.Any], # type: ignore
342
- object_=_response.json(),
343
- ),
344
- )
345
- )
346
- if _response.status_code == 401:
347
- raise UnauthorizedError(
348
- typing.cast(
349
- typing.Optional[typing.Any],
350
- parse_obj_as(
351
- type_=typing.Optional[typing.Any], # type: ignore
352
- object_=_response.json(),
353
- ),
354
- )
355
- )
356
- _response_json = _response.json()
357
- except JSONDecodeError:
358
- raise ApiError(status_code=_response.status_code, body=_response.text)
359
- raise ApiError(status_code=_response.status_code, body=_response_json)
196
+ _response = self._raw_client.delete(bucket_id, request_options=request_options)
197
+ return _response.data
360
198
 
361
199
 
362
200
  class AsyncBucketsClient:
363
201
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
364
- self._client_wrapper = client_wrapper
202
+ self._raw_client = AsyncRawBucketsClient(client_wrapper=client_wrapper)
203
+
204
+ @property
205
+ def with_raw_response(self) -> AsyncRawBucketsClient:
206
+ """
207
+ Retrieves a raw implementation of this client that returns raw responses.
208
+
209
+ Returns
210
+ -------
211
+ AsyncRawBucketsClient
212
+ """
213
+ return self._raw_client
365
214
 
366
215
  async def list(
367
216
  self,
@@ -406,28 +255,8 @@ class AsyncBucketsClient:
406
255
 
407
256
  asyncio.run(main())
408
257
  """
409
- _response = await self._client_wrapper.httpx_client.request(
410
- "v1/bucket",
411
- method="GET",
412
- params={
413
- "n": n,
414
- "nextToken": next_token,
415
- },
416
- request_options=request_options,
417
- )
418
- try:
419
- if 200 <= _response.status_code < 300:
420
- return typing.cast(
421
- BucketListResponse,
422
- parse_obj_as(
423
- type_=BucketListResponse, # type: ignore
424
- object_=_response.json(),
425
- ),
426
- )
427
- _response_json = _response.json()
428
- except JSONDecodeError:
429
- raise ApiError(status_code=_response.status_code, body=_response.text)
430
- raise ApiError(status_code=_response.status_code, body=_response_json)
258
+ _response = await self._raw_client.list(n=n, next_token=next_token, request_options=request_options)
259
+ return _response.data
431
260
 
432
261
  async def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> BucketResponse:
433
262
  """
@@ -464,41 +293,8 @@ class AsyncBucketsClient:
464
293
 
465
294
  asyncio.run(main())
466
295
  """
467
- _response = await self._client_wrapper.httpx_client.request(
468
- "v1/bucket",
469
- method="POST",
470
- json={
471
- "name": name,
472
- },
473
- headers={
474
- "content-type": "application/json",
475
- },
476
- request_options=request_options,
477
- omit=OMIT,
478
- )
479
- try:
480
- if 200 <= _response.status_code < 300:
481
- return typing.cast(
482
- BucketResponse,
483
- parse_obj_as(
484
- type_=BucketResponse, # type: ignore
485
- object_=_response.json(),
486
- ),
487
- )
488
- if _response.status_code == 400:
489
- raise BadRequestError(
490
- typing.cast(
491
- typing.Optional[typing.Any],
492
- parse_obj_as(
493
- type_=typing.Optional[typing.Any], # type: ignore
494
- object_=_response.json(),
495
- ),
496
- )
497
- )
498
- _response_json = _response.json()
499
- except JSONDecodeError:
500
- raise ApiError(status_code=_response.status_code, body=_response.text)
501
- raise ApiError(status_code=_response.status_code, body=_response_json)
296
+ _response = await self._raw_client.create(name=name, request_options=request_options)
297
+ return _response.data
502
298
 
503
299
  async def get(self, bucket_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BucketResponse:
504
300
  """
@@ -536,44 +332,8 @@ class AsyncBucketsClient:
536
332
 
537
333
  asyncio.run(main())
538
334
  """
539
- _response = await self._client_wrapper.httpx_client.request(
540
- f"v1/bucket/{jsonable_encoder(bucket_id)}",
541
- method="GET",
542
- request_options=request_options,
543
- )
544
- try:
545
- if 200 <= _response.status_code < 300:
546
- return typing.cast(
547
- BucketResponse,
548
- parse_obj_as(
549
- type_=BucketResponse, # type: ignore
550
- object_=_response.json(),
551
- ),
552
- )
553
- if _response.status_code == 400:
554
- raise BadRequestError(
555
- typing.cast(
556
- typing.Optional[typing.Any],
557
- parse_obj_as(
558
- type_=typing.Optional[typing.Any], # type: ignore
559
- object_=_response.json(),
560
- ),
561
- )
562
- )
563
- if _response.status_code == 401:
564
- raise UnauthorizedError(
565
- typing.cast(
566
- typing.Optional[typing.Any],
567
- parse_obj_as(
568
- type_=typing.Optional[typing.Any], # type: ignore
569
- object_=_response.json(),
570
- ),
571
- )
572
- )
573
- _response_json = _response.json()
574
- except JSONDecodeError:
575
- raise ApiError(status_code=_response.status_code, body=_response.text)
576
- raise ApiError(status_code=_response.status_code, body=_response_json)
335
+ _response = await self._raw_client.get(bucket_id, request_options=request_options)
336
+ return _response.data
577
337
 
578
338
  async def update(
579
339
  self, bucket_id: int, *, new_name: str, request_options: typing.Optional[RequestOptions] = None
@@ -617,51 +377,8 @@ class AsyncBucketsClient:
617
377
 
618
378
  asyncio.run(main())
619
379
  """
620
- _response = await self._client_wrapper.httpx_client.request(
621
- f"v1/bucket/{jsonable_encoder(bucket_id)}",
622
- method="PUT",
623
- json={
624
- "newName": new_name,
625
- },
626
- headers={
627
- "content-type": "application/json",
628
- },
629
- request_options=request_options,
630
- omit=OMIT,
631
- )
632
- try:
633
- if 200 <= _response.status_code < 300:
634
- return typing.cast(
635
- BucketUpdateResponse,
636
- parse_obj_as(
637
- type_=BucketUpdateResponse, # type: ignore
638
- object_=_response.json(),
639
- ),
640
- )
641
- if _response.status_code == 400:
642
- raise BadRequestError(
643
- typing.cast(
644
- typing.Optional[typing.Any],
645
- parse_obj_as(
646
- type_=typing.Optional[typing.Any], # type: ignore
647
- object_=_response.json(),
648
- ),
649
- )
650
- )
651
- if _response.status_code == 401:
652
- raise UnauthorizedError(
653
- typing.cast(
654
- typing.Optional[typing.Any],
655
- parse_obj_as(
656
- type_=typing.Optional[typing.Any], # type: ignore
657
- object_=_response.json(),
658
- ),
659
- )
660
- )
661
- _response_json = _response.json()
662
- except JSONDecodeError:
663
- raise ApiError(status_code=_response.status_code, body=_response.text)
664
- raise ApiError(status_code=_response.status_code, body=_response_json)
380
+ _response = await self._raw_client.update(bucket_id, new_name=new_name, request_options=request_options)
381
+ return _response.data
665
382
 
666
383
  async def delete(
667
384
  self, bucket_id: int, *, request_options: typing.Optional[RequestOptions] = None
@@ -701,41 +418,5 @@ class AsyncBucketsClient:
701
418
 
702
419
  asyncio.run(main())
703
420
  """
704
- _response = await self._client_wrapper.httpx_client.request(
705
- f"v1/bucket/{jsonable_encoder(bucket_id)}",
706
- method="DELETE",
707
- request_options=request_options,
708
- )
709
- try:
710
- if 200 <= _response.status_code < 300:
711
- return typing.cast(
712
- MessageResponse,
713
- parse_obj_as(
714
- type_=MessageResponse, # type: ignore
715
- object_=_response.json(),
716
- ),
717
- )
718
- if _response.status_code == 400:
719
- raise BadRequestError(
720
- typing.cast(
721
- typing.Optional[typing.Any],
722
- parse_obj_as(
723
- type_=typing.Optional[typing.Any], # type: ignore
724
- object_=_response.json(),
725
- ),
726
- )
727
- )
728
- if _response.status_code == 401:
729
- raise UnauthorizedError(
730
- typing.cast(
731
- typing.Optional[typing.Any],
732
- parse_obj_as(
733
- type_=typing.Optional[typing.Any], # type: ignore
734
- object_=_response.json(),
735
- ),
736
- )
737
- )
738
- _response_json = _response.json()
739
- except JSONDecodeError:
740
- raise ApiError(status_code=_response.status_code, body=_response.text)
741
- raise ApiError(status_code=_response.status_code, body=_response_json)
421
+ _response = await self._raw_client.delete(bucket_id, request_options=request_options)
422
+ return _response.data