From 0686a840dfb7e4a41a09dc296d3407d95681a086 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 01:27:16 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- src/supermemory/resources/settings.py | 123 +----------------- src/supermemory/types/setting_get_response.py | 2 - .../types/setting_update_params.py | 17 +-- .../types/setting_update_response.py | 2 - tests/api_resources/test_settings.py | 84 ++---------- 6 files changed, 17 insertions(+), 215 deletions(-) diff --git a/.stats.yml b/.stats.yml index 950c937..1d1b745 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 26 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-cf7d69026df2cbada6513c26d504ea6e80ca02f898db76d1380f70132fcfb51b.yml -openapi_spec_hash: 8572004105e03a670954ef78b900663d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-1fb5800f03799e86f90b20b81f24654db100089421c7bc5ad9b6a978fbc2ac7b.yml +openapi_spec_hash: 32480891d93bdc469a2dfa900fd27386 config_hash: cde97ef3188581c5f4924c633ec33ddb diff --git a/src/supermemory/resources/settings.py b/src/supermemory/resources/settings.py index c7eebcf..d191459 100644 --- a/src/supermemory/resources/settings.py +++ b/src/supermemory/resources/settings.py @@ -3,7 +3,6 @@ from __future__ import annotations from typing import Dict, Union, Iterable, Optional -from typing_extensions import overload import httpx @@ -47,33 +46,6 @@ def with_streaming_response(self) -> SettingsResourceWithStreamingResponse: """ return SettingsResourceWithStreamingResponse(self) - @overload - def update( - self, - *, - workspace_prompt: Optional[str], - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SettingUpdateResponse: - """ - Update settings for an organization - - Args: - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - ... - - @overload def update( self, *, @@ -93,7 +65,7 @@ def update( onedrive_client_id: Optional[str] | Omit = omit, onedrive_client_secret: Optional[str] | Omit = omit, onedrive_custom_key_enabled: Optional[bool] | Omit = omit, - profile_buckets: Iterable[setting_update_params.Variant1ProfileBucket] | Omit = omit, + profile_buckets: Iterable[setting_update_params.ProfileBucket] | Omit = omit, should_llm_filter: Optional[bool] | 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. @@ -116,42 +88,10 @@ def update( timeout: Override the client-level default timeout for this request, in seconds """ - ... - - def update( - self, - *, - workspace_prompt: Optional[str] | Omit = omit, - chunk_size: Optional[int] | Omit = omit, - exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit, - filter_prompt: Optional[str] | Omit = omit, - github_client_id: Optional[str] | Omit = omit, - github_client_secret: Optional[str] | Omit = omit, - github_custom_key_enabled: Optional[bool] | Omit = omit, - google_drive_client_id: Optional[str] | Omit = omit, - google_drive_client_secret: Optional[str] | Omit = omit, - google_drive_custom_key_enabled: Optional[bool] | Omit = omit, - include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit, - notion_client_id: Optional[str] | Omit = omit, - notion_client_secret: Optional[str] | Omit = omit, - notion_custom_key_enabled: Optional[bool] | Omit = omit, - onedrive_client_id: Optional[str] | Omit = omit, - onedrive_client_secret: Optional[str] | Omit = omit, - onedrive_custom_key_enabled: Optional[bool] | Omit = omit, - profile_buckets: Iterable[setting_update_params.Variant1ProfileBucket] | Omit = omit, - should_llm_filter: Optional[bool] | 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SettingUpdateResponse: return self._patch( "/v3/settings", body=maybe_transform( { - "workspace_prompt": workspace_prompt, "chunk_size": chunk_size, "exclude_items": exclude_items, "filter_prompt": filter_prompt, @@ -221,33 +161,6 @@ def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse: """ return AsyncSettingsResourceWithStreamingResponse(self) - @overload - async def update( - self, - *, - workspace_prompt: Optional[str], - # 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SettingUpdateResponse: - """ - Update settings for an organization - - Args: - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - ... - - @overload async def update( self, *, @@ -267,7 +180,7 @@ async def update( onedrive_client_id: Optional[str] | Omit = omit, onedrive_client_secret: Optional[str] | Omit = omit, onedrive_custom_key_enabled: Optional[bool] | Omit = omit, - profile_buckets: Iterable[setting_update_params.Variant1ProfileBucket] | Omit = omit, + profile_buckets: Iterable[setting_update_params.ProfileBucket] | Omit = omit, should_llm_filter: Optional[bool] | 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. @@ -290,42 +203,10 @@ async def update( timeout: Override the client-level default timeout for this request, in seconds """ - ... - - async def update( - self, - *, - workspace_prompt: Optional[str] | Omit = omit, - chunk_size: Optional[int] | Omit = omit, - exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit, - filter_prompt: Optional[str] | Omit = omit, - github_client_id: Optional[str] | Omit = omit, - github_client_secret: Optional[str] | Omit = omit, - github_custom_key_enabled: Optional[bool] | Omit = omit, - google_drive_client_id: Optional[str] | Omit = omit, - google_drive_client_secret: Optional[str] | Omit = omit, - google_drive_custom_key_enabled: Optional[bool] | Omit = omit, - include_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | Omit = omit, - notion_client_id: Optional[str] | Omit = omit, - notion_client_secret: Optional[str] | Omit = omit, - notion_custom_key_enabled: Optional[bool] | Omit = omit, - onedrive_client_id: Optional[str] | Omit = omit, - onedrive_client_secret: Optional[str] | Omit = omit, - onedrive_custom_key_enabled: Optional[bool] | Omit = omit, - profile_buckets: Iterable[setting_update_params.Variant1ProfileBucket] | Omit = omit, - should_llm_filter: Optional[bool] | 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SettingUpdateResponse: return await self._patch( "/v3/settings", body=await async_maybe_transform( { - "workspace_prompt": workspace_prompt, "chunk_size": chunk_size, "exclude_items": exclude_items, "filter_prompt": filter_prompt, diff --git a/src/supermemory/types/setting_get_response.py b/src/supermemory/types/setting_get_response.py index 985411b..f558944 100644 --- a/src/supermemory/types/setting_get_response.py +++ b/src/supermemory/types/setting_get_response.py @@ -60,5 +60,3 @@ class SettingGetResponse(BaseModel): """Profile bucket definitions""" should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None) - - workspace_prompt: Optional[str] = FieldInfo(alias="workspacePrompt", default=None) diff --git a/src/supermemory/types/setting_update_params.py b/src/supermemory/types/setting_update_params.py index da4b820..5e9d2c9 100644 --- a/src/supermemory/types/setting_update_params.py +++ b/src/supermemory/types/setting_update_params.py @@ -3,18 +3,14 @@ from __future__ import annotations from typing import Dict, Union, Iterable, Optional -from typing_extensions import Required, Annotated, TypeAlias, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["SettingUpdateParams", "Variant0", "Variant1", "Variant1ProfileBucket"] +__all__ = ["SettingUpdateParams", "ProfileBucket"] -class Variant0(TypedDict, total=False): - workspace_prompt: Required[Annotated[Optional[str], PropertyInfo(alias="workspacePrompt")]] - - -class Variant1(TypedDict, total=False): +class SettingUpdateParams(TypedDict, total=False): chunk_size: Annotated[Optional[int], PropertyInfo(alias="chunkSize")] exclude_items: Annotated[ @@ -51,13 +47,13 @@ class Variant1(TypedDict, total=False): onedrive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="onedriveCustomKeyEnabled")] - profile_buckets: Annotated[Iterable[Variant1ProfileBucket], PropertyInfo(alias="profileBuckets")] + profile_buckets: Annotated[Iterable[ProfileBucket], PropertyInfo(alias="profileBuckets")] """Profile bucket definitions""" should_llm_filter: Annotated[Optional[bool], PropertyInfo(alias="shouldLLMFilter")] -class Variant1ProfileBucket(TypedDict, total=False): +class ProfileBucket(TypedDict, total=False): """Definition of a single profile bucket""" key: Required[str] @@ -65,6 +61,3 @@ class Variant1ProfileBucket(TypedDict, total=False): description: str """What belongs in this bucket — used to guide the ingestion classifier.""" - - -SettingUpdateParams: TypeAlias = Union[Variant0, Variant1] diff --git a/src/supermemory/types/setting_update_response.py b/src/supermemory/types/setting_update_response.py index 40e6e09..11f8080 100644 --- a/src/supermemory/types/setting_update_response.py +++ b/src/supermemory/types/setting_update_response.py @@ -61,8 +61,6 @@ class Updated(BaseModel): should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None) - workspace_prompt: Optional[str] = FieldInfo(alias="workspacePrompt", default=None) - class SettingUpdateResponse(BaseModel): org_id: str = FieldInfo(alias="orgId") diff --git a/tests/api_resources/test_settings.py b/tests/api_resources/test_settings.py index fa16498..ce41b4f 100644 --- a/tests/api_resources/test_settings.py +++ b/tests/api_resources/test_settings.py @@ -19,47 +19,13 @@ class TestSettings: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_method_update_overload_1(self, client: Supermemory) -> None: - setting = client.settings.update( - workspace_prompt="workspacePrompt", - ) - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_raw_response_update_overload_1(self, client: Supermemory) -> None: - response = client.settings.with_raw_response.update( - workspace_prompt="workspacePrompt", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - setting = response.parse() - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_streaming_response_update_overload_1(self, client: Supermemory) -> None: - with client.settings.with_streaming_response.update( - workspace_prompt="workspacePrompt", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - setting = response.parse() - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_update_overload_2(self, client: Supermemory) -> None: + def test_method_update(self, client: Supermemory) -> None: setting = client.settings.update() assert_matches_type(SettingUpdateResponse, setting, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_method_update_with_all_params_overload_2(self, client: Supermemory) -> None: + def test_method_update_with_all_params(self, client: Supermemory) -> None: setting = client.settings.update( chunk_size=-2147483648, exclude_items="string", @@ -89,7 +55,7 @@ def test_method_update_with_all_params_overload_2(self, client: Supermemory) -> @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_raw_response_update_overload_2(self, client: Supermemory) -> None: + def test_raw_response_update(self, client: Supermemory) -> None: response = client.settings.with_raw_response.update() assert response.is_closed is True @@ -99,7 +65,7 @@ def test_raw_response_update_overload_2(self, client: Supermemory) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_streaming_response_update_overload_2(self, client: Supermemory) -> None: + def test_streaming_response_update(self, client: Supermemory) -> None: with client.settings.with_streaming_response.update() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,47 +111,13 @@ class TestAsyncSettings: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_method_update_overload_1(self, async_client: AsyncSupermemory) -> None: - setting = await async_client.settings.update( - workspace_prompt="workspacePrompt", - ) - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_raw_response_update_overload_1(self, async_client: AsyncSupermemory) -> None: - response = await async_client.settings.with_raw_response.update( - workspace_prompt="workspacePrompt", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - setting = await response.parse() - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_streaming_response_update_overload_1(self, async_client: AsyncSupermemory) -> None: - async with async_client.settings.with_streaming_response.update( - workspace_prompt="workspacePrompt", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - setting = await response.parse() - assert_matches_type(SettingUpdateResponse, setting, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_update_overload_2(self, async_client: AsyncSupermemory) -> None: + async def test_method_update(self, async_client: AsyncSupermemory) -> None: setting = await async_client.settings.update() assert_matches_type(SettingUpdateResponse, setting, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_method_update_with_all_params_overload_2(self, async_client: AsyncSupermemory) -> None: + async def test_method_update_with_all_params(self, async_client: AsyncSupermemory) -> None: setting = await async_client.settings.update( chunk_size=-2147483648, exclude_items="string", @@ -215,7 +147,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_raw_response_update_overload_2(self, async_client: AsyncSupermemory) -> None: + async def test_raw_response_update(self, async_client: AsyncSupermemory) -> None: response = await async_client.settings.with_raw_response.update() assert response.is_closed is True @@ -225,7 +157,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncSupermemo @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_streaming_response_update_overload_2(self, async_client: AsyncSupermemory) -> None: + async def test_streaming_response_update(self, async_client: AsyncSupermemory) -> None: async with async_client.settings.with_streaming_response.update() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 147ddcc532fdb291ffe20dbb492f6282327bc094 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 01:27:38 +0000 Subject: [PATCH 2/2] release: 3.54.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/supermemory/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bc1874a..41f1b57 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.53.0" + ".": "3.54.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e2119ae..cad4ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.54.0 (2026-07-23) + +Full Changelog: [v3.53.0...v3.54.0](https://github.com/supermemoryai/python-sdk/compare/v3.53.0...v3.54.0) + +### Features + +* **api:** api update ([0686a84](https://github.com/supermemoryai/python-sdk/commit/0686a840dfb7e4a41a09dc296d3407d95681a086)) + ## 3.53.0 (2026-07-23) Full Changelog: [v3.52.0...v3.53.0](https://github.com/supermemoryai/python-sdk/compare/v3.52.0...v3.53.0) diff --git a/pyproject.toml b/pyproject.toml index b158d2b..fb01b96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.53.0" +version = "3.54.0" description = "The official Python library for the supermemory API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/supermemory/_version.py b/src/supermemory/_version.py index 5798c43..7d58036 100644 --- a/src/supermemory/_version.py +++ b/src/supermemory/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "supermemory" -__version__ = "3.53.0" # x-release-please-version +__version__ = "3.54.0" # x-release-please-version