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
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/supermemory-new-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand All @@ -34,17 +35,31 @@ jobs:
- name: Run lints
run: ./scripts/lint

upload:
if: github.repository == 'stainless-sdks/supermemory-new-python'
build:
if: github.repository == 'stainless-sdks/supermemory-new-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
timeout-minutes: 10
name: upload
name: build
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Install dependencies
run: rye sync --all-features

- name: Run build
run: rye build

- name: Get GitHub OIDC Token
id: github-oidc
uses: actions/github-script@v6
Expand All @@ -62,6 +77,7 @@ jobs:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/supermemory-new-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand Down
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.0.0-alpha.20"
".": "3.0.0-alpha.21"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-f259b18e66afb10f009640c303c9a2b829114ac52f968780c24a99655405d5f0.yml
openapi_spec_hash: a65d5f45b4d666a1caf6a22525690c8c
config_hash: 98555becb03f89d0fcf2e35a0fa6a41b
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-1a2a84a9cc99c25a9d726bc9300a72871f9469e3ceacebd5e71fd37e87891318.yml
openapi_spec_hash: e71e86a645bc47a86664080c8697b8db
config_hash: b560219f71fa815fec30fe25ca5a71f5
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 3.0.0-alpha.21 (2025-07-03)

Full Changelog: [v3.0.0-alpha.20...v3.0.0-alpha.21](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.20...v3.0.0-alpha.21)

### Features

