arbi 0.2.1__py3-none-any.whl → 0.3.1__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.
Potentially problematic release.
This version of arbi might be problematic. Click here for more details.
- arbi/_streaming.py +4 -6
- arbi/_version.py +1 -1
- arbi/resources/api/__init__.py +0 -14
- arbi/resources/api/api.py +0 -32
- arbi/resources/api/assistant.py +9 -1
- arbi/resources/api/conversation/conversation.py +87 -2
- arbi/resources/api/document/annotation.py +9 -1
- arbi/resources/api/document/document.py +39 -1
- arbi/resources/api/tag.py +13 -1
- arbi/resources/api/user/user.py +397 -134
- arbi/resources/api/workspace.py +202 -12
- arbi/types/api/__init__.py +12 -7
- arbi/types/api/assistant_query_params.py +22 -2
- arbi/types/api/assistant_retrieve_params.py +22 -2
- arbi/types/api/conversation_retrieve_message_response.py +99 -0
- arbi/types/api/conversation_retrieve_threads_response.py +16 -0
- arbi/types/api/document/annotation_create_params.py +5 -1
- arbi/types/api/document/annotation_update_params.py +5 -1
- arbi/types/api/document_update_params.py +2 -0
- arbi/types/api/document_upload_from_url_params.py +4 -1
- arbi/types/api/document_upload_params.py +4 -1
- arbi/types/api/document_view_params.py +5 -1
- arbi/types/api/tag_create_params.py +5 -1
- arbi/types/api/tag_update_params.py +5 -1
- arbi/types/api/user_change_password_params.py +16 -0
- arbi/types/api/{sso_rotate_passcode_response.py → user_change_password_response.py} +3 -3
- arbi/types/api/{sso_login_params.py → user_check_sso_status_params.py} +3 -6
- arbi/types/api/{user_response.py → user_check_sso_status_response.py} +4 -6
- arbi/types/api/{sso_invite_params.py → user_invite_params.py} +2 -2
- arbi/types/api/{sso_invite_response.py → user_invite_response.py} +2 -4
- arbi/types/api/user_login_params.py +4 -1
- arbi/types/api/user_login_response.py +8 -0
- arbi/types/api/user_register_params.py +5 -4
- arbi/types/api/workspace_copy_params.py +21 -0
- arbi/types/api/workspace_copy_response.py +25 -0
- arbi/types/api/workspace_get_stats_response.py +6 -2
- arbi/types/api/workspace_get_users_response.py +5 -1
- arbi/types/api/workspace_response.py +24 -2
- arbi/types/api/workspace_share_params.py +5 -1
- arbi/types/api/workspace_update_params.py +5 -1
- {arbi-0.2.1.dist-info → arbi-0.3.1.dist-info}/METADATA +1 -1
- {arbi-0.2.1.dist-info → arbi-0.3.1.dist-info}/RECORD +44 -42
- arbi/resources/api/sso.py +0 -333
- arbi/types/api/sso_login_response.py +0 -15
- arbi/types/api/token.py +0 -13
- {arbi-0.2.1.dist-info → arbi-0.3.1.dist-info}/WHEEL +0 -0
- {arbi-0.2.1.dist-info → arbi-0.3.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -19,7 +19,13 @@ from ...._types import (
|
|
|
19
19
|
omit,
|
|
20
20
|
not_given,
|
|
21
21
|
)
|
|
22
|
-
from ...._utils import
|
|
22
|
+
from ...._utils import (
|
|
23
|
+
extract_files,
|
|
24
|
+
maybe_transform,
|
|
25
|
+
strip_not_given,
|
|
26
|
+
deepcopy_minimal,
|
|
27
|
+
async_maybe_transform,
|
|
28
|
+
)
|
|
23
29
|
from ...._compat import cached_property
|
|
24
30
|
from .annotation import (
|
|
25
31
|
AnnotationResource,
|
|
@@ -83,6 +89,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
83
89
|
doc_date: Union[str, date, None] | Omit = omit,
|
|
84
90
|
shared: Optional[bool] | Omit = omit,
|
|
85
91
|
title: Optional[str] | Omit = omit,
|
|
92
|
+
workspace_key: str | Omit = omit,
|
|
86
93
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
87
94
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
88
95
|
extra_headers: Headers | None = None,
|
|
@@ -106,6 +113,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
106
113
|
"""
|
|
107
114
|
if not document_ext_id:
|
|
108
115
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
116
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
109
117
|
return self._patch(
|
|
110
118
|
f"/api/document/{document_ext_id}",
|
|
111
119
|
body=maybe_transform(
|
|
@@ -161,6 +169,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
161
169
|
self,
|
|
162
170
|
document_ext_id: str,
|
|
163
171
|
*,
|
|
172
|
+
workspace_key: str | Omit = omit,
|
|
164
173
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
165
174
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
166
175
|
extra_headers: Headers | None = None,
|
|
@@ -184,6 +193,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
184
193
|
"""
|
|
185
194
|
if not document_ext_id:
|
|
186
195
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
196
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
187
197
|
return self._get(
|
|
188
198
|
f"/api/document/{document_ext_id}/download",
|
|
189
199
|
options=make_request_options(
|
|
@@ -196,6 +206,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
196
206
|
self,
|
|
197
207
|
document_ext_id: str,
|
|
198
208
|
*,
|
|
209
|
+
workspace_key: str | Omit = omit,
|
|
199
210
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
200
211
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
201
212
|
extra_headers: Headers | None = None,
|
|
@@ -219,6 +230,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
219
230
|
"""
|
|
220
231
|
if not document_ext_id:
|
|
221
232
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
233
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
222
234
|
return self._get(
|
|
223
235
|
f"/api/document/{document_ext_id}",
|
|
224
236
|
options=make_request_options(
|
|
@@ -232,6 +244,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
232
244
|
stage: Literal["marker", "subchunk", "final"],
|
|
233
245
|
*,
|
|
234
246
|
document_ext_id: str,
|
|
247
|
+
workspace_key: str | Omit = omit,
|
|
235
248
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
236
249
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
237
250
|
extra_headers: Headers | None = None,
|
|
@@ -257,6 +270,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
257
270
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
258
271
|
if not stage:
|
|
259
272
|
raise ValueError(f"Expected a non-empty value for `stage` but received {stage!r}")
|
|
273
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
260
274
|
return self._get(
|
|
261
275
|
f"/api/document/{document_ext_id}/parsed-{stage}",
|
|
262
276
|
options=make_request_options(
|
|
@@ -269,6 +283,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
269
283
|
self,
|
|
270
284
|
doc_ext_id: str,
|
|
271
285
|
*,
|
|
286
|
+
workspace_key: str | Omit = omit,
|
|
272
287
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
273
288
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
274
289
|
extra_headers: Headers | None = None,
|
|
@@ -290,6 +305,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
290
305
|
"""
|
|
291
306
|
if not doc_ext_id:
|
|
292
307
|
raise ValueError(f"Expected a non-empty value for `doc_ext_id` but received {doc_ext_id!r}")
|
|
308
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
293
309
|
return self._get(
|
|
294
310
|
f"/api/document/{doc_ext_id}/tags",
|
|
295
311
|
options=make_request_options(
|
|
@@ -305,6 +321,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
305
321
|
files: SequenceNotStr[FileTypes],
|
|
306
322
|
config_ext_id: Optional[str] | Omit = omit,
|
|
307
323
|
shared: bool | Omit = omit,
|
|
324
|
+
workspace_key: str | Omit = omit,
|
|
308
325
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
309
326
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
310
327
|
extra_headers: Headers | None = None,
|
|
@@ -332,6 +349,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
332
349
|
|
|
333
350
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
334
351
|
"""
|
|
352
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
335
353
|
body = deepcopy_minimal({"files": files})
|
|
336
354
|
extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", "<array>"]])
|
|
337
355
|
# It should be noted that the actual Content-Type header that will be
|
|
@@ -366,6 +384,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
366
384
|
workspace_ext_id: str,
|
|
367
385
|
config_ext_id: Optional[str] | Omit = omit,
|
|
368
386
|
shared: bool | Omit = omit,
|
|
387
|
+
workspace_key: str | Omit = omit,
|
|
369
388
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
370
389
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
371
390
|
extra_headers: Headers | None = None,
|
|
@@ -392,6 +411,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
392
411
|
|
|
393
412
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
394
413
|
"""
|
|
414
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
395
415
|
return self._post(
|
|
396
416
|
"/api/document/upload-url",
|
|
397
417
|
options=make_request_options(
|
|
@@ -417,6 +437,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
417
437
|
document_ext_id: str,
|
|
418
438
|
*,
|
|
419
439
|
page: Optional[int] | Omit = omit,
|
|
440
|
+
workspace_key: str | Omit = omit,
|
|
420
441
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
421
442
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
422
443
|
extra_headers: Headers | None = None,
|
|
@@ -442,6 +463,7 @@ class DocumentResource(SyncAPIResource):
|
|
|
442
463
|
"""
|
|
443
464
|
if not document_ext_id:
|
|
444
465
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
466
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
445
467
|
return self._get(
|
|
446
468
|
f"/api/document/{document_ext_id}/view",
|
|
447
469
|
options=make_request_options(
|
|
@@ -486,6 +508,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
486
508
|
doc_date: Union[str, date, None] | Omit = omit,
|
|
487
509
|
shared: Optional[bool] | Omit = omit,
|
|
488
510
|
title: Optional[str] | Omit = omit,
|
|
511
|
+
workspace_key: str | Omit = omit,
|
|
489
512
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
490
513
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
491
514
|
extra_headers: Headers | None = None,
|
|
@@ -509,6 +532,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
509
532
|
"""
|
|
510
533
|
if not document_ext_id:
|
|
511
534
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
535
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
512
536
|
return await self._patch(
|
|
513
537
|
f"/api/document/{document_ext_id}",
|
|
514
538
|
body=await async_maybe_transform(
|
|
@@ -564,6 +588,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
564
588
|
self,
|
|
565
589
|
document_ext_id: str,
|
|
566
590
|
*,
|
|
591
|
+
workspace_key: str | Omit = omit,
|
|
567
592
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
568
593
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
569
594
|
extra_headers: Headers | None = None,
|
|
@@ -587,6 +612,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
587
612
|
"""
|
|
588
613
|
if not document_ext_id:
|
|
589
614
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
615
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
590
616
|
return await self._get(
|
|
591
617
|
f"/api/document/{document_ext_id}/download",
|
|
592
618
|
options=make_request_options(
|
|
@@ -599,6 +625,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
599
625
|
self,
|
|
600
626
|
document_ext_id: str,
|
|
601
627
|
*,
|
|
628
|
+
workspace_key: str | Omit = omit,
|
|
602
629
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
603
630
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
604
631
|
extra_headers: Headers | None = None,
|
|
@@ -622,6 +649,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
622
649
|
"""
|
|
623
650
|
if not document_ext_id:
|
|
624
651
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
652
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
625
653
|
return await self._get(
|
|
626
654
|
f"/api/document/{document_ext_id}",
|
|
627
655
|
options=make_request_options(
|
|
@@ -635,6 +663,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
635
663
|
stage: Literal["marker", "subchunk", "final"],
|
|
636
664
|
*,
|
|
637
665
|
document_ext_id: str,
|
|
666
|
+
workspace_key: str | Omit = omit,
|
|
638
667
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
639
668
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
640
669
|
extra_headers: Headers | None = None,
|
|
@@ -660,6 +689,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
660
689
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
661
690
|
if not stage:
|
|
662
691
|
raise ValueError(f"Expected a non-empty value for `stage` but received {stage!r}")
|
|
692
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
663
693
|
return await self._get(
|
|
664
694
|
f"/api/document/{document_ext_id}/parsed-{stage}",
|
|
665
695
|
options=make_request_options(
|
|
@@ -672,6 +702,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
672
702
|
self,
|
|
673
703
|
doc_ext_id: str,
|
|
674
704
|
*,
|
|
705
|
+
workspace_key: str | Omit = omit,
|
|
675
706
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
676
707
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
677
708
|
extra_headers: Headers | None = None,
|
|
@@ -693,6 +724,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
693
724
|
"""
|
|
694
725
|
if not doc_ext_id:
|
|
695
726
|
raise ValueError(f"Expected a non-empty value for `doc_ext_id` but received {doc_ext_id!r}")
|
|
727
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
696
728
|
return await self._get(
|
|
697
729
|
f"/api/document/{doc_ext_id}/tags",
|
|
698
730
|
options=make_request_options(
|
|
@@ -708,6 +740,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
708
740
|
files: SequenceNotStr[FileTypes],
|
|
709
741
|
config_ext_id: Optional[str] | Omit = omit,
|
|
710
742
|
shared: bool | Omit = omit,
|
|
743
|
+
workspace_key: str | Omit = omit,
|
|
711
744
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
712
745
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
713
746
|
extra_headers: Headers | None = None,
|
|
@@ -735,6 +768,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
735
768
|
|
|
736
769
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
737
770
|
"""
|
|
771
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
738
772
|
body = deepcopy_minimal({"files": files})
|
|
739
773
|
extracted_files = extract_files(cast(Mapping[str, object], body), paths=[["files", "<array>"]])
|
|
740
774
|
# It should be noted that the actual Content-Type header that will be
|
|
@@ -769,6 +803,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
769
803
|
workspace_ext_id: str,
|
|
770
804
|
config_ext_id: Optional[str] | Omit = omit,
|
|
771
805
|
shared: bool | Omit = omit,
|
|
806
|
+
workspace_key: str | Omit = omit,
|
|
772
807
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
773
808
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
774
809
|
extra_headers: Headers | None = None,
|
|
@@ -795,6 +830,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
795
830
|
|
|
796
831
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
797
832
|
"""
|
|
833
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
798
834
|
return await self._post(
|
|
799
835
|
"/api/document/upload-url",
|
|
800
836
|
options=make_request_options(
|
|
@@ -820,6 +856,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
820
856
|
document_ext_id: str,
|
|
821
857
|
*,
|
|
822
858
|
page: Optional[int] | Omit = omit,
|
|
859
|
+
workspace_key: str | Omit = omit,
|
|
823
860
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
824
861
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
825
862
|
extra_headers: Headers | None = None,
|
|
@@ -845,6 +882,7 @@ class AsyncDocumentResource(AsyncAPIResource):
|
|
|
845
882
|
"""
|
|
846
883
|
if not document_ext_id:
|
|
847
884
|
raise ValueError(f"Expected a non-empty value for `document_ext_id` but received {document_ext_id!r}")
|
|
885
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
848
886
|
return await self._get(
|
|
849
887
|
f"/api/document/{document_ext_id}/view",
|
|
850
888
|
options=make_request_options(
|
arbi/resources/api/tag.py
CHANGED
|
@@ -7,7 +7,7 @@ from typing import Optional
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
9
|
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
10
|
-
from ..._utils import maybe_transform, async_maybe_transform
|
|
10
|
+
from ..._utils import maybe_transform, strip_not_given, async_maybe_transform
|
|
11
11
|
from ..._compat import cached_property
|
|
12
12
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
13
13
|
from ..._response import (
|
|
@@ -55,6 +55,7 @@ class TagResource(SyncAPIResource):
|
|
|
55
55
|
workspace_ext_id: str,
|
|
56
56
|
parent_ext_id: Optional[str] | Omit = omit,
|
|
57
57
|
shared: Optional[bool] | Omit = omit,
|
|
58
|
+
workspace_key: str | Omit = omit,
|
|
58
59
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
60
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
61
|
extra_headers: Headers | None = None,
|
|
@@ -77,6 +78,7 @@ class TagResource(SyncAPIResource):
|
|
|
77
78
|
|
|
78
79
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
79
80
|
"""
|
|
81
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
80
82
|
return self._post(
|
|
81
83
|
"/api/tag/create",
|
|
82
84
|
body=maybe_transform(
|
|
@@ -100,6 +102,7 @@ class TagResource(SyncAPIResource):
|
|
|
100
102
|
*,
|
|
101
103
|
name: Optional[str] | Omit = omit,
|
|
102
104
|
shared: Optional[bool] | Omit = omit,
|
|
105
|
+
workspace_key: str | Omit = omit,
|
|
103
106
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
104
107
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
105
108
|
extra_headers: Headers | None = None,
|
|
@@ -121,6 +124,7 @@ class TagResource(SyncAPIResource):
|
|
|
121
124
|
"""
|
|
122
125
|
if not tag_ext_id:
|
|
123
126
|
raise ValueError(f"Expected a non-empty value for `tag_ext_id` but received {tag_ext_id!r}")
|
|
127
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
124
128
|
return self._patch(
|
|
125
129
|
f"/api/tag/{tag_ext_id}",
|
|
126
130
|
body=maybe_transform(
|
|
@@ -208,6 +212,7 @@ class TagResource(SyncAPIResource):
|
|
|
208
212
|
self,
|
|
209
213
|
tag_ext_id: str,
|
|
210
214
|
*,
|
|
215
|
+
workspace_key: str | Omit = omit,
|
|
211
216
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
212
217
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
213
218
|
extra_headers: Headers | None = None,
|
|
@@ -229,6 +234,7 @@ class TagResource(SyncAPIResource):
|
|
|
229
234
|
"""
|
|
230
235
|
if not tag_ext_id:
|
|
231
236
|
raise ValueError(f"Expected a non-empty value for `tag_ext_id` but received {tag_ext_id!r}")
|
|
237
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
232
238
|
return self._get(
|
|
233
239
|
f"/api/tag/{tag_ext_id}/docs",
|
|
234
240
|
options=make_request_options(
|
|
@@ -300,6 +306,7 @@ class AsyncTagResource(AsyncAPIResource):
|
|
|
300
306
|
workspace_ext_id: str,
|
|
301
307
|
parent_ext_id: Optional[str] | Omit = omit,
|
|
302
308
|
shared: Optional[bool] | Omit = omit,
|
|
309
|
+
workspace_key: str | Omit = omit,
|
|
303
310
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
304
311
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
305
312
|
extra_headers: Headers | None = None,
|
|
@@ -322,6 +329,7 @@ class AsyncTagResource(AsyncAPIResource):
|
|
|
322
329
|
|
|
323
330
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
324
331
|
"""
|
|
332
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
325
333
|
return await self._post(
|
|
326
334
|
"/api/tag/create",
|
|
327
335
|
body=await async_maybe_transform(
|
|
@@ -345,6 +353,7 @@ class AsyncTagResource(AsyncAPIResource):
|
|
|
345
353
|
*,
|
|
346
354
|
name: Optional[str] | Omit = omit,
|
|
347
355
|
shared: Optional[bool] | Omit = omit,
|
|
356
|
+
workspace_key: str | Omit = omit,
|
|
348
357
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
349
358
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
350
359
|
extra_headers: Headers | None = None,
|
|
@@ -366,6 +375,7 @@ class AsyncTagResource(AsyncAPIResource):
|
|
|
366
375
|
"""
|
|
367
376
|
if not tag_ext_id:
|
|
368
377
|
raise ValueError(f"Expected a non-empty value for `tag_ext_id` but received {tag_ext_id!r}")
|
|
378
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
369
379
|
return await self._patch(
|
|
370
380
|
f"/api/tag/{tag_ext_id}",
|
|
371
381
|
body=await async_maybe_transform(
|
|
@@ -453,6 +463,7 @@ class AsyncTagResource(AsyncAPIResource):
|
|
|
453
463
|
self,
|
|
454
464
|
tag_ext_id: str,
|
|
455
465
|
*,
|
|
466
|
+
workspace_key: str | Omit = omit,
|
|
456
467
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
457
468
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
458
469
|
extra_headers: Headers | None = None,
|
|
@@ -474,6 +485,7 @@ class AsyncTagResource(AsyncAPIResource):
|
|
|
474
485
|
"""
|
|
475
486
|
if not tag_ext_id:
|
|
476
487
|
raise ValueError(f"Expected a non-empty value for `tag_ext_id` but received {tag_ext_id!r}")
|
|
488
|
+
extra_headers = {**strip_not_given({"workspace-key": workspace_key}), **(extra_headers or {})}
|
|
477
489
|
return await self._get(
|
|
478
490
|
f"/api/tag/{tag_ext_id}/docs",
|
|
479
491
|
options=make_request_options(
|