mixpeek 0.20.20__py3-none-any.whl → 0.21.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 (228) hide show
  1. mixpeek/_version.py +3 -3
  2. mixpeek/{assets.py → bucket_objects.py} +309 -793
  3. mixpeek/buckets.py +1292 -0
  4. mixpeek/clusters.py +306 -0
  5. mixpeek/collection_cache.py +820 -0
  6. mixpeek/{taxonomyentities.py → collection_documents.py} +305 -559
  7. mixpeek/collections.py +122 -996
  8. mixpeek/features.py +45 -991
  9. mixpeek/models/__init__.py +625 -570
  10. mixpeek/models/aggregationtype.py +13 -0
  11. mixpeek/models/apikeyupdate.py +1 -1
  12. mixpeek/models/attributebasedconfig.py +21 -0
  13. mixpeek/models/automaticnaming.py +29 -0
  14. mixpeek/models/basicfeatureextractor.py +35 -0
  15. mixpeek/models/{classify_features_v1_entities_taxonomies_taxonomy_classify_postop.py → batch_delete_documents_v1_collections_collection_identifier_documents_batch_deleteop.py} +17 -15
  16. mixpeek/models/{update_collection_v1_collections_collection_putop.py → batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py} +29 -19
  17. mixpeek/models/blobdetails.py +72 -0
  18. mixpeek/models/blobmodel.py +107 -0
  19. mixpeek/models/bucketcreaterequest.py +75 -0
  20. mixpeek/models/bucketresponse.py +90 -0
  21. mixpeek/models/bucketschema_input.py +37 -0
  22. mixpeek/models/bucketschema_output.py +37 -0
  23. mixpeek/models/{featureresponse.py → bucketschemafield_input.py} +45 -18
  24. mixpeek/models/bucketschemafield_output.py +101 -0
  25. mixpeek/models/bucketschemafieldtype.py +29 -0
  26. mixpeek/models/bucketupdaterequest.py +68 -0
  27. mixpeek/models/cachestats.py +40 -0
  28. mixpeek/models/{list_collections_v1_collections_getop.py → cleanup_cache_v1_collections_cache_cleanup_postop.py} +23 -12
  29. mixpeek/models/{inputtype.py → clusteringmethod.py} +3 -5
  30. mixpeek/models/clustertype.py +9 -0
  31. mixpeek/models/collectioncacheconfig_input.py +92 -0
  32. mixpeek/models/collectioncacheconfig_output.py +92 -0
  33. mixpeek/models/collectionconfig.py +32 -0
  34. mixpeek/models/collectionmodel.py +79 -8
  35. mixpeek/models/{create_taxonomy_v1_entities_taxonomies_postop.py → create_bucket_v1_buckets_create_postop.py} +7 -7
  36. mixpeek/models/{search_assets_v1_assets_search_postop.py → create_cluster_v1_clusters_postop.py} +7 -7
  37. mixpeek/models/{create_collection_v1_collections_postop.py → create_collection_v1_collections_create_postop.py} +3 -3
  38. mixpeek/models/{ingest_video_url_v1_ingest_videos_url_postop.py → create_interaction_v1_retrievers_interactions_postop.py} +7 -7
  39. mixpeek/models/{partial_asset_update_v1_assets_asset_id_patchop.py → create_object_v1_buckets_bucket_identifier_objects_create_postop.py} +11 -9
  40. mixpeek/models/{ingest_text_v1_ingest_text_postop.py → create_retriever_v1_retrievers_retrievers_postop.py} +10 -7
  41. mixpeek/models/{ingest_image_url_v1_ingest_images_url_postop.py → create_taxonomy_v1_taxonomies_postop.py} +7 -7
  42. mixpeek/models/createblobrequest.py +80 -0
  43. mixpeek/models/createclusterrequest.py +74 -0
  44. mixpeek/models/createcollectionrequest.py +72 -3
  45. mixpeek/models/createnamespacerequest.py +14 -8
  46. mixpeek/models/createobjectrequest.py +75 -0
  47. mixpeek/models/createretrieverrequest.py +90 -0
  48. mixpeek/models/{taxonomyupdate.py → createtaxonomyrequest.py} +15 -13
  49. mixpeek/models/{delete_asset_v1_assets_asset_id_deleteop.py → delete_bucket_v1_buckets_bucket_identifier_deleteop.py} +5 -5
  50. mixpeek/models/{delete_classifications_v1_entities_taxonomies_taxonomy_classifications_classification_id_deleteop.py → delete_document_v1_collections_collection_identifier_documents_document_id_deleteop.py} +11 -11
  51. mixpeek/models/{get_taxonomy_v1_entities_taxonomies_taxonomy_getop.py → delete_interaction_v1_retrievers_interactions_interaction_id_deleteop.py} +7 -7
  52. mixpeek/models/delete_object_v1_buckets_bucket_identifier_objects_object_identifier_deleteop.py +70 -0
  53. mixpeek/models/{featureextractionembeddingrequest.py → documenthandlingconfig.py} +12 -15
  54. mixpeek/models/documentinputhandling.py +11 -0
  55. mixpeek/models/{jsontextoutputsettings.py → documentlistresponse.py} +15 -14
  56. mixpeek/models/documentoutputhandling.py +10 -0
  57. mixpeek/models/documentoutputtype.py +11 -0
  58. mixpeek/models/documentresponse.py +87 -0
  59. mixpeek/models/{nodeupdate.py → documentupdate.py} +22 -13
  60. mixpeek/models/enrichmentfield.py +25 -0
  61. mixpeek/models/errordetail.py +1 -1
  62. mixpeek/models/{update_node_v1_entities_taxonomies_nodes_node_patchop.py → execute_retriever_v1_retrievers_retrievers_retriever_id_execute_postop.py} +11 -11
  63. mixpeek/models/featureextractorconfig.py +116 -0
  64. mixpeek/models/featureextractordefinition.py +192 -0
  65. mixpeek/models/filtercondition.py +25 -25
  66. mixpeek/models/filteroperator.py +24 -0
  67. mixpeek/models/generativemodels.py +10 -0
  68. mixpeek/models/{delete_feature_v1_features_feature_id_deleteop.py → get_bucket_v1_buckets_bucket_identifier_getop.py} +5 -5
  69. mixpeek/models/{list_taxonomies_v1_entities_taxonomies_getop.py → get_cache_stats_v1_collections_cache_stats_getop.py} +16 -14
  70. mixpeek/models/get_collection_v1_collections_collection_id_getop.py +59 -0
  71. mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py +70 -0
  72. mixpeek/models/get_feature_extractor_v1_features_extractors_feature_id_getop.py +16 -0
  73. mixpeek/models/get_interaction_v1_retrievers_interactions_interaction_id_getop.py +57 -0
  74. mixpeek/models/{delete_collection_v1_collections_collection_deleteop.py → get_object_v1_buckets_bucket_identifier_objects_object_identifier_getop.py} +16 -7
  75. mixpeek/models/get_research_v1_research_getop.py +52 -0
  76. mixpeek/models/get_retriever_stages_v1_retrievers_stages_getop.py +52 -0
  77. mixpeek/models/{delete_taxonomy_v1_entities_taxonomies_taxonomy_deleteop.py → get_retriever_v1_retrievers_retrievers_retriever_id_getop.py} +5 -7
  78. mixpeek/models/get_task_v1_tasks_task_id_getop.py +1 -1
  79. mixpeek/models/getusagerequestmodel.py +91 -0
  80. mixpeek/models/hdbscanparameters.py +26 -0
  81. mixpeek/models/interactionresponse.py +86 -0
  82. mixpeek/models/interactiontype.py +22 -0
  83. mixpeek/models/{search_features_v1_features_search_postop.py → invalidate_cache_v1_collections_cache_invalidate_postop.py} +60 -34
  84. mixpeek/models/invalidationevent.py +67 -0
  85. mixpeek/models/invalidationstrategy.py +12 -0
  86. mixpeek/models/kill_task_v1_tasks_task_id_deleteop.py +1 -1
  87. mixpeek/models/list_active_tasks_v1_tasks_getop.py +1 -1
  88. mixpeek/models/{list_assets_v1_assets_postop.py → list_buckets_v1_buckets_postop.py} +18 -18
  89. mixpeek/models/{list_features_v1_features_postop.py → list_documents_v1_collections_collection_identifier_documents_getop.py} +54 -19
  90. mixpeek/models/list_interactions_v1_retrievers_interactions_getop.py +96 -0
  91. mixpeek/models/{list_classifications_v1_entities_taxonomies_taxonomy_classifications_postop.py → list_objects_v1_buckets_bucket_identifier_objects_postop.py} +22 -29
  92. mixpeek/models/{groupbyoptionsasset.py → listbucketsrequest.py} +19 -28
  93. mixpeek/models/listbucketsresponse.py +23 -0
  94. mixpeek/models/{groupbyoptions.py → listobjectsrequest.py} +19 -28
  95. mixpeek/models/listobjectsresponse.py +25 -0
  96. mixpeek/models/listtasksresponse.py +3 -6
  97. mixpeek/models/{logicaloperator.py → logicaloperator_input.py} +42 -24
  98. mixpeek/models/logicaloperator_output.py +121 -0
  99. mixpeek/models/multivectorindex.py +25 -0
  100. mixpeek/models/namespaceresponse.py +1 -1
  101. mixpeek/models/namespaceusage.py +45 -0
  102. mixpeek/models/namingmethod.py +8 -0
  103. mixpeek/models/objectresponse.py +124 -0
  104. mixpeek/models/{db_model_paginationresponse.py → paginationresponse.py} +3 -3
  105. mixpeek/models/payloadindexconfig.py +1 -1
  106. mixpeek/models/plan.py +82 -0
  107. mixpeek/models/recomputestrategy.py +12 -0
  108. mixpeek/models/resourcetotals.py +39 -0
  109. mixpeek/models/{jsonvideooutputsettings.py → retrieverbinding.py} +19 -11
  110. mixpeek/models/{logodetectsettings.py → retrievercacheconfig.py} +20 -11
  111. mixpeek/models/retrievermodel.py +95 -0
  112. mixpeek/models/retrieverqueryrequest.py +114 -0
  113. mixpeek/models/retrieverresponse.py +24 -0
  114. mixpeek/models/searchinteraction.py +81 -0
  115. mixpeek/models/singlelineageentry.py +99 -0
  116. mixpeek/models/sortdirection.py +11 -0
  117. mixpeek/models/sortoption.py +20 -12
  118. mixpeek/models/sourceconfig_input.py +72 -0
  119. mixpeek/models/sourceconfig_output.py +75 -0
  120. mixpeek/models/sourcetype.py +11 -0
  121. mixpeek/models/stageconfig_input.py +111 -0
  122. mixpeek/models/stageconfig_output.py +114 -0
  123. mixpeek/models/stagedefinition.py +110 -0
  124. mixpeek/models/{jsonimageoutputsettings.py → stageresponse.py} +21 -11
  125. mixpeek/models/taskresponse.py +1 -1
  126. mixpeek/models/taskstatus.py +1 -0
  127. mixpeek/models/{assetfeatures.py → taxonomyapplicationconfig.py} +23 -15
  128. mixpeek/models/taxonomyconfig.py +19 -0
  129. mixpeek/models/timeseriesdatapoint.py +25 -0
  130. mixpeek/models/timeseriesusage.py +36 -0
  131. mixpeek/models/{full_asset_update_v1_assets_asset_id_putop.py → update_bucket_v1_buckets_bucket_identifier_putop.py} +9 -9
  132. mixpeek/models/{update_taxonomy_v1_entities_taxonomies_taxonomy_patchop.py → update_document_v1_collections_collection_identifier_documents_document_id_putop.py} +25 -13
  133. mixpeek/models/{full_feature_update_v1_features_feature_id_putop.py → update_object_v1_buckets_bucket_identifier_objects_object_identifier_putop.py} +20 -9
  134. mixpeek/models/updatenamespacerequest.py +1 -1
  135. mixpeek/models/updateobjectrequest.py +75 -0
  136. mixpeek/models/usageresponse.py +86 -0
  137. mixpeek/models/usagesummary.py +39 -0
  138. mixpeek/models/usagetimerange.py +16 -0
  139. mixpeek/models/usermodel_input.py +3 -0
  140. mixpeek/models/usermodel_output.py +3 -0
  141. mixpeek/models/vectorbasedconfig.py +60 -0
  142. mixpeek/models/{collectionresult.py → vectorindex.py} +20 -15
  143. mixpeek/models/vectorindexdefinition.py +43 -0
  144. mixpeek/models/vectortype.py +4 -1
  145. mixpeek/namespaces.py +26 -480
  146. mixpeek/organization_notifications.py +214 -0
  147. mixpeek/organizations.py +6 -210
  148. mixpeek/{featureextractors.py → organizations_usage.py} +31 -39
  149. mixpeek/research.py +228 -0
  150. mixpeek/retriever_interactions.py +1036 -0
  151. mixpeek/retriever_stages.py +232 -0
  152. mixpeek/{ingestassets.py → retrievers.py} +209 -271
  153. mixpeek/sdk.py +40 -23
  154. mixpeek/taxonomies.py +43 -513
  155. mixpeek/types/basemodel.py +3 -3
  156. mixpeek/utils/enums.py +67 -27
  157. {mixpeek-0.20.20.dist-info → mixpeek-0.21.1.dist-info}/METADATA +68 -50
  158. mixpeek-0.21.1.dist-info/RECORD +216 -0
  159. {mixpeek-0.20.20.dist-info → mixpeek-0.21.1.dist-info}/WHEEL +1 -1
  160. mixpeek/models/actionusage.py +0 -16
  161. mixpeek/models/assetresponse.py +0 -166
  162. mixpeek/models/assets_model_searchquery.py +0 -21
  163. mixpeek/models/assetupdate.py +0 -28
  164. mixpeek/models/assignmentconfig.py +0 -67
  165. mixpeek/models/assignmentmode.py +0 -11
  166. mixpeek/models/availablemodels.py +0 -16
  167. mixpeek/models/availablemodelsresponse.py +0 -27
  168. mixpeek/models/classificationmatch.py +0 -77
  169. mixpeek/models/classificationwithfeature.py +0 -73
  170. mixpeek/models/collectiondetailsresponse.py +0 -83
  171. mixpeek/models/dateusage.py +0 -22
  172. mixpeek/models/denseembedding.py +0 -16
  173. mixpeek/models/discoverrequest.py +0 -64
  174. mixpeek/models/embeddingconfig.py +0 -33
  175. mixpeek/models/embeddingrequest.py +0 -92
  176. mixpeek/models/embeddingresponse.py +0 -64
  177. mixpeek/models/entitysettings.py +0 -50
  178. mixpeek/models/featureoptions.py +0 -25
  179. mixpeek/models/features_model_paginationresponse.py +0 -59
  180. mixpeek/models/featureupdaterequest.py +0 -21
  181. mixpeek/models/get_asset_v1_assets_asset_id_getop.py +0 -73
  182. mixpeek/models/get_asset_with_features_v1_assets_asset_id_features_getop.py +0 -73
  183. mixpeek/models/get_collection_details_v1_collections_collection_details_getop.py +0 -59
  184. mixpeek/models/get_collection_details_v1_collections_collection_getop.py +0 -59
  185. mixpeek/models/get_feature_v1_features_feature_id_getop.py +0 -70
  186. mixpeek/models/get_taxonomy_node_v1_entities_taxonomies_nodes_node_getop.py +0 -59
  187. mixpeek/models/groupedassetdata.py +0 -18
  188. mixpeek/models/imagedescribesettings.py +0 -82
  189. mixpeek/models/imagedetectsettings.py +0 -47
  190. mixpeek/models/imagereadsettings.py +0 -71
  191. mixpeek/models/imagesettings.py +0 -92
  192. mixpeek/models/listassetsrequest.py +0 -75
  193. mixpeek/models/listassetsresponse.py +0 -22
  194. mixpeek/models/listclassificationsrequest.py +0 -69
  195. mixpeek/models/listclassificationsresponse.py +0 -31
  196. mixpeek/models/listcollectionsresponse.py +0 -22
  197. mixpeek/models/listfeaturesrequest.py +0 -77
  198. mixpeek/models/listfeaturesresponse.py +0 -22
  199. mixpeek/models/listtaxonomiesresponse.py +0 -24
  200. mixpeek/models/modality.py +0 -13
  201. mixpeek/models/modeldetails.py +0 -61
  202. mixpeek/models/nodeoptions.py +0 -16
  203. mixpeek/models/patch_namespace_v1_namespaces_namespace_patchop.py +0 -28
  204. mixpeek/models/payloadindextype.py +0 -17
  205. mixpeek/models/processimageurlinput.py +0 -87
  206. mixpeek/models/processtextinput.py +0 -82
  207. mixpeek/models/processvideourlinput.py +0 -87
  208. mixpeek/models/querysettings.py +0 -56
  209. mixpeek/models/rerankingoptions.py +0 -47
  210. mixpeek/models/search_model_searchquery.py +0 -76
  211. mixpeek/models/searchassetsrequest.py +0 -78
  212. mixpeek/models/searchrequestfeatures.py +0 -153
  213. mixpeek/models/sparseembedding.py +0 -21
  214. mixpeek/models/taxonomycreate.py +0 -20
  215. mixpeek/models/taxonomyextractionconfig.py +0 -26
  216. mixpeek/models/taxonomymodel.py +0 -27
  217. mixpeek/models/taxonomynode.py +0 -101
  218. mixpeek/models/taxonomynodecreate.py +0 -63
  219. mixpeek/models/textsettings.py +0 -67
  220. mixpeek/models/updateassetrequest.py +0 -60
  221. mixpeek/models/usage.py +0 -18
  222. mixpeek/models/vectormodel.py +0 -15
  223. mixpeek/models/videodescribesettings.py +0 -82
  224. mixpeek/models/videodetectsettings.py +0 -47
  225. mixpeek/models/videoreadsettings.py +0 -71
  226. mixpeek/models/videosettings.py +0 -115
  227. mixpeek/models/videotranscriptionsettings.py +0 -69
  228. mixpeek-0.20.20.dist-info/RECORD +0 -201
