diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bdc23ae..22674f5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.55.0" + ".": "3.56.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9f7a948..e4a02d5 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-c207a10df858199c6d25fe82831d18c2fbe4861495050be62d7d8cef3b918d84.yml -openapi_spec_hash: d26ff44dda96d7aff0801873c1ce9534 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-25331f39259c2fda7a617655e01098b23d57e32d668de083fec03546689caa19.yml +openapi_spec_hash: 3a56514128e9dbe7307d7adf338afbe5 config_hash: cde97ef3188581c5f4924c633ec33ddb diff --git a/CHANGELOG.md b/CHANGELOG.md index c120e6a..94d0c17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.56.0 (2026-07-24) + +Full Changelog: [v3.55.0...v3.56.0](https://github.com/supermemoryai/python-sdk/compare/v3.55.0...v3.56.0) + +### Features + +* **api:** api update ([d04a39c](https://github.com/supermemoryai/python-sdk/commit/d04a39c5b163af7e0297417d47bd917d45231751)) + ## 3.55.0 (2026-07-24) Full Changelog: [v3.54.0...v3.55.0](https://github.com/supermemoryai/python-sdk/compare/v3.54.0...v3.55.0) diff --git a/pyproject.toml b/pyproject.toml index a541ceb..31a9065 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.55.0" +version = "3.56.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 2cd3e96..535e778 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.55.0" # x-release-please-version +__version__ = "3.56.0" # x-release-please-version diff --git a/src/supermemory/resources/settings.py b/src/supermemory/resources/settings.py index d191459..c7eebcf 100644 --- a/src/supermemory/resources/settings.py +++ b/src/supermemory/resources/settings.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import Dict, Union, Iterable, Optional +from typing_extensions import overload import httpx @@ -46,6 +47,33 @@ 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, *, @@ -65,7 +93,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.ProfileBucket] | 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. @@ -88,10 +116,42 @@ 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, @@ -161,6 +221,33 @@ 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, *, @@ -180,7 +267,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.ProfileBucket] | 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. @@ -203,10 +290,42 @@ 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 f558944..985411b 100644 --- a/src/supermemory/types/setting_get_response.py +++ b/src/supermemory/types/setting_get_response.py @@ -60,3 +60,5 @@ 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 5e9d2c9..da4b820 100644 --- a/src/supermemory/types/setting_update_params.py +++ b/src/supermemory/types/setting_update_params.py @@ -3,14 +3,18 @@ from __future__ import annotations from typing import Dict, Union, Iterable, Optional -from typing_extensions import Required, Annotated, TypedDict +from typing_extensions import Required, Annotated, TypeAlias, TypedDict from .._utils import PropertyInfo -__all__ = ["SettingUpdateParams", "ProfileBucket"] +__all__ = ["SettingUpdateParams", "Variant0", "Variant1", "Variant1ProfileBucket"] -class SettingUpdateParams(TypedDict, total=False): +class Variant0(TypedDict, total=False): + workspace_prompt: Required[Annotated[Optional[str], PropertyInfo(alias="workspacePrompt")]] + + +class Variant1(TypedDict, total=False): chunk_size: Annotated[Optional[int], PropertyInfo(alias="chunkSize")] exclude_items: Annotated[ @@ -47,13 +51,13 @@ class SettingUpdateParams(TypedDict, total=False): onedrive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="onedriveCustomKeyEnabled")] - profile_buckets: Annotated[Iterable[ProfileBucket], PropertyInfo(alias="profileBuckets")] + profile_buckets: Annotated[Iterable[Variant1ProfileBucket], PropertyInfo(alias="profileBuckets")] """Profile bucket definitions""" should_llm_filter: Annotated[Optional[bool], PropertyInfo(alias="shouldLLMFilter")] -class ProfileBucket(TypedDict, total=False): +class Variant1ProfileBucket(TypedDict, total=False): """Definition of a single profile bucket""" key: Required[str] @@ -61,3 +65,6 @@ class ProfileBucket(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 11f8080..40e6e09 100644 --- a/src/supermemory/types/setting_update_response.py +++ b/src/supermemory/types/setting_update_response.py @@ -61,6 +61,8 @@ 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 ce41b4f..fa16498 100644 --- a/tests/api_resources/test_settings.py +++ b/tests/api_resources/test_settings.py @@ -19,13 +19,47 @@ class TestSettings: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_method_update(self, client: Supermemory) -> None: + 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: 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(self, client: Supermemory) -> None: + def test_method_update_with_all_params_overload_2(self, client: Supermemory) -> None: setting = client.settings.update( chunk_size=-2147483648, exclude_items="string", @@ -55,7 +89,7 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_raw_response_update(self, client: Supermemory) -> None: + def test_raw_response_update_overload_2(self, client: Supermemory) -> None: response = client.settings.with_raw_response.update() assert response.is_closed is True @@ -65,7 +99,7 @@ def test_raw_response_update(self, client: Supermemory) -> None: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - def test_streaming_response_update(self, client: Supermemory) -> None: + def test_streaming_response_update_overload_2(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" @@ -111,13 +145,47 @@ class TestAsyncSettings: @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_method_update(self, async_client: AsyncSupermemory) -> None: + 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: 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(self, async_client: AsyncSupermemory) -> None: + async def test_method_update_with_all_params_overload_2(self, async_client: AsyncSupermemory) -> None: setting = await async_client.settings.update( chunk_size=-2147483648, exclude_items="string", @@ -147,7 +215,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_raw_response_update(self, async_client: AsyncSupermemory) -> None: + async def test_raw_response_update_overload_2(self, async_client: AsyncSupermemory) -> None: response = await async_client.settings.with_raw_response.update() assert response.is_closed is True @@ -157,7 +225,7 @@ async def test_raw_response_update(self, async_client: AsyncSupermemory) -> None @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize - async def test_streaming_response_update(self, async_client: AsyncSupermemory) -> None: + async def test_streaming_response_update_overload_2(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"