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 22, 00:45 UTC
fix(core): add connection param to connectedAccounts.update() (#3161)
## Summary The TS SDK `connectedAccounts.update()` only passes `alias` to the PATCH endpoint. The `connection` param for credential updates is missing — unlike the Python SDK which already supports both. ## Changes - Add `connection` (optional) to `UpdateConnectedAccountParamsSchema` with `state.authScheme` and `state.val` - Make `alias` optional (was required — can't update credentials without also passing alias) - Pass `connection` through to `client.connectedAccounts.patch()` - Update JSDoc with credential update example ## Usage ```typescript // Update credentials await composio.connectedAccounts.update('ca_abc123', { connection: { state: { authScheme: 'BEARER_TOKEN', val: { token: 'new-access-token' }, }, }, }); // Update alias (unchanged) await composio.connectedAccounts.update('ca_abc123', { alias: 'work-gmail' }); // Both at once await composio.connectedAccounts.update('ca_abc123', { alias: 'work-gmail', connection: { state: { authScheme: 'BEARER_TOKEN', val: { token: 'new-access-token' }, }, }, }); ```
No changes.