@@ -0,0 +1,86 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .interactiontype import InteractionType
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 InteractionResponseMetadataTypedDict(TypedDict):
12
+ pass
13
+
14
+
15
+ class InteractionResponseMetadata(BaseModel):
16
+ pass
17
+
18
+
19
+ class InteractionResponseTypedDict(TypedDict):
20
+ feature_id: str
21
+ r"""ID of the item that was interacted with"""
22
+ interaction_type: List[InteractionType]
23
+ r"""Type of interaction or feedback"""
24
+ interaction_id: str
25
+ r"""Unique identifier for this interaction"""
26
+ position: NotRequired[Nullable[int]]
27
+ r"""Position in search results where interaction occurred"""
28
+ metadata: NotRequired[Nullable[InteractionResponseMetadataTypedDict]]
29
+ r"""Additional context about the interaction"""
30
+ user_id: NotRequired[Nullable[str]]
31
+ r"""Customer's authenticated user identifier - persists across sessions"""
32
+ session_id: NotRequired[Nullable[str]]
33
+ r"""Temporary identifier for a single search journey/session (typically 30min-1hr) - tracks anonymous and authenticated users"""
34
+
35
+
36
+ class InteractionResponse(BaseModel):
37
+ feature_id: str
38
+ r"""ID of the item that was interacted with"""
39
+
40
+ interaction_type: List[InteractionType]
41
+ r"""Type of interaction or feedback"""
42
+
43
+ interaction_id: str
44
+ r"""Unique identifier for this interaction"""
45
+
46
+ position: OptionalNullable[int] = UNSET
47
+ r"""Position in search results where interaction occurred"""
48
+
49
+ metadata: OptionalNullable[InteractionResponseMetadata] = UNSET
50
+ r"""Additional context about the interaction"""
51
+
52
+ user_id: OptionalNullable[str] = UNSET
53
+ r"""Customer's authenticated user identifier - persists across sessions"""
54
+
55
+ session_id: OptionalNullable[str] = UNSET
56
+ r"""Temporary identifier for a single search journey/session (typically 30min-1hr) - tracks anonymous and authenticated users"""
57
+
58
+ @model_serializer(mode="wrap")
59
+ def serialize_model(self, handler):
60
+ optional_fields = ["position", "metadata", "user_id", "session_id"]
61
+ nullable_fields = ["position", "metadata", "user_id", "session_id"]
62
+ null_default_fields = []
63
+
64
+ serialized = handler(self)
65
+
66
+ m = {}
67
+
68
+ for n, f in type(self).model_fields.items():
69
+ k = f.alias or n
70
+ val = serialized.get(k)
71
+ serialized.pop(k, None)
72
+
73
+ optional_nullable = k in optional_fields and k in nullable_fields
74
+ is_set = (
75
+ self.__pydantic_fields_set__.intersection({n})
76
+ or k in null_default_fields
77
+ ) # pylint: disable=no-member
78
+
79
+ if val is not None and val != UNSET_SENTINEL:
80
+ m[k] = val
81
+ elif val != UNSET_SENTINEL and (
82
+ not k in optional_fields or (optional_nullable and is_set)
83
+ ):
84
+ m[k] = val
85
+
86
+ return m
@@ -0,0 +1,22 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from enum import Enum
5
+
6
+
7
+ class InteractionType(str, Enum):
8
+ VIEW = "view"
9
+ CLICK = "click"
10
+ POSITIVE_FEEDBACK = "positive_feedback"
11
+ NEGATIVE_FEEDBACK = "negative_feedback"
12
+ PURCHASE = "purchase"
13
+ ADD_TO_CART = "add_to_cart"
14
+ WISHLIST = "wishlist"
15
+ LONG_VIEW = "long_view"
16
+ SHARE = "share"
17
+ BOOKMARK = "bookmark"
18
+ QUERY_REFINEMENT = "query_refinement"
19
+ ZERO_RESULTS = "zero_results"
20
+ FILTER_TOGGLE = "filter_toggle"
21
+ SKIP = "skip"
22
+ RETURN_TO_RESULTS = "return_to_results"
@@ -1,7 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .searchrequestfeatures import SearchRequestFeatures, SearchRequestFeaturesTypedDict
4
+ from .recomputestrategy import RecomputeStrategy
5
5
  from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