* **api:** api update ([8b94b9e](https://github.com/supermemoryai/python-sdk/commit/8b94b9e043564f8daf605289683270dba97ca323))
* **api:** api update ([7b7eda7](https://github.com/supermemoryai/python-sdk/commit/7b7eda703a9d3dcf9b235a5045829c69147240c6))
* **api:** manual updates ([e7bfa6e](https://github.com/supermemoryai/python-sdk/commit/e7bfa6ef5804b758d3da98206ee643f9ae44ce0a))


### Bug Fixes

* **ci:** correct conditional ([0b20719](https://github.com/supermemoryai/python-sdk/commit/0b20719ce022a872dd7334587317235b7a5562c3))


### Chores

* **ci:** change upload type ([38f5701](https://github.com/supermemoryai/python-sdk/commit/38f5701dff0cc09b4a42d1c86e6250ed4695783d))
* **ci:** only run for pushes and fork pull requests ([901a43c](https://github.com/supermemoryai/python-sdk/commit/901a43c0c06fb8ed2ee2cfc3c56d44002b108a06))
* **internal:** codegen related update ([9c82bc7](https://github.com/supermemoryai/python-sdk/commit/9c82bc7c2fff3e85ec8a8d3278b04741bedaf7d3))

## 3.0.0-alpha.20 (2025-06-27)

Full Changelog: [v3.0.0-alpha.19...v3.0.0-alpha.20](https://github.com/supermemoryai/python-sdk/compare/v3.0.0-alpha.19...v3.0.0-alpha.20)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Types:
from supermemory_new.types import (
ConnectionCreateResponse,
ConnectionListResponse,
ConnectionDeleteByIDResponse,
ConnectionDeleteByProviderResponse,
ConnectionGetByIDResponse,
ConnectionGetByTagsResponse,
Expand All @@ -63,6 +64,7 @@ Methods:

- <code title="post /v3/connections/{provider}">client.connections.<a href="./src/supermemory_new/resources/connections.py">create</a>(provider, \*\*<a href="src/supermemory_new/types/connection_create_params.py">params</a>) -> <a href="./src/supermemory_new/types/connection_create_response.py">ConnectionCreateResponse</a></code>
- <code title="post /v3/connections/list">client.connections.<a href="./src/supermemory_new/resources/connections.py">list</a>(\*\*<a href="src/supermemory_new/types/connection_list_params.py">params</a>) -> <a href="./src/supermemory_new/types/connection_list_response.py">ConnectionListResponse</a></code>
- <code title="delete /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory_new/resources/connections.py">delete_by_id</a>(connection_id) -> <a href="./src/supermemory_new/types/connection_delete_by_id_response.py">ConnectionDeleteByIDResponse</a></code>
- <code title="delete /v3/connections/{provider}">client.connections.<a href="./src/supermemory_new/resources/connections.py">delete_by_provider</a>(provider, \*\*<a href="src/supermemory_new/types/connection_delete_by_provider_params.py">params</a>) -> <a href="./src/supermemory_new/types/connection_delete_by_provider_response.py">ConnectionDeleteByProviderResponse</a></code>
- <code title="get /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory_new/resources/connections.py">get_by_id</a>(connection_id) -> <a href="./src/supermemory_new/types/connection_get_by_id_response.py">ConnectionGetByIDResponse</a></code>
- <code title="post /v3/connections/{provider}/connection">client.connections.<a href="./src/supermemory_new/resources/connections.py">get_by_tags</a>(provider, \*\*<a href="src/supermemory_new/types/connection_get_by_tags_params.py">params</a>) -> <a href="./src/supermemory_new/types/connection_get_by_tags_response.py">ConnectionGetByTagsResponse</a></code>
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.0.0-alpha.20"
version = "3.0.0-alpha.21"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
12 changes: 7 additions & 5 deletions scripts/utils/upload-artifact.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
set -exuo pipefail

RESPONSE=$(curl -X POST "$URL" \
FILENAME=$(basename dist/*.whl)

RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \
-H "Authorization: Bearer $AUTH" \
-H "Content-Type: application/json")

Expand All @@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then
exit 1
fi

UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
-H "Content-Type: application/gzip" \
--data-binary @- "$SIGNED_URL" 2>&1)
UPLOAD_RESPONSE=$(curl -v -X PUT \
-H "Content-Type: binary/octet-stream" \
--data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1)

if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
echo -e "\033[32mInstallation: pip install --pre 'https://pkg.stainless.com/s/supermemory-new-python/$SHA'\033[0m"
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/supermemory-new-python/$SHA/$FILENAME'\033[0m"
else
echo -e "\033[31mFailed to upload artifact.\033[0m"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory_new/_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_new"
__version__ = "3.0.0-alpha.20" # x-release-please-version
__version__ = "3.0.0-alpha.21" # x-release-please-version
79 changes: 79 additions & 0 deletions src/supermemory_new/resources/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from ..types.connection_create_response import ConnectionCreateResponse
from ..types.connection_get_by_id_response import ConnectionGetByIDResponse
from ..types.connection_get_by_tags_response import ConnectionGetByTagsResponse
from ..types.connection_delete_by_id_response import ConnectionDeleteByIDResponse
from ..types.connection_list_documents_response import ConnectionListDocumentsResponse
from ..types.connection_delete_by_provider_response import ConnectionDeleteByProviderResponse

Expand Down Expand Up @@ -136,6 +137,39 @@ def list(
cast_to=ConnectionListResponse,
)

def delete_by_id(
self,
connection_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConnectionDeleteByIDResponse:
"""
Delete a specific connection by ID

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not connection_id:
raise ValueError(f"Expected a non-empty value for `connection_id` but received {connection_id!r}")
return self._delete(
f"/v3/connections/{connection_id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=ConnectionDeleteByIDResponse,
)

def delete_by_provider(
self,
provider: Literal["notion", "google-drive", "onedrive"],
Expand Down Expand Up @@ -428,6 +462,39 @@ async def list(
cast_to=ConnectionListResponse,
)

async def delete_by_id(
self,
connection_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConnectionDeleteByIDResponse:
"""
Delete a specific connection by ID

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not connection_id:
raise ValueError(f"Expected a non-empty value for `connection_id` but received {connection_id!r}")
return await self._delete(
f"/v3/connections/{connection_id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=ConnectionDeleteByIDResponse,
)

async def delete_by_provider(
self,
provider: Literal["notion", "google-drive", "onedrive"],
Expand Down Expand Up @@ -630,6 +697,9 @@ def __init__(self, connections: ConnectionsResource) -> None:
self.list = to_raw_response_wrapper(
connections.list,
)
self.delete_by_id = to_raw_response_wrapper(
connections.delete_by_id,
)
self.delete_by_provider = to_raw_response_wrapper(
connections.delete_by_provider,
)
Expand Down Expand Up @@ -657,6 +727,9 @@ def __init__(self, connections: AsyncConnectionsResource) -> None:
self.list = async_to_raw_response_wrapper(
connections.list,
)
self.delete_by_id = async_to_raw_response_wrapper(
connections.delete_by_id,
)
self.delete_by_provider = async_to_raw_response_wrapper(
connections.delete_by_provider,
)
Expand Down Expand Up @@ -684,6 +757,9 @@ def __init__(self, connections: ConnectionsResource) -> None:
self.list = to_streamed_response_wrapper(
connections.list,
)
self.delete_by_id = to_streamed_response_wrapper(
connections.delete_by_id,
)
self.delete_by_provider = to_streamed_response_wrapper(
connections.delete_by_provider,
)
Expand Down Expand Up @@ -711,6 +787,9 @@ def __init__(self, connections: AsyncConnectionsResource) -> None:
self.list = async_to_streamed_response_wrapper(
connections.list,
)
self.delete_by_id = async_to_streamed_response_wrapper(
connections.delete_by_id,
)
self.delete_by_provider = async_to_streamed_response_wrapper(
connections.delete_by_provider,
)
Expand Down
4 changes: 0 additions & 4 deletions src/supermemory_new/resources/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def update(
*,
exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
filter_prompt: Optional[str] | NotGiven = NOT_GIVEN,
filter_tags: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
google_drive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
google_drive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
google_drive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -86,7 +85,6 @@ def update(
{
"exclude_items": exclude_items,
"filter_prompt": filter_prompt,
"filter_tags": filter_tags,
"google_drive_client_id": google_drive_client_id,
"google_drive_client_secret": google_drive_client_secret,
"google_drive_custom_key_enabled": google_drive_custom_key_enabled,
Expand Down Expand Up @@ -152,7 +150,6 @@ async def update(
*,
exclude_items: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
filter_prompt: Optional[str] | NotGiven = NOT_GIVEN,
filter_tags: Union[str, float, bool, Dict[str, object], Iterable[object], None] | NotGiven = NOT_GIVEN,
google_drive_client_id: Optional[str] | NotGiven = NOT_GIVEN,
google_drive_client_secret: Optional[str] | NotGiven = NOT_GIVEN,
google_drive_custom_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -189,7 +186,6 @@ async def update(
{
"exclude_items": exclude_items,
"filter_prompt": filter_prompt,
"filter_tags": filter_tags,
"google_drive_client_id": google_drive_client_id,
"google_drive_client_secret": google_drive_client_secret,
"google_drive_custom_key_enabled": google_drive_custom_key_enabled,
Expand Down
1 change: 1 addition & 0 deletions src/supermemory_new/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .connection_get_by_id_response import ConnectionGetByIDResponse as ConnectionGetByIDResponse
from .connection_get_by_tags_params import ConnectionGetByTagsParams as ConnectionGetByTagsParams
from .connection_get_by_tags_response import ConnectionGetByTagsResponse as ConnectionGetByTagsResponse
from .connection_delete_by_id_response import ConnectionDeleteByIDResponse as ConnectionDeleteByIDResponse
from .connection_list_documents_params import ConnectionListDocumentsParams as ConnectionListDocumentsParams
from .connection_list_documents_response import ConnectionListDocumentsResponse as ConnectionListDocumentsResponse
from .connection_delete_by_provider_params import ConnectionDeleteByProviderParams as ConnectionDeleteByProviderParams
Expand Down
11 changes: 11 additions & 0 deletions src/supermemory_new/types/connection_delete_by_id_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .._models import BaseModel

__all__ = ["ConnectionDeleteByIDResponse"]


class ConnectionDeleteByIDResponse(BaseModel):
id: str

provider: str
4 changes: 0 additions & 4 deletions src/supermemory_new/types/setting_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ class SettingGetResponse(BaseModel):

filter_prompt: Optional[str] = FieldInfo(alias="filterPrompt", default=None)

filter_tags: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
alias="filterTags", default=None
)

google_drive_client_id: Optional[str] = FieldInfo(alias="googleDriveClientId", default=None)

google_drive_client_secret: Optional[str] = FieldInfo(alias="googleDriveClientSecret", default=None)
Expand Down
4 changes: 0 additions & 4 deletions src/supermemory_new/types/setting_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ class SettingUpdateParams(TypedDict, total=False):

filter_prompt: Annotated[Optional[str], PropertyInfo(alias="filterPrompt")]

filter_tags: Annotated[
Union[str, float, bool, Dict[str, object], Iterable[object], None], PropertyInfo(alias="filterTags")
]

google_drive_client_id: Annotated[Optional[str], PropertyInfo(alias="googleDriveClientId")]

google_drive_client_secret: Annotated[Optional[str], PropertyInfo(alias="googleDriveClientSecret")]
Expand Down
4 changes: 0 additions & 4 deletions src/supermemory_new/types/setting_update_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ class Updated(BaseModel):

filter_prompt: Optional[str] = FieldInfo(alias="filterPrompt", default=None)

filter_tags: Union[str, float, bool, Dict[str, object], List[object], None] = FieldInfo(
alias="filterTags", default=None
)

google_drive_client_id: Optional[str] = FieldInfo(alias="googleDriveClientId", default=None)

google_drive_client_secret: Optional[str] = FieldInfo(alias="googleDriveClientSecret", default=None)
Expand Down
Loading