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.
Files changed (189) hide show
  1. mixpeek/__init__.py +9 -1
  2. mixpeek/_hooks/__init__.py +5 -0
  3. mixpeek/_hooks/registration.py +13 -0
  4. mixpeek/_hooks/sdkhooks.py +76 -0
  5. mixpeek/_hooks/types.py +94 -0
  6. mixpeek/_version.py +12 -0
  7. mixpeek/assets.py +1561 -0
  8. mixpeek/basesdk.py +350 -0
  9. mixpeek/collections.py +1029 -0
  10. mixpeek/featureextractors.py +205 -0
  11. mixpeek/features.py +1181 -0
  12. mixpeek/health.py +167 -0
  13. mixpeek/httpclient.py +84 -0
  14. mixpeek/ingest.py +831 -0
  15. mixpeek/interactions.py +221 -0
  16. mixpeek/models/__init__.py +751 -0
  17. mixpeek/models/actionusage.py +16 -0
  18. mixpeek/models/apierror.py +22 -0
  19. mixpeek/models/apikey.py +25 -0
  20. mixpeek/models/apikeyupdate.py +49 -0
  21. mixpeek/models/assetfeatures.py +55 -0
  22. mixpeek/models/assetresponse.py +166 -0
  23. mixpeek/models/assets_model_searchquery.py +21 -0
  24. mixpeek/models/assetupdate.py +28 -0
  25. mixpeek/models/availableindexesresponse.py +23 -0
  26. mixpeek/models/availablemodels.py +12 -0
  27. mixpeek/models/boolindexparams.py +18 -0
  28. mixpeek/models/collectionmodel.py +70 -0
  29. mixpeek/models/collectionresult.py +73 -0
  30. mixpeek/models/create_api_key_organizations_users_user_email_api_keys_postop.py +23 -0
  31. mixpeek/models/create_collection_collections_postop.py +62 -0
  32. mixpeek/models/create_interaction_features_search_interactions_postop.py +59 -0
  33. mixpeek/models/createcollectionrequest.py +59 -0
  34. mixpeek/models/createnamespacerequest.py +62 -0
  35. mixpeek/models/datetimeindexparams.py +18 -0
  36. mixpeek/models/dateusage.py +22 -0
  37. mixpeek/models/db_model_paginationresponse.py +59 -0
  38. mixpeek/models/db_model_taskresponse.py +20 -0
  39. mixpeek/models/delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py +23 -0
  40. mixpeek/models/delete_asset_assets_asset_id_deleteop.py +57 -0
  41. mixpeek/models/delete_collection_collections_collection_deleteop.py +59 -0
  42. mixpeek/models/delete_feature_features_feature_id_deleteop.py +57 -0
  43. mixpeek/models/delete_interaction_features_search_interactions_interaction_id_deleteop.py +59 -0
  44. mixpeek/models/delete_namespace_namespaces_namespace_deleteop.py +18 -0
  45. mixpeek/models/delete_user_organizations_users_user_email_deleteop.py +16 -0
  46. mixpeek/models/denseembedding.py +16 -0
  47. mixpeek/models/embeddingrequest.py +59 -0
  48. mixpeek/models/embeddingresponse.py +64 -0
  49. mixpeek/models/errormessage.py +13 -0
  50. mixpeek/models/errorresponse.py +21 -0
  51. mixpeek/models/facedetectsettings.py +52 -0
  52. mixpeek/models/featureextractionembeddingrequest.py +54 -0
  53. mixpeek/models/featureresponse.py +74 -0
  54. mixpeek/models/features_model_paginationresponse.py +59 -0
  55. mixpeek/models/featureupdaterequest.py +21 -0
  56. mixpeek/models/filtercondition.py +74 -0
  57. mixpeek/models/floatindexparams.py +18 -0
  58. mixpeek/models/full_asset_update_assets_asset_id_putop.py +69 -0
  59. mixpeek/models/full_feature_update_features_feature_id_putop.py +69 -0
  60. mixpeek/models/geoindexparams.py +18 -0
  61. mixpeek/models/get_asset_assets_asset_id_getop.py +73 -0
  62. mixpeek/models/get_asset_with_features_assets_asset_id_features_getop.py +73 -0
  63. mixpeek/models/get_collection_collections_collection_getop.py +59 -0
  64. mixpeek/models/get_feature_features_feature_id_getop.py +70 -0
  65. mixpeek/models/get_interaction_features_search_interactions_interaction_id_getop.py +59 -0
  66. mixpeek/models/get_namespace_namespaces_namespace_getop.py +18 -0
  67. mixpeek/models/get_task_tasks_task_id_getop.py +57 -0
  68. mixpeek/models/get_user_organizations_users_user_email_getop.py +16 -0
  69. mixpeek/models/groupbyoptions.py +71 -0
  70. mixpeek/models/groupbyoptionsasset.py +71 -0
  71. mixpeek/models/groupedassetdata.py +18 -0
  72. mixpeek/models/healthcheckresponse.py +13 -0
  73. mixpeek/models/httpvalidationerror.py +21 -0
  74. mixpeek/models/imagedescribesettings.py +82 -0
  75. mixpeek/models/imagedetectsettings.py +53 -0
  76. mixpeek/models/imagereadsettings.py +71 -0
  77. mixpeek/models/imagesettings.py +79 -0
  78. mixpeek/models/ingest_image_url_ingest_images_url_postop.py +59 -0
  79. mixpeek/models/ingest_text_ingest_text_postop.py +59 -0
  80. mixpeek/models/ingest_video_url_ingest_videos_url_postop.py +59 -0
  81. mixpeek/models/inputtype.py +11 -0
  82. mixpeek/models/integerindexparams.py +24 -0
  83. mixpeek/models/interactionresponse.py +87 -0
  84. mixpeek/models/interactiontype.py +11 -0
  85. mixpeek/models/jsonimageoutputsettings.py +55 -0
  86. mixpeek/models/jsontextoutputsettings.py +55 -0
  87. mixpeek/models/jsonvideooutputsettings.py +55 -0
  88. mixpeek/models/keywordindexparams.py +21 -0
  89. mixpeek/models/kill_task_tasks_task_id_deleteop.py +57 -0
  90. mixpeek/models/list_assets_assets_postop.py +77 -0
  91. mixpeek/models/list_collections_collections_getop.py +65 -0
  92. mixpeek/models/list_features_features_postop.py +79 -0
  93. mixpeek/models/list_interactions_features_search_interactions_getop.py +96 -0
  94. mixpeek/models/listassetsrequest.py +75 -0
  95. mixpeek/models/listassetsresponse.py +22 -0
  96. mixpeek/models/listcollectionsresponse.py +22 -0
  97. mixpeek/models/listfeaturesrequest.py +77 -0
  98. mixpeek/models/listfeaturesresponse.py +22 -0
  99. mixpeek/models/logicaloperator_input.py +88 -0
  100. mixpeek/models/logicaloperator_output.py +103 -0
  101. mixpeek/models/logodetectsettings.py +52 -0
  102. mixpeek/models/modality.py +13 -0
  103. mixpeek/models/modeldetails.py +57 -0
  104. mixpeek/models/namespaceresponse.py +54 -0
  105. mixpeek/models/organizationmodel.py +45 -0
  106. mixpeek/models/partial_asset_update_assets_asset_id_patchop.py +69 -0
  107. mixpeek/models/payloadindexconfig.py +94 -0
  108. mixpeek/models/payloadindextype.py +17 -0
  109. mixpeek/models/payloadschematype.py +15 -0
  110. mixpeek/models/percolaterequest.py +57 -0
  111. mixpeek/models/permission.py +10 -0
  112. mixpeek/models/processimageurlinput.py +99 -0
  113. mixpeek/models/processtextinput.py +94 -0
  114. mixpeek/models/processvideourlinput.py +99 -0
  115. mixpeek/models/querysettings.py +56 -0
  116. mixpeek/models/rerankingoptions.py +47 -0
  117. mixpeek/models/search_assets_assets_search_postop.py +59 -0
  118. mixpeek/models/search_features_features_search_postop.py +96 -0
  119. mixpeek/models/search_model_searchquery_input.py +76 -0
  120. mixpeek/models/searchassetsrequest.py +78 -0
  121. mixpeek/models/searchinteraction.py +82 -0
  122. mixpeek/models/searchquery_output.py +79 -0
  123. mixpeek/models/searchrequestfeatures_input.py +151 -0
  124. mixpeek/models/searchrequestfeatures_output.py +151 -0
  125. mixpeek/models/sortoption.py +28 -0
  126. mixpeek/models/sparseembedding.py +21 -0
  127. mixpeek/models/tasks_model_taskresponse.py +24 -0
  128. mixpeek/models/taskstatus.py +16 -0
  129. mixpeek/models/textindexparams.py +31 -0
  130. mixpeek/models/textsettings.py +61 -0
  131. mixpeek/models/tokenizertype.py +11 -0
  132. mixpeek/models/update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py +30 -0
  133. mixpeek/models/update_collection_collections_collection_putop.py +74 -0
  134. mixpeek/models/update_namespace_namespaces_namespace_putop.py +28 -0
  135. mixpeek/models/updateassetrequest.py +60 -0
  136. mixpeek/models/updatenamespacerequest.py +26 -0
  137. mixpeek/models/usage.py +18 -0
  138. mixpeek/models/usermodel_input.py +36 -0
  139. mixpeek/models/usermodel_output.py +36 -0
  140. mixpeek/models/uuidindexparams.py +21 -0
  141. mixpeek/models/validationerror.py +26 -0
  142. mixpeek/models/vectormodel.py +11 -0
  143. mixpeek/models/vectortype.py +9 -0
  144. mixpeek/models/videodescribesettings.py +82 -0
  145. mixpeek/models/videodetectsettings.py +53 -0
  146. mixpeek/models/videoreadsettings.py +71 -0
  147. mixpeek/models/videosettings.py +101 -0
  148. mixpeek/models/videotranscriptionsettings.py +69 -0
  149. mixpeek/namespaces.py +1143 -0
  150. mixpeek/organizations.py +1508 -0
  151. mixpeek/py.typed +1 -0
  152. mixpeek/sdk.py +135 -0
  153. mixpeek/sdkconfiguration.py +45 -0
  154. mixpeek/searchinteractions.py +647 -0
  155. mixpeek/tasks.py +387 -0
  156. mixpeek/types/__init__.py +21 -0
  157. mixpeek/types/basemodel.py +39 -0
  158. mixpeek/utils/__init__.py +97 -0
  159. mixpeek/utils/annotations.py +55 -0
  160. mixpeek/utils/enums.py +34 -0
  161. mixpeek/utils/eventstreaming.py +238 -0
  162. mixpeek/utils/forms.py +202 -0
  163. mixpeek/utils/headers.py +136 -0
  164. mixpeek/utils/logger.py +27 -0
  165. mixpeek/utils/metadata.py +118 -0
  166. mixpeek/utils/queryparams.py +205 -0
  167. mixpeek/utils/requestbodies.py +66 -0
  168. mixpeek/utils/retries.py +217 -0
  169. mixpeek/utils/security.py +174 -0
  170. mixpeek/utils/serializers.py +215 -0
  171. mixpeek/utils/url.py +155 -0
  172. mixpeek/utils/values.py +134 -0
  173. mixpeek-0.13.dist-info/METADATA +439 -0
  174. mixpeek-0.13.dist-info/RECORD +176 -0
  175. {mixpeek-0.11.2.dist-info → mixpeek-0.13.dist-info}/WHEEL +1 -2
  176. py.typed +1 -0
  177. mixpeek/client.py +0 -27
  178. mixpeek/endpoints/__init__.py +0 -0
  179. mixpeek/endpoints/collections.py +0 -86
  180. mixpeek/endpoints/embed.py +0 -66
  181. mixpeek/endpoints/index.py +0 -51
  182. mixpeek/endpoints/register.py +0 -34
  183. mixpeek/endpoints/search.py +0 -44
  184. mixpeek/endpoints/tasks.py +0 -26
  185. mixpeek/endpoints/tools.py +0 -138
  186. mixpeek/exceptions.py +0 -13
  187. mixpeek-0.11.2.dist-info/METADATA +0 -375
  188. mixpeek-0.11.2.dist-info/RECORD +0 -15
  189. mixpeek-0.11.2.dist-info/top_level.txt +0 -1
