@composio/core
Version:

1,047 lines (1,046 loc) • 234 kB
text/typescript
import { $ as ComposioMcpUpdateResponseSchema, $t as ConnectionData, A as ToolkitVersions, An as Oauth2FailedConnectionDataSchema, At as MCPToolkitConfigSchema, B as afterExecuteMetaModifier, Bt as McpServerUrlInfo, C as ToolkitLatestVersion, Cn as Oauth2ActiveConnectionData, Ct as MCPServerListResponseSchema, D as ToolkitVersionParam, Dn as Oauth2ExpiredConnectionData, Dt as MCPSingleAppServer, E as ToolkitVersion, En as Oauth2ConnectionDataSchema, Et as MCPServerUpdateParamsSchema, F as ProviderOptions, Fn as Oauth2InitiatingConnectionData, Ft as McpListResponseSchema, G as BaseComposioProvider, Gt as McpUrlResponseCamelCase, H as beforeExecuteMetaModifier, Ht as McpUpdateResponse, I as SessionExecuteMetaModifiers, In as Oauth2InitiatingConnectionDataSchema, It as McpRetrieveResponse, J as ComposioGenerateURLParamsSchema, Jt as ExecuteToolFnOptions, K as BaseNonAgenticProvider, Kt as McpUserConnectionStatus, L as SessionMetaToolOptions, Ln as RedirectableAuthSchemeSchema, Lt as McpRetrieveResponseSchema, M as AgenticToolOptions, Mn as Oauth2InactiveConnectionDataSchema, Mt as McpDeleteResponse, N as ExecuteToolModifiers, Nn as Oauth2InitiatedConnectionData, Nt as McpDeleteResponseSchema, O as ToolkitVersionParamSchema, On as Oauth2ExpiredConnectionDataSchema, Ot as MCPSingleAppServerSchema, P as MetaToolArguments, Pn as Oauth2InitiatedConnectionDataSchema, Pt as McpListResponse, Q as ComposioMcpRetrieveResponseSchema, Qt as BillcomAuthConnectionDataSchema, R as ToolOptions, Rt as McpServerCreateResponse, S as Toolkit, Sn as Oauth1InitiatingConnectionDataSchema, St as MCPServerListResponse, T as ToolkitSchema, Tn as Oauth2ConnectionData, Tt as MCPServerUpdateParams, U as beforeExecuteModifier, Ut as McpUpdateResponseSchema, V as afterExecuteModifier, Vt as McpToolkitConnectionStatus, W as BaseAgenticProvider, Wt as McpUrlResponse, X as ComposioMcpDeleteResponseSchema, Xt as Provider, Y as ComposioGenerateURLResponseSchema, Yt as GlobalExecuteToolFn, Z as ComposioMcpListResponseSchema, Zt as BaseConnectionFields, _ as ToolListResponseSchema, _n as Oauth1InactiveConnectionData, _t as MCPMultiAppServer, a as SchemaModifierOptions, an as CustomOauth1ConnectionData, at as GenerateURLParamsSchema, b as ToolRetrievalOptions, bn as Oauth1InitiatedConnectionDataSchema, bt as MCPServerCreateResponse, c as ToolExecuteMetaParamsSchema, cn as CustomOauth2ConnectionDataSchema, ct as GenerateURLResponseValidated, d as ToolExecuteResponse, dn as Oauth1ConnectionData, dt as MCPCreateMethodResponse, en as ConnectionDataSchema, et as ConnectionStatus, f as ToolExecuteResponseSchema, fn as Oauth1ConnectionDataSchema, ft as MCPGenerateURLParams, g as ToolListResponse, gn as Oauth1FailedConnectionDataSchema, gt as MCPInstanceParams, h as ToolListParamsSchema, hn as Oauth1FailedConnectionData, ht as MCPGetServerParamsSchema, i as JSONSchemaPropertySchema, in as CustomConnectionDataSchema, it as GenerateURLParams, j as ToolkitVersionsSchema, jn as Oauth2InactiveConnectionData, jt as MCPToolkitConfigsArraySchema, k as ToolkitVersionSchema, kn as Oauth2FailedConnectionData, kt as MCPToolkitConfig, l as ToolExecuteParams, ln as Oauth1ActiveConnectionData, lt as MCPAuthOptions, m as ToolListParams, mn as Oauth1ExpiredConnectionDataSchema, mt as MCPGetServerParams, n as CustomAuthParamsSchema, nn as ConnectionStatuses, nt as CustomCreateResponseSchema, o as Tool, on as CustomOauth1ConnectionDataSchema, ot as GenerateURLResponse, p as ToolList, pn as Oauth1ExpiredConnectionData, pt as MCPGenerateURLParamsSchema, q as ComposioCustomCreateResponseSchema, qt as ExecuteToolFn, r as JSONSchemaProperty, rn as CustomConnectionData, rt as CustomCreateResponseValidated, s as ToolExecuteMetaParams, sn as CustomOauth2ConnectionData, st as GenerateURLResponseSchema, t as CustomAuthParams, tn as ConnectionStatusEnum, tt as CustomCreateResponse, u as ToolExecuteParamsSchema, un as Oauth1ActiveConnectionDataSchema, ut as MCPAuthOptionsSchema, v as ToolProxyParams, vn as Oauth1InactiveConnectionDataSchema, vt as MCPMultiAppServerSchema, w as ToolkitLatestVersionSchema, wn as Oauth2ActiveConnectionDataSchema, wt as MCPServerSchema, x as ToolSchema, xn as Oauth1InitiatingConnectionData, xt as MCPServerCreateResponseSchema, y as ToolProxyParamsSchema, yn as Oauth1InitiatedConnectionData, yt as MCPServer, z as TransformToolSchemaModifier, zt as McpServerGetResponse } from "./tool.types-BWc7GUrD.cjs";
import { $ as ToolRouterToolkitsFn, A as ToolRouterAuthorizeFn, At as ConnectedAccountListParamsSchema, B as ToolRouterManageConnectionsConfigSchema, Bt as ConnectedAccountStatusSchema, C as SessionContext, Ct as ToolRouterSessionFilesMountUploadOptions, D as SessionExperimental, Dt as ConnectedAccountAuthConfig, E as Session, Et as ConnectionRequestState, F as ToolRouterConfigToolsSchema, Ft as ConnectedAccountRefreshOptionsSchema, G as ToolRouterSessionProxyExecuteResponse, Gt as CreateConnectedAccountLinkResponseSchema, H as ToolRouterSessionExecuteResponse, Ht as CreateConnectedAccountLinkOptions, I as ToolRouterCreateSessionConfig, It as ConnectedAccountRetrieveResponse, J as ToolRouterSessionSearchResponseSchema, Jt as CreateConnectedAccountParams, K as ToolRouterSessionSearchFn, Kt as CreateConnectedAccountOptions, L as ToolRouterCreateSessionConfigSchema, Lt as ConnectedAccountRetrieveResponseSchema, M as ToolRouterConfigTags, Mt as ConnectedAccountListResponseItem, N as ToolRouterConfigTagsSchema, Nt as ConnectedAccountListResponseSchema, O as SessionProxyExecuteParams, Ot as ConnectedAccountAuthConfigSchema, P as ToolRouterConfigTools, Pt as ConnectedAccountRefreshOptions, Q as ToolRouterToolkitsEnabledConfigSchema, Qt as DefaultCreateConnectedAccountParamsSchema, R as ToolRouterMCPServerConfig, Rt as ConnectedAccountStatus, S as RegisteredCustomToolkit, St as ToolRouterSessionFilesMountListOptionsSchema, T as MCPServerTypeSchema, Tt as ConnectionRequest, U as ToolRouterSessionExecuteResponseSchema, Ut as CreateConnectedAccountLinkOptionsSchema, V as ToolRouterSessionExecuteFn, Vt as ConnectedAccountStatuses, W as ToolRouterSessionProxyExecuteFn, Wt as CreateConnectedAccountLinkResponse, X as ToolRouterTagsParamSchema, Xt as CreateConnectedAccountResponse, Y as ToolRouterTagsEnableDisableSchema, Yt as CreateConnectedAccountParamsSchema, Z as ToolRouterToolkitsDisabledConfigSchema, Zt as CreateConnectedAccountResponseSchema, _ as CustomToolsMap, _t as ToolRouterSessionFilesMountDeleteOptions, a as CustomTool, at as ToolRouterToolsParamSchema, b as InputParamsSchema, bt as ToolRouterSessionFilesMountDownloadOptionsSchema, c as CustomToolInputParameter, ct as ToolkitConnectionsDetails, d as CustomToolRegistryItem, dt as FileDeleteResponse, et as ToolRouterToolkitsOptions, f as CustomToolResponse, ft as FileDeleteResponseSchema, g as CustomToolkitResponse, gt as RemoteFileDataSchema, h as CustomToolkitDefinition, ht as RemoteFileData, i as CreateCustomToolkitParams, it as ToolRouterToolsParam, j as ToolRouterConfigManageConnectionsSchema, jt as ConnectedAccountListResponse, k as SessionProxyExecuteParamsSchema, kt as ConnectedAccountListParams, l as CustomToolOptions, lt as ToolkitConnectionsDetailsSchema, m as CustomToolkit, mt as FileListResponseSchema, n as CreateCustomToolParams, nt as ToolRouterToolkitsParamSchema, o as CustomToolDefinition, ot as ToolkitConnectionState, p as CustomToolSlugSchema, pt as FileListResponse, q as ToolRouterSessionSearchResponse, qt as CreateConnectedAccountOptionsSchema, r as CreateCustomToolkitBaseSchema, rt as ToolRouterToolsFn, s as CustomToolExecuteFn, st as ToolkitConnectionStateSchema, t as CreateCustomToolBaseSchema, tt as ToolRouterToolkitsOptionsSchema, u as CustomToolRegistry, ut as RemoteFile, v as CustomToolsMapEntry, vt as ToolRouterSessionFilesMountDeleteOptionsSchema, w as MCPServerType, wt as ToolRouterSessionFilesMountUploadOptionsSchema, x as RegisteredCustomTool, xt as ToolRouterSessionFilesMountListOptions, y as ExecuteMetadata, yt as ToolRouterSessionFilesMountDownloadOptions, z as ToolRouterMCPServerConfigSchema, zt as ConnectedAccountStatusEnum } from "./customTool.types-CfFdeYee.cjs";
import { n as createCustomToolkit, t as createCustomTool } from "./CustomTool-B0B7kvyW.cjs";
import { $ as AuthConfigCreationToolAccessConfigSchema, A as TriggerSubscribeParams, At as ToolkitAuthField, B as VerifyWebhookResult, Bt as ToolkitRetrieveCategoriesResponseSchema, C as TriggerInstanceUpsertParamsSchema, Ct as ToolKitItemSchema, D as TriggerStatusType, Dt as ToolKitMetaSchema, E as TriggerStatusEnum, Et as ToolKitMeta, F as TriggersTypeListResponse, Ft as ToolkitCategorySchema, G as WebhookPayloadV2, Gt as ToolkitsListParamsSchema, H as WebhookPayloadSchema, Ht as ToolkitRetrieveResponseSchema, I as TriggersTypeListResponseSchema, It as ToolkitListParams, J as WebhookPayloadV3Schema, K as WebhookPayloadV2Schema, L as TriggersTypeRetrieveResponse, Lt as ToolkitMangedByEnum, M as TriggerTypeSchema, Mt as ToolkitAuthFieldsResponse, N as TriggersTypeListParams, Nt as ToolkitAuthFieldsResponseSchema, O as TriggerStatuses, Ot as ToolkitAuthConfigDetails, P as TriggersTypeListParamsSchema, Pt as ToolkitCategory, Q as WebhookVersions, R as VerifyWebhookParams, Rt as ToolkitMangedByEnumSchema, S as TriggerInstanceUpsertParams, St as ToolKitItem, T as TriggerInstanceUpsertResponseSchema, Tt as ToolKitListResponseSchema, U as WebhookPayloadV1, Ut as ToolkitSortByEnum, V as WebhookPayload, Vt as ToolkitRetrieveResponse, W as WebhookPayloadV1Schema, Wt as ToolkitSortByEnumSchema, X as WebhookTriggerPayloadV3Schema, Y as WebhookTriggerPayloadV3, Z as WebhookVersion, _ as TriggerInstanceManageDeleteResponseSchema, _t as CreateAuthConfigParamsSchema, a as IncomingTriggerPayload, at as AuthConfigRetrieveResponseSchema, b as TriggerInstanceManageUpdateResponse, bt as CreateComposioManagedAuthConfigParamsSchema, c as TriggerEvent, ct as AuthConfigTypes, d as TriggerInstanceListActiveParamsSchema, dt as AuthCustomConfigUpdateParamsSchema, et as AuthConfigListParams, f as TriggerInstanceListActiveResponse, ft as AuthDefaultConfigUpdateParamsSchema, g as TriggerInstanceManageDeleteResponse, gt as CreateAuthConfigParams, h as TriggerInstanceListActiveResponseSchema, ht as AuthSchemeTypes, i as MCP, it as AuthConfigRetrieveResponse, j as TriggerType, jt as ToolkitAuthFieldSchema, k as TriggerSubscribeParamSchema, kt as ToolkitAuthConfigDetailsSchema, l as TriggerEventData, lt as AuthConfigUpdateParams, m as TriggerInstanceListActiveResponseItemSchema, mt as AuthSchemeType, n as ComposioConfig, nt as AuthConfigListResponse, o as IncomingTriggerPayloadSchema, ot as AuthConfigToolAccessConfigSchema, p as TriggerInstanceListActiveResponseItem, pt as AuthSchemeEnum, q as WebhookPayloadV3, r as OpenAIProvider, rt as AuthConfigListResponseSchema, s as TriggerData, st as AuthConfigType, t as Composio, tt as AuthConfigListParamsSchema, u as TriggerInstanceListActiveParams, ut as AuthConfigUpdateParamsSchema, v as TriggerInstanceManageUpdateParams, vt as CreateAuthConfigResponse, w as TriggerInstanceUpsertResponse, wt as ToolKitListResponse, x as TriggerInstanceManageUpdateResponseSchema, xt as CreateCustomAuthConfigParamsSchema, y as TriggerInstanceManageUpdateParamsSchema, yt as CreateAuthConfigResponseSchema, z as VerifyWebhookParamsSchema, zt as ToolkitRetrieveCategoriesResponse } from "./composio-C9ZY8W1y.cjs";
import { n as FileUploadData, t as FileDownloadData } from "./files.types-lo4zZd87.cjs";
import "node:module";
import { z } from "zod/v3";
import ComposioClient, { Composio as Composio$1 } from "@composio/client";
//#region rolldown:runtime
//#endregion
//#region src/provider/ComposioProvider.d.ts
/**
* This is a default provider implementation for Composio.
* This class is used as a default provider for Composio, if the user does not provide a provider.
*
* This class shouldn't be used directly or to be extended.
*/
interface CustomTool$1 {
name: string;
}
declare class ComposioProvider extends BaseNonAgenticProvider<Array<CustomTool$1>, CustomTool$1> {
readonly name = "ComposioProvider";
constructor();
wrapTool: (tool: Tool) => CustomTool$1;
wrapTools(tools: Tool[]): CustomTool$1[];
}
//#endregion
//#region src/utils/jsonSchema.d.ts
/**
* Removes all non-required properties from the schema
*
* if no items are required, the schema is returned as is
* @param schema - The JSON schema to remove non-required properties from
* @returns The JSON schema with all non-required properties removed
*/
declare const removeNonRequiredProperties: <T extends {
type: "object";
properties: Record<string, unknown>;
required?: string[];
additionalProperties?: boolean;
}>(schema: T) => T;
/**
* Convert a JSON schema to a Zod schema
* @param jsonSchema - The JSON schema to convert
* @param strict - Eliminates all non-required properties from the schema
* @returns The Zod schema
*
* @throws {JsonSchemaToZodError} If the JSON schema is invalid
*
* @example
* ```ts
* const zodSchema = jsonSchemaToZodSchema({
* type: 'object',
* properties: {
* name: { type: 'string' },
* },
* });
*
* console.log(zodSchema);
* ```
*
* @example
* ```ts
* const zodSchema = jsonSchemaToZodSchema({
* type: 'object',
* properties: {
* name: { type: 'string' },
* age: { type: 'number' },
* },
* required: ['name'],
* }, { strict: true });
*
* console.log(zodSchema);
*
* // Output:
* // z.object({
* // name: z.string(),
* // })
* ```
*/
declare function jsonSchemaToZodSchema<T extends z.ZodTypeAny>(jsonSchema: Record<string, unknown>, {
strict
}?: {
strict?: boolean;
}): T;
//#endregion
//#region src/utils/mime.d.ts
/**
* Maps MIME types to file extensions.
* Used when deriving filenames from content-type headers (e.g. for URLs without path segments).
*/
declare function getExtensionFromMimeType(mimeType: string): string;
//#endregion
//#region src/models/AuthScheme.d.ts
declare class AuthScheme {
/**
* Creates a ConnectionData object for OAuth2 authentication.
* When `access_token` is provided, status defaults to ACTIVE (token import).
* When omitted, status defaults to INITIALIZING (redirect-based OAuth flow).
* Pass an explicit `status` in params to override the auto-detected default.
* @param params The OAuth2 parameters
* @returns ConnectionData object
*/
static OAuth2(params: BaseConnectionFields & {
access_token?: string;
token_type?: string;
id_token?: string;
refresh_token?: string;
expires_in?: number;
scope?: string;
webhook_signature?: string;
authed_user?: {
access_token?: string;
scope?: string;
};
code_verifier?: string;
redirectUrl?: string;
callback_url?: string;
finalRedirectUri?: string;
error?: string;
error_description?: string;
expired_at?: string;
}): ConnectionData;
/**
* Creates a ConnectionData object for OAuth1 authentication.
* When both `oauth_token` and `oauth_token_secret` are provided, status defaults to ACTIVE (token import).
* When either is omitted, status defaults to INITIALIZING (redirect-based OAuth flow).
* Pass an explicit `status` in params to override the auto-detected default.
* @param params The OAuth1 parameters
* @returns ConnectionData object
*/
static OAuth1(params: BaseConnectionFields & {
oauth_token?: string;
oauth_token_secret?: string;
consumer_key?: string;
redirectUrl?: string;
callback_url?: string;
error?: string;
error_description?: string;
expired_at?: string;
}): ConnectionData;
/**
* Creates a ConnectionData object for API Key authentication
* @param params The API key parameters
* @returns ConnectionData object
*/
static APIKey(params: BaseConnectionFields & {
api_key?: string;
generic_api_key?: string;
}): ConnectionData;
/**
* Creates a ConnectionData object for Basic authentication
* @param params The basic auth parameters
* @returns ConnectionData object
*/
static Basic(params: BaseConnectionFields & {
username: string;
password: string;
}): ConnectionData;
/**
* Creates a ConnectionData object for Bearer Token authentication
* @param params The bearer token parameters
* @returns ConnectionData object
*/
static BearerToken(params: BaseConnectionFields & {
token: string;
}): ConnectionData;
/**
* Creates a ConnectionData object for Google Service Account authentication
* @param params The Google service account parameters
* @returns ConnectionData object
*/
static GoogleServiceAccount(params: BaseConnectionFields & {
credentials_json: string;
}): ConnectionData;
/**
* Creates a ConnectionData object for No Auth authentication
* @returns ConnectionData object
*/
static NoAuth(params?: BaseConnectionFields): ConnectionData;
/**
* Creates a ConnectionData object for Basic with JWT authentication
* @param params The basic with JWT parameters
* @returns ConnectionData object
*/
static BasicWithJWT(params: BaseConnectionFields & {
username: string;
password: string;
}): ConnectionData;
/**
* Creates a ConnectionData object for Cal.com authentication
* @returns ConnectionData object
*/
static CalcomAuth(params?: BaseConnectionFields): ConnectionData;
/**
* Creates a ConnectionData object for Bill.com authentication
* @param params The Bill.com auth parameters
* @returns ConnectionData object
*/
static BillcomAuth(params: BaseConnectionFields & {
sessionId: string;
devKey: string;
}): ConnectionData;
}
//#endregion
//#region src/models/ConnectionRequest.d.ts
/**
* Creates a connection request object with methods to manage the connection lifecycle.
*
* @param {ComposioClient} client - The Composio client instance
* @param {string} connectedAccountId - The ID of the connected account
* @param {ConnectedAccountStatus} [status] - Initial status of the connection
* @param {string | null} [redirectUrl] - OAuth redirect URL if applicable
* @returns {ConnectionRequestState & { waitForConnection: (timeout?: number) => Promise<ConnectedAccountRetrieveResponse> }}
* Connection request object with state and methods
*/
declare function createConnectionRequest(client: ComposioClient, connectedAccountId: string, status?: ConnectedAccountStatus, redirectUrl?: string | null): ConnectionRequest;
//#endregion
//#region src/models/ToolRouterSession.d.ts
declare class ToolRouterSession<TToolCollection, TTool, TProvider extends BaseComposioProvider<TToolCollection, TTool, unknown>> {
private readonly client;
private readonly config;
private readonly customToolsMap?;
private readonly userId?;
readonly sessionId: string;
readonly mcp: ToolRouterMCPServerConfig;
readonly experimental: SessionExperimental;
/** Singleton session context — shared across all custom tool executions */
private readonly sessionContext?;
constructor(client: Composio$1, config: ComposioConfig<TProvider> | undefined, sessionId: string, mcp: ToolRouterMCPServerConfig, experimentalOverrides?: Pick<SessionExperimental, 'assistivePrompt'>, customToolsMap?: CustomToolsMap | undefined, userId?: string | undefined);
/**
* Get the tools available in the session, formatted for your AI framework.
* Requires a provider to be configured in the Composio constructor.
*
* When custom tools are bound to the session, execution of COMPOSIO_MULTI_EXECUTE_TOOL
* is intercepted: local tools are executed in-process, remote tools are sent to the backend.
*/
tools(modifiers?: SessionMetaToolOptions): Promise<ReturnType<TProvider['wrapTools']>>;
/**
* List all custom tools registered in this session.
* Returns tools with their final slugs, schemas, and resolved toolkit.
*
* @param options.toolkit - Filter by toolkit slug (e.g. 'gmail', 'DEV_TOOLS')
* @returns Array of registered custom tools
*/
customTools(options?: {
toolkit?: string;
}): RegisteredCustomTool[];
/**
* List all custom toolkits registered in this session.
* Returns toolkits with their tools showing final slugs.
*
* @returns Array of registered custom toolkits
*/
customToolkits(): RegisteredCustomToolkit[];
/**
* Initiate an authorization flow for a toolkit.
* Returns a ConnectionRequest with a redirect URL for the user.
*/
authorize(toolkit: string, options?: {
callbackUrl?: string;
}): Promise<ConnectionRequest>;
/**
* Query the connection state of toolkits in the session.
* Supports pagination and filtering by toolkit slugs.
*/
toolkits(options?: ToolRouterToolkitsOptions): Promise<{
items: {
slug: string;
name: string;
isNoAuth: boolean;
logo?: string | undefined;
connection?: {
isActive: boolean;
authConfig?: {
id: string;
mode: string;
isComposioManaged: boolean;
} | null | undefined;
connectedAccount?: {
status: string;
id: string;
} | undefined;
} | undefined;
}[];
nextCursor: string | undefined;
totalPages: number;
}>;
/**
* Search for tools by semantic use case.
* Returns relevant tools for the given query with schemas and guidance.
*/
search(params: {
query: string;
toolkits?: string[];
}): Promise<ToolRouterSessionSearchResponse>;
/**
* Execute a tool within the session.
*
* For custom tools, accepts the original slug (e.g. "GREP") or the
* full slug (e.g. "LOCAL_GREP"). Custom tools are executed in-process;
* remote tools are sent to the Composio backend.
*
* @param toolSlug - The tool slug to execute
* @param arguments_ - Optional tool arguments
* @returns The tool execution result
*/
execute(toolSlug: string, arguments_?: Record<string, unknown>): Promise<ToolRouterSessionExecuteResponse>;
/**
* Proxy an API call through Composio's auth layer using the session's connected account.
* The backend resolves the connected account from the toolkit within the session.
*
* @param params - Proxy request parameters (toolkit, endpoint, method, body, headers/query params)
* @returns The proxied API response with status, data, headers
*/
proxyExecute(params: SessionProxyExecuteParams): Promise<ToolRouterSessionProxyExecuteResponse>;
/** Check if this session has any custom tools bound. */
private hasCustomTools;
/** Parse an individual tool item from COMPOSIO_MULTI_EXECUTE_TOOL's tools array */
private parseToolItem;
/**
* Route a COMPOSIO_MULTI_EXECUTE_TOOL call.
* Splits the tools[] array into local and remote, executes each appropriately,
* and merges results preserving original order.
*/
private routeMultiExecute;
}
//#endregion
//#region src/types/webhookEvents.types.d.ts
declare const WebhookEventTypes: {
readonly CONNECTION_EXPIRED: "composio.connected_account.expired";
readonly TRIGGER_MESSAGE: "composio.trigger.message";
};
type WebhookEventType = (typeof WebhookEventTypes)[keyof typeof WebhookEventTypes];
/**
* Auth config schema for webhook payloads (raw API format, snake_case).
*
* This intentionally does NOT reuse ConnectedAccountAuthConfigSchema from
* connectedAccounts.types.ts because:
* - Webhook payloads arrive in raw snake_case (is_composio_managed, is_disabled)
* while the SDK schema uses camelCase (isComposioManaged, isDisabled)
* - Webhook payloads include additional fields (auth_scheme, deprecated)
* not present in the SDK schema
*
* Uses .passthrough() to accept unknown fields the API may add in the future.
*
* @see ConnectedAccountAuthConfigSchema in connectedAccounts.types.ts for the camelCase SDK version
*/
declare const WebhookConnectedAccountAuthConfigSchema: z.ZodObject<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, z.ZodTypeAny, "passthrough">>;
type WebhookConnectedAccountAuthConfig = z.infer<typeof WebhookConnectedAccountAuthConfigSchema>;
/**
* Simplified connection state schema for webhook payloads (raw API format).
*
* This intentionally does NOT reuse ConnectionDataSchema from
* connectedAccountAuthStates.types.ts because:
* - ConnectionDataSchema is a discriminated union requiring typed `val`
* per auth scheme (e.g., Oauth2ConnectionDataSchema)
* - Webhook payloads need loose validation (z.record(z.unknown()))
* since the connection state varies and isn't the focus of event handling
*
* Uses .passthrough() to accept unknown fields the API may add in the future.
*
* @see ConnectionDataSchema in connectedAccountAuthStates.types.ts for the full typed version
*/
declare const WebhookConnectionStateSchema: z.ZodObject<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.ZodTypeAny, "passthrough">>;
type WebhookConnectionState = z.infer<typeof WebhookConnectionStateSchema>;
/**
* Connected account data schema for webhook payloads (raw API format, snake_case).
*
* This is the snake_case equivalent of ConnectedAccountRetrieveResponseSchema
* from connectedAccounts.types.ts. It intentionally does NOT reuse that schema because:
* - Webhook payloads arrive in raw snake_case (auth_config, user_id, created_at, etc.)
* while the SDK schema uses camelCase (authConfig, createdAt, etc.)
* - The SDK applies a transformation layer (utils/transformers/connectedAccounts.ts)
* before validation; webhooks are validated directly by the user
* - Webhook payloads include user_id, which the SDK schema omits
*
* Uses .passthrough() to accept unknown fields the API may add in the future.
*
* @see ConnectedAccountRetrieveResponseSchema in connectedAccounts.types.ts for the camelCase SDK version
* @see utils/transformers/connectedAccounts.ts for the snake-to-camel transformation
*/
declare const SingleConnectedAccountDetailedResponseSchema: z.ZodObject<{
/** Toolkit information */
toolkit: z.ZodObject<{
slug: z.ZodString;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
slug: z.ZodString;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
slug: z.ZodString;
}, z.ZodTypeAny, "passthrough">>;
/** Auth config details */
auth_config: z.ZodObject<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, z.ZodTypeAny, "passthrough">>;
/** The nano ID of the connected account */
id: z.ZodString;
/** @deprecated - user ID of the connection owner */
user_id: z.ZodString;
/** Connection status */
status: z.ZodNativeEnum<{
readonly INITIALIZING: "INITIALIZING";
readonly INITIATED: "INITIATED";
readonly ACTIVE: "ACTIVE";
readonly FAILED: "FAILED";
readonly EXPIRED: "EXPIRED";
readonly INACTIVE: "INACTIVE";
}>;
/** ISO-8601 timestamp of creation */
created_at: z.ZodString;
/** ISO-8601 timestamp of last update */
updated_at: z.ZodString;
/** Connection state data (auth scheme + state values) */
state: z.ZodObject<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.ZodTypeAny, "passthrough">>;
/** @deprecated - use state instead */
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
/** @deprecated - use state instead */
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
/** Reason for the current status (e.g., expiration reason) */
status_reason: z.ZodNullable<z.ZodString>;
/** Whether the connection is disabled */
is_disabled: z.ZodBoolean;
/** Endpoint for making test requests */
test_request_endpoint: z.ZodOptional<z.ZodString>;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
labels: z.ZodArray<z.ZodString, "many">;
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
labels: string[];
}, {
uuid: string;
labels: string[];
}>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
/** Toolkit information */
toolkit: z.ZodObject<{
slug: z.ZodString;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
slug: z.ZodString;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
slug: z.ZodString;
}, z.ZodTypeAny, "passthrough">>;
/** Auth config details */
auth_config: z.ZodObject<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, z.ZodTypeAny, "passthrough">>;
/** The nano ID of the connected account */
id: z.ZodString;
/** @deprecated - user ID of the connection owner */
user_id: z.ZodString;
/** Connection status */
status: z.ZodNativeEnum<{
readonly INITIALIZING: "INITIALIZING";
readonly INITIATED: "INITIATED";
readonly ACTIVE: "ACTIVE";
readonly FAILED: "FAILED";
readonly EXPIRED: "EXPIRED";
readonly INACTIVE: "INACTIVE";
}>;
/** ISO-8601 timestamp of creation */
created_at: z.ZodString;
/** ISO-8601 timestamp of last update */
updated_at: z.ZodString;
/** Connection state data (auth scheme + state values) */
state: z.ZodObject<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
authScheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Connection state values - varies by auth scheme */
val: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.ZodTypeAny, "passthrough">>;
/** @deprecated - use state instead */
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
/** @deprecated - use state instead */
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
/** Reason for the current status (e.g., expiration reason) */
status_reason: z.ZodNullable<z.ZodString>;
/** Whether the connection is disabled */
is_disabled: z.ZodBoolean;
/** Endpoint for making test requests */
test_request_endpoint: z.ZodOptional<z.ZodString>;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
labels: z.ZodArray<z.ZodString, "many">;
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
labels: string[];
}, {
uuid: string;
labels: string[];
}>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
/** Toolkit information */
toolkit: z.ZodObject<{
slug: z.ZodString;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
slug: z.ZodString;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
slug: z.ZodString;
}, z.ZodTypeAny, "passthrough">>;
/** Auth config details */
auth_config: z.ZodObject<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}>;
/** Whether this auth config is managed by Composio */
is_composio_managed: z.ZodBoolean;
/** Whether the auth config is disabled */
is_disabled: z.ZodBoolean;
/** @deprecated */
deprecated: z.ZodOptional<z.ZodObject<{
uuid: z.ZodString;
}, "strip", z.ZodTypeAny, {
uuid: string;
}, {
uuid: string;
}>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
/** The nano ID of the auth config */
id: z.ZodString;
/** @deprecated - use state.authScheme instead */
auth_scheme: z.ZodNativeEnum<{
readonly OAUTH1: "OAUTH1";
readonly OAUTH2: "OAUTH2";
readonly API_KEY: "API_KEY";
readonly BASIC: "BASIC";
readonly BEARER_TOKEN: "BEARER_TOKEN";
readonly BILLCOM_AUTH: "BILLCOM_AUTH";
readonly GOOGLE_SERVICE_ACCOUNT: "GOOGLE_SERVICE_ACCOUNT";
readonly NO_AUTH: "NO_AUTH";
readonly BASIC_WITH_JWT: "BASIC_WITH_JWT";
readonly CALCOM_AUTH: "CALCOM_AUTH";
readonly SERVICE_ACCOUNT: "SERVICE_ACCOUNT";
readonly SAML: "SAML";
readonly DCR_OAUTH: "DCR_OAUTH";
readonly S2S_OAUTH2: "S2S_OAUTH2";
}