Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | import type { ProductArea, ProductAreaSlug } from './types'; |
| 2 | |
| 3 | export const PRODUCT_AREAS: readonly ProductArea[] = [ |
| 4 | { |
| 5 | slug: 'authentication-and-connected-accounts', |
| 6 | title: 'Authentication and connected accounts', |
| 7 | description: 'OAuth, auth configs, credentials, scopes, and connection lifecycle.', |
| 8 | defaultBrowse: true, |
| 9 | }, |
| 10 | { |
| 11 | slug: 'tools-actions-and-execution', |
| 12 | title: 'Tools, actions, and execution', |
| 13 | description: 'Find tools, run actions, manage sessions, and troubleshoot execution.', |
| 14 | defaultBrowse: true, |
| 15 | }, |
| 16 | { |
| 17 | slug: 'triggers-and-workflows', |
| 18 | title: 'Triggers and workflows', |
| 19 | description: 'Configure triggers, receive events, and build reliable workflows.', |
| 20 | defaultBrowse: true, |
| 21 | }, |
| 22 | { |
| 23 | slug: 'sdk-api-and-mcp', |
| 24 | title: 'SDK, API, and MCP', |
| 25 | description: 'Integrate Composio through SDKs, platform APIs, MCP, and developer tooling.', |
| 26 | defaultBrowse: true, |
| 27 | }, |
| 28 | { |
| 29 | slug: 'account-billing-and-security', |
| 30 | title: 'Account, billing, and security', |
| 31 | description: 'Manage organizations, projects, billing, permissions, privacy, and security.', |
| 32 | defaultBrowse: true, |
| 33 | }, |
| 34 | ] as const; |
| 35 | |
| 36 | const PRODUCT_AREA_REDIRECTS: Readonly<Record<string, string>> = { |
| 37 | authentication: '/kb/topic/authentication-and-connected-accounts', |
| 38 | 'tools-and-actions': '/kb/topic/tools-actions-and-execution', |
| 39 | 'triggers-and-webhooks': '/kb/topic/triggers-and-workflows', |
| 40 | 'tool-router-mcp-and-workbench': '/kb/topic/sdk-api-and-mcp', |
| 41 | 'sdk-and-api': '/kb/topic/sdk-api-and-mcp', |
| 42 | 'projects-dashboard-and-billing': '/kb/topic/account-billing-and-security', |
| 43 | 'composio-for-you': '/kb/search?q=Composio+For+You', |
| 44 | }; |
| 45 | |
| 46 | const PRODUCT_AREA_BY_SLUG = new Map(PRODUCT_AREAS.map((area) => [area.slug, area])); |
| 47 | |
| 48 | export function isProductAreaSlug(value: string): value is ProductAreaSlug { |
| 49 | return PRODUCT_AREA_BY_SLUG.has(value as ProductAreaSlug); |
| 50 | } |
| 51 | |
| 52 | export function getProductArea(slug: ProductAreaSlug): ProductArea { |
| 53 | const area = PRODUCT_AREA_BY_SLUG.get(slug); |
| 54 | if (!area) throw new Error(`Unknown product area: ${slug}`); |
| 55 | return area; |
| 56 | } |
| 57 | |
| 58 | export function getProductAreaRedirect(slug: string): string | null { |
| 59 | return PRODUCT_AREA_REDIRECTS[slug] ?? null; |
| 60 | } |