lambdadb 0.3.5__py3-none-any.whl → 0.4.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.

Potentially problematic release.


This version of lambdadb might be problematic. Click here for more details.

Files changed (37) hide show
  1. lambdadb/_version.py +3 -3
  2. lambdadb/basesdk.py +4 -4
  3. lambdadb/collections.py +280 -452
  4. lambdadb/docs.py +261 -425
  5. lambdadb/errors/__init__.py +9 -0
  6. lambdadb/errors/apierror.py +30 -14
  7. lambdadb/errors/badrequest_error.py +12 -6
  8. lambdadb/errors/internalservererror.py +12 -6
  9. lambdadb/errors/lambdadberror.py +26 -0
  10. lambdadb/errors/no_response_error.py +13 -0
  11. lambdadb/errors/resourcealreadyexists_error.py +12 -6
  12. lambdadb/errors/resourcenotfound_error.py +12 -6
  13. lambdadb/errors/responsevalidationerror.py +25 -0
  14. lambdadb/errors/toomanyrequests_error.py +12 -6
  15. lambdadb/errors/unauthenticated_error.py +12 -6
  16. lambdadb/models/__init__.py +0 -54
  17. lambdadb/models/bulkupsertdocsop.py +0 -9
  18. lambdadb/models/createcollectionop.py +2 -23
  19. lambdadb/models/deletecollectionop.py +0 -9
  20. lambdadb/models/deletedocsop.py +3 -20
  21. lambdadb/models/fetchdocsop.py +3 -20
  22. lambdadb/models/getbulkupsertdocsop.py +0 -9
  23. lambdadb/models/getcollectionop.py +0 -9
  24. lambdadb/models/listcollectionsop.py +1 -17
  25. lambdadb/models/querycollectionop.py +7 -40
  26. lambdadb/models/updatecollectionop.py +0 -9
  27. lambdadb/models/updatedocsop.py +3 -20
  28. lambdadb/models/upsertdocsop.py +3 -20
  29. lambdadb/sdk.py +9 -1
  30. lambdadb/sdkconfiguration.py +4 -3
  31. lambdadb/utils/__init__.py +3 -0
  32. lambdadb/utils/serializers.py +21 -3
  33. {lambdadb-0.3.5.dist-info → lambdadb-0.4.0.dist-info}/METADATA +94 -55
  34. lambdadb-0.4.0.dist-info/RECORD +64 -0
  35. lambdadb-0.3.5.dist-info/RECORD +0 -61
  36. {lambdadb-0.3.5.dist-info → lambdadb-0.4.0.dist-info}/LICENSE +0 -0
  37. {lambdadb-0.3.5.dist-info → lambdadb-0.4.0.dist-info}/WHEEL +0 -0
@@ -7,11 +7,14 @@ if TYPE_CHECKING:
7
7
  from .apierror import APIError
8
8
  from .badrequest_error import BadRequestError, BadRequestErrorData
9
9
  from .internalservererror import InternalServerError, InternalServerErrorData
10
+ from .lambdadberror import LambdaDBError
11
+ from .no_response_error import NoResponseError
10
12
  from .resourcealreadyexists_error import (
11
13
  ResourceAlreadyExistsError,
12
14
  ResourceAlreadyExistsErrorData,
13
15
  )
14
16
  from .resourcenotfound_error import ResourceNotFoundError, ResourceNotFoundErrorData
17
+ from .responsevalidationerror import ResponseValidationError
15
18
  from .toomanyrequests_error import TooManyRequestsError, TooManyRequestsErrorData
16
19
  from .unauthenticated_error import UnauthenticatedError, UnauthenticatedErrorData
17
20
 
