mixpeek 0.15.2__py3-none-any.whl → 0.16.1__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 (85) hide show
  1. mixpeek/_hooks/__init__.py +0 -1
  2. mixpeek/_hooks/sdkhooks.py +0 -2
  3. mixpeek/_version.py +1 -1
  4. mixpeek/assets.py +74 -56
  5. mixpeek/collections.py +46 -40
  6. mixpeek/{featureextractors.py → feature_extractors.py} +6 -6
  7. mixpeek/feature_search.py +334 -0
  8. mixpeek/features.py +44 -356
  9. mixpeek/health.py +3 -15
  10. mixpeek/{ingest.py → ingest_assets.py} +43 -25
  11. mixpeek/models/__init__.py +291 -160
  12. mixpeek/models/assignmentconfig.py +25 -0
  13. mixpeek/models/availablemodels.py +2 -1
  14. mixpeek/models/{availableindexesresponse.py → availablemodelsresponse.py} +8 -4
  15. mixpeek/models/classificationmatch.py +72 -0
  16. mixpeek/models/classificationwithfeature.py +73 -0
  17. mixpeek/models/classify_features_v1_entities_taxonomies_taxonomy_classify_postop.py +73 -0
  18. mixpeek/models/{create_api_key_organizations_users_user_email_api_keys_postop.py → create_api_key_v1_organizations_users_user_email_api_keys_postop.py} +2 -2
  19. mixpeek/models/{create_collection_collections_postop.py → create_collection_v1_collections_postop.py} +2 -2
  20. mixpeek/models/create_taxonomy_v1_entities_taxonomies_postop.py +59 -0
  21. mixpeek/models/createnamespacerequest.py +2 -2
  22. mixpeek/models/{delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py → delete_api_key_v1_organizations_users_user_email_api_keys_key_name_deleteop.py} +2 -2
  23. mixpeek/models/{delete_asset_assets_asset_id_deleteop.py → delete_asset_v1_assets_asset_id_deleteop.py} +2 -2
  24. mixpeek/models/delete_classifications_v1_entities_taxonomies_taxonomy_classifications_classification_id_deleteop.py +70 -0
  25. mixpeek/models/{delete_collection_collections_collection_deleteop.py → delete_collection_v1_collections_collection_deleteop.py} +2 -2
  26. mixpeek/models/{delete_feature_features_feature_id_deleteop.py → delete_feature_v1_features_feature_id_deleteop.py} +2 -2
  27. mixpeek/models/{delete_namespace_namespaces_namespace_deleteop.py → delete_namespace_v1_namespaces_namespace_deleteop.py} +2 -2
  28. mixpeek/models/delete_taxonomy_v1_entities_taxonomies_taxonomy_deleteop.py +59 -0
  29. mixpeek/models/{delete_user_organizations_users_user_email_deleteop.py → delete_user_v1_organizations_users_user_email_deleteop.py} +2 -2
  30. mixpeek/models/discoverrequest.py +74 -0
  31. mixpeek/models/embeddingconfig.py +33 -0
  32. mixpeek/models/embeddingrequest.py +40 -7
  33. mixpeek/models/featureoptions.py +25 -0
  34. mixpeek/models/{full_asset_update_assets_asset_id_putop.py → full_asset_update_v1_assets_asset_id_putop.py} +2 -2
  35. mixpeek/models/{full_feature_update_features_feature_id_putop.py → full_feature_update_v1_features_feature_id_putop.py} +2 -2
  36. mixpeek/models/genericsuccessresponse.py +17 -0
  37. mixpeek/models/{get_asset_assets_asset_id_getop.py → get_asset_v1_assets_asset_id_getop.py} +2 -2
  38. mixpeek/models/{get_asset_with_features_assets_asset_id_features_getop.py → get_asset_with_features_v1_assets_asset_id_features_getop.py} +2 -2
  39. mixpeek/models/{get_collection_collections_collection_getop.py → get_collection_v1_collections_collection_getop.py} +2 -2
  40. mixpeek/models/{get_feature_features_feature_id_getop.py → get_feature_v1_features_feature_id_getop.py} +2 -2
  41. mixpeek/models/{get_namespace_namespaces_namespace_getop.py → get_namespace_v1_namespaces_namespace_getop.py} +2 -2
  42. mixpeek/models/{get_task_tasks_task_id_getop.py → get_task_v1_tasks_task_id_getop.py} +2 -2
  43. mixpeek/models/get_taxonomy_node_v1_entities_taxonomies_nodes_node_getop.py +59 -0
  44. mixpeek/models/get_taxonomy_v1_entities_taxonomies_taxonomy_getop.py +59 -0
  45. mixpeek/models/{get_user_organizations_users_user_email_getop.py → get_user_v1_organizations_users_user_email_getop.py} +2 -2
  46. mixpeek/models/{ingest_image_url_ingest_images_url_postop.py → ingest_image_url_v1_ingest_images_url_postop.py} +2 -2
  47. mixpeek/models/{ingest_text_ingest_text_postop.py → ingest_text_v1_ingest_text_postop.py} +2 -2
  48. mixpeek/models/{ingest_video_url_ingest_videos_url_postop.py → ingest_video_url_v1_ingest_videos_url_postop.py} +2 -2
  49. mixpeek/models/{kill_task_tasks_task_id_deleteop.py → kill_task_v1_tasks_task_id_deleteop.py} +2 -2
  50. mixpeek/models/{list_assets_assets_postop.py → list_assets_v1_assets_postop.py} +2 -2
  51. mixpeek/models/list_classifications_v1_entities_taxonomies_taxonomy_classifications_postop.py +92 -0
  52. mixpeek/models/{list_collections_collections_getop.py → list_collections_v1_collections_getop.py} +2 -2
  53. mixpeek/models/{list_features_features_postop.py → list_features_v1_features_postop.py} +2 -2
  54. mixpeek/models/list_taxonomies_v1_entities_taxonomies_getop.py +67 -0
  55. mixpeek/models/listclassificationsrequest.py +69 -0
  56. mixpeek/models/listclassificationsresponse.py +31 -0
  57. mixpeek/models/listtaxonomiesresponse.py +24 -0
  58. mixpeek/models/modeldetails.py +9 -5
  59. mixpeek/models/nodeoptions.py +16 -0
  60. mixpeek/models/nodeupdate.py +51 -0
  61. mixpeek/models/{partial_asset_update_assets_asset_id_patchop.py → partial_asset_update_v1_assets_asset_id_patchop.py} +2 -2
  62. mixpeek/models/permission.py +12 -0
  63. mixpeek/models/{search_assets_assets_search_postop.py → search_assets_v1_assets_search_postop.py} +2 -2
  64. mixpeek/models/{search_features_features_search_postop.py → search_features_v1_features_search_postop.py} +4 -4
  65. mixpeek/models/searchrequestfeatures.py +9 -7
  66. mixpeek/models/taxonomycreate.py +20 -0
  67. mixpeek/models/taxonomymodel.py +27 -0
  68. mixpeek/models/taxonomynode.py +101 -0
  69. mixpeek/models/taxonomynodecreate.py +63 -0
  70. mixpeek/models/taxonomyupdate.py +55 -0
  71. mixpeek/models/{update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py → update_api_key_v1_organizations_users_user_email_api_keys_key_name_patchop.py} +2 -2
  72. mixpeek/models/{update_collection_collections_collection_putop.py → update_collection_v1_collections_collection_putop.py} +2 -2
  73. mixpeek/models/{update_namespace_namespaces_namespace_putop.py → update_namespace_v1_namespaces_namespace_putop.py} +2 -2
  74. mixpeek/models/update_node_v1_entities_taxonomies_nodes_node_patchop.py +71 -0
  75. mixpeek/models/update_taxonomy_v1_entities_taxonomies_taxonomy_patchop.py +71 -0
  76. mixpeek/models/vectormodel.py +1 -0
  77. mixpeek/namespaces.py +52 -52
  78. mixpeek/organizations.py +82 -58
  79. mixpeek/sdk.py +12 -6
  80. mixpeek/sdkconfiguration.py +4 -4
  81. mixpeek/tasks.py +22 -16
  82. mixpeek/taxonomy_entities.py +2214 -0
  83. {mixpeek-0.15.2.dist-info → mixpeek-0.16.1.dist-info}/METADATA +64 -49
  84. {mixpeek-0.15.2.dist-info → mixpeek-0.16.1.dist-info}/RECORD +85 -56
  85. {mixpeek-0.15.2.dist-info → mixpeek-0.16.1.dist-info}/WHEEL +1 -1
