mixpeek 0.11.2__py3-none-any.whl → 0.13__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/__init__.py +9 -1
- mixpeek/_hooks/__init__.py +5 -0
- mixpeek/_hooks/registration.py +13 -0
- mixpeek/_hooks/sdkhooks.py +76 -0
- mixpeek/_hooks/types.py +94 -0
- mixpeek/_version.py +12 -0
- mixpeek/assets.py +1561 -0
- mixpeek/basesdk.py +350 -0
- mixpeek/collections.py +1029 -0
- mixpeek/featureextractors.py +205 -0
- mixpeek/features.py +1181 -0
- mixpeek/health.py +167 -0
- mixpeek/httpclient.py +84 -0
- mixpeek/ingest.py +831 -0
- mixpeek/interactions.py +221 -0
- mixpeek/models/__init__.py +751 -0
- mixpeek/models/actionusage.py +16 -0
- mixpeek/models/apierror.py +22 -0
- mixpeek/models/apikey.py +25 -0
- mixpeek/models/apikeyupdate.py +49 -0
- mixpeek/models/assetfeatures.py +55 -0
- mixpeek/models/assetresponse.py +166 -0
- mixpeek/models/assets_model_searchquery.py +21 -0
- mixpeek/models/assetupdate.py +28 -0
- mixpeek/models/availableindexesresponse.py +23 -0
- mixpeek/models/availablemodels.py +12 -0
- mixpeek/models/boolindexparams.py +18 -0
- mixpeek/models/collectionmodel.py +70 -0
- mixpeek/models/collectionresult.py +73 -0
- mixpeek/models/create_api_key_organizations_users_user_email_api_keys_postop.py +23 -0
- mixpeek/models/create_collection_collections_postop.py +62 -0
- mixpeek/models/create_interaction_features_search_interactions_postop.py +59 -0
- mixpeek/models/createcollectionrequest.py +59 -0
- mixpeek/models/createnamespacerequest.py +62 -0
- mixpeek/models/datetimeindexparams.py +18 -0
- mixpeek/models/dateusage.py +22 -0
- mixpeek/models/db_model_paginationresponse.py +59 -0
- mixpeek/models/db_model_taskresponse.py +20 -0
- mixpeek/models/delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py +23 -0
- mixpeek/models/delete_asset_assets_asset_id_deleteop.py +57 -0
- mixpeek/models/delete_collection_collections_collection_deleteop.py +59 -0
- mixpeek/models/delete_feature_features_feature_id_deleteop.py +57 -0
- mixpeek/models/delete_interaction_features_search_interactions_interaction_id_deleteop.py +59 -0
- mixpeek/models/delete_namespace_namespaces_namespace_deleteop.py +18 -0
- mixpeek/models/delete_user_organizations_users_user_email_deleteop.py +16 -0
- mixpeek/models/denseembedding.py +16 -0
- mixpeek/models/embeddingrequest.py +59 -0
- mixpeek/models/embeddingresponse.py +64 -0
- mixpeek/models/errormessage.py +13 -0
- mixpeek/models/errorresponse.py +21 -0
- mixpeek/models/facedetectsettings.py +52 -0
- mixpeek/models/featureextractionembeddingrequest.py +54 -0
- mixpeek/models/featureresponse.py +74 -0
- mixpeek/models/features_model_paginationresponse.py +59 -0
- mixpeek/models/featureupdaterequest.py +21 -0
- mixpeek/models/filtercondition.py +74 -0
- mixpeek/models/floatindexparams.py +18 -0
- mixpeek/models/full_asset_update_assets_asset_id_putop.py +69 -0
- mixpeek/models/full_feature_update_features_feature_id_putop.py +69 -0
- mixpeek/models/geoindexparams.py +18 -0
- mixpeek/models/get_asset_assets_asset_id_getop.py +73 -0
- mixpeek/models/get_asset_with_features_assets_asset_id_features_getop.py +73 -0
- mixpeek/models/get_collection_collections_collection_getop.py +59 -0
- mixpeek/models/get_feature_features_feature_id_getop.py +70 -0
- mixpeek/models/get_interaction_features_search_interactions_interaction_id_getop.py +59 -0
- mixpeek/models/get_namespace_namespaces_namespace_getop.py +18 -0
- mixpeek/models/get_task_tasks_task_id_getop.py +57 -0
- mixpeek/models/get_user_organizations_users_user_email_getop.py +16 -0
- mixpeek/models/groupbyoptions.py +71 -0
- mixpeek/models/groupbyoptionsasset.py +71 -0
- mixpeek/models/groupedassetdata.py +18 -0
- mixpeek/models/healthcheckresponse.py +13 -0
- mixpeek/models/httpvalidationerror.py +21 -0
- mixpeek/models/imagedescribesettings.py +82 -0
- mixpeek/models/imagedetectsettings.py +53 -0
- mixpeek/models/imagereadsettings.py +71 -0
- mixpeek/models/imagesettings.py +79 -0
- mixpeek/models/ingest_image_url_ingest_images_url_postop.py +59 -0
- mixpeek/models/ingest_text_ingest_text_postop.py +59 -0
- mixpeek/models/ingest_video_url_ingest_videos_url_postop.py +59 -0
- mixpeek/models/inputtype.py +11 -0
- mixpeek/models/integerindexparams.py +24 -0
- mixpeek/models/interactionresponse.py +87 -0
- mixpeek/models/interactiontype.py +11 -0
- mixpeek/models/jsonimageoutputsettings.py +55 -0
- mixpeek/models/jsontextoutputsettings.py +55 -0
- mixpeek/models/jsonvideooutputsettings.py +55 -0
- mixpeek/models/keywordindexparams.py +21 -0
- mixpeek/models/kill_task_tasks_task_id_deleteop.py +57 -0
- mixpeek/models/list_assets_assets_postop.py +77 -0
- mixpeek/models/list_collections_collections_getop.py +65 -0
- mixpeek/models/list_features_features_postop.py +79 -0
- mixpeek/models/list_interactions_features_search_interactions_getop.py +96 -0
- mixpeek/models/listassetsrequest.py +75 -0
- mixpeek/models/listassetsresponse.py +22 -0
- mixpeek/models/listcollectionsresponse.py +22 -0
- mixpeek/models/listfeaturesrequest.py +77 -0
- mixpeek/models/listfeaturesresponse.py +22 -0
- mixpeek/models/logicaloperator_input.py +88 -0
- mixpeek/models/logicaloperator_output.py +103 -0
- mixpeek/models/logodetectsettings.py +52 -0
- mixpeek/models/modality.py +13 -0
- mixpeek/models/modeldetails.py +57 -0
- mixpeek/models/namespaceresponse.py +54 -0
- mixpeek/models/organizationmodel.py +45 -0
- mixpeek/models/partial_asset_update_assets_asset_id_patchop.py +69 -0
- mixpeek/models/payloadindexconfig.py +94 -0
- mixpeek/models/payloadindextype.py +17 -0
- mixpeek/models/payloadschematype.py +15 -0
- mixpeek/models/percolaterequest.py +57 -0
- mixpeek/models/permission.py +10 -0
- mixpeek/models/processimageurlinput.py +99 -0
- mixpeek/models/processtextinput.py +94 -0
- mixpeek/models/processvideourlinput.py +99 -0
- mixpeek/models/querysettings.py +56 -0
- mixpeek/models/rerankingoptions.py +47 -0
- mixpeek/models/search_assets_assets_search_postop.py +59 -0
- mixpeek/models/search_features_features_search_postop.py +96 -0
- mixpeek/models/search_model_searchquery_input.py +76 -0
- mixpeek/models/searchassetsrequest.py +78 -0
- mixpeek/models/searchinteraction.py +82 -0
- mixpeek/models/searchquery_output.py +79 -0
- mixpeek/models/searchrequestfeatures_input.py +151 -0
- mixpeek/models/searchrequestfeatures_output.py +151 -0
- mixpeek/models/sortoption.py +28 -0
- mixpeek/models/sparseembedding.py +21 -0
- mixpeek/models/tasks_model_taskresponse.py +24 -0
- mixpeek/models/taskstatus.py +16 -0
- mixpeek/models/textindexparams.py +31 -0
- mixpeek/models/textsettings.py +61 -0
- mixpeek/models/tokenizertype.py +11 -0
- mixpeek/models/update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py +30 -0
- mixpeek/models/update_collection_collections_collection_putop.py +74 -0
- mixpeek/models/update_namespace_namespaces_namespace_putop.py +28 -0
- mixpeek/models/updateassetrequest.py +60 -0
- mixpeek/models/updatenamespacerequest.py +26 -0
- mixpeek/models/usage.py +18 -0
- mixpeek/models/usermodel_input.py +36 -0
- mixpeek/models/usermodel_output.py +36 -0
- mixpeek/models/uuidindexparams.py +21 -0
- mixpeek/models/validationerror.py +26 -0
- mixpeek/models/vectormodel.py +11 -0
- mixpeek/models/vectortype.py +9 -0
- mixpeek/models/videodescribesettings.py +82 -0
- mixpeek/models/videodetectsettings.py +53 -0
- mixpeek/models/videoreadsettings.py +71 -0
- mixpeek/models/videosettings.py +101 -0
- mixpeek/models/videotranscriptionsettings.py +69 -0
- mixpeek/namespaces.py +1143 -0
- mixpeek/organizations.py +1508 -0
- mixpeek/py.typed +1 -0
- mixpeek/sdk.py +135 -0
- mixpeek/sdkconfiguration.py +45 -0
- mixpeek/searchinteractions.py +647 -0
- mixpeek/tasks.py +387 -0
- mixpeek/types/__init__.py +21 -0
- mixpeek/types/basemodel.py +39 -0
- mixpeek/utils/__init__.py +97 -0
- mixpeek/utils/annotations.py +55 -0
- mixpeek/utils/enums.py +34 -0
- mixpeek/utils/eventstreaming.py +238 -0
- mixpeek/utils/forms.py +202 -0
- mixpeek/utils/headers.py +136 -0
- mixpeek/utils/logger.py +27 -0
- mixpeek/utils/metadata.py +118 -0
- mixpeek/utils/queryparams.py +205 -0
- mixpeek/utils/requestbodies.py +66 -0
- mixpeek/utils/retries.py +217 -0
- mixpeek/utils/security.py +174 -0
- mixpeek/utils/serializers.py +215 -0
- mixpeek/utils/url.py +155 -0
- mixpeek/utils/values.py +134 -0
- mixpeek-0.13.dist-info/METADATA +439 -0
- mixpeek-0.13.dist-info/RECORD +176 -0
- {mixpeek-0.11.2.dist-info → mixpeek-0.13.dist-info}/WHEEL +1 -2
- py.typed +1 -0
- mixpeek/client.py +0 -27
- mixpeek/endpoints/__init__.py +0 -0
- mixpeek/endpoints/collections.py +0 -86
- mixpeek/endpoints/embed.py +0 -66
- mixpeek/endpoints/index.py +0 -51
- mixpeek/endpoints/register.py +0 -34
- mixpeek/endpoints/search.py +0 -44
- mixpeek/endpoints/tasks.py +0 -26
- mixpeek/endpoints/tools.py +0 -138
- mixpeek/exceptions.py +0 -13
- mixpeek-0.11.2.dist-info/METADATA +0 -375
- mixpeek-0.11.2.dist-info/RECORD +0 -15
- mixpeek-0.11.2.dist-info/top_level.txt +0 -1
@@ -0,0 +1,55 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from pydantic import model_serializer
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
7
|
+
|
8
|
+
|
9
|
+
class ResponseShapeTypedDict(TypedDict):
|
10
|
+
pass
|
11
|
+
|
12
|
+
|
13
|
+
class ResponseShape(BaseModel):
|
14
|
+
pass
|
15
|
+
|
16
|
+
|
17
|
+
class JSONTextOutputSettingsTypedDict(TypedDict):
|
18
|
+
response_shape: NotRequired[Nullable[ResponseShapeTypedDict]]
|
19
|
+
prompt: NotRequired[Nullable[str]]
|
20
|
+
|
21
|
+
|
22
|
+
class JSONTextOutputSettings(BaseModel):
|
23
|
+
response_shape: OptionalNullable[ResponseShape] = UNSET
|
24
|
+
|
25
|
+
prompt: OptionalNullable[str] = UNSET
|
26
|
+
|
27
|
+
@model_serializer(mode="wrap")
|
28
|
+
def serialize_model(self, handler):
|
29
|
+
optional_fields = ["response_shape", "prompt"]
|
30
|
+
nullable_fields = ["response_shape", "prompt"]
|
31
|
+
null_default_fields = []
|
32
|
+
|
33
|
+
serialized = handler(self)
|
34
|
+
|
35
|
+
m = {}
|
36
|
+
|
37
|
+
for n, f in self.model_fields.items():
|
38
|
+
k = f.alias or n
|
39
|
+
val = serialized.get(k)
|
40
|
+
serialized.pop(k, None)
|
41
|
+
|
42
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
43
|
+
is_set = (
|
44
|
+
self.__pydantic_fields_set__.intersection({n})
|
45
|
+
or k in null_default_fields
|
46
|
+
) # pylint: disable=no-member
|
47
|
+
|
48
|
+
if val is not None and val != UNSET_SENTINEL:
|
49
|
+
m[k] = val
|
50
|
+
elif val != UNSET_SENTINEL and (
|
51
|
+
not k in optional_fields or (optional_nullable and is_set)
|
52
|
+
):
|
53
|
+
m[k] = val
|
54
|
+
|
55
|
+
return m
|
@@ -0,0 +1,55 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from pydantic import model_serializer
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
7
|
+
|
8
|
+
|
9
|
+
class JSONVideoOutputSettingsResponseShapeTypedDict(TypedDict):
|
10
|
+
pass
|
11
|
+
|
12
|
+
|
13
|
+
class JSONVideoOutputSettingsResponseShape(BaseModel):
|
14
|
+
pass
|
15
|
+
|
16
|
+
|
17
|
+
class JSONVideoOutputSettingsTypedDict(TypedDict):
|
18
|
+
response_shape: NotRequired[Nullable[JSONVideoOutputSettingsResponseShapeTypedDict]]
|
19
|
+
prompt: NotRequired[Nullable[str]]
|
20
|
+
|
21
|
+
|
22
|
+
class JSONVideoOutputSettings(BaseModel):
|
23
|
+
response_shape: OptionalNullable[JSONVideoOutputSettingsResponseShape] = UNSET
|
24
|
+
|
25
|
+
prompt: OptionalNullable[str] = UNSET
|
26
|
+
|
27
|
+
@model_serializer(mode="wrap")
|
28
|
+
def serialize_model(self, handler):
|
29
|
+
optional_fields = ["response_shape", "prompt"]
|
30
|
+
nullable_fields = ["response_shape", "prompt"]
|
31
|
+
null_default_fields = []
|
32
|
+
|
33
|
+
serialized = handler(self)
|
34
|
+
|
35
|
+
m = {}
|
36
|
+
|
37
|
+
for n, f in self.model_fields.items():
|
38
|
+
k = f.alias or n
|
39
|
+
val = serialized.get(k)
|
40
|
+
serialized.pop(k, None)
|
41
|
+
|
42
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
43
|
+
is_set = (
|
44
|
+
self.__pydantic_fields_set__.intersection({n})
|
45
|
+
or k in null_default_fields
|
46
|
+
) # pylint: disable=no-member
|
47
|
+
|
48
|
+
if val is not None and val != UNSET_SENTINEL:
|
49
|
+
m[k] = val
|
50
|
+
elif val != UNSET_SENTINEL and (
|
51
|
+
not k in optional_fields or (optional_nullable and is_set)
|
52
|
+
):
|
53
|
+
m[k] = val
|
54
|
+
|
55
|
+
return m
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
7
|
+
|
8
|
+
|
9
|
+
class KeywordIndexParamsTypedDict(TypedDict):
|
10
|
+
r"""Configuration for keyword index"""
|
11
|
+
|
12
|
+
type: NotRequired[str]
|
13
|
+
is_tenant: NotRequired[bool]
|
14
|
+
|
15
|
+
|
16
|
+
class KeywordIndexParams(BaseModel):
|
17
|
+
r"""Configuration for keyword index"""
|
18
|
+
|
19
|
+
type: Optional[str] = "keyword"
|
20
|
+
|
21
|
+
is_tenant: Optional[bool] = False
|
@@ -0,0 +1,57 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from mixpeek.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
|
6
|
+
import pydantic
|
7
|
+
from pydantic import model_serializer
|
8
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
9
|
+
|
10
|
+
|
11
|
+
class KillTaskTasksTaskIDDeleteRequestTypedDict(TypedDict):
|
12
|
+
task_id: str
|
13
|
+
x_namespace: NotRequired[Nullable[str]]
|
14
|
+
r"""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."""
|
15
|
+
|
16
|
+
|
17
|
+
class KillTaskTasksTaskIDDeleteRequest(BaseModel):
|
18
|
+
task_id: Annotated[
|
19
|
+
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
20
|
+
]
|
21
|
+
|
22
|
+
x_namespace: Annotated[
|
23
|
+
OptionalNullable[str],
|
24
|
+
pydantic.Field(alias="X-Namespace"),
|
25
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
26
|
+
] = UNSET
|
27
|
+
r"""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
|
+
|
29
|
+
@model_serializer(mode="wrap")
|
30
|
+
def serialize_model(self, handler):
|
31
|
+
optional_fields = ["X-Namespace"]
|
32
|
+
nullable_fields = ["X-Namespace"]
|
33
|
+
null_default_fields = []
|
34
|
+
|
35
|
+
serialized = handler(self)
|
36
|
+
|
37
|
+
m = {}
|
38
|
+
|
39
|
+
for n, f in self.model_fields.items():
|
40
|
+
k = f.alias or n
|
41
|
+
val = serialized.get(k)
|
42
|
+
serialized.pop(k, None)
|
43
|
+
|
44
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
45
|
+
is_set = (
|
46
|
+
self.__pydantic_fields_set__.intersection({n})
|
47
|
+
or k in null_default_fields
|
48
|
+
) # pylint: disable=no-member
|
49
|
+
|
50
|
+
if val is not None and val != UNSET_SENTINEL:
|
51
|
+
m[k] = val
|
52
|
+
elif val != UNSET_SENTINEL and (
|
53
|
+
not k in optional_fields or (optional_nullable and is_set)
|
54
|
+
):
|
55
|
+
m[k] = val
|
56
|
+
|
57
|
+
return m
|
@@ -0,0 +1,77 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .listassetsrequest import ListAssetsRequest, ListAssetsRequestTypedDict
|
5
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
|
+
from mixpeek.utils import (
|
7
|
+
FieldMetadata,
|
8
|
+
HeaderMetadata,
|
9
|
+
QueryParamMetadata,
|
10
|
+
RequestMetadata,
|
11
|
+
)
|
12
|
+
import pydantic
|
13
|
+
from pydantic import model_serializer
|
14
|
+
from typing import Optional
|
15
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
16
|
+
|
17
|
+
|
18
|
+
class ListAssetsAssetsPostRequestTypedDict(TypedDict):
|
19
|
+
list_assets_request: ListAssetsRequestTypedDict
|
20
|
+
page: NotRequired[Nullable[int]]
|
21
|
+
page_size: NotRequired[int]
|
22
|
+
x_namespace: NotRequired[Nullable[str]]
|
23
|
+
r"""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."""
|
24
|
+
|
25
|
+
|
26
|
+
class ListAssetsAssetsPostRequest(BaseModel):
|
27
|
+
list_assets_request: Annotated[
|
28
|
+
ListAssetsRequest,
|
29
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
30
|
+
]
|
31
|
+
|
32
|
+
page: Annotated[
|
33
|
+
OptionalNullable[int],
|
34
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
35
|
+
] = UNSET
|
36
|
+
|
37
|
+
page_size: Annotated[
|
38
|
+
Optional[int],
|
39
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
40
|
+
] = 10
|
41
|
+
|
42
|
+
x_namespace: Annotated[
|
43
|
+
OptionalNullable[str],
|
44
|
+
pydantic.Field(alias="X-Namespace"),
|
45
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
46
|
+
] = UNSET
|
47
|
+
r"""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."""
|
48
|
+
|
49
|
+
@model_serializer(mode="wrap")
|
50
|
+
def serialize_model(self, handler):
|
51
|
+
optional_fields = ["page", "page_size", "X-Namespace"]
|
52
|
+
nullable_fields = ["page", "X-Namespace"]
|
53
|
+
null_default_fields = []
|
54
|
+
|
55
|
+
serialized = handler(self)
|
56
|
+
|
57
|
+
m = {}
|
58
|
+
|
59
|
+
for n, f in self.model_fields.items():
|
60
|
+
k = f.alias or n
|
61
|
+
val = serialized.get(k)
|
62
|
+
serialized.pop(k, None)
|
63
|
+
|
64
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
65
|
+
is_set = (
|
66
|
+
self.__pydantic_fields_set__.intersection({n})
|
67
|
+
or k in null_default_fields
|
68
|
+
) # pylint: disable=no-member
|
69
|
+
|
70
|
+
if val is not None and val != UNSET_SENTINEL:
|
71
|
+
m[k] = val
|
72
|
+
elif val != UNSET_SENTINEL and (
|
73
|
+
not k in optional_fields or (optional_nullable and is_set)
|
74
|
+
):
|
75
|
+
m[k] = val
|
76
|
+
|
77
|
+
return m
|
@@ -0,0 +1,65 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from mixpeek.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
6
|
+
import pydantic
|
7
|
+
from pydantic import model_serializer
|
8
|
+
from typing import Optional
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class ListCollectionsCollectionsGetRequestTypedDict(TypedDict):
|
13
|
+
page: NotRequired[Nullable[int]]
|
14
|
+
page_size: NotRequired[int]
|
15
|
+
x_namespace: NotRequired[Nullable[str]]
|
16
|
+
r"""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."""
|
17
|
+
|
18
|
+
|
19
|
+
class ListCollectionsCollectionsGetRequest(BaseModel):
|
20
|
+
page: Annotated[
|
21
|
+
OptionalNullable[int],
|
22
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
23
|
+
] = UNSET
|
24
|
+
|
25
|
+
page_size: Annotated[
|
26
|
+
Optional[int],
|
27
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
28
|
+
] = 10
|
29
|
+
|
30
|
+
x_namespace: Annotated[
|
31
|
+
OptionalNullable[str],
|
32
|
+
pydantic.Field(alias="X-Namespace"),
|
33
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
34
|
+
] = UNSET
|
35
|
+
r"""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."""
|
36
|
+
|
37
|
+
@model_serializer(mode="wrap")
|
38
|
+
def serialize_model(self, handler):
|
39
|
+
optional_fields = ["page", "page_size", "X-Namespace"]
|
40
|
+
nullable_fields = ["page", "X-Namespace"]
|
41
|
+
null_default_fields = []
|
42
|
+
|
43
|
+
serialized = handler(self)
|
44
|
+
|
45
|
+
m = {}
|
46
|
+
|
47
|
+
for n, f in self.model_fields.items():
|
48
|
+
k = f.alias or n
|
49
|
+
val = serialized.get(k)
|
50
|
+
serialized.pop(k, None)
|
51
|
+
|
52
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
53
|
+
is_set = (
|
54
|
+
self.__pydantic_fields_set__.intersection({n})
|
55
|
+
or k in null_default_fields
|
56
|
+
) # pylint: disable=no-member
|
57
|
+
|
58
|
+
if val is not None and val != UNSET_SENTINEL:
|
59
|
+
m[k] = val
|
60
|
+
elif val != UNSET_SENTINEL and (
|
61
|
+
not k in optional_fields or (optional_nullable and is_set)
|
62
|
+
):
|
63
|
+
m[k] = val
|
64
|
+
|
65
|
+
return m
|
@@ -0,0 +1,79 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .listfeaturesrequest import ListFeaturesRequest, ListFeaturesRequestTypedDict
|
5
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
|
+
from mixpeek.utils import (
|
7
|
+
FieldMetadata,
|
8
|
+
HeaderMetadata,
|
9
|
+
QueryParamMetadata,
|
10
|
+
RequestMetadata,
|
11
|
+
)
|
12
|
+
import pydantic
|
13
|
+
from pydantic import model_serializer
|
14
|
+
from typing import Optional
|
15
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
16
|
+
|
17
|
+
|
18
|
+
class ListFeaturesFeaturesPostRequestTypedDict(TypedDict):
|
19
|
+
list_features_request: ListFeaturesRequestTypedDict
|
20
|
+
offset_feature_id: NotRequired[Nullable[str]]
|
21
|
+
r"""The offset id to start returning results from. Used for pagination"""
|
22
|
+
page_size: NotRequired[int]
|
23
|
+
x_namespace: NotRequired[Nullable[str]]
|
24
|
+
r"""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."""
|
25
|
+
|
26
|
+
|
27
|
+
class ListFeaturesFeaturesPostRequest(BaseModel):
|
28
|
+
list_features_request: Annotated[
|
29
|
+
ListFeaturesRequest,
|
30
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
31
|
+
]
|
32
|
+
|
33
|
+
offset_feature_id: Annotated[
|
34
|
+
OptionalNullable[str],
|
35
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
36
|
+
] = UNSET
|
37
|
+
r"""The offset id to start returning results from. Used for pagination"""
|
38
|
+
|
39
|
+
page_size: Annotated[
|
40
|
+
Optional[int],
|
41
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
42
|
+
] = 10
|
43
|
+
|
44
|
+
x_namespace: Annotated[
|
45
|
+
OptionalNullable[str],
|
46
|
+
pydantic.Field(alias="X-Namespace"),
|
47
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
48
|
+
] = UNSET
|
49
|
+
r"""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."""
|
50
|
+
|
51
|
+
@model_serializer(mode="wrap")
|
52
|
+
def serialize_model(self, handler):
|
53
|
+
optional_fields = ["offset_feature_id", "page_size", "X-Namespace"]
|
54
|
+
nullable_fields = ["offset_feature_id", "X-Namespace"]
|
55
|
+
null_default_fields = []
|
56
|
+
|
57
|
+
serialized = handler(self)
|
58
|
+
|
59
|
+
m = {}
|
60
|
+
|
61
|
+
for n, f in self.model_fields.items():
|
62
|
+
k = f.alias or n
|
63
|
+
val = serialized.get(k)
|
64
|
+
serialized.pop(k, None)
|
65
|
+
|
66
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
67
|
+
is_set = (
|
68
|
+
self.__pydantic_fields_set__.intersection({n})
|
69
|
+
or k in null_default_fields
|
70
|
+
) # pylint: disable=no-member
|
71
|
+
|
72
|
+
if val is not None and val != UNSET_SENTINEL:
|
73
|
+
m[k] = val
|
74
|
+
elif val != UNSET_SENTINEL and (
|
75
|
+
not k in optional_fields or (optional_nullable and is_set)
|
76
|
+
):
|
77
|
+
m[k] = val
|
78
|
+
|
79
|
+
return m
|
@@ -0,0 +1,96 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from mixpeek.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
6
|
+
import pydantic
|
7
|
+
from pydantic import model_serializer
|
8
|
+
from typing import Optional
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class ListInteractionsFeaturesSearchInteractionsGetRequestTypedDict(TypedDict):
|
13
|
+
feature_id: NotRequired[Nullable[str]]
|
14
|
+
interaction_type: NotRequired[Nullable[str]]
|
15
|
+
session_id: NotRequired[Nullable[str]]
|
16
|
+
page: NotRequired[Nullable[int]]
|
17
|
+
page_size: NotRequired[int]
|
18
|
+
x_namespace: NotRequired[Nullable[str]]
|
19
|
+
r"""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."""
|
20
|
+
|
21
|
+
|
22
|
+
class ListInteractionsFeaturesSearchInteractionsGetRequest(BaseModel):
|
23
|
+
feature_id: Annotated[
|
24
|
+
OptionalNullable[str],
|
25
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
26
|
+
] = UNSET
|
27
|
+
|
28
|
+
interaction_type: Annotated[
|
29
|
+
OptionalNullable[str],
|
30
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
31
|
+
] = UNSET
|
32
|
+
|
33
|
+
session_id: Annotated[
|
34
|
+
OptionalNullable[str],
|
35
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
36
|
+
] = UNSET
|
37
|
+
|
38
|
+
page: Annotated[
|
39
|
+
OptionalNullable[int],
|
40
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
41
|
+
] = UNSET
|
42
|
+
|
43
|
+
page_size: Annotated[
|
44
|
+
Optional[int],
|
45
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
46
|
+
] = 10
|
47
|
+
|
48
|
+
x_namespace: Annotated[
|
49
|
+
OptionalNullable[str],
|
50
|
+
pydantic.Field(alias="X-Namespace"),
|
51
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
52
|
+
] = UNSET
|
53
|
+
r"""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."""
|
54
|
+
|
55
|
+
@model_serializer(mode="wrap")
|
56
|
+
def serialize_model(self, handler):
|
57
|
+
optional_fields = [
|
58
|
+
"feature_id",
|
59
|
+
"interaction_type",
|
60
|
+
"session_id",
|
61
|
+
"page",
|
62
|
+
"page_size",
|
63
|
+
"X-Namespace",
|
64
|
+
]
|
65
|
+
nullable_fields = [
|
66
|
+
"feature_id",
|
67
|
+
"interaction_type",
|
68
|
+
"session_id",
|
69
|
+
"page",
|
70
|
+
"X-Namespace",
|
71
|
+
]
|
72
|
+
null_default_fields = []
|
73
|
+
|
74
|
+
serialized = handler(self)
|
75
|
+
|
76
|
+
m = {}
|
77
|
+
|
78
|
+
for n, f in self.model_fields.items():
|
79
|
+
k = f.alias or n
|
80
|
+
val = serialized.get(k)
|
81
|
+
serialized.pop(k, None)
|
82
|
+
|
83
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
84
|
+
is_set = (
|
85
|
+
self.__pydantic_fields_set__.intersection({n})
|
86
|
+
or k in null_default_fields
|
87
|
+
) # pylint: disable=no-member
|
88
|
+
|
89
|
+
if val is not None and val != UNSET_SENTINEL:
|
90
|
+
m[k] = val
|
91
|
+
elif val != UNSET_SENTINEL and (
|
92
|
+
not k in optional_fields or (optional_nullable and is_set)
|
93
|
+
):
|
94
|
+
m[k] = val
|
95
|
+
|
96
|
+
return m
|
@@ -0,0 +1,75 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .groupbyoptionsasset import GroupByOptionsAsset, GroupByOptionsAssetTypedDict
|
5
|
+
from .logicaloperator_input import LogicalOperatorInput, LogicalOperatorInputTypedDict
|
6
|
+
from .sortoption import SortOption, SortOptionTypedDict
|
7
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
8
|
+
from pydantic import model_serializer
|
9
|
+
from typing import List
|
10
|
+
from typing_extensions import NotRequired, TypedDict
|
11
|
+
|
12
|
+
|
13
|
+
class ListAssetsRequestTypedDict(TypedDict):
|
14
|
+
collections: List[str]
|
15
|
+
r"""List of Collection IDs or Names to search within, required"""
|
16
|
+
filters: NotRequired[Nullable[LogicalOperatorInputTypedDict]]
|
17
|
+
r"""Used for filtering across all indexes"""
|
18
|
+
group_by: NotRequired[Nullable[GroupByOptionsAssetTypedDict]]
|
19
|
+
r"""Grouping options for search results"""
|
20
|
+
sort: NotRequired[Nullable[SortOptionTypedDict]]
|
21
|
+
r"""List of fields to sort by, with direction (asc or desc). Supports dot notation for nested fields."""
|
22
|
+
select: NotRequired[Nullable[List[str]]]
|
23
|
+
r"""List of fields to return in results, supports dot notation. If None, all fields are returned."""
|
24
|
+
return_url: NotRequired[Nullable[bool]]
|
25
|
+
r"""Return the presigned URL for the asset and preview asset, this will introduce additional latency"""
|
26
|
+
|
27
|
+
|
28
|
+
class ListAssetsRequest(BaseModel):
|
29
|
+
collections: List[str]
|
30
|
+
r"""List of Collection IDs or Names to search within, required"""
|
31
|
+
|
32
|
+
filters: OptionalNullable[LogicalOperatorInput] = UNSET
|
33
|
+
r"""Used for filtering across all indexes"""
|
34
|
+
|
35
|
+
group_by: OptionalNullable[GroupByOptionsAsset] = UNSET
|
36
|
+
r"""Grouping options for search results"""
|
37
|
+
|
38
|
+
sort: OptionalNullable[SortOption] = UNSET
|
39
|
+
r"""List of fields to sort by, with direction (asc or desc). Supports dot notation for nested fields."""
|
40
|
+
|
41
|
+
select: OptionalNullable[List[str]] = UNSET
|
42
|
+
r"""List of fields to return in results, supports dot notation. If None, all fields are returned."""
|
43
|
+
|
44
|
+
return_url: OptionalNullable[bool] = UNSET
|
45
|
+
r"""Return the presigned URL for the asset and preview asset, this will introduce additional latency"""
|
46
|
+
|
47
|
+
@model_serializer(mode="wrap")
|
48
|
+
def serialize_model(self, handler):
|
49
|
+
optional_fields = ["filters", "group_by", "sort", "select", "return_url"]
|
50
|
+
nullable_fields = ["filters", "group_by", "sort", "select", "return_url"]
|
51
|
+
null_default_fields = []
|
52
|
+
|
53
|
+
serialized = handler(self)
|
54
|
+
|
55
|
+
m = {}
|
56
|
+
|
57
|
+
for n, f in self.model_fields.items():
|
58
|
+
k = f.alias or n
|
59
|
+
val = serialized.get(k)
|
60
|
+
serialized.pop(k, None)
|
61
|
+
|
62
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
63
|
+
is_set = (
|
64
|
+
self.__pydantic_fields_set__.intersection({n})
|
65
|
+
or k in null_default_fields
|
66
|
+
) # pylint: disable=no-member
|
67
|
+
|
68
|
+
if val is not None and val != UNSET_SENTINEL:
|
69
|
+
m[k] = val
|
70
|
+
elif val != UNSET_SENTINEL and (
|
71
|
+
not k in optional_fields or (optional_nullable and is_set)
|
72
|
+
):
|
73
|
+
m[k] = val
|
74
|
+
|
75
|
+
return m
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .assetresponse import AssetResponse, AssetResponseTypedDict
|
5
|
+
from .db_model_paginationresponse import (
|
6
|
+
DbModelPaginationResponse,
|
7
|
+
DbModelPaginationResponseTypedDict,
|
8
|
+
)
|
9
|
+
from mixpeek.types import BaseModel
|
10
|
+
from typing import List
|
11
|
+
from typing_extensions import TypedDict
|
12
|
+
|
13
|
+
|
14
|
+
class ListAssetsResponseTypedDict(TypedDict):
|
15
|
+
results: List[AssetResponseTypedDict]
|
16
|
+
pagination: DbModelPaginationResponseTypedDict
|
17
|
+
|
18
|
+
|
19
|
+
class ListAssetsResponse(BaseModel):
|
20
|
+
results: List[AssetResponse]
|
21
|
+
|
22
|
+
pagination: DbModelPaginationResponse
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .collectionresult import CollectionResult, CollectionResultTypedDict
|
5
|
+
from .db_model_paginationresponse import (
|
6
|
+
DbModelPaginationResponse,
|
7
|
+
DbModelPaginationResponseTypedDict,
|
8
|
+
)
|
9
|
+
from mixpeek.types import BaseModel
|
10
|
+
from typing import List
|
11
|
+
from typing_extensions import TypedDict
|
12
|
+
|
13
|
+
|
14
|
+
class ListCollectionsResponseTypedDict(TypedDict):
|
15
|
+
results: List[CollectionResultTypedDict]
|
16
|
+
pagination: DbModelPaginationResponseTypedDict
|
17
|
+
|
18
|
+
|
19
|
+
class ListCollectionsResponse(BaseModel):
|
20
|
+
results: List[CollectionResult]
|
21
|
+
|
22
|
+
pagination: DbModelPaginationResponse
|