supermemory 3.0.0a29__py3-none-any.whl → 3.1.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 supermemory might be problematic. Click here for more details.
- supermemory/__init__.py +3 -1
- supermemory/_base_client.py +12 -12
- supermemory/_client.py +17 -9
- supermemory/_compat.py +48 -48
- supermemory/_models.py +50 -44
- supermemory/_qs.py +7 -7
- supermemory/_types.py +53 -12
- supermemory/_utils/__init__.py +9 -2
- supermemory/_utils/_compat.py +45 -0
- supermemory/_utils/_datetime_parse.py +136 -0
- supermemory/_utils/_transform.py +13 -3
- supermemory/_utils/_typing.py +6 -1
- supermemory/_utils/_utils.py +4 -5
- supermemory/_version.py +1 -1
- supermemory/resources/__init__.py +14 -0
- supermemory/resources/connections.py +36 -36
- supermemory/resources/documents.py +894 -0
- supermemory/resources/memories.py +222 -134
- supermemory/resources/search.py +79 -79
- supermemory/resources/settings.py +31 -31
- supermemory/types/__init__.py +9 -0
- supermemory/types/connection_create_params.py +3 -2
- supermemory/types/connection_delete_by_provider_params.py +2 -2
- supermemory/types/connection_get_by_tags_params.py +2 -2
- supermemory/types/connection_import_params.py +2 -2
- supermemory/types/connection_list_documents_params.py +2 -2
- supermemory/types/connection_list_params.py +2 -2
- supermemory/types/document_add_params.py +69 -0
- supermemory/types/document_add_response.py +11 -0
- supermemory/types/document_get_response.py +104 -0
- supermemory/types/document_list_params.py +111 -0
- supermemory/types/document_list_response.py +95 -0
- supermemory/types/document_update_params.py +69 -0
- supermemory/types/document_update_response.py +11 -0
- supermemory/types/document_upload_file_params.py +36 -0
- supermemory/types/document_upload_file_response.py +11 -0
- supermemory/types/memory_add_params.py +39 -23
- supermemory/types/memory_get_response.py +21 -20
- supermemory/types/memory_list_params.py +79 -8
- supermemory/types/memory_list_response.py +18 -17
- supermemory/types/memory_update_params.py +31 -15
- supermemory/types/memory_upload_file_params.py +20 -0
- supermemory/types/search_documents_params.py +71 -9
- supermemory/types/search_execute_params.py +71 -9
- supermemory/types/search_memories_params.py +77 -8
- supermemory/types/search_memories_response.py +10 -7
- {supermemory-3.0.0a29.dist-info → supermemory-3.1.0.dist-info}/METADATA +18 -8
- supermemory-3.1.0.dist-info/RECORD +80 -0
- supermemory-3.0.0a29.dist-info/RECORD +0 -68
- {supermemory-3.0.0a29.dist-info → supermemory-3.1.0.dist-info}/WHEEL +0 -0
- {supermemory-3.0.0a29.dist-info → supermemory-3.1.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict,
|
|
5
|
+
from typing import Dict, Union, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -15,7 +15,7 @@ from ..types import (
|
|
|
15
15
|
connection_list_documents_params,
|
|
16
16
|
connection_delete_by_provider_params,
|
|
17
17
|
)
|
|
18
|
-
from .._types import
|
|
18
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
19
19
|
from .._utils import maybe_transform, async_maybe_transform
|
|
20
20
|
from .._compat import cached_property
|
|
21
21
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -61,16 +61,16 @@ class ConnectionsResource(SyncAPIResource):
|
|
|
61
61
|
self,
|
|
62
62
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
63
63
|
*,
|
|
64
|
-
container_tags:
|
|
65
|
-
document_limit: int |
|
|
66
|
-
metadata: Optional[Dict[str, Union[str, float, bool]]] |
|
|
67
|
-
redirect_url: str |
|
|
64
|
+
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
65
|
+
document_limit: int | Omit = omit,
|
|
66
|
+
metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
|
|
67
|
+
redirect_url: str | Omit = omit,
|
|
68
68
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
69
69
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
70
70
|
extra_headers: Headers | None = None,
|
|
71
71
|
extra_query: Query | None = None,
|
|
72
72
|
extra_body: Body | None = None,
|
|
73
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
73
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
74
74
|
) -> ConnectionCreateResponse:
|
|
75
75
|
"""
|
|
76
76
|
Initialize connection and get authorization URL
|
|
@@ -106,13 +106,13 @@ class ConnectionsResource(SyncAPIResource):
|
|
|
106
106
|
def list(
|
|
107
107
|
self,
|
|
108
108
|
*,
|
|
109
|
-
container_tags:
|
|
109
|
+
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
110
110
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
111
111
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
112
112
|
extra_headers: Headers | None = None,
|
|
113
113
|
extra_query: Query | None = None,
|
|
114
114
|
extra_body: Body | None = None,
|
|
115
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
115
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
116
116
|
) -> ConnectionListResponse:
|
|
117
117
|
"""
|
|
118
118
|
List all connections
|
|
@@ -146,7 +146,7 @@ class ConnectionsResource(SyncAPIResource):
|
|
|
146
146
|
extra_headers: Headers | None = None,
|
|
147
147
|
extra_query: Query | None = None,
|
|
148
148
|
extra_body: Body | None = None,
|
|
149
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
149
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
150
150
|
) -> ConnectionDeleteByIDResponse:
|
|
151
151
|
"""
|
|
152
152
|
Delete a specific connection by ID
|
|
@@ -174,13 +174,13 @@ class ConnectionsResource(SyncAPIResource):
|
|
|
174
174
|
self,
|
|
175
175
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
176
176
|
*,
|
|
177
|
-
container_tags:
|
|
177
|
+
container_tags: SequenceNotStr[str],
|
|
178
178
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
179
179
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
180
180
|
extra_headers: Headers | None = None,
|
|
181
181
|
extra_query: Query | None = None,
|
|
182
182
|
extra_body: Body | None = None,
|
|
183
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
183
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
184
184
|
) -> ConnectionDeleteByProviderResponse:
|
|
185
185
|
"""
|
|
186
186
|
Delete connection for a specific provider and container tags
|
|
@@ -219,7 +219,7 @@ class ConnectionsResource(SyncAPIResource):
|
|
|
219
219
|
extra_headers: Headers | None = None,
|
|
220
220
|
extra_query: Query | None = None,
|
|
221
221
|
extra_body: Body | None = None,
|
|
222
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
222
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
223
223
|
) -> ConnectionGetByIDResponse:
|
|
224
224
|
"""
|
|
225
225
|
Get connection details with id
|
|
@@ -247,13 +247,13 @@ class ConnectionsResource(SyncAPIResource):
|
|
|
247
247
|
self,
|
|
248
248
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
249
249
|
*,
|
|
250
|
-
container_tags:
|
|
250
|
+
container_tags: SequenceNotStr[str],
|
|
251
251
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
252
252
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
253
253
|
extra_headers: Headers | None = None,
|
|
254
254
|
extra_query: Query | None = None,
|
|
255
255
|
extra_body: Body | None = None,
|
|
256
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
256
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
257
257
|
) -> ConnectionGetByTagsResponse:
|
|
258
258
|
"""
|
|
259
259
|
Get connection details with provider and container tags
|
|
@@ -286,13 +286,13 @@ class ConnectionsResource(SyncAPIResource):
|
|
|
286
286
|
self,
|
|
287
287
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
288
288
|
*,
|
|
289
|
-
container_tags:
|
|
289
|
+
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
290
290
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
291
291
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
292
292
|
extra_headers: Headers | None = None,
|
|
293
293
|
extra_query: Query | None = None,
|
|
294
294
|
extra_body: Body | None = None,
|
|
295
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
295
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
296
296
|
) -> str:
|
|
297
297
|
"""
|
|
298
298
|
Initiate a manual sync of connections
|
|
@@ -324,13 +324,13 @@ class ConnectionsResource(SyncAPIResource):
|
|
|
324
324
|
self,
|
|
325
325
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
326
326
|
*,
|
|
327
|
-
container_tags:
|
|
327
|
+
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
328
328
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
329
329
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
330
330
|
extra_headers: Headers | None = None,
|
|
331
331
|
extra_query: Query | None = None,
|
|
332
332
|
extra_body: Body | None = None,
|
|
333
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
333
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
334
334
|
) -> ConnectionListDocumentsResponse:
|
|
335
335
|
"""
|
|
336
336
|
List documents indexed for a provider and container tags
|
|
@@ -384,16 +384,16 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
|
384
384
|
self,
|
|
385
385
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
386
386
|
*,
|
|
387
|
-
container_tags:
|
|
388
|
-
document_limit: int |
|
|
389
|
-
metadata: Optional[Dict[str, Union[str, float, bool]]] |
|
|
390
|
-
redirect_url: str |
|
|
387
|
+
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
388
|
+
document_limit: int | Omit = omit,
|
|
389
|
+
metadata: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
|
|
390
|
+
redirect_url: str | Omit = omit,
|
|
391
391
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
392
392
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
393
393
|
extra_headers: Headers | None = None,
|
|
394
394
|
extra_query: Query | None = None,
|
|
395
395
|
extra_body: Body | None = None,
|
|
396
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
396
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
397
397
|
) -> ConnectionCreateResponse:
|
|
398
398
|
"""
|
|
399
399
|
Initialize connection and get authorization URL
|
|
@@ -429,13 +429,13 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
|
429
429
|
async def list(
|
|
430
430
|
self,
|
|
431
431
|
*,
|
|
432
|
-
container_tags:
|
|
432
|
+
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
433
433
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
434
434
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
435
435
|
extra_headers: Headers | None = None,
|
|
436
436
|
extra_query: Query | None = None,
|
|
437
437
|
extra_body: Body | None = None,
|
|
438
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
438
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
439
439
|
) -> ConnectionListResponse:
|
|
440
440
|
"""
|
|
441
441
|
List all connections
|
|
@@ -471,7 +471,7 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
|
471
471
|
extra_headers: Headers | None = None,
|
|
472
472
|
extra_query: Query | None = None,
|
|
473
473
|
extra_body: Body | None = None,
|
|
474
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
474
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
475
475
|
) -> ConnectionDeleteByIDResponse:
|
|
476
476
|
"""
|
|
477
477
|
Delete a specific connection by ID
|
|
@@ -499,13 +499,13 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
|
499
499
|
self,
|
|
500
500
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
501
501
|
*,
|
|
502
|
-
container_tags:
|
|
502
|
+
container_tags: SequenceNotStr[str],
|
|
503
503
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
504
504
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
505
505
|
extra_headers: Headers | None = None,
|
|
506
506
|
extra_query: Query | None = None,
|
|
507
507
|
extra_body: Body | None = None,
|
|
508
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
508
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
509
509
|
) -> ConnectionDeleteByProviderResponse:
|
|
510
510
|
"""
|
|
511
511
|
Delete connection for a specific provider and container tags
|
|
@@ -544,7 +544,7 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
|
544
544
|
extra_headers: Headers | None = None,
|
|
545
545
|
extra_query: Query | None = None,
|
|
546
546
|
extra_body: Body | None = None,
|
|
547
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
547
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
548
548
|
) -> ConnectionGetByIDResponse:
|
|
549
549
|
"""
|
|
550
550
|
Get connection details with id
|
|
@@ -572,13 +572,13 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
|
572
572
|
self,
|
|
573
573
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
574
574
|
*,
|
|
575
|
-
container_tags:
|
|
575
|
+
container_tags: SequenceNotStr[str],
|
|
576
576
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
577
577
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
578
578
|
extra_headers: Headers | None = None,
|
|
579
579
|
extra_query: Query | None = None,
|
|
580
580
|
extra_body: Body | None = None,
|
|
581
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
581
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
582
582
|
) -> ConnectionGetByTagsResponse:
|
|
583
583
|
"""
|
|
584
584
|
Get connection details with provider and container tags
|
|
@@ -611,13 +611,13 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
|
611
611
|
self,
|
|
612
612
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
613
613
|
*,
|
|
614
|
-
container_tags:
|
|
614
|
+
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
615
615
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
616
616
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
617
617
|
extra_headers: Headers | None = None,
|
|
618
618
|
extra_query: Query | None = None,
|
|
619
619
|
extra_body: Body | None = None,
|
|
620
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
620
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
621
621
|
) -> str:
|
|
622
622
|
"""
|
|
623
623
|
Initiate a manual sync of connections
|
|
@@ -651,13 +651,13 @@ class AsyncConnectionsResource(AsyncAPIResource):
|
|
|
651
651
|
self,
|
|
652
652
|
provider: Literal["notion", "google-drive", "onedrive"],
|
|
653
653
|
*,
|
|
654
|
-
container_tags:
|
|
654
|
+
container_tags: SequenceNotStr[str] | Omit = omit,
|
|
655
655
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
656
656
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
657
657
|
extra_headers: Headers | None = None,
|
|
658
658
|
extra_query: Query | None = None,
|
|
659
659
|
extra_body: Body | None = None,
|
|
660
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
660
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
661
661
|
) -> ConnectionListDocumentsResponse:
|
|
662
662
|
"""
|
|
663
663
|
List documents indexed for a provider and container tags
|