@@ -0,0 +1,74 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .assignmentconfig import AssignmentConfig, AssignmentConfigTypedDict
5
+ from .logicaloperator import LogicalOperator, LogicalOperatorTypedDict
6
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
7
+ from pydantic import model_serializer
8
+ from typing import List, Optional
9
+ from typing_extensions import NotRequired, TypedDict
10
+
11
+
12
+ class DiscoverRequestTypedDict(TypedDict):
13
+ collections: List[str]
14
+ r"""List of collection names or ids to search for features"""
15
+ filters: NotRequired[Nullable[LogicalOperatorTypedDict]]
16
+ r"""Filters to apply to the discovery task"""
17
+ confidence_threshold: NotRequired[float]
18
+ r"""Minimum confidence score required for classification"""
19
+ assignment: NotRequired[AssignmentConfigTypedDict]
20
+ r"""Configuration for how classifications should be assigned to features"""
21
+ sample_size: NotRequired[Nullable[int]]
22
+ r"""Number of feature samples to process"""
23
+
24
+
25
+ class DiscoverRequest(BaseModel):
26
+ collections: List[str]
27
+ r"""List of collection names or ids to search for features"""
28
+
29
+ filters: OptionalNullable[LogicalOperator] = UNSET
30
+ r"""Filters to apply to the discovery task"""
31
+
32
+ confidence_threshold: Optional[float] = 0.8
33
+ r"""Minimum confidence score required for classification"""
34
+
35
+ assignment: Optional[AssignmentConfig] = None
36
+ r"""Configuration for how classifications should be assigned to features"""
37
+
38
+ sample_size: OptionalNullable[int] = UNSET
39
+ r"""Number of feature samples to process"""
40
+
41
+ @model_serializer(mode="wrap")
42
+ def serialize_model(self, handler):
43
+ optional_fields = [
44
+ "filters",
45
+ "confidence_threshold",
46
+ "assignment",
47
+ "sample_size",
48
+ ]
49
+ nullable_fields = ["filters", "sample_size"]
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,33 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .availablemodels import AvailableModels
5
+ from enum import Enum
6
+ from mixpeek.types import BaseModel
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class EmbeddingConfigType(str, Enum):
11
+ r"""Type of the input"""
12
+
13
+ TEXT = "text"
14
+ URL = "url"
15
+ BASE64 = "base64"
16
+
17
+
18
+ class EmbeddingConfigTypedDict(TypedDict):
19
+ type: EmbeddingConfigType
20
+ r"""Type of the input"""
21
+ value: str
22
+ r"""Value of the input"""
23
+ embedding_model: AvailableModels
24
+
25
+
26
+ class EmbeddingConfig(BaseModel):
27
+ type: EmbeddingConfigType
28
+ r"""Type of the input"""
29
+
30
+ value: str
31
+ r"""Value of the input"""
32
+
33
+ embedding_model: AvailableModels
@@ -9,15 +9,51 @@ from typing_extensions import NotRequired, TypedDict
9
9
 
