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,64 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .denseembedding import DenseEmbedding, DenseEmbeddingTypedDict
5
+ from .sparseembedding import SparseEmbedding, SparseEmbeddingTypedDict
6
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
7
+ from pydantic import model_serializer
8
+ from typing import Union
9
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
10
+
11
+
12
+ EmbeddingTypedDict = TypeAliasType(
13
+ "EmbeddingTypedDict", Union[DenseEmbeddingTypedDict, SparseEmbeddingTypedDict]
14
+ )
15
+ r"""The embedding of the processed data, either dense or sparse format"""
16
+
17
+
18
+ Embedding = TypeAliasType("Embedding", Union[DenseEmbedding, SparseEmbedding])
19
+ r"""The embedding of the processed data, either dense or sparse format"""
20
+
21
+
22
+ class EmbeddingResponseTypedDict(TypedDict):
23
+ embedding: EmbeddingTypedDict
24
+ r"""The embedding of the processed data, either dense or sparse format"""
25
+ elapsed_time: NotRequired[Nullable[float]]
26
+ r"""The time taken to process the data."""
27
+
28
+
29
+ class EmbeddingResponse(BaseModel):
30
+ embedding: Embedding
31
+ r"""The embedding of the processed data, either dense or sparse format"""
32
+
33
+ elapsed_time: OptionalNullable[float] = UNSET
34
+ r"""The time taken to process the data."""
35
+
36
+ @model_serializer(mode="wrap")
37
+ def serialize_model(self, handler):
38
+ optional_fields = ["elapsed_time"]
39
+ nullable_fields = ["elapsed_time"]
40
+ null_default_fields = []
41
+
42
+ serialized = handler(self)
43
+
44
+ m = {}
45
+
46
+ for n, f in self.model_fields.items():
47
+ k = f.alias or n
48
+ val = serialized.get(k)
49
+ serialized.pop(k, None)
50
+
51
+ optional_nullable = k in optional_fields and k in nullable_fields
52
+ is_set = (
53
+ self.__pydantic_fields_set__.intersection({n})
54
+ or k in null_default_fields
55
+ ) # pylint: disable=no-member
56
+
57
+ if val is not None and val != UNSET_SENTINEL:
58
+ m[k] = val
59
+ elif val != UNSET_SENTINEL and (
60
+ not k in optional_fields or (optional_nullable and is_set)
61
+ ):
62
+ m[k] = val
63
+
64
+ return m
@@ -0,0 +1,13 @@
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_extensions import TypedDict
6
+
7
+
8
+ class ErrorMessageTypedDict(TypedDict):
9
+ msg: str
10
+
11
+
12
+ class ErrorMessage(BaseModel):
13
+ msg: str
@@ -0,0 +1,21 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .errormessage import ErrorMessage
5
+ from mixpeek import utils
6
+ from mixpeek.types import BaseModel, Nullable
7
+ from typing import List
8
+
9
+
10
+ class ErrorResponseData(BaseModel):
11
+ detail: Nullable[List[ErrorMessage]]
12
+
13
+
14
+ class ErrorResponse(Exception):
15
+ data: ErrorResponseData
16
+
17
+ def __init__(self, data: ErrorResponseData):
18
+ self.data = data
19
+
20
+ def __str__(self) -> str:
21
+ return utils.marshal_json(self.data, ErrorResponseData)
@@ -0,0 +1,52 @@
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 FaceDetectSettingsTypedDict(TypedDict):
11
+ enabled: NotRequired[bool]
12
+ r"""Enable face detection"""
13
+ confidence_threshold: NotRequired[Nullable[float]]
14
+ r"""Minimum confidence threshold for detected objects"""
15
+
16
+
17
+ class FaceDetectSettings(BaseModel):
18
+ enabled: Optional[bool] = True
19
+ r"""Enable face detection"""
20
+
21
+ confidence_threshold: OptionalNullable[float] = UNSET
22
+ r"""Minimum confidence threshold for detected objects"""
23
+
24
+ @model_serializer(mode="wrap")
25
+ def serialize_model(self, handler):
26
+ optional_fields = ["enabled", "confidence_threshold"]
27
+ nullable_fields = ["confidence_threshold"]
28
+ null_default_fields = []
29
+
30
+ serialized = handler(self)
31
+
32
+ m = {}
33
+
34
+ for n, f in self.model_fields.items():
35
+ k = f.alias or n
36
+ val = serialized.get(k)
37
+ serialized.pop(k, None)
38
+
39
+ optional_nullable = k in optional_fields and k in nullable_fields
40
+ is_set = (
41
+ self.__pydantic_fields_set__.intersection({n})
42
+ or k in null_default_fields
43
+ ) # pylint: disable=no-member
44
+
45
+ if val is not None and val != UNSET_SENTINEL:
46
+ m[k] = val
47
+ elif val != UNSET_SENTINEL and (
48
+ not k in optional_fields or (optional_nullable and is_set)
49
+ ):
50
+ m[k] = val
51
+
52
+ return m
@@ -0,0 +1,54 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .inputtype import InputType
5
+ from .vectormodel import VectorModel
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 FeatureExtractionEmbeddingRequestTypedDict(TypedDict):
12
+ type: InputType
13
+ vector_index: VectorModel
14
+ value: NotRequired[Nullable[str]]
15
+ r"""The input content to embed. Could be a URL, text content, file path, or base64 encoded string"""
16
+
17
+
18
+ class FeatureExtractionEmbeddingRequest(BaseModel):
19
+ type: InputType
20
+
21
+ vector_index: VectorModel
22
+
23
+ value: OptionalNullable[str] = UNSET
24
+ r"""The input content to embed. Could be a URL, text content, file path, or base64 encoded string"""
25
+
26
+ @model_serializer(mode="wrap")
27
+ def serialize_model(self, handler):
28
+ optional_fields = ["value"]
29
+ nullable_fields = ["value"]
30
+ null_default_fields = []
31
+
32
+ serialized = handler(self)
33
+
34
+ m = {}
35
+
36
+ for n, f in self.model_fields.items():
37
+ k = f.alias or n
38
+ val = serialized.get(k)
39
+ serialized.pop(k, None)
40
+
41
+ optional_nullable = k in optional_fields and k in nullable_fields
42
+ is_set = (
43
+ self.__pydantic_fields_set__.intersection({n})
44
+ or k in null_default_fields
45
+ ) # pylint: disable=no-member
46
+
47
+ if val is not None and val != UNSET_SENTINEL:
48
+ m[k] = val
49
+ elif val != UNSET_SENTINEL and (
50
+ not k in optional_fields or (optional_nullable and is_set)
51
+ ):
52
+ m[k] = val
53
+
54
+ return m
@@ -0,0 +1,74 @@
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
+ import pydantic
6
+ from pydantic import ConfigDict, model_serializer
7
+ from typing import Any, Dict
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class FeatureResponseTypedDict(TypedDict):
12
+ url: NotRequired[Nullable[str]]
13
+ r"""The presigned URL for accessing the asset"""
14
+ preview_url: NotRequired[Nullable[str]]
15
+ r"""The presigned URL for accessing the asset preview"""
16
+ duplicate_of: NotRequired[Nullable[str]]
17
+ r"""The asset_id of the asset that this asset is a duplicate of"""
18
+
19
+
20
+ class FeatureResponse(BaseModel):
21
+ model_config = ConfigDict(
22
+ populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
23
+ )
24
+ __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
25
+
26
+ url: OptionalNullable[str] = UNSET
27
+ r"""The presigned URL for accessing the asset"""
28
+
29
+ preview_url: OptionalNullable[str] = UNSET
30
+ r"""The presigned URL for accessing the asset preview"""
31
+
32
+ duplicate_of: OptionalNullable[str] = UNSET
33
+ r"""The asset_id of the asset that this asset is a duplicate of"""
34
+
35
+ @property
36
+ def additional_properties(self):
37
+ return self.__pydantic_extra__
38
+
39
+ @additional_properties.setter
40
+ def additional_properties(self, value):
41
+ self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
42
+
43
+ @model_serializer(mode="wrap")
44
+ def serialize_model(self, handler):
45
+ optional_fields = ["url", "preview_url", "duplicate_of"]
46
+ nullable_fields = ["url", "preview_url", "duplicate_of"]
47
+ null_default_fields = []
48
+
49
+ serialized = handler(self)
50
+
51
+ m = {}
52
+
53
+ for n, f in self.model_fields.items():
54
+ k = f.alias or n
55
+ val = serialized.get(k)
56
+ serialized.pop(k, None)
57
+
58
+ optional_nullable = k in optional_fields and k in nullable_fields
59
+ is_set = (
60
+ self.__pydantic_fields_set__.intersection({n})
61
+ or k in null_default_fields
62
+ ) # pylint: disable=no-member
63
+
64
+ if val is not None and val != UNSET_SENTINEL:
65
+ m[k] = val
66
+ elif val != UNSET_SENTINEL and (
67
+ not k in optional_fields or (optional_nullable and is_set)
68
+ ):
69
+ m[k] = val
70
+
71
+ for k, v in serialized.items():
72
+ m[k] = v
73
+
74
+ return m
@@ -0,0 +1,59 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from mixpeek.types import BaseModel, Nullable, UNSET_SENTINEL
5
+ from pydantic import model_serializer
6
+ from typing_extensions import TypedDict
7
+
8
+
9
+ class FeaturesModelPaginationResponseTypedDict(TypedDict):
10
+ total: int
11
+ page_size: int
12
+ total_pages: int
13
+ current_page: int
14
+ next_page: Nullable[str]
15
+ previous_page: Nullable[str]
16
+
17
+
18
+ class FeaturesModelPaginationResponse(BaseModel):
19
+ total: int
20
+
21
+ page_size: int
22
+
23
+ total_pages: int
24
+
25
+ current_page: int
26
+
27
+ next_page: Nullable[str]
28
+
29
+ previous_page: Nullable[str]
30
+
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = []
34
+ nullable_fields = ["next_page", "previous_page"]
35
+ null_default_fields = []
36
+
37
+ serialized = handler(self)
38
+
39
+ m = {}
40
+
41
+ for n, f in self.model_fields.items():
42
+ k = f.alias or n
43
+ val = serialized.get(k)
44
+ serialized.pop(k, None)
45
+
46
+ optional_nullable = k in optional_fields and k in nullable_fields
47
+ is_set = (
48
+ self.__pydantic_fields_set__.intersection({n})
49
+ or k in null_default_fields
50
+ ) # pylint: disable=no-member
51
+
52
+ if val is not None and val != UNSET_SENTINEL:
53
+ m[k] = val
54
+ elif val != UNSET_SENTINEL and (
55
+ not k in optional_fields or (optional_nullable and is_set)
56
+ ):
57
+ m[k] = val
58
+
59
+ 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_extensions import TypedDict
6
+
7
+
8
+ class FeatureUpdateRequestMetadataTypedDict(TypedDict):
9
+ pass
10
+
11
+
12
+ class FeatureUpdateRequestMetadata(BaseModel):
13
+ pass
14
+
15
+
16
+ class FeatureUpdateRequestTypedDict(TypedDict):
17
+ metadata: FeatureUpdateRequestMetadataTypedDict
18
+
19
+
20
+ class FeatureUpdateRequest(BaseModel):
21
+ metadata: FeatureUpdateRequestMetadata
@@ -0,0 +1,74 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from enum import Enum
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from pydantic import model_serializer
7
+ from typing import Any, Optional
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class Operator(str, Enum):
12
+ r"""Comparison operator"""
13
+
14
+ EQ = "eq"
15
+ NE = "ne"
16
+ GT = "gt"
17
+ LT = "lt"
18
+ GTE = "gte"
19
+ LTE = "lte"
20
+ IN = "in"
21
+ NIN = "nin"
22
+ IS_NULL = "is_null"
23
+ TEXT = "text"
24
+ EXISTS = "exists"
25
+
26
+
27
+ class FilterConditionTypedDict(TypedDict):
28
+ key: str
29
+ r"""Field name to filter on"""
30
+ value: NotRequired[Nullable[Any]]
31
+ r"""Value to compare against"""
32
+ operator: NotRequired[Operator]
33
+ r"""Comparison operator"""
34
+
35
+
36
+ class FilterCondition(BaseModel):
37
+ key: str
38
+ r"""Field name to filter on"""
39
+
40
+ value: OptionalNullable[Any] = UNSET
41
+ r"""Value to compare against"""
42
+
43
+ operator: Optional[Operator] = Operator.EQ
44
+ r"""Comparison operator"""
45
+
46
+ @model_serializer(mode="wrap")
47
+ def serialize_model(self, handler):
48
+ optional_fields = ["value", "operator"]
49
+ nullable_fields = ["value"]
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,18 @@
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 FloatIndexParamsTypedDict(TypedDict):
10
+ r"""Configuration for float index"""
11
+
12
+ type: NotRequired[str]
13
+
14
+
15
+ class FloatIndexParams(BaseModel):
16
+ r"""Configuration for float index"""
17
+
18
+ type: Optional[str] = "float"
@@ -0,0 +1,69 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .updateassetrequest import UpdateAssetRequest, UpdateAssetRequestTypedDict
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from mixpeek.utils import (
7
+ FieldMetadata,
8
+ HeaderMetadata,
9
+ PathParamMetadata,
10
+ RequestMetadata,
11
+ )
12
+ import pydantic
13
+ from pydantic import model_serializer
14
+ from typing_extensions import Annotated, NotRequired, TypedDict
15
+
16
+
17
+ class FullAssetUpdateAssetsAssetIDPutRequestTypedDict(TypedDict):
18
+ asset_id: str
19
+ update_asset_request: UpdateAssetRequestTypedDict
20
+ x_namespace: NotRequired[Nullable[str]]
21
+ 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."""
22
+
23
+
24
+ class FullAssetUpdateAssetsAssetIDPutRequest(BaseModel):
25
+ asset_id: Annotated[
26
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
27
+ ]
28
+
29
+ update_asset_request: Annotated[
30
+ UpdateAssetRequest,
31
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
32
+ ]
33
+
34
+ x_namespace: Annotated[
35
+ OptionalNullable[str],
36
+ pydantic.Field(alias="X-Namespace"),
37
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
38
+ ] = UNSET
39
+ 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."""
40
+
41
+ @model_serializer(mode="wrap")
42
+ def serialize_model(self, handler):
43
+ optional_fields = ["X-Namespace"]
44
+ nullable_fields = ["X-Namespace"]
45
+ null_default_fields = []
46
+
47
+ serialized = handler(self)
48
+
49
+ m = {}
50
+
51
+ for n, f in self.model_fields.items():
52
+ k = f.alias or n
53
+ val = serialized.get(k)
54
+ serialized.pop(k, None)
55
+
56
+ optional_nullable = k in optional_fields and k in nullable_fields
57
+ is_set = (
58
+ self.__pydantic_fields_set__.intersection({n})
59
+ or k in null_default_fields
60
+ ) # pylint: disable=no-member
61
+
62
+ if val is not None and val != UNSET_SENTINEL:
63
+ m[k] = val
64
+ elif val != UNSET_SENTINEL and (
65
+ not k in optional_fields or (optional_nullable and is_set)
66
+ ):
67
+ m[k] = val
68
+
69
+ return m
@@ -0,0 +1,69 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .featureupdaterequest import FeatureUpdateRequest, FeatureUpdateRequestTypedDict
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from mixpeek.utils import (
7
+ FieldMetadata,
8
+ HeaderMetadata,
9
+ PathParamMetadata,
10
+ RequestMetadata,
11
+ )
12
+ import pydantic
13
+ from pydantic import model_serializer
14
+ from typing_extensions import Annotated, NotRequired, TypedDict
15
+
16
+
17
+ class FullFeatureUpdateFeaturesFeatureIDPutRequestTypedDict(TypedDict):
18
+ feature_id: str
19
+ feature_update_request: FeatureUpdateRequestTypedDict
20
+ x_namespace: NotRequired[Nullable[str]]
21
+ 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."""
22
+
23
+
24
+ class FullFeatureUpdateFeaturesFeatureIDPutRequest(BaseModel):
25
+ feature_id: Annotated[
26
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
27
+ ]
28
+
29
+ feature_update_request: Annotated[
30
+ FeatureUpdateRequest,
31
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
32
+ ]
33
+
34
+ x_namespace: Annotated[
35
+ OptionalNullable[str],
36
+ pydantic.Field(alias="X-Namespace"),
37
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
38
+ ] = UNSET
39
+ 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."""
40
+
41
+ @model_serializer(mode="wrap")
42
+ def serialize_model(self, handler):
43
+ optional_fields = ["X-Namespace"]
44
+ nullable_fields = ["X-Namespace"]
45
+ null_default_fields = []
46
+
47
+ serialized = handler(self)
48
+
49
+ m = {}
50
+
51
+ for n, f in self.model_fields.items():
52
+ k = f.alias or n
53
+ val = serialized.get(k)
54
+ serialized.pop(k, None)
55
+
56
+ optional_nullable = k in optional_fields and k in nullable_fields
57
+ is_set = (
58
+ self.__pydantic_fields_set__.intersection({n})
59
+ or k in null_default_fields
60
+ ) # pylint: disable=no-member
61
+
62
+ if val is not None and val != UNSET_SENTINEL:
63
+ m[k] = val
64
+ elif val != UNSET_SENTINEL and (
65
+ not k in optional_fields or (optional_nullable and is_set)
66
+ ):
67
+ m[k] = val
68
+
69
+ return m
@@ -0,0 +1,18 @@
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 GeoIndexParamsTypedDict(TypedDict):
10
+ r"""Configuration for geo index"""
11
+
12
+ type: NotRequired[str]
13
+
14
+
15
+ class GeoIndexParams(BaseModel):
16
+ r"""Configuration for geo index"""
17
+
18
+ type: Optional[str] = "geo"