Skip to content

Commit 36a55ee

Browse files
feat(api): api update
1 parent 335432d commit 36a55ee

26 files changed

Lines changed: 2377 additions & 4 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 16
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-0b058be57286eb780b0da0790aa595e5c370d833bbf6c2b16854bc7122c623f1.yml
3-
openapi_spec_hash: d95cfa175546e781b11889263b259378
1+
configured_endpoints: 26
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-cb64e01550fb988a58095de96451432deff2ab195b1381b50595a0dd15d6d64d.yml
3+
openapi_spec_hash: d915b2e4ec955bd600a43eeb5603965f
44
config_hash: cde97ef3188581c5f4924c633ec33ddb

api.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,35 @@ Methods:
7979

8080
- <code title="patch /v3/settings">client.settings.<a href="./src/supermemory/resources/settings.py">update</a>(\*\*<a href="src/supermemory/types/setting_update_params.py">params</a>) -> <a href="./src/supermemory/types/setting_update_response.py">SettingUpdateResponse</a></code>
8181
- <code title="get /v3/settings">client.settings.<a href="./src/supermemory/resources/settings.py">get</a>() -> <a href="./src/supermemory/types/setting_get_response.py">SettingGetResponse</a></code>
82+
83+
# Connections
84+
85+
Types:
86+
87+
```python
88+
from supermemory.types import (
89+
ConnectionCreateResponse,
90+
ConnectionListResponse,
91+
ConnectionConfigureResponse,
92+
ConnectionDeleteByIDResponse,
93+
ConnectionDeleteByProviderResponse,
94+
ConnectionGetByIDResponse,
95+
ConnectionGetByTagResponse,
96+
ConnectionImportResponse,
97+
ConnectionListDocumentsResponse,
98+
ConnectionResourcesResponse,
99+
)
100+
```
101+
102+
Methods:
103+
104+
- <code title="post /v3/connections/{provider}">client.connections.<a href="./src/supermemory/resources/connections.py">create</a>(provider, \*\*<a href="src/supermemory/types/connection_create_params.py">params</a>) -> <a href="./src/supermemory/types/connection_create_response.py">ConnectionCreateResponse</a></code>
105+
- <code title="post /v3/connections/list">client.connections.<a href="./src/supermemory/resources/connections.py">list</a>(\*\*<a href="src/supermemory/types/connection_list_params.py">params</a>) -> <a href="./src/supermemory/types/connection_list_response.py">ConnectionListResponse</a></code>
106+
- <code title="post /v3/connections/{connectionId}/configure">client.connections.<a href="./src/supermemory/resources/connections.py">configure</a>(connection_id, \*\*<a href="src/supermemory/types/connection_configure_params.py">params</a>) -> <a href="./src/supermemory/types/connection_configure_response.py">ConnectionConfigureResponse</a></code>
107+
- <code title="delete /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory/resources/connections.py">delete_by_id</a>(connection_id, \*\*<a href="src/supermemory/types/connection_delete_by_id_params.py">params</a>) -> <a href="./src/supermemory/types/connection_delete_by_id_response.py">ConnectionDeleteByIDResponse</a></code>
108+
- <code title="delete /v3/connections/{provider}">client.connections.<a href="./src/supermemory/resources/connections.py">delete_by_provider</a>(provider, \*\*<a href="src/supermemory/types/connection_delete_by_provider_params.py">params</a>) -> <a href="./src/supermemory/types/connection_delete_by_provider_response.py">ConnectionDeleteByProviderResponse</a></code>
109+
- <code title="get /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory/resources/connections.py">get_by_id</a>(connection_id) -> <a href="./src/supermemory/types/connection_get_by_id_response.py">ConnectionGetByIDResponse</a></code>
110+
- <code title="post /v3/connections/{provider}/connection">client.connections.<a href="./src/supermemory/resources/connections.py">get_by_tag</a>(provider, \*\*<a href="src/supermemory/types/connection_get_by_tag_params.py">params</a>) -> <a href="./src/supermemory/types/connection_get_by_tag_response.py">ConnectionGetByTagResponse</a></code>
111+
- <code title="post /v3/connections/{provider}/import">client.connections.<a href="./src/supermemory/resources/connections.py">import\_</a>(provider, \*\*<a href="src/supermemory/types/connection_import_params.py">params</a>) -> str</code>
112+
- <code title="post /v3/connections/{provider}/documents">client.connections.<a href="./src/supermemory/resources/connections.py">list_documents</a>(provider, \*\*<a href="src/supermemory/types/connection_list_documents_params.py">params</a>) -> <a href="./src/supermemory/types/connection_list_documents_response.py">ConnectionListDocumentsResponse</a></code>
113+
- <code title="get /v3/connections/{connectionId}/resources">client.connections.<a href="./src/supermemory/resources/connections.py">resources</a>(connection_id, \*\*<a href="src/supermemory/types/connection_resources_params.py">params</a>) -> <a href="./src/supermemory/types/connection_resources_response.py">ConnectionResourcesResponse</a></code>

src/supermemory/_client.py

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@
5252
from .types.profile_response import ProfileResponse
5353

