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
refactor(cli): use ConnectedAccountListParams['statuses'] for the cast
Replace the conditional-type incantation `Parameters<typeof client.connectedAccounts.list>[0] extends infer P ? P extends { statuses?: infer S } ? S : never : never` at two call sites with a direct cast to `ConnectedAccountListParams['statuses']`, which `@composio/client` exports for exactly this purpose. ConnectedAccounts.ts:114 was already using the shorter form. Two issues with the previous form: (a) the comment claimed it "widens" the type, but `as` cannot add values, so the framing was misleading; (b) if Stainless ever renames or moves the `statuses` field, the conditional silently resolves to `never` and swallows the cast — the direct member access fails loudly at the typecheck instead. Trim the duplicated multi-line comments to one line per call site. Addresses PR #3344 review comment P2#7.