From 71bae2938f3c523b3bb5f814e96937f067f454f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 21 Sep 2025 03:39:17 +0000 Subject: [PATCH 1/9] feat(api): manual updates --- .stats.yml | 2 +- api.md | 6 ++ src/supermemory/types/__init__.py | 1 + src/supermemory/types/document_list_params.py | 77 ++---------------- src/supermemory/types/memory_list_params.py | 77 ++---------------- .../types/search_documents_params.py | 75 ++---------------- .../types/search_execute_params.py | 75 ++---------------- .../types/search_memories_params.py | 78 ++----------------- src/supermemory/types/shared/__init__.py | 4 + src/supermemory/types/shared/and_.py | 13 ++++ src/supermemory/types/shared/or_.py | 13 ++++ .../types/shared_params/__init__.py | 4 + src/supermemory/types/shared_params/and_.py | 14 ++++ src/supermemory/types/shared_params/or_.py | 14 ++++ 14 files changed, 98 insertions(+), 355 deletions(-) create mode 100644 src/supermemory/types/shared/__init__.py create mode 100644 src/supermemory/types/shared/and_.py create mode 100644 src/supermemory/types/shared/or_.py create mode 100644 src/supermemory/types/shared_params/__init__.py create mode 100644 src/supermemory/types/shared_params/and_.py create mode 100644 src/supermemory/types/shared_params/or_.py diff --git a/.stats.yml b/.stats.yml index b195b45e..7c15ce37 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-0606bdf6929173c39cecc0ce0da252d509a38fbc98e7b8ddd64bdee5812625b9.yml openapi_spec_hash: c6c376e6d59b3c01e38559a2a74b075e -config_hash: 5deef1e3a49e3a7816348fbf7ba259bf +config_hash: a478b24249ee4f53abfb5787ca4daf8b diff --git a/api.md b/api.md index 7aa6afa9..4451d8b1 100644 --- a/api.md +++ b/api.md @@ -1,3 +1,9 @@ +# Shared Types + +```python +from supermemory.types import And, Or +``` + # Memories Types: diff --git a/src/supermemory/types/__init__.py b/src/supermemory/types/__init__.py index beace710..54bc0e85 100644 --- a/src/supermemory/types/__init__.py +++ b/src/supermemory/types/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .shared import Or as Or, And as And from .memory_add_params import MemoryAddParams as MemoryAddParams from .memory_list_params import MemoryListParams as MemoryListParams from .document_add_params import DocumentAddParams as DocumentAddParams diff --git a/src/supermemory/types/document_list_params.py b/src/supermemory/types/document_list_params.py index 4ce7914e..f48c76f1 100644 --- a/src/supermemory/types/document_list_params.py +++ b/src/supermemory/types/document_list_params.py @@ -2,26 +2,15 @@ from __future__ import annotations -from typing import Union, Iterable -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing import Union +from typing_extensions import Literal, Annotated, TypeAlias, TypedDict from .._types import SequenceNotStr from .._utils import PropertyInfo +from .shared_params.or_ import Or +from .shared_params.and_ import And -__all__ = [ - "DocumentListParams", - "Filters", - "FiltersOr", - "FiltersOrOr", - "FiltersOrOrUnionMember0", - "FiltersOrOrOr", - "FiltersOrOrAnd", - "FiltersAnd", - "FiltersAndAnd", - "FiltersAndAndUnionMember0", - "FiltersAndAndOr", - "FiltersAndAndAnd", -] +__all__ = ["DocumentListParams", "Filters"] class DocumentListParams(TypedDict, total=False): @@ -54,58 +43,4 @@ class DocumentListParams(TypedDict, total=False): """Field to sort by""" -class FiltersOrOrUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersOrOrOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersOrOrAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersOrOr: TypeAlias = Union[FiltersOrOrUnionMember0, FiltersOrOrOr, FiltersOrOrAnd] - - -class FiltersOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]] - - -class FiltersAndAndUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersAndAndOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersAndAndAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersAndAnd: TypeAlias = Union[FiltersAndAndUnionMember0, FiltersAndAndOr, FiltersAndAndAnd] - - -class FiltersAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]] - - -Filters: TypeAlias = Union[FiltersOr, FiltersAnd] +Filters: TypeAlias = Union[Or, And] diff --git a/src/supermemory/types/memory_list_params.py b/src/supermemory/types/memory_list_params.py index 636663ff..07eb8d9a 100644 --- a/src/supermemory/types/memory_list_params.py +++ b/src/supermemory/types/memory_list_params.py @@ -2,26 +2,15 @@ from __future__ import annotations -from typing import Union, Iterable -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing import Union +from typing_extensions import Literal, Annotated, TypeAlias, TypedDict from .._types import SequenceNotStr from .._utils import PropertyInfo +from .shared_params.or_ import Or +from .shared_params.and_ import And -__all__ = [ - "MemoryListParams", - "Filters", - "FiltersOr", - "FiltersOrOr", - "FiltersOrOrUnionMember0", - "FiltersOrOrOr", - "FiltersOrOrAnd", - "FiltersAnd", - "FiltersAndAnd", - "FiltersAndAndUnionMember0", - "FiltersAndAndOr", - "FiltersAndAndAnd", -] +__all__ = ["MemoryListParams", "Filters"] class MemoryListParams(TypedDict, total=False): @@ -54,58 +43,4 @@ class MemoryListParams(TypedDict, total=False): """Field to sort by""" -class FiltersOrOrUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersOrOrOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersOrOrAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersOrOr: TypeAlias = Union[FiltersOrOrUnionMember0, FiltersOrOrOr, FiltersOrOrAnd] - - -class FiltersOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]] - - -class FiltersAndAndUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersAndAndOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersAndAndAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersAndAnd: TypeAlias = Union[FiltersAndAndUnionMember0, FiltersAndAndOr, FiltersAndAndAnd] - - -class FiltersAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]] - - -Filters: TypeAlias = Union[FiltersOr, FiltersAnd] +Filters: TypeAlias = Union[Or, And] diff --git a/src/supermemory/types/search_documents_params.py b/src/supermemory/types/search_documents_params.py index a621bdaa..3d397423 100644 --- a/src/supermemory/types/search_documents_params.py +++ b/src/supermemory/types/search_documents_params.py @@ -2,26 +2,15 @@ from __future__ import annotations -from typing import List, Union, Iterable +from typing import List, Union from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict from .._types import SequenceNotStr from .._utils import PropertyInfo +from .shared_params.or_ import Or +from .shared_params.and_ import And -__all__ = [ - "SearchDocumentsParams", - "Filters", - "FiltersOr", - "FiltersOrOr", - "FiltersOrOrUnionMember0", - "FiltersOrOrOr", - "FiltersOrOrAnd", - "FiltersAnd", - "FiltersAndAnd", - "FiltersAndAndUnionMember0", - "FiltersAndAndOr", - "FiltersAndAndAnd", -] +__all__ = ["SearchDocumentsParams", "Filters"] class SearchDocumentsParams(TypedDict, total=False): @@ -98,58 +87,4 @@ class SearchDocumentsParams(TypedDict, total=False): """ -class FiltersOrOrUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersOrOrOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersOrOrAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersOrOr: TypeAlias = Union[FiltersOrOrUnionMember0, FiltersOrOrOr, FiltersOrOrAnd] - - -class FiltersOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]] - - -class FiltersAndAndUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersAndAndOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersAndAndAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersAndAnd: TypeAlias = Union[FiltersAndAndUnionMember0, FiltersAndAndOr, FiltersAndAndAnd] - - -class FiltersAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]] - - -Filters: TypeAlias = Union[FiltersOr, FiltersAnd] +Filters: TypeAlias = Union[Or, And] diff --git a/src/supermemory/types/search_execute_params.py b/src/supermemory/types/search_execute_params.py index 67d9d87b..c4fe69b8 100644 --- a/src/supermemory/types/search_execute_params.py +++ b/src/supermemory/types/search_execute_params.py @@ -2,26 +2,15 @@ from __future__ import annotations -from typing import List, Union, Iterable +from typing import List, Union from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict from .._types import SequenceNotStr from .._utils import PropertyInfo +from .shared_params.or_ import Or +from .shared_params.and_ import And -__all__ = [ - "SearchExecuteParams", - "Filters", - "FiltersOr", - "FiltersOrOr", - "FiltersOrOrUnionMember0", - "FiltersOrOrOr", - "FiltersOrOrAnd", - "FiltersAnd", - "FiltersAndAnd", - "FiltersAndAndUnionMember0", - "FiltersAndAndOr", - "FiltersAndAndAnd", -] +__all__ = ["SearchExecuteParams", "Filters"] class SearchExecuteParams(TypedDict, total=False): @@ -98,58 +87,4 @@ class SearchExecuteParams(TypedDict, total=False): """ -class FiltersOrOrUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersOrOrOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersOrOrAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersOrOr: TypeAlias = Union[FiltersOrOrUnionMember0, FiltersOrOrOr, FiltersOrOrAnd] - - -class FiltersOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]] - - -class FiltersAndAndUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersAndAndOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersAndAndAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersAndAnd: TypeAlias = Union[FiltersAndAndUnionMember0, FiltersAndAndOr, FiltersAndAndAnd] - - -class FiltersAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]] - - -Filters: TypeAlias = Union[FiltersOr, FiltersAnd] +Filters: TypeAlias = Union[Or, And] diff --git a/src/supermemory/types/search_memories_params.py b/src/supermemory/types/search_memories_params.py index 5751cd34..cca09bc1 100644 --- a/src/supermemory/types/search_memories_params.py +++ b/src/supermemory/types/search_memories_params.py @@ -2,26 +2,14 @@ from __future__ import annotations -from typing import Union, Iterable -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing import Union +from typing_extensions import Required, Annotated, TypeAlias, TypedDict from .._utils import PropertyInfo +from .shared_params.or_ import Or +from .shared_params.and_ import And -__all__ = [ - "SearchMemoriesParams", - "Filters", - "FiltersOr", - "FiltersOrOr", - "FiltersOrOrUnionMember0", - "FiltersOrOrOr", - "FiltersOrOrAnd", - "FiltersAnd", - "FiltersAndAnd", - "FiltersAndAndUnionMember0", - "FiltersAndAndOr", - "FiltersAndAndAnd", - "Include", -] +__all__ = ["SearchMemoriesParams", "Filters", "Include"] class SearchMemoriesParams(TypedDict, total=False): @@ -63,61 +51,7 @@ class SearchMemoriesParams(TypedDict, total=False): """ -class FiltersOrOrUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersOrOrOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersOrOrAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersOrOr: TypeAlias = Union[FiltersOrOrUnionMember0, FiltersOrOrOr, FiltersOrOrAnd] - - -class FiltersOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]] - - -class FiltersAndAndUnionMember0(TypedDict, total=False): - key: Required[str] - - value: Required[str] - - filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")] - - negate: Union[bool, Literal["true", "false"]] - - numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")] - - -class FiltersAndAndOr(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] - - -class FiltersAndAndAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] - - -FiltersAndAnd: TypeAlias = Union[FiltersAndAndUnionMember0, FiltersAndAndOr, FiltersAndAndAnd] - - -class FiltersAnd(TypedDict, total=False): - and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]] - - -Filters: TypeAlias = Union[FiltersOr, FiltersAnd] +Filters: TypeAlias = Union[Or, And] class Include(TypedDict, total=False): diff --git a/src/supermemory/types/shared/__init__.py b/src/supermemory/types/shared/__init__.py new file mode 100644 index 00000000..96ecf13e --- /dev/null +++ b/src/supermemory/types/shared/__init__.py @@ -0,0 +1,4 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .or_ import Or as Or +from .and_ import And as And diff --git a/src/supermemory/types/shared/and_.py b/src/supermemory/types/shared/and_.py new file mode 100644 index 00000000..9b80ae49 --- /dev/null +++ b/src/supermemory/types/shared/and_.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["And"] + + +class And(BaseModel): + and_: List[And] = FieldInfo(alias="AND") diff --git a/src/supermemory/types/shared/or_.py b/src/supermemory/types/shared/or_.py new file mode 100644 index 00000000..693eab48 --- /dev/null +++ b/src/supermemory/types/shared/or_.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["Or"] + + +class Or(BaseModel): + or_: List[Or] = FieldInfo(alias="OR") diff --git a/src/supermemory/types/shared_params/__init__.py b/src/supermemory/types/shared_params/__init__.py new file mode 100644 index 00000000..96ecf13e --- /dev/null +++ b/src/supermemory/types/shared_params/__init__.py @@ -0,0 +1,4 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .or_ import Or as Or +from .and_ import And as And diff --git a/src/supermemory/types/shared_params/and_.py b/src/supermemory/types/shared_params/and_.py new file mode 100644 index 00000000..6aa3768c --- /dev/null +++ b/src/supermemory/types/shared_params/and_.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["And"] + + +class And(TypedDict, total=False): + and_: Required[Annotated[Iterable[And], PropertyInfo(alias="AND")]] diff --git a/src/supermemory/types/shared_params/or_.py b/src/supermemory/types/shared_params/or_.py new file mode 100644 index 00000000..d0947a89 --- /dev/null +++ b/src/supermemory/types/shared_params/or_.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["Or"] + + +class Or(TypedDict, total=False): + or_: Required[Annotated[Iterable[Or], PropertyInfo(alias="OR")]] From 2a12ab834b2748eb30a6bad5ea6ce6e53644334e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 21 Sep 2025 09:22:16 +0000 Subject: [PATCH 2/9] feat(api): api update --- .stats.yml | 4 ++-- src/supermemory/resources/documents.py | 10 ++++++---- src/supermemory/resources/memories.py | 10 ++++++---- src/supermemory/types/document_upload_file_params.py | 7 ++++--- src/supermemory/types/memory_upload_file_params.py | 7 ++++--- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7c15ce37..23dba171 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-0606bdf6929173c39cecc0ce0da252d509a38fbc98e7b8ddd64bdee5812625b9.yml -openapi_spec_hash: c6c376e6d59b3c01e38559a2a74b075e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-d93857d410b13512999c334ecee7f97b286ba045aef743327ca90de7c78e0bef.yml +openapi_spec_hash: 5163b368f085d519b7beab1246937d1a config_hash: a478b24249ee4f53abfb5787ca4daf8b diff --git a/src/supermemory/resources/documents.py b/src/supermemory/resources/documents.py index c63120a7..21ed3320 100644 --- a/src/supermemory/resources/documents.py +++ b/src/supermemory/resources/documents.py @@ -371,8 +371,9 @@ def upload_file( Args: file: File to upload and process - container_tags: Optional JSON string of container tags array. This can be an ID for your user, a - project ID, or any other identifier you wish to use to group documents. + container_tags: Optional container tags. Can be either a JSON string of an array (e.g., + '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single + strings will be automatically converted to an array. file_type: Optional file type override to force specific processing behavior. Valid values: @@ -762,8 +763,9 @@ async def upload_file( Args: file: File to upload and process - container_tags: Optional JSON string of container tags array. This can be an ID for your user, a - project ID, or any other identifier you wish to use to group documents. + container_tags: Optional container tags. Can be either a JSON string of an array (e.g., + '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single + strings will be automatically converted to an array. file_type: Optional file type override to force specific processing behavior. Valid values: diff --git a/src/supermemory/resources/memories.py b/src/supermemory/resources/memories.py index 8a7cd5d2..47a07e4a 100644 --- a/src/supermemory/resources/memories.py +++ b/src/supermemory/resources/memories.py @@ -371,8 +371,9 @@ def upload_file( Args: file: File to upload and process - container_tags: Optional JSON string of container tags array. This can be an ID for your user, a - project ID, or any other identifier you wish to use to group documents. + container_tags: Optional container tags. Can be either a JSON string of an array (e.g., + '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single + strings will be automatically converted to an array. file_type: Optional file type override to force specific processing behavior. Valid values: @@ -762,8 +763,9 @@ async def upload_file( Args: file: File to upload and process - container_tags: Optional JSON string of container tags array. This can be an ID for your user, a - project ID, or any other identifier you wish to use to group documents. + container_tags: Optional container tags. Can be either a JSON string of an array (e.g., + '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single + strings will be automatically converted to an array. file_type: Optional file type override to force specific processing behavior. Valid values: diff --git a/src/supermemory/types/document_upload_file_params.py b/src/supermemory/types/document_upload_file_params.py index f311bc69..168d4ba9 100644 --- a/src/supermemory/types/document_upload_file_params.py +++ b/src/supermemory/types/document_upload_file_params.py @@ -15,10 +15,11 @@ class DocumentUploadFileParams(TypedDict, total=False): """File to upload and process""" container_tags: Annotated[str, PropertyInfo(alias="containerTags")] - """Optional JSON string of container tags array. + """Optional container tags. - This can be an ID for your user, a project ID, or any other identifier you wish - to use to group documents. + Can be either a JSON string of an array (e.g., '["user_123", "project_123"]') or + a single string (e.g., 'user_123'). Single strings will be automatically + converted to an array. """ file_type: Annotated[str, PropertyInfo(alias="fileType")] diff --git a/src/supermemory/types/memory_upload_file_params.py b/src/supermemory/types/memory_upload_file_params.py index d979f973..631fb424 100644 --- a/src/supermemory/types/memory_upload_file_params.py +++ b/src/supermemory/types/memory_upload_file_params.py @@ -15,10 +15,11 @@ class MemoryUploadFileParams(TypedDict, total=False): """File to upload and process""" container_tags: Annotated[str, PropertyInfo(alias="containerTags")] - """Optional JSON string of container tags array. + """Optional container tags. - This can be an ID for your user, a project ID, or any other identifier you wish - to use to group documents. + Can be either a JSON string of an array (e.g., '["user_123", "project_123"]') or + a single string (e.g., 'user_123'). Single strings will be automatically + converted to an array. """ file_type: Annotated[str, PropertyInfo(alias="fileType")] From e4db38e40066039e4b5e38249ee8aaa2a27d1b4b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 22:22:32 +0000 Subject: [PATCH 3/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 23dba171..ed8a8f72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-d93857d410b13512999c334ecee7f97b286ba045aef743327ca90de7c78e0bef.yml -openapi_spec_hash: 5163b368f085d519b7beab1246937d1a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-4033be3204bb6bc9a92a54ba796dbc2c0601f72532f93c3f1ee0180e23723709.yml +openapi_spec_hash: 091da422bf6888c497c61ad0a910f276 config_hash: a478b24249ee4f53abfb5787ca4daf8b From 91585de6396d6529c2d15b2b2c4db481e72f32d0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 4 Oct 2025 03:22:38 +0000 Subject: [PATCH 4/9] feat(api): api update --- .stats.yml | 4 +- src/supermemory/resources/documents.py | 48 -------------- src/supermemory/resources/memories.py | 48 -------------- .../types/connection_get_by_id_response.py | 5 +- .../types/connection_get_by_tags_response.py | 5 +- .../types/connection_list_response.py | 5 +- src/supermemory/types/document_add_params.py | 14 ---- .../types/document_get_response.py | 11 ++-- .../types/document_list_response.py | 9 ++- .../types/document_update_params.py | 14 ---- src/supermemory/types/memory_add_params.py | 14 ---- src/supermemory/types/memory_get_response.py | 11 ++-- src/supermemory/types/memory_list_response.py | 9 ++- src/supermemory/types/memory_update_params.py | 14 ---- .../types/search_documents_response.py | 5 +- .../types/search_execute_response.py | 5 +- .../types/search_memories_response.py | 11 ++-- src/supermemory/types/shared/and_.py | 2 +- src/supermemory/types/shared/or_.py | 2 +- src/supermemory/types/shared_params/and_.py | 2 +- src/supermemory/types/shared_params/or_.py | 2 +- tests/api_resources/test_documents.py | 34 ++++------ tests/api_resources/test_memories.py | 34 ++++------ tests/api_resources/test_search.py | 66 +++++++++---------- 24 files changed, 93 insertions(+), 281 deletions(-) diff --git a/.stats.yml b/.stats.yml index ed8a8f72..15131c84 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-4033be3204bb6bc9a92a54ba796dbc2c0601f72532f93c3f1ee0180e23723709.yml -openapi_spec_hash: 091da422bf6888c497c61ad0a910f276 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-cdabb80ed9d7dae231be9b5ec36bd1056bebea71d69780c8457789834763d678.yml +openapi_spec_hash: 5bc8a0413b16125cb0fd1ef5027614aa config_hash: a478b24249ee4f53abfb5787ca4daf8b diff --git a/src/supermemory/resources/documents.py b/src/supermemory/resources/documents.py index 21ed3320..d1623b02 100644 --- a/src/supermemory/resources/documents.py +++ b/src/supermemory/resources/documents.py @@ -56,9 +56,7 @@ def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -90,20 +88,12 @@ def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -122,9 +112,7 @@ def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, document_update_params.DocumentUpdateParams, ), @@ -241,9 +229,7 @@ def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -275,20 +261,12 @@ def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -305,9 +283,7 @@ def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, document_add_params.DocumentAddParams, ), @@ -448,9 +424,7 @@ async def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -482,20 +456,12 @@ async def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -514,9 +480,7 @@ async def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, document_update_params.DocumentUpdateParams, ), @@ -633,9 +597,7 @@ async def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -667,20 +629,12 @@ async def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -697,9 +651,7 @@ async def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, document_add_params.DocumentAddParams, ), diff --git a/src/supermemory/resources/memories.py b/src/supermemory/resources/memories.py index 47a07e4a..d025223a 100644 --- a/src/supermemory/resources/memories.py +++ b/src/supermemory/resources/memories.py @@ -56,9 +56,7 @@ def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -90,20 +88,12 @@ def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -122,9 +112,7 @@ def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, memory_update_params.MemoryUpdateParams, ), @@ -241,9 +229,7 @@ def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -275,20 +261,12 @@ def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -305,9 +283,7 @@ def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, memory_add_params.MemoryAddParams, ), @@ -448,9 +424,7 @@ async def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -482,20 +456,12 @@ async def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -514,9 +480,7 @@ async def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, memory_update_params.MemoryUpdateParams, ), @@ -633,9 +597,7 @@ async def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -667,20 +629,12 @@ async def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -697,9 +651,7 @@ async def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, memory_add_params.MemoryAddParams, ), diff --git a/src/supermemory/types/connection_get_by_id_response.py b/src/supermemory/types/connection_get_by_id_response.py index e0444126..c3758a14 100644 --- a/src/supermemory/types/connection_get_by_id_response.py +++ b/src/supermemory/types/connection_get_by_id_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional -from datetime import datetime from pydantic import Field as FieldInfo @@ -13,7 +12,7 @@ class ConnectionGetByIDResponse(BaseModel): id: str - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") provider: str @@ -21,6 +20,6 @@ class ConnectionGetByIDResponse(BaseModel): email: Optional[str] = None - expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/connection_get_by_tags_response.py b/src/supermemory/types/connection_get_by_tags_response.py index 5ca2478f..8f0aaa5a 100644 --- a/src/supermemory/types/connection_get_by_tags_response.py +++ b/src/supermemory/types/connection_get_by_tags_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional -from datetime import datetime from pydantic import Field as FieldInfo @@ -13,7 +12,7 @@ class ConnectionGetByTagsResponse(BaseModel): id: str - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") provider: str @@ -21,6 +20,6 @@ class ConnectionGetByTagsResponse(BaseModel): email: Optional[str] = None - expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/connection_list_response.py b/src/supermemory/types/connection_list_response.py index 866cdf86..5cc83f9e 100644 --- a/src/supermemory/types/connection_list_response.py +++ b/src/supermemory/types/connection_list_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional -from datetime import datetime from typing_extensions import TypeAlias from pydantic import Field as FieldInfo @@ -14,7 +13,7 @@ class ConnectionListResponseItem(BaseModel): id: str - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") provider: str @@ -22,7 +21,7 @@ class ConnectionListResponseItem(BaseModel): email: Optional[str] = None - expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/document_add_params.py b/src/supermemory/types/document_add_params.py index c07a50f5..81a977f6 100644 --- a/src/supermemory/types/document_add_params.py +++ b/src/supermemory/types/document_add_params.py @@ -45,13 +45,6 @@ class DocumentAddParams(TypedDict, total=False): document. """ - file_type: Annotated[str, PropertyInfo(alias="fileType")] - """Optional file type override to force specific processing behavior. - - Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, - video, notion_doc, webpage, onedrive - """ - metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -60,10 +53,3 @@ class DocumentAddParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ - - mime_type: Annotated[str, PropertyInfo(alias="mimeType")] - """Required when fileType is 'image' or 'video'. - - Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', - 'video/mp4', 'video/webm') - """ diff --git a/src/supermemory/types/document_get_response.py b/src/supermemory/types/document_get_response.py index f812b5a8..595e19a5 100644 --- a/src/supermemory/types/document_get_response.py +++ b/src/supermemory/types/document_get_response.py @@ -1,7 +1,6 @@ # 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 @@ -33,7 +32,7 @@ class DocumentGetResponse(BaseModel): We automatically detect the content type from the url's response format. """ - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -54,6 +53,9 @@ class DocumentGetResponse(BaseModel): og_image: Optional[str] = FieldInfo(alias="ogImage", default=None) + raw: object + """Raw content of the document""" + source: Optional[str] = None """Source of the document""" @@ -87,7 +89,7 @@ class DocumentGetResponse(BaseModel): ] """Type of the document""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -97,8 +99,5 @@ class DocumentGetResponse(BaseModel): to use to group documents. """ - raw: None = None - """Raw content of the document""" - url: Optional[str] = None """URL of the document""" diff --git a/src/supermemory/types/document_list_response.py b/src/supermemory/types/document_list_response.py index afb58f49..d91063b8 100644 --- a/src/supermemory/types/document_list_response.py +++ b/src/supermemory/types/document_list_response.py @@ -1,7 +1,6 @@ # 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 @@ -21,7 +20,7 @@ class Memory(BaseModel): This is useful for identifying the source of the document. """ - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -64,7 +63,7 @@ class Memory(BaseModel): ] """Type of the document""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -81,12 +80,12 @@ class Memory(BaseModel): class Pagination(BaseModel): current_page: float = FieldInfo(alias="currentPage") - limit: float - total_items: float = FieldInfo(alias="totalItems") total_pages: float = FieldInfo(alias="totalPages") + limit: Optional[float] = None + class DocumentListResponse(BaseModel): memories: List[Memory] diff --git a/src/supermemory/types/document_update_params.py b/src/supermemory/types/document_update_params.py index 4b4b1218..1727666c 100644 --- a/src/supermemory/types/document_update_params.py +++ b/src/supermemory/types/document_update_params.py @@ -45,13 +45,6 @@ class DocumentUpdateParams(TypedDict, total=False): document. """ - file_type: Annotated[str, PropertyInfo(alias="fileType")] - """Optional file type override to force specific processing behavior. - - Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, - video, notion_doc, webpage, onedrive - """ - metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -60,10 +53,3 @@ class DocumentUpdateParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ - - mime_type: Annotated[str, PropertyInfo(alias="mimeType")] - """Required when fileType is 'image' or 'video'. - - Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', - 'video/mp4', 'video/webm') - """ diff --git a/src/supermemory/types/memory_add_params.py b/src/supermemory/types/memory_add_params.py index 21ed5bb4..0ae2e78f 100644 --- a/src/supermemory/types/memory_add_params.py +++ b/src/supermemory/types/memory_add_params.py @@ -45,13 +45,6 @@ class MemoryAddParams(TypedDict, total=False): document. """ - file_type: Annotated[str, PropertyInfo(alias="fileType")] - """Optional file type override to force specific processing behavior. - - Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, - video, notion_doc, webpage, onedrive - """ - metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -60,10 +53,3 @@ class MemoryAddParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ - - mime_type: Annotated[str, PropertyInfo(alias="mimeType")] - """Required when fileType is 'image' or 'video'. - - Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', - 'video/mp4', 'video/webm') - """ diff --git a/src/supermemory/types/memory_get_response.py b/src/supermemory/types/memory_get_response.py index a495ade9..a70b0dd9 100644 --- a/src/supermemory/types/memory_get_response.py +++ b/src/supermemory/types/memory_get_response.py @@ -1,7 +1,6 @@ # 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 @@ -33,7 +32,7 @@ class MemoryGetResponse(BaseModel): We automatically detect the content type from the url's response format. """ - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -54,6 +53,9 @@ class MemoryGetResponse(BaseModel): og_image: Optional[str] = FieldInfo(alias="ogImage", default=None) + raw: object + """Raw content of the document""" + source: Optional[str] = None """Source of the document""" @@ -87,7 +89,7 @@ class MemoryGetResponse(BaseModel): ] """Type of the document""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -97,8 +99,5 @@ class MemoryGetResponse(BaseModel): to use to group documents. """ - raw: None = None - """Raw content of the document""" - url: Optional[str] = None """URL of the document""" diff --git a/src/supermemory/types/memory_list_response.py b/src/supermemory/types/memory_list_response.py index 5eead3af..9f9dc5d6 100644 --- a/src/supermemory/types/memory_list_response.py +++ b/src/supermemory/types/memory_list_response.py @@ -1,7 +1,6 @@ # 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 @@ -21,7 +20,7 @@ class Memory(BaseModel): This is useful for identifying the source of the document. """ - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -64,7 +63,7 @@ class Memory(BaseModel): ] """Type of the document""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -81,12 +80,12 @@ class Memory(BaseModel): class Pagination(BaseModel): current_page: float = FieldInfo(alias="currentPage") - limit: float - total_items: float = FieldInfo(alias="totalItems") total_pages: float = FieldInfo(alias="totalPages") + limit: Optional[float] = None + class MemoryListResponse(BaseModel): memories: List[Memory] diff --git a/src/supermemory/types/memory_update_params.py b/src/supermemory/types/memory_update_params.py index 1a1308a1..1d7fe794 100644 --- a/src/supermemory/types/memory_update_params.py +++ b/src/supermemory/types/memory_update_params.py @@ -45,13 +45,6 @@ class MemoryUpdateParams(TypedDict, total=False): document. """ - file_type: Annotated[str, PropertyInfo(alias="fileType")] - """Optional file type override to force specific processing behavior. - - Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, - video, notion_doc, webpage, onedrive - """ - metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -60,10 +53,3 @@ class MemoryUpdateParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ - - mime_type: Annotated[str, PropertyInfo(alias="mimeType")] - """Required when fileType is 'image' or 'video'. - - Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', - 'video/mp4', 'video/webm') - """ diff --git a/src/supermemory/types/search_documents_response.py b/src/supermemory/types/search_documents_response.py index 04ce581e..a8769aec 100644 --- a/src/supermemory/types/search_documents_response.py +++ b/src/supermemory/types/search_documents_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional -from datetime import datetime from pydantic import Field as FieldInfo @@ -25,7 +24,7 @@ class Result(BaseModel): chunks: List[ResultChunk] """Matching content chunks from the document""" - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Document creation date""" document_id: str = FieldInfo(alias="documentId") @@ -43,7 +42,7 @@ class Result(BaseModel): type: Optional[str] = None """Document type""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Document last update date""" content: Optional[str] = None diff --git a/src/supermemory/types/search_execute_response.py b/src/supermemory/types/search_execute_response.py index c1844442..c6518999 100644 --- a/src/supermemory/types/search_execute_response.py +++ b/src/supermemory/types/search_execute_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional -from datetime import datetime from pydantic import Field as FieldInfo @@ -25,7 +24,7 @@ class Result(BaseModel): chunks: List[ResultChunk] """Matching content chunks from the document""" - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Document creation date""" document_id: str = FieldInfo(alias="documentId") @@ -43,7 +42,7 @@ class Result(BaseModel): type: Optional[str] = None """Document type""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Document last update date""" content: Optional[str] = None diff --git a/src/supermemory/types/search_memories_response.py b/src/supermemory/types/search_memories_response.py index 224cf83e..9f78cf40 100644 --- a/src/supermemory/types/search_memories_response.py +++ b/src/supermemory/types/search_memories_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional -from datetime import datetime from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -25,7 +24,7 @@ class ResultContextChild(BaseModel): relation: Literal["updates", "extends", "derives"] """Relation type between this memory and its parent/child""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Contextual memory last update date""" metadata: Optional[Dict[str, object]] = None @@ -45,7 +44,7 @@ class ResultContextParent(BaseModel): relation: Literal["updates", "extends", "derives"] """Relation type between this memory and its parent/child""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Contextual memory last update date""" metadata: Optional[Dict[str, object]] = None @@ -68,10 +67,10 @@ class ResultDocument(BaseModel): id: str """Document ID""" - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Document creation date""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Document last update date""" metadata: Optional[Dict[str, object]] = None @@ -100,7 +99,7 @@ class Result(BaseModel): similarity: float """Similarity score between the query and memory entry""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Memory last update date""" context: Optional[ResultContext] = None diff --git a/src/supermemory/types/shared/and_.py b/src/supermemory/types/shared/and_.py index 9b80ae49..980dbb24 100644 --- a/src/supermemory/types/shared/and_.py +++ b/src/supermemory/types/shared/and_.py @@ -10,4 +10,4 @@ class And(BaseModel): - and_: List[And] = FieldInfo(alias="AND") + and_: List[object] = FieldInfo(alias="AND") diff --git a/src/supermemory/types/shared/or_.py b/src/supermemory/types/shared/or_.py index 693eab48..fe2c5a95 100644 --- a/src/supermemory/types/shared/or_.py +++ b/src/supermemory/types/shared/or_.py @@ -10,4 +10,4 @@ class Or(BaseModel): - or_: List[Or] = FieldInfo(alias="OR") + or_: List[object] = FieldInfo(alias="OR") diff --git a/src/supermemory/types/shared_params/and_.py b/src/supermemory/types/shared_params/and_.py index 6aa3768c..0e0dad21 100644 --- a/src/supermemory/types/shared_params/and_.py +++ b/src/supermemory/types/shared_params/and_.py @@ -11,4 +11,4 @@ class And(TypedDict, total=False): - and_: Required[Annotated[Iterable[And], PropertyInfo(alias="AND")]] + and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] diff --git a/src/supermemory/types/shared_params/or_.py b/src/supermemory/types/shared_params/or_.py index d0947a89..fdb83e1f 100644 --- a/src/supermemory/types/shared_params/or_.py +++ b/src/supermemory/types/shared_params/or_.py @@ -11,4 +11,4 @@ class Or(TypedDict, total=False): - or_: Required[Annotated[Iterable[Or], PropertyInfo(alias="OR")]] + or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 0e693e7a..ffddf224 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -40,7 +40,6 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -49,7 +48,6 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(DocumentUpdateResponse, document, path=["response"]) @@ -101,18 +99,17 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -204,7 +201,6 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -213,7 +209,6 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(DocumentAddResponse, document, path=["response"]) @@ -301,7 +296,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="image/png", + mime_type="mimeType", ) assert_matches_type(DocumentUploadFileResponse, document, path=["response"]) @@ -354,7 +349,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -363,7 +357,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(DocumentUpdateResponse, document, path=["response"]) @@ -415,18 +408,17 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -518,7 +510,6 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -527,7 +518,6 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(DocumentAddResponse, document, path=["response"]) @@ -615,7 +605,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="image/png", + mime_type="mimeType", ) assert_matches_type(DocumentUploadFileResponse, document, path=["response"]) diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index 9d7f3848..1018413e 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -40,7 +40,6 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -49,7 +48,6 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(MemoryUpdateResponse, memory, path=["response"]) @@ -101,18 +99,17 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -204,7 +201,6 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -213,7 +209,6 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(MemoryAddResponse, memory, path=["response"]) @@ -301,7 +296,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="image/png", + mime_type="mimeType", ) assert_matches_type(MemoryUploadFileResponse, memory, path=["response"]) @@ -354,7 +349,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -363,7 +357,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(MemoryUpdateResponse, memory, path=["response"]) @@ -415,18 +408,17 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -518,7 +510,6 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -527,7 +518,6 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(MemoryAddResponse, memory, path=["response"]) @@ -615,7 +605,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="image/png", + mime_type="mimeType", ) assert_matches_type(MemoryUploadFileResponse, memory, path=["response"]) diff --git a/tests/api_resources/test_search.py b/tests/api_resources/test_search.py index 810511c6..49e06305 100644 --- a/tests/api_resources/test_search.py +++ b/tests/api_resources/test_search.py @@ -42,18 +42,17 @@ def test_method_documents_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -113,18 +112,17 @@ def test_method_execute_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -180,18 +178,17 @@ def test_method_memories_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -261,18 +258,17 @@ async def test_method_documents_with_all_params(self, async_client: AsyncSuperme filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -332,18 +328,17 @@ async def test_method_execute_with_all_params(self, async_client: AsyncSupermemo filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -399,18 +394,17 @@ async def test_method_memories_with_all_params(self, async_client: AsyncSupermem filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, From 0a01f623aa5daf19192259bee921e65acd583244 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:22:31 +0000 Subject: [PATCH 5/9] feat(api): api update --- .stats.yml | 4 +- src/supermemory/resources/documents.py | 48 ++++++++++++++ src/supermemory/resources/memories.py | 48 ++++++++++++++ .../types/connection_get_by_id_response.py | 5 +- .../types/connection_get_by_tags_response.py | 5 +- .../types/connection_list_response.py | 5 +- src/supermemory/types/document_add_params.py | 14 ++++ .../types/document_get_response.py | 11 ++-- .../types/document_list_response.py | 9 +-- .../types/document_update_params.py | 14 ++++ src/supermemory/types/memory_add_params.py | 14 ++++ src/supermemory/types/memory_get_response.py | 11 ++-- src/supermemory/types/memory_list_response.py | 9 +-- src/supermemory/types/memory_update_params.py | 14 ++++ .../types/search_documents_response.py | 5 +- .../types/search_execute_response.py | 5 +- .../types/search_memories_response.py | 11 ++-- src/supermemory/types/shared/and_.py | 2 +- src/supermemory/types/shared/or_.py | 2 +- src/supermemory/types/shared_params/and_.py | 2 +- src/supermemory/types/shared_params/or_.py | 2 +- tests/api_resources/test_documents.py | 34 ++++++---- tests/api_resources/test_memories.py | 34 ++++++---- tests/api_resources/test_search.py | 66 ++++++++++--------- 24 files changed, 281 insertions(+), 93 deletions(-) diff --git a/.stats.yml b/.stats.yml index 15131c84..ed8a8f72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-cdabb80ed9d7dae231be9b5ec36bd1056bebea71d69780c8457789834763d678.yml -openapi_spec_hash: 5bc8a0413b16125cb0fd1ef5027614aa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-4033be3204bb6bc9a92a54ba796dbc2c0601f72532f93c3f1ee0180e23723709.yml +openapi_spec_hash: 091da422bf6888c497c61ad0a910f276 config_hash: a478b24249ee4f53abfb5787ca4daf8b diff --git a/src/supermemory/resources/documents.py b/src/supermemory/resources/documents.py index d1623b02..21ed3320 100644 --- a/src/supermemory/resources/documents.py +++ b/src/supermemory/resources/documents.py @@ -56,7 +56,9 @@ def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, + file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, + mime_type: 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, @@ -88,12 +90,20 @@ def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. + file_type: + Optional file type override to force specific processing behavior. Valid values: + text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, + notion_doc, webpage, onedrive + metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. + mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to + use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -112,7 +122,9 @@ def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, + "file_type": file_type, "metadata": metadata, + "mime_type": mime_type, }, document_update_params.DocumentUpdateParams, ), @@ -229,7 +241,9 @@ def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, + file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, + mime_type: 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, @@ -261,12 +275,20 @@ def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. + file_type: + Optional file type override to force specific processing behavior. Valid values: + text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, + notion_doc, webpage, onedrive + metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. + mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to + use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -283,7 +305,9 @@ def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, + "file_type": file_type, "metadata": metadata, + "mime_type": mime_type, }, document_add_params.DocumentAddParams, ), @@ -424,7 +448,9 @@ async def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, + file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, + mime_type: 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, @@ -456,12 +482,20 @@ async def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. + file_type: + Optional file type override to force specific processing behavior. Valid values: + text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, + notion_doc, webpage, onedrive + metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. + mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to + use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -480,7 +514,9 @@ async def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, + "file_type": file_type, "metadata": metadata, + "mime_type": mime_type, }, document_update_params.DocumentUpdateParams, ), @@ -597,7 +633,9 @@ async def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, + file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, + mime_type: 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, @@ -629,12 +667,20 @@ async def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. + file_type: + Optional file type override to force specific processing behavior. Valid values: + text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, + notion_doc, webpage, onedrive + metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. + mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to + use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -651,7 +697,9 @@ async def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, + "file_type": file_type, "metadata": metadata, + "mime_type": mime_type, }, document_add_params.DocumentAddParams, ), diff --git a/src/supermemory/resources/memories.py b/src/supermemory/resources/memories.py index d025223a..47a07e4a 100644 --- a/src/supermemory/resources/memories.py +++ b/src/supermemory/resources/memories.py @@ -56,7 +56,9 @@ def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, + file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, + mime_type: 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, @@ -88,12 +90,20 @@ def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. + file_type: + Optional file type override to force specific processing behavior. Valid values: + text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, + notion_doc, webpage, onedrive + metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. + mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to + use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -112,7 +122,9 @@ def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, + "file_type": file_type, "metadata": metadata, + "mime_type": mime_type, }, memory_update_params.MemoryUpdateParams, ), @@ -229,7 +241,9 @@ def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, + file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, + mime_type: 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, @@ -261,12 +275,20 @@ def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. + file_type: + Optional file type override to force specific processing behavior. Valid values: + text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, + notion_doc, webpage, onedrive + metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. + mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to + use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -283,7 +305,9 @@ def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, + "file_type": file_type, "metadata": metadata, + "mime_type": mime_type, }, memory_add_params.MemoryAddParams, ), @@ -424,7 +448,9 @@ async def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, + file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, + mime_type: 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, @@ -456,12 +482,20 @@ async def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. + file_type: + Optional file type override to force specific processing behavior. Valid values: + text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, + notion_doc, webpage, onedrive + metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. + mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to + use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -480,7 +514,9 @@ async def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, + "file_type": file_type, "metadata": metadata, + "mime_type": mime_type, }, memory_update_params.MemoryUpdateParams, ), @@ -597,7 +633,9 @@ async def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, + file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, + mime_type: 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, @@ -629,12 +667,20 @@ async def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. + file_type: + Optional file type override to force specific processing behavior. Valid values: + text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, + notion_doc, webpage, onedrive + metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. + mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to + use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -651,7 +697,9 @@ async def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, + "file_type": file_type, "metadata": metadata, + "mime_type": mime_type, }, memory_add_params.MemoryAddParams, ), diff --git a/src/supermemory/types/connection_get_by_id_response.py b/src/supermemory/types/connection_get_by_id_response.py index c3758a14..e0444126 100644 --- a/src/supermemory/types/connection_get_by_id_response.py +++ b/src/supermemory/types/connection_get_by_id_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional +from datetime import datetime from pydantic import Field as FieldInfo @@ -12,7 +13,7 @@ class ConnectionGetByIDResponse(BaseModel): id: str - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") provider: str @@ -20,6 +21,6 @@ class ConnectionGetByIDResponse(BaseModel): email: Optional[str] = None - expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/connection_get_by_tags_response.py b/src/supermemory/types/connection_get_by_tags_response.py index 8f0aaa5a..5ca2478f 100644 --- a/src/supermemory/types/connection_get_by_tags_response.py +++ b/src/supermemory/types/connection_get_by_tags_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional +from datetime import datetime from pydantic import Field as FieldInfo @@ -12,7 +13,7 @@ class ConnectionGetByTagsResponse(BaseModel): id: str - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") provider: str @@ -20,6 +21,6 @@ class ConnectionGetByTagsResponse(BaseModel): email: Optional[str] = None - expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/connection_list_response.py b/src/supermemory/types/connection_list_response.py index 5cc83f9e..866cdf86 100644 --- a/src/supermemory/types/connection_list_response.py +++ b/src/supermemory/types/connection_list_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional +from datetime import datetime from typing_extensions import TypeAlias from pydantic import Field as FieldInfo @@ -13,7 +14,7 @@ class ConnectionListResponseItem(BaseModel): id: str - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") provider: str @@ -21,7 +22,7 @@ class ConnectionListResponseItem(BaseModel): email: Optional[str] = None - expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/document_add_params.py b/src/supermemory/types/document_add_params.py index 81a977f6..c07a50f5 100644 --- a/src/supermemory/types/document_add_params.py +++ b/src/supermemory/types/document_add_params.py @@ -45,6 +45,13 @@ class DocumentAddParams(TypedDict, total=False): document. """ + file_type: Annotated[str, PropertyInfo(alias="fileType")] + """Optional file type override to force specific processing behavior. + + Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, + video, notion_doc, webpage, onedrive + """ + metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -53,3 +60,10 @@ class DocumentAddParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ + + mime_type: Annotated[str, PropertyInfo(alias="mimeType")] + """Required when fileType is 'image' or 'video'. + + Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', + 'video/mp4', 'video/webm') + """ diff --git a/src/supermemory/types/document_get_response.py b/src/supermemory/types/document_get_response.py index 595e19a5..f812b5a8 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 @@ -32,7 +33,7 @@ class DocumentGetResponse(BaseModel): We automatically detect the content type from the url's response format. """ - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -53,9 +54,6 @@ class DocumentGetResponse(BaseModel): og_image: Optional[str] = FieldInfo(alias="ogImage", default=None) - raw: object - """Raw content of the document""" - source: Optional[str] = None """Source of the document""" @@ -89,7 +87,7 @@ class DocumentGetResponse(BaseModel): ] """Type of the document""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -99,5 +97,8 @@ class DocumentGetResponse(BaseModel): to use to group documents. """ + raw: None = None + """Raw content of the document""" + url: Optional[str] = None """URL of the document""" diff --git a/src/supermemory/types/document_list_response.py b/src/supermemory/types/document_list_response.py index d91063b8..afb58f49 100644 --- a/src/supermemory/types/document_list_response.py +++ b/src/supermemory/types/document_list_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 @@ -20,7 +21,7 @@ class Memory(BaseModel): This is useful for identifying the source of the document. """ - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -63,7 +64,7 @@ class Memory(BaseModel): ] """Type of the document""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -80,12 +81,12 @@ class Memory(BaseModel): class Pagination(BaseModel): current_page: float = FieldInfo(alias="currentPage") + limit: float + total_items: float = FieldInfo(alias="totalItems") total_pages: float = FieldInfo(alias="totalPages") - limit: Optional[float] = None - class DocumentListResponse(BaseModel): memories: List[Memory] diff --git a/src/supermemory/types/document_update_params.py b/src/supermemory/types/document_update_params.py index 1727666c..4b4b1218 100644 --- a/src/supermemory/types/document_update_params.py +++ b/src/supermemory/types/document_update_params.py @@ -45,6 +45,13 @@ class DocumentUpdateParams(TypedDict, total=False): document. """ + file_type: Annotated[str, PropertyInfo(alias="fileType")] + """Optional file type override to force specific processing behavior. + + Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, + video, notion_doc, webpage, onedrive + """ + metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -53,3 +60,10 @@ class DocumentUpdateParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ + + mime_type: Annotated[str, PropertyInfo(alias="mimeType")] + """Required when fileType is 'image' or 'video'. + + Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', + 'video/mp4', 'video/webm') + """ diff --git a/src/supermemory/types/memory_add_params.py b/src/supermemory/types/memory_add_params.py index 0ae2e78f..21ed5bb4 100644 --- a/src/supermemory/types/memory_add_params.py +++ b/src/supermemory/types/memory_add_params.py @@ -45,6 +45,13 @@ class MemoryAddParams(TypedDict, total=False): document. """ + file_type: Annotated[str, PropertyInfo(alias="fileType")] + """Optional file type override to force specific processing behavior. + + Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, + video, notion_doc, webpage, onedrive + """ + metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -53,3 +60,10 @@ class MemoryAddParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ + + mime_type: Annotated[str, PropertyInfo(alias="mimeType")] + """Required when fileType is 'image' or 'video'. + + Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', + 'video/mp4', 'video/webm') + """ diff --git a/src/supermemory/types/memory_get_response.py b/src/supermemory/types/memory_get_response.py index a70b0dd9..a495ade9 100644 --- a/src/supermemory/types/memory_get_response.py +++ b/src/supermemory/types/memory_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 @@ -32,7 +33,7 @@ class MemoryGetResponse(BaseModel): We automatically detect the content type from the url's response format. """ - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -53,9 +54,6 @@ class MemoryGetResponse(BaseModel): og_image: Optional[str] = FieldInfo(alias="ogImage", default=None) - raw: object - """Raw content of the document""" - source: Optional[str] = None """Source of the document""" @@ -89,7 +87,7 @@ class MemoryGetResponse(BaseModel): ] """Type of the document""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -99,5 +97,8 @@ class MemoryGetResponse(BaseModel): to use to group documents. """ + raw: None = None + """Raw content of the document""" + url: Optional[str] = None """URL of the document""" diff --git a/src/supermemory/types/memory_list_response.py b/src/supermemory/types/memory_list_response.py index 9f9dc5d6..5eead3af 100644 --- a/src/supermemory/types/memory_list_response.py +++ b/src/supermemory/types/memory_list_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 @@ -20,7 +21,7 @@ class Memory(BaseModel): This is useful for identifying the source of the document. """ - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -63,7 +64,7 @@ class Memory(BaseModel): ] """Type of the document""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -80,12 +81,12 @@ class Memory(BaseModel): class Pagination(BaseModel): current_page: float = FieldInfo(alias="currentPage") + limit: float + total_items: float = FieldInfo(alias="totalItems") total_pages: float = FieldInfo(alias="totalPages") - limit: Optional[float] = None - class MemoryListResponse(BaseModel): memories: List[Memory] diff --git a/src/supermemory/types/memory_update_params.py b/src/supermemory/types/memory_update_params.py index 1d7fe794..1a1308a1 100644 --- a/src/supermemory/types/memory_update_params.py +++ b/src/supermemory/types/memory_update_params.py @@ -45,6 +45,13 @@ class MemoryUpdateParams(TypedDict, total=False): document. """ + file_type: Annotated[str, PropertyInfo(alias="fileType")] + """Optional file type override to force specific processing behavior. + + Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, + video, notion_doc, webpage, onedrive + """ + metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -53,3 +60,10 @@ class MemoryUpdateParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ + + mime_type: Annotated[str, PropertyInfo(alias="mimeType")] + """Required when fileType is 'image' or 'video'. + + Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', + 'video/mp4', 'video/webm') + """ diff --git a/src/supermemory/types/search_documents_response.py b/src/supermemory/types/search_documents_response.py index a8769aec..04ce581e 100644 --- a/src/supermemory/types/search_documents_response.py +++ b/src/supermemory/types/search_documents_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional +from datetime import datetime from pydantic import Field as FieldInfo @@ -24,7 +25,7 @@ class Result(BaseModel): chunks: List[ResultChunk] """Matching content chunks from the document""" - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") """Document creation date""" document_id: str = FieldInfo(alias="documentId") @@ -42,7 +43,7 @@ class Result(BaseModel): type: Optional[str] = None """Document type""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Document last update date""" content: Optional[str] = None diff --git a/src/supermemory/types/search_execute_response.py b/src/supermemory/types/search_execute_response.py index c6518999..c1844442 100644 --- a/src/supermemory/types/search_execute_response.py +++ b/src/supermemory/types/search_execute_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional +from datetime import datetime from pydantic import Field as FieldInfo @@ -24,7 +25,7 @@ class Result(BaseModel): chunks: List[ResultChunk] """Matching content chunks from the document""" - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") """Document creation date""" document_id: str = FieldInfo(alias="documentId") @@ -42,7 +43,7 @@ class Result(BaseModel): type: Optional[str] = None """Document type""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Document last update date""" content: Optional[str] = None diff --git a/src/supermemory/types/search_memories_response.py b/src/supermemory/types/search_memories_response.py index 9f78cf40..224cf83e 100644 --- a/src/supermemory/types/search_memories_response.py +++ b/src/supermemory/types/search_memories_response.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional +from datetime import datetime from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -24,7 +25,7 @@ class ResultContextChild(BaseModel): relation: Literal["updates", "extends", "derives"] """Relation type between this memory and its parent/child""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Contextual memory last update date""" metadata: Optional[Dict[str, object]] = None @@ -44,7 +45,7 @@ class ResultContextParent(BaseModel): relation: Literal["updates", "extends", "derives"] """Relation type between this memory and its parent/child""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Contextual memory last update date""" metadata: Optional[Dict[str, object]] = None @@ -67,10 +68,10 @@ class ResultDocument(BaseModel): id: str """Document ID""" - created_at: str = FieldInfo(alias="createdAt") + created_at: datetime = FieldInfo(alias="createdAt") """Document creation date""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Document last update date""" metadata: Optional[Dict[str, object]] = None @@ -99,7 +100,7 @@ class Result(BaseModel): similarity: float """Similarity score between the query and memory entry""" - updated_at: str = FieldInfo(alias="updatedAt") + updated_at: datetime = FieldInfo(alias="updatedAt") """Memory last update date""" context: Optional[ResultContext] = None diff --git a/src/supermemory/types/shared/and_.py b/src/supermemory/types/shared/and_.py index 980dbb24..9b80ae49 100644 --- a/src/supermemory/types/shared/and_.py +++ b/src/supermemory/types/shared/and_.py @@ -10,4 +10,4 @@ class And(BaseModel): - and_: List[object] = FieldInfo(alias="AND") + and_: List[And] = FieldInfo(alias="AND") diff --git a/src/supermemory/types/shared/or_.py b/src/supermemory/types/shared/or_.py index fe2c5a95..693eab48 100644 --- a/src/supermemory/types/shared/or_.py +++ b/src/supermemory/types/shared/or_.py @@ -10,4 +10,4 @@ class Or(BaseModel): - or_: List[object] = FieldInfo(alias="OR") + or_: List[Or] = FieldInfo(alias="OR") diff --git a/src/supermemory/types/shared_params/and_.py b/src/supermemory/types/shared_params/and_.py index 0e0dad21..6aa3768c 100644 --- a/src/supermemory/types/shared_params/and_.py +++ b/src/supermemory/types/shared_params/and_.py @@ -11,4 +11,4 @@ class And(TypedDict, total=False): - and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] + and_: Required[Annotated[Iterable[And], PropertyInfo(alias="AND")]] diff --git a/src/supermemory/types/shared_params/or_.py b/src/supermemory/types/shared_params/or_.py index fdb83e1f..d0947a89 100644 --- a/src/supermemory/types/shared_params/or_.py +++ b/src/supermemory/types/shared_params/or_.py @@ -11,4 +11,4 @@ class Or(TypedDict, total=False): - or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] + or_: Required[Annotated[Iterable[Or], PropertyInfo(alias="OR")]] diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index ffddf224..0e693e7a 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -40,6 +40,7 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", + file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -48,6 +49,7 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, + mime_type="image/png", ) assert_matches_type(DocumentUpdateResponse, document, path=["response"]) @@ -99,17 +101,18 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -201,6 +204,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", + file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -209,6 +213,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, + mime_type="image/png", ) assert_matches_type(DocumentAddResponse, document, path=["response"]) @@ -296,7 +301,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="mimeType", + mime_type="image/png", ) assert_matches_type(DocumentUploadFileResponse, document, path=["response"]) @@ -349,6 +354,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", + file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -357,6 +363,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor "tag_1": "ai", "tag_2": "machine-learning", }, + mime_type="image/png", ) assert_matches_type(DocumentUpdateResponse, document, path=["response"]) @@ -408,17 +415,18 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -510,6 +518,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", + file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -518,6 +527,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) "tag_1": "ai", "tag_2": "machine-learning", }, + mime_type="image/png", ) assert_matches_type(DocumentAddResponse, document, path=["response"]) @@ -605,7 +615,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="mimeType", + mime_type="image/png", ) assert_matches_type(DocumentUploadFileResponse, document, path=["response"]) diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index 1018413e..9d7f3848 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -40,6 +40,7 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", + file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -48,6 +49,7 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, + mime_type="image/png", ) assert_matches_type(MemoryUpdateResponse, memory, path=["response"]) @@ -99,17 +101,18 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -201,6 +204,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", + file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -209,6 +213,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, + mime_type="image/png", ) assert_matches_type(MemoryAddResponse, memory, path=["response"]) @@ -296,7 +301,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="mimeType", + mime_type="image/png", ) assert_matches_type(MemoryUploadFileResponse, memory, path=["response"]) @@ -349,6 +354,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", + file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -357,6 +363,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor "tag_1": "ai", "tag_2": "machine-learning", }, + mime_type="image/png", ) assert_matches_type(MemoryUpdateResponse, memory, path=["response"]) @@ -408,17 +415,18 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -510,6 +518,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", + file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -518,6 +527,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) "tag_1": "ai", "tag_2": "machine-learning", }, + mime_type="image/png", ) assert_matches_type(MemoryAddResponse, memory, path=["response"]) @@ -605,7 +615,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="mimeType", + mime_type="image/png", ) assert_matches_type(MemoryUploadFileResponse, memory, path=["response"]) diff --git a/tests/api_resources/test_search.py b/tests/api_resources/test_search.py index 49e06305..810511c6 100644 --- a/tests/api_resources/test_search.py +++ b/tests/api_resources/test_search.py @@ -42,17 +42,18 @@ def test_method_documents_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -112,17 +113,18 @@ def test_method_execute_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -178,17 +180,18 @@ def test_method_memories_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -258,17 +261,18 @@ async def test_method_documents_with_all_params(self, async_client: AsyncSuperme filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -328,17 +332,18 @@ async def test_method_execute_with_all_params(self, async_client: AsyncSupermemo filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, @@ -394,17 +399,18 @@ async def test_method_memories_with_all_params(self, async_client: AsyncSupermem filters={ "and_": [ { - "filterType": "metadata", "key": "group", - "negate": False, "value": "jira_users", + "filter_type": "metadata", + "negate": False, + "numeric_operator": ">", }, { - "filterType": "numeric", "key": "timestamp", - "negate": False, - "numericOperator": ">", "value": "1742745777", + "filter_type": "numeric", + "negate": False, + "numeric_operator": ">", }, ] }, From ad112460d7aa5642895c4dec8b9c4e1993c01635 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 02:22:36 +0000 Subject: [PATCH 6/9] feat(api): api update --- .stats.yml | 4 +- src/supermemory/resources/documents.py | 48 -------------- src/supermemory/resources/memories.py | 48 -------------- .../types/connection_get_by_id_response.py | 5 +- .../types/connection_get_by_tags_response.py | 5 +- .../types/connection_list_response.py | 5 +- src/supermemory/types/document_add_params.py | 14 ---- .../types/document_get_response.py | 11 ++-- .../types/document_list_response.py | 9 ++- .../types/document_update_params.py | 14 ---- src/supermemory/types/memory_add_params.py | 14 ---- src/supermemory/types/memory_get_response.py | 11 ++-- src/supermemory/types/memory_list_response.py | 9 ++- src/supermemory/types/memory_update_params.py | 14 ---- .../types/search_documents_response.py | 5 +- .../types/search_execute_response.py | 5 +- .../types/search_memories_response.py | 11 ++-- src/supermemory/types/shared/and_.py | 2 +- src/supermemory/types/shared/or_.py | 2 +- src/supermemory/types/shared_params/and_.py | 2 +- src/supermemory/types/shared_params/or_.py | 2 +- tests/api_resources/test_documents.py | 34 ++++------ tests/api_resources/test_memories.py | 34 ++++------ tests/api_resources/test_search.py | 66 +++++++++---------- 24 files changed, 93 insertions(+), 281 deletions(-) diff --git a/.stats.yml b/.stats.yml index ed8a8f72..15131c84 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-4033be3204bb6bc9a92a54ba796dbc2c0601f72532f93c3f1ee0180e23723709.yml -openapi_spec_hash: 091da422bf6888c497c61ad0a910f276 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-cdabb80ed9d7dae231be9b5ec36bd1056bebea71d69780c8457789834763d678.yml +openapi_spec_hash: 5bc8a0413b16125cb0fd1ef5027614aa config_hash: a478b24249ee4f53abfb5787ca4daf8b diff --git a/src/supermemory/resources/documents.py b/src/supermemory/resources/documents.py index 21ed3320..d1623b02 100644 --- a/src/supermemory/resources/documents.py +++ b/src/supermemory/resources/documents.py @@ -56,9 +56,7 @@ def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -90,20 +88,12 @@ def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -122,9 +112,7 @@ def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, document_update_params.DocumentUpdateParams, ), @@ -241,9 +229,7 @@ def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -275,20 +261,12 @@ def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -305,9 +283,7 @@ def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, document_add_params.DocumentAddParams, ), @@ -448,9 +424,7 @@ async def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -482,20 +456,12 @@ async def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -514,9 +480,7 @@ async def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, document_update_params.DocumentUpdateParams, ), @@ -633,9 +597,7 @@ async def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -667,20 +629,12 @@ async def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -697,9 +651,7 @@ async def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, document_add_params.DocumentAddParams, ), diff --git a/src/supermemory/resources/memories.py b/src/supermemory/resources/memories.py index 47a07e4a..d025223a 100644 --- a/src/supermemory/resources/memories.py +++ b/src/supermemory/resources/memories.py @@ -56,9 +56,7 @@ def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -90,20 +88,12 @@ def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -122,9 +112,7 @@ def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, memory_update_params.MemoryUpdateParams, ), @@ -241,9 +229,7 @@ def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -275,20 +261,12 @@ def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -305,9 +283,7 @@ def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, memory_add_params.MemoryAddParams, ), @@ -448,9 +424,7 @@ async def update( container_tags: SequenceNotStr[str] | Omit = omit, content: str | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -482,20 +456,12 @@ async def update( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -514,9 +480,7 @@ async def update( "container_tags": container_tags, "content": content, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, memory_update_params.MemoryUpdateParams, ), @@ -633,9 +597,7 @@ async def add( container_tag: str | Omit = omit, container_tags: SequenceNotStr[str] | Omit = omit, custom_id: str | Omit = omit, - file_type: str | Omit = omit, metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit, - mime_type: 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, @@ -667,20 +629,12 @@ async def add( custom_id: Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document. - file_type: - Optional file type override to force specific processing behavior. Valid values: - text, pdf, tweet, google_doc, google_slide, google_sheet, image, video, - notion_doc, webpage, onedrive - metadata: Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. - mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to - use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm') - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -697,9 +651,7 @@ async def add( "container_tag": container_tag, "container_tags": container_tags, "custom_id": custom_id, - "file_type": file_type, "metadata": metadata, - "mime_type": mime_type, }, memory_add_params.MemoryAddParams, ), diff --git a/src/supermemory/types/connection_get_by_id_response.py b/src/supermemory/types/connection_get_by_id_response.py index e0444126..c3758a14 100644 --- a/src/supermemory/types/connection_get_by_id_response.py +++ b/src/supermemory/types/connection_get_by_id_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional -from datetime import datetime from pydantic import Field as FieldInfo @@ -13,7 +12,7 @@ class ConnectionGetByIDResponse(BaseModel): id: str - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") provider: str @@ -21,6 +20,6 @@ class ConnectionGetByIDResponse(BaseModel): email: Optional[str] = None - expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/connection_get_by_tags_response.py b/src/supermemory/types/connection_get_by_tags_response.py index 5ca2478f..8f0aaa5a 100644 --- a/src/supermemory/types/connection_get_by_tags_response.py +++ b/src/supermemory/types/connection_get_by_tags_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional -from datetime import datetime from pydantic import Field as FieldInfo @@ -13,7 +12,7 @@ class ConnectionGetByTagsResponse(BaseModel): id: str - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") provider: str @@ -21,6 +20,6 @@ class ConnectionGetByTagsResponse(BaseModel): email: Optional[str] = None - expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/connection_list_response.py b/src/supermemory/types/connection_list_response.py index 866cdf86..5cc83f9e 100644 --- a/src/supermemory/types/connection_list_response.py +++ b/src/supermemory/types/connection_list_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional -from datetime import datetime from typing_extensions import TypeAlias from pydantic import Field as FieldInfo @@ -14,7 +13,7 @@ class ConnectionListResponseItem(BaseModel): id: str - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") provider: str @@ -22,7 +21,7 @@ class ConnectionListResponseItem(BaseModel): email: Optional[str] = None - expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) + expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None) metadata: Optional[Dict[str, object]] = None diff --git a/src/supermemory/types/document_add_params.py b/src/supermemory/types/document_add_params.py index c07a50f5..81a977f6 100644 --- a/src/supermemory/types/document_add_params.py +++ b/src/supermemory/types/document_add_params.py @@ -45,13 +45,6 @@ class DocumentAddParams(TypedDict, total=False): document. """ - file_type: Annotated[str, PropertyInfo(alias="fileType")] - """Optional file type override to force specific processing behavior. - - Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, - video, notion_doc, webpage, onedrive - """ - metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -60,10 +53,3 @@ class DocumentAddParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ - - mime_type: Annotated[str, PropertyInfo(alias="mimeType")] - """Required when fileType is 'image' or 'video'. - - Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', - 'video/mp4', 'video/webm') - """ diff --git a/src/supermemory/types/document_get_response.py b/src/supermemory/types/document_get_response.py index f812b5a8..595e19a5 100644 --- a/src/supermemory/types/document_get_response.py +++ b/src/supermemory/types/document_get_response.py @@ -1,7 +1,6 @@ # 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 @@ -33,7 +32,7 @@ class DocumentGetResponse(BaseModel): We automatically detect the content type from the url's response format. """ - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -54,6 +53,9 @@ class DocumentGetResponse(BaseModel): og_image: Optional[str] = FieldInfo(alias="ogImage", default=None) + raw: object + """Raw content of the document""" + source: Optional[str] = None """Source of the document""" @@ -87,7 +89,7 @@ class DocumentGetResponse(BaseModel): ] """Type of the document""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -97,8 +99,5 @@ class DocumentGetResponse(BaseModel): to use to group documents. """ - raw: None = None - """Raw content of the document""" - url: Optional[str] = None """URL of the document""" diff --git a/src/supermemory/types/document_list_response.py b/src/supermemory/types/document_list_response.py index afb58f49..d91063b8 100644 --- a/src/supermemory/types/document_list_response.py +++ b/src/supermemory/types/document_list_response.py @@ -1,7 +1,6 @@ # 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 @@ -21,7 +20,7 @@ class Memory(BaseModel): This is useful for identifying the source of the document. """ - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -64,7 +63,7 @@ class Memory(BaseModel): ] """Type of the document""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -81,12 +80,12 @@ class Memory(BaseModel): class Pagination(BaseModel): current_page: float = FieldInfo(alias="currentPage") - limit: float - total_items: float = FieldInfo(alias="totalItems") total_pages: float = FieldInfo(alias="totalPages") + limit: Optional[float] = None + class DocumentListResponse(BaseModel): memories: List[Memory] diff --git a/src/supermemory/types/document_update_params.py b/src/supermemory/types/document_update_params.py index 4b4b1218..1727666c 100644 --- a/src/supermemory/types/document_update_params.py +++ b/src/supermemory/types/document_update_params.py @@ -45,13 +45,6 @@ class DocumentUpdateParams(TypedDict, total=False): document. """ - file_type: Annotated[str, PropertyInfo(alias="fileType")] - """Optional file type override to force specific processing behavior. - - Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, - video, notion_doc, webpage, onedrive - """ - metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -60,10 +53,3 @@ class DocumentUpdateParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ - - mime_type: Annotated[str, PropertyInfo(alias="mimeType")] - """Required when fileType is 'image' or 'video'. - - Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', - 'video/mp4', 'video/webm') - """ diff --git a/src/supermemory/types/memory_add_params.py b/src/supermemory/types/memory_add_params.py index 21ed5bb4..0ae2e78f 100644 --- a/src/supermemory/types/memory_add_params.py +++ b/src/supermemory/types/memory_add_params.py @@ -45,13 +45,6 @@ class MemoryAddParams(TypedDict, total=False): document. """ - file_type: Annotated[str, PropertyInfo(alias="fileType")] - """Optional file type override to force specific processing behavior. - - Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, - video, notion_doc, webpage, onedrive - """ - metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -60,10 +53,3 @@ class MemoryAddParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ - - mime_type: Annotated[str, PropertyInfo(alias="mimeType")] - """Required when fileType is 'image' or 'video'. - - Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', - 'video/mp4', 'video/webm') - """ diff --git a/src/supermemory/types/memory_get_response.py b/src/supermemory/types/memory_get_response.py index a495ade9..a70b0dd9 100644 --- a/src/supermemory/types/memory_get_response.py +++ b/src/supermemory/types/memory_get_response.py @@ -1,7 +1,6 @@ # 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 @@ -33,7 +32,7 @@ class MemoryGetResponse(BaseModel): We automatically detect the content type from the url's response format. """ - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -54,6 +53,9 @@ class MemoryGetResponse(BaseModel): og_image: Optional[str] = FieldInfo(alias="ogImage", default=None) + raw: object + """Raw content of the document""" + source: Optional[str] = None """Source of the document""" @@ -87,7 +89,7 @@ class MemoryGetResponse(BaseModel): ] """Type of the document""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -97,8 +99,5 @@ class MemoryGetResponse(BaseModel): to use to group documents. """ - raw: None = None - """Raw content of the document""" - url: Optional[str] = None """URL of the document""" diff --git a/src/supermemory/types/memory_list_response.py b/src/supermemory/types/memory_list_response.py index 5eead3af..9f9dc5d6 100644 --- a/src/supermemory/types/memory_list_response.py +++ b/src/supermemory/types/memory_list_response.py @@ -1,7 +1,6 @@ # 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 @@ -21,7 +20,7 @@ class Memory(BaseModel): This is useful for identifying the source of the document. """ - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Creation timestamp""" custom_id: Optional[str] = FieldInfo(alias="customId", default=None) @@ -64,7 +63,7 @@ class Memory(BaseModel): ] """Type of the document""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Last update timestamp""" container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None) @@ -81,12 +80,12 @@ class Memory(BaseModel): class Pagination(BaseModel): current_page: float = FieldInfo(alias="currentPage") - limit: float - total_items: float = FieldInfo(alias="totalItems") total_pages: float = FieldInfo(alias="totalPages") + limit: Optional[float] = None + class MemoryListResponse(BaseModel): memories: List[Memory] diff --git a/src/supermemory/types/memory_update_params.py b/src/supermemory/types/memory_update_params.py index 1a1308a1..1d7fe794 100644 --- a/src/supermemory/types/memory_update_params.py +++ b/src/supermemory/types/memory_update_params.py @@ -45,13 +45,6 @@ class MemoryUpdateParams(TypedDict, total=False): document. """ - file_type: Annotated[str, PropertyInfo(alias="fileType")] - """Optional file type override to force specific processing behavior. - - Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image, - video, notion_doc, webpage, onedrive - """ - metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] """Optional metadata for the document. @@ -60,10 +53,3 @@ class MemoryUpdateParams(TypedDict, total=False): can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects. """ - - mime_type: Annotated[str, PropertyInfo(alias="mimeType")] - """Required when fileType is 'image' or 'video'. - - Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg', - 'video/mp4', 'video/webm') - """ diff --git a/src/supermemory/types/search_documents_response.py b/src/supermemory/types/search_documents_response.py index 04ce581e..a8769aec 100644 --- a/src/supermemory/types/search_documents_response.py +++ b/src/supermemory/types/search_documents_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional -from datetime import datetime from pydantic import Field as FieldInfo @@ -25,7 +24,7 @@ class Result(BaseModel): chunks: List[ResultChunk] """Matching content chunks from the document""" - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Document creation date""" document_id: str = FieldInfo(alias="documentId") @@ -43,7 +42,7 @@ class Result(BaseModel): type: Optional[str] = None """Document type""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Document last update date""" content: Optional[str] = None diff --git a/src/supermemory/types/search_execute_response.py b/src/supermemory/types/search_execute_response.py index c1844442..c6518999 100644 --- a/src/supermemory/types/search_execute_response.py +++ b/src/supermemory/types/search_execute_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional -from datetime import datetime from pydantic import Field as FieldInfo @@ -25,7 +24,7 @@ class Result(BaseModel): chunks: List[ResultChunk] """Matching content chunks from the document""" - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Document creation date""" document_id: str = FieldInfo(alias="documentId") @@ -43,7 +42,7 @@ class Result(BaseModel): type: Optional[str] = None """Document type""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Document last update date""" content: Optional[str] = None diff --git a/src/supermemory/types/search_memories_response.py b/src/supermemory/types/search_memories_response.py index 224cf83e..9f78cf40 100644 --- a/src/supermemory/types/search_memories_response.py +++ b/src/supermemory/types/search_memories_response.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Optional -from datetime import datetime from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -25,7 +24,7 @@ class ResultContextChild(BaseModel): relation: Literal["updates", "extends", "derives"] """Relation type between this memory and its parent/child""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Contextual memory last update date""" metadata: Optional[Dict[str, object]] = None @@ -45,7 +44,7 @@ class ResultContextParent(BaseModel): relation: Literal["updates", "extends", "derives"] """Relation type between this memory and its parent/child""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Contextual memory last update date""" metadata: Optional[Dict[str, object]] = None @@ -68,10 +67,10 @@ class ResultDocument(BaseModel): id: str """Document ID""" - created_at: datetime = FieldInfo(alias="createdAt") + created_at: str = FieldInfo(alias="createdAt") """Document creation date""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Document last update date""" metadata: Optional[Dict[str, object]] = None @@ -100,7 +99,7 @@ class Result(BaseModel): similarity: float """Similarity score between the query and memory entry""" - updated_at: datetime = FieldInfo(alias="updatedAt") + updated_at: str = FieldInfo(alias="updatedAt") """Memory last update date""" context: Optional[ResultContext] = None diff --git a/src/supermemory/types/shared/and_.py b/src/supermemory/types/shared/and_.py index 9b80ae49..980dbb24 100644 --- a/src/supermemory/types/shared/and_.py +++ b/src/supermemory/types/shared/and_.py @@ -10,4 +10,4 @@ class And(BaseModel): - and_: List[And] = FieldInfo(alias="AND") + and_: List[object] = FieldInfo(alias="AND") diff --git a/src/supermemory/types/shared/or_.py b/src/supermemory/types/shared/or_.py index 693eab48..fe2c5a95 100644 --- a/src/supermemory/types/shared/or_.py +++ b/src/supermemory/types/shared/or_.py @@ -10,4 +10,4 @@ class Or(BaseModel): - or_: List[Or] = FieldInfo(alias="OR") + or_: List[object] = FieldInfo(alias="OR") diff --git a/src/supermemory/types/shared_params/and_.py b/src/supermemory/types/shared_params/and_.py index 6aa3768c..0e0dad21 100644 --- a/src/supermemory/types/shared_params/and_.py +++ b/src/supermemory/types/shared_params/and_.py @@ -11,4 +11,4 @@ class And(TypedDict, total=False): - and_: Required[Annotated[Iterable[And], PropertyInfo(alias="AND")]] + and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]] diff --git a/src/supermemory/types/shared_params/or_.py b/src/supermemory/types/shared_params/or_.py index d0947a89..fdb83e1f 100644 --- a/src/supermemory/types/shared_params/or_.py +++ b/src/supermemory/types/shared_params/or_.py @@ -11,4 +11,4 @@ class Or(TypedDict, total=False): - or_: Required[Annotated[Iterable[Or], PropertyInfo(alias="OR")]] + or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]] diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 0e693e7a..ffddf224 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -40,7 +40,6 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -49,7 +48,6 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(DocumentUpdateResponse, document, path=["response"]) @@ -101,18 +99,17 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -204,7 +201,6 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -213,7 +209,6 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(DocumentAddResponse, document, path=["response"]) @@ -301,7 +296,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="image/png", + mime_type="mimeType", ) assert_matches_type(DocumentUploadFileResponse, document, path=["response"]) @@ -354,7 +349,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -363,7 +357,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(DocumentUpdateResponse, document, path=["response"]) @@ -415,18 +408,17 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -518,7 +510,6 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -527,7 +518,6 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(DocumentAddResponse, document, path=["response"]) @@ -615,7 +605,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="image/png", + mime_type="mimeType", ) assert_matches_type(DocumentUploadFileResponse, document, path=["response"]) diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index 9d7f3848..1018413e 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -40,7 +40,6 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -49,7 +48,6 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(MemoryUpdateResponse, memory, path=["response"]) @@ -101,18 +99,17 @@ def test_method_list_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -204,7 +201,6 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -213,7 +209,6 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None: "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(MemoryAddResponse, memory, path=["response"]) @@ -301,7 +296,7 @@ def test_method_upload_file_with_all_params(self, client: Supermemory) -> None: container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="image/png", + mime_type="mimeType", ) assert_matches_type(MemoryUploadFileResponse, memory, path=["response"]) @@ -354,7 +349,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor container_tags=["user_123", "project_123"], content="This is a detailed article about machine learning concepts...", custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -363,7 +357,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(MemoryUpdateResponse, memory, path=["response"]) @@ -415,18 +408,17 @@ async def test_method_list_with_all_params(self, async_client: AsyncSupermemory) filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -518,7 +510,6 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) container_tag="user_123", container_tags=["user_123", "project_123"], custom_id="mem_abc123", - file_type="pdf", metadata={ "category": "technology", "isPublic": True, @@ -527,7 +518,6 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) "tag_1": "ai", "tag_2": "machine-learning", }, - mime_type="image/png", ) assert_matches_type(MemoryAddResponse, memory, path=["response"]) @@ -615,7 +605,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncSuper container_tags='["user_123", "project_123"]', file_type="image", metadata='{"category": "technology", "isPublic": true, "readingTime": 5}', - mime_type="image/png", + mime_type="mimeType", ) assert_matches_type(MemoryUploadFileResponse, memory, path=["response"]) diff --git a/tests/api_resources/test_search.py b/tests/api_resources/test_search.py index 810511c6..49e06305 100644 --- a/tests/api_resources/test_search.py +++ b/tests/api_resources/test_search.py @@ -42,18 +42,17 @@ def test_method_documents_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -113,18 +112,17 @@ def test_method_execute_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -180,18 +178,17 @@ def test_method_memories_with_all_params(self, client: Supermemory) -> None: filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -261,18 +258,17 @@ async def test_method_documents_with_all_params(self, async_client: AsyncSuperme filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -332,18 +328,17 @@ async def test_method_execute_with_all_params(self, async_client: AsyncSupermemo filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, @@ -399,18 +394,17 @@ async def test_method_memories_with_all_params(self, async_client: AsyncSupermem filters={ "and_": [ { + "filterType": "metadata", "key": "group", - "value": "jira_users", - "filter_type": "metadata", "negate": False, - "numeric_operator": ">", + "value": "jira_users", }, { + "filterType": "numeric", "key": "timestamp", - "value": "1742745777", - "filter_type": "numeric", "negate": False, - "numeric_operator": ">", + "numericOperator": ">", + "value": "1742745777", }, ] }, From f0cb0c7ca33c87f6e256b6416fadaef88ba2722a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 20:22:31 +0000 Subject: [PATCH 7/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 15131c84..11e2e20b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-cdabb80ed9d7dae231be9b5ec36bd1056bebea71d69780c8457789834763d678.yml -openapi_spec_hash: 5bc8a0413b16125cb0fd1ef5027614aa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-84f7e28cc6ff46d9047601e93bcfda9d73820c56356da0bbf8f0a3cbe84f3847.yml +openapi_spec_hash: 62b2bd52c8218b7d5eea3d6a03c00a11 config_hash: a478b24249ee4f53abfb5787ca4daf8b From 4ae06adf3c7639de539fb4f1a8f76747e36610ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 21:22:44 +0000 Subject: [PATCH 8/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 11e2e20b..ac4b130c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 18 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-84f7e28cc6ff46d9047601e93bcfda9d73820c56356da0bbf8f0a3cbe84f3847.yml -openapi_spec_hash: 62b2bd52c8218b7d5eea3d6a03c00a11 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-ff2201f4ff8f062673cb93068f6d3efeb46d6ac7ce66632418ec1825b03f6332.yml +openapi_spec_hash: 11b52dea5fc829a46baea91d0c7e3c4e config_hash: a478b24249ee4f53abfb5787ca4daf8b From ad729235b9ad0ef27dde21b9463cef94029f8321 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 21:23:02 +0000 Subject: [PATCH 9/9] release: 3.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 12 ++++++++++++ pyproject.toml | 2 +- src/supermemory/_version.py | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ff1c7af5..2437b419 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.3.0" + ".": "3.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d86b82c..6e5282c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 3.4.0 (2025-10-07) + +Full Changelog: [v3.3.0...v3.4.0](https://github.com/supermemoryai/python-sdk/compare/v3.3.0...v3.4.0) + +### Features + +* **api:** api update ([ad11246](https://github.com/supermemoryai/python-sdk/commit/ad112460d7aa5642895c4dec8b9c4e1993c01635)) +* **api:** api update ([0a01f62](https://github.com/supermemoryai/python-sdk/commit/0a01f623aa5daf19192259bee921e65acd583244)) +* **api:** api update ([91585de](https://github.com/supermemoryai/python-sdk/commit/91585de6396d6529c2d15b2b2c4db481e72f32d0)) +* **api:** api update ([2a12ab8](https://github.com/supermemoryai/python-sdk/commit/2a12ab834b2748eb30a6bad5ea6ce6e53644334e)) +* **api:** manual updates ([71bae29](https://github.com/supermemoryai/python-sdk/commit/71bae2938f3c523b3bb5f814e96937f067f454f5)) + ## 3.3.0 (2025-09-21) Full Changelog: [v3.2.0...v3.3.0](https://github.com/supermemoryai/python-sdk/compare/v3.2.0...v3.3.0) diff --git a/pyproject.toml b/pyproject.toml index 8819108b..31501529 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "supermemory" -version = "3.3.0" +version = "3.4.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 61a58fe6..0cd74f95 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.3.0" # x-release-please-version +__version__ = "3.4.0" # x-release-please-version