10
10
 
11
11
  class EmbeddingRequestTypedDict(TypedDict):
12
+ r"""
13
+ Request model for embedding generation.
14
+
15
+ When multiple EmbeddingRequests use the same embedding_model:
16
+ - All inputs will be embedded in the same vector space
17
+ - The final embedding will be the average of all individual embeddings
18
+ - Original values will be stored with a ' | ' separator
19
+
20
+ Example:
21
+ Two requests with same model \"clip\":
22
+ 1. type: \"text\", value: \"a dog\", embedding_model: \"clip\"
23
+ 2. type: \"url\", value: \"https://example.com/image.jpg\", embedding_model: \"clip\"
24
+
25
+ Result:
26
+ - vectors[\"clip\"] = average of both embeddings
27
+ - embedding_configs[\"clip\"] = \"a dog | https://example.com/image.jpg\"
28
+
29
+ """
30
+
12
31
  type: InputType
13
32
  embedding_model: VectorModel
14
33
  value: NotRequired[Nullable[str]]
15
34
  r"""The input content to embed. Could be a URL, text content, file path, or base64 encoded string"""
16
- field_name: NotRequired[Nullable[str]]
17
- r"""Field name to insert into the database, if not provided, the embedding will be inserted into the default field"""
18
35
 
19
36
 
