@composio/core 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CustomTool-CB5vm1Jc.d.mts → CustomTool-B3m-188G.d.mts} +1 -1
- package/dist/{CustomTool-BMlZfJVz.mjs → CustomTool-fYEFjSLM.mjs} +1 -1
- package/dist/{FileModifierErrors-BqFmpRsm.mjs → FileModifierErrors-CdGSABoq.mjs} +1 -1
- package/dist/{SsrfErrors-C91YhASE.mjs → SsrfErrors-DiQldIdC.mjs} +18 -7
- package/dist/{Telemetry-HlftxMx6.mjs → Telemetry-JRJJYS4I.mjs} +2 -2
- package/dist/{cancellation-CXpfmiVo.mjs → cancellation-Dwa9lGHA.mjs} +2 -2
- package/dist/{composio-DLGaeN70.d.mts → composio-B36OXii1.d.mts} +2691 -119
- package/dist/{customTool.types-BAmEh3MB.d.mts → customTool.types-C436M_D0.d.mts} +431 -98
- package/dist/docs/reference/sdk-reference/typescript/auth-configs.mdx +10 -10
- package/dist/docs/reference/sdk-reference/typescript/composio.mdx +5 -2
- package/dist/docs/reference/sdk-reference/typescript/connected-accounts.mdx +101 -18
- package/dist/docs/reference/sdk-reference/typescript/custom-toolkits.mdx +123 -0
- package/dist/docs/reference/sdk-reference/typescript/experimental.mdx +9 -2
- package/dist/docs/reference/sdk-reference/typescript/index.mdx +7 -0
- package/dist/docs/reference/sdk-reference/typescript/keyring.mdx +56 -0
- package/dist/docs/reference/sdk-reference/typescript/logs.mdx +78 -0
- package/dist/docs/reference/sdk-reference/typescript/mcp.mdx +15 -15
- package/dist/docs/reference/sdk-reference/typescript/meta.json +8 -1
- package/dist/docs/reference/sdk-reference/typescript/session-files.mdx +10 -10
- package/dist/docs/reference/sdk-reference/typescript/session.mdx +77 -27
- package/dist/docs/reference/sdk-reference/typescript/sessions.mdx +24 -10
- package/dist/docs/reference/sdk-reference/typescript/toolkits.mdx +149 -12
- package/dist/docs/reference/sdk-reference/typescript/tools.mdx +18 -18
- package/dist/docs/reference/sdk-reference/typescript/triggers.mdx +25 -25
- package/dist/docs/reference/sdk-reference/typescript/usage.mdx +78 -0
- package/dist/docs/reference/sdk-reference/typescript/webhook-endpoints.mdx +162 -0
- package/dist/docs/reference/sdk-reference/typescript/webhook-subscriptions.mdx +218 -0
- package/dist/docs/reference/sdk-reference/typescript/webhooks.mdx +20 -0
- package/dist/{errors-BuEKehbI.mjs → errors-D_A4b2c2.mjs} +123 -4
- package/dist/experimental/index.d.mts +2 -2
- package/dist/experimental/index.mjs +1 -1
- package/dist/{fileUtils.node-L7XD8UPr.mjs → fileUtils.node-DNLhLg0W.mjs} +4 -4
- package/dist/index.d.mts +264 -51
- package/dist/index.mjs +2338 -168
- package/dist/models/Files.node.mjs +2 -2
- package/dist/{sensitiveFileUploadPaths-B6pBt9lO.mjs → sensitiveFileUploadPaths-BlLp-Yo2.mjs} +1 -1
- package/dist/{ssrfGuard.node-B9xQB4za.mjs → ssrfGuard.node-BZ270bcu.mjs} +1 -1
- package/dist/{types-CxLPO0Xq.d.mts → types-Br3GBya5.d.mts} +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.mjs +5 -5
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
- package/dist/utils/ssrfGuard.node.mjs +1 -1
- package/dist/utils/ssrfGuard.workerd.mjs +1 -1
- package/package.json +2 -2
- package/src/composio.ts +207 -10
- package/src/errors/ConnectedAccountsErrors.ts +47 -0
- package/src/errors/SDKErrors.ts +52 -0
- package/src/errors/ToolRouterErrors.ts +57 -0
- package/src/errors/index.ts +3 -0
- package/src/index.ts +11 -0
- package/src/lib/toolRouterMcp.ts +132 -0
- package/src/lib/toolRouterParams.ts +116 -29
- package/src/models/ConnectedAccounts.ts +118 -2
- package/src/models/CustomToolkits.ts +169 -0
- package/src/models/Experimental.ts +27 -0
- package/src/models/Keyring.ts +65 -0
- package/src/models/Logs.ts +101 -0
- package/src/models/ToolRouter.ts +42 -14
- package/src/models/ToolRouterSession.ts +120 -9
- package/src/models/Toolkits.ts +180 -0
- package/src/models/Tools.ts +3 -1
- package/src/models/Triggers.ts +3 -88
- package/src/models/Usage.ts +119 -0
- package/src/models/Webhooks.ts +520 -0
- package/src/services/pusher/Pusher.ts +17 -6
- package/src/types/authConfigs.types.ts +2 -0
- package/src/types/connectedAccounts.types.ts +54 -0
- package/src/types/customToolkits.types.ts +102 -0
- package/src/types/keyring.types.ts +32 -0
- package/src/types/logs.types.ts +108 -0
- package/src/types/toolRouter.types.ts +205 -11
- package/src/types/toolkit.types.ts +144 -0
- package/src/types/usage.types.ts +81 -0
- package/src/types/webhooks.types.ts +143 -0
- package/src/utils/constants.ts +1 -5
- package/src/utils/logger.ts +39 -7
- package/src/utils/sdk.ts +385 -22
- package/src/utils/transformers/connectedAccounts.ts +37 -2
- package/src/utils/transformers/customToolkits.ts +98 -0
- package/src/utils/transformers/keyring.ts +24 -0
- package/src/utils/transformers/logs.ts +85 -0
- package/src/utils/transformers/toolkits.ts +106 -3
- package/src/utils/transformers/triggers.ts +2 -2
- package/src/utils/transformers/usage.ts +77 -0
- package/src/utils/transformers/webhooks.ts +139 -0
|
@@ -20,10 +20,17 @@ Creates a new tool router session for a user.
|
|
|
20
20
|
Use `sessionPreset: SessionPreset.DIRECT_TOOLS` when all needed tools
|
|
21
21
|
should be exposed directly; see `ToolRouterCreateSessionConfig`.
|
|
22
22
|
|
|
23
|
+
The session's MCP config carries the session credential only when the
|
|
24
|
+
MCP URL shares the origin of the configured API base URL. When it does
|
|
25
|
+
not, `mcp: true` makes the call throw `ComposioMCPDestinationError`
|
|
26
|
+
(naming both origins, never a key); without `mcp: true` the session is
|
|
27
|
+
returned with `session.mcp.headers` empty and a warning naming both
|
|
28
|
+
origins is logged, so native tools keep working.
|
|
29
|
+
|
|
23
30
|
**Overload 1**
|
|
24
31
|
|
|
25
32
|
```typescript
|
|
26
|
-
async create(userId: string, config:
|
|
33
|
+
async create(userId: string, config: { authConfigs?: Record<string, string>; connectedAccounts?: Record<string, string | string[]>; experimental?: { assistivePrompt?: { userTimezone?: string }; customToolkits?: CustomToolkit[]; customTools?: CustomTool[] }; manageConnections?: boolean | { callbackUrl?: string; enable?: boolean; waitForConnections?: boolean }; mcp?: boolean; multiAccount?: { enable: boolean; maxAccountsPerToolkit?: number; requireExplicitSelection?: boolean }; preload?: { tools?: string[] | 'all' }; sandbox?: { autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' | 'medium' | 'large' | 'xlarge' }; sessionPreset?: 'direct_tools'; tags?: 'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'[] | { disable?: ... | ... | ... | ...[]; enable?: ... | ... | ... | ...[] }; toolkits?: string[] | { disable: string[] } | { enable: string[] }; tools?: Record<string, string[] | { enable: ...[] } | { disable: ...[] } | { tags: ... | ... }>; workbench?: { autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' | 'medium' | 'large' | 'xlarge' } } & { mcp: true }, requestOptions?: ComposioRequestOptions): Promise<Session<TToolCollection, TTool, TProvider>>
|
|
27
34
|
```
|
|
28
35
|
|
|
29
36
|
**Parameters**
|
|
@@ -31,7 +38,7 @@ async create(userId: string, config: ToolRouterCreateSessionConfig & { mcp: true
|
|
|
31
38
|
| Name | Type | Description |
|
|
32
39
|
|------|------|-------------|
|
|
33
40
|
| `userId` | `string` | \{string\} The user id to create the session for |
|
|
34
|
-
| `config` |
|
|
41
|
+
| `config` | `\{ authConfigs?: Record<string, string>; connectedAccounts?: Record<string, string \| string[]>; experimental?: \{ assistivePrompt?: \{ userTimezone?: string \}; customToolkits?: CustomToolkit[]; customTools?: CustomTool[] \}; manageConnections?: boolean \| \{ callbackUrl?: string; enable?: boolean; waitForConnections?: boolean \}; mcp?: boolean; multiAccount?: \{ enable: boolean; maxAccountsPerToolkit?: number; requireExplicitSelection?: boolean \}; preload?: \{ tools?: string[] \| 'all' \}; sandbox?: \{ autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' \| 'medium' \| 'large' \| 'xlarge' \}; sessionPreset?: 'direct_tools'; tags?: 'readOnlyHint' \| 'destructiveHint' \| 'idempotentHint' \| 'openWorldHint'[] \| \{ disable?: ... \| ... \| ... \| ...[]; enable?: ... \| ... \| ... \| ...[] \}; toolkits?: string[] \| \{ disable: string[] \} \| \{ enable: string[] \}; tools?: Record<string, string[] \| \{ enable: ...[] \} \| \{ disable: ...[] \} \| \{ tags: ... \| ... \}>; workbench?: \{ autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' \| 'medium' \| 'large' \| 'xlarge' \} \} & \{ mcp: true \}` | \{ToolRouterCreateSessionConfig\} The config for the tool router session |
|
|
35
42
|
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
36
43
|
|
|
37
44
|
**Returns**
|
|
@@ -41,7 +48,7 @@ async create(userId: string, config: ToolRouterCreateSessionConfig & { mcp: true
|
|
|
41
48
|
**Overload 2**
|
|
42
49
|
|
|
43
50
|
```typescript
|
|
44
|
-
async create(userId: string, config?:
|
|
51
|
+
async create(userId: string, config?: { authConfigs?: Record<string, string>; connectedAccounts?: Record<string, string | string[]>; experimental?: { assistivePrompt?: { userTimezone?: string }; customToolkits?: CustomToolkit[]; customTools?: CustomTool[] }; manageConnections?: boolean | { callbackUrl?: string; enable?: boolean; waitForConnections?: boolean }; mcp?: boolean; multiAccount?: { enable: boolean; maxAccountsPerToolkit?: number; requireExplicitSelection?: boolean }; preload?: { tools?: string[] | 'all' }; sandbox?: { autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' | 'medium' | 'large' | 'xlarge' }; sessionPreset?: 'direct_tools'; tags?: 'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'[] | { disable?: 'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'[]; enable?: 'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'[] }; toolkits?: string[] | { disable: string[] } | { enable: string[] }; tools?: Record<string, string[] | { enable: string[] } | { disable: string[] } | { tags: ...[] | { disable?: ...; enable?: ... } }>; workbench?: { autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' | 'medium' | 'large' | 'xlarge' } }, requestOptions?: ComposioRequestOptions): Promise<SessionWithoutMcp<TToolCollection, TTool, TProvider>>
|
|
45
52
|
```
|
|
46
53
|
|
|
47
54
|
**Parameters**
|
|
@@ -49,7 +56,7 @@ async create(userId: string, config?: ToolRouterCreateSessionConfig, requestOpti
|
|
|
49
56
|
| Name | Type | Description |
|
|
50
57
|
|------|------|-------------|
|
|
51
58
|
| `userId` | `string` | \{string\} The user id to create the session for |
|
|
52
|
-
| `config?` | `
|
|
59
|
+
| `config?` | `\{ authConfigs?: Record<string, string>; connectedAccounts?: Record<string, string \| string[]>; experimental?: \{ assistivePrompt?: \{ userTimezone?: string \}; customToolkits?: CustomToolkit[]; customTools?: CustomTool[] \}; manageConnections?: boolean \| \{ callbackUrl?: string; enable?: boolean; waitForConnections?: boolean \}; mcp?: boolean; multiAccount?: \{ enable: boolean; maxAccountsPerToolkit?: number; requireExplicitSelection?: boolean \}; preload?: \{ tools?: string[] \| 'all' \}; sandbox?: \{ autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' \| 'medium' \| 'large' \| 'xlarge' \}; sessionPreset?: 'direct_tools'; tags?: 'readOnlyHint' \| 'destructiveHint' \| 'idempotentHint' \| 'openWorldHint'[] \| \{ disable?: 'readOnlyHint' \| 'destructiveHint' \| 'idempotentHint' \| 'openWorldHint'[]; enable?: 'readOnlyHint' \| 'destructiveHint' \| 'idempotentHint' \| 'openWorldHint'[] \}; toolkits?: string[] \| \{ disable: string[] \} \| \{ enable: string[] \}; tools?: Record<string, string[] \| \{ enable: string[] \} \| \{ disable: string[] \} \| \{ tags: ...[] \| \{ disable?: ...; enable?: ... \} \}>; workbench?: \{ autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' \| 'medium' \| 'large' \| 'xlarge' \} \}` | \{ToolRouterCreateSessionConfig\} The config for the tool router session |
|
|
53
60
|
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
54
61
|
|
|
55
62
|
**Returns**
|
|
@@ -83,7 +90,7 @@ Deleted sessions immediately stop being retrievable or executable. Deleting
|
|
|
83
90
|
a missing or already-deleted session surfaces the backend 404.
|
|
84
91
|
|
|
85
92
|
```typescript
|
|
86
|
-
async delete(id: string, requestOptions?: ComposioRequestOptions): Promise<
|
|
93
|
+
async delete(id: string, requestOptions?: ComposioRequestOptions): Promise<{ deleted: true; sessionId: string }>
|
|
87
94
|
```
|
|
88
95
|
|
|
89
96
|
**Parameters**
|
|
@@ -95,7 +102,7 @@ async delete(id: string, requestOptions?: ComposioRequestOptions): Promise<ToolR
|
|
|
95
102
|
|
|
96
103
|
**Returns**
|
|
97
104
|
|
|
98
|
-
`Promise
|
|
105
|
+
`Promise<\{ deleted: true; sessionId: string \}>`
|
|
99
106
|
|
|
100
107
|
---
|
|
101
108
|
|
|
@@ -103,10 +110,17 @@ async delete(id: string, requestOptions?: ComposioRequestOptions): Promise<ToolR
|
|
|
103
110
|
|
|
104
111
|
Use an existing session
|
|
105
112
|
|
|
113
|
+
The session's MCP config carries the session credential only when the
|
|
114
|
+
MCP URL shares the origin of the configured API base URL. When it does
|
|
115
|
+
not, `mcp: true` makes the call throw `ComposioMCPDestinationError`
|
|
116
|
+
(naming both origins, never a key); without `mcp: true` the session is
|
|
117
|
+
returned with `session.mcp.headers` empty and a warning naming both
|
|
118
|
+
origins is logged, so native tools keep working.
|
|
119
|
+
|
|
106
120
|
**Overload 1**
|
|
107
121
|
|
|
108
122
|
```typescript
|
|
109
|
-
async use(id: string, options: {
|
|
123
|
+
async use(id: string, options: { customToolkits?: CustomToolkit[]; customTools?: CustomTool[]; mcp: true }, requestOptions?: ComposioRequestOptions): Promise<Session<TToolCollection, TTool, TProvider>>
|
|
110
124
|
```
|
|
111
125
|
|
|
112
126
|
**Parameters**
|
|
@@ -114,7 +128,7 @@ async use(id: string, options: { customTools?: CustomTool[]; customToolkits?: Cu
|
|
|
114
128
|
| Name | Type | Description |
|
|
115
129
|
|------|------|-------------|
|
|
116
130
|
| `id` | `string` | \{string\} The id of the session to use |
|
|
117
|
-
| `options` | `\{
|
|
131
|
+
| `options` | `\{ customToolkits?: CustomToolkit[]; customTools?: CustomTool[]; mcp: true \}` | |
|
|
118
132
|
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
119
133
|
|
|
120
134
|
**Returns**
|
|
@@ -124,7 +138,7 @@ async use(id: string, options: { customTools?: CustomTool[]; customToolkits?: Cu
|
|
|
124
138
|
**Overload 2**
|
|
125
139
|
|
|
126
140
|
```typescript
|
|
127
|
-
async use(id: string, options?: {
|
|
141
|
+
async use(id: string, options?: { customToolkits?: CustomToolkit[]; customTools?: CustomTool[]; mcp?: boolean }, requestOptions?: ComposioRequestOptions): Promise<SessionWithoutMcp<TToolCollection, TTool, TProvider>>
|
|
128
142
|
```
|
|
129
143
|
|
|
130
144
|
**Parameters**
|
|
@@ -132,7 +146,7 @@ async use(id: string, options?: { customTools?: CustomTool[]; customToolkits?: C
|
|
|
132
146
|
| Name | Type | Description |
|
|
133
147
|
|------|------|-------------|
|
|
134
148
|
| `id` | `string` | \{string\} The id of the session to use |
|
|
135
|
-
| `options?` | `\{
|
|
149
|
+
| `options?` | `\{ customToolkits?: CustomToolkit[]; customTools?: CustomTool[]; mcp?: boolean \}` | |
|
|
136
150
|
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
137
151
|
|
|
138
152
|
**Returns**
|
|
@@ -9,7 +9,7 @@ Access this class through the `composio.toolkits` property:
|
|
|
9
9
|
|
|
10
10
|
```typescript
|
|
11
11
|
const composio = new Composio({ apiKey: 'your-api-key' });
|
|
12
|
-
const result = await composio.toolkits.
|
|
12
|
+
const result = await composio.toolkits.get({});
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
@@ -44,6 +44,35 @@ const connectionRequest = await composio.toolkits.authorize(userId, 'github');
|
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
+
### changelog()
|
|
48
|
+
|
|
49
|
+
Retrieves the version changelog of every toolkit (the last 10 versions
|
|
50
|
+
per toolkit).
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
async changelog(requestOptions?: ComposioRequestOptions): Promise<{ items: { displayName: string; name: string; slug: string; versions: { changelog: ...; version: ... }[] }[] }>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Parameters**
|
|
57
|
+
|
|
58
|
+
| Name | Type |
|
|
59
|
+
|------|------|
|
|
60
|
+
| `requestOptions?` | `ComposioRequestOptions` |
|
|
61
|
+
|
|
62
|
+
**Returns**
|
|
63
|
+
|
|
64
|
+
`Promise<\{ items: \{ displayName: string; name: string; slug: string; versions: \{ changelog: ...; version: ... \}[] \}[] \}>` — Toolkits with their recent version changelogs
|
|
65
|
+
|
|
66
|
+
**Example**
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
const { items } = await composio.toolkits.changelog();
|
|
70
|
+
const github = items.find(item => item.slug === 'github');
|
|
71
|
+
console.log(github?.versions[0]); // { version: '20250909_00', changelog: '...' }
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
47
76
|
### get()
|
|
48
77
|
|
|
49
78
|
Retrieves a specific toolkit by its slug identifier.
|
|
@@ -51,7 +80,7 @@ Retrieves a specific toolkit by its slug identifier.
|
|
|
51
80
|
**Overload 1**
|
|
52
81
|
|
|
53
82
|
```typescript
|
|
54
|
-
async get(slug: string, requestOptions?: ComposioRequestOptions): Promise<
|
|
83
|
+
async get(slug: string, requestOptions?: ComposioRequestOptions): Promise<{ authConfigDetails?: { authHintUrl?: string | null; fields: { authConfigCreation: { optional: ...; required: ... }; connectedAccountInitiation: { optional: ...; required: ... } }; mode: string; name: string; proxy?: { baseUrl?: string }; requiredScopes?: string[] }[]; baseUrl?: string; composioManagedAuthSchemes?: string[]; getCurrentUserEndpoint?: string; getCurrentUserEndpointMethod?: string; isLocalToolkit: boolean; meta: { appUrl?: string; availableVersions?: string[]; categories?: { name: string; slug: string }[]; createdAt?: string; description?: string; logo?: string; toolsCount?: number; triggersCount?: number; updatedAt?: string }; name: string; slug: string }>
|
|
55
84
|
```
|
|
56
85
|
|
|
57
86
|
**Parameters**
|
|
@@ -63,24 +92,24 @@ async get(slug: string, requestOptions?: ComposioRequestOptions): Promise<Toolki
|
|
|
63
92
|
|
|
64
93
|
**Returns**
|
|
65
94
|
|
|
66
|
-
`Promise
|
|
95
|
+
`Promise<\{ authConfigDetails?: \{ authHintUrl?: string \| null; fields: \{ authConfigCreation: \{ optional: ...; required: ... \}; connectedAccountInitiation: \{ optional: ...; required: ... \} \}; mode: string; name: string; proxy?: \{ baseUrl?: string \}; requiredScopes?: string[] \}[]; baseUrl?: string; composioManagedAuthSchemes?: string[]; getCurrentUserEndpoint?: string; getCurrentUserEndpointMethod?: string; isLocalToolkit: boolean; meta: \{ appUrl?: string; availableVersions?: string[]; categories?: \{ name: string; slug: string \}[]; createdAt?: string; description?: string; logo?: string; toolsCount?: number; triggersCount?: number; updatedAt?: string \}; name: string; slug: string \}>` — The toolkit object with detailed information
|
|
67
96
|
|
|
68
97
|
**Overload 2**
|
|
69
98
|
|
|
70
99
|
```typescript
|
|
71
|
-
async get(query?:
|
|
100
|
+
async get(query?: { category?: string; cursor?: string; limit?: number; managedBy?: 'all' | 'composio' | 'project'; sortBy?: 'usage' | 'alphabetically' }, requestOptions?: ComposioRequestOptions): Promise<{ authSchemes?: string[]; composioManagedAuthSchemes?: string[]; isLocalToolkit: boolean; meta: { appUrl?: string; availableVersions?: string[]; categories?: { name: ...; slug: ... }[]; createdAt?: string; description?: string; logo?: string; toolsCount?: number; triggersCount?: number; updatedAt?: string }; name: string; noAuth?: boolean; slug: string }[]>
|
|
72
101
|
```
|
|
73
102
|
|
|
74
103
|
**Parameters**
|
|
75
104
|
|
|
76
105
|
| Name | Type | Description |
|
|
77
106
|
|------|------|-------------|
|
|
78
|
-
| `query?` | `
|
|
107
|
+
| `query?` | `\{ category?: string; cursor?: string; limit?: number; managedBy?: 'all' \| 'composio' \| 'project'; sortBy?: 'usage' \| 'alphabetically' \}` | The query parameters to filter toolkits |
|
|
79
108
|
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
80
109
|
|
|
81
110
|
**Returns**
|
|
82
111
|
|
|
83
|
-
`Promise
|
|
112
|
+
`Promise<\{ authSchemes?: string[]; composioManagedAuthSchemes?: string[]; isLocalToolkit: boolean; meta: \{ appUrl?: string; availableVersions?: string[]; categories?: \{ name: ...; slug: ... \}[]; createdAt?: string; description?: string; logo?: string; toolsCount?: number; triggersCount?: number; updatedAt?: string \}; name: string; noAuth?: boolean; slug: string \}[]>` — A paginated list of toolkits matching the query criteria
|
|
84
113
|
|
|
85
114
|
**Example**
|
|
86
115
|
|
|
@@ -98,7 +127,7 @@ console.log(githubToolkit.authConfigDetails); // Authentication configuration de
|
|
|
98
127
|
Retrieves the fields required for creating an auth config for a toolkit.
|
|
99
128
|
|
|
100
129
|
```typescript
|
|
101
|
-
async getAuthConfigCreationFields(toolkitSlug: string, authScheme: AuthSchemeType, options?: { requiredOnly?: boolean }): Promise
|
|
130
|
+
async getAuthConfigCreationFields(toolkitSlug: string, authScheme: AuthSchemeType, options?: { requiredOnly?: boolean }): Promise<...>
|
|
102
131
|
```
|
|
103
132
|
|
|
104
133
|
**Parameters**
|
|
@@ -111,7 +140,7 @@ async getAuthConfigCreationFields(toolkitSlug: string, authScheme: AuthSchemeTyp
|
|
|
111
140
|
|
|
112
141
|
**Returns**
|
|
113
142
|
|
|
114
|
-
`Promise
|
|
143
|
+
`Promise<...>` — The fields required for creating an auth config
|
|
115
144
|
|
|
116
145
|
---
|
|
117
146
|
|
|
@@ -120,7 +149,7 @@ async getAuthConfigCreationFields(toolkitSlug: string, authScheme: AuthSchemeTyp
|
|
|
120
149
|
Retrieves the fields required for initiating a connected account for a toolkit.
|
|
121
150
|
|
|
122
151
|
```typescript
|
|
123
|
-
async getConnectedAccountInitiationFields(toolkitSlug: string, authScheme: AuthSchemeType, options?: { requiredOnly?: boolean }): Promise
|
|
152
|
+
async getConnectedAccountInitiationFields(toolkitSlug: string, authScheme: AuthSchemeType, options?: { requiredOnly?: boolean }): Promise<...>
|
|
124
153
|
```
|
|
125
154
|
|
|
126
155
|
**Parameters**
|
|
@@ -133,7 +162,39 @@ async getConnectedAccountInitiationFields(toolkitSlug: string, authScheme: AuthS
|
|
|
133
162
|
|
|
134
163
|
**Returns**
|
|
135
164
|
|
|
136
|
-
`Promise
|
|
165
|
+
`Promise<...>` — The fields required for initiating a connected account
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### getMany()
|
|
170
|
+
|
|
171
|
+
Retrieves several toolkits by slug in a single request.
|
|
172
|
+
|
|
173
|
+
Returns the same transformed shape as `composio.toolkits.get({ ... })`.
|
|
174
|
+
Unknown slugs are simply absent from the result.
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
async getMany(slugs: string[], params?: { category?: string; cursor?: string; limit?: number; managedBy?: 'all' | 'composio' | 'project'; sortBy?: 'usage' | 'alphabetically' }, requestOptions?: ComposioRequestOptions): Promise<{ authSchemes?: string[]; composioManagedAuthSchemes?: string[]; isLocalToolkit: boolean; meta: { appUrl?: string; availableVersions?: string[]; categories?: { name: ...; slug: ... }[]; createdAt?: string; description?: string; logo?: string; toolsCount?: number; triggersCount?: number; updatedAt?: string }; name: string; noAuth?: boolean; slug: string }[]>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Parameters**
|
|
181
|
+
|
|
182
|
+
| Name | Type | Description |
|
|
183
|
+
|------|------|-------------|
|
|
184
|
+
| `slugs` | `string[]` | The toolkit slugs to retrieve (at least one) |
|
|
185
|
+
| `params?` | `\{ category?: string; cursor?: string; limit?: number; managedBy?: 'all' \| 'composio' \| 'project'; sortBy?: 'usage' \| 'alphabetically' \}` | Optional filters and pagination, as for `list` |
|
|
186
|
+
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
187
|
+
|
|
188
|
+
**Returns**
|
|
189
|
+
|
|
190
|
+
`Promise<\{ authSchemes?: string[]; composioManagedAuthSchemes?: string[]; isLocalToolkit: boolean; meta: \{ appUrl?: string; availableVersions?: string[]; categories?: \{ name: ...; slug: ... \}[]; createdAt?: string; description?: string; logo?: string; toolsCount?: number; triggersCount?: number; updatedAt?: string \}; name: string; noAuth?: boolean; slug: string \}[]>` — The matching toolkits
|
|
191
|
+
|
|
192
|
+
**Example**
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
const toolkits = await composio.toolkits.getMany(['github', 'slack']);
|
|
196
|
+
console.log(toolkits.map(toolkit => toolkit.name)); // ['GitHub', 'Slack']
|
|
197
|
+
```
|
|
137
198
|
|
|
138
199
|
---
|
|
139
200
|
|
|
@@ -145,7 +206,7 @@ This method fetches the complete list of categories from the Composio API
|
|
|
145
206
|
and transforms the response to use camelCase property naming.
|
|
146
207
|
|
|
147
208
|
```typescript
|
|
148
|
-
async listCategories(requestOptions?: ComposioRequestOptions): Promise<
|
|
209
|
+
async listCategories(requestOptions?: ComposioRequestOptions): Promise<{ items: { id: string; name: string }[]; nextCursor: string | null; totalPages: number }>
|
|
149
210
|
```
|
|
150
211
|
|
|
151
212
|
**Parameters**
|
|
@@ -156,7 +217,7 @@ async listCategories(requestOptions?: ComposioRequestOptions): Promise<ToolkitRe
|
|
|
156
217
|
|
|
157
218
|
**Returns**
|
|
158
219
|
|
|
159
|
-
`Promise
|
|
220
|
+
`Promise<\{ items: \{ id: string; name: string \}[]; nextCursor: string \| null; totalPages: number \}>` — The list of toolkit categories
|
|
160
221
|
|
|
161
222
|
**Example**
|
|
162
223
|
|
|
@@ -167,3 +228,79 @@ console.log(categories.items); // Array of category objects
|
|
|
167
228
|
```
|
|
168
229
|
|
|
169
230
|
---
|
|
231
|
+
|
|
232
|
+
### listGrantContexts()
|
|
233
|
+
|
|
234
|
+
Lists the grant-context dimensions a toolkit's scope recommendation
|
|
235
|
+
depends on (for example the Google account type), with their allowed
|
|
236
|
+
values and the default the API assumes.
|
|
237
|
+
**Experimental — the API marks this endpoint beta; shape may change.**
|
|
238
|
+
|
|
239
|
+
Pass a dimension and a value as `grantContext` to
|
|
240
|
+
`composio.toolkits.recommendScopes()` to tailor the recommendation.
|
|
241
|
+
|
|
242
|
+
```typescript
|
|
243
|
+
async listGrantContexts(toolkitSlug: string, params?: { authScheme?: 'OAUTH2' | 'OAUTH1' | 'API_KEY' | 'BASIC' | 'BILLCOM_AUTH' | 'BEARER_TOKEN' | 'GOOGLE_SERVICE_ACCOUNT' | 'NO_AUTH' | 'BASIC_WITH_JWT' | 'CALCOM_AUTH' | 'SERVICE_ACCOUNT' | 'SAML' | 'DCR_OAUTH' | 'CIMD_OAUTH' | 'S2S_OAUTH2'; toolkitVersion?: string }, requestOptions?: ComposioRequestOptions): Promise<{ authScheme: string; defaultGrantContext: Record<string, string>; grantContextDimensions: { description: string; dimension: string; values: string[] }[]; toolkitVersion: string }>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Parameters**
|
|
247
|
+
|
|
248
|
+
| Name | Type | Description |
|
|
249
|
+
|------|------|-------------|
|
|
250
|
+
| `toolkitSlug` | `string` | The toolkit to list grant contexts for |
|
|
251
|
+
| `params?` | `\{ authScheme?: 'OAUTH2' \| 'OAUTH1' \| 'API_KEY' \| 'BASIC' \| 'BILLCOM_AUTH' \| 'BEARER_TOKEN' \| 'GOOGLE_SERVICE_ACCOUNT' \| 'NO_AUTH' \| 'BASIC_WITH_JWT' \| 'CALCOM_AUTH' \| 'SERVICE_ACCOUNT' \| 'SAML' \| 'DCR_OAUTH' \| 'CIMD_OAUTH' \| 'S2S_OAUTH2'; toolkitVersion?: string \}` | Optional auth scheme and toolkit version |
|
|
252
|
+
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
253
|
+
|
|
254
|
+
**Returns**
|
|
255
|
+
|
|
256
|
+
`Promise<\{ authScheme: string; defaultGrantContext: Record<string, string>; grantContextDimensions: \{ description: string; dimension: string; values: string[] \}[]; toolkitVersion: string \}>` — The dimensions and the default grant context
|
|
257
|
+
|
|
258
|
+
**Example**
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
const { grantContextDimensions } = await composio.toolkits.listGrantContexts('gmail');
|
|
262
|
+
const [accountType] = grantContextDimensions;
|
|
263
|
+
const { scopes } = await composio.toolkits.recommendScopes('gmail', {
|
|
264
|
+
tools: ['GMAIL_SEND_EMAIL'],
|
|
265
|
+
grantContext: { [accountType.dimension]: accountType.values[0] },
|
|
266
|
+
});
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
### recommendScopes()
|
|
272
|
+
|
|
273
|
+
Recommends the OAuth scopes to request so a connection can run the given
|
|
274
|
+
tools.
|
|
275
|
+
**Experimental — the API marks this endpoint beta; shape may change.**
|
|
276
|
+
|
|
277
|
+
The answer comes in two variants: `leastPrivilege` (narrowest documented
|
|
278
|
+
scope per requirement) and `fewest` (smallest set covering everything).
|
|
279
|
+
Pass `toolkitVersion` from a previous answer to pin the computation.
|
|
280
|
+
|
|
281
|
+
```typescript
|
|
282
|
+
async recommendScopes(toolkitSlug: string, params: { authScheme?: 'OAUTH2' | 'OAUTH1' | 'API_KEY' | 'BASIC' | 'BILLCOM_AUTH' | 'BEARER_TOKEN' | 'GOOGLE_SERVICE_ACCOUNT' | 'NO_AUTH' | 'BASIC_WITH_JWT' | 'CALCOM_AUTH' | 'SERVICE_ACCOUNT' | 'SAML' | 'DCR_OAUTH' | 'CIMD_OAUTH' | 'S2S_OAUTH2'; availableScopes?: string[]; exclude?: string[]; grantContext?: Record<string, string>; include?: string[]; toolkitVersion?: string; tools: string[] }, requestOptions?: ComposioRequestOptions): Promise<{ authScheme: string; grantContext: Record<string, string>; scopes: { conditional: { for: ...[]; scope: string; when: Record<..., ...> }[]; fewest: string[]; leastPrivilege: string[] }; toolkitVersion: string }>
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**Parameters**
|
|
286
|
+
|
|
287
|
+
| Name | Type | Description |
|
|
288
|
+
|------|------|-------------|
|
|
289
|
+
| `toolkitSlug` | `string` | The toolkit to recommend scopes for |
|
|
290
|
+
| `params` | `\{ authScheme?: 'OAUTH2' \| 'OAUTH1' \| 'API_KEY' \| 'BASIC' \| 'BILLCOM_AUTH' \| 'BEARER_TOKEN' \| 'GOOGLE_SERVICE_ACCOUNT' \| 'NO_AUTH' \| 'BASIC_WITH_JWT' \| 'CALCOM_AUTH' \| 'SERVICE_ACCOUNT' \| 'SAML' \| 'DCR_OAUTH' \| 'CIMD_OAUTH' \| 'S2S_OAUTH2'; availableScopes?: string[]; exclude?: string[]; grantContext?: Record<string, string>; include?: string[]; toolkitVersion?: string; tools: string[] \}` | Tools to cover (`[]` for the whole toolkit), auth scheme, grant context and scope constraints |
|
|
291
|
+
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
292
|
+
|
|
293
|
+
**Returns**
|
|
294
|
+
|
|
295
|
+
`Promise<\{ authScheme: string; grantContext: Record<string, string>; scopes: \{ conditional: \{ for: ...[]; scope: string; when: Record<..., ...> \}[]; fewest: string[]; leastPrivilege: string[] \}; toolkitVersion: string \}>` — The recommended scope sets
|
|
296
|
+
|
|
297
|
+
**Example**
|
|
298
|
+
|
|
299
|
+
```typescript
|
|
300
|
+
const { scopes } = await composio.toolkits.recommendScopes('gmail', {
|
|
301
|
+
tools: ['GMAIL_SEND_EMAIL', 'GMAIL_FETCH_EMAILS'],
|
|
302
|
+
});
|
|
303
|
+
console.log(scopes.leastPrivilege);
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
---
|
|
@@ -26,7 +26,7 @@ the execution will throw a `ComposioToolVersionRequiredError` unless `dangerousl
|
|
|
26
26
|
This helps prevent unexpected behavior when new toolkit versions are released.
|
|
27
27
|
|
|
28
28
|
```typescript
|
|
29
|
-
async execute(slug: string, body:
|
|
29
|
+
async execute(slug: string, body: { allowTracing?: boolean; arguments?: Record<string, unknown>; connectedAccountId?: string; customAuthParams?: { baseURL?: string; body?: Record<string, unknown>; parameters: { in: 'query' | 'header'; name: string; value: string | number }[] }; customConnectionData?: { authScheme: 'OAUTH2'; toolkitSlug: string; val: { access_token: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; authed_user?: { access_token?: ...; scope?: ... }; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; expires_in?: ... | ... | ...; extension?: string; form_api_base_url?: string; generic_api_key?: string; id_token?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; refresh_token?: ... | ...; region?: string; registration_access_token?: string; registration_client_uri?: string; scope?: ... | ... | ...; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token_type?: string; version?: string; webhook_signature?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'S2S_OAUTH2'; toolkitSlug: string; val: { access_token?: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; expires_in?: ... | ... | ...; extension?: string; form_api_base_url?: string; generic_api_key?: string; id_token?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; refresh_token?: ... | ...; region?: string; registration_access_token?: string; registration_client_uri?: string; scope?: ... | ... | ...; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token_type?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'DCR_OAUTH'; toolkitSlug: string; val: { access_token: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; client_id: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'API_KEY'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'BASIC_WITH_JWT'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; password: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; username: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'BASIC'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; password: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; username: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'BEARER_TOKEN'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'OAUTH1'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; callback_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; consumer_key?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; oauth_token: string; oauth_token_secret: string; oauth_verifier?: string; proxy_password?: string; proxy_username?: string; redirectUrl?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'NO_AUTH'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'SERVICE_ACCOUNT'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; application_id: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; installation_id: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; private_key: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object }; dangerouslySkipVersionCheck?: boolean; text?: string; userId?: string; version?: string }, options?: { afterExecute?: afterExecuteModifier; beforeExecute?: beforeExecuteModifier } & BeforeFileUploadHook & ComposioRequestOptions): Promise<...>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
**Parameters**
|
|
@@ -34,12 +34,12 @@ async execute(slug: string, body: ToolExecuteParams, options?: ExecuteToolModifi
|
|
|
34
34
|
| Name | Type | Description |
|
|
35
35
|
|------|------|-------------|
|
|
36
36
|
| `slug` | `string` | The slug/ID of the tool to be executed |
|
|
37
|
-
| `body` | `
|
|
38
|
-
| `options?` |
|
|
37
|
+
| `body` | `\{ allowTracing?: boolean; arguments?: Record<string, unknown>; connectedAccountId?: string; customAuthParams?: \{ baseURL?: string; body?: Record<string, unknown>; parameters: \{ in: 'query' \| 'header'; name: string; value: string \| number \}[] \}; customConnectionData?: \{ authScheme: 'OAUTH2'; toolkitSlug: string; val: \{ access_token: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; authed_user?: \{ access_token?: ...; scope?: ... \}; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; expires_in?: ... \| ... \| ...; extension?: string; form_api_base_url?: string; generic_api_key?: string; id_token?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; refresh_token?: ... \| ...; region?: string; registration_access_token?: string; registration_client_uri?: string; scope?: ... \| ... \| ...; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token_type?: string; version?: string; webhook_signature?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'S2S_OAUTH2'; toolkitSlug: string; val: \{ access_token?: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; expires_in?: ... \| ... \| ...; extension?: string; form_api_base_url?: string; generic_api_key?: string; id_token?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; refresh_token?: ... \| ...; region?: string; registration_access_token?: string; registration_client_uri?: string; scope?: ... \| ... \| ...; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token_type?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'DCR_OAUTH'; toolkitSlug: string; val: \{ access_token: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; client_id: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'API_KEY'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'BASIC_WITH_JWT'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; password: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; username: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'BASIC'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; password: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; username: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'BEARER_TOKEN'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'OAUTH1'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; callback_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; consumer_key?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; oauth_token: string; oauth_token_secret: string; oauth_verifier?: string; proxy_password?: string; proxy_username?: string; redirectUrl?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'NO_AUTH'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'SERVICE_ACCOUNT'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; application_id: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; installation_id: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; private_key: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \}; dangerouslySkipVersionCheck?: boolean; text?: string; userId?: string; version?: string \}` | The parameters to be passed to the tool |
|
|
38
|
+
| `options?` | `\{ afterExecute?: afterExecuteModifier; beforeExecute?: beforeExecuteModifier \} & BeforeFileUploadHook & ComposioRequestOptions` | Optional modifiers and request options |
|
|
39
39
|
|
|
40
40
|
**Returns**
|
|
41
41
|
|
|
42
|
-
`Promise
|
|
42
|
+
`Promise<...>` — The response from the tool execution
|
|
43
43
|
|
|
44
44
|
**Example**
|
|
45
45
|
|
|
@@ -104,7 +104,7 @@ const result = await composio.tools.execute('HACKERNEWS_GET_FRONTPAGE', {
|
|
|
104
104
|
Executes a tool based on a tool router session.
|
|
105
105
|
|
|
106
106
|
```typescript
|
|
107
|
-
async executeSessionTool(toolSlug: string, body:
|
|
107
|
+
async executeSessionTool(toolSlug: string, body: { arguments?: Record<string, unknown>; sessionId: string }, modifiers?: SessionExecuteMetaModifiers, tool?: { availableVersions?: string[]; description?: string; inputParameters?: { $defs?: Record<string, JSONSchemaProperty>; additionalProperties?: boolean | JSONSchemaProperty; allOf?: JSONSchemaProperty[]; anyOf?: JSONSchemaProperty[]; default?: unknown; definitions?: Record<string, JSONSchemaProperty>; description?: string; not?: JSONSchemaProperty; nullable?: boolean; oneOf?: JSONSchemaProperty[]; patternProperties?: Record<string, JSONSchemaProperty>; properties?: Record<string, JSONSchemaProperty>; required?: string[]; title?: string; type: 'object' }; isDeprecated?: boolean; isNoAuth?: boolean; name: string; outputParameters?: { $defs?: Record<string, JSONSchemaProperty>; additionalProperties?: boolean | JSONSchemaProperty; allOf?: JSONSchemaProperty[]; anyOf?: JSONSchemaProperty[]; default?: unknown; definitions?: Record<string, JSONSchemaProperty>; description?: string; not?: JSONSchemaProperty; nullable?: boolean; oneOf?: JSONSchemaProperty[]; patternProperties?: Record<string, JSONSchemaProperty>; properties?: Record<string, JSONSchemaProperty>; required?: string[]; title?: string; type: 'object' }; scopes?: string[]; slug: string; tags?: string[]; toolkit?: { logo?: string; name: string; slug: string }; version?: string }, options?: ToolRouterSessionExecuteOptions, requestOptions?: ComposioRequestOptions): Promise<...>
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
**Parameters**
|
|
@@ -112,15 +112,15 @@ async executeSessionTool(toolSlug: string, body: ToolExecuteMetaParams, modifier
|
|
|
112
112
|
| Name | Type | Description |
|
|
113
113
|
|------|------|-------------|
|
|
114
114
|
| `toolSlug` | `string` | The slug of the tool to execute |
|
|
115
|
-
| `body` | `
|
|
115
|
+
| `body` | `\{ arguments?: Record<string, unknown>; sessionId: string \}` | The execution parameters |
|
|
116
116
|
| `modifiers?` | `SessionExecuteMetaModifiers` | The modifiers to apply to the tool |
|
|
117
|
-
| `tool?` | `
|
|
117
|
+
| `tool?` | `\{ availableVersions?: string[]; description?: string; inputParameters?: \{ $defs?: Record<string, JSONSchemaProperty>; additionalProperties?: boolean \| JSONSchemaProperty; allOf?: JSONSchemaProperty[]; anyOf?: JSONSchemaProperty[]; default?: unknown; definitions?: Record<string, JSONSchemaProperty>; description?: string; not?: JSONSchemaProperty; nullable?: boolean; oneOf?: JSONSchemaProperty[]; patternProperties?: Record<string, JSONSchemaProperty>; properties?: Record<string, JSONSchemaProperty>; required?: string[]; title?: string; type: 'object' \}; isDeprecated?: boolean; isNoAuth?: boolean; name: string; outputParameters?: \{ $defs?: Record<string, JSONSchemaProperty>; additionalProperties?: boolean \| JSONSchemaProperty; allOf?: JSONSchemaProperty[]; anyOf?: JSONSchemaProperty[]; default?: unknown; definitions?: Record<string, JSONSchemaProperty>; description?: string; not?: JSONSchemaProperty; nullable?: boolean; oneOf?: JSONSchemaProperty[]; patternProperties?: Record<string, JSONSchemaProperty>; properties?: Record<string, JSONSchemaProperty>; required?: string[]; title?: string; type: 'object' \}; scopes?: string[]; slug: string; tags?: string[]; toolkit?: \{ logo?: string; name: string; slug: string \}; version?: string \}` | Optional tool schema used to resolve toolkit metadata for modifiers |
|
|
118
118
|
| `options?` | `ToolRouterSessionExecuteOptions` | |
|
|
119
119
|
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
120
120
|
|
|
121
121
|
**Returns**
|
|
122
122
|
|
|
123
|
-
`Promise
|
|
123
|
+
`Promise<...>` — The response from the tool execution
|
|
124
124
|
|
|
125
125
|
---
|
|
126
126
|
|
|
@@ -132,7 +132,7 @@ This method fetches the tools from the Composio API and wraps them using the pro
|
|
|
132
132
|
**Overload 1**
|
|
133
133
|
|
|
134
134
|
```typescript
|
|
135
|
-
async get(userId: string, filters: ToolListParams, options?: ProviderOptions & ComposioRequestOptions): Promise<ReturnType
|
|
135
|
+
async get(userId: string, filters: ToolListParams, options?: ProviderOptions & ComposioRequestOptions): Promise<ReturnType>
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
**Parameters**
|
|
@@ -145,12 +145,12 @@ async get(userId: string, filters: ToolListParams, options?: ProviderOptions & C
|
|
|
145
145
|
|
|
146
146
|
**Returns**
|
|
147
147
|
|
|
148
|
-
`Promise<ReturnType
|
|
148
|
+
`Promise<ReturnType>` — The wrapped tools collection
|
|
149
149
|
|
|
150
150
|
**Overload 2**
|
|
151
151
|
|
|
152
152
|
```typescript
|
|
153
|
-
async get(userId: string, slug: string, options?: ProviderOptions & ComposioRequestOptions): Promise<ReturnType
|
|
153
|
+
async get(userId: string, slug: string, options?: ProviderOptions & ComposioRequestOptions): Promise<ReturnType>
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
**Parameters**
|
|
@@ -163,7 +163,7 @@ async get(userId: string, slug: string, options?: ProviderOptions & ComposioRequ
|
|
|
163
163
|
|
|
164
164
|
**Returns**
|
|
165
165
|
|
|
166
|
-
`Promise<ReturnType
|
|
166
|
+
`Promise<ReturnType>` — The wrapped tool
|
|
167
167
|
|
|
168
168
|
**Example**
|
|
169
169
|
|
|
@@ -230,7 +230,7 @@ Tool Router session, then use `session.tools()`, `session.customTools()`, or
|
|
|
230
230
|
`session.execute()`.
|
|
231
231
|
|
|
232
232
|
```typescript
|
|
233
|
-
async getRawComposioToolBySlug(slug: string, options?: ToolRetrievalOptions, requestOptions?: ComposioRequestOptions): Promise<
|
|
233
|
+
async getRawComposioToolBySlug(slug: string, options?: ToolRetrievalOptions, requestOptions?: ComposioRequestOptions): Promise<{ availableVersions?: string[]; description?: string; inputParameters?: { $defs?: Record<string, JSONSchemaProperty>; additionalProperties?: boolean | JSONSchemaProperty; allOf?: JSONSchemaProperty[]; anyOf?: JSONSchemaProperty[]; default?: unknown; definitions?: Record<string, JSONSchemaProperty>; description?: string; not?: JSONSchemaProperty; nullable?: boolean; oneOf?: JSONSchemaProperty[]; patternProperties?: Record<string, JSONSchemaProperty>; properties?: Record<string, JSONSchemaProperty>; required?: string[]; title?: string; type: 'object' }; isDeprecated?: boolean; isNoAuth?: boolean; name: string; outputParameters?: { $defs?: Record<string, JSONSchemaProperty>; additionalProperties?: boolean | JSONSchemaProperty; allOf?: JSONSchemaProperty[]; anyOf?: JSONSchemaProperty[]; default?: unknown; definitions?: Record<string, JSONSchemaProperty>; description?: string; not?: JSONSchemaProperty; nullable?: boolean; oneOf?: JSONSchemaProperty[]; patternProperties?: Record<string, JSONSchemaProperty>; properties?: Record<string, JSONSchemaProperty>; required?: string[]; title?: string; type: 'object' }; scopes?: string[]; slug: string; tags?: string[]; toolkit?: { logo?: string; name: string; slug: string }; version?: string }>
|
|
234
234
|
```
|
|
235
235
|
|
|
236
236
|
**Parameters**
|
|
@@ -243,7 +243,7 @@ async getRawComposioToolBySlug(slug: string, options?: ToolRetrievalOptions, req
|
|
|
243
243
|
|
|
244
244
|
**Returns**
|
|
245
245
|
|
|
246
|
-
`Promise<
|
|
246
|
+
`Promise<\{ availableVersions?: string[]; description?: string; inputParameters?: \{ $defs?: Record<string, JSONSchemaProperty>; additionalProperties?: boolean \| JSONSchemaProperty; allOf?: JSONSchemaProperty[]; anyOf?: JSONSchemaProperty[]; default?: unknown; definitions?: Record<string, JSONSchemaProperty>; description?: string; not?: JSONSchemaProperty; nullable?: boolean; oneOf?: JSONSchemaProperty[]; patternProperties?: Record<string, JSONSchemaProperty>; properties?: Record<string, JSONSchemaProperty>; required?: string[]; title?: string; type: 'object' \}; isDeprecated?: boolean; isNoAuth?: boolean; name: string; outputParameters?: \{ $defs?: Record<string, JSONSchemaProperty>; additionalProperties?: boolean \| JSONSchemaProperty; allOf?: JSONSchemaProperty[]; anyOf?: JSONSchemaProperty[]; default?: unknown; definitions?: Record<string, JSONSchemaProperty>; description?: string; not?: JSONSchemaProperty; nullable?: boolean; oneOf?: JSONSchemaProperty[]; patternProperties?: Record<string, JSONSchemaProperty>; properties?: Record<string, JSONSchemaProperty>; required?: string[]; title?: string; type: 'object' \}; scopes?: string[]; slug: string; tags?: string[]; toolkit?: \{ logo?: string; name: string; slug: string \}; version?: string \}>` — The requested tool with its complete schema and metadata
|
|
247
247
|
|
|
248
248
|
**Example**
|
|
249
249
|
|
|
@@ -396,7 +396,7 @@ This method is mostly used by the CLI to get the list of tools.
|
|
|
396
396
|
No filtering is done on the tools, the list is cached in the backend, no further optimization is required.
|
|
397
397
|
|
|
398
398
|
```typescript
|
|
399
|
-
async getToolsEnum(requestOptions?: ComposioRequestOptions): Promise<
|
|
399
|
+
async getToolsEnum(requestOptions?: ComposioRequestOptions): Promise<string[]>
|
|
400
400
|
```
|
|
401
401
|
|
|
402
402
|
**Parameters**
|
|
@@ -407,7 +407,7 @@ async getToolsEnum(requestOptions?: ComposioRequestOptions): Promise<ToolRetriev
|
|
|
407
407
|
|
|
408
408
|
**Returns**
|
|
409
409
|
|
|
410
|
-
`Promise<
|
|
410
|
+
`Promise<string[]>` — The complete list of all available tools with their metadata
|
|
411
411
|
|
|
412
412
|
**Example**
|
|
413
413
|
|
|
@@ -433,14 +433,14 @@ already include a path. Google Calendar's base URL is
|
|
|
433
433
|
and returns a 404 from Google). An absolute URL on the same domain is sent as-is.
|
|
434
434
|
|
|
435
435
|
```typescript
|
|
436
|
-
async proxyExecute(body:
|
|
436
|
+
async proxyExecute(body: { body?: unknown; connectedAccountId?: string; customConnectionData?: { authScheme: 'OAUTH2'; toolkitSlug: string; val: { access_token: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; authed_user?: { access_token?: ...; scope?: ... }; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; expires_in?: ... | ... | ...; extension?: string; form_api_base_url?: string; generic_api_key?: string; id_token?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; refresh_token?: ... | ...; region?: string; registration_access_token?: string; registration_client_uri?: string; scope?: ... | ... | ...; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token_type?: string; version?: string; webhook_signature?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'S2S_OAUTH2'; toolkitSlug: string; val: { access_token?: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; expires_in?: ... | ... | ...; extension?: string; form_api_base_url?: string; generic_api_key?: string; id_token?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; refresh_token?: ... | ...; region?: string; registration_access_token?: string; registration_client_uri?: string; scope?: ... | ... | ...; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token_type?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'DCR_OAUTH'; toolkitSlug: string; val: { access_token: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; client_id: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'API_KEY'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'BASIC_WITH_JWT'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; password: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; username: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'BASIC'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; password: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; username: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'BEARER_TOKEN'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'OAUTH1'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; callback_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; consumer_key?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; oauth_token: string; oauth_token_secret: string; oauth_verifier?: string; proxy_password?: string; proxy_username?: string; redirectUrl?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'NO_AUTH'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object } | { authScheme: 'SERVICE_ACCOUNT'; toolkitSlug: string; val: { account_id?: string; account_url?: string; api_key?: string; api_url?: string; application_id: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; installation_id: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; private_key: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string } & object }; endpoint: string; method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; parameters?: { in: 'query' | 'header'; name: string; value: string | number }[] }, requestOptions?: ComposioRequestOptions): Promise<ToolProxyResponse>
|
|
437
437
|
```
|
|
438
438
|
|
|
439
439
|
**Parameters**
|
|
440
440
|
|
|
441
441
|
| Name | Type | Description |
|
|
442
442
|
|------|------|-------------|
|
|
443
|
-
| `body` | `
|
|
443
|
+
| `body` | `\{ body?: unknown; connectedAccountId?: string; customConnectionData?: \{ authScheme: 'OAUTH2'; toolkitSlug: string; val: \{ access_token: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; authed_user?: \{ access_token?: ...; scope?: ... \}; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; expires_in?: ... \| ... \| ...; extension?: string; form_api_base_url?: string; generic_api_key?: string; id_token?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; refresh_token?: ... \| ...; region?: string; registration_access_token?: string; registration_client_uri?: string; scope?: ... \| ... \| ...; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token_type?: string; version?: string; webhook_signature?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'S2S_OAUTH2'; toolkitSlug: string; val: \{ access_token?: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; expires_in?: ... \| ... \| ...; extension?: string; form_api_base_url?: string; generic_api_key?: string; id_token?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; refresh_token?: ... \| ...; region?: string; registration_access_token?: string; registration_client_uri?: string; scope?: ... \| ... \| ...; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token_type?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'DCR_OAUTH'; toolkitSlug: string; val: \{ access_token: string; account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; client_id: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'API_KEY'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'BASIC_WITH_JWT'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; password: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; username: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'BASIC'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; password: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; username: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'BEARER_TOKEN'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; token: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'OAUTH1'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; callback_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; consumer_key?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; oauth_token: string; oauth_token_secret: string; oauth_verifier?: string; proxy_password?: string; proxy_username?: string; redirectUrl?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'NO_AUTH'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \} \| \{ authScheme: 'SERVICE_ACCOUNT'; toolkitSlug: string; val: \{ account_id?: string; account_url?: string; api_key?: string; api_url?: string; application_id: string; base_url?: string; basic_encoded?: string; bearer_token?: string; borneo_dashboard_url?: string; COMPANYDOMAIN?: string; composio_link_redirect_url?: string; dc?: string; domain?: string; extension?: string; form_api_base_url?: string; generic_api_key?: string; installation_id: string; instanceEndpoint?: string; instanceName?: string; long_redirect_url?: boolean; private_key: string; proxy_password?: string; proxy_username?: string; region?: string; registration_access_token?: string; registration_client_uri?: string; server_location?: string; shop?: string; site_name?: string; state_prefix?: string; subdomain?: string; version?: string; your_server?: string; your-domain?: string \} & object \}; endpoint: string; method: 'GET' \| 'POST' \| 'PUT' \| 'DELETE' \| 'PATCH'; parameters?: \{ in: 'query' \| 'header'; name: string; value: string \| number \}[] \}` | The proxy request |
|
|
444
444
|
| `requestOptions?` | `ComposioRequestOptions` | |
|
|
445
445
|
|
|
446
446
|
**Returns**
|