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
@@ -1,75 +0,0 @@
|
|
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 (
|
6
|
-
FieldMetadata,
|
7
|
-
HeaderMetadata,
|
8
|
-
PathParamMetadata,
|
9
|
-
RequestMetadata,
|
10
|
-
)
|
11
|
-
import pydantic
|
12
|
-
from pydantic import model_serializer
|
13
|
-
from typing import List, Optional
|
14
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
15
|
-
|
16
|
-
|
17
|
-
class BatchDeleteDocumentsV1CollectionsCollectionIdentifierDocumentsBatchDeleteRequestTypedDict(
|
18
|
-
TypedDict
|
19
|
-
):
|
20
|
-
collection_identifier: str
|
21
|
-
r"""The ID of the collection"""
|
22
|
-
x_namespace: NotRequired[Nullable[str]]
|
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
|
-
request_body: NotRequired[List[str]]
|
25
|
-
|
26
|
-
|
27
|
-
class BatchDeleteDocumentsV1CollectionsCollectionIdentifierDocumentsBatchDeleteRequest(
|
28
|
-
BaseModel
|
29
|
-
):
|
30
|
-
collection_identifier: Annotated[
|
31
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
32
|
-
]
|
33
|
-
r"""The ID of the collection"""
|
34
|
-
|
35
|
-
x_namespace: Annotated[
|
36
|
-
OptionalNullable[str],
|
37
|
-
pydantic.Field(alias="X-Namespace"),
|
38
|
-
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
39
|
-
] = UNSET
|
40
|
-
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."""
|
41
|
-
|
42
|
-
request_body: Annotated[
|
43
|
-
Optional[List[str]],
|
44
|
-
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
45
|
-
] = None
|
46
|
-
|
47
|
-
@model_serializer(mode="wrap")
|
48
|
-
def serialize_model(self, handler):
|
49
|
-
optional_fields = ["X-Namespace", "RequestBody"]
|
50
|
-
nullable_fields = ["X-Namespace"]
|
51
|
-
null_default_fields = []
|
52
|
-
|
53
|
-
serialized = handler(self)
|
54
|
-
|
55
|
-
m = {}
|
56
|
-
|
57
|
-
for n, f in type(self).model_fields.items():
|
58
|
-
k = f.alias or n
|
59
|
-
val = serialized.get(k)
|
60
|
-
serialized.pop(k, None)
|
61
|
-
|
62
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
63
|
-
is_set = (
|
64
|
-
self.__pydantic_fields_set__.intersection({n})
|
65
|
-
or k in null_default_fields
|
66
|
-
) # pylint: disable=no-member
|
67
|
-
|
68
|
-
if val is not None and val != UNSET_SENTINEL:
|
69
|
-
m[k] = val
|
70
|
-
elif val != UNSET_SENTINEL and (
|
71
|
-
not k in optional_fields or (optional_nullable and is_set)
|
72
|
-
):
|
73
|
-
m[k] = val
|
74
|
-
|
75
|
-
return m
|
mixpeek/models/batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
from .documentupdate import DocumentUpdate, DocumentUpdateTypedDict
|
5
|
-
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
|
-
from mixpeek.utils import (
|
7
|
-
FieldMetadata,
|
8
|
-
HeaderMetadata,
|
9
|
-
PathParamMetadata,
|
10
|
-
RequestMetadata,
|
11
|
-
)
|
12
|
-
import pydantic
|
13
|
-
from pydantic import model_serializer
|
14
|
-
from typing import List, Optional, Union
|
15
|
-
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
16
|
-
|
17
|
-
|
18
|
-
RequestBodyTypedDict = TypeAliasType(
|
19
|
-
"RequestBodyTypedDict", Union[DocumentUpdateTypedDict, str]
|
20
|
-
)
|
21
|
-
|
22
|
-
|
23
|
-
RequestBody = TypeAliasType("RequestBody", Union[DocumentUpdate, str])
|
24
|
-
|
25
|
-
|
26
|
-
class BatchUpdateDocumentsV1CollectionsCollectionIdentifierDocumentsBatchPutRequestTypedDict(
|
27
|
-
TypedDict
|
28
|
-
):
|
29
|
-
collection_identifier: str
|
30
|
-
r"""The ID of the collection"""
|
31
|
-
x_namespace: NotRequired[Nullable[str]]
|
32
|
-
r"""Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint."""
|
33
|
-
request_body: NotRequired[List[List[RequestBodyTypedDict]]]
|
34
|
-
|
35
|
-
|
36
|
-
class BatchUpdateDocumentsV1CollectionsCollectionIdentifierDocumentsBatchPutRequest(
|
37
|
-
BaseModel
|
38
|
-
):
|
39
|
-
collection_identifier: Annotated[
|
40
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
41
|
-
]
|
42
|
-
r"""The ID of the collection"""
|
43
|
-
|
44
|
-
x_namespace: Annotated[
|
45
|
-
OptionalNullable[str],
|
46
|
-
pydantic.Field(alias="X-Namespace"),
|
47
|
-
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
48
|
-
] = UNSET
|
49
|
-
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."""
|
50
|
-
|
51
|
-
request_body: Annotated[
|
52
|
-
Optional[List[List[RequestBody]]],
|
53
|
-
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
54
|
-
] = None
|
55
|
-
|
56
|
-
@model_serializer(mode="wrap")
|
57
|
-
def serialize_model(self, handler):
|
58
|
-
optional_fields = ["X-Namespace", "RequestBody"]
|
59
|
-
nullable_fields = ["X-Namespace"]
|
60
|
-
null_default_fields = []
|
61
|
-
|
62
|
-
serialized = handler(self)
|
63
|
-
|
64
|
-
m = {}
|
65
|
-
|
66
|
-
for n, f in type(self).model_fields.items():
|
67
|
-
k = f.alias or n
|
68
|
-
val = serialized.get(k)
|
69
|
-
serialized.pop(k, None)
|
70
|
-
|
71
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
72
|
-
is_set = (
|
73
|
-
self.__pydantic_fields_set__.intersection({n})
|
74
|
-
or k in null_default_fields
|
75
|
-
) # pylint: disable=no-member
|
76
|
-
|
77
|
-
if val is not None and val != UNSET_SENTINEL:
|
78
|
-
m[k] = val
|
79
|
-
elif val != UNSET_SENTINEL and (
|
80
|
-
not k in optional_fields or (optional_nullable and is_set)
|
81
|
-
):
|
82
|
-
m[k] = val
|
83
|
-
|
84
|
-
return m
|
@@ -1,70 +0,0 @@
|
|
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 DeleteDocumentV1CollectionsCollectionIdentifierDocumentsDocumentIDDeleteRequestTypedDict(
|
12
|
-
TypedDict
|
13
|
-
):
|
14
|
-
collection_identifier: str
|
15
|
-
r"""The ID of the collection"""
|
16
|
-
document_id: str
|
17
|
-
r"""The ID of the document to delete"""
|
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 DeleteDocumentV1CollectionsCollectionIdentifierDocumentsDocumentIDDeleteRequest(
|
23
|
-
BaseModel
|
24
|
-
):
|
25
|
-
collection_identifier: Annotated[
|
26
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
27
|
-
]
|
28
|
-
r"""The ID of the collection"""
|
29
|
-
|
30
|
-
document_id: Annotated[
|
31
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
32
|
-
]
|
33
|
-
r"""The ID of the document to delete"""
|
34
|
-
|
35
|
-
x_namespace: Annotated[
|
36
|
-
OptionalNullable[str],
|
37
|
-
pydantic.Field(alias="X-Namespace"),
|
38
|
-
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
39
|
-
] = UNSET
|
40
|
-
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."""
|
41
|
-
|
42
|
-
@model_serializer(mode="wrap")
|
43
|
-
def serialize_model(self, handler):
|
44
|
-
optional_fields = ["X-Namespace"]
|
45
|
-
nullable_fields = ["X-Namespace"]
|
46
|
-
null_default_fields = []
|
47
|
-
|
48
|
-
serialized = handler(self)
|
49
|
-
|
50
|
-
m = {}
|
51
|
-
|
52
|
-
for n, f in type(self).model_fields.items():
|
53
|
-
k = f.alias or n
|
54
|
-
val = serialized.get(k)
|
55
|
-
serialized.pop(k, None)
|
56
|
-
|
57
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
58
|
-
is_set = (
|
59
|
-
self.__pydantic_fields_set__.intersection({n})
|
60
|
-
or k in null_default_fields
|
61
|
-
) # pylint: disable=no-member
|
62
|
-
|
63
|
-
if val is not None and val != UNSET_SENTINEL:
|
64
|
-
m[k] = val
|
65
|
-
elif val != UNSET_SENTINEL and (
|
66
|
-
not k in optional_fields or (optional_nullable and is_set)
|
67
|
-
):
|
68
|
-
m[k] = val
|
69
|
-
|
70
|
-
return m
|
@@ -1,56 +0,0 @@
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
from .documentresponse import DocumentResponse, DocumentResponseTypedDict
|
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 DocumentListResponseTypedDict(TypedDict):
|
12
|
-
r"""Model for paginated document list response"""
|
13
|
-
|
14
|
-
items: List[DocumentResponseTypedDict]
|
15
|
-
total: int
|
16
|
-
next_offset_id: NotRequired[Nullable[str]]
|
17
|
-
|
18
|
-
|
19
|
-
class DocumentListResponse(BaseModel):
|
20
|
-
r"""Model for paginated document list response"""
|
21
|
-
|
22
|
-
items: List[DocumentResponse]
|
23
|
-
|
24
|
-
total: int
|
25
|
-
|
26
|
-
next_offset_id: OptionalNullable[str] = UNSET
|
27
|
-
|
28
|
-
@model_serializer(mode="wrap")
|
29
|
-
def serialize_model(self, handler):
|
30
|
-
optional_fields = ["next_offset_id"]
|
31
|
-
nullable_fields = ["next_offset_id"]
|
32
|
-
null_default_fields = []
|
33
|
-
|
34
|
-
serialized = handler(self)
|
35
|
-
|
36
|
-
m = {}
|
37
|
-
|
38
|
-
for n, f in type(self).model_fields.items():
|
39
|
-
k = f.alias or n
|
40
|
-
val = serialized.get(k)
|
41
|
-
serialized.pop(k, None)
|
42
|
-
|
43
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
44
|
-
is_set = (
|
45
|
-
self.__pydantic_fields_set__.intersection({n})
|
46
|
-
or k in null_default_fields
|
47
|
-
) # pylint: disable=no-member
|
48
|
-
|
49
|
-
if val is not None and val != UNSET_SENTINEL:
|
50
|
-
m[k] = val
|
51
|
-
elif val != UNSET_SENTINEL and (
|
52
|
-
not k in optional_fields or (optional_nullable and is_set)
|
53
|
-
):
|
54
|
-
m[k] = val
|
55
|
-
|
56
|
-
return m
|
@@ -1,87 +0,0 @@
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
from datetime import datetime
|
5
|
-
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
|
-
from pydantic import model_serializer
|
7
|
-
from typing import Dict, List, Optional
|
8
|
-
from typing_extensions import NotRequired, TypedDict
|
9
|
-
|
10
|
-
|
11
|
-
class DocumentResponseMetadataTypedDict(TypedDict):
|
12
|
-
pass
|
13
|
-
|
14
|
-
|
15
|
-
class DocumentResponseMetadata(BaseModel):
|
16
|
-
pass
|
17
|
-
|
18
|
-
|
19
|
-
class DocumentResponseTypedDict(TypedDict):
|
20
|
-
r"""Model for document response"""
|
21
|
-
|
22
|
-
document_id: str
|
23
|
-
r"""Unique identifier for the document"""
|
24
|
-
collection_id: str
|
25
|
-
r"""ID of the collection this document belongs to"""
|
26
|
-
internal_id: str
|
27
|
-
r"""Internal organization ID"""
|
28
|
-
namespace_id: str
|
29
|
-
r"""Namespace ID"""
|
30
|
-
created_at: NotRequired[datetime]
|
31
|
-
updated_at: NotRequired[Nullable[datetime]]
|
32
|
-
metadata: NotRequired[DocumentResponseMetadataTypedDict]
|
33
|
-
vectors: NotRequired[Dict[str, List[float]]]
|
34
|
-
|
35
|
-
|
36
|
-
class DocumentResponse(BaseModel):
|
37
|
-
r"""Model for document response"""
|
38
|
-
|
39
|
-
document_id: str
|
40
|
-
r"""Unique identifier for the document"""
|
41
|
-
|
42
|
-
collection_id: str
|
43
|
-
r"""ID of the collection this document belongs to"""
|
44
|
-
|
45
|
-
internal_id: str
|
46
|
-
r"""Internal organization ID"""
|
47
|
-
|
48
|
-
namespace_id: str
|
49
|
-
r"""Namespace ID"""
|
50
|
-
|
51
|
-
created_at: Optional[datetime] = None
|
52
|
-
|
53
|
-
updated_at: OptionalNullable[datetime] = UNSET
|
54
|
-
|
55
|
-
metadata: Optional[DocumentResponseMetadata] = None
|
56
|
-
|
57
|
-
vectors: Optional[Dict[str, List[float]]] = None
|
58
|
-
|
59
|
-
@model_serializer(mode="wrap")
|
60
|
-
def serialize_model(self, handler):
|
61
|
-
optional_fields = ["created_at", "updated_at", "metadata", "vectors"]
|
62
|
-
nullable_fields = ["updated_at"]
|
63
|
-
null_default_fields = []
|
64
|
-
|
65
|
-
serialized = handler(self)
|
66
|
-
|
67
|
-
m = {}
|
68
|
-
|
69
|
-
for n, f in type(self).model_fields.items():
|
70
|
-
k = f.alias or n
|
71
|
-
val = serialized.get(k)
|
72
|
-
serialized.pop(k, None)
|
73
|
-
|
74
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
75
|
-
is_set = (
|
76
|
-
self.__pydantic_fields_set__.intersection({n})
|
77
|
-
or k in null_default_fields
|
78
|
-
) # pylint: disable=no-member
|
79
|
-
|
80
|
-
if val is not None and val != UNSET_SENTINEL:
|
81
|
-
m[k] = val
|
82
|
-
elif val != UNSET_SENTINEL and (
|
83
|
-
not k in optional_fields or (optional_nullable and is_set)
|
84
|
-
):
|
85
|
-
m[k] = val
|
86
|
-
|
87
|
-
return m
|
mixpeek/models/documentupdate.py
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
-
from pydantic import model_serializer
|
6
|
-
from typing import Dict, List
|
7
|
-
from typing_extensions import NotRequired, TypedDict
|
8
|
-
|
9
|
-
|
10
|
-
class DocumentUpdateMetadataTypedDict(TypedDict):
|
11
|
-
pass
|
12
|
-
|
13
|
-
|
14
|
-
class DocumentUpdateMetadata(BaseModel):
|
15
|
-
pass
|
16
|
-
|
17
|
-
|
18
|
-
class DocumentUpdateTypedDict(TypedDict):
|
19
|
-
r"""Model for updating an existing document"""
|
20
|
-
|
21
|
-
metadata: NotRequired[Nullable[DocumentUpdateMetadataTypedDict]]
|
22
|
-
vectors: NotRequired[Nullable[Dict[str, List[float]]]]
|
23
|
-
|
24
|
-
|
25
|
-
class DocumentUpdate(BaseModel):
|
26
|
-
r"""Model for updating an existing document"""
|
27
|
-
|
28
|
-
metadata: OptionalNullable[DocumentUpdateMetadata] = UNSET
|
29
|
-
|
30
|
-
vectors: OptionalNullable[Dict[str, List[float]]] = UNSET
|
31
|
-
|
32
|
-
@model_serializer(mode="wrap")
|
33
|
-
def serialize_model(self, handler):
|
34
|
-
optional_fields = ["metadata", "vectors"]
|
35
|
-
nullable_fields = ["metadata", "vectors"]
|
36
|
-
null_default_fields = []
|
37
|
-
|
38
|
-
serialized = handler(self)
|
39
|
-
|
40
|
-
m = {}
|
41
|
-
|
42
|
-
for n, f in type(self).model_fields.items():
|
43
|
-
k = f.alias or n
|
44
|
-
val = serialized.get(k)
|
45
|
-
serialized.pop(k, None)
|
46
|
-
|
47
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
48
|
-
is_set = (
|
49
|
-
self.__pydantic_fields_set__.intersection({n})
|
50
|
-
or k in null_default_fields
|
51
|
-
) # pylint: disable=no-member
|
52
|
-
|
53
|
-
if val is not None and val != UNSET_SENTINEL:
|
54
|
-
m[k] = val
|
55
|
-
elif val != UNSET_SENTINEL and (
|
56
|
-
not k in optional_fields or (optional_nullable and is_set)
|
57
|
-
):
|
58
|
-
m[k] = val
|
59
|
-
|
60
|
-
return m
|
@@ -1,17 +0,0 @@
|
|
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
|
mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py
DELETED
@@ -1,70 +0,0 @@
|
|
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 GetDocumentV1CollectionsCollectionIdentifierDocumentsDocumentIDGetRequestTypedDict(
|
12
|
-
TypedDict
|
13
|
-
):
|
14
|
-
collection_identifier: str
|
15
|
-
r"""The ID of the collection"""
|
16
|
-
document_id: str
|
17
|
-
r"""The ID of the document to retrieve"""
|
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 GetDocumentV1CollectionsCollectionIdentifierDocumentsDocumentIDGetRequest(
|
23
|
-
BaseModel
|
24
|
-
):
|
25
|
-
collection_identifier: Annotated[
|
26
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
27
|
-
]
|
28
|
-
r"""The ID of the collection"""
|
29
|
-
|
30
|
-
document_id: Annotated[
|
31
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
32
|
-
]
|
33
|
-
r"""The ID of the document to retrieve"""
|
34
|
-
|
35
|
-
x_namespace: Annotated[
|
36
|
-
OptionalNullable[str],
|
37
|
-
pydantic.Field(alias="X-Namespace"),
|
38
|
-
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
39
|
-
] = UNSET
|
40
|
-
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."""
|
41
|
-
|
42
|
-
@model_serializer(mode="wrap")
|
43
|
-
def serialize_model(self, handler):
|
44
|
-
optional_fields = ["X-Namespace"]
|
45
|
-
nullable_fields = ["X-Namespace"]
|
46
|
-
null_default_fields = []
|
47
|
-
|
48
|
-
serialized = handler(self)
|
49
|
-
|
50
|
-
m = {}
|
51
|
-
|
52
|
-
for n, f in type(self).model_fields.items():
|
53
|
-
k = f.alias or n
|
54
|
-
val = serialized.get(k)
|
55
|
-
serialized.pop(k, None)
|
56
|
-
|
57
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
58
|
-
is_set = (
|
59
|
-
self.__pydantic_fields_set__.intersection({n})
|
60
|
-
or k in null_default_fields
|
61
|
-
) # pylint: disable=no-member
|
62
|
-
|
63
|
-
if val is not None and val != UNSET_SENTINEL:
|
64
|
-
m[k] = val
|
65
|
-
elif val != UNSET_SENTINEL and (
|
66
|
-
not k in optional_fields or (optional_nullable and is_set)
|
67
|
-
):
|
68
|
-
m[k] = val
|
69
|
-
|
70
|
-
return m
|
@@ -1,114 +0,0 @@
|
|
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 (
|
6
|
-
FieldMetadata,
|
7
|
-
HeaderMetadata,
|
8
|
-
PathParamMetadata,
|
9
|
-
QueryParamMetadata,
|
10
|
-
)
|
11
|
-
import pydantic
|
12
|
-
from pydantic import model_serializer
|
13
|
-
from typing import Optional
|
14
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
15
|
-
|
16
|
-
|
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"""
|
32
|
-
x_namespace: NotRequired[Nullable[str]]
|
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."""
|
34
|
-
|
35
|
-
|
36
|
-
class ListDocumentsV1CollectionsCollectionIdentifierDocumentsGetRequest(BaseModel):
|
37
|
-
collection_identifier: Annotated[
|
38
|
-
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
39
|
-
]
|
40
|
-
r"""The ID of the collection"""
|
41
|
-
|
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[
|
49
|
-
OptionalNullable[str],
|
50
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
51
|
-
] = UNSET
|
52
|
-
r"""ID of the document to start pagination from"""
|
53
|
-
|
54
|
-
sort: Annotated[
|
55
|
-
OptionalNullable[str],
|
56
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
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"""
|
71
|
-
|
72
|
-
x_namespace: Annotated[
|
73
|
-
OptionalNullable[str],
|
74
|
-
pydantic.Field(alias="X-Namespace"),
|
75
|
-
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
76
|
-
] = UNSET
|
77
|
-
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."""
|
78
|
-
|
79
|
-
@model_serializer(mode="wrap")
|
80
|
-
def serialize_model(self, handler):
|
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"]
|
90
|
-
null_default_fields = []
|
91
|
-
|
92
|
-
serialized = handler(self)
|
93
|
-
|
94
|
-
m = {}
|
95
|
-
|
96
|
-
for n, f in type(self).model_fields.items():
|
97
|
-
k = f.alias or n
|
98
|
-
val = serialized.get(k)
|
99
|
-
serialized.pop(k, None)
|
100
|
-
|
101
|
-
optional_nullable = k in optional_fields and k in nullable_fields
|
102
|
-
is_set = (
|
103
|
-
self.__pydantic_fields_set__.intersection({n})
|
104
|
-
or k in null_default_fields
|
105
|
-
) # pylint: disable=no-member
|
106
|
-
|
107
|
-
if val is not None and val != UNSET_SENTINEL:
|
108
|
-
m[k] = val
|
109
|
-
elif val != UNSET_SENTINEL and (
|
110
|
-
not k in optional_fields or (optional_nullable and is_set)
|
111
|
-
):
|
112
|
-
m[k] = val
|
113
|
-
|
114
|
-
return m
|