import { APIResource } from "../core/resource.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; /** * Trigger management and execution */ export declare class TriggersTypes extends APIResource { /** * Retrieve detailed information about a specific trigger type using its slug * identifier */ retrieve(slug: string, query?: TriggersTypeRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieve a list of available trigger types with optional filtering by toolkit. * Results are paginated and can be filtered by toolkit. */ list(query?: TriggersTypeListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieves a list of all available trigger type enum values that can be used * across the API from latest versions of the toolkit only */ retrieveEnum(options?: RequestOptions): APIPromise; } export interface TriggersTypeRetrieveResponse { /** * Configuration schema required to set up this trigger */ config: { [key: string]: unknown; }; /** * Detailed description of what the trigger does */ description: string; /** * Step-by-step instructions on how to set up and use this trigger */ instructions: string; /** * Human-readable name of the trigger */ name: string; /** * Schema of the data payload this trigger will deliver when it fires */ payload: { [key: string]: unknown; }; /** * Unique identifier for the trigger type */ slug: string; /** * Information about the toolkit that provides this trigger */ toolkit: TriggersTypeRetrieveResponse.Toolkit; /** * The trigger mechanism - either webhook (event-based) or poll (scheduled check) */ type: 'webhook' | 'poll'; /** * Version of the trigger type */ version: string; /** * True when the developer must register a Composio-issued webhook URL with the * upstream provider (e.g. Slack Event Subscriptions, Notion integration webhooks). * See the webhook_endpoint API for the setup. */ requires_webhook_endpoint_setup?: boolean; } export declare namespace TriggersTypeRetrieveResponse { /** * Information about the toolkit that provides this trigger */ interface Toolkit { /** * Logo of the toolkit */ logo: string; /** * Deprecated: Use slug instead */ name: string; /** * Unique identifier for the parent toolkit */ slug: string; } } export interface TriggersTypeListResponse { current_page: number; items: Array; total_items: number; total_pages: number; next_cursor?: string | null; } export declare namespace TriggersTypeListResponse { interface Item { /** * Configuration schema required to set up this trigger */ config: { [key: string]: unknown; }; /** * Detailed description of what the trigger does */ description: string; /** * Step-by-step instructions on how to set up and use this trigger */ instructions: string; /** * Human-readable name of the trigger */ name: string; /** * Schema of the data payload this trigger will deliver when it fires */ payload: { [key: string]: unknown; }; /** * Unique identifier for the trigger type */ slug: string; /** * Information about the toolkit that provides this trigger */ toolkit: Item.Toolkit; /** * The trigger mechanism - either webhook (event-based) or poll (scheduled check) */ type: 'webhook' | 'poll'; /** * Version of the trigger type */ version: string; /** * True when the developer must register a Composio-issued webhook URL with the * upstream provider (e.g. Slack Event Subscriptions, Notion integration webhooks). * See the webhook_endpoint API for the setup. */ requires_webhook_endpoint_setup?: boolean; } namespace Item { /** * Information about the toolkit that provides this trigger */ interface Toolkit { /** * Logo of the toolkit */ logo: string; /** * Deprecated: Use slug instead */ name: string; /** * Unique identifier for the parent toolkit */ slug: string; } } } /** * JSON string containing all trigger enum values */ export type TriggersTypeRetrieveEnumResponse = Array; export interface TriggersTypeRetrieveParams { /** * Toolkit version specification. Use "latest" for latest versions or bracket * notation for specific versions per toolkit. */ toolkit_versions?: string | { [key: string]: string; }; } export interface TriggersTypeListParams { /** * 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; /** * Number of items per page, max allowed is 1000 */ limit?: number | null; /** * Array of toolkit slugs to filter triggers by */ toolkit_slugs?: Array | null; /** * Toolkit version specification. Use "latest" for latest versions or bracket * notation for specific versions per toolkit. */ toolkit_versions?: string | { [key: string]: string; }; } export declare namespace TriggersTypes { export { type TriggersTypeRetrieveResponse as TriggersTypeRetrieveResponse, type TriggersTypeListResponse as TriggersTypeListResponse, type TriggersTypeRetrieveEnumResponse as TriggersTypeRetrieveEnumResponse, type TriggersTypeRetrieveParams as TriggersTypeRetrieveParams, type TriggersTypeListParams as TriggersTypeListParams, }; } //# sourceMappingURL=triggers-types.d.ts.map