20
37
  class EmbeddingRequest(BaseModel):
38
+ r"""
39
+ Request model for embedding generation.
40
+
41
+ When multiple EmbeddingRequests use the same embedding_model:
42
+ - All inputs will be embedded in the same vector space
43
+ - The final embedding will be the average of all individual embeddings
44
+ - Original values will be stored with a ' | ' separator
45
+
46
+ Example:
47
+ Two requests with same model \"clip\":
48
+ 1. type: \"text\", value: \"a dog\", embedding_model: \"clip\"
49
+ 2. type: \"url\", value: \"https://example.com/image.jpg\", embedding_model: \"clip\"
50
+
51
+ Result:
52
+ - vectors[\"clip\"] = average of both embeddings
53
+ - embedding_configs[\"clip\"] = \"a dog | https://example.com/image.jpg\"
54
+
55
+ """
56
+
21
57
  type: InputType
22
58
 
23
59
  embedding_model: VectorModel
@@ -25,13 +61,10 @@ class EmbeddingRequest(BaseModel):
25
61
  value: OptionalNullable[str] = UNSET
26
62
  r"""The input content to embed. Could be a URL, text content, file path, or base64 encoded string"""
27
63
 
28
- field_name: OptionalNullable[str] = UNSET
29
- r"""Field name to insert into the database, if not provided, the embedding will be inserted into the default field"""
30
-
31
64
  @model_serializer(mode="wrap")
32
65
  def serialize_model(self, handler):
33
- optional_fields = ["value", "field_name"]
34
- nullable_fields = ["value", "field_name"]
66
+ optional_fields = ["value"]
67
+ nullable_fields = ["value"]
35
68
  null_default_fields = []
36
69
 
37
70
  serialized = handler(self)
@@ -0,0 +1,25 @@
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 FeatureOptionsTypedDict(TypedDict):
10
+ r"""Controls what feature data to include in classification responses"""
11
+
12
+ return_payload: NotRequired[bool]
13
+ r"""Whether to include the full feature payload in the response"""
14
+ return_url: NotRequired[bool]
15
+ r"""Whether to include feature URLs in the response"""
16
+
17
+
18
+ class FeatureOptions(BaseModel):
19
+ r"""Controls what feature data to include in classification responses"""
20
+
21
+ return_payload: Optional[bool] = False
22
+ r"""Whether to include the full feature payload in the response"""
23
+
24
+ return_url: Optional[bool] = False
25
+ r"""Whether to include feature URLs in the response"""
@@ -14,14 +14,14 @@ from pydantic import model_serializer
14
14
  from typing_extensions import Annotated, NotRequired, TypedDict
15
15
 
16
16
 
17
- class FullAssetUpdateAssetsAssetIDPutRequestTypedDict(TypedDict):
17
+ class FullAssetUpdateV1AssetsAssetIDPutRequestTypedDict(TypedDict):
18
18
  asset_id: str
19
19
  update_asset_request: UpdateAssetRequestTypedDict
20
20
  x_namespace: NotRequired[Nullable[str]]
21
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
22
 
23
23
 
24
- class FullAssetUpdateAssetsAssetIDPutRequest(BaseModel):
24
+ class FullAssetUpdateV1AssetsAssetIDPutRequest(BaseModel):
25
25
  asset_id: Annotated[
26
26
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
27
27
  ]
@@ -14,14 +14,14 @@ from pydantic import model_serializer
14
14
  from typing_extensions import Annotated, NotRequired, TypedDict
15
15
 
16
16
 
17
- class FullFeatureUpdateFeaturesFeatureIDPutRequestTypedDict(TypedDict):
17
+ class FullFeatureUpdateV1FeaturesFeatureIDPutRequestTypedDict(TypedDict):
18
18
  feature_id: str
19
19
  feature_update_request: FeatureUpdateRequestTypedDict
20
20
  x_namespace: NotRequired[Nullable[str]]
21
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
22
 
23
23
 
24
- class FullFeatureUpdateFeaturesFeatureIDPutRequest(BaseModel):
24
+ class FullFeatureUpdateV1FeaturesFeatureIDPutRequest(BaseModel):
25
25
  feature_id: Annotated[
26
26
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
27
27
  ]
