mixpeek 0.20.20__py3-none-any.whl → 0.21.6__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.
- mixpeek/_version.py +3 -3
- mixpeek/{assets.py → bucketobjects.py} +309 -793
- mixpeek/buckets.py +1292 -0
- mixpeek/clusters.py +306 -0
- mixpeek/collectioncache.py +820 -0
- mixpeek/{taxonomyentities.py → collectiondocuments.py} +305 -559
- mixpeek/collections.py +120 -994
- mixpeek/features.py +45 -991
- mixpeek/models/__init__.py +625 -570
- mixpeek/models/aggregationtype.py +13 -0
- mixpeek/models/apikeyupdate.py +1 -1
- mixpeek/models/attributebasedconfig.py +21 -0
- mixpeek/models/automaticnaming.py +29 -0
- mixpeek/models/basicfeatureextractor.py +35 -0
- mixpeek/models/{classify_features_v1_entities_taxonomies_taxonomy_classify_postop.py → batch_delete_documents_v1_collections_collection_identifier_documents_batch_deleteop.py} +17 -15
- mixpeek/models/{update_collection_v1_collections_collection_putop.py → batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py} +29 -19
- mixpeek/models/blobdetails.py +72 -0
- mixpeek/models/blobmodel.py +107 -0
- mixpeek/models/bucketcreaterequest.py +75 -0
- mixpeek/models/bucketresponse.py +90 -0
- mixpeek/models/bucketschema_input.py +37 -0
- mixpeek/models/bucketschema_output.py +37 -0
- mixpeek/models/{featureresponse.py → bucketschemafield_input.py} +45 -18
- mixpeek/models/bucketschemafield_output.py +101 -0
- mixpeek/models/bucketschemafieldtype.py +29 -0
- mixpeek/models/bucketupdaterequest.py +68 -0
- mixpeek/models/cachestats.py +40 -0
- mixpeek/models/{list_collections_v1_collections_getop.py → cleanup_cache_v1_collections_cache_cleanup_postop.py} +23 -12
- mixpeek/models/{inputtype.py → clusteringmethod.py} +3 -5
- mixpeek/models/clustertype.py +9 -0
- mixpeek/models/collectioncacheconfig_input.py +92 -0
- mixpeek/models/collectioncacheconfig_output.py +92 -0
- mixpeek/models/collectionconfig.py +32 -0
- mixpeek/models/collectionmodel.py +79 -8
- mixpeek/models/{create_taxonomy_v1_entities_taxonomies_postop.py → create_bucket_v1_buckets_create_postop.py} +7 -7
- mixpeek/models/{search_assets_v1_assets_search_postop.py → create_cluster_v1_clusters_postop.py} +7 -7
- mixpeek/models/{create_collection_v1_collections_postop.py → create_collection_v1_collections_create_postop.py} +3 -3
- mixpeek/models/{ingest_video_url_v1_ingest_videos_url_postop.py → create_interaction_v1_retrievers_interactions_postop.py} +7 -7
- mixpeek/models/{partial_asset_update_v1_assets_asset_id_patchop.py → create_object_v1_buckets_bucket_identifier_objects_create_postop.py} +11 -9
- mixpeek/models/{ingest_text_v1_ingest_text_postop.py → create_retriever_v1_retrievers_retrievers_postop.py} +10 -7
- mixpeek/models/{ingest_image_url_v1_ingest_images_url_postop.py → create_taxonomy_v1_taxonomies_postop.py} +7 -7
- mixpeek/models/createblobrequest.py +80 -0
- mixpeek/models/createclusterrequest.py +74 -0
- mixpeek/models/createcollectionrequest.py +72 -3
- mixpeek/models/createnamespacerequest.py +14 -8
- mixpeek/models/createobjectrequest.py +75 -0
- mixpeek/models/createretrieverrequest.py +90 -0
- mixpeek/models/{taxonomyupdate.py → createtaxonomyrequest.py} +15 -13
- mixpeek/models/{delete_asset_v1_assets_asset_id_deleteop.py → delete_bucket_v1_buckets_bucket_identifier_deleteop.py} +5 -5
- mixpeek/models/{delete_classifications_v1_entities_taxonomies_taxonomy_classifications_classification_id_deleteop.py → delete_document_v1_collections_collection_identifier_documents_document_id_deleteop.py} +11 -11
- mixpeek/models/{get_taxonomy_v1_entities_taxonomies_taxonomy_getop.py → delete_interaction_v1_retrievers_interactions_interaction_id_deleteop.py} +7 -7
- mixpeek/models/delete_object_v1_buckets_bucket_identifier_objects_object_identifier_deleteop.py +70 -0
- mixpeek/models/{featureextractionembeddingrequest.py → documenthandlingconfig.py} +12 -15
- mixpeek/models/documentinputhandling.py +11 -0
- mixpeek/models/{jsontextoutputsettings.py → documentlistresponse.py} +15 -14
- mixpeek/models/documentoutputhandling.py +10 -0
- mixpeek/models/documentoutputtype.py +11 -0
- mixpeek/models/documentresponse.py +87 -0
- mixpeek/models/{nodeupdate.py → documentupdate.py} +22 -13
- mixpeek/models/enrichmentfield.py +25 -0
- mixpeek/models/errordetail.py +1 -1
- mixpeek/models/{update_node_v1_entities_taxonomies_nodes_node_patchop.py → execute_retriever_v1_retrievers_retrievers_retriever_id_execute_postop.py} +11 -11
- mixpeek/models/featureextractorconfig.py +116 -0
- mixpeek/models/featureextractordefinition.py +192 -0
- mixpeek/models/filtercondition.py +25 -25
- mixpeek/models/filteroperator.py +24 -0
- mixpeek/models/generativemodels.py +10 -0
- mixpeek/models/{delete_feature_v1_features_feature_id_deleteop.py → get_bucket_v1_buckets_bucket_identifier_getop.py} +5 -5
- mixpeek/models/{list_taxonomies_v1_entities_taxonomies_getop.py → get_cache_stats_v1_collections_cache_stats_getop.py} +16 -14
- mixpeek/models/get_collection_v1_collections_collection_id_getop.py +59 -0
- mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py +70 -0
- mixpeek/models/get_feature_extractor_v1_features_extractors_feature_id_getop.py +16 -0
- mixpeek/models/get_interaction_v1_retrievers_interactions_interaction_id_getop.py +57 -0
- mixpeek/models/{delete_collection_v1_collections_collection_deleteop.py → get_object_v1_buckets_bucket_identifier_objects_object_identifier_getop.py} +16 -7
- mixpeek/models/get_research_v1_research_getop.py +52 -0
- mixpeek/models/get_retriever_stages_v1_retrievers_stages_getop.py +52 -0
- mixpeek/models/{delete_taxonomy_v1_entities_taxonomies_taxonomy_deleteop.py → get_retriever_v1_retrievers_retrievers_retriever_id_getop.py} +5 -7
- mixpeek/models/get_task_v1_tasks_task_id_getop.py +1 -1
- mixpeek/models/getusagerequestmodel.py +91 -0
- mixpeek/models/hdbscanparameters.py +26 -0
- mixpeek/models/interactionresponse.py +86 -0
- mixpeek/models/interactiontype.py +22 -0
- mixpeek/models/{search_features_v1_features_search_postop.py → invalidate_cache_v1_collections_cache_invalidate_postop.py} +60 -34
- mixpeek/models/invalidationevent.py +67 -0
- mixpeek/models/invalidationstrategy.py +12 -0
- mixpeek/models/kill_task_v1_tasks_task_id_deleteop.py +1 -1
- mixpeek/models/list_active_tasks_v1_tasks_getop.py +1 -1
- mixpeek/models/{list_assets_v1_assets_postop.py → list_buckets_v1_buckets_postop.py} +18 -18
- mixpeek/models/{list_features_v1_features_postop.py → list_documents_v1_collections_collection_identifier_documents_getop.py} +54 -19
- mixpeek/models/list_interactions_v1_retrievers_interactions_getop.py +96 -0
- mixpeek/models/{list_classifications_v1_entities_taxonomies_taxonomy_classifications_postop.py → list_objects_v1_buckets_bucket_identifier_objects_postop.py} +22 -29
- mixpeek/models/{groupbyoptionsasset.py → listbucketsrequest.py} +19 -28
- mixpeek/models/listbucketsresponse.py +23 -0
- mixpeek/models/{groupbyoptions.py → listobjectsrequest.py} +19 -28
- mixpeek/models/listobjectsresponse.py +25 -0
- mixpeek/models/listtasksresponse.py +3 -6
- mixpeek/models/{logicaloperator.py → logicaloperator_input.py} +42 -24
- mixpeek/models/logicaloperator_output.py +121 -0
- mixpeek/models/multivectorindex.py +25 -0
- mixpeek/models/namespaceresponse.py +1 -1
- mixpeek/models/namespaceusage.py +45 -0
- mixpeek/models/namingmethod.py +8 -0
- mixpeek/models/objectresponse.py +124 -0
- mixpeek/models/{db_model_paginationresponse.py → paginationresponse.py} +3 -3
- mixpeek/models/payloadindexconfig.py +1 -1
- mixpeek/models/plan.py +82 -0
- mixpeek/models/recomputestrategy.py +12 -0
- mixpeek/models/resourcetotals.py +39 -0
- mixpeek/models/{jsonvideooutputsettings.py → retrieverbinding.py} +19 -11
- mixpeek/models/{logodetectsettings.py → retrievercacheconfig.py} +20 -11
- mixpeek/models/retrievermodel.py +95 -0
- mixpeek/models/retrieverqueryrequest.py +114 -0
- mixpeek/models/retrieverresponse.py +24 -0
- mixpeek/models/searchinteraction.py +81 -0
- mixpeek/models/singlelineageentry.py +99 -0
- mixpeek/models/sortdirection.py +11 -0
- mixpeek/models/sortoption.py +20 -12
- mixpeek/models/sourceconfig_input.py +72 -0
- mixpeek/models/sourceconfig_output.py +75 -0
- mixpeek/models/sourcetype.py +11 -0
- mixpeek/models/stageconfig_input.py +111 -0
- mixpeek/models/stageconfig_output.py +114 -0
- mixpeek/models/stagedefinition.py +110 -0
- mixpeek/models/{jsonimageoutputsettings.py → stageresponse.py} +21 -11
- mixpeek/models/taskresponse.py +1 -1
- mixpeek/models/taskstatus.py +1 -0
- mixpeek/models/{assetfeatures.py → taxonomyapplicationconfig.py} +23 -15
- mixpeek/models/taxonomyconfig.py +19 -0
- mixpeek/models/timeseriesdatapoint.py +25 -0
- mixpeek/models/timeseriesusage.py +36 -0
- mixpeek/models/{full_asset_update_v1_assets_asset_id_putop.py → update_bucket_v1_buckets_bucket_identifier_putop.py} +9 -9
- mixpeek/models/{update_taxonomy_v1_entities_taxonomies_taxonomy_patchop.py → update_document_v1_collections_collection_identifier_documents_document_id_putop.py} +25 -13
- mixpeek/models/{full_feature_update_v1_features_feature_id_putop.py → update_object_v1_buckets_bucket_identifier_objects_object_identifier_putop.py} +20 -9
- mixpeek/models/updatenamespacerequest.py +1 -1
- mixpeek/models/updateobjectrequest.py +75 -0
- mixpeek/models/usageresponse.py +86 -0
- mixpeek/models/usagesummary.py +39 -0
- mixpeek/models/usagetimerange.py +16 -0
- mixpeek/models/usermodel_input.py +3 -0
- mixpeek/models/usermodel_output.py +3 -0
- mixpeek/models/vectorbasedconfig.py +60 -0
- mixpeek/models/{collectionresult.py → vectorindex.py} +20 -15
- mixpeek/models/vectorindexdefinition.py +43 -0
- mixpeek/models/vectortype.py +4 -1
- mixpeek/namespaces.py +26 -480
- mixpeek/organizationnotifications.py +214 -0
- mixpeek/organizations.py +6 -210
- mixpeek/{featureextractors.py → organizationsusage.py} +31 -39
- mixpeek/research.py +228 -0
- mixpeek/retrieverinteractions.py +1036 -0
- mixpeek/{ingestassets.py → retrievers.py} +209 -271
- mixpeek/retrieverstages.py +232 -0
- mixpeek/sdk.py +40 -23
- mixpeek/taxonomies.py +43 -513
- mixpeek/types/basemodel.py +3 -3
- mixpeek/utils/enums.py +67 -27
- {mixpeek-0.20.20.dist-info → mixpeek-0.21.6.dist-info}/METADATA +68 -50
- mixpeek-0.21.6.dist-info/RECORD +216 -0
- {mixpeek-0.20.20.dist-info → mixpeek-0.21.6.dist-info}/WHEEL +1 -1
- mixpeek/models/actionusage.py +0 -16
- mixpeek/models/assetresponse.py +0 -166
- mixpeek/models/assets_model_searchquery.py +0 -21
- mixpeek/models/assetupdate.py +0 -28
- mixpeek/models/assignmentconfig.py +0 -67
- mixpeek/models/assignmentmode.py +0 -11
- mixpeek/models/availablemodels.py +0 -16
- mixpeek/models/availablemodelsresponse.py +0 -27
- mixpeek/models/classificationmatch.py +0 -77
- mixpeek/models/classificationwithfeature.py +0 -73
- mixpeek/models/collectiondetailsresponse.py +0 -83
- mixpeek/models/dateusage.py +0 -22
- mixpeek/models/denseembedding.py +0 -16
- mixpeek/models/discoverrequest.py +0 -64
- mixpeek/models/embeddingconfig.py +0 -33
- mixpeek/models/embeddingrequest.py +0 -92
- mixpeek/models/embeddingresponse.py +0 -64
- mixpeek/models/entitysettings.py +0 -50
- mixpeek/models/featureoptions.py +0 -25
- mixpeek/models/features_model_paginationresponse.py +0 -59
- mixpeek/models/featureupdaterequest.py +0 -21
- mixpeek/models/get_asset_v1_assets_asset_id_getop.py +0 -73
- mixpeek/models/get_asset_with_features_v1_assets_asset_id_features_getop.py +0 -73
- mixpeek/models/get_collection_details_v1_collections_collection_details_getop.py +0 -59
- mixpeek/models/get_collection_details_v1_collections_collection_getop.py +0 -59
- mixpeek/models/get_feature_v1_features_feature_id_getop.py +0 -70
- mixpeek/models/get_taxonomy_node_v1_entities_taxonomies_nodes_node_getop.py +0 -59
- mixpeek/models/groupedassetdata.py +0 -18
- mixpeek/models/imagedescribesettings.py +0 -82
- mixpeek/models/imagedetectsettings.py +0 -47
- mixpeek/models/imagereadsettings.py +0 -71
- mixpeek/models/imagesettings.py +0 -92
- mixpeek/models/listassetsrequest.py +0 -75
- mixpeek/models/listassetsresponse.py +0 -22
- mixpeek/models/listclassificationsrequest.py +0 -69
- mixpeek/models/listclassificationsresponse.py +0 -31
- mixpeek/models/listcollectionsresponse.py +0 -22
- mixpeek/models/listfeaturesrequest.py +0 -77
- mixpeek/models/listfeaturesresponse.py +0 -22
- mixpeek/models/listtaxonomiesresponse.py +0 -24
- mixpeek/models/modality.py +0 -13
- mixpeek/models/modeldetails.py +0 -61
- mixpeek/models/nodeoptions.py +0 -16
- mixpeek/models/patch_namespace_v1_namespaces_namespace_patchop.py +0 -28
- mixpeek/models/payloadindextype.py +0 -17
- mixpeek/models/processimageurlinput.py +0 -87
- mixpeek/models/processtextinput.py +0 -82
- mixpeek/models/processvideourlinput.py +0 -87
- mixpeek/models/querysettings.py +0 -56
- mixpeek/models/rerankingoptions.py +0 -47
- mixpeek/models/search_model_searchquery.py +0 -76
- mixpeek/models/searchassetsrequest.py +0 -78
- mixpeek/models/searchrequestfeatures.py +0 -153
- mixpeek/models/sparseembedding.py +0 -21
- mixpeek/models/taxonomycreate.py +0 -20
- mixpeek/models/taxonomyextractionconfig.py +0 -26
- mixpeek/models/taxonomymodel.py +0 -27
- mixpeek/models/taxonomynode.py +0 -101
- mixpeek/models/taxonomynodecreate.py +0 -63
- mixpeek/models/textsettings.py +0 -67
- mixpeek/models/updateassetrequest.py +0 -60
- mixpeek/models/usage.py +0 -18
- mixpeek/models/vectormodel.py +0 -15
- mixpeek/models/videodescribesettings.py +0 -82
- mixpeek/models/videodetectsettings.py +0 -47
- mixpeek/models/videoreadsettings.py +0 -71
- mixpeek/models/videosettings.py +0 -115
- mixpeek/models/videotranscriptionsettings.py +0 -69
- mixpeek-0.20.20.dist-info/RECORD +0 -201
mixpeek/taxonomies.py
CHANGED
@@ -5,507 +5,31 @@ from mixpeek import models, utils
|
|
5
5
|
from mixpeek._hooks import HookContext
|
6
6
|
from mixpeek.types import OptionalNullable, UNSET
|
7
7
|
from mixpeek.utils import get_security_from_env
|
8
|
-
from typing import Any, Mapping, Optional
|
8
|
+
from typing import Any, Mapping, Optional, Union
|
9
9
|
|
10
10
|
|
11
11
|
class Taxonomies(BaseSDK):
|
12
|
-
def
|
12
|
+
def create(
|
13
13
|
self,
|
14
14
|
*,
|
15
|
-
|
15
|
+
taxonomy_name: str,
|
16
|
+
config: Union[models.TaxonomyConfig, models.TaxonomyConfigTypedDict],
|
16
17
|
x_namespace: OptionalNullable[str] = UNSET,
|
17
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
18
|
-
server_url: Optional[str] = None,
|
19
|
-
timeout_ms: Optional[int] = None,
|
20
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
21
|
-
) -> models.TaxonomyModel:
|
22
|
-
r"""Get Taxonomy
|
23
|
-
|
24
|
-
Get the complete taxonomy that contains the specified node
|
25
|
-
|
26
|
-
:param taxonomy: The name or id of the taxonomy to find
|
27
|
-
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
28
|
-
:param retries: Override the default retry configuration for this method
|
29
|
-
:param server_url: Override the default server URL for this method
|
30
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
31
|
-
:param http_headers: Additional headers to set or replace on requests.
|
32
|
-
"""
|
33
|
-
base_url = None
|
34
|
-
url_variables = None
|
35
|
-
if timeout_ms is None:
|
36
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
37
|
-
|
38
|
-
if server_url is not None:
|
39
|
-
base_url = server_url
|
40
|
-
else:
|
41
|
-
base_url = self._get_url(base_url, url_variables)
|
42
|
-
|
43
|
-
request = models.GetTaxonomyV1EntitiesTaxonomiesTaxonomyGetRequest(
|
44
|
-
taxonomy=taxonomy,
|
45
|
-
x_namespace=x_namespace,
|
46
|
-
)
|
47
|
-
|
48
|
-
req = self._build_request(
|
49
|
-
method="GET",
|
50
|
-
path="/v1/entities/taxonomies/{taxonomy}",
|
51
|
-
base_url=base_url,
|
52
|
-
url_variables=url_variables,
|
53
|
-
request=request,
|
54
|
-
request_body_required=False,
|
55
|
-
request_has_path_params=True,
|
56
|
-
request_has_query_params=True,
|
57
|
-
user_agent_header="user-agent",
|
58
|
-
accept_header_value="application/json",
|
59
|
-
http_headers=http_headers,
|
60
|
-
security=self.sdk_configuration.security,
|
61
|
-
timeout_ms=timeout_ms,
|
62
|
-
)
|
63
|
-
|
64
|
-
if retries == UNSET:
|
65
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
66
|
-
retries = self.sdk_configuration.retry_config
|
67
|
-
|
68
|
-
retry_config = None
|
69
|
-
if isinstance(retries, utils.RetryConfig):
|
70
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
71
|
-
|
72
|
-
http_res = self.do_request(
|
73
|
-
hook_ctx=HookContext(
|
74
|
-
base_url=base_url or "",
|
75
|
-
operation_id="get_taxonomy_v1_entities_taxonomies__taxonomy__get",
|
76
|
-
oauth2_scopes=[],
|
77
|
-
security_source=get_security_from_env(
|
78
|
-
self.sdk_configuration.security, models.Security
|
79
|
-
),
|
80
|
-
),
|
81
|
-
request=req,
|
82
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
83
|
-
retry_config=retry_config,
|
84
|
-
)
|
85
|
-
|
86
|
-
response_data: Any = None
|
87
|
-
if utils.match_response(http_res, "200", "application/json"):
|
88
|
-
return utils.unmarshal_json(http_res.text, models.TaxonomyModel)
|
89
|
-
if utils.match_response(
|
90
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
91
|
-
):
|
92
|
-
response_data = utils.unmarshal_json(
|
93
|
-
http_res.text, models.ErrorResponseData
|
94
|
-
)
|
95
|
-
raise models.ErrorResponse(data=response_data)
|
96
|
-
if utils.match_response(http_res, "422", "application/json"):
|
97
|
-
response_data = utils.unmarshal_json(
|
98
|
-
http_res.text, models.HTTPValidationErrorData
|
99
|
-
)
|
100
|
-
raise models.HTTPValidationError(data=response_data)
|
101
|
-
if utils.match_response(http_res, "500", "application/json"):
|
102
|
-
response_data = utils.unmarshal_json(
|
103
|
-
http_res.text, models.ErrorResponseData
|
104
|
-
)
|
105
|
-
raise models.ErrorResponse(data=response_data)
|
106
|
-
if utils.match_response(http_res, "4XX", "*"):
|
107
|
-
http_res_text = utils.stream_to_text(http_res)
|
108
|
-
raise models.APIError(
|
109
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
110
|
-
)
|
111
|
-
if utils.match_response(http_res, "5XX", "*"):
|
112
|
-
http_res_text = utils.stream_to_text(http_res)
|
113
|
-
raise models.APIError(
|
114
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
115
|
-
)
|
116
|
-
|
117
|
-
content_type = http_res.headers.get("Content-Type")
|
118
|
-
http_res_text = utils.stream_to_text(http_res)
|
119
|
-
raise models.APIError(
|
120
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
121
|
-
http_res.status_code,
|
122
|
-
http_res_text,
|
123
|
-
http_res,
|
124
|
-
)
|
125
|
-
|
126
|
-
async def get_async(
|
127
|
-
self,
|
128
|
-
*,
|
129
|
-
taxonomy: str,
|
130
|
-
x_namespace: OptionalNullable[str] = UNSET,
|
131
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
132
|
-
server_url: Optional[str] = None,
|
133
|
-
timeout_ms: Optional[int] = None,
|
134
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
135
|
-
) -> models.TaxonomyModel:
|
136
|
-
r"""Get Taxonomy
|
137
|
-
|
138
|
-
Get the complete taxonomy that contains the specified node
|
139
|
-
|
140
|
-
:param taxonomy: The name or id of the taxonomy to find
|
141
|
-
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
142
|
-
:param retries: Override the default retry configuration for this method
|
143
|
-
:param server_url: Override the default server URL for this method
|
144
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
145
|
-
:param http_headers: Additional headers to set or replace on requests.
|
146
|
-
"""
|
147
|
-
base_url = None
|
148
|
-
url_variables = None
|
149
|
-
if timeout_ms is None:
|
150
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
151
|
-
|
152
|
-
if server_url is not None:
|
153
|
-
base_url = server_url
|
154
|
-
else:
|
155
|
-
base_url = self._get_url(base_url, url_variables)
|
156
|
-
|
157
|
-
request = models.GetTaxonomyV1EntitiesTaxonomiesTaxonomyGetRequest(
|
158
|
-
taxonomy=taxonomy,
|
159
|
-
x_namespace=x_namespace,
|
160
|
-
)
|
161
|
-
|
162
|
-
req = self._build_request_async(
|
163
|
-
method="GET",
|
164
|
-
path="/v1/entities/taxonomies/{taxonomy}",
|
165
|
-
base_url=base_url,
|
166
|
-
url_variables=url_variables,
|
167
|
-
request=request,
|
168
|
-
request_body_required=False,
|
169
|
-
request_has_path_params=True,
|
170
|
-
request_has_query_params=True,
|
171
|
-
user_agent_header="user-agent",
|
172
|
-
accept_header_value="application/json",
|
173
|
-
http_headers=http_headers,
|
174
|
-
security=self.sdk_configuration.security,
|
175
|
-
timeout_ms=timeout_ms,
|
176
|
-
)
|
177
|
-
|
178
|
-
if retries == UNSET:
|
179
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
180
|
-
retries = self.sdk_configuration.retry_config
|
181
|
-
|
182
|
-
retry_config = None
|
183
|
-
if isinstance(retries, utils.RetryConfig):
|
184
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
185
|
-
|
186
|
-
http_res = await self.do_request_async(
|
187
|
-
hook_ctx=HookContext(
|
188
|
-
base_url=base_url or "",
|
189
|
-
operation_id="get_taxonomy_v1_entities_taxonomies__taxonomy__get",
|
190
|
-
oauth2_scopes=[],
|
191
|
-
security_source=get_security_from_env(
|
192
|
-
self.sdk_configuration.security, models.Security
|
193
|
-
),
|
194
|
-
),
|
195
|
-
request=req,
|
196
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
197
|
-
retry_config=retry_config,
|
198
|
-
)
|
199
|
-
|
200
|
-
response_data: Any = None
|
201
|
-
if utils.match_response(http_res, "200", "application/json"):
|
202
|
-
return utils.unmarshal_json(http_res.text, models.TaxonomyModel)
|
203
|
-
if utils.match_response(
|
204
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
205
|
-
):
|
206
|
-
response_data = utils.unmarshal_json(
|
207
|
-
http_res.text, models.ErrorResponseData
|
208
|
-
)
|
209
|
-
raise models.ErrorResponse(data=response_data)
|
210
|
-
if utils.match_response(http_res, "422", "application/json"):
|
211
|
-
response_data = utils.unmarshal_json(
|
212
|
-
http_res.text, models.HTTPValidationErrorData
|
213
|
-
)
|
214
|
-
raise models.HTTPValidationError(data=response_data)
|
215
|
-
if utils.match_response(http_res, "500", "application/json"):
|
216
|
-
response_data = utils.unmarshal_json(
|
217
|
-
http_res.text, models.ErrorResponseData
|
218
|
-
)
|
219
|
-
raise models.ErrorResponse(data=response_data)
|
220
|
-
if utils.match_response(http_res, "4XX", "*"):
|
221
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
222
|
-
raise models.APIError(
|
223
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
224
|
-
)
|
225
|
-
if utils.match_response(http_res, "5XX", "*"):
|
226
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
227
|
-
raise models.APIError(
|
228
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
229
|
-
)
|
230
|
-
|
231
|
-
content_type = http_res.headers.get("Content-Type")
|
232
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
233
|
-
raise models.APIError(
|
234
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
235
|
-
http_res.status_code,
|
236
|
-
http_res_text,
|
237
|
-
http_res,
|
238
|
-
)
|
239
|
-
|
240
|
-
def delete(
|
241
|
-
self,
|
242
|
-
*,
|
243
|
-
taxonomy: str,
|
244
|
-
x_namespace: OptionalNullable[str] = UNSET,
|
245
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
246
|
-
server_url: Optional[str] = None,
|
247
|
-
timeout_ms: Optional[int] = None,
|
248
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
249
|
-
) -> models.GenericSuccessResponse:
|
250
|
-
r"""Delete Taxonomy
|
251
|
-
|
252
|
-
Delete an existing taxonomy and remove all associated node classifications from features.
|
253
|
-
|
254
|
-
This operation:
|
255
|
-
- Deletes the taxonomy and all its nodes
|
256
|
-
- Removes any node classifications associated with this taxonomy from all features
|
257
|
-
- This action cannot be undone
|
258
|
-
|
259
|
-
|
260
|
-
**Requirements:**
|
261
|
-
- Required permissions: write
|
262
|
-
|
263
|
-
:param taxonomy: The ID or name of the taxonomy to delete
|
264
|
-
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
265
|
-
:param retries: Override the default retry configuration for this method
|
266
|
-
:param server_url: Override the default server URL for this method
|
267
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
268
|
-
:param http_headers: Additional headers to set or replace on requests.
|
269
|
-
"""
|
270
|
-
base_url = None
|
271
|
-
url_variables = None
|
272
|
-
if timeout_ms is None:
|
273
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
274
|
-
|
275
|
-
if server_url is not None:
|
276
|
-
base_url = server_url
|
277
|
-
else:
|
278
|
-
base_url = self._get_url(base_url, url_variables)
|
279
|
-
|
280
|
-
request = models.DeleteTaxonomyV1EntitiesTaxonomiesTaxonomyDeleteRequest(
|
281
|
-
taxonomy=taxonomy,
|
282
|
-
x_namespace=x_namespace,
|
283
|
-
)
|
284
|
-
|
285
|
-
req = self._build_request(
|
286
|
-
method="DELETE",
|
287
|
-
path="/v1/entities/taxonomies/{taxonomy}",
|
288
|
-
base_url=base_url,
|
289
|
-
url_variables=url_variables,
|
290
|
-
request=request,
|
291
|
-
request_body_required=False,
|
292
|
-
request_has_path_params=True,
|
293
|
-
request_has_query_params=True,
|
294
|
-
user_agent_header="user-agent",
|
295
|
-
accept_header_value="application/json",
|
296
|
-
http_headers=http_headers,
|
297
|
-
security=self.sdk_configuration.security,
|
298
|
-
timeout_ms=timeout_ms,
|
299
|
-
)
|
300
|
-
|
301
|
-
if retries == UNSET:
|
302
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
303
|
-
retries = self.sdk_configuration.retry_config
|
304
|
-
|
305
|
-
retry_config = None
|
306
|
-
if isinstance(retries, utils.RetryConfig):
|
307
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
308
|
-
|
309
|
-
http_res = self.do_request(
|
310
|
-
hook_ctx=HookContext(
|
311
|
-
base_url=base_url or "",
|
312
|
-
operation_id="delete_taxonomy_v1_entities_taxonomies__taxonomy__delete",
|
313
|
-
oauth2_scopes=[],
|
314
|
-
security_source=get_security_from_env(
|
315
|
-
self.sdk_configuration.security, models.Security
|
316
|
-
),
|
317
|
-
),
|
318
|
-
request=req,
|
319
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
320
|
-
retry_config=retry_config,
|
321
|
-
)
|
322
|
-
|
323
|
-
response_data: Any = None
|
324
|
-
if utils.match_response(http_res, "200", "application/json"):
|
325
|
-
return utils.unmarshal_json(http_res.text, models.GenericSuccessResponse)
|
326
|
-
if utils.match_response(
|
327
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
328
|
-
):
|
329
|
-
response_data = utils.unmarshal_json(
|
330
|
-
http_res.text, models.ErrorResponseData
|
331
|
-
)
|
332
|
-
raise models.ErrorResponse(data=response_data)
|
333
|
-
if utils.match_response(http_res, "422", "application/json"):
|
334
|
-
response_data = utils.unmarshal_json(
|
335
|
-
http_res.text, models.HTTPValidationErrorData
|
336
|
-
)
|
337
|
-
raise models.HTTPValidationError(data=response_data)
|
338
|
-
if utils.match_response(http_res, "500", "application/json"):
|
339
|
-
response_data = utils.unmarshal_json(
|
340
|
-
http_res.text, models.ErrorResponseData
|
341
|
-
)
|
342
|
-
raise models.ErrorResponse(data=response_data)
|
343
|
-
if utils.match_response(http_res, "4XX", "*"):
|
344
|
-
http_res_text = utils.stream_to_text(http_res)
|
345
|
-
raise models.APIError(
|
346
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
347
|
-
)
|
348
|
-
if utils.match_response(http_res, "5XX", "*"):
|
349
|
-
http_res_text = utils.stream_to_text(http_res)
|
350
|
-
raise models.APIError(
|
351
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
352
|
-
)
|
353
|
-
|
354
|
-
content_type = http_res.headers.get("Content-Type")
|
355
|
-
http_res_text = utils.stream_to_text(http_res)
|
356
|
-
raise models.APIError(
|
357
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
358
|
-
http_res.status_code,
|
359
|
-
http_res_text,
|
360
|
-
http_res,
|
361
|
-
)
|
362
|
-
|
363
|
-
async def delete_async(
|
364
|
-
self,
|
365
|
-
*,
|
366
|
-
taxonomy: str,
|
367
|
-
x_namespace: OptionalNullable[str] = UNSET,
|
368
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
369
|
-
server_url: Optional[str] = None,
|
370
|
-
timeout_ms: Optional[int] = None,
|
371
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
372
|
-
) -> models.GenericSuccessResponse:
|
373
|
-
r"""Delete Taxonomy
|
374
|
-
|
375
|
-
Delete an existing taxonomy and remove all associated node classifications from features.
|
376
|
-
|
377
|
-
This operation:
|
378
|
-
- Deletes the taxonomy and all its nodes
|
379
|
-
- Removes any node classifications associated with this taxonomy from all features
|
380
|
-
- This action cannot be undone
|
381
|
-
|
382
|
-
|
383
|
-
**Requirements:**
|
384
|
-
- Required permissions: write
|
385
|
-
|
386
|
-
:param taxonomy: The ID or name of the taxonomy to delete
|
387
|
-
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
388
|
-
:param retries: Override the default retry configuration for this method
|
389
|
-
:param server_url: Override the default server URL for this method
|
390
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
391
|
-
:param http_headers: Additional headers to set or replace on requests.
|
392
|
-
"""
|
393
|
-
base_url = None
|
394
|
-
url_variables = None
|
395
|
-
if timeout_ms is None:
|
396
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
397
|
-
|
398
|
-
if server_url is not None:
|
399
|
-
base_url = server_url
|
400
|
-
else:
|
401
|
-
base_url = self._get_url(base_url, url_variables)
|
402
|
-
|
403
|
-
request = models.DeleteTaxonomyV1EntitiesTaxonomiesTaxonomyDeleteRequest(
|
404
|
-
taxonomy=taxonomy,
|
405
|
-
x_namespace=x_namespace,
|
406
|
-
)
|
407
|
-
|
408
|
-
req = self._build_request_async(
|
409
|
-
method="DELETE",
|
410
|
-
path="/v1/entities/taxonomies/{taxonomy}",
|
411
|
-
base_url=base_url,
|
412
|
-
url_variables=url_variables,
|
413
|
-
request=request,
|
414
|
-
request_body_required=False,
|
415
|
-
request_has_path_params=True,
|
416
|
-
request_has_query_params=True,
|
417
|
-
user_agent_header="user-agent",
|
418
|
-
accept_header_value="application/json",
|
419
|
-
http_headers=http_headers,
|
420
|
-
security=self.sdk_configuration.security,
|
421
|
-
timeout_ms=timeout_ms,
|
422
|
-
)
|
423
|
-
|
424
|
-
if retries == UNSET:
|
425
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
426
|
-
retries = self.sdk_configuration.retry_config
|
427
|
-
|
428
|
-
retry_config = None
|
429
|
-
if isinstance(retries, utils.RetryConfig):
|
430
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
431
|
-
|
432
|
-
http_res = await self.do_request_async(
|
433
|
-
hook_ctx=HookContext(
|
434
|
-
base_url=base_url or "",
|
435
|
-
operation_id="delete_taxonomy_v1_entities_taxonomies__taxonomy__delete",
|
436
|
-
oauth2_scopes=[],
|
437
|
-
security_source=get_security_from_env(
|
438
|
-
self.sdk_configuration.security, models.Security
|
439
|
-
),
|
440
|
-
),
|
441
|
-
request=req,
|
442
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
443
|
-
retry_config=retry_config,
|
444
|
-
)
|
445
|
-
|
446
|
-
response_data: Any = None
|
447
|
-
if utils.match_response(http_res, "200", "application/json"):
|
448
|
-
return utils.unmarshal_json(http_res.text, models.GenericSuccessResponse)
|
449
|
-
if utils.match_response(
|
450
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
451
|
-
):
|
452
|
-
response_data = utils.unmarshal_json(
|
453
|
-
http_res.text, models.ErrorResponseData
|
454
|
-
)
|
455
|
-
raise models.ErrorResponse(data=response_data)
|
456
|
-
if utils.match_response(http_res, "422", "application/json"):
|
457
|
-
response_data = utils.unmarshal_json(
|
458
|
-
http_res.text, models.HTTPValidationErrorData
|
459
|
-
)
|
460
|
-
raise models.HTTPValidationError(data=response_data)
|
461
|
-
if utils.match_response(http_res, "500", "application/json"):
|
462
|
-
response_data = utils.unmarshal_json(
|
463
|
-
http_res.text, models.ErrorResponseData
|
464
|
-
)
|
465
|
-
raise models.ErrorResponse(data=response_data)
|
466
|
-
if utils.match_response(http_res, "4XX", "*"):
|
467
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
468
|
-
raise models.APIError(
|
469
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
470
|
-
)
|
471
|
-
if utils.match_response(http_res, "5XX", "*"):
|
472
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
473
|
-
raise models.APIError(
|
474
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
475
|
-
)
|
476
|
-
|
477
|
-
content_type = http_res.headers.get("Content-Type")
|
478
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
479
|
-
raise models.APIError(
|
480
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
481
|
-
http_res.status_code,
|
482
|
-
http_res_text,
|
483
|
-
http_res,
|
484
|
-
)
|
485
|
-
|
486
|
-
def update(
|
487
|
-
self,
|
488
|
-
*,
|
489
|
-
taxonomy: str,
|
490
|
-
x_namespace: OptionalNullable[str] = UNSET,
|
491
|
-
taxonomy_name: OptionalNullable[str] = UNSET,
|
492
18
|
description: OptionalNullable[str] = UNSET,
|
493
19
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
494
20
|
server_url: Optional[str] = None,
|
495
21
|
timeout_ms: Optional[int] = None,
|
496
22
|
http_headers: Optional[Mapping[str, str]] = None,
|
497
|
-
) -> models.
|
498
|
-
r"""
|
499
|
-
|
500
|
-
Update an existing taxonomy's metadata
|
23
|
+
) -> models.TaskResponse:
|
24
|
+
r"""Create Taxonomy
|
501
25
|
|
502
26
|
**Requirements:**
|
503
27
|
- Required permissions: write
|
504
28
|
|
505
|
-
:param
|
29
|
+
:param taxonomy_name:
|
30
|
+
:param config: Base configuration for all taxonomy types
|
506
31
|
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
507
|
-
:param
|
508
|
-
:param description: Updated taxonomy description
|
32
|
+
:param description:
|
509
33
|
:param retries: Override the default retry configuration for this method
|
510
34
|
:param server_url: Override the default server URL for this method
|
511
35
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -521,30 +45,34 @@ class Taxonomies(BaseSDK):
|
|
521
45
|
else:
|
522
46
|
base_url = self._get_url(base_url, url_variables)
|
523
47
|
|
524
|
-
request = models.
|
525
|
-
taxonomy=taxonomy,
|
48
|
+
request = models.CreateTaxonomyV1TaxonomiesPostRequest(
|
526
49
|
x_namespace=x_namespace,
|
527
|
-
|
50
|
+
create_taxonomy_request=models.CreateTaxonomyRequest(
|
528
51
|
taxonomy_name=taxonomy_name,
|
529
52
|
description=description,
|
53
|
+
config=utils.get_pydantic_model(config, models.TaxonomyConfig),
|
530
54
|
),
|
531
55
|
)
|
532
56
|
|
533
57
|
req = self._build_request(
|
534
|
-
method="
|
535
|
-
path="/v1/
|
58
|
+
method="POST",
|
59
|
+
path="/v1/taxonomies",
|
536
60
|
base_url=base_url,
|
537
61
|
url_variables=url_variables,
|
538
62
|
request=request,
|
539
63
|
request_body_required=True,
|
540
|
-
request_has_path_params=
|
64
|
+
request_has_path_params=False,
|
541
65
|
request_has_query_params=True,
|
542
66
|
user_agent_header="user-agent",
|
543
67
|
accept_header_value="application/json",
|
544
68
|
http_headers=http_headers,
|
545
69
|
security=self.sdk_configuration.security,
|
546
70
|
get_serialized_body=lambda: utils.serialize_request_body(
|
547
|
-
request.
|
71
|
+
request.create_taxonomy_request,
|
72
|
+
False,
|
73
|
+
False,
|
74
|
+
"json",
|
75
|
+
models.CreateTaxonomyRequest,
|
548
76
|
),
|
549
77
|
timeout_ms=timeout_ms,
|
550
78
|
)
|
@@ -560,7 +88,7 @@ class Taxonomies(BaseSDK):
|
|
560
88
|
http_res = self.do_request(
|
561
89
|
hook_ctx=HookContext(
|
562
90
|
base_url=base_url or "",
|
563
|
-
operation_id="
|
91
|
+
operation_id="create_taxonomy_v1_taxonomies_post",
|
564
92
|
oauth2_scopes=[],
|
565
93
|
security_source=get_security_from_env(
|
566
94
|
self.sdk_configuration.security, models.Security
|
@@ -573,7 +101,7 @@ class Taxonomies(BaseSDK):
|
|
573
101
|
|
574
102
|
response_data: Any = None
|
575
103
|
if utils.match_response(http_res, "200", "application/json"):
|
576
|
-
return utils.unmarshal_json(http_res.text, models.
|
104
|
+
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
577
105
|
if utils.match_response(
|
578
106
|
http_res, ["400", "401", "403", "404"], "application/json"
|
579
107
|
):
|
@@ -611,29 +139,27 @@ class Taxonomies(BaseSDK):
|
|
611
139
|
http_res,
|
612
140
|
)
|
613
141
|
|
614
|
-
async def
|
142
|
+
async def create_async(
|
615
143
|
self,
|
616
144
|
*,
|
617
|
-
|
145
|
+
taxonomy_name: str,
|
146
|
+
config: Union[models.TaxonomyConfig, models.TaxonomyConfigTypedDict],
|
618
147
|
x_namespace: OptionalNullable[str] = UNSET,
|
619
|
-
taxonomy_name: OptionalNullable[str] = UNSET,
|
620
148
|
description: OptionalNullable[str] = UNSET,
|
621
149
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
622
150
|
server_url: Optional[str] = None,
|
623
151
|
timeout_ms: Optional[int] = None,
|
624
152
|
http_headers: Optional[Mapping[str, str]] = None,
|
625
|
-
) -> models.
|
626
|
-
r"""
|
627
|
-
|
628
|
-
Update an existing taxonomy's metadata
|
153
|
+
) -> models.TaskResponse:
|
154
|
+
r"""Create Taxonomy
|
629
155
|
|
630
156
|
**Requirements:**
|
631
157
|
- Required permissions: write
|
632
158
|
|
633
|
-
:param
|
159
|
+
:param taxonomy_name:
|
160
|
+
:param config: Base configuration for all taxonomy types
|
634
161
|
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
635
|
-
:param
|
636
|
-
:param description: Updated taxonomy description
|
162
|
+
:param description:
|
637
163
|
:param retries: Override the default retry configuration for this method
|
638
164
|
:param server_url: Override the default server URL for this method
|
639
165
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -649,30 +175,34 @@ class Taxonomies(BaseSDK):
|
|
649
175
|
else:
|
650
176
|
base_url = self._get_url(base_url, url_variables)
|
651
177
|
|
652
|
-
request = models.
|
653
|
-
taxonomy=taxonomy,
|
178
|
+
request = models.CreateTaxonomyV1TaxonomiesPostRequest(
|
654
179
|
x_namespace=x_namespace,
|
655
|
-
|
180
|
+
create_taxonomy_request=models.CreateTaxonomyRequest(
|
656
181
|
taxonomy_name=taxonomy_name,
|
657
182
|
description=description,
|
183
|
+
config=utils.get_pydantic_model(config, models.TaxonomyConfig),
|
658
184
|
),
|
659
185
|
)
|
660
186
|
|
661
187
|
req = self._build_request_async(
|
662
|
-
method="
|
663
|
-
path="/v1/
|
188
|
+
method="POST",
|
189
|
+
path="/v1/taxonomies",
|
664
190
|
base_url=base_url,
|
665
191
|
url_variables=url_variables,
|
666
192
|
request=request,
|
667
193
|
request_body_required=True,
|
668
|
-
request_has_path_params=
|
194
|
+
request_has_path_params=False,
|
669
195
|
request_has_query_params=True,
|
670
196
|
user_agent_header="user-agent",
|
671
197
|
accept_header_value="application/json",
|
672
198
|
http_headers=http_headers,
|
673
199
|
security=self.sdk_configuration.security,
|
674
200
|
get_serialized_body=lambda: utils.serialize_request_body(
|
675
|
-
request.
|
201
|
+
request.create_taxonomy_request,
|
202
|
+
False,
|
203
|
+
False,
|
204
|
+
"json",
|
205
|
+
models.CreateTaxonomyRequest,
|
676
206
|
),
|
677
207
|
timeout_ms=timeout_ms,
|
678
208
|
)
|
@@ -688,7 +218,7 @@ class Taxonomies(BaseSDK):
|
|
688
218
|
http_res = await self.do_request_async(
|
689
219
|
hook_ctx=HookContext(
|
690
220
|
base_url=base_url or "",
|
691
|
-
operation_id="
|
221
|
+
operation_id="create_taxonomy_v1_taxonomies_post",
|
692
222
|
oauth2_scopes=[],
|
693
223
|
security_source=get_security_from_env(
|
694
224
|
self.sdk_configuration.security, models.Security
|
@@ -701,7 +231,7 @@ class Taxonomies(BaseSDK):
|
|
701
231
|
|
702
232
|
response_data: Any = None
|
703
233
|
if utils.match_response(http_res, "200", "application/json"):
|
704
|
-
return utils.unmarshal_json(http_res.text, models.
|
234
|
+
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
705
235
|
if utils.match_response(
|
706
236
|
http_res, ["400", "401", "403", "404"], "application/json"
|
707
237
|
):
|
mixpeek/types/basemodel.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
from pydantic import ConfigDict, model_serializer
|
4
4
|
from pydantic import BaseModel as PydanticBaseModel
|
5
|
-
from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union
|
5
|
+
from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union
|
6
6
|
from typing_extensions import TypeAliasType, TypeAlias
|
7
7
|
|
8
8
|
|
@@ -35,5 +35,5 @@ else:
|
|
35
35
|
"OptionalNullable", Union[Optional[Nullable[T]], Unset], type_params=(T,)
|
36
36
|
)
|
37
37
|
|
38
|
-
UnrecognizedInt =
|
39
|
-
UnrecognizedStr =
|
38
|
+
UnrecognizedInt: TypeAlias = int
|
39
|
+
UnrecognizedStr: TypeAlias = str
|