import { APIResource } from "../core/resource.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; /** * Toolkit and tool management */ export declare class Toolkits extends APIResource { /** * Retrieves comprehensive information about a specific toolkit using its unique * slug identifier. This endpoint provides detailed metadata, authentication * configuration options, and feature counts for the requested toolkit. */ retrieve(slug: string, query?: ToolkitRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieves a comprehensive list of toolkits of their latest versions that are * available to the authenticated project. Toolkits represent integration points * with external services and applications, each containing a collection of tools * and triggers. This endpoint supports filtering by category and management type, * as well as different sorting options. */ list(query?: ToolkitListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieves a comprehensive list of all available toolkit categories from their * latest versions. These categories can be used to filter toolkits by type or * purpose when using the toolkit listing endpoint. Categories help organize * toolkits into logical groups based on their functionality or industry focus. */ retrieveCategories(options?: RequestOptions): APIPromise; } /** * Detailed information about a single toolkit */ export interface ToolkitRetrieveResponse { /** * Managed-auth-only metadata, including the supported OAuth scope ceiling. */ composio_managed_auth: Array; deprecated: ToolkitRetrieveResponse.Deprecated; /** * Indicates if this toolkit is currently enabled and available for use */ enabled: boolean; /** * @deprecated DEPRECATED: This field is no longer meaningful and will always * return false. It was previously used to indicate if a toolkit is specific to the * current project. */ is_local_toolkit: boolean; /** * Comprehensive metadata for the toolkit including dates, descriptions, and * statistics */ meta: ToolkitRetrieveResponse.Meta; /** * Human-readable name of the toolkit */ name: string; /** * URL-friendly unique identifier for the toolkit */ slug: string; /** * Toolkit provenance: "native" for Composio-managed toolkits, "custom" for a * project-registered custom (MCP) toolkit */ type: 'native' | 'custom'; /** * Complete authentication configuration details for each supported auth method */ auth_config_details?: Array; /** * URL to a guide page with authentication setup instructions for this toolkit */ auth_guide_url?: string | null; /** * If evaluation of base URL needs some connection info (like shopify), please * create the connection and get the base URL from there */ base_url?: string; /** * List of authentication methods that Composio manages for this toolkit */ composio_managed_auth_schemes?: Array; /** * Endpoint to get the current user */ get_current_user_endpoint?: string; /** * HTTP method to use when calling the get current user endpoint (e.g., GET, POST) */ get_current_user_endpoint_method?: string; } export declare namespace ToolkitRetrieveResponse { interface ComposioManagedAuth { /** * Authentication mode for the Composio-managed auth config */ mode: string; /** * OAuth scopes available in the Composio-managed auth config for this auth mode. */ scopes: ComposioManagedAuth.Scopes; /** * OAuth user scopes available in the Composio-managed auth config for this auth * mode. Only present for Slack toolkits. */ user_scopes?: ComposioManagedAuth.UserScopes; } namespace ComposioManagedAuth { /** * OAuth scopes available in the Composio-managed auth config for this auth mode. */ interface Scopes { /** * Available OAuth scopes */ available: Array; } /** * OAuth user scopes available in the Composio-managed auth config for this auth * mode. Only present for Slack toolkits. */ interface UserScopes { /** * Available OAuth user scopes */ available: Array; } } interface Deprecated { rawProxyInfoByAuthSchemes: Array<{ [key: string]: unknown; }>; toolkitId: string; getCurrentUserEndpoint?: string; } /** * Comprehensive metadata for the toolkit including dates, descriptions, and * statistics */ interface Meta { /** * Available versions of the toolkit */ available_versions: Array; /** * List of categories associated with this toolkit */ categories: Array; /** * Creation date and time of the toolkit */ created_at: string; /** * Human-readable description explaining the toolkit's purpose and functionality */ description: string; /** * Image URL for the toolkit's branding */ logo: string; /** * Count of available tools in this toolkit */ tools_count: number; /** * Count of available triggers in this toolkit */ triggers_count: number; /** * Last modification date and time of the toolkit */ updated_at: string; /** * Version of the toolkit */ version: string; /** * Link to the toolkit's main application or service website */ app_url?: string | null; } namespace Meta { interface Category { /** * Human-readable category name */ name: string; /** * URL-friendly identifier for the category */ slug: string; } } /** * Detailed configuration for an authentication method */ interface AuthConfigDetail { /** * Field groups required for different authentication stages */ fields: AuthConfigDetail.Fields; /** * The type of authentication mode (e.g., oauth2, basic_auth, api_key) */ mode: string; /** * Display name for this authentication method */ name: string; /** * URL to a page where users can obtain or configure credentials for this * authentication method */ auth_hint_url?: string | null; /** * @deprecated Authentication URL fields for OAuth 2.0 and OAuth 1.0. We don't * recommend using this field for authentication and might break post Aug 31 2025. */ deprecated_auth_provider_details?: AuthConfigDetail.DeprecatedAuthProviderDetails; /** * Configuration for proxying authentication requests to external services */ proxy?: AuthConfigDetail.Proxy; } namespace AuthConfigDetail { /** * Field groups required for different authentication stages */ interface Fields { /** * Form fields needed when creating an authentication configuration */ auth_config_creation: Fields.AuthConfigCreation; /** * Form fields needed when connecting a user account with this authentication * method */ connected_account_initiation: Fields.ConnectedAccountInitiation; } namespace Fields { /** * Form fields needed when creating an authentication configuration */ interface AuthConfigCreation { optional: Array; required: Array; } namespace AuthConfigCreation { interface Optional { description: string; displayName: string; name: string; required: boolean; type: string; default?: string | null; is_secret?: boolean; legacy_template_name?: string; } interface Required { description: string; displayName: string; name: string; required: boolean; type: string; default?: string | null; is_secret?: boolean; legacy_template_name?: string; } } /** * Form fields needed when connecting a user account with this authentication * method */ interface ConnectedAccountInitiation { optional: Array; required: Array; } namespace ConnectedAccountInitiation { interface Optional { description: string; displayName: string; name: string; required: boolean; type: string; default?: string | null; is_secret?: boolean; legacy_template_name?: string; } interface Required { description: string; displayName: string; name: string; required: boolean; type: string; default?: string | null; is_secret?: boolean; legacy_template_name?: string; } } } /** * @deprecated Authentication URL fields for OAuth 2.0 and OAuth 1.0. We don't * recommend using this field for authentication and might break post Aug 31 2025. */ interface DeprecatedAuthProviderDetails { authorization_url?: string; token_url?: string; } /** * Configuration for proxying authentication requests to external services */ interface Proxy { /** * URL to which authentication requests will be proxied */ base_url: string; } } } export interface ToolkitListResponse { current_page: number; items: Array; total_items: number; total_pages: number; next_cursor?: string | null; } export declare namespace ToolkitListResponse { /** * Detailed information about a toolkit */ interface Item { /** * @deprecated Deprecated toolkit ID */ deprecated: Item.Deprecated; /** * @deprecated DEPRECATED: This field is no longer meaningful and will always * return false. It was previously used to indicate if a toolkit is specific to the * current project. */ is_local_toolkit: boolean; /** * Additional metadata about the toolkit */ meta: Item.Meta; /** * Human-readable name of the toolkit */ name: string; /** * URL-friendly unique identifier for the toolkit */ slug: string; /** * Toolkit provenance: "native" for Composio-managed toolkits, "custom" for a * project-registered custom (MCP) toolkit */ type: 'native' | 'custom'; /** * URL to a guide page with authentication setup instructions for this toolkit */ auth_guide_url?: string | null; /** * List of authentication methods supported by this toolkit */ auth_schemes?: Array; /** * List of authentication methods that Composio manages for this toolkit */ composio_managed_auth_schemes?: Array; /** * When true, this toolkit can be used without authentication */ no_auth?: boolean; } namespace Item { /** * @deprecated Deprecated toolkit ID */ interface Deprecated { toolkitId: string; } /** * Additional metadata about the toolkit */ interface Meta { /** * List of categories associated with this toolkit */ categories: Array; /** * Creation date and time of the toolkit */ created_at: string; /** * Human-readable description explaining the toolkit's purpose and functionality */ description: string; /** * Image URL for the toolkit's branding */ logo: string; /** * Count of available tools in this toolkit */ tools_count: number; /** * Count of available triggers in this toolkit */ triggers_count: number; /** * Last modification date and time of the toolkit */ updated_at: string; /** * Version of the toolkit */ version: string; /** * Link to the toolkit's main application or service website */ app_url?: string | null; } namespace Meta { interface Category { /** * Category identifier */ id: string; /** * Human-readable category name */ name: string; } } } } export interface ToolkitRetrieveCategoriesResponse { current_page: number; items: Array; total_items: number; total_pages: number; next_cursor?: string | null; } export declare namespace ToolkitRetrieveCategoriesResponse { /** * Information about a single toolkit category */ interface Item { /** * URL-friendly unique identifier for the category, used for filtering toolkits */ id: string; /** * Display name of the toolkit category */ name: string; } } export interface ToolkitRetrieveParams { /** * Version of the toolkit */ version?: string; } export interface ToolkitListParams { /** * Filter toolkits by category */ category?: string; /** * Cursor for pagination. The cursor is a base64 encoded string of the page and * limit. The page is the page number and the limit is the number of items per * page. The cursor is used to paginate through the items. The cursor is not * required for the first page. */ cursor?: string; /** * Include deprecated toolkits in the response */ include_deprecated?: boolean | null; /** * Number of items per page, max allowed is 1000 */ limit?: number | null; /** * Filter toolkits by who manages them */ managed_by?: 'composio' | 'all' | 'project'; /** * Search query to filter toolkits by name, slug, or description */ search?: string; /** * Sort order for returned toolkits */ sort_by?: 'usage' | 'alphabetically'; /** * Filter toolkits by provenance (alias over managed_by) */ type?: 'native' | 'custom' | 'all'; } export declare namespace Toolkits { export { type ToolkitRetrieveResponse as ToolkitRetrieveResponse, type ToolkitListResponse as ToolkitListResponse, type ToolkitRetrieveCategoriesResponse as ToolkitRetrieveCategoriesResponse, type ToolkitRetrieveParams as ToolkitRetrieveParams, type ToolkitListParams as ToolkitListParams, }; } //# sourceMappingURL=toolkits.d.mts.map