From ea9fa65169561e426e57bcef448d787b96eca7bc Mon Sep 17 00:00:00 2001 From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com> Date: Wed, 24 Dec 2025 01:44:53 +0000 Subject: fix(docs): delete connections sdk snippet (#629) --- apps/docs/connectors/github.mdx | 17 +++++++++++++++-- apps/docs/connectors/overview.mdx | 23 +++++++++++++++++------ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/apps/docs/connectors/github.mdx b/apps/docs/connectors/github.mdx index 3fe69acf..68df9a4f 100644 --- a/apps/docs/connectors/github.mdx +++ b/apps/docs/connectors/github.mdx @@ -410,14 +410,27 @@ When you update the repository configuration: ```typescript // Delete by connection ID - const result = await client.connections.delete(connectionId); + const result = await client.connections.deleteByID(connectionId); + + // Or delete by provider (requires container tags) + const result = await client.connections.deleteByProvider('github', { + containerTags: ['user-123'] + }); + console.log('Deleted connection:', result.id); ``` ```python # Delete by connection ID - result = client.connections.delete(connection_id) + result = client.connections.delete_by_id(connection_id) + + # Or delete by provider (requires container tags) + result = client.connections.delete_by_provider( + provider='github', + container_tags=['user-123'] + ) + print(f'Deleted connection: {result.id}') ``` diff --git a/apps/docs/connectors/overview.mdx b/apps/docs/connectors/overview.mdx index c1428c10..046cc305 100644 --- a/apps/docs/connectors/overview.mdx +++ b/apps/docs/connectors/overview.mdx @@ -288,11 +288,16 @@ const client = new Supermemory({ apiKey: process.env.SUPERMEMORY_API_KEY! }); -// Delete by connection ID using SDK -const result = await client.connections.delete(connectionId); +// Delete by connection ID +const result = await client.connections.deleteByID(connectionId); + +// Or delete by provider (requires container tags) +const result = await client.connections.deleteByProvider('notion', { + containerTags: ['user-123'] +}); console.log('Deleted:', result.id, result.provider); -// Output: Deleted: conn_abc123 notion + ``` ```python Python @@ -301,11 +306,17 @@ import os client = Supermemory(api_key=os.environ.get("SUPERMEMORY_API_KEY")) -# Delete by connection ID using SDK -result = client.connections.delete(connection_id) +# Delete by connection ID +result = client.connections.delete_by_id(connection_id) + +# Or delete by provider (requires container tags) +result = client.connections.delete_by_provider( + provider='notion', + container_tags=['user-123'] +) print(f"Deleted: {result.id} {result.provider}") -# Output: Deleted: conn_abc123 notion + ``` ```bash cURL -- cgit v1.2.3