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, 06:00 UTC
| 1 | import { Command, Flag } from 'effect/cli'; |
| 2 | import { runConnectedAccountsList } from './connected-accounts.list.handler'; |
| 3 | |
| 4 | const toolkits = Flag.String('toolkits').pipe( |
| 5 | Flag.withDescription('Filter by toolkit slugs, comma-separated (e.g. "gmail" or "gmail,slack")'), |
| 6 | Flag.optional |
| 7 | ); |
| 8 | |
| 9 | const status = Flag.Literals('status', [ |
| 10 | 'INITIALIZING', |
| 11 | 'INITIATED', |
| 12 | 'ACTIVE', |
| 13 | 'FAILED', |
| 14 | 'EXPIRED', |
| 15 | 'INACTIVE', |
| 16 | 'REVOKED', |
| 17 | ] as const).pipe(Flag.withDescription('Filter by connection status'), Flag.optional); |
| 18 | |
| 19 | const limit = Flag.Int('limit').pipe( |
| 20 | Flag.withDefault(30), |
| 21 | Flag.withDescription('Number of results per page (1-1000)') |
| 22 | ); |
| 23 | |
| 24 | /** |
| 25 | * List connected accounts with optional filters. |
| 26 | * |
| 27 | * @example |
| 28 | * ```bash |
| 29 | * composio dev connected-accounts list |
| 30 | * composio dev connected-accounts list --toolkits "gmail" |
| 31 | * composio dev connected-accounts list --user-id "default" --status ACTIVE |
| 32 | * ``` |
| 33 | */ |
| 34 | export const connectedAccountsCmd$List = Command.make( |
| 35 | 'list', |
| 36 | { toolkits, status, limit }, |
| 37 | runConnectedAccountsList |
| 38 | ).pipe(Command.withDescription('List connected accounts.')); |