@@ -0,0 +1,17 @@
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 GenericSuccessResponseTypedDict(TypedDict):
10
+ message: str
11
+ success: NotRequired[bool]
12
+
13
+
14
+ class GenericSuccessResponse(BaseModel):
15
+ message: str
16
+
17
+ success: Optional[bool] = True
@@ -14,7 +14,7 @@ from typing import Optional
14
14
  from typing_extensions import Annotated, NotRequired, TypedDict
15
15
 
16
16
 
17
- class GetAssetAssetsAssetIDGetRequestTypedDict(TypedDict):
17
+ class GetAssetV1AssetsAssetIDGetRequestTypedDict(TypedDict):
18
18
  asset_id: str
19
19
  r"""Unique identifier of the asset"""
20
20
  return_url: NotRequired[bool]
@@ -23,7 +23,7 @@ class GetAssetAssetsAssetIDGetRequestTypedDict(TypedDict):
23
23
  r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
24
24
 
25
25
 
26
- class GetAssetAssetsAssetIDGetRequest(BaseModel):
26
+ class GetAssetV1AssetsAssetIDGetRequest(BaseModel):
27
27
  asset_id: Annotated[
28
28
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
29
29
  ]
@@ -14,7 +14,7 @@ from typing import Optional
14
14
  from typing_extensions import Annotated, NotRequired, TypedDict
15
15
 
16
16
 
17
- class GetAssetWithFeaturesAssetsAssetIDFeaturesGetRequestTypedDict(TypedDict):
17
+ class GetAssetWithFeaturesV1AssetsAssetIDFeaturesGetRequestTypedDict(TypedDict):
18
18
  asset_id: str
19
19
  r"""Unique identifier of the asset"""
20
20
  return_url: NotRequired[bool]
@@ -23,7 +23,7 @@ class GetAssetWithFeaturesAssetsAssetIDFeaturesGetRequestTypedDict(TypedDict):
23
23
  r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
24
24
 
25
25
 
26
- class GetAssetWithFeaturesAssetsAssetIDFeaturesGetRequest(BaseModel):
26
+ class GetAssetWithFeaturesV1AssetsAssetIDFeaturesGetRequest(BaseModel):
27
27
  asset_id: Annotated[
28
28
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
29
29
  ]
@@ -8,14 +8,14 @@ from pydantic import model_serializer
8
8
  from typing_extensions import Annotated, NotRequired, TypedDict
9
9
 
10
10
 
11
- class GetCollectionCollectionsCollectionGetRequestTypedDict(TypedDict):
11
+ class GetCollectionV1CollectionsCollectionGetRequestTypedDict(TypedDict):
12
12
  collection: str
13
13
  r"""Either the collection name or collection ID"""
14
14
  x_namespace: NotRequired[Nullable[str]]
15
15
  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."""
16
16
 
17
17
 
18
- class GetCollectionCollectionsCollectionGetRequest(BaseModel):
18
+ class GetCollectionV1CollectionsCollectionGetRequest(BaseModel):
19
19
  collection: Annotated[
20
20
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
21
21
  ]
@@ -13,7 +13,7 @@ from pydantic import model_serializer
13
13
  from typing_extensions import Annotated, NotRequired, TypedDict
14
14
 
15
15
 
16
- class GetFeatureFeaturesFeatureIDGetRequestTypedDict(TypedDict):
16
+ class GetFeatureV1FeaturesFeatureIDGetRequestTypedDict(TypedDict):
17
17
  feature_id: str
18
18
  return_vectors: NotRequired[Nullable[bool]]
19
19
  r"""When true, includes the feature's vector embeddings in the response"""
@@ -21,7 +21,7 @@ class GetFeatureFeaturesFeatureIDGetRequestTypedDict(TypedDict):
21
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
22
 
23
23
 
24
- class GetFeatureFeaturesFeatureIDGetRequest(BaseModel):
24
+ class GetFeatureV1FeaturesFeatureIDGetRequest(BaseModel):
25
25
  feature_id: Annotated[
26
26
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
27
27
  ]
@@ -6,12 +6,12 @@ from mixpeek.utils import FieldMetadata, PathParamMetadata
6
6
  from typing_extensions import Annotated, TypedDict
7
7
 
8
8
 
9
- class GetNamespaceNamespacesNamespaceGetRequestTypedDict(TypedDict):
9
+ class GetNamespaceV1NamespacesNamespaceGetRequestTypedDict(TypedDict):
10
10
  namespace: str