@@ -21,10 +24,13 @@ __all__ = [
21
24
  "BadRequestErrorData",
22
25
  "InternalServerError",
23
26
  "InternalServerErrorData",
27
+ "LambdaDBError",
28
+ "NoResponseError",
24
29
  "ResourceAlreadyExistsError",
25
30
  "ResourceAlreadyExistsErrorData",
26
31
  "ResourceNotFoundError",
27
32
  "ResourceNotFoundErrorData",
33
+ "ResponseValidationError",
28
34
  "TooManyRequestsError",
29
35
  "TooManyRequestsErrorData",
30
36
  "UnauthenticatedError",
@@ -37,10 +43,13 @@ _dynamic_imports: dict[str, str] = {
37
43
  "BadRequestErrorData": ".badrequest_error",
38
44
  "InternalServerError": ".internalservererror",
39
45
  "InternalServerErrorData": ".internalservererror",
46
+ "LambdaDBError": ".lambdadberror",
47
+ "NoResponseError": ".no_response_error",
40
48
  "ResourceAlreadyExistsError": ".resourcealreadyexists_error",
41
49
  "ResourceAlreadyExistsErrorData": ".resourcealreadyexists_error",
42
50
  "ResourceNotFoundError": ".resourcenotfound_error",
43
51
  "ResourceNotFoundErrorData": ".resourcenotfound_error",
52
+ "ResponseValidationError": ".responsevalidationerror",
44
53
  "TooManyRequestsError": ".toomanyrequests_error",
45
54
  "TooManyRequestsErrorData": ".toomanyrequests_error",
46
55
  "UnauthenticatedError": ".unauthenticated_error",
@@ -1,22 +1,38 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
- from dataclasses import dataclass
4
- from typing import Optional
5
3
  import httpx
4
+ from typing import Optional
5
+
6
+ from lambdadb.errors import LambdaDBError
7
+
8
+ MAX_MESSAGE_LEN = 10_000
9
+
10
+
11
+ class APIError(LambdaDBError):
12
+ """The fallback error class if no more specific error class is matched."""
13
+
14
+ def __init__(
15
+ self, message: str, raw_response: httpx.Response, body: Optional[str] = None
16
+ ):
17
+ body_display = body or raw_response.text or '""'
6
18
 
19
+ if message:
20
+ message += ": "
21
+ message += f"Status {raw_response.status_code}"
7
22
 
8
- @dataclass
9
- class APIError(Exception):
10
- """Represents an error returned by the API."""
23
+ headers = raw_response.headers
24
+ content_type = headers.get("content-type", '""')
25
+ if content_type != "application/json":
26
+ if " " in content_type:
27
+ content_type = f'"{content_type}"'
28
+ message += f" Content-Type {content_type}"
11
29
 
12
- message: str
13
- status_code: int = -1
14
- body: str = ""
15
- raw_response: Optional[httpx.Response] = None
30
+ if len(body_display) > MAX_MESSAGE_LEN:
31
+ truncated = body_display[:MAX_MESSAGE_LEN]
32
+ remaining = len(body_display) - MAX_MESSAGE_LEN
33
+ body_display = f"{truncated}...and {remaining} more chars"
16
34
 
17
- def __str__(self):
18
- body = ""
19
- if len(self.body) > 0:
20
- body = f"\n{self.body}"
35
+ message += f". Body: {body_display}"
36
+ message = message.strip()
21
37
 
22
- return f"{self.message}: Status {self.status_code}{body}"
38
+ super().__init__(message, raw_response, body)
@@ -1,7 +1,8 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from lambdadb import utils
4
+ import httpx
5
+ from lambdadb.errors import LambdaDBError
5
6
  from lambdadb.types import BaseModel
6
7
  from typing import Optional
7
8
 
@@ -10,11 +11,16 @@ class BadRequestErrorData(BaseModel):
10
11
  message: Optional[str] = None
11
12
 
12
13
 
13
- class BadRequestError(Exception):
14
+ class BadRequestError(LambdaDBError):
14
15
  data: BadRequestErrorData
15
16
 
16
- def __init__(self, data: BadRequestErrorData):
17
+ def __init__(
18
+ self,
19
+ data: BadRequestErrorData,
20
+ raw_response: httpx.Response,
21
+ body: Optional[str] = None,
22
+ ):
23
+ fallback = body or raw_response.text
24
+ message = str(data.message) or fallback
25
+ super().__init__(message, raw_response, body)
17
26
  self.data = data
18
-
19
- def __str__(self) -> str:
20
- return utils.marshal_json(self.data, BadRequestErrorData)
@@ -1,7 +1,8 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from lambdadb import utils
4
+ import httpx
5
+ from lambdadb.errors import LambdaDBError
5
6
  from lambdadb.types import BaseModel
6
7
  from typing import Optional
7
8
 
@@ -10,11 +11,16 @@ class InternalServerErrorData(BaseModel):
10
11
  message: Optional[str] = None
11
12
 
12
13
 
13
- class InternalServerError(Exception):
14
+ class InternalServerError(LambdaDBError):
14
15
  data: InternalServerErrorData
15
16
 
16
- def __init__(self, data: InternalServerErrorData):
17
+ def __init__(
18
+ self,
19
+ data: InternalServerErrorData,
20
+ raw_response: httpx.Response,
21
+ body: Optional[str] = None,
22
+ ):
23
+ fallback = body or raw_response.text
24
+ message = str(data.message) or fallback
25
+ super().__init__(message, raw_response, body)
17
26
  self.data = data
18
-
19
- def __str__(self) -> str:
20
- return utils.marshal_json(self.data, InternalServerErrorData)
@@ -0,0 +1,26 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ import httpx
4
+ from typing import Optional
5
+
6
+
7
+ class LambdaDBError(Exception):
8
+ """The base class for all HTTP error responses."""
9
+
10
+ message: str
11
+ status_code: int
12
+ body: str
13
+ headers: httpx.Headers
14
+ raw_response: httpx.Response
15
+
16
+ def __init__(
17
+ self, message: str, raw_response: httpx.Response, body: Optional[str] = None
18
+ ):
19
+ self.message = message
20
+ self.status_code = raw_response.status_code
21
+ self.body = body if body is not None else raw_response.text
22
+ self.headers = raw_response.headers
23
+ self.raw_response = raw_response
24
+
25
+ def __str__(self):
26
+ return self.message
@@ -0,0 +1,13 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ class NoResponseError(Exception):
4
+ """Error raised when no HTTP response is received from the server."""
5
+
6
+ message: str
7
+
8
+ def __init__(self, message: str = "No response received"):
9
+ self.message = message
10
+ super().__init__(message)
11
+
12
+ def __str__(self):
13
+ return self.message
@@ -1,7 +1,8 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from lambdadb import utils
4
+ import httpx
5
+ from lambdadb.errors import LambdaDBError
5
6
  from lambdadb.types import BaseModel
6
7
  from typing import Optional
7
8
 
@@ -10,11 +11,16 @@ class ResourceAlreadyExistsErrorData(BaseModel):
10
11
  message: Optional[str] = None
11
12
 
12
13
 
13
- class ResourceAlreadyExistsError(Exception):
14
+ class ResourceAlreadyExistsError(LambdaDBError):
14
15
  data: ResourceAlreadyExistsErrorData
15
16
 
16
- def __init__(self, data: ResourceAlreadyExistsErrorData):
17
+ def __init__(
18
+ self,
19
+ data: ResourceAlreadyExistsErrorData,
20
+ raw_response: httpx.Response,
21
+ body: Optional[str] = None,
22
+ ):
23
+ fallback = body or raw_response.text
24
+ message = str(data.message) or fallback
25
+ super().__init__(message, raw_response, body)
17
26
  self.data = data
18
-
19
- def __str__(self) -> str:
20
- return utils.marshal_json(self.data, ResourceAlreadyExistsErrorData)
@@ -1,7 +1,8 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from lambdadb import utils
4
+ import httpx
5
+ from lambdadb.errors import LambdaDBError
5
6
  from lambdadb.types import BaseModel
6
7
  from typing import Optional
7
8
 
@@ -10,11 +11,16 @@ class ResourceNotFoundErrorData(BaseModel):
10
11
  message: Optional[str] = None
11
12
 
12
13
 
13
- class ResourceNotFoundError(Exception):
14
+ class ResourceNotFoundError(LambdaDBError):
14
15
  data: ResourceNotFoundErrorData
15
16
 
16
- def __init__(self, data: ResourceNotFoundErrorData):
17
+ def __init__(
18
+ self,
19
+ data: ResourceNotFoundErrorData,
20
+ raw_response: httpx.Response,
21
+ body: Optional[str] = None,
22
+ ):
23
+ fallback = body or raw_response.text
24
+ message = str(data.message) or fallback
25
+ super().__init__(message, raw_response, body)
17
26
  self.data = data
18
-
19
- def __str__(self) -> str:
20
- return utils.marshal_json(self.data, ResourceNotFoundErrorData)
@@ -0,0 +1,25 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ import httpx
4
+ from typing import Optional
5
+
6
+ from lambdadb.errors import LambdaDBError
7
+
8
+
9
+ class ResponseValidationError(LambdaDBError):
10
+ """Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
11
+
12
+ def __init__(
13
+ self,
14
+ message: str,
15
+ raw_response: httpx.Response,
16
+ cause: Exception,
17
+ body: Optional[str] = None,
18
+ ):
19
+ message = f"{message}: {cause}"
20
+ super().__init__(message, raw_response, body)
21
+
22
+ @property
23
+ def cause(self):
24
+ """Normally the Pydantic ValidationError"""
25
+ return self.__cause__
@@ -1,7 +1,8 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from lambdadb import utils
4
+ import httpx
5
+ from lambdadb.errors import LambdaDBError
5
6
  from lambdadb.types import BaseModel
6
7
  from typing import Optional
7
8
 
@@ -10,11 +11,16 @@ class TooManyRequestsErrorData(BaseModel):
10
11
  message: Optional[str] = None
11
12
 
12
13
 
13
- class TooManyRequestsError(Exception):
14
+ class TooManyRequestsError(LambdaDBError):
14
15
  data: TooManyRequestsErrorData
15
16
 
16
- def __init__(self, data: TooManyRequestsErrorData):
17
+ def __init__(
18
+ self,
19
+ data: TooManyRequestsErrorData,
20
+ raw_response: httpx.Response,
21
+ body: Optional[str] = None,
22
+ ):
23
+ fallback = body or raw_response.text
24
+ message = str(data.message) or fallback
25
+ super().__init__(message, raw_response, body)
17
26
  self.data = data
18
-
19
- def __str__(self) -> str:
20
- return utils.marshal_json(self.data, TooManyRequestsErrorData)
@@ -1,7 +1,8 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from lambdadb import utils
4
+ import httpx
5
+ from lambdadb.errors import LambdaDBError
5
6
  from lambdadb.types import BaseModel
6
7
  from typing import Optional
7
8
 
@@ -10,11 +11,16 @@ class UnauthenticatedErrorData(BaseModel):
10
11
  message: Optional[str] = None
11
12
 
12
13
 
13
- class UnauthenticatedError(Exception):
14
+ class UnauthenticatedError(LambdaDBError):
14
15
  data: UnauthenticatedErrorData
15
16
 
16
- def __init__(self, data: UnauthenticatedErrorData):
17
+ def __init__(
18
+ self,
19
+ data: UnauthenticatedErrorData,
20
+ raw_response: httpx.Response,
21
+ body: Optional[str] = None,
22
+ ):
23
+ fallback = body or raw_response.text
24
+ message = str(data.message) or fallback
25
+ super().__init__(message, raw_response, body)
17
26
  self.data = data
18
-
19
- def __str__(self) -> str:
20
- return utils.marshal_json(self.data, UnauthenticatedErrorData)
@@ -13,8 +13,6 @@ if TYPE_CHECKING:
13
13
  from .collectionresponse import CollectionResponse, CollectionResponseTypedDict
14
14
  from .createcollectionop import (
15
15
  CreateCollectionRequest,
16
- CreateCollectionRequestBody,
17
- CreateCollectionRequestBodyTypedDict,
18
16
  CreateCollectionRequestTypedDict,
19
17
  CreateCollectionResponse,
20
18
  CreateCollectionResponseTypedDict,
@@ -28,13 +26,9 @@ if TYPE_CHECKING:
28
26
  DeleteDocsRequestBody,
29
27
  DeleteDocsRequestBodyTypedDict,
30
28
  DeleteDocsRequestTypedDict,
31
- Filter,
32
- FilterTypedDict,
33
29
  )
34
30
  from .fetchdocsop import (
35
31
  FetchDocsDoc,
36
- FetchDocsDocDoc,
37
- FetchDocsDocDocTypedDict,
38
32
  FetchDocsDocTypedDict,
39
33
  FetchDocsRequest,
40
34
  FetchDocsRequestBody,
@@ -73,17 +67,12 @@ if TYPE_CHECKING:
73
67
  TypeVector,
74
68
  )
75
69
  from .listcollectionsop import (
76
- ListCollectionsRequest,
77
- ListCollectionsRequestTypedDict,
78
70
  ListCollectionsResponse,
79
71
  ListCollectionsResponseTypedDict,
80
72
  )
81
73
  from .messageresponse import MessageResponse, MessageResponseTypedDict
82
74
  from .querycollectionop import (
83
- Query,
84
75
  QueryCollectionDoc,
85
- QueryCollectionDocDoc,
86
- QueryCollectionDocDocTypedDict,
87
76
  QueryCollectionDocTypedDict,
88
77
  QueryCollectionRequest,
89
78
  QueryCollectionRequestBody,
@@ -91,9 +80,6 @@ if TYPE_CHECKING:
91
80
  QueryCollectionRequestTypedDict,
92
81
  QueryCollectionResponse,
93
82
  QueryCollectionResponseTypedDict,
94
- QueryTypedDict,
95
- Sort,
96
- SortTypedDict,
97
83
  )
98
84
  from .security import Security, SecurityTypedDict
99
85
  from .status import Status
@@ -106,16 +92,12 @@ if TYPE_CHECKING:
106
92
  UpdateCollectionResponseTypedDict,
107
93
  )
108
94
  from .updatedocsop import (
109
- UpdateDocsDoc,
110
- UpdateDocsDocTypedDict,
111
95
  UpdateDocsRequest,
112
96
  UpdateDocsRequestBody,
113
97
  UpdateDocsRequestBodyTypedDict,
114
98
  UpdateDocsRequestTypedDict,
115
99
  )
116
100
  from .upsertdocsop import (
117
- UpsertDocsDoc,
118
- UpsertDocsDocTypedDict,
119
101
  UpsertDocsRequest,
120
102
  UpsertDocsRequestBody,
121
103
  UpsertDocsRequestBodyTypedDict,
@@ -131,8 +113,6 @@ __all__ = [
131
113
  "CollectionResponse",
132
114
  "CollectionResponseTypedDict",
133
115
  "CreateCollectionRequest",
134
- "CreateCollectionRequestBody",
135
- "CreateCollectionRequestBodyTypedDict",
136
116
  "CreateCollectionRequestTypedDict",
137
117
  "CreateCollectionResponse",
138
118
  "CreateCollectionResponseTypedDict",
@@ -143,8 +123,6 @@ __all__ = [
143
123
  "DeleteDocsRequestBodyTypedDict",
144
124
  "DeleteDocsRequestTypedDict",
145
125
  "FetchDocsDoc",
146
- "FetchDocsDocDoc",
147
- "FetchDocsDocDocTypedDict",
148
126
  "FetchDocsDocTypedDict",
149
127
  "FetchDocsRequest",
150
128
  "FetchDocsRequestBody",
@@ -152,8 +130,6 @@ __all__ = [
152
130
  "FetchDocsRequestTypedDict",
153
131
  "FetchDocsResponse",
154
132
  "FetchDocsResponseTypedDict",
155
- "Filter",
156
- "FilterTypedDict",
157
133
  "GetBulkUpsertDocsRequest",
158
134
  "GetBulkUpsertDocsRequestTypedDict",
159
135
  "GetBulkUpsertDocsResponse",
@@ -172,16 +148,11 @@ __all__ = [
172
148
  "IndexConfigsUnionTypedDict",
173
149
  "IndexConfigsVector",
174
150
  "IndexConfigsVectorTypedDict",
175
- "ListCollectionsRequest",
176
- "ListCollectionsRequestTypedDict",
177
151
  "ListCollectionsResponse",
178
152
  "ListCollectionsResponseTypedDict",
179
153
  "MessageResponse",
180
154
  "MessageResponseTypedDict",
181
- "Query",
182
155
  "QueryCollectionDoc",
183
- "QueryCollectionDocDoc",
184
- "QueryCollectionDocDocTypedDict",
185
156
  "QueryCollectionDocTypedDict",
186
157
  "QueryCollectionRequest",
187
158
  "QueryCollectionRequestBody",
@@ -189,12 +160,9 @@ __all__ = [
189
160
  "QueryCollectionRequestTypedDict",
190
161
  "QueryCollectionResponse",
191
162
  "QueryCollectionResponseTypedDict",
192
- "QueryTypedDict",
193
163
  "Security",
194
164
  "SecurityTypedDict",
195
165
  "Similarity",
196
- "Sort",
197
- "SortTypedDict",
198
166
  "Status",
199
167
  "Type",
200
168
  "TypeText",
@@ -205,14 +173,10 @@ __all__ = [
205
173
  "UpdateCollectionRequestTypedDict",
206
174
  "UpdateCollectionResponse",
207
175
  "UpdateCollectionResponseTypedDict",
208
- "UpdateDocsDoc",
209
- "UpdateDocsDocTypedDict",
210
176
  "UpdateDocsRequest",
211
177
  "UpdateDocsRequestBody",
212
178
  "UpdateDocsRequestBodyTypedDict",
213
179
  "UpdateDocsRequestTypedDict",
214
- "UpsertDocsDoc",
215
- "UpsertDocsDocTypedDict",
216
180
  "UpsertDocsRequest",
217
181
  "UpsertDocsRequestBody",
218
182
  "UpsertDocsRequestBodyTypedDict",
@@ -227,8 +191,6 @@ _dynamic_imports: dict[str, str] = {
227
191
  "CollectionResponse": ".collectionresponse",
228
192
  "CollectionResponseTypedDict": ".collectionresponse",
229
193
  "CreateCollectionRequest": ".createcollectionop",
230
- "CreateCollectionRequestBody": ".createcollectionop",
231
- "CreateCollectionRequestBodyTypedDict": ".createcollectionop",
232
194
  "CreateCollectionRequestTypedDict": ".createcollectionop",
233
195
  "CreateCollectionResponse": ".createcollectionop",
234
196
  "CreateCollectionResponseTypedDict": ".createcollectionop",
@@ -238,11 +200,7 @@ _dynamic_imports: dict[str, str] = {
238
200
  "DeleteDocsRequestBody": ".deletedocsop",
239
201
  "DeleteDocsRequestBodyTypedDict": ".deletedocsop",
240
202
  "DeleteDocsRequestTypedDict": ".deletedocsop",
241
- "Filter": ".deletedocsop",
242
- "FilterTypedDict": ".deletedocsop",
243
203
  "FetchDocsDoc": ".fetchdocsop",
244
- "FetchDocsDocDoc": ".fetchdocsop",
245
- "FetchDocsDocDocTypedDict": ".fetchdocsop",
246
204
  "FetchDocsDocTypedDict": ".fetchdocsop",
247
205
  "FetchDocsRequest": ".fetchdocsop",
248
206
  "FetchDocsRequestBody": ".fetchdocsop",
@@ -273,16 +231,11 @@ _dynamic_imports: dict[str, str] = {
273
231
  "Type": ".indexconfigs_union",
274
232
  "TypeText": ".indexconfigs_union",
275
233
  "TypeVector": ".indexconfigs_union",
276
- "ListCollectionsRequest": ".listcollectionsop",
277
- "ListCollectionsRequestTypedDict": ".listcollectionsop",
278
234
  "ListCollectionsResponse": ".listcollectionsop",
279
235
  "ListCollectionsResponseTypedDict": ".listcollectionsop",
280
236
  "MessageResponse": ".messageresponse",
281
237
  "MessageResponseTypedDict": ".messageresponse",
282
- "Query": ".querycollectionop",
283
238
  "QueryCollectionDoc": ".querycollectionop",
284
- "QueryCollectionDocDoc": ".querycollectionop",
285
- "QueryCollectionDocDocTypedDict": ".querycollectionop",
286
239
  "QueryCollectionDocTypedDict": ".querycollectionop",
287
240
  "QueryCollectionRequest": ".querycollectionop",
288
241
  "QueryCollectionRequestBody": ".querycollectionop",
@@ -290,9 +243,6 @@ _dynamic_imports: dict[str, str] = {
290
243
  "QueryCollectionRequestTypedDict": ".querycollectionop",
291
244
  "QueryCollectionResponse": ".querycollectionop",
292
245
  "QueryCollectionResponseTypedDict": ".querycollectionop",
293
- "QueryTypedDict": ".querycollectionop",
294
- "Sort": ".querycollectionop",
295
- "SortTypedDict": ".querycollectionop",
296
246
  "Security": ".security",
297
247
  "SecurityTypedDict": ".security",
298
248
  "Status": ".status",
@@ -302,14 +252,10 @@ _dynamic_imports: dict[str, str] = {
302
252
  "UpdateCollectionRequestTypedDict": ".updatecollectionop",
303
253
  "UpdateCollectionResponse": ".updatecollectionop",
304
254
  "UpdateCollectionResponseTypedDict": ".updatecollectionop",
305
- "UpdateDocsDoc": ".updatedocsop",
306
- "UpdateDocsDocTypedDict": ".updatedocsop",
307
255
  "UpdateDocsRequest": ".updatedocsop",
308
256
  "UpdateDocsRequestBody": ".updatedocsop",
309
257
  "UpdateDocsRequestBodyTypedDict": ".updatedocsop",
310
258
  "UpdateDocsRequestTypedDict": ".updatedocsop",
311
- "UpsertDocsDoc": ".upsertdocsop",
312
- "UpsertDocsDocTypedDict": ".upsertdocsop",
313
259
  "UpsertDocsRequest": ".upsertdocsop",
314
260
  "UpsertDocsRequestBody": ".upsertdocsop",
315
261
  "UpsertDocsRequestBodyTypedDict": ".upsertdocsop",
@@ -18,21 +18,12 @@ class BulkUpsertDocsRequestBody(BaseModel):
18
18
 
19
19
 
20
20
  class BulkUpsertDocsRequestTypedDict(TypedDict):
21
- project_name: str
22
- r"""Project name."""
23
21
  collection_name: str
24
22
  r"""Collection name."""
25
23
  request_body: BulkUpsertDocsRequestBodyTypedDict
26
24
 
27
25
 
28
26
  class BulkUpsertDocsRequest(BaseModel):
29
- project_name: Annotated[
30
- str,
31
- pydantic.Field(alias="projectName"),
32
- FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
33
- ]
34
- r"""Project name."""
35
-
36
27
  collection_name: Annotated[
37
28
  str,
38
29
  pydantic.Field(alias="collectionName"),
@@ -4,13 +4,12 @@ from __future__ import annotations
4
4
  from .collectionresponse import CollectionResponse, CollectionResponseTypedDict
5
5
  from .indexconfigs_union import IndexConfigsUnion, IndexConfigsUnionTypedDict
6
6
  from lambdadb.types import BaseModel
7
- from lambdadb.utils import FieldMetadata, PathParamMetadata, RequestMetadata
8
7
  import pydantic
9
8
  from typing import Dict, Optional
10
9
  from typing_extensions import Annotated, NotRequired, TypedDict
11
10
 
12
11
 
13
- class CreateCollectionRequestBodyTypedDict(TypedDict):
12
+ class CreateCollectionRequestTypedDict(TypedDict):
14
13
  collection_name: str
15
14
  r"""Collection name must be unique within a project and the supported maximum length is 52."""
16
15
  index_configs: NotRequired[Dict[str, IndexConfigsUnionTypedDict]]
@@ -20,7 +19,7 @@ class CreateCollectionRequestBodyTypedDict(TypedDict):
20
19
  source_project_api_key: NotRequired[str]
21
20
 
22
21
 
23
- class CreateCollectionRequestBody(BaseModel):
22
+ class CreateCollectionRequest(BaseModel):
24
23
  collection_name: Annotated[str, pydantic.Field(alias="collectionName")]
25
24
  r"""Collection name must be unique within a project and the supported maximum length is 52."""
26
25
 
@@ -45,26 +44,6 @@ class CreateCollectionRequestBody(BaseModel):
45
44
  ] = None
46
45
 
47
46
 
48
- class CreateCollectionRequestTypedDict(TypedDict):
49
- project_name: str
50
- r"""Project name."""
51
- request_body: CreateCollectionRequestBodyTypedDict
52
-
53
-
54
- class CreateCollectionRequest(BaseModel):
55
- project_name: Annotated[
56
- str,
57
- pydantic.Field(alias="projectName"),
58
- FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
59
- ]
60
- r"""Project name."""
61
-
62
- request_body: Annotated[
63
- CreateCollectionRequestBody,
64
- FieldMetadata(request=RequestMetadata(media_type="application/json")),
65
- ]
66
-
67
-
68
47
  class CreateCollectionResponseTypedDict(TypedDict):
69
48
  r"""Created collection"""
70
49
 
@@ -8,20 +8,11 @@ from typing_extensions import Annotated, TypedDict
8
8
 
9
9
 
10
10
  class DeleteCollectionRequestTypedDict(TypedDict):
11
- project_name: str
12
- r"""Project name."""
13
11
  collection_name: str
14
12
  r"""Collection name."""
15
13
 
16
14
 
17
15
  class DeleteCollectionRequest(BaseModel):
18
- project_name: Annotated[
19
- str,
20
- pydantic.Field(alias="projectName"),
21
- FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
22
- ]
23
- r"""Project name."""
24
-
25
16
  collection_name: Annotated[
26
17
  str,
27
18
  pydantic.Field(alias="collectionName"),