@@ -0,0 +1,24 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .taskstatus import TaskStatus
5
+ from mixpeek.types import BaseModel
6
+ from typing import Any, List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class TasksModelTaskResponseTypedDict(TypedDict):
11
+ task_id: str
12
+ status: TaskStatus
13
+ inputs: List[Any]
14
+ outputs: List[Any]
15
+
16
+
17
+ class TasksModelTaskResponse(BaseModel):
18
+ task_id: str
19
+
20
+ status: TaskStatus
21
+
22
+ inputs: List[Any]
23
+
24
+ outputs: List[Any]
@@ -0,0 +1,16 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from enum import Enum
5
+
6
+
7
+ class TaskStatus(str, Enum):
8
+ DONE = "DONE"
9
+ FAILED = "FAILED"
10
+ SKIPPED = "SKIPPED"
11
+ CANCELLED = "CANCELLED"
12
+ PROCESSING = "PROCESSING"
13
+ DOWNLOADING = "DOWNLOADING"
14
+ INITIALIZING = "INITIALIZING"
15
+ UPLOADING = "UPLOADING"
16
+ QUEUED = "QUEUED"
@@ -0,0 +1,31 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .tokenizertype import TokenizerType
5
+ from mixpeek.types import BaseModel
6
+ from typing import Optional
7
+ from typing_extensions import NotRequired, TypedDict
8
+
9
+
10
+ class TextIndexParamsTypedDict(TypedDict):
11
+ r"""Configuration for text index"""
12
+
13
+ type: NotRequired[str]
14
+ tokenizer: NotRequired[TokenizerType]
15
+ min_token_len: NotRequired[int]
16
+ max_token_len: NotRequired[int]
17
+ lowercase: NotRequired[bool]
18
+
19
+
20
+ class TextIndexParams(BaseModel):
21
+ r"""Configuration for text index"""
22
+
23
+ type: Optional[str] = "text"
24
+
25
+ tokenizer: Optional[TokenizerType] = None
26
+
27
+ min_token_len: Optional[int] = 2
28
+
29
+ max_token_len: Optional[int] = 15
30
+
31
+ lowercase: Optional[bool] = True
@@ -0,0 +1,61 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .embeddingrequest import EmbeddingRequest, EmbeddingRequestTypedDict
5
+ from .jsontextoutputsettings import (
6
+ JSONTextOutputSettings,
7
+ JSONTextOutputSettingsTypedDict,
8
+ )
9
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
10
+ from pydantic import model_serializer
11
+ from typing import List, Optional
12
+ from typing_extensions import NotRequired, TypedDict
13
+
14
+
15
+ class TextSettingsTypedDict(TypedDict):
16
+ embed: NotRequired[List[EmbeddingRequestTypedDict]]
17
+ r"""List of embedding settings for generating multiple embeddings. field_name's provided are how the raw text will be inserted, if not provided, the field_name will be auto-generated.
18
+ Default: [{type: 'text', vector_index: 'multimodal'}] if none provided.
19
+ """
20
+ json_output: NotRequired[Nullable[JSONTextOutputSettingsTypedDict]]
21
+ r"""Settings for structured JSON output of text analysis."""
22
+
23
+
24
+ class TextSettings(BaseModel):
25
+ embed: Optional[List[EmbeddingRequest]] = None
26
+ r"""List of embedding settings for generating multiple embeddings. field_name's provided are how the raw text will be inserted, if not provided, the field_name will be auto-generated.
27
+ Default: [{type: 'text', vector_index: 'multimodal'}] if none provided.
28
+ """
29
+
30
+ json_output: OptionalNullable[JSONTextOutputSettings] = UNSET
31
+ r"""Settings for structured JSON output of text analysis."""
32
+
33
+ @model_serializer(mode="wrap")
34
+ def serialize_model(self, handler):
35
+ optional_fields = ["embed", "json_output"]
36
+ nullable_fields = ["json_output"]
37
+ null_default_fields = []
38
+
39
+ serialized = handler(self)
40
+
41
+ m = {}
42
+
43
+ for n, f in self.model_fields.items():
44
+ k = f.alias or n
45
+ val = serialized.get(k)
46
+ serialized.pop(k, None)
47
+
48
+ optional_nullable = k in optional_fields and k in nullable_fields
49
+ is_set = (
50
+ self.__pydantic_fields_set__.intersection({n})
51
+ or k in null_default_fields
52
+ ) # pylint: disable=no-member
53
+
54
+ if val is not None and val != UNSET_SENTINEL:
55
+ m[k] = val
56
+ elif val != UNSET_SENTINEL and (
57
+ not k in optional_fields or (optional_nullable and is_set)
58
+ ):
59
+ m[k] = val
60
+
61
+ return m
@@ -0,0 +1,11 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from enum import Enum
5
+
6
+
7
+ class TokenizerType(str, Enum):
8
+ WORD = "word"
9
+ WHITESPACE = "whitespace"
10
+ PREFIX = "prefix"
11
+ MULTILINGUAL = "multilingual"
@@ -0,0 +1,30 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .apikeyupdate import APIKeyUpdate, APIKeyUpdateTypedDict
5
+ from mixpeek.types import BaseModel
6
+ from mixpeek.utils import FieldMetadata, PathParamMetadata, RequestMetadata
7
+ from typing_extensions import Annotated, TypedDict
8
+
9
+
10
+ class UpdateAPIKeyOrganizationsUsersUserEmailAPIKeysKeyNamePatchRequestTypedDict(
11
+ TypedDict
12
+ ):
13
+ user_email: str
14
+ key_name: str
15
+ api_key_update: APIKeyUpdateTypedDict
16
+
17
+
18
+ class UpdateAPIKeyOrganizationsUsersUserEmailAPIKeysKeyNamePatchRequest(BaseModel):
19
+ user_email: Annotated[
20
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
21
+ ]
22
+
23
+ key_name: Annotated[
24
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
25
+ ]
26
+
27
+ api_key_update: Annotated[
28
+ APIKeyUpdate,
29
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
30
+ ]
@@ -0,0 +1,74 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .createcollectionrequest import (
5
+ CreateCollectionRequest,
6
+ CreateCollectionRequestTypedDict,
7
+ )
8
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
9
+ from mixpeek.utils import (
10
+ FieldMetadata,
11
+ HeaderMetadata,
12
+ PathParamMetadata,
13
+ RequestMetadata,
14
+ )
15
+ import pydantic
16
+ from pydantic import model_serializer
17
+ from typing_extensions import Annotated, NotRequired, TypedDict
18
+
19
+
20
+ class UpdateCollectionCollectionsCollectionPutRequestTypedDict(TypedDict):
21
+ collection: str
22
+ r"""Either the collection name or collection ID"""
23
+ create_collection_request: CreateCollectionRequestTypedDict
24
+ x_namespace: NotRequired[Nullable[str]]
25
+ 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."""
26
+
27
+
28
+ class UpdateCollectionCollectionsCollectionPutRequest(BaseModel):
29
+ collection: Annotated[
30
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
31
+ ]
32
+ r"""Either the collection name or collection ID"""
33
+
34
+ create_collection_request: Annotated[
35
+ CreateCollectionRequest,
36
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
37
+ ]
38
+
39
+ x_namespace: Annotated[
40
+ OptionalNullable[str],
41
+ pydantic.Field(alias="X-Namespace"),
42
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
43
+ ] = UNSET
44
+ 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."""
45
+
46
+ @model_serializer(mode="wrap")
47
+ def serialize_model(self, handler):
48
+ optional_fields = ["X-Namespace"]
49
+ nullable_fields = ["X-Namespace"]
50
+ null_default_fields = []
51
+
52
+ serialized = handler(self)
53
+
54
+ m = {}
55
+
56
+ for n, f in self.model_fields.items():
57
+ k = f.alias or n
58
+ val = serialized.get(k)
59
+ serialized.pop(k, None)
60
+
61
+ optional_nullable = k in optional_fields and k in nullable_fields
62
+ is_set = (
63
+ self.__pydantic_fields_set__.intersection({n})
64
+ or k in null_default_fields
65
+ ) # pylint: disable=no-member
66
+
67
+ if val is not None and val != UNSET_SENTINEL:
68
+ m[k] = val
69
+ elif val != UNSET_SENTINEL and (
70
+ not k in optional_fields or (optional_nullable and is_set)
71
+ ):
72
+ m[k] = val
73
+
74
+ return m
@@ -0,0 +1,28 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .updatenamespacerequest import (
5
+ UpdateNamespaceRequest,
6
+ UpdateNamespaceRequestTypedDict,
7
+ )
8
+ from mixpeek.types import BaseModel
9
+ from mixpeek.utils import FieldMetadata, PathParamMetadata, RequestMetadata
10
+ from typing_extensions import Annotated, TypedDict
11
+
12
+
13
+ class UpdateNamespaceNamespacesNamespacePutRequestTypedDict(TypedDict):
14
+ namespace: str
15
+ r"""Either the namespace name or namespace ID"""
16
+ update_namespace_request: UpdateNamespaceRequestTypedDict
17
+
18
+
19
+ class UpdateNamespaceNamespacesNamespacePutRequest(BaseModel):
20
+ namespace: Annotated[
21
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
22
+ ]
23
+ r"""Either the namespace name or namespace ID"""
24
+
25
+ update_namespace_request: Annotated[
26
+ UpdateNamespaceRequest,
27
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
28
+ ]
@@ -0,0 +1,60 @@
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 import Optional
7
+ from typing_extensions import NotRequired, TypedDict
8
+
9
+
10
+ class UpdateAssetRequestMetadataTypedDict(TypedDict):
11
+ r"""Updated metadata for the asset. This can include any key-value pairs that should be updated or added to the asset's metadata."""
12
+
13
+
14
+ class UpdateAssetRequestMetadata(BaseModel):
15
+ r"""Updated metadata for the asset. This can include any key-value pairs that should be updated or added to the asset's metadata."""
16
+
17
+
18
+ class UpdateAssetRequestTypedDict(TypedDict):
19
+ propagate_features: NotRequired[Nullable[bool]]
20
+ r"""If True, the features will be propagated to all assets with the same asset_id"""
21
+ metadata: NotRequired[UpdateAssetRequestMetadataTypedDict]
22
+ r"""Updated metadata for the asset. This can include any key-value pairs that should be updated or added to the asset's metadata."""
23
+
24
+
25
+ class UpdateAssetRequest(BaseModel):
26
+ propagate_features: OptionalNullable[bool] = UNSET
27
+ r"""If True, the features will be propagated to all assets with the same asset_id"""
28
+
29
+ metadata: Optional[UpdateAssetRequestMetadata] = None
30
+ r"""Updated metadata for the asset. This can include any key-value pairs that should be updated or added to the asset's metadata."""
31
+
32
+ @model_serializer(mode="wrap")
33
+ def serialize_model(self, handler):
34
+ optional_fields = ["propagate_features", "metadata"]
35
+ nullable_fields = ["propagate_features"]
36
+ null_default_fields = []
37
+
38
+ serialized = handler(self)
39
+
40
+ m = {}
41
+
42
+ for n, f in self.model_fields.items():
43
+ k = f.alias or n
44
+ val = serialized.get(k)
45
+ serialized.pop(k, None)
46
+
47
+ optional_nullable = k in optional_fields and k in nullable_fields
48
+ is_set = (
49
+ self.__pydantic_fields_set__.intersection({n})
50
+ or k in null_default_fields
51
+ ) # pylint: disable=no-member
52
+
53
+ if val is not None and val != UNSET_SENTINEL:
54
+ m[k] = val
55
+ elif val != UNSET_SENTINEL and (
56
+ not k in optional_fields or (optional_nullable and is_set)
57
+ ):
58
+ m[k] = val
59
+
60
+ return m
@@ -0,0 +1,26 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .payloadindexconfig import PayloadIndexConfig, PayloadIndexConfigTypedDict
5
+ from mixpeek.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class UpdateNamespaceRequestTypedDict(TypedDict):
11
+ r"""Request schema for updating a namespace's payload indexes"""
12
+
13
+ namespace_name: str
14
+ r"""Name of the namespace to update"""
15
+ payload_indexes: List[PayloadIndexConfigTypedDict]
16
+ r"""Updated list of payload index configurations"""
17
+
18
+
19
+ class UpdateNamespaceRequest(BaseModel):
20
+ r"""Request schema for updating a namespace's payload indexes"""
21
+
22
+ namespace_name: str
23
+ r"""Name of the namespace to update"""
24
+
25
+ payload_indexes: List[PayloadIndexConfig]
26
+ r"""Updated list of payload index configurations"""
@@ -0,0 +1,18 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .dateusage import DateUsage, DateUsageTypedDict
5
+ from mixpeek.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class UsageTypedDict(TypedDict):
11
+ total_credits: int
12
+ dates: List[DateUsageTypedDict]
13
+
14
+
15
+ class Usage(BaseModel):
16
+ total_credits: int
17
+
18
+ dates: List[DateUsage]
@@ -0,0 +1,36 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .apikey import APIKey, APIKeyTypedDict
5
+ from datetime import datetime
6
+ from mixpeek.types import BaseModel
7
+ from typing import List, Optional
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class UserModelInputMetadataTypedDict(TypedDict):
12
+ pass
13
+
14
+
15
+ class UserModelInputMetadata(BaseModel):
16
+ pass
17
+
18
+
19
+ class UserModelInputTypedDict(TypedDict):
20
+ email: str
21
+ user_id: NotRequired[str]
22
+ api_keys: NotRequired[List[APIKeyTypedDict]]
23
+ metadata: NotRequired[UserModelInputMetadataTypedDict]
24
+ created_at: NotRequired[datetime]
25
+
26
+
27
+ class UserModelInput(BaseModel):
28
+ email: str
29
+
30
+ user_id: Optional[str] = None
31
+
32
+ api_keys: Optional[List[APIKey]] = None
33
+
34
+ metadata: Optional[UserModelInputMetadata] = None
35
+
36
+ created_at: Optional[datetime] = None
@@ -0,0 +1,36 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .apikey import APIKey, APIKeyTypedDict
5
+ from datetime import datetime
6
+ from mixpeek.types import BaseModel
7
+ from typing import List, Optional
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class UserModelOutputMetadataTypedDict(TypedDict):
12
+ pass
13
+
14
+
15
+ class UserModelOutputMetadata(BaseModel):
16
+ pass
17
+
18
+
19
+ class UserModelOutputTypedDict(TypedDict):
20
+ email: str
21
+ user_id: NotRequired[str]
22
+ api_keys: NotRequired[List[APIKeyTypedDict]]
23
+ metadata: NotRequired[UserModelOutputMetadataTypedDict]
24
+ created_at: NotRequired[datetime]
25
+
26
+
27
+ class UserModelOutput(BaseModel):
28
+ email: str
29
+
30
+ user_id: Optional[str] = None
31
+
32
+ api_keys: Optional[List[APIKey]] = None
33
+
34
+ metadata: Optional[UserModelOutputMetadata] = None
35
+
36
+ created_at: Optional[datetime] = None
@@ -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 UUIDIndexParamsTypedDict(TypedDict):
10
+ r"""Configuration for UUID index"""
11
+
12
+ type: NotRequired[str]
13
+ is_tenant: NotRequired[bool]
14
+
15
+
16
+ class UUIDIndexParams(BaseModel):
17
+ r"""Configuration for UUID index"""
18
+
19
+ type: Optional[str] = "uuid"
20
+
21
+ is_tenant: Optional[bool] = False
@@ -0,0 +1,26 @@
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 List, Union
6
+ from typing_extensions import TypeAliasType, TypedDict
7
+
8
+
9
+ LocTypedDict = TypeAliasType("LocTypedDict", Union[str, int])
10
+
11
+
12
+ Loc = TypeAliasType("Loc", Union[str, int])
13
+
14
+
15
+ class ValidationErrorTypedDict(TypedDict):
16
+ loc: List[LocTypedDict]
17
+ msg: str
18
+ type: str
19
+
20
+
21
+ class ValidationError(BaseModel):
22
+ loc: List[Loc]
23
+
24
+ msg: str
25
+
26
+ type: str
@@ -0,0 +1,11 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from enum import Enum
5
+
6
+
7
+ class VectorModel(str, Enum):
8
+ IMAGE = "image"
9
+ MULTIMODAL = "multimodal"
10
+ TEXT = "text"
11
+ KEYWORD = "keyword"
@@ -0,0 +1,9 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from enum import Enum
5
+
6
+
7
+ class VectorType(str, Enum):
8
+ SPARSE = "sparse"
9
+ DENSE = "dense"
@@ -0,0 +1,82 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .vectormodel import VectorModel
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from pydantic import model_serializer
7
+ from typing import Optional
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class VideoDescribeSettingsJSONOutputTypedDict(TypedDict):
12
+ r"""JSON format for the response"""
13
+
14
+
15
+ class VideoDescribeSettingsJSONOutput(BaseModel):
16
+ r"""JSON format for the response"""
17
+
18
+
19
+ class VideoDescribeSettingsTypedDict(TypedDict):
20
+ prompt: NotRequired[Nullable[str]]
21
+ r"""Prompt for video description"""
22
+ enabled: NotRequired[bool]
23
+ r"""Enable video description"""
24
+ max_length: NotRequired[Nullable[int]]
25
+ r"""Maximum length of the description"""
26
+ json_output: NotRequired[VideoDescribeSettingsJSONOutputTypedDict]
27
+ r"""JSON format for the response"""
28
+ vector_index: NotRequired[Nullable[VectorModel]]
29
+ r"""Name of the vector model to use for embedding the text output. If vector_index is duplicated, the vector will be overwritten."""
30
+
31
+
32
+ class VideoDescribeSettings(BaseModel):
33
+ prompt: OptionalNullable[str] = UNSET
34
+ r"""Prompt for video description"""
35
+
36
+ enabled: Optional[bool] = True
37
+ r"""Enable video description"""
38
+
39
+ max_length: OptionalNullable[int] = UNSET
40
+ r"""Maximum length of the description"""
41
+
42
+ json_output: Optional[VideoDescribeSettingsJSONOutput] = None
43
+ r"""JSON format for the response"""
44
+
45
+ vector_index: OptionalNullable[VectorModel] = UNSET
46
+ r"""Name of the vector model to use for embedding the text output. If vector_index is duplicated, the vector will be overwritten."""
47
+
48
+ @model_serializer(mode="wrap")
49
+ def serialize_model(self, handler):
50
+ optional_fields = [
51
+ "prompt",
52
+ "enabled",
53
+ "max_length",
54
+ "json_output",
55
+ "vector_index",
56
+ ]
57
+ nullable_fields = ["prompt", "max_length", "vector_index"]
58
+ null_default_fields = []
59
+
60
+ serialized = handler(self)
61
+
62
+ m = {}
63
+
64
+ for n, f in self.model_fields.items():
65
+ k = f.alias or n
66
+ val = serialized.get(k)
67
+ serialized.pop(k, None)
68
+
69
+ optional_nullable = k in optional_fields and k in nullable_fields
70
+ is_set = (
71
+ self.__pydantic_fields_set__.intersection({n})
72
+ or k in null_default_fields
73
+ ) # pylint: disable=no-member
74
+
75
+ if val is not None and val != UNSET_SENTINEL:
76
+ m[k] = val
77
+ elif val != UNSET_SENTINEL and (
78
+ not k in optional_fields or (optional_nullable and is_set)
79
+ ):
80
+ m[k] = val
81
+
82
+ return m
@@ -0,0 +1,53 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .facedetectsettings import FaceDetectSettings, FaceDetectSettingsTypedDict
5
+ from .logodetectsettings import LogoDetectSettings, LogoDetectSettingsTypedDict
6
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
7
+ from pydantic import model_serializer
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class VideoDetectSettingsTypedDict(TypedDict):
12
+ faces: NotRequired[Nullable[FaceDetectSettingsTypedDict]]
13
+ r"""Settings for face detection"""
14
+ logos: NotRequired[Nullable[LogoDetectSettingsTypedDict]]
15
+ r"""Settings for logo detection"""
16
+
17
+
18
+ class VideoDetectSettings(BaseModel):
19
+ faces: OptionalNullable[FaceDetectSettings] = UNSET
20
+ r"""Settings for face detection"""
21
+
22
+ logos: OptionalNullable[LogoDetectSettings] = UNSET
23
+ r"""Settings for logo detection"""
24
+
25
+ @model_serializer(mode="wrap")
26
+ def serialize_model(self, handler):
27
+ optional_fields = ["faces", "logos"]
28
+ nullable_fields = ["faces", "logos"]
29
+ null_default_fields = []
30
+
31
+ serialized = handler(self)
32
+
33
+ m = {}
34
+
35
+ for n, f in self.model_fields.items():
36
+ k = f.alias or n
37
+ val = serialized.get(k)
38
+ serialized.pop(k, None)
39
+
40
+ optional_nullable = k in optional_fields and k in nullable_fields
41
+ is_set = (
42
+ self.__pydantic_fields_set__.intersection({n})
43
+ or k in null_default_fields
44
+ ) # pylint: disable=no-member
45
+
46
+ if val is not None and val != UNSET_SENTINEL:
47
+ m[k] = val
48
+ elif val != UNSET_SENTINEL and (
49
+ not k in optional_fields or (optional_nullable and is_set)
50
+ ):
51
+ m[k] = val
52
+
53
+ return m