diff options
| author | MaheshtheDev <[email protected]> | 2025-12-24 01:44:53 +0000 |
|---|---|---|
| committer | MaheshtheDev <[email protected]> | 2025-12-24 01:44:53 +0000 |
| commit | ea9fa65169561e426e57bcef448d787b96eca7bc (patch) | |
| tree | a1e14fc00aebcad102d64384174f5f8208d5fa83 | |
| parent | feat(@supermemory/tools): vercel ai sdk compatbile with v5 and v6 (#628) (diff) | |
| download | supermemory-ea9fa65169561e426e57bcef448d787b96eca7bc.tar.xz supermemory-ea9fa65169561e426e57bcef448d787b96eca7bc.zip | |
fix(docs): delete connections sdk snippet (#629)12-23-fix_docs_delete_connections_sdk_snippet
| -rw-r--r-- | apps/docs/connectors/github.mdx | 17 | ||||
| -rw-r--r-- | 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: <Tab title="TypeScript"> ```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); ``` </Tab> <Tab title="Python"> ```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}') ``` </Tab> 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 |