mixpeek 0.21.7__py3-none-any.whl → 0.22.0__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.
- mixpeek/_hooks/types.py +7 -0
- mixpeek/_version.py +3 -3
- mixpeek/basesdk.py +12 -20
- mixpeek/bucketobjects.py +19 -37
- mixpeek/buckets.py +19 -31
- mixpeek/clusters.py +2 -0
- mixpeek/collectioncache.py +6 -0
- mixpeek/collections.py +13 -19
- mixpeek/features.py +4 -0
- mixpeek/health.py +2 -0
- mixpeek/httpclient.py +6 -16
- mixpeek/models/__init__.py +752 -583
- mixpeek/models/blobmodel.py +3 -11
- mixpeek/models/bucketcreaterequest.py +3 -11
- mixpeek/models/bucketresponse.py +3 -11
- mixpeek/models/bucketschemafield_input.py +6 -22
- mixpeek/models/bucketschemafield_output.py +6 -22
- mixpeek/models/bucketschemafieldbase.py +81 -0
- mixpeek/models/bucketschemafieldtype.py +1 -0
- mixpeek/models/bucketupdaterequest.py +3 -10
- mixpeek/models/collectionmodel.py +3 -11
- mixpeek/models/createblobrequest.py +3 -11
- mixpeek/models/createcollectionrequest.py +3 -11
- mixpeek/models/createnamespacerequest.py +9 -9
- mixpeek/models/createobjectrequest.py +3 -11
- mixpeek/models/createretrieverrequest.py +8 -16
- mixpeek/models/errordetail.py +3 -10
- mixpeek/models/featureextractorconfig.py +3 -11
- mixpeek/models/featureextractordefinition.py +26 -46
- mixpeek/models/interactionresponse.py +3 -11
- mixpeek/models/internal/__init__.py +35 -1
- mixpeek/models/logicaloperator_input.py +30 -36
- mixpeek/models/logicaloperator_output.py +39 -45
- mixpeek/models/logicaloperatorbase_input.py +74 -0
- mixpeek/models/logicaloperatorbase_output.py +74 -0
- mixpeek/models/namespaceresponse.py +17 -6
- mixpeek/models/namespacestatus.py +10 -0
- mixpeek/models/objectresponse.py +3 -11
- mixpeek/models/organizationmodel.py +3 -11
- mixpeek/models/retrieverbinding.py +3 -10
- mixpeek/models/retrievermodel.py +11 -16
- mixpeek/models/retrieverqueryrequest.py +3 -11
- mixpeek/models/retrieverschema_input.py +37 -0
- mixpeek/models/retrieverschema_output.py +37 -0
- mixpeek/models/retrieverschemafield_input.py +91 -0
- mixpeek/models/retrieverschemafield_output.py +91 -0
- mixpeek/models/searchinteraction.py +3 -11
- mixpeek/models/stageconfig_input.py +8 -16
- mixpeek/models/stageconfig_output.py +8 -16
- mixpeek/models/stagedefinition.py +28 -17
- mixpeek/models/stageresponse.py +3 -11
- mixpeek/models/updateobjectrequest.py +3 -11
- mixpeek/models/usermodel_input.py +3 -11
- mixpeek/models/usermodel_output.py +3 -11
- mixpeek/namespaces.py +28 -22
- mixpeek/organizationnotifications.py +2 -0
- mixpeek/organizations.py +13 -13
- mixpeek/organizationsusage.py +2 -0
- mixpeek/research.py +2 -0
- mixpeek/retrieverinteractions.py +13 -19
- mixpeek/retrievers.py +21 -39
- mixpeek/retrieverstages.py +2 -0
- mixpeek/sdk.py +94 -65
- mixpeek/sdkconfiguration.py +0 -7
- mixpeek/tasks.py +6 -0
- mixpeek/taxonomies.py +2 -0
- mixpeek/users.py +6 -0
- mixpeek/utils/__init__.py +131 -45
- mixpeek/utils/datetimes.py +23 -0
- mixpeek/utils/serializers.py +32 -3
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/METADATA +3 -15
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/RECORD +73 -75
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/WHEEL +1 -1
- mixpeek/collectiondocuments.py +0 -1564
- mixpeek/models/batch_delete_documents_v1_collections_collection_identifier_documents_batch_deleteop.py +0 -75
- mixpeek/models/batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py +0 -84
- mixpeek/models/delete_document_v1_collections_collection_identifier_documents_document_id_deleteop.py +0 -70
- mixpeek/models/documentlistresponse.py +0 -56
- mixpeek/models/documentresponse.py +0 -87
- mixpeek/models/documentupdate.py +0 -60
- mixpeek/models/genericsuccessresponse.py +0 -17
- mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py +0 -70
- mixpeek/models/list_documents_v1_collections_collection_identifier_documents_getop.py +0 -114
- mixpeek/models/update_document_v1_collections_collection_identifier_documents_document_id_putop.py +0 -83
mixpeek/models/errordetail.py
CHANGED
@@ -3,21 +3,14 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
5
|
from pydantic import model_serializer
|
6
|
+
from typing import Any, Dict
|
6
7
|
from typing_extensions import NotRequired, TypedDict
|
7
8
|
|
8
9
|
|
9
|
-
class DetailsTypedDict(TypedDict):
|
10
|
-
pass
|
11
|
-
|
12
|
-
|
13
|
-
class Details(BaseModel):
|
14
|
-
pass
|
15
|
-
|
16
|
-
|
17
10
|
class ErrorDetailTypedDict(TypedDict):
|
18
11
|
message: str
|
19
12
|
type: str
|
20
|
-
details: NotRequired[Nullable[
|
13
|
+
details: NotRequired[Nullable[Dict[str, Any]]]
|
21
14
|
|
22
15
|
|
23
16
|
class ErrorDetail(BaseModel):
|
@@ -25,7 +18,7 @@ class ErrorDetail(BaseModel):
|
|
25
18
|
|
26
19
|
type: str
|
27
20
|
|
28
|
-
details: OptionalNullable[
|
21
|
+
details: OptionalNullable[Dict[str, Any]] = UNSET
|
29
22
|
|
30
23
|
@model_serializer(mode="wrap")
|
31
24
|
def serialize_model(self, handler):
|
@@ -6,18 +6,10 @@ from .documentoutputhandling import DocumentOutputHandling
|
|
6
6
|
from .documentoutputtype import DocumentOutputType
|
7
7
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
8
8
|
from pydantic import model_serializer
|
9
|
-
from typing import Dict, Optional
|
9
|
+
from typing import Any, Dict, Optional
|
10
10
|
from typing_extensions import NotRequired, TypedDict
|
11
11
|
|
12
12
|
|
13
|
-
class ParametersTypedDict(TypedDict):
|
14
|
-
r"""Custom parameters for the extractor"""
|
15
|
-
|
16
|
-
|
17
|
-
class Parameters(BaseModel):
|
18
|
-
r"""Custom parameters for the extractor"""
|
19
|
-
|
20
|
-
|
21
13
|
class FeatureExtractorConfigTypedDict(TypedDict):
|
22
14
|
r"""Configuration for a feature extractor that is selected for use within a collection.
|
23
15
|
This model represents a selected feature extractor along with its specific configuration
|
@@ -29,7 +21,7 @@ class FeatureExtractorConfigTypedDict(TypedDict):
|
|
29
21
|
r"""Name of the feature extractor"""
|
30
22
|
version: str
|
31
23
|
r"""Version of the feature extractor"""
|
32
|
-
parameters: NotRequired[
|
24
|
+
parameters: NotRequired[Dict[str, Any]]
|
33
25
|
r"""Custom parameters for the extractor"""
|
34
26
|
input_mapping: NotRequired[Dict[str, str]]
|
35
27
|
r"""Maps pipeline inputs to extractor inputs (source -> target)"""
|
@@ -56,7 +48,7 @@ class FeatureExtractorConfig(BaseModel):
|
|
56
48
|
version: str
|
57
49
|
r"""Version of the feature extractor"""
|
58
50
|
|
59
|
-
parameters: Optional[
|
51
|
+
parameters: Optional[Dict[str, Any]] = None
|
60
52
|
r"""Custom parameters for the extractor"""
|
61
53
|
|
62
54
|
input_mapping: Optional[Dict[str, str]] = None
|
@@ -12,38 +12,6 @@ from typing import Any, Dict, List, Optional
|
|
12
12
|
from typing_extensions import NotRequired, TypedDict
|
13
13
|
|
14
14
|
|
15
|
-
class InputSchemaTypedDict(TypedDict):
|
16
|
-
r"""Schema for input data"""
|
17
|
-
|
18
|
-
|
19
|
-
class InputSchema(BaseModel):
|
20
|
-
r"""Schema for input data"""
|
21
|
-
|
22
|
-
|
23
|
-
class OutputSchemaTypedDict(TypedDict):
|
24
|
-
r"""Schema for output data"""
|
25
|
-
|
26
|
-
|
27
|
-
class OutputSchema(BaseModel):
|
28
|
-
r"""Schema for output data"""
|
29
|
-
|
30
|
-
|
31
|
-
class ParameterSchemaTypedDict(TypedDict):
|
32
|
-
r"""Schema for parameters"""
|
33
|
-
|
34
|
-
|
35
|
-
class ParameterSchema(BaseModel):
|
36
|
-
r"""Schema for parameters"""
|
37
|
-
|
38
|
-
|
39
|
-
class DefaultParametersTypedDict(TypedDict):
|
40
|
-
r"""Default parameters"""
|
41
|
-
|
42
|
-
|
43
|
-
class DefaultParameters(BaseModel):
|
44
|
-
r"""Default parameters"""
|
45
|
-
|
46
|
-
|
47
15
|
class FeatureExtractorDefinitionTypedDict(TypedDict):
|
48
16
|
r"""Definition of a feature extractor."""
|
49
17
|
|
@@ -53,21 +21,21 @@ class FeatureExtractorDefinitionTypedDict(TypedDict):
|
|
53
21
|
r"""Description of the feature extractor"""
|
54
22
|
version: str
|
55
23
|
r"""Version of the feature extractor"""
|
56
|
-
module_path: str
|
57
|
-
r"""Python module path for the feature extractor"""
|
58
24
|
feature_id: NotRequired[str]
|
59
25
|
r"""Unique identifier for the feature extractor"""
|
60
|
-
|
26
|
+
module_path: NotRequired[Nullable[str]]
|
27
|
+
r"""Python module path for the feature extractor"""
|
28
|
+
input_schema: NotRequired[Dict[str, Any]]
|
61
29
|
r"""Schema for input data"""
|
62
|
-
output_schema: NotRequired[
|
30
|
+
output_schema: NotRequired[Dict[str, Any]]
|
63
31
|
r"""Schema for output data"""
|
64
|
-
parameter_schema: NotRequired[
|
32
|
+
parameter_schema: NotRequired[Dict[str, Any]]
|
65
33
|
r"""Schema for parameters"""
|
66
34
|
supported_input_types: NotRequired[List[str]]
|
67
35
|
r"""Supported input types"""
|
68
36
|
max_inputs: NotRequired[Dict[str, int]]
|
69
37
|
r"""Maximum number of inputs of each type"""
|
70
|
-
default_parameters: NotRequired[
|
38
|
+
default_parameters: NotRequired[Dict[str, Any]]
|
71
39
|
r"""Default parameters"""
|
72
40
|
document_output_type: NotRequired[DocumentOutputType]
|
73
41
|
r"""Enum for document output types"""
|
@@ -79,6 +47,8 @@ class FeatureExtractorDefinitionTypedDict(TypedDict):
|
|
79
47
|
r"""Vector indexes required by the extractor"""
|
80
48
|
required_payload_indexes: NotRequired[Nullable[List[Any]]]
|
81
49
|
r"""Payload indexes required by the extractor"""
|
50
|
+
supported_retriever_stages: NotRequired[Nullable[List[str]]]
|
51
|
+
r"""Retriever stages supported by the extractor"""
|
82
52
|
|
83
53
|
|
84
54
|
class FeatureExtractorDefinition(BaseModel):
|
@@ -98,19 +68,19 @@ class FeatureExtractorDefinition(BaseModel):
|
|
98
68
|
version: str
|
99
69
|
r"""Version of the feature extractor"""
|
100
70
|
|
101
|
-
module_path: str
|
102
|
-
r"""Python module path for the feature extractor"""
|
103
|
-
|
104
71
|
feature_id: Optional[str] = ""
|
105
72
|
r"""Unique identifier for the feature extractor"""
|
106
73
|
|
107
|
-
|
74
|
+
module_path: OptionalNullable[str] = UNSET
|
75
|
+
r"""Python module path for the feature extractor"""
|
76
|
+
|
77
|
+
input_schema: Optional[Dict[str, Any]] = None
|
108
78
|
r"""Schema for input data"""
|
109
79
|
|
110
|
-
output_schema: Optional[
|
80
|
+
output_schema: Optional[Dict[str, Any]] = None
|
111
81
|
r"""Schema for output data"""
|
112
82
|
|
113
|
-
parameter_schema: Optional[
|
83
|
+
parameter_schema: Optional[Dict[str, Any]] = None
|
114
84
|
r"""Schema for parameters"""
|
115
85
|
|
116
86
|
supported_input_types: Optional[List[str]] = None
|
@@ -119,7 +89,7 @@ class FeatureExtractorDefinition(BaseModel):
|
|
119
89
|
max_inputs: Optional[Dict[str, int]] = None
|
120
90
|
r"""Maximum number of inputs of each type"""
|
121
91
|
|
122
|
-
default_parameters: Optional[
|
92
|
+
default_parameters: Optional[Dict[str, Any]] = None
|
123
93
|
r"""Default parameters"""
|
124
94
|
|
125
95
|
document_output_type: Optional[DocumentOutputType] = None
|
@@ -137,6 +107,9 @@ class FeatureExtractorDefinition(BaseModel):
|
|
137
107
|
required_payload_indexes: OptionalNullable[List[Any]] = UNSET
|
138
108
|
r"""Payload indexes required by the extractor"""
|
139
109
|
|
110
|
+
supported_retriever_stages: OptionalNullable[List[str]] = UNSET
|
111
|
+
r"""Retriever stages supported by the extractor"""
|
112
|
+
|
140
113
|
@property
|
141
114
|
def additional_properties(self):
|
142
115
|
return self.__pydantic_extra__
|
@@ -149,6 +122,7 @@ class FeatureExtractorDefinition(BaseModel):
|
|
149
122
|
def serialize_model(self, handler):
|
150
123
|
optional_fields = [
|
151
124
|
"feature_id",
|
125
|
+
"module_path",
|
152
126
|
"input_schema",
|
153
127
|
"output_schema",
|
154
128
|
"parameter_schema",
|
@@ -160,8 +134,14 @@ class FeatureExtractorDefinition(BaseModel):
|
|
160
134
|
"document_output_handling",
|
161
135
|
"required_vector_indexes",
|
162
136
|
"required_payload_indexes",
|
137
|
+
"supported_retriever_stages",
|
138
|
+
]
|
139
|
+
nullable_fields = [
|
140
|
+
"module_path",
|
141
|
+
"required_vector_indexes",
|
142
|
+
"required_payload_indexes",
|
143
|
+
"supported_retriever_stages",
|
163
144
|
]
|
164
|
-
nullable_fields = ["required_vector_indexes", "required_payload_indexes"]
|
165
145
|
null_default_fields = []
|
166
146
|
|
167
147
|
serialized = handler(self)
|
@@ -4,18 +4,10 @@ from __future__ import annotations
|
|
4
4
|
from .interactiontype import InteractionType
|
5
5
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
6
|
from pydantic import model_serializer
|
7
|
-
from typing import List
|
7
|
+
from typing import Any, Dict, List
|
8
8
|
from typing_extensions import NotRequired, TypedDict
|
9
9
|
|
10
10
|
|
11
|
-
class InteractionResponseMetadataTypedDict(TypedDict):
|
12
|
-
pass
|
13
|
-
|
14
|
-
|
15
|
-
class InteractionResponseMetadata(BaseModel):
|
16
|
-
pass
|
17
|
-
|
18
|
-
|
19
11
|
class InteractionResponseTypedDict(TypedDict):
|
20
12
|
feature_id: str
|
21
13
|
r"""ID of the item that was interacted with"""
|
@@ -25,7 +17,7 @@ class InteractionResponseTypedDict(TypedDict):
|
|
25
17
|
r"""Unique identifier for this interaction"""
|
26
18
|
position: NotRequired[Nullable[int]]
|
27
19
|
r"""Position in search results where interaction occurred"""
|
28
|
-
metadata: NotRequired[Nullable[
|
20
|
+
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
29
21
|
r"""Additional context about the interaction"""
|
30
22
|
user_id: NotRequired[Nullable[str]]
|
31
23
|
r"""Customer's authenticated user identifier - persists across sessions"""
|
@@ -46,7 +38,7 @@ class InteractionResponse(BaseModel):
|
|
46
38
|
position: OptionalNullable[int] = UNSET
|
47
39
|
r"""Position in search results where interaction occurred"""
|
48
40
|
|
49
|
-
metadata: OptionalNullable[
|
41
|
+
metadata: OptionalNullable[Dict[str, Any]] = UNSET
|
50
42
|
r"""Additional context about the interaction"""
|
51
43
|
|
52
44
|
user_id: OptionalNullable[str] = UNSET
|
@@ -1,6 +1,40 @@
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
2
|
|
3
|
-
from
|
3
|
+
from typing import TYPE_CHECKING
|
4
|
+
from importlib import import_module
|
4
5
|
|
6
|
+
if TYPE_CHECKING:
|
7
|
+
from .globals import Globals, GlobalsTypedDict
|
5
8
|
|
6
9
|
__all__ = ["Globals", "GlobalsTypedDict"]
|
10
|
+
|
11
|
+
_dynamic_imports: dict[str, str] = {
|
12
|
+
"Globals": ".globals",
|
13
|
+
"GlobalsTypedDict": ".globals",
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
def __getattr__(attr_name: str) -> object:
|
18
|
+
module_name = _dynamic_imports.get(attr_name)
|
19
|
+
if module_name is None:
|
20
|
+
raise AttributeError(
|
21
|
+
f"No {attr_name} found in _dynamic_imports for module name -> {__name__} "
|
22
|
+
)
|
23
|
+
|
24
|
+
try:
|
25
|
+
module = import_module(module_name, __package__)
|
26
|
+
result = getattr(module, attr_name)
|
27
|
+
return result
|
28
|
+
except ImportError as e:
|
29
|
+
raise ImportError(
|
30
|
+
f"Failed to import {attr_name} from {module_name}: {e}"
|
31
|
+
) from e
|
32
|
+
except AttributeError as e:
|
33
|
+
raise AttributeError(
|
34
|
+
f"Failed to get {attr_name} from {module_name}: {e}"
|
35
|
+
) from e
|
36
|
+
|
37
|
+
|
38
|
+
def __dir__():
|
39
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
40
|
+
return sorted(lazy_attrs)
|
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from .filtercondition import FilterCondition, FilterConditionTypedDict
|
5
|
+
from .logicaloperatorbase_input import (
|
6
|
+
LogicalOperatorBaseInput,
|
7
|
+
LogicalOperatorBaseInputTypedDict,
|
8
|
+
)
|
5
9
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
10
|
import pydantic
|
7
11
|
from pydantic import model_serializer
|
@@ -9,14 +13,33 @@ from typing import List, Union
|
|
9
13
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
10
14
|
|
11
15
|
|
16
|
+
AndTypedDict = TypeAliasType(
|
17
|
+
"AndTypedDict", Union[FilterConditionTypedDict, LogicalOperatorBaseInputTypedDict]
|
18
|
+
)
|
19
|
+
|
20
|
+
|
21
|
+
And = TypeAliasType("And", Union[FilterCondition, LogicalOperatorBaseInput])
|
22
|
+
|
23
|
+
|
24
|
+
OrTypedDict = TypeAliasType(
|
25
|
+
"OrTypedDict", Union[FilterConditionTypedDict, LogicalOperatorBaseInputTypedDict]
|
26
|
+
)
|
27
|
+
|
28
|
+
|
29
|
+
Or = TypeAliasType("Or", Union[FilterCondition, LogicalOperatorBaseInput])
|
30
|
+
|
31
|
+
|
32
|
+
NotTypedDict = TypeAliasType(
|
33
|
+
"NotTypedDict", Union[FilterConditionTypedDict, LogicalOperatorBaseInputTypedDict]
|
34
|
+
)
|
35
|
+
|
36
|
+
|
37
|
+
Not = TypeAliasType("Not", Union[FilterCondition, LogicalOperatorBaseInput])
|
38
|
+
|
39
|
+
|
12
40
|
class LogicalOperatorInputTypedDict(TypedDict):
|
13
41
|
r"""Represents a logical operation (AND, OR, NOT) on filter conditions.
|
14
|
-
|
15
|
-
Attributes:
|
16
|
-
AND: List of conditions that must all be true
|
17
|
-
OR: List of conditions where at least one must be true
|
18
|
-
NOT: List of conditions that must all be false
|
19
|
-
case_sensitive: Whether string comparisons are case sensitive
|
42
|
+
Allows one level of nesting to prevent infinite recursion.
|
20
43
|
"""
|
21
44
|
|
22
45
|
and_: NotRequired[Nullable[List[AndTypedDict]]]
|
@@ -31,12 +54,7 @@ class LogicalOperatorInputTypedDict(TypedDict):
|
|
31
54
|
|
32
55
|
class LogicalOperatorInput(BaseModel):
|
33
56
|
r"""Represents a logical operation (AND, OR, NOT) on filter conditions.
|
34
|
-
|
35
|
-
Attributes:
|
36
|
-
AND: List of conditions that must all be true
|
37
|
-
OR: List of conditions where at least one must be true
|
38
|
-
NOT: List of conditions that must all be false
|
39
|
-
case_sensitive: Whether string comparisons are case sensitive
|
57
|
+
Allows one level of nesting to prevent infinite recursion.
|
40
58
|
"""
|
41
59
|
|
42
60
|
and_: Annotated[OptionalNullable[List[And]], pydantic.Field(alias="AND")] = UNSET
|
@@ -80,27 +98,3 @@ class LogicalOperatorInput(BaseModel):
|
|
80
98
|
m[k] = val
|
81
99
|
|
82
100
|
return m
|
83
|
-
|
84
|
-
|
85
|
-
AndTypedDict = TypeAliasType(
|
86
|
-
"AndTypedDict", Union[FilterConditionTypedDict, "LogicalOperatorInputTypedDict"]
|
87
|
-
)
|
88
|
-
|
89
|
-
|
90
|
-
And = TypeAliasType("And", Union[FilterCondition, "LogicalOperatorInput"])
|
91
|
-
|
92
|
-
|
93
|
-
OrTypedDict = TypeAliasType(
|
94
|
-
"OrTypedDict", Union[FilterConditionTypedDict, "LogicalOperatorInputTypedDict"]
|
95
|
-
)
|
96
|
-
|
97
|
-
|
98
|
-
Or = TypeAliasType("Or", Union[FilterCondition, "LogicalOperatorInput"])
|
99
|
-
|
100
|
-
|
101
|
-
NotTypedDict = TypeAliasType(
|
102
|
-
"NotTypedDict", Union[FilterConditionTypedDict, "LogicalOperatorInputTypedDict"]
|
103
|
-
)
|
104
|
-
|
105
|
-
|
106
|
-
Not = TypeAliasType("Not", Union[FilterCondition, "LogicalOperatorInput"])
|
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from .filtercondition import FilterCondition, FilterConditionTypedDict
|
5
|
+
from .logicaloperatorbase_output import (
|
6
|
+
LogicalOperatorBaseOutput,
|
7
|
+
LogicalOperatorBaseOutputTypedDict,
|
8
|
+
)
|
5
9
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
10
|
import pydantic
|
7
11
|
from pydantic import model_serializer
|
@@ -9,14 +13,42 @@ from typing import List, Union
|
|
9
13
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
10
14
|
|
11
15
|
|
16
|
+
LogicalOperatorOutputANDTypedDict = TypeAliasType(
|
17
|
+
"LogicalOperatorOutputANDTypedDict",
|
18
|
+
Union[FilterConditionTypedDict, LogicalOperatorBaseOutputTypedDict],
|
19
|
+
)
|
20
|
+
|
21
|
+
|
22
|
+
LogicalOperatorOutputAND = TypeAliasType(
|
23
|
+
"LogicalOperatorOutputAND", Union[FilterCondition, LogicalOperatorBaseOutput]
|
24
|
+
)
|
25
|
+
|
26
|
+
|
27
|
+
LogicalOperatorOutputORTypedDict = TypeAliasType(
|
28
|
+
"LogicalOperatorOutputORTypedDict",
|
29
|
+
Union[FilterConditionTypedDict, LogicalOperatorBaseOutputTypedDict],
|
30
|
+
)
|
31
|
+
|
32
|
+
|
33
|
+
LogicalOperatorOutputOR = TypeAliasType(
|
34
|
+
"LogicalOperatorOutputOR", Union[FilterCondition, LogicalOperatorBaseOutput]
|
35
|
+
)
|
36
|
+
|
37
|
+
|
38
|
+
LogicalOperatorOutputNOTTypedDict = TypeAliasType(
|
39
|
+
"LogicalOperatorOutputNOTTypedDict",
|
40
|
+
Union[FilterConditionTypedDict, LogicalOperatorBaseOutputTypedDict],
|
41
|
+
)
|
42
|
+
|
43
|
+
|
44
|
+
LogicalOperatorOutputNOT = TypeAliasType(
|
45
|
+
"LogicalOperatorOutputNOT", Union[FilterCondition, LogicalOperatorBaseOutput]
|
46
|
+
)
|
47
|
+
|
48
|
+
|
12
49
|
class LogicalOperatorOutputTypedDict(TypedDict):
|
13
50
|
r"""Represents a logical operation (AND, OR, NOT) on filter conditions.
|
14
|
-
|
15
|
-
Attributes:
|
16
|
-
AND: List of conditions that must all be true
|
17
|
-
OR: List of conditions where at least one must be true
|
18
|
-
NOT: List of conditions that must all be false
|
19
|
-
case_sensitive: Whether string comparisons are case sensitive
|
51
|
+
Allows one level of nesting to prevent infinite recursion.
|
20
52
|
"""
|
21
53
|
|
22
54
|
and_: NotRequired[Nullable[List[LogicalOperatorOutputANDTypedDict]]]
|
@@ -31,12 +63,7 @@ class LogicalOperatorOutputTypedDict(TypedDict):
|
|
31
63
|
|
32
64
|
class LogicalOperatorOutput(BaseModel):
|
33
65
|
r"""Represents a logical operation (AND, OR, NOT) on filter conditions.
|
34
|
-
|
35
|
-
Attributes:
|
36
|
-
AND: List of conditions that must all be true
|
37
|
-
OR: List of conditions where at least one must be true
|
38
|
-
NOT: List of conditions that must all be false
|
39
|
-
case_sensitive: Whether string comparisons are case sensitive
|
66
|
+
Allows one level of nesting to prevent infinite recursion.
|
40
67
|
"""
|
41
68
|
|
42
69
|
and_: Annotated[
|
@@ -86,36 +113,3 @@ class LogicalOperatorOutput(BaseModel):
|
|
86
113
|
m[k] = val
|
87
114
|
|
88
115
|
return m
|
89
|
-
|
90
|
-
|
91
|
-
LogicalOperatorOutputANDTypedDict = TypeAliasType(
|
92
|
-
"LogicalOperatorOutputANDTypedDict",
|
93
|
-
Union[FilterConditionTypedDict, "LogicalOperatorOutputTypedDict"],
|
94
|
-
)
|
95
|
-
|
96
|
-
|
97
|
-
LogicalOperatorOutputAND = TypeAliasType(
|
98
|
-
"LogicalOperatorOutputAND", Union[FilterCondition, "LogicalOperatorOutput"]
|
99
|
-
)
|
100
|
-
|
101
|
-
|
102
|
-
LogicalOperatorOutputORTypedDict = TypeAliasType(
|
103
|
-
"LogicalOperatorOutputORTypedDict",
|
104
|
-
Union[FilterConditionTypedDict, "LogicalOperatorOutputTypedDict"],
|
105
|
-
)
|
106
|
-
|
107
|
-
|
108
|
-
LogicalOperatorOutputOR = TypeAliasType(
|
109
|
-
"LogicalOperatorOutputOR", Union[FilterCondition, "LogicalOperatorOutput"]
|
110
|
-
)
|
111
|
-
|
112
|
-
|
113
|
-
LogicalOperatorOutputNOTTypedDict = TypeAliasType(
|
114
|
-
"LogicalOperatorOutputNOTTypedDict",
|
115
|
-
Union[FilterConditionTypedDict, "LogicalOperatorOutputTypedDict"],
|
116
|
-
)
|
117
|
-
|
118
|
-
|
119
|
-
LogicalOperatorOutputNOT = TypeAliasType(
|
120
|
-
"LogicalOperatorOutputNOT", Union[FilterCondition, "LogicalOperatorOutput"]
|
121
|
-
)
|
@@ -0,0 +1,74 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .filtercondition import FilterCondition, FilterConditionTypedDict
|
5
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
|
+
import pydantic
|
7
|
+
from pydantic import model_serializer
|
8
|
+
from typing import List
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class LogicalOperatorBaseInputTypedDict(TypedDict):
|
13
|
+
r"""Base logical operation without nesting, used to prevent infinite recursion."""
|
14
|
+
|
15
|
+
and_: NotRequired[Nullable[List[FilterConditionTypedDict]]]
|
16
|
+
r"""Logical AND operation - all conditions must be true"""
|
17
|
+
or_: NotRequired[Nullable[List[FilterConditionTypedDict]]]
|
18
|
+
r"""Logical OR operation - at least one condition must be true"""
|
19
|
+
not_: NotRequired[Nullable[List[FilterConditionTypedDict]]]
|
20
|
+
r"""Logical NOT operation - all conditions must be false"""
|
21
|
+
case_sensitive: NotRequired[Nullable[bool]]
|
22
|
+
r"""Whether to perform case-sensitive matching"""
|
23
|
+
|
24
|
+
|
25
|
+
class LogicalOperatorBaseInput(BaseModel):
|
26
|
+
r"""Base logical operation without nesting, used to prevent infinite recursion."""
|
27
|
+
|
28
|
+
and_: Annotated[
|
29
|
+
OptionalNullable[List[FilterCondition]], pydantic.Field(alias="AND")
|
30
|
+
] = UNSET
|
31
|
+
r"""Logical AND operation - all conditions must be true"""
|
32
|
+
|
33
|
+
or_: Annotated[
|
34
|
+
OptionalNullable[List[FilterCondition]], pydantic.Field(alias="OR")
|
35
|
+
] = UNSET
|
36
|
+
r"""Logical OR operation - at least one condition must be true"""
|
37
|
+
|
38
|
+
not_: Annotated[
|
39
|
+
OptionalNullable[List[FilterCondition]], pydantic.Field(alias="NOT")
|
40
|
+
] = UNSET
|
41
|
+
r"""Logical NOT operation - all conditions must be false"""
|
42
|
+
|
43
|
+
case_sensitive: OptionalNullable[bool] = UNSET
|
44
|
+
r"""Whether to perform case-sensitive matching"""
|
45
|
+
|
46
|
+
@model_serializer(mode="wrap")
|
47
|
+
def serialize_model(self, handler):
|
48
|
+
optional_fields = ["AND", "OR", "NOT", "case_sensitive"]
|
49
|
+
nullable_fields = ["AND", "OR", "NOT", "case_sensitive"]
|
50
|
+
null_default_fields = []
|
51
|
+
|
52
|
+
serialized = handler(self)
|
53
|
+
|
54
|
+
m = {}
|
55
|
+
|
56
|
+
for n, f in type(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,74 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .filtercondition import FilterCondition, FilterConditionTypedDict
|
5
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
|
+
import pydantic
|
7
|
+
from pydantic import model_serializer
|
8
|
+
from typing import List
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class LogicalOperatorBaseOutputTypedDict(TypedDict):
|
13
|
+
r"""Base logical operation without nesting, used to prevent infinite recursion."""
|
14
|
+
|
15
|
+
and_: NotRequired[Nullable[List[FilterConditionTypedDict]]]
|
16
|
+
r"""Logical AND operation - all conditions must be true"""
|
17
|
+
or_: NotRequired[Nullable[List[FilterConditionTypedDict]]]
|
18
|
+
r"""Logical OR operation - at least one condition must be true"""
|
19
|
+
not_: NotRequired[Nullable[List[FilterConditionTypedDict]]]
|
20
|
+
r"""Logical NOT operation - all conditions must be false"""
|
21
|
+
case_sensitive: NotRequired[Nullable[bool]]
|
22
|
+
r"""Whether to perform case-sensitive matching"""
|
23
|
+
|
24
|
+
|
25
|
+
class LogicalOperatorBaseOutput(BaseModel):
|
26
|
+
r"""Base logical operation without nesting, used to prevent infinite recursion."""
|
27
|
+
|
28
|
+
and_: Annotated[
|
29
|
+
OptionalNullable[List[FilterCondition]], pydantic.Field(alias="AND")
|
30
|
+
] = UNSET
|
31
|
+
r"""Logical AND operation - all conditions must be true"""
|
32
|
+
|
33
|
+
or_: Annotated[
|
34
|
+
OptionalNullable[List[FilterCondition]], pydantic.Field(alias="OR")
|
35
|
+
] = UNSET
|
36
|
+
r"""Logical OR operation - at least one condition must be true"""
|
37
|
+
|
38
|
+
not_: Annotated[
|
39
|
+
OptionalNullable[List[FilterCondition]], pydantic.Field(alias="NOT")
|
40
|
+
] = UNSET
|
41
|
+
r"""Logical NOT operation - all conditions must be false"""
|
42
|
+
|
43
|
+
case_sensitive: OptionalNullable[bool] = UNSET
|
44
|
+
r"""Whether to perform case-sensitive matching"""
|
45
|
+
|
46
|
+
@model_serializer(mode="wrap")
|
47
|
+
def serialize_model(self, handler):
|
48
|
+
optional_fields = ["AND", "OR", "NOT", "case_sensitive"]
|
49
|
+
nullable_fields = ["AND", "OR", "NOT", "case_sensitive"]
|
50
|
+
null_default_fields = []
|
51
|
+
|
52
|
+
serialized = handler(self)
|
53
|
+
|
54
|
+
m = {}
|
55
|
+
|
56
|
+
for n, f in type(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
|