diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b6ff6cd..93001cb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.61.0" + ".": "3.62.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8976430..ac25d3c 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-45009925f4264a8da8b85b861fdd3652359a5242d90908196b716c0ca81be719.yml -openapi_spec_hash: fdfeb51f600c434336e6aa88aff345df +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-8407ccda1aefcb2261c5d8e40e75857f6c4bd6bed8b735cde8f1d0ce3e09f7b9.yml +openapi_spec_hash: 985e35ae4dd7938b867d09be70af171d config_hash: cde97ef3188581c5f4924c633ec33ddb diff --git a/CHANGELOG.md b/CHANGELOG.md index 1125657..1894042 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.62.0 (2026-09-14) + +Full Changelog: [v3.61.0...v3.62.0](https://github.com/supermemoryai/python-sdk/compare/v3.61.0...v3.62.0) + +### Features + +* **api:** api update ([6b34d15](https://github.com/supermemoryai/python-sdk/commit/6b34d1561b825d8a08d0c922b2dcbf3b4f9522d0)) + ## 3.61.0 (2026-09-05) Full Changelog: [v3.60.0...v3.61.0](https://github.com/supermemoryai/python-sdk/compare/v3.60.0...v3.61.0) diff --git a/pyproject.toml b/pyproject.toml index 067324f..76f1c58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.61.0" +version = "3.62.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 d446533..dfb1629 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.61.0" # x-release-please-version +__version__ = "3.62.0" # x-release-please-version 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/document_get_response.py b/src/supermemory/types/document_get_response.py index 287a325..d213d30 100644 --- a/src/supermemory/types/document_get_response.py +++ b/src/supermemory/types/document_get_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Union, Optional +from datetime import datetime from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -44,6 +45,8 @@ class DocumentGetResponse(BaseModel): id: str """Unique identifier of the document.""" + active_content_update_id: Optional[str] = FieldInfo(alias="activeContentUpdateId", default=None) + connection_id: Optional[str] = FieldInfo(alias="connectionId", default=None) """Optional ID of connection the document was created from. @@ -76,6 +79,8 @@ class DocumentGetResponse(BaseModel): filepath: Optional[str] = None + latest_revision: int = FieldInfo(alias="latestRevision") + metadata: Union[str, float, bool, Dict[str, object], List[object], None] = None """Optional metadata for the document. @@ -108,6 +113,8 @@ class DocumentGetResponse(BaseModel): title: Optional[str] = None """Title of the document""" + tombstoned_at: Optional[datetime] = FieldInfo(alias="tombstonedAt", default=None) + type: Literal[ "text", "pdf", 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"