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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.59.0"
".": "3.60.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 26
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-4bec4aac7a4fd11299c105dd60bc086c0aaf51d5cd0f63075efefa56bc19a67f.yml
openapi_spec_hash: f87b9769f91d448f4eb797c37ef4d061
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-d7845a9c7875d892f8d627e0ef60ac61fb28f2520de5eca2063818fd78af431b.yml
openapi_spec_hash: 1827547045c4ef804428e8feeb66e170
config_hash: cde97ef3188581c5f4924c633ec33ddb
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.60.0 (2026-09-01)

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

### Features

* **api:** api update ([8531a88](https://github.com/supermemoryai/python-sdk/commit/8531a888ad97a9279708ee9bf0bf370aa8198f2f))

## 3.59.0 (2026-08-14)

Full Changelog: [v3.58.0...v3.59.0](https://github.com/supermemoryai/python-sdk/compare/v3.58.0...v3.59.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Methods:
- <code title="post /v3/documents/batch">client.documents.<a href="./src/supermemory/resources/documents.py">batch_add</a>(\*\*<a href="src/supermemory/types/document_batch_add_params.py">params</a>) -> <a href="./src/supermemory/types/document_batch_add_response.py">DocumentBatchAddResponse</a></code>
- <code title="delete /v3/documents/bulk">client.documents.<a href="./src/supermemory/resources/documents.py">delete_bulk</a>(\*\*<a href="src/supermemory/types/document_delete_bulk_params.py">params</a>) -> <a href="./src/supermemory/types/document_delete_bulk_response.py">DocumentDeleteBulkResponse</a></code>
- <code title="get /v3/documents/{id}">client.documents.<a href="./src/supermemory/resources/documents.py">get</a>(id) -> <a href="./src/supermemory/types/document_get_response.py">DocumentGetResponse</a></code>
- <code title="get /v3/documents/processing">client.documents.<a href="./src/supermemory/resources/documents.py">list_processing</a>() -> <a href="./src/supermemory/types/document_list_processing_response.py">DocumentListProcessingResponse</a></code>
- <code title="get /v3/documents/processing">client.documents.<a href="./src/supermemory/resources/documents.py">list_processing</a>(\*\*<a href="src/supermemory/types/document_list_processing_params.py">params</a>) -> <a href="./src/supermemory/types/document_list_processing_response.py">DocumentListProcessingResponse</a></code>
- <code title="post /v3/documents/file">client.documents.<a href="./src/supermemory/resources/documents.py">upload_file</a>(\*\*<a href="src/supermemory/types/document_upload_file_params.py">params</a>) -> <a href="./src/supermemory/types/document_upload_file_response.py">DocumentUploadFileResponse</a></code>

# Search
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "3.59.0"
version = "3.60.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "supermemory"
__version__ = "3.59.0" # x-release-please-version
__version__ = "3.60.0" # x-release-please-version
85 changes: 81 additions & 4 deletions src/supermemory/resources/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
document_batch_add_params,
document_delete_bulk_params,
document_upload_file_params,
document_list_processing_params,
)
from .._files import deepcopy_with_paths
from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, SequenceNotStr, omit, not_given
Expand Down Expand Up @@ -538,18 +539,56 @@ def get(
def list_processing(
self,
*,
container_tags: str | Omit = omit,
limit: Union[str, float] | Omit = omit,
page: Union[str, float] | Omit = omit,
view: Literal["active", "all"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DocumentListProcessingResponse:
"""Get documents that are currently being processed"""
"""Get documents that are currently being processed.

Default `view=active` is the
live in-flight queue. `view=all` also includes failed and stuck documents.

Args:
container_tags: Comma-separated container tags to filter by

limit: Number of items per page. Used with `view=all`.

page: Page number to fetch. Used with `view=all`.

view: `active` returns in-flight documents updated in the last 4 hours. `all` also
includes failed and stuck documents.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get(
"/v3/documents/processing",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"container_tags": container_tags,
"limit": limit,
"page": page,
"view": view,
},
document_list_processing_params.DocumentListProcessingParams,
),
),
cast_to=DocumentListProcessingResponse,
)
Expand Down Expand Up @@ -1167,18 +1206,56 @@ async def get(
async def list_processing(
self,
*,
container_tags: str | Omit = omit,
limit: Union[str, float] | Omit = omit,
page: Union[str, float] | Omit = omit,
view: Literal["active", "all"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DocumentListProcessingResponse:
"""Get documents that are currently being processed"""
"""Get documents that are currently being processed.

Default `view=active` is the
live in-flight queue. `view=all` also includes failed and stuck documents.

Args:
container_tags: Comma-separated container tags to filter by

limit: Number of items per page. Used with `view=all`.

page: Page number to fetch. Used with `view=all`.

view: `active` returns in-flight documents updated in the last 4 hours. `all` also
includes failed and stuck documents.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._get(
"/v3/documents/processing",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{
"container_tags": container_tags,
"limit": limit,
"page": page,
"view": view,
},
document_list_processing_params.DocumentListProcessingParams,
),
),
cast_to=DocumentListProcessingResponse,
)
Expand Down
1 change: 1 addition & 0 deletions src/supermemory/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from .memory_update_memory_response import MemoryUpdateMemoryResponse as MemoryUpdateMemoryResponse
from .connection_delete_by_id_params import ConnectionDeleteByIDParams as ConnectionDeleteByIDParams
from .connection_get_by_tag_response import ConnectionGetByTagResponse as ConnectionGetByTagResponse
from .document_list_processing_params import DocumentListProcessingParams as DocumentListProcessingParams
from .connection_delete_by_id_response import ConnectionDeleteByIDResponse as ConnectionDeleteByIDResponse
from .connection_list_documents_params import ConnectionListDocumentsParams as ConnectionListDocumentsParams
from .document_list_processing_response import DocumentListProcessingResponse as DocumentListProcessingResponse
Expand Down
27 changes: 27 additions & 0 deletions src/supermemory/types/document_list_processing_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Union
from typing_extensions import Literal, Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["DocumentListProcessingParams"]


class DocumentListProcessingParams(TypedDict, total=False):
container_tags: Annotated[str, PropertyInfo(alias="containerTags")]
"""Comma-separated container tags to filter by"""

limit: Union[str, float]
"""Number of items per page. Used with `view=all`."""

page: Union[str, float]
"""Page number to fetch. Used with `view=all`."""

view: Literal["active", "all"]
"""`active` returns in-flight documents updated in the last 4 hours.

`all` also includes failed and stuck documents.
"""
26 changes: 25 additions & 1 deletion src/supermemory/types/document_list_processing_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from .._models import BaseModel

__all__ = ["DocumentListProcessingResponse", "Document"]
__all__ = ["DocumentListProcessingResponse", "Document", "Pagination"]


class Document(BaseModel):
Expand Down Expand Up @@ -76,6 +76,27 @@ class Document(BaseModel):
to use to group documents.
"""

error_code: Optional[str] = FieldInfo(alias="errorCode", default=None)
"""Stable error code when processing failed, if available"""

error_message: Optional[str] = FieldInfo(alias="errorMessage", default=None)
"""Human-readable processing error, if available"""

stuck: Optional[bool] = None
"""True when the document is not done/failed and has not been updated for 4 hours"""


class Pagination(BaseModel):
"""Present when `view=all`"""

current_page: float = FieldInfo(alias="currentPage")

total_items: float = FieldInfo(alias="totalItems")

total_pages: float = FieldInfo(alias="totalPages")

limit: Optional[float] = None


class DocumentListProcessingResponse(BaseModel):
"""List of documents currently being processed"""
Expand All @@ -84,3 +105,6 @@ class DocumentListProcessingResponse(BaseModel):

total_count: float = FieldInfo(alias="totalCount")
"""Total number of processing documents"""

pagination: Optional[Pagination] = None
"""Present when `view=all`"""
22 changes: 22 additions & 0 deletions tests/api_resources/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,17 @@ def test_method_list_processing(self, client: Supermemory) -> None:
document = client.documents.list_processing()
assert_matches_type(DocumentListProcessingResponse, document, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_list_processing_with_all_params(self, client: Supermemory) -> None:
document = client.documents.list_processing(
container_tags="user_123,sm_project_default",
limit="50",
page="1",
view="all",
)
assert_matches_type(DocumentListProcessingResponse, document, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_list_processing(self, client: Supermemory) -> None:
Expand Down Expand Up @@ -902,6 +913,17 @@ async def test_method_list_processing(self, async_client: AsyncSupermemory) -> N
document = await async_client.documents.list_processing()
assert_matches_type(DocumentListProcessingResponse, document, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_list_processing_with_all_params(self, async_client: AsyncSupermemory) -> None:
document = await async_client.documents.list_processing(
container_tags="user_123,sm_project_default",
limit="50",
page="1",
view="all",
)
assert_matches_type(DocumentListProcessingResponse, document, path=["response"])

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_list_processing(self, async_client: AsyncSupermemory) -> None:
Expand Down