Skip to content
Open
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
126 changes: 105 additions & 21 deletions fern/openapi.json

Large diffs are not rendered by default.

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 = "5.0.1"
version = "5.0.2"
description = "The official Python library for the Supermemory API"
readme = "README.md"
license = "Apache-2.0"
Expand Down
8 changes: 8 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,14 @@ client.list(
<dl>
<dd>

**cursor:** `typing.Optional[str]` — Opaque cursor from a previous response's `pagination.nextCursor`. When present, `page` is ignored and results continue after the last item of the previous page. Filters, sort, order and limit must match the request that produced the cursor.

</dd>
</dl>

<dl>
<dd>

**page:** `typing.Optional[int]` — One-based page number

</dd>
Expand Down
12 changes: 12 additions & 0 deletions src/supermemory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
ConnectorInclude,
ConnectorLink,
ConnectorList,
ConnectorListPagination,
ConnectorProvider,
ConnectorRun,
ConnectorRunStatus,
Expand Down Expand Up @@ -124,6 +125,7 @@
NamespaceDeleted_Queued,
NamespaceDetails,
NamespaceList,
NamespaceListPagination,
NamespaceSystem,
Organization,
Pagination,
Expand Down Expand Up @@ -180,6 +182,7 @@
ConnectorConfigValueParams,
ConnectorDeletedParams,
ConnectorLinkParams,
ConnectorListPaginationParams,
ConnectorListParams,
ConnectorParams,
ConnectorRunParams,
Expand Down Expand Up @@ -261,6 +264,7 @@
NamespaceDeleted_DeletedParams,
NamespaceDeleted_QueuedParams,
NamespaceDetailsParams,
NamespaceListPaginationParams,
NamespaceListParams,
NamespaceParams,
NamespaceSystemParams,
Expand Down Expand Up @@ -313,6 +317,8 @@
"ConnectorLink": ".types",
"ConnectorLinkParams": ".requests",
"ConnectorList": ".types",
"ConnectorListPagination": ".types",
"ConnectorListPaginationParams": ".requests",
"ConnectorListParams": ".requests",
"ConnectorParams": ".requests",
"ConnectorProvider": ".types",
Expand Down Expand Up @@ -499,6 +505,8 @@
"NamespaceDetails": ".types",
"NamespaceDetailsParams": ".requests",
"NamespaceList": ".types",
"NamespaceListPagination": ".types",
"NamespaceListPaginationParams": ".requests",
"NamespaceListParams": ".requests",
"NamespaceParams": ".requests",
"NamespaceSystem": ".types",
Expand Down Expand Up @@ -623,6 +631,8 @@ def __dir__():
"ConnectorLink",
"ConnectorLinkParams",
"ConnectorList",
"ConnectorListPagination",
"ConnectorListPaginationParams",
"ConnectorListParams",
"ConnectorParams",
"ConnectorProvider",
Expand Down Expand Up @@ -810,6 +820,8 @@ def __dir__():
"NamespaceDetails",
"NamespaceDetailsParams",
"NamespaceList",
"NamespaceListPagination",
"NamespaceListPaginationParams",
"NamespaceListParams",
"NamespaceParams",
"NamespaceSystem",
Expand Down
10 changes: 10 additions & 0 deletions src/supermemory/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ def list(
namespace: str,
type: ListType,
*,
cursor: typing.Optional[str] = None,
page: typing.Optional[int] = None,
limit: typing.Optional[int] = None,
sort: typing.Optional[ListSort] = None,
Expand All @@ -396,6 +397,9 @@ def list(
type : ListType
Resource collection to list: source documents, extracted chunks, or learned memories

cursor : typing.Optional[str]
Opaque cursor from a previous response's `pagination.nextCursor`. When present, `page` is ignored and results continue after the last item of the previous page. Filters, sort, order and limit must match the request that produced the cursor.

page : typing.Optional[int]
One-based page number

Expand Down Expand Up @@ -439,6 +443,7 @@ def list(
_response = self._raw_client.list(
namespace,
type,
cursor=cursor,
page=page,
limit=limit,
sort=sort,
Expand Down Expand Up @@ -891,6 +896,7 @@ async def list(
namespace: str,
type: ListType,
*,
cursor: typing.Optional[str] = None,
page: typing.Optional[int] = None,
limit: typing.Optional[int] = None,
sort: typing.Optional[ListSort] = None,
Expand All @@ -914,6 +920,9 @@ async def list(
type : ListType
Resource collection to list: source documents, extracted chunks, or learned memories

cursor : typing.Optional[str]
Opaque cursor from a previous response's `pagination.nextCursor`. When present, `page` is ignored and results continue after the last item of the previous page. Filters, sort, order and limit must match the request that produced the cursor.

page : typing.Optional[int]
One-based page number

Expand Down Expand Up @@ -965,6 +974,7 @@ async def main() -> None:
_response = await self._raw_client.list(
namespace,
type,
cursor=cursor,
page=page,
limit=limit,
sort=sort,
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "supermemory/5.0.1",
"User-Agent": "supermemory/5.0.2",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
Expand Down
10 changes: 10 additions & 0 deletions src/supermemory/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ def list(
namespace: str,
type: ListType,
*,
cursor: typing.Optional[str] = None,
page: typing.Optional[int] = None,
limit: typing.Optional[int] = None,
sort: typing.Optional[ListSort] = None,
Expand All @@ -509,6 +510,9 @@ def list(
type : ListType
Resource collection to list: source documents, extracted chunks, or learned memories

cursor : typing.Optional[str]
Opaque cursor from a previous response's `pagination.nextCursor`. When present, `page` is ignored and results continue after the last item of the previous page. Filters, sort, order and limit must match the request that produced the cursor.

page : typing.Optional[int]
One-based page number

Expand Down Expand Up @@ -539,6 +543,7 @@ def list(
f"ns/{encode_path_param(namespace)}/list/{encode_path_param(type)}",
method="POST",
params={
"cursor": cursor,
"page": page,
"limit": limit,
"sort": sort,
Expand Down Expand Up @@ -1064,6 +1069,7 @@ async def list(
namespace: str,
type: ListType,
*,
cursor: typing.Optional[str] = None,
page: typing.Optional[int] = None,
limit: typing.Optional[int] = None,
sort: typing.Optional[ListSort] = None,
Expand All @@ -1087,6 +1093,9 @@ async def list(
type : ListType
Resource collection to list: source documents, extracted chunks, or learned memories

cursor : typing.Optional[str]
Opaque cursor from a previous response's `pagination.nextCursor`. When present, `page` is ignored and results continue after the last item of the previous page. Filters, sort, order and limit must match the request that produced the cursor.

page : typing.Optional[int]
One-based page number

Expand Down Expand Up @@ -1117,6 +1126,7 @@ async def list(
f"ns/{encode_path_param(namespace)}/list/{encode_path_param(type)}",
method="POST",
params={
"cursor": cursor,
"page": page,
"limit": limit,
"sort": sort,
Expand Down
6 changes: 6 additions & 0 deletions src/supermemory/requests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .connector_deleted import ConnectorDeletedParams
from .connector_link import ConnectorLinkParams
from .connector_list import ConnectorListParams
from .connector_list_pagination import ConnectorListPaginationParams
from .connector_run import ConnectorRunParams
from .connector_run_system import ConnectorRunSystemParams
from .connector_selection import ConnectorSelectionParams
Expand Down Expand Up @@ -105,6 +106,7 @@
from .namespace_deleted_queued import NamespaceDeletedQueuedParams
from .namespace_details import NamespaceDetailsParams
from .namespace_list import NamespaceListParams
from .namespace_list_pagination import NamespaceListPaginationParams
from .namespace_system import NamespaceSystemParams
from .organization import OrganizationParams
from .pagination import PaginationParams
Expand Down Expand Up @@ -138,6 +140,7 @@
"ConnectorConfigValueParams": ".connector_config_value",
"ConnectorDeletedParams": ".connector_deleted",
"ConnectorLinkParams": ".connector_link",
"ConnectorListPaginationParams": ".connector_list_pagination",
"ConnectorListParams": ".connector_list",
"ConnectorParams": ".connector",
"ConnectorRunParams": ".connector_run",
Expand Down Expand Up @@ -219,6 +222,7 @@
"NamespaceDeleted_DeletedParams": ".namespace_deleted",
"NamespaceDeleted_QueuedParams": ".namespace_deleted",
"NamespaceDetailsParams": ".namespace_details",
"NamespaceListPaginationParams": ".namespace_list_pagination",
"NamespaceListParams": ".namespace_list",
"NamespaceParams": ".namespace",
"NamespaceSystemParams": ".namespace_system",
Expand Down Expand Up @@ -278,6 +282,7 @@ def __dir__():
"ConnectorConfigValueParams",
"ConnectorDeletedParams",
"ConnectorLinkParams",
"ConnectorListPaginationParams",
"ConnectorListParams",
"ConnectorParams",
"ConnectorRunParams",
Expand Down Expand Up @@ -359,6 +364,7 @@ def __dir__():
"NamespaceDeleted_DeletedParams",
"NamespaceDeleted_QueuedParams",
"NamespaceDetailsParams",
"NamespaceListPaginationParams",
"NamespaceListParams",
"NamespaceParams",
"NamespaceSystemParams",
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/requests/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ConnectorParams(typing_extensions.TypedDict):

namespace: typing.Optional[str]
"""
Namespace the connector syncs into. Null only for connectors created before namespaces were required.
Namespace the connector syncs into. Connectors created without one report sm_project_default.
"""

account: typing.Optional[str]
Expand Down
4 changes: 2 additions & 2 deletions src/supermemory/requests/connector_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import typing_extensions
from .connector import ConnectorParams
from .pagination import PaginationParams
from .connector_list_pagination import ConnectorListPaginationParams


class ConnectorListParams(typing_extensions.TypedDict):
connectors: typing.Sequence[ConnectorParams]
pagination: PaginationParams
pagination: ConnectorListPaginationParams
"""
Pagination metadata
"""
28 changes: 28 additions & 0 deletions src/supermemory/requests/connector_list_pagination.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import typing_extensions
from ..core.serialization import FieldMetadata


class ConnectorListPaginationParams(typing_extensions.TypedDict):
"""
Pagination metadata
"""

current_page: typing_extensions.Annotated[float, FieldMetadata(alias="currentPage")]
limit: typing_extensions.NotRequired[float]
total_items: typing_extensions.Annotated[float, FieldMetadata(alias="totalItems")]
total_pages: typing_extensions.Annotated[float, FieldMetadata(alias="totalPages")]
has_more: typing_extensions.NotRequired[typing_extensions.Annotated[bool, FieldMetadata(alias="hasMore")]]
"""
Whether more items exist after this page
"""

next_cursor: typing_extensions.NotRequired[
typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nextCursor")]
]
"""
Opaque cursor for the next page. Pass it back as `cursor`. Null when there are no more items.
"""
2 changes: 1 addition & 1 deletion src/supermemory/requests/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DocumentParams(typing_extensions.TypedDict):

system: DocumentSystemParams
"""
Processing status, lifecycle timestamps, and storage path maintained by Supermemory
Ingestion source, processing status, lifecycle timestamps, and storage path maintained by Supermemory
"""

chunks: typing_extensions.NotRequired[typing.Sequence[ChunkParams]]
Expand Down
8 changes: 7 additions & 1 deletion src/supermemory/requests/document_system.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

import typing_extensions
from ..core.serialization import FieldMetadata
Expand All @@ -10,7 +11,12 @@

class DocumentSystemParams(typing_extensions.TypedDict):
"""
Processing status, lifecycle timestamps, and storage path maintained by Supermemory
Ingestion source, processing status, lifecycle timestamps, and storage path maintained by Supermemory
"""

source: typing.Optional[str]
"""
Recorded ingestion source; null when unavailable
"""

status: DocumentSystemStatus
Expand Down
4 changes: 2 additions & 2 deletions src/supermemory/requests/namespace_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import typing_extensions
from .namespace import NamespaceParams
from .pagination import PaginationParams
from .namespace_list_pagination import NamespaceListPaginationParams


class NamespaceListParams(typing_extensions.TypedDict):
Expand All @@ -13,7 +13,7 @@ class NamespaceListParams(typing_extensions.TypedDict):
Namespaces on this page, newest first
"""

pagination: PaginationParams
pagination: NamespaceListPaginationParams
"""
Pagination metadata
"""
28 changes: 28 additions & 0 deletions src/supermemory/requests/namespace_list_pagination.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file was auto-generated by Fern from our API Definition.

import typing

import typing_extensions
from ..core.serialization import FieldMetadata


class NamespaceListPaginationParams(typing_extensions.TypedDict):
"""
Pagination metadata
"""

current_page: typing_extensions.Annotated[float, FieldMetadata(alias="currentPage")]
limit: typing_extensions.NotRequired[float]
total_items: typing_extensions.Annotated[float, FieldMetadata(alias="totalItems")]
total_pages: typing_extensions.Annotated[float, FieldMetadata(alias="totalPages")]
has_more: typing_extensions.NotRequired[typing_extensions.Annotated[bool, FieldMetadata(alias="hasMore")]]
"""
Whether more items exist after this page
"""

next_cursor: typing_extensions.NotRequired[
typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nextCursor")]
]
"""
Opaque cursor for the next page. Pass it back as `cursor`. Null when there are no more items.
"""
2 changes: 1 addition & 1 deletion src/supermemory/requests/namespace_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ class NamespaceSystemParams(typing_extensions.TypedDict):

updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")]
"""
ISO 8601 timestamp of the latest namespace update
ISO 8601 timestamp of the latest change to the namespace's settings, documents, or memories
"""
Loading
Loading