@devries-cameron20 / composio Mirror · read-only / commits / 9bc05ea16
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 22:15 UTC

docs(auth): add twoslash setup to TS code blocks in migration guide

The docs build runs twoslash type-checking on every TypeScript code block in MDX. Three TS blocks in this file referenced \`composio\` without first declaring it, causing twoslash to fail with TS2304 \"Cannot find name 'composio'\" — surfaced as a build failure on the docs Vercel deploy and the typescript-check / test CI jobs. Prefix each TypeScript block with the canonical twoslash setup — Composio import + instantiation, then \`// ---cut---\` to hide it from the rendered output. Matches the pattern used by every other TS block in this directory (e.g. authenticating-tools.mdx, custom-auth-configs.mdx). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Composio committed May 5, 2026 at 16:05 UTC 9bc05ea16a2a35e103c82fa0687243196f84c25b
1 file changed +9
docs/content/docs/auth-configuration/migrating-initiate-to-link.mdx
+9
@@ -50,6 +50,9 @@ connected_account = connection_request.wait_for_connection()
50 **Before:**
51
52 ```typescript
53 +import { Composio } from '@composio/core';
54 +const composio = new Composio({ apiKey: 'your_api_key' });
55 +// ---cut---
56 const connectionRequest = await composio.connectedAccounts.initiate(
57 'user_123',
58 'ac_abc'
@@ -61,6 +64,9 @@ const connectedAccount = await connectionRequest.waitForConnection();
64 **After:**
65
66 ```typescript
67 +import { Composio } from '@composio/core';
68 +const composio = new Composio({ apiKey: 'your_api_key' });
69 +// ---cut---
70 const connectionRequest = await composio.connectedAccounts.link(
71 'user_123',
72 'ac_abc'
@@ -108,6 +114,9 @@ else:
114 </Tab>
115 <Tab value="TypeScript">
116 ```typescript
117 +import { Composio } from '@composio/core';
118 +const composio = new Composio({ apiKey: 'your_api_key' });
119 +// ---cut---
120 const authConfig = await composio.authConfigs.get('ac_abc');
121
122 const request = authConfig.isComposioManaged