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,16 @@
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 ActionUsageTypedDict(TypedDict):
9
+ action: str
10
+ credits: int
11
+
12
+
13
+ class ActionUsage(BaseModel):
14
+ action: str
15
+
16
+ credits: int
@@ -0,0 +1,22 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from dataclasses import dataclass
4
+ from typing import Optional
5
+ import httpx
6
+
7
+
8
+ @dataclass
9
+ class APIError(Exception):
10
+ """Represents an error returned by the API."""
11
+
12
+ message: str
13
+ status_code: int = -1
14
+ body: str = ""
15
+ raw_response: Optional[httpx.Response] = None
16
+
17
+ def __str__(self):
18
+ body = ""
19
+ if len(self.body) > 0:
20
+ body = f"\n{self.body}"
21
+
22
+ return f"{self.message}: Status {self.status_code}{body}"
@@ -0,0 +1,25 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .permission import Permission
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 APIKeyTypedDict(TypedDict):
12
+ key: NotRequired[str]
13
+ name: NotRequired[str]
14
+ created_at: NotRequired[datetime]
15
+ permissions: NotRequired[List[Permission]]
16
+
17
+
18
+ class APIKey(BaseModel):
19
+ key: Optional[str] = None
20
+
21
+ name: Optional[str] = None
22
+
23
+ created_at: Optional[datetime] = None
24
+
25
+ permissions: Optional[List[Permission]] = None
@@ -0,0 +1,49 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .permission import Permission
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from pydantic import model_serializer
7
+ from typing import List
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class APIKeyUpdateTypedDict(TypedDict):
12
+ name: NotRequired[Nullable[str]]
13
+ permissions: NotRequired[Nullable[List[Permission]]]
14
+
15
+
16
+ class APIKeyUpdate(BaseModel):
17
+ name: OptionalNullable[str] = UNSET
18
+
19
+ permissions: OptionalNullable[List[Permission]] = UNSET
20
+
21
+ @model_serializer(mode="wrap")
22
+ def serialize_model(self, handler):
23
+ optional_fields = ["name", "permissions"]
24
+ nullable_fields = ["name", "permissions"]
25
+ null_default_fields = []
26
+
27
+ serialized = handler(self)
28
+
29
+ m = {}
30
+
31
+ for n, f in self.model_fields.items():
32
+ k = f.alias or n
33
+ val = serialized.get(k)
34
+ serialized.pop(k, None)
35
+
36
+ optional_nullable = k in optional_fields and k in nullable_fields
37
+ is_set = (
38
+ self.__pydantic_fields_set__.intersection({n})
39
+ or k in null_default_fields
40
+ ) # pylint: disable=no-member
41
+
42
+ if val is not None and val != UNSET_SENTINEL:
43
+ m[k] = val
44
+ elif val != UNSET_SENTINEL and (
45
+ not k in optional_fields or (optional_nullable and is_set)
46
+ ):
47
+ m[k] = val
48
+
49
+ 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 .featureresponse import FeatureResponse, FeatureResponseTypedDict
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from pydantic import model_serializer
7
+ from typing import List
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class AssetFeaturesTypedDict(TypedDict):
12
+ video: NotRequired[Nullable[List[FeatureResponseTypedDict]]]
13
+ image: NotRequired[Nullable[List[FeatureResponseTypedDict]]]
14
+ text: NotRequired[Nullable[List[FeatureResponseTypedDict]]]
15
+ audio: NotRequired[Nullable[List[FeatureResponseTypedDict]]]
16
+
17
+
18
+ class AssetFeatures(BaseModel):
19
+ video: OptionalNullable[List[FeatureResponse]] = UNSET
20
+
21
+ image: OptionalNullable[List[FeatureResponse]] = UNSET
22
+
23
+ text: OptionalNullable[List[FeatureResponse]] = UNSET
24
+
25
+ audio: OptionalNullable[List[FeatureResponse]] = UNSET
26
+
27
+ @model_serializer(mode="wrap")
28
+ def serialize_model(self, handler):
29
+ optional_fields = ["video", "image", "text", "audio"]
30
+ nullable_fields = ["video", "image", "text", "audio"]
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,166 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from datetime import datetime
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from pydantic import model_serializer
7
+ from typing import Any
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class FileDataTypedDict(TypedDict):
12
+ pass
13
+
14
+
15
+ class FileData(BaseModel):
16
+ pass
17
+
18
+
19
+ class AssetResponseMetadataTypedDict(TypedDict):
20
+ pass
21
+
22
+
23
+ class AssetResponseMetadata(BaseModel):
24
+ pass
25
+
26
+
27
+ class AssetResponseTypedDict(TypedDict):
28
+ asset_id: NotRequired[Nullable[str]]
29
+ r"""The unique identifier for the asset"""
30
+ collection_id: NotRequired[Nullable[str]]
31
+ r"""The ID of the collection the asset belongs to"""
32
+ status: NotRequired[Nullable[str]]
33
+ r"""The current status of the asset processing"""
34
+ file_data: NotRequired[Nullable[FileDataTypedDict]]
35
+ r"""File data associated with the asset"""
36
+ metadata: NotRequired[Nullable[AssetResponseMetadataTypedDict]]
37
+ r"""Additional metadata associated with the asset"""
38
+ error: NotRequired[Nullable[Any]]
39
+ r"""The error message if the asset processing failed"""
40
+ modality: NotRequired[Nullable[str]]
41
+ r"""The type of media"""
42
+ task_id: NotRequired[Nullable[str]]
43
+ r"""The task ID"""
44
+ file_hash: NotRequired[Nullable[str]]
45
+ r"""The unique hash of the"""
46
+ updated_at: NotRequired[Nullable[datetime]]
47
+ r"""The timestamp when the asset was last updated"""
48
+ created_at: NotRequired[Nullable[datetime]]
49
+ r"""The timestamp when the asset was created"""
50
+ score: NotRequired[Nullable[float]]
51
+ r"""The relevance score of the asset"""
52
+ url: NotRequired[Nullable[str]]
53
+ r"""The presigned URL for accessing the asset"""
54
+ preview_url: NotRequired[Nullable[str]]
55
+ r"""The presigned URL for accessing the asset preview"""
56
+ duplicate_of: NotRequired[Nullable[str]]
57
+ r"""The asset_id of the asset that this asset is a duplicate of"""
58
+
59
+
60
+ class AssetResponse(BaseModel):
61
+ asset_id: OptionalNullable[str] = UNSET
62
+ r"""The unique identifier for the asset"""
63
+
64
+ collection_id: OptionalNullable[str] = UNSET
65
+ r"""The ID of the collection the asset belongs to"""
66
+
67
+ status: OptionalNullable[str] = UNSET
68
+ r"""The current status of the asset processing"""
69
+
70
+ file_data: OptionalNullable[FileData] = UNSET
71
+ r"""File data associated with the asset"""
72
+
73
+ metadata: OptionalNullable[AssetResponseMetadata] = UNSET
74
+ r"""Additional metadata associated with the asset"""
75
+
76
+ error: OptionalNullable[Any] = UNSET
77
+ r"""The error message if the asset processing failed"""
78
+
79
+ modality: OptionalNullable[str] = UNSET
80
+ r"""The type of media"""
81
+
82
+ task_id: OptionalNullable[str] = UNSET
83
+ r"""The task ID"""
84
+
85
+ file_hash: OptionalNullable[str] = UNSET
86
+ r"""The unique hash of the"""
87
+
88
+ updated_at: OptionalNullable[datetime] = UNSET
89
+ r"""The timestamp when the asset was last updated"""
90
+
91
+ created_at: OptionalNullable[datetime] = UNSET
92
+ r"""The timestamp when the asset was created"""
93
+
94
+ score: OptionalNullable[float] = UNSET
95
+ r"""The relevance score of the asset"""
96
+
97
+ url: OptionalNullable[str] = UNSET
98
+ r"""The presigned URL for accessing the asset"""
99
+
100
+ preview_url: OptionalNullable[str] = UNSET
101
+ r"""The presigned URL for accessing the asset preview"""
102
+
103
+ duplicate_of: OptionalNullable[str] = UNSET
104
+ r"""The asset_id of the asset that this asset is a duplicate of"""
105
+
106
+ @model_serializer(mode="wrap")
107
+ def serialize_model(self, handler):
108
+ optional_fields = [
109
+ "asset_id",
110
+ "collection_id",
111
+ "status",
112
+ "file_data",
113
+ "metadata",
114
+ "error",
115
+ "modality",
116
+ "task_id",
117
+ "file_hash",
118
+ "updated_at",
119
+ "created_at",
120
+ "score",
121
+ "url",
122
+ "preview_url",
123
+ "duplicate_of",
124
+ ]
125
+ nullable_fields = [
126
+ "asset_id",
127
+ "collection_id",
128
+ "status",
129
+ "file_data",
130
+ "metadata",
131
+ "error",
132
+ "modality",
133
+ "task_id",
134
+ "file_hash",
135
+ "updated_at",
136
+ "created_at",
137
+ "score",
138
+ "url",
139
+ "preview_url",
140
+ "duplicate_of",
141
+ ]
142
+ null_default_fields = []
143
+
144
+ serialized = handler(self)
145
+
146
+ m = {}
147
+
148
+ for n, f in self.model_fields.items():
149
+ k = f.alias or n
150
+ val = serialized.get(k)
151
+ serialized.pop(k, None)
152
+
153
+ optional_nullable = k in optional_fields and k in nullable_fields
154
+ is_set = (
155
+ self.__pydantic_fields_set__.intersection({n})
156
+ or k in null_default_fields
157
+ ) # pylint: disable=no-member
158
+
159
+ if val is not None and val != UNSET_SENTINEL:
160
+ m[k] = val
161
+ elif val != UNSET_SENTINEL and (
162
+ not k in optional_fields or (optional_nullable and is_set)
163
+ ):
164
+ m[k] = val
165
+
166
+ 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 List
6
+ from typing_extensions import TypedDict
7
+
8
+
9
+ class AssetsModelSearchQueryTypedDict(TypedDict):
10
+ key: List[str]
11
+ r"""Fields to search in. Can be a list of field names or '*' for all fields"""
12
+ value: str
13
+ r"""The search term to look for in the specified fields"""
14
+
15
+
16
+ class AssetsModelSearchQuery(BaseModel):
17
+ key: List[str]
18
+ r"""Fields to search in. Can be a list of field names or '*' for all fields"""
19
+
20
+ value: str
21
+ r"""The search term to look for in the specified fields"""
@@ -0,0 +1,28 @@
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
6
+ from typing_extensions import TypedDict
7
+
8
+
9
+ class Mode(str, Enum):
10
+ r"""Update mode: 'replace' or 'append'"""
11
+
12
+ REPLACE = "replace"
13
+ APPEND = "append"
14
+
15
+
16
+ class AssetUpdateTypedDict(TypedDict):
17
+ asset_id: str
18
+ r"""Unique identifier for the asset to be updated"""
19
+ mode: Mode
20
+ r"""Update mode: 'replace' or 'append'"""
21
+
22
+
23
+ class AssetUpdate(BaseModel):
24
+ asset_id: str
25
+ r"""Unique identifier for the asset to be updated"""
26
+
27
+ mode: Mode
28
+ r"""Update mode: 'replace' or 'append'"""
@@ -0,0 +1,23 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .modeldetails import ModelDetails, ModelDetailsTypedDict
5
+ from .payloadindextype import PayloadIndexType, PayloadIndexTypeTypedDict
6
+ from mixpeek.types import BaseModel
7
+ from typing import Dict, List
8
+ from typing_extensions import TypedDict
9
+
10
+
11
+ class AvailableIndexesResponseTypedDict(TypedDict):
12
+ r"""Response schema for available indexes endpoint"""
13
+
14
+ vector_indexes: Dict[str, ModelDetailsTypedDict]
15
+ payload_indexes: List[PayloadIndexTypeTypedDict]
16
+
17
+
18
+ class AvailableIndexesResponse(BaseModel):
19
+ r"""Response schema for available indexes endpoint"""
20
+
21
+ vector_indexes: Dict[str, ModelDetails]
22
+
23
+ payload_indexes: List[PayloadIndexType]
@@ -0,0 +1,12 @@
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 AvailableModels(str, Enum):
8
+ IMAGE = "image"
9
+ MULTIMODAL = "multimodal"
10
+ TEXT = "text"
11
+ VIDEO = "video"
12
+ KEYWORD = "keyword"
@@ -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 BoolIndexParamsTypedDict(TypedDict):
10
+ r"""Configuration for boolean index"""
11
+
12
+ type: NotRequired[str]
13
+
14
+
15
+ class BoolIndexParams(BaseModel):
16
+ r"""Configuration for boolean index"""
17
+
18
+ type: Optional[str] = "bool"
@@ -0,0 +1,70 @@
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 CollectionModelMetadataTypedDict(TypedDict):
11
+ pass
12
+
13
+
14
+ class CollectionModelMetadata(BaseModel):
15
+ pass
16
+
17
+
18
+ class CollectionModelTypedDict(TypedDict):
19
+ collection_name: str
20
+ r"""Name for the collection"""
21
+ collection_id: NotRequired[str]
22
+ r"""Unique identifier for the collection"""
23
+ namespace_id: NotRequired[Nullable[str]]
24
+ r"""Namespace for the collection"""
25
+ metadata: NotRequired[Nullable[CollectionModelMetadataTypedDict]]
26
+ r"""Optional metadata for the collection"""
27
+
28
+
29
+ class CollectionModel(BaseModel):
30
+ collection_name: str
31
+ r"""Name for the collection"""
32
+
33
+ collection_id: Optional[str] = None
34
+ r"""Unique identifier for the collection"""
35
+
36
+ namespace_id: OptionalNullable[str] = UNSET
37
+ r"""Namespace for the collection"""
38
+
39
+ metadata: OptionalNullable[CollectionModelMetadata] = UNSET
40
+ r"""Optional metadata for the collection"""
41
+
42
+ @model_serializer(mode="wrap")
43
+ def serialize_model(self, handler):
44
+ optional_fields = ["collection_id", "namespace_id", "metadata"]
45
+ nullable_fields = ["namespace_id", "metadata"]
46
+ null_default_fields = []
47
+
48
+ serialized = handler(self)
49
+
50
+ m = {}
51
+
52
+ for n, f in self.model_fields.items():
53
+ k = f.alias or n
54
+ val = serialized.get(k)
55
+ serialized.pop(k, None)
56
+
57
+ optional_nullable = k in optional_fields and k in nullable_fields
58
+ is_set = (
59
+ self.__pydantic_fields_set__.intersection({n})
60
+ or k in null_default_fields
61
+ ) # pylint: disable=no-member
62
+
63
+ if val is not None and val != UNSET_SENTINEL:
64
+ m[k] = val
65
+ elif val != UNSET_SENTINEL and (
66
+ not k in optional_fields or (optional_nullable and is_set)
67
+ ):
68
+ m[k] = val
69
+
70
+ return m
@@ -0,0 +1,73 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from datetime import datetime
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from pydantic import model_serializer
7
+ from typing_extensions import NotRequired, TypedDict
8
+
9
+
10
+ class CollectionResultMetadataTypedDict(TypedDict):
11
+ pass
12
+
13
+
14
+ class CollectionResultMetadata(BaseModel):
15
+ pass
16
+
17
+
18
+ class CollectionResultTypedDict(TypedDict):
19
+ count: int
20
+ size_bytes: int
21
+ last_updated: datetime
22
+ r"""MongoDB datetime format"""
23
+ collection_id: str
24
+ preview_url: NotRequired[Nullable[str]]
25
+ metadata: NotRequired[Nullable[CollectionResultMetadataTypedDict]]
26
+ collection_name: NotRequired[Nullable[str]]
27
+
28
+
29
+ class CollectionResult(BaseModel):
30
+ count: int
31
+
32
+ size_bytes: int
33
+
34
+ last_updated: datetime
35
+ r"""MongoDB datetime format"""
36
+
37
+ collection_id: str
38
+
39
+ preview_url: OptionalNullable[str] = UNSET
40
+
41
+ metadata: OptionalNullable[CollectionResultMetadata] = UNSET
42
+
43
+ collection_name: OptionalNullable[str] = UNSET
44
+
45
+ @model_serializer(mode="wrap")
46
+ def serialize_model(self, handler):
47
+ optional_fields = ["preview_url", "metadata", "collection_name"]
48
+ nullable_fields = ["preview_url", "metadata", "collection_name"]
49
+ null_default_fields = []
50
+
51
+ serialized = handler(self)
52
+
53
+ m = {}
54
+
55
+ for n, f in self.model_fields.items():
56
+ k = f.alias or n
57
+ val = serialized.get(k)
58
+ serialized.pop(k, None)
59
+
60
+ optional_nullable = k in optional_fields and k in nullable_fields
61
+ is_set = (
62
+ self.__pydantic_fields_set__.intersection({n})
63
+ or k in null_default_fields
64
+ ) # pylint: disable=no-member
65
+
66
+ if val is not None and val != UNSET_SENTINEL:
67
+ m[k] = val
68
+ elif val != UNSET_SENTINEL and (
69
+ not k in optional_fields or (optional_nullable and is_set)
70
+ ):
71
+ m[k] = val
72
+
73
+ return m
@@ -0,0 +1,23 @@
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 mixpeek.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
6
+ from typing import Optional
7
+ from typing_extensions import Annotated, NotRequired, TypedDict
8
+
9
+
10
+ class CreateAPIKeyOrganizationsUsersUserEmailAPIKeysPostRequestTypedDict(TypedDict):
11
+ user_email: str
12
+ key_name: NotRequired[str]
13
+
14
+
15
+ class CreateAPIKeyOrganizationsUsersUserEmailAPIKeysPostRequest(BaseModel):
16
+ user_email: Annotated[
17
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
18
+ ]
19
+
20
+ key_name: Annotated[
21
+ Optional[str],
22
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
23
+ ] = "default"
@@ -0,0 +1,62 @@
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 FieldMetadata, HeaderMetadata, RequestMetadata
10
+ import pydantic
11
+ from pydantic import model_serializer
12
+ from typing_extensions import Annotated, NotRequired, TypedDict
13
+
14
+
15
+ class CreateCollectionCollectionsPostRequestTypedDict(TypedDict):
16
+ create_collection_request: CreateCollectionRequestTypedDict
17
+ x_namespace: NotRequired[Nullable[str]]
18
+ 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."""
19
+
20
+
21
+ class CreateCollectionCollectionsPostRequest(BaseModel):
22
+ create_collection_request: Annotated[
23
+ CreateCollectionRequest,
24
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
25
+ ]
26
+
27
+ x_namespace: Annotated[
28
+ OptionalNullable[str],
29
+ pydantic.Field(alias="X-Namespace"),
30
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
31
+ ] = UNSET
32
+ 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."""
33
+
34
+ @model_serializer(mode="wrap")
35
+ def serialize_model(self, handler):
36
+ optional_fields = ["X-Namespace"]
37
+ nullable_fields = ["X-Namespace"]
38
+ null_default_fields = []
39
+
40
+ serialized = handler(self)
41
+
42
+ m = {}
43
+
44
+ for n, f in self.model_fields.items():
45
+ k = f.alias or n
46
+ val = serialized.get(k)
47
+ serialized.pop(k, None)
48
+
49
+ optional_nullable = k in optional_fields and k in nullable_fields
50
+ is_set = (
51
+ self.__pydantic_fields_set__.intersection({n})
52
+ or k in null_default_fields
53
+ ) # pylint: disable=no-member
54
+
55
+ if val is not None and val != UNSET_SENTINEL:
56
+ m[k] = val
57
+ elif val != UNSET_SENTINEL and (
58
+ not k in optional_fields or (optional_nullable and is_set)
59
+ ):
60
+ m[k] = val
61
+
62
+ return m