Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.28.0"
".": "3.29.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 26
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-8d6903994bad6e2f9510fb021df21f84a3efa8f63abfff814455d666efa7388a.yml
openapi_spec_hash: f9e80ec52ae9aecbd23a365dc1a3932f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-7386f0fb80432ebe6e3ef86bf47b7cf59374639e4a15f63a931375220a8c9c58.yml
openapi_spec_hash: 729176c8916a6cc3b8abe57fd6cdf7c0
config_hash: f3eb5ca71172780678106f6d46f15dda
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 3.29.0 (2026-03-12)

Full Changelog: [v3.28.0...v3.29.0](https://github.com/supermemoryai/python-sdk/compare/v3.28.0...v3.29.0)

### Features

* **api:** api update ([fe80425](https://github.com/supermemoryai/python-sdk/commit/fe80425181b93862c2d544b5d5664827aa41a57a))
* **api:** api update ([de304ee](https://github.com/supermemoryai/python-sdk/commit/de304ee6d6f3938ee8f866dcca0dde26d98fb369))

## 3.28.0 (2026-03-09)

Full Changelog: [v3.27.0...v3.28.0](https://github.com/supermemoryai/python-sdk/compare/v3.27.0...v3.28.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Methods:
- <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>
- <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>
- <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>
- <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_response.py">ConnectionDeleteByIDResponse</a></code>
- <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>
- <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>
- <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>
- <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>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "3.28.0"
version = "3.29.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "supermemory"
__version__ = "3.28.0" # x-release-please-version
__version__ = "3.29.0" # x-release-please-version
23 changes: 21 additions & 2 deletions src/supermemory/resources/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
connection_configure_params,
connection_resources_params,
connection_get_by_tag_params,
connection_delete_by_id_params,
connection_list_documents_params,
connection_delete_by_provider_params,
)
Expand Down Expand Up @@ -182,6 +183,7 @@ def delete_by_id(
self,
connection_id: str,
*,
delete_documents: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -193,6 +195,8 @@ def delete_by_id(
Delete a specific connection by ID

Args:
delete_documents: Whether to also delete documents imported by this connection. Defaults to true.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -206,7 +210,13 @@ def delete_by_id(
return self._delete(
f"/v3/connections/{connection_id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{"delete_documents": delete_documents}, connection_delete_by_id_params.ConnectionDeleteByIDParams
),
),
cast_to=ConnectionDeleteByIDResponse,
)
Expand Down Expand Up @@ -591,6 +601,7 @@ async def delete_by_id(
self,
connection_id: str,
*,
delete_documents: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -602,6 +613,8 @@ async def delete_by_id(
Delete a specific connection by ID

Args:
delete_documents: Whether to also delete documents imported by this connection. Defaults to true.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -615,7 +628,13 @@ async def delete_by_id(
return await self._delete(
f"/v3/connections/{connection_id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{"delete_documents": delete_documents}, connection_delete_by_id_params.ConnectionDeleteByIDParams
),
),
cast_to=ConnectionDeleteByIDResponse,
)
Expand Down
1 change: 1 addition & 0 deletions src/supermemory/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from .document_delete_bulk_response import DocumentDeleteBulkResponse as DocumentDeleteBulkResponse
from .document_upload_file_response import DocumentUploadFileResponse as DocumentUploadFileResponse
from .memory_update_memory_response import MemoryUpdateMemoryResponse as MemoryUpdateMemoryResponse
from .connection_delete_by_id_params import ConnectionDeleteByIDParams as ConnectionDeleteByIDParams
from .connection_get_by_tag_response import ConnectionGetByTagResponse as ConnectionGetByTagResponse
from .connection_delete_by_id_response import ConnectionDeleteByIDResponse as ConnectionDeleteByIDResponse
from .connection_list_documents_params import ConnectionListDocumentsParams as ConnectionListDocumentsParams
Expand Down
14 changes: 14 additions & 0 deletions src/supermemory/types/connection_delete_by_id_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["ConnectionDeleteByIDParams"]


class ConnectionDeleteByIDParams(TypedDict, total=False):
delete_documents: Annotated[str, PropertyInfo(alias="deleteDocuments")]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The delete_documents parameter is incorrectly typed as str instead of bool. This contradicts its documented behavior and will cause type-checking and serialization errors.
Severity: MEDIUM

Suggested Fix

Change the type annotation for the delete_documents parameter from str to bool in connection_delete_by_id_params.py and any related function signatures, such as in connections.py. The type should be Annotated[bool, PropertyInfo(alias="deleteDocuments")].

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/supermemory/types/connection_delete_by_id_params.py#L13

Potential issue: The `delete_documents` parameter in `connection_delete_by_id_params.py`
is typed as `str`, but its docstring ("Whether to also delete documents... Defaults to
true.") and intended function indicate it should be a boolean. This incorrect type hint
will cause type checkers to flag correct usage (passing `True` or `False`) as an error.
Furthermore, if a user passes a Python boolean, the SDK's serialization may produce an
incorrect value (e.g., `"True"` instead of the expected `"true"`), leading to API
failures. This is inconsistent with other boolean parameters in the codebase, such as
`include_content`.

Did we get this right? 👍 / 👎 to inform future reviews.

"""Whether to also delete documents imported by this connection. Defaults to true."""
1 change: 1 addition & 0 deletions src/supermemory/types/document_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class DocumentGetResponse(BaseModel):
"google_sheet",
"image",
"video",
"audio",
"notion_doc",
"webpage",
"onedrive",
Expand Down
1 change: 1 addition & 0 deletions src/supermemory/types/document_list_processing_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Document(BaseModel):
"google_sheet",
"image",
"video",
"audio",
"notion_doc",
"webpage",
"onedrive",
Expand Down
1 change: 1 addition & 0 deletions src/supermemory/types/document_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Memory(BaseModel):
"google_sheet",
"image",
"video",
"audio",
"notion_doc",
"webpage",
"onedrive",
Expand Down
38 changes: 28 additions & 10 deletions tests/api_resources/test_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Supermemory) -> None:
connection = client.connections.create(
provider="notion",
container_tag="containerTag",
container_tags=["_1K--W2kIFj1"],
container_tags=["_:_k--W2K_1V"],
document_limit=1,
metadata={"foo": "string"},
redirect_url="redirectUrl",
Expand Down Expand Up @@ -160,15 +160,24 @@ def test_path_params_configure(self, client: Supermemory) -> None:
@parametrize
def test_method_delete_by_id(self, client: Supermemory) -> None:
connection = client.connections.delete_by_id(
"connectionId",
connection_id="connectionId",
)
assert_matches_type(ConnectionDeleteByIDResponse, connection, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_delete_by_id_with_all_params(self, client: Supermemory) -> None:
connection = client.connections.delete_by_id(
connection_id="connectionId",
delete_documents="deleteDocuments",
)
assert_matches_type(ConnectionDeleteByIDResponse, connection, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_delete_by_id(self, client: Supermemory) -> None:
response = client.connections.with_raw_response.delete_by_id(
"connectionId",
connection_id="connectionId",
)

assert response.is_closed is True
Expand All @@ -180,7 +189,7 @@ def test_raw_response_delete_by_id(self, client: Supermemory) -> None:
@parametrize
def test_streaming_response_delete_by_id(self, client: Supermemory) -> None:
with client.connections.with_streaming_response.delete_by_id(
"connectionId",
connection_id="connectionId",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -195,7 +204,7 @@ def test_streaming_response_delete_by_id(self, client: Supermemory) -> None:
def test_path_params_delete_by_id(self, client: Supermemory) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `connection_id` but received ''"):
client.connections.with_raw_response.delete_by_id(
"",
connection_id="",
)

@pytest.mark.skip(reason="Mock server tests are disabled")
Expand Down Expand Up @@ -472,7 +481,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncSupermemor
connection = await async_client.connections.create(
provider="notion",
container_tag="containerTag",
container_tags=["_1K--W2kIFj1"],
container_tags=["_:_k--W2K_1V"],
document_limit=1,
metadata={"foo": "string"},
redirect_url="redirectUrl",
Expand Down Expand Up @@ -591,15 +600,24 @@ async def test_path_params_configure(self, async_client: AsyncSupermemory) -> No
@parametrize
async def test_method_delete_by_id(self, async_client: AsyncSupermemory) -> None:
connection = await async_client.connections.delete_by_id(
"connectionId",
connection_id="connectionId",
)
assert_matches_type(ConnectionDeleteByIDResponse, connection, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_delete_by_id_with_all_params(self, async_client: AsyncSupermemory) -> None:
connection = await async_client.connections.delete_by_id(
connection_id="connectionId",
delete_documents="deleteDocuments",
)
assert_matches_type(ConnectionDeleteByIDResponse, connection, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_delete_by_id(self, async_client: AsyncSupermemory) -> None:
response = await async_client.connections.with_raw_response.delete_by_id(
"connectionId",
connection_id="connectionId",
)

assert response.is_closed is True
Expand All @@ -611,7 +629,7 @@ async def test_raw_response_delete_by_id(self, async_client: AsyncSupermemory) -
@parametrize
async def test_streaming_response_delete_by_id(self, async_client: AsyncSupermemory) -> None:
async with async_client.connections.with_streaming_response.delete_by_id(
"connectionId",
connection_id="connectionId",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -626,7 +644,7 @@ async def test_streaming_response_delete_by_id(self, async_client: AsyncSupermem
async def test_path_params_delete_by_id(self, async_client: AsyncSupermemory) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `connection_id` but received ''"):
await async_client.connections.with_raw_response.delete_by_id(
"",
connection_id="",
)

@pytest.mark.skip(reason="Mock server tests are disabled")
Expand Down