11
11
  r"""Either the namespace name or namespace ID"""
12
12
 
13
13
 
14
- class GetNamespaceNamespacesNamespaceGetRequest(BaseModel):
14
+ class GetNamespaceV1NamespacesNamespaceGetRequest(BaseModel):
15
15
  namespace: Annotated[
16
16
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
17
17
  ]
@@ -8,13 +8,13 @@ from pydantic import model_serializer
8
8
  from typing_extensions import Annotated, NotRequired, TypedDict
9
9
 
10
10
 
11
- class GetTaskTasksTaskIDGetRequestTypedDict(TypedDict):
11
+ class GetTaskV1TasksTaskIDGetRequestTypedDict(TypedDict):
12
12
  task_id: str
13
13
  x_namespace: NotRequired[Nullable[str]]
14
14
  r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
15
15
 
16
16
 
17
- class GetTaskTasksTaskIDGetRequest(BaseModel):
17
+ class GetTaskV1TasksTaskIDGetRequest(BaseModel):
18
18
  task_id: Annotated[
19
19
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
20
20
  ]
@@ -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, OptionalNullable, UNSET, UNSET_SENTINEL
5
+ from mixpeek.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
6
+ import pydantic
7
+ from pydantic import model_serializer
8
+ from typing_extensions import Annotated, NotRequired, TypedDict
9
+
10
+
11
+ class GetTaxonomyNodeV1EntitiesTaxonomiesNodesNodeGetRequestTypedDict(TypedDict):
12
+ node: str
13
+ r"""The ID or name of the node to find the taxonomy for"""
14
+ x_namespace: NotRequired[Nullable[str]]
15
+ 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."""
16
+
17
+
18
+ class GetTaxonomyNodeV1EntitiesTaxonomiesNodesNodeGetRequest(BaseModel):
19
+ node: Annotated[
20
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
21
+ ]
22
+ r"""The ID or name of the node to find the taxonomy for"""
23
+
24
+ x_namespace: Annotated[
25
+ OptionalNullable[str],
26
+ pydantic.Field(alias="X-Namespace"),
27
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
28
+ ] = UNSET
29
+ 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."""
30
+
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = ["X-Namespace"]
34
+ nullable_fields = ["X-Namespace"]
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,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, OptionalNullable, UNSET, UNSET_SENTINEL
5
+ from mixpeek.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
6
+ import pydantic
7
+ from pydantic import model_serializer
8
+ from typing_extensions import Annotated, NotRequired, TypedDict
9
+
10
+
11
+ class GetTaxonomyV1EntitiesTaxonomiesTaxonomyGetRequestTypedDict(TypedDict):
12
+ taxonomy: str
13
+ r"""The name or id of the taxonomy to find"""
14
+ x_namespace: NotRequired[Nullable[str]]
15
+ 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."""
16
+
17
+
18
+ class GetTaxonomyV1EntitiesTaxonomiesTaxonomyGetRequest(BaseModel):
19
+ taxonomy: Annotated[
20
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
21
+ ]
22
+ r"""The name or id of the taxonomy to find"""
23
+
24
+ x_namespace: Annotated[
25
+ OptionalNullable[str],
26
+ pydantic.Field(alias="X-Namespace"),
27
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
28
+ ] = UNSET
29
+ 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."""
30
+
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = ["X-Namespace"]
34
+ nullable_fields = ["X-Namespace"]
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
@@ -6,11 +6,11 @@ from mixpeek.utils import FieldMetadata, PathParamMetadata
6
6
  from typing_extensions import Annotated, TypedDict
7
7
 
8
8
 
9
- class GetUserOrganizationsUsersUserEmailGetRequestTypedDict(TypedDict):
9
+ class GetUserV1OrganizationsUsersUserEmailGetRequestTypedDict(TypedDict):
10
10
  user_email: str
11
11
 
12
12
 
13
- class GetUserOrganizationsUsersUserEmailGetRequest(BaseModel):
13
+ class GetUserV1OrganizationsUsersUserEmailGetRequest(BaseModel):
14
14
  user_email: Annotated[
15
15
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
16
16
  ]
@@ -9,13 +9,13 @@ from pydantic import model_serializer
9
9
  from typing_extensions import Annotated, NotRequired, TypedDict