6
  from mixpeek.utils import (
7
7
  FieldMetadata,
@@ -11,37 +11,57 @@ from mixpeek.utils import (
11
11
  )
12
12
  import pydantic
13
13
  from pydantic import model_serializer
14
- from typing import Optional
14
+ from typing import List, Optional
15
15
  from typing_extensions import Annotated, NotRequired, TypedDict
16
16
 
17
17
 
18
- class SearchFeaturesV1FeaturesSearchPostRequestTypedDict(TypedDict):
19
- search_request_features: SearchRequestFeaturesTypedDict
20
- offset_position: NotRequired[Nullable[int]]
21
- r"""The position to start returning results from. Used for pagination. Does not work with group_by"""
22
- page_size: NotRequired[int]
23
- r"""Number of results to return per page."""
18
+ class InvalidateCacheV1CollectionsCacheInvalidatePostRequestTypedDict(TypedDict):
19
+ collection_id: str
20
+ action: str
21
+ internal_id: str
22
+ retriever_id: NotRequired[Nullable[str]]
23
+ recompute_strategy: NotRequired[RecomputeStrategy]
24
+ r"""Strategies for recomputing cache entries"""
25
+ redis_url: NotRequired[Nullable[str]]
26
+ prefix: NotRequired[Nullable[str]]
24
27
  x_namespace: NotRequired[Nullable[str]]
25
28
  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."""
29
+ request_body: NotRequired[Nullable[List[str]]]
26
30
 
27
31
 
28
- class SearchFeaturesV1FeaturesSearchPostRequest(BaseModel):
29
- search_request_features: Annotated[
30
- SearchRequestFeatures,
31
- FieldMetadata(request=RequestMetadata(media_type="application/json")),
32
+ class InvalidateCacheV1CollectionsCacheInvalidatePostRequest(BaseModel):
33
+ collection_id: Annotated[
34
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
35
+ ]
36
+
37
+ action: Annotated[
38
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
32
39
  ]
33
40
 
34
- offset_position: Annotated[
35
- OptionalNullable[int],
41
+ internal_id: Annotated[
42
+ str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
43
+ ]
44
+
45
+ retriever_id: Annotated[
46
+ OptionalNullable[str],
36
47
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
37
48
  ] = UNSET
38
- r"""The position to start returning results from. Used for pagination. Does not work with group_by"""
39
49
 
40
- page_size: Annotated[
41
- Optional[int],
50
+ recompute_strategy: Annotated[
51
+ Optional[RecomputeStrategy],
42
52
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
43
- ] = 10
44
- r"""Number of results to return per page."""
53
+ ] = None
54
+ r"""Strategies for recomputing cache entries"""
55
+
56
+ redis_url: Annotated[
57
+ OptionalNullable[str],
58
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
59
+ ] = UNSET
60
+
61
+ prefix: Annotated[
62
+ OptionalNullable[str],
63
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
64
+ ] = UNSET
45
65
 
46
66
  x_namespace: Annotated[
47
67
  OptionalNullable[str],
@@ -50,17 +70,35 @@ class SearchFeaturesV1FeaturesSearchPostRequest(BaseModel):
50
70
  ] = UNSET
51
71
  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."""
52
72
 
73
+ request_body: Annotated[
74
+ OptionalNullable[List[str]],
75
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
76
+ ] = UNSET
77
+
53
78
  @model_serializer(mode="wrap")
54
79
  def serialize_model(self, handler):
55
- optional_fields = ["offset_position", "page_size", "X-Namespace"]
56
- nullable_fields = ["offset_position", "X-Namespace"]
80
+ optional_fields = [
81
+ "retriever_id",
82
+ "recompute_strategy",
83
+ "redis_url",
84
+ "prefix",
85
+ "X-Namespace",
86
+ "RequestBody",
87
+ ]
88
+ nullable_fields = [
89
+ "retriever_id",
90
+ "redis_url",
91
+ "prefix",
92
+ "X-Namespace",
93
+ "RequestBody",
94
+ ]
57
95
  null_default_fields = []
58
96
 
59
97
  serialized = handler(self)
60
98
 
61
99
  m = {}
62
100
 
63
- for n, f in self.model_fields.items():
101
+ for n, f in type(self).model_fields.items():
64
102
  k = f.alias or n
65
103
  val = serialized.get(k)
66
104
  serialized.pop(k, None)
@@ -79,15 +117,3 @@ class SearchFeaturesV1FeaturesSearchPostRequest(BaseModel):
79
117
  m[k] = val
80
118
 
81
119
  return m
82
-
83
-
84
- class SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPostTypedDict(
85
- TypedDict
86
- ):
87
- r"""Successful Response"""
88
-
89
-
90
- class SearchFeaturesV1FeaturesSearchPostResponseSearchFeaturesV1FeaturesSearchPost(
91
- BaseModel
92
- ):
93
- r"""Successful Response"""
@@ -0,0 +1,67 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .recomputestrategy import RecomputeStrategy
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 InvalidationEventTypedDict(TypedDict):
12
+ r"""Event that triggers cache invalidation"""
13
+
14
+ collection: str
15
+ r"""Collection ID to monitor"""
16
+ action: str
17
+ r"""Action that triggers invalidation (create, update, delete)"""
18
+ recompute_strategy: NotRequired[RecomputeStrategy]
19
+ r"""Strategies for recomputing cache entries"""
20
+ retriever_id: NotRequired[Nullable[str]]
21
+ r"""Optional retriever ID for retriever-specific invalidation"""
22
+
23
+
24
+ class InvalidationEvent(BaseModel):
25
+ r"""Event that triggers cache invalidation"""
26
+
27
+ collection: str
28
+ r"""Collection ID to monitor"""
29
+
30
+ action: str
31
+ r"""Action that triggers invalidation (create, update, delete)"""
32
+
33
+ recompute_strategy: Optional[RecomputeStrategy] = None
34
+ r"""Strategies for recomputing cache entries"""
35
+
36
+ retriever_id: OptionalNullable[str] = UNSET
37
+ r"""Optional retriever ID for retriever-specific invalidation"""
38
+
39
+ @model_serializer(mode="wrap")
40
+ def serialize_model(self, handler):
41
+ optional_fields = ["recompute_strategy", "retriever_id"]
42
+ nullable_fields = ["retriever_id"]
43
+ null_default_fields = []
44
+
45
+ serialized = handler(self)
46
+
47
+ m = {}
48
+
49
+ for n, f in type(self).model_fields.items():
50
+ k = f.alias or n
51
+ val = serialized.get(k)
52
+ serialized.pop(k, None)
53
+
54
+ optional_nullable = k in optional_fields and k in nullable_fields
55
+ is_set = (
56
+ self.__pydantic_fields_set__.intersection({n})
57
+ or k in null_default_fields
58
+ ) # pylint: disable=no-member
59
+
60
+ if val is not None and val != UNSET_SENTINEL:
61
+ m[k] = val
62
+ elif val != UNSET_SENTINEL and (
63
+ not k in optional_fields or (optional_nullable and is_set)
64
+ ):
65
+ m[k] = val
66
+
67
+ return m
@@ -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 InvalidationStrategy(str, Enum):
8
+ r"""Strategies for cache invalidation"""
9
+
10
+ REPLACE_IF_BETTER = "replace_if_better"
11
+ REPLACE_ALWAYS = "replace_always"
12
+ KEEP_EXISTING = "keep_existing"
@@ -36,7 +36,7 @@ class KillTaskV1TasksTaskIDDeleteRequest(BaseModel):
36
36
 
37
37
  m = {}
38
38
 
39
- for n, f in self.model_fields.items():
39
+ for n, f in type(self).model_fields.items():
40
40
  k = f.alias or n
41
41
  val = serialized.get(k)
42
42
  serialized.pop(k, None)
@@ -44,7 +44,7 @@ class ListActiveTasksV1TasksGetRequest(BaseModel):
44
44
 
45
45
  m = {}
46
46
 
47
- for n, f in self.model_fields.items():
47
+ for n, f in type(self).model_fields.items():
48
48
  k = f.alias or n
49
49
  val = serialized.get(k)
50
50
  serialized.pop(k, None)
@@ -1,7 +1,7 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .listassetsrequest import ListAssetsRequest, ListAssetsRequestTypedDict
4
+ from .listbucketsrequest import ListBucketsRequest, ListBucketsRequestTypedDict
5
5
  from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
6
  from mixpeek.utils import (
7
7
  FieldMetadata,
@@ -15,29 +15,24 @@ from typing import Optional
15
15
  from typing_extensions import Annotated, NotRequired, TypedDict
16
16
 
17
17
 
18
- class ListAssetsV1AssetsPostRequestTypedDict(TypedDict):
19
- list_assets_request: ListAssetsRequestTypedDict
20
- page: NotRequired[Nullable[int]]
21
- page_size: NotRequired[int]
18
+ class ListBucketsV1BucketsPostRequestTypedDict(TypedDict):
19
+ limit: NotRequired[Nullable[int]]
20
+ offset: NotRequired[Nullable[int]]
22
21
  x_namespace: NotRequired[Nullable[str]]
23
22
  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."""
23
+ list_buckets_request: NotRequired[ListBucketsRequestTypedDict]
24
24
 
25
25
 
26
- class ListAssetsV1AssetsPostRequest(BaseModel):
27
- list_assets_request: Annotated[
28
- ListAssetsRequest,
29
- FieldMetadata(request=RequestMetadata(media_type="application/json")),
30
- ]
31
-
32
- page: Annotated[
26
+ class ListBucketsV1BucketsPostRequest(BaseModel):
27
+ limit: Annotated[
33
28
  OptionalNullable[int],
34
29
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
35
30
  ] = UNSET
36
31
 
37
- page_size: Annotated[
38
- Optional[int],
32
+ offset: Annotated[
33
+ OptionalNullable[int],
39
34
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
40
- ] = 10
35
+ ] = UNSET
41
36
 
42
37
  x_namespace: Annotated[
43
38
  OptionalNullable[str],
@@ -46,17 +41,22 @@ class ListAssetsV1AssetsPostRequest(BaseModel):
46
41
  ] = UNSET
47
42
  r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
48
43
 
44
+ list_buckets_request: Annotated[
45
+ Optional[ListBucketsRequest],
46
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
47
+ ] = None
48
+
49
49
  @model_serializer(mode="wrap")
50
50
  def serialize_model(self, handler):
51
- optional_fields = ["page", "page_size", "X-Namespace"]
52
- nullable_fields = ["page", "X-Namespace"]
51
+ optional_fields = ["limit", "offset", "X-Namespace", "ListBucketsRequest"]
52
+ nullable_fields = ["limit", "offset", "X-Namespace"]
53
53
  null_default_fields = []
54
54
 
55
55
  serialized = handler(self)
56
56
 
57
57
  m = {}
58
58
 
59
- for n, f in self.model_fields.items():
59
+ for n, f in type(self).model_fields.items():
60
60
  k = f.alias or n
61
61
  val = serialized.get(k)
62
62
  serialized.pop(k, None)
@@ -1,13 +1,12 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from .listfeaturesrequest import ListFeaturesRequest, ListFeaturesRequestTypedDict
5
4
  from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
5
  from mixpeek.utils import (
7
6
  FieldMetadata,
8
7
  HeaderMetadata,
8
+ PathParamMetadata,
9
9
  QueryParamMetadata,
10
- RequestMetadata,
11
10
  )
12
11
  import pydantic
13
12
  from pydantic import model_serializer
@@ -15,31 +14,60 @@ from typing import Optional
15
14
  from typing_extensions import Annotated, NotRequired, TypedDict
16
15
 
17
16
 
18
- class ListFeaturesV1FeaturesPostRequestTypedDict(TypedDict):
19
- list_features_request: ListFeaturesRequestTypedDict
20
- offset_feature_id: NotRequired[Nullable[str]]
21
- r"""The offset id to start returning results from. Used for pagination"""
22
- page_size: NotRequired[int]
17
+ class ListDocumentsV1CollectionsCollectionIdentifierDocumentsGetRequestTypedDict(
18
+ TypedDict
19
+ ):
20
+ collection_identifier: str
21
+ r"""The ID of the collection"""
22
+ limit: NotRequired[int]
23
+ r"""Number of documents to return per page"""
24
+ offset_id: NotRequired[Nullable[str]]
25
+ r"""ID of the document to start pagination from"""
26
+ sort: NotRequired[Nullable[str]]
27
+ r"""Field to sort by"""
28
+ filters: NotRequired[Nullable[str]]
29
+ r"""Filter criteria"""
30
+ select: NotRequired[Nullable[str]]
31
+ r"""Fields to select"""
23
32
  x_namespace: NotRequired[Nullable[str]]
24
33
  r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
25
34
 
26
35
 
27
- class ListFeaturesV1FeaturesPostRequest(BaseModel):
28
- list_features_request: Annotated[
29
- ListFeaturesRequest,
30
- FieldMetadata(request=RequestMetadata(media_type="application/json")),
36
+ class ListDocumentsV1CollectionsCollectionIdentifierDocumentsGetRequest(BaseModel):
37
+ collection_identifier: Annotated[
38
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
31
39
  ]
40
+ r"""The ID of the collection"""
32
41
 
33
- offset_feature_id: Annotated[
42
+ limit: Annotated[
43
+ Optional[int],
44
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
45
+ ] = 10
46
+ r"""Number of documents to return per page"""
47
+
48
+ offset_id: Annotated[
34
49
  OptionalNullable[str],
35
50
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
36
51
  ] = UNSET
37
- r"""The offset id to start returning results from. Used for pagination"""
52
+ r"""ID of the document to start pagination from"""
38
53
 
39
- page_size: Annotated[
40
- Optional[int],
54
+ sort: Annotated[
55
+ OptionalNullable[str],
41
56
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
42
- ] = 10
57
+ ] = UNSET
58
+ r"""Field to sort by"""
59
+
60
+ filters: Annotated[
61
+ OptionalNullable[str],
62
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
63
+ ] = UNSET
64
+ r"""Filter criteria"""
65
+
66
+ select: Annotated[
67
+ OptionalNullable[str],
68
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
69
+ ] = UNSET
70
+ r"""Fields to select"""
43
71
 
44
72
  x_namespace: Annotated[
45
73
  OptionalNullable[str],
@@ -50,15 +78,22 @@ class ListFeaturesV1FeaturesPostRequest(BaseModel):
50
78
 
51
79
  @model_serializer(mode="wrap")
52
80
  def serialize_model(self, handler):
53
- optional_fields = ["offset_feature_id", "page_size", "X-Namespace"]
54
- nullable_fields = ["offset_feature_id", "X-Namespace"]
81
+ optional_fields = [
82
+ "limit",
83
+ "offset_id",
84
+ "sort",
85
+ "filters",
86
+ "select",
87
+ "X-Namespace",
88
+ ]
89
+ nullable_fields = ["offset_id", "sort", "filters", "select", "X-Namespace"]
55
90
  null_default_fields = []
56
91
 
57
92
  serialized = handler(self)
58
93
 
59
94
  m = {}
60
95
 
61
- for n, f in self.model_fields.items():
96
+ for n, f in type(self).model_fields.items():
62
97
  k = f.alias or n
63
98
  val = serialized.get(k)
64
99
  serialized.pop(k, None)
@@ -0,0 +1,96 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
5
+ from mixpeek.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
6
+ import pydantic
7
+ from pydantic import model_serializer
8
+ from typing import Optional
9
+ from typing_extensions import Annotated, NotRequired, TypedDict
10
+
11
+
12
+ class ListInteractionsV1RetrieversInteractionsGetRequestTypedDict(TypedDict):
13
+ feature_id: NotRequired[Nullable[str]]
14
+ interaction_type: NotRequired[Nullable[str]]
15
+ session_id: NotRequired[Nullable[str]]
16
+ page: NotRequired[Nullable[int]]
17
+ page_size: NotRequired[int]
18
+ x_namespace: NotRequired[Nullable[str]]
19
+ r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
20
+
21
+
22
+ class ListInteractionsV1RetrieversInteractionsGetRequest(BaseModel):
23
+ feature_id: Annotated[
24
+ OptionalNullable[str],
25
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
26
+ ] = UNSET
27
+
28
+ interaction_type: Annotated[
29
+ OptionalNullable[str],
30
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
31
+ ] = UNSET
32
+
33
+ session_id: Annotated[
34
+ OptionalNullable[str],
35
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
36
+ ] = UNSET
37
+
38
+ page: Annotated[
39
+ OptionalNullable[int],
40
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
41
+ ] = UNSET
42
+
43
+ page_size: Annotated[
44
+ Optional[int],
45
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
46
+ ] = 10
47
+
48
+ x_namespace: Annotated[
49
+ OptionalNullable[str],
50
+ pydantic.Field(alias="X-Namespace"),
51
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
52
+ ] = UNSET
53
+ r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
54
+
55
+ @model_serializer(mode="wrap")
56
+ def serialize_model(self, handler):
57
+ optional_fields = [
58
+ "feature_id",
59
+ "interaction_type",
60
+ "session_id",
61
+ "page",
62
+ "page_size",
63
+ "X-Namespace",
64
+ ]
65
+ nullable_fields = [
66
+ "feature_id",
67
+ "interaction_type",
68
+ "session_id",
69
+ "page",
70
+ "X-Namespace",
71
+ ]
72
+ null_default_fields = []
73
+
74
+ serialized = handler(self)
75
+
76
+ m = {}
77
+
78
+ for n, f in type(self).model_fields.items():
79
+ k = f.alias or n
80
+ val = serialized.get(k)
81
+ serialized.pop(k, None)
82
+
83
+ optional_nullable = k in optional_fields and k in nullable_fields
84
+ is_set = (
85
+ self.__pydantic_fields_set__.intersection({n})
86
+ or k in null_default_fields
87
+ ) # pylint: disable=no-member
88
+
89
+ if val is not None and val != UNSET_SENTINEL:
90
+ m[k] = val
91
+ elif val != UNSET_SENTINEL and (
92
+ not k in optional_fields or (optional_nullable and is_set)
93
+ ):
94
+ m[k] = val
95
+
96
+ return m