5454
if TYPE_CHECKING:
55-
from .resources import search, memories, settings, documents
55+
from .resources import search, memories, settings, documents, connections
5656
from .resources.search import SearchResource, AsyncSearchResource
5757
from .resources.memories import MemoriesResource, AsyncMemoriesResource
5858
from .resources.settings import SettingsResource, AsyncSettingsResource
5959
from .resources.documents import DocumentsResource, AsyncDocumentsResource
60+
from .resources.connections import ConnectionsResource, AsyncConnectionsResource
6061

6162
__all__ = [
6263
"Timeout",
@@ -160,6 +161,13 @@ def settings(self) -> SettingsResource:
160161

161162
return SettingsResource(self)
162163

164+
@cached_property
165+
def connections(self) -> ConnectionsResource:
166+
"""External service integrations"""
167+
from .resources.connections import ConnectionsResource
168+
169+
return ConnectionsResource(self)
170+
163171
@cached_property
164172
def with_raw_response(self) -> SupermemoryWithRawResponse:
165173
return SupermemoryWithRawResponse(self)
@@ -510,6 +518,13 @@ def settings(self) -> AsyncSettingsResource:
510518

511519
return AsyncSettingsResource(self)
512520

521+
@cached_property
522+
def connections(self) -> AsyncConnectionsResource:
523+
"""External service integrations"""
524+
from .resources.connections import AsyncConnectionsResource
525+
526+
return AsyncConnectionsResource(self)
527+
513528
@cached_property
514529
def with_raw_response(self) -> AsyncSupermemoryWithRawResponse:
515530
return AsyncSupermemoryWithRawResponse(self)
@@ -809,6 +824,13 @@ def settings(self) -> settings.SettingsResourceWithRawResponse:
809824

810825
return SettingsResourceWithRawResponse(self._client.settings)
811826

827+
@cached_property
828+
def connections(self) -> connections.ConnectionsResourceWithRawResponse:
829+
"""External service integrations"""
830+
from .resources.connections import ConnectionsResourceWithRawResponse
831+
832+
return ConnectionsResourceWithRawResponse(self._client.connections)
833+
812834

813835
class AsyncSupermemoryWithRawResponse:
814836
_client: AsyncSupermemory
@@ -849,6 +871,13 @@ def settings(self) -> settings.AsyncSettingsResourceWithRawResponse:
849871

850872
return AsyncSettingsResourceWithRawResponse(self._client.settings)
851873

874+
@cached_property
875+
def connections(self) -> connections.AsyncConnectionsResourceWithRawResponse:
876+
"""External service integrations"""
877+
from .resources.connections import AsyncConnectionsResourceWithRawResponse
878+
879+
return AsyncConnectionsResourceWithRawResponse(self._client.connections)
880+
852881

853882
class SupermemoryWithStreamedResponse:
854883
_client: Supermemory
@@ -889,6 +918,13 @@ def settings(self) -> settings.SettingsResourceWithStreamingResponse:
889918

890919
return SettingsResourceWithStreamingResponse(self._client.settings)
891920

921+
@cached_property
922+
def connections(self) -> connections.ConnectionsResourceWithStreamingResponse:
923+
"""External service integrations"""
924+
from .resources.connections import ConnectionsResourceWithStreamingResponse
925+
926+
return ConnectionsResourceWithStreamingResponse(self._client.connections)
927+
892928

893929
class AsyncSupermemoryWithStreamedResponse:
894930
_client: AsyncSupermemory
@@ -929,6 +965,13 @@ def settings(self) -> settings.AsyncSettingsResourceWithStreamingResponse:
929965

930966
return AsyncSettingsResourceWithStreamingResponse(self._client.settings)
931967

968+
@cached_property
969+
def connections(self) -> connections.AsyncConnectionsResourceWithStreamingResponse:
970+
"""External service integrations"""
971+
from .resources.connections import AsyncConnectionsResourceWithStreamingResponse
972+
973+
return AsyncConnectionsResourceWithStreamingResponse(self._client.connections)
974+
932975

933976
Client = Supermemory
934977

src/supermemory/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@
3232
DocumentsResourceWithStreamingResponse,
3333
AsyncDocumentsResourceWithStreamingResponse,
3434
)
35+
from .connections import (
36+
ConnectionsResource,
37+
AsyncConnectionsResource,
38+
ConnectionsResourceWithRawResponse,
39+
AsyncConnectionsResourceWithRawResponse,
40+
ConnectionsResourceWithStreamingResponse,
41+
AsyncConnectionsResourceWithStreamingResponse,
42+
)
3543

3644
__all__ = [
3745
"MemoriesResource",
@@ -58,4 +66,10 @@
5866
"AsyncSettingsResourceWithRawResponse",
5967
"SettingsResourceWithStreamingResponse",
6068
"AsyncSettingsResourceWithStreamingResponse",
69+
"ConnectionsResource",
70+
"AsyncConnectionsResource",
71+
"ConnectionsResourceWithRawResponse",
72+
"AsyncConnectionsResourceWithRawResponse",
73+
"ConnectionsResourceWithStreamingResponse",
74+
"AsyncConnectionsResourceWithStreamingResponse",
6175
]

0 commit comments

Comments
 (0)