10
10
 
11
11
 
12
- class IngestImageURLIngestImagesURLPostRequestTypedDict(TypedDict):
12
+ class IngestImageURLV1IngestImagesURLPostRequestTypedDict(TypedDict):
13
13
  process_image_url_input: ProcessImageURLInputTypedDict
14
14
  x_namespace: NotRequired[Nullable[str]]
15
15
  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."""
16
16
 
17
17
 
18
- class IngestImageURLIngestImagesURLPostRequest(BaseModel):
18
+ class IngestImageURLV1IngestImagesURLPostRequest(BaseModel):
19
19
  process_image_url_input: Annotated[
20
20
  ProcessImageURLInput,
21
21
  FieldMetadata(request=RequestMetadata(media_type="application/json")),
@@ -9,13 +9,13 @@ from pydantic import model_serializer
9
9
  from typing_extensions import Annotated, NotRequired, TypedDict
10
10
 
11
11
 
12
- class IngestTextIngestTextPostRequestTypedDict(TypedDict):
12
+ class IngestTextV1IngestTextPostRequestTypedDict(TypedDict):
13
13
  process_text_input: ProcessTextInputTypedDict
14
14
  x_namespace: NotRequired[Nullable[str]]
15
15
  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."""
16
16
 
17
17
 
18
- class IngestTextIngestTextPostRequest(BaseModel):
18
+ class IngestTextV1IngestTextPostRequest(BaseModel):
19
19
  process_text_input: Annotated[
20
20
  ProcessTextInput,
21
21
  FieldMetadata(request=RequestMetadata(media_type="application/json")),
@@ -9,13 +9,13 @@ from pydantic import model_serializer
9
9
  from typing_extensions import Annotated, NotRequired, TypedDict
10
10
 
11
11
 
12
- class IngestVideoURLIngestVideosURLPostRequestTypedDict(TypedDict):
12
+ class IngestVideoURLV1IngestVideosURLPostRequestTypedDict(TypedDict):
13
13
  process_video_url_input: ProcessVideoURLInputTypedDict
14
14
  x_namespace: NotRequired[Nullable[str]]
15
15
  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."""
16
16
 
17
17
 
18
- class IngestVideoURLIngestVideosURLPostRequest(BaseModel):
18
+ class IngestVideoURLV1IngestVideosURLPostRequest(BaseModel):
19
19
  process_video_url_input: Annotated[
20
20
  ProcessVideoURLInput,
21
21
  FieldMetadata(request=RequestMetadata(media_type="application/json")),
@@ -8,13 +8,13 @@ from pydantic import model_serializer
8
8
  from typing_extensions import Annotated, NotRequired, TypedDict
9
9
 
10
10
 
11
- class KillTaskTasksTaskIDDeleteRequestTypedDict(TypedDict):
11
+ class KillTaskV1TasksTaskIDDeleteRequestTypedDict(TypedDict):
12
12
  task_id: str
13
13
  x_namespace: NotRequired[Nullable[str]]
14
14
  r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
15
15
 
16
16
 
17
- class KillTaskTasksTaskIDDeleteRequest(BaseModel):
17
+ class KillTaskV1TasksTaskIDDeleteRequest(BaseModel):
18
18
  task_id: Annotated[
19
19
  str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
20
20
  ]
@@ -15,7 +15,7 @@ from typing import Optional
15
15
  from typing_extensions import Annotated, NotRequired, TypedDict
16
16
 
17
17
 
18
- class ListAssetsAssetsPostRequestTypedDict(TypedDict):
18
+ class ListAssetsV1AssetsPostRequestTypedDict(TypedDict):
19
19
  list_assets_request: ListAssetsRequestTypedDict
20
20
  page: NotRequired[Nullable[int]]
21
21
  page_size: NotRequired[int]
@@ -23,7 +23,7 @@ class ListAssetsAssetsPostRequestTypedDict(TypedDict):
23
23
  r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
24
24
 
25
25
 
26
- class ListAssetsAssetsPostRequest(BaseModel):
26
+ class ListAssetsV1AssetsPostRequest(BaseModel):
27
27
  list_assets_request: Annotated[
28
28
  ListAssetsRequest,
29
29
  FieldMetadata(request=RequestMetadata(media_type="application/json")),