Skip to content

Commit f58d93d

Browse files
feat(api): api update
1 parent e95b77e commit f58d93d

File tree

6 files changed

+8
-72
lines changed

6 files changed

+8
-72
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 12
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-6d14bb475452b9220ee0f563688b6d5e7070e32def30bfc2716cdd90b50de943.yml
3-
openapi_spec_hash: 6cf7bf30ba6361c7fbc7639fee70437f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-b60a3e75b9b6d64bb82b80cbf544f414f618a4c7f881220d8d8accd77b117e44.yml
3+
openapi_spec_hash: 84d972259e24260e09ec3c07612c55ed
44
config_hash: 8477e3ee6fd596ab6ac911d052e4de79

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ from supermemory.types import (
6161
Methods:
6262

6363
- <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>
64-
- <code title="get /v3/connections">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>
64+
- <code title="get /v3/connections">client.connections.<a href="./src/supermemory/resources/connections.py">list</a>() -> <a href="./src/supermemory/types/connection_list_response.py">ConnectionListResponse</a></code>
6565
- <code title="get /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory/resources/connections.py">get</a>(connection_id) -> <a href="./src/supermemory/types/connection_get_response.py">ConnectionGetResponse</a></code>

src/supermemory/resources/connections.py

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from ..types import connection_list_params, connection_create_params
10+
from ..types import connection_create_params
1111
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1212
from .._utils import maybe_transform, async_maybe_transform
1313
from .._compat import cached_property
@@ -93,34 +93,18 @@ def create(
9393
def list(
9494
self,
9595
*,
96-
end_user_id: str | NotGiven = NOT_GIVEN,
9796
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9897
# The extra values given here take precedence over values defined on the client or passed to this method.
9998
extra_headers: Headers | None = None,
10099
extra_query: Query | None = None,
101100
extra_body: Body | None = None,
102101
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
103102
) -> ConnectionListResponse:
104-
"""
105-
List all connections
106-
107-
Args:
108-
extra_headers: Send extra headers
109-
110-
extra_query: Add additional query parameters to the request
111-
112-
extra_body: Add additional JSON properties to the request
113-
114-
timeout: Override the client-level default timeout for this request, in seconds
115-
"""
103+
"""List all connections"""
116104
return self._get(
117105
"/v3/connections",
118106
options=make_request_options(
119-
extra_headers=extra_headers,
120-
extra_query=extra_query,
121-
extra_body=extra_body,
122-
timeout=timeout,
123-
query=maybe_transform({"end_user_id": end_user_id}, connection_list_params.ConnectionListParams),
107+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
124108
),
125109
cast_to=ConnectionListResponse,
126110
)
@@ -226,36 +210,18 @@ async def create(
226210
async def list(
227211
self,
228212
*,
229-
end_user_id: str | NotGiven = NOT_GIVEN,
230213
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
231214
# The extra values given here take precedence over values defined on the client or passed to this method.
232215
extra_headers: Headers | None = None,
233216
extra_query: Query | None = None,
234217
extra_body: Body | None = None,
235218
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
236219
) -> ConnectionListResponse:
237-
"""
238-
List all connections
239-
240-
Args:
241-
extra_headers: Send extra headers
242-
243-
extra_query: Add additional query parameters to the request
244-
245-
extra_body: Add additional JSON properties to the request
246-
247-
timeout: Override the client-level default timeout for this request, in seconds
248-
"""
220+
"""List all connections"""
249221
return await self._get(
250222
"/v3/connections",
251223
options=make_request_options(
252-
extra_headers=extra_headers,
253-
extra_query=extra_query,
254-
extra_body=extra_body,
255-
timeout=timeout,
256-
query=await async_maybe_transform(
257-
{"end_user_id": end_user_id}, connection_list_params.ConnectionListParams
258-
),
224+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
259225
),
260226
cast_to=ConnectionListResponse,
261227
)

src/supermemory/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from .setting_get_response import SettingGetResponse as SettingGetResponse
1212
from .search_execute_params import SearchExecuteParams as SearchExecuteParams
1313
from .setting_update_params import SettingUpdateParams as SettingUpdateParams
14-
from .connection_list_params import ConnectionListParams as ConnectionListParams
1514
from .memory_update_response import MemoryUpdateResponse as MemoryUpdateResponse
1615
from .connection_get_response import ConnectionGetResponse as ConnectionGetResponse
1716
from .search_execute_response import SearchExecuteResponse as SearchExecuteResponse

src/supermemory/types/connection_list_params.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/api_resources/test_connections.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ def test_method_list(self, client: Supermemory) -> None:
7272
connection = client.connections.list()
7373
assert_matches_type(ConnectionListResponse, connection, path=["response"])
7474

75-
@pytest.mark.skip()
76-
@parametrize
77-
def test_method_list_with_all_params(self, client: Supermemory) -> None:
78-
connection = client.connections.list(
79-
end_user_id="endUserId",
80-
)
81-
assert_matches_type(ConnectionListResponse, connection, path=["response"])
82-
8375
@pytest.mark.skip()
8476
@parametrize
8577
def test_raw_response_list(self, client: Supermemory) -> None:
@@ -199,14 +191,6 @@ async def test_method_list(self, async_client: AsyncSupermemory) -> None:
199191
connection = await async_client.connections.list()
200192
assert_matches_type(ConnectionListResponse, connection, path=["response"])
201193

202-
@pytest.mark.skip()
203-
@parametrize
204-
async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) -> None:
205-
connection = await async_client.connections.list(
206-
end_user_id="endUserId",
207-
)
208-
assert_matches_type(ConnectionListResponse, connection, path=["response"])
209-
210194
@pytest.mark.skip()
211195
@parametrize
212196
async def test_raw_response_list(self, async_client: AsyncSupermemory) -> None:

0 commit comments

Comments
 (0)