@composio/client 0.1.0-alpha.35 → 0.1.0-alpha.37
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/CHANGELOG.md +38 -0
- package/client.d.mts +11 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -14
- package/client.d.ts.map +1 -1
- package/client.js +3 -6
- package/client.js.map +1 -1
- package/client.mjs +5 -8
- package/client.mjs.map +1 -1
- package/internal/utils/values.js +3 -3
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +3 -3
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +3 -3
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +3 -3
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/cli.d.mts +1 -76
- package/resources/cli.d.mts.map +1 -1
- package/resources/cli.d.ts +1 -76
- package/resources/cli.d.ts.map +1 -1
- package/resources/cli.js +0 -28
- package/resources/cli.js.map +1 -1
- package/resources/cli.mjs +0 -28
- package/resources/cli.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +476 -12
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +476 -12
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/index.d.mts +5 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -3
- package/resources/index.mjs.map +1 -1
- package/resources/link.d.mts +1 -86
- package/resources/link.d.mts.map +1 -1
- package/resources/link.d.ts +1 -86
- package/resources/link.d.ts.map +1 -1
- package/resources/link.js +0 -13
- package/resources/link.js.map +1 -1
- package/resources/link.mjs +0 -13
- package/resources/link.mjs.map +1 -1
- package/resources/mcp/index.d.mts +1 -1
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +1 -1
- package/resources/mcp/index.d.ts.map +1 -1
- package/resources/mcp/index.js.map +1 -1
- package/resources/mcp/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +1 -95
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +1 -95
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +0 -22
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +0 -22
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/tool-router.d.mts +77 -0
- package/resources/tool-router.d.mts.map +1 -0
- package/resources/tool-router.d.ts +77 -0
- package/resources/tool-router.d.ts.map +1 -0
- package/resources/tool-router.js +32 -0
- package/resources/tool-router.js.map +1 -0
- package/resources/tool-router.mjs +28 -0
- package/resources/tool-router.mjs.map +1 -0
- package/resources/toolkits.d.mts +16 -2
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +16 -2
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +2 -2
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +2 -2
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +80 -4
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +80 -4
- package/resources/tools.d.ts.map +1 -1
- package/resources/trigger-instances/index.d.mts +0 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +0 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js +1 -3
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs +0 -1
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +0 -4
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +0 -4
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +0 -4
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +0 -4
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/src/client.ts +16 -46
- package/src/internal/utils/values.ts +3 -3
- package/src/resources/auth-configs.ts +6 -3
- package/src/resources/cli.ts +0 -89
- package/src/resources/connected-accounts.ts +967 -67
- package/src/resources/index.ts +6 -19
- package/src/resources/link.ts +1 -131
- package/src/resources/mcp/index.ts +0 -2
- package/src/resources/mcp/mcp.ts +0 -123
- package/src/resources/tool-router.ts +96 -0
- package/src/resources/toolkits.ts +24 -2
- package/src/resources/tools.ts +141 -6
- package/src/resources/trigger-instances/index.ts +0 -7
- package/src/resources/trigger-instances/trigger-instances.ts +0 -18
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/org/api-key.d.mts +0 -44
- package/resources/org/api-key.d.mts.map +0 -1
- package/resources/org/api-key.d.ts +0 -44
- package/resources/org/api-key.d.ts.map +0 -1
- package/resources/org/api-key.js +0 -34
- package/resources/org/api-key.js.map +0 -1
- package/resources/org/api-key.mjs +0 -30
- package/resources/org/api-key.mjs.map +0 -1
- package/resources/org/index.d.mts +0 -4
- package/resources/org/index.d.mts.map +0 -1
- package/resources/org/index.d.ts +0 -4
- package/resources/org/index.d.ts.map +0 -1
- package/resources/org/index.js +0 -11
- package/resources/org/index.js.map +0 -1
- package/resources/org/index.mjs +0 -5
- package/resources/org/index.mjs.map +0 -1
- package/resources/org/org.d.mts +0 -14
- package/resources/org/org.d.mts.map +0 -1
- package/resources/org/org.d.ts +0 -14
- package/resources/org/org.d.ts.map +0 -1
- package/resources/org/org.js +0 -21
- package/resources/org/org.js.map +0 -1
- package/resources/org/org.mjs +0 -16
- package/resources/org/org.mjs.map +0 -1
- package/resources/org/project/api-keys.d.mts +0 -142
- package/resources/org/project/api-keys.d.mts.map +0 -1
- package/resources/org/project/api-keys.d.ts +0 -142
- package/resources/org/project/api-keys.d.ts.map +0 -1
- package/resources/org/project/api-keys.js +0 -62
- package/resources/org/project/api-keys.js.map +0 -1
- package/resources/org/project/api-keys.mjs +0 -58
- package/resources/org/project/api-keys.mjs.map +0 -1
- package/resources/org/project/index.d.mts +0 -5
- package/resources/org/project/index.d.mts.map +0 -1
- package/resources/org/project/index.d.ts +0 -5
- package/resources/org/project/index.d.ts.map +0 -1
- package/resources/org/project/index.js +0 -13
- package/resources/org/project/index.js.map +0 -1
- package/resources/org/project/index.mjs +0 -6
- package/resources/org/project/index.mjs.map +0 -1
- package/resources/org/project/project.d.mts +0 -268
- package/resources/org/project/project.d.mts.map +0 -1
- package/resources/org/project/project.d.ts +0 -268
- package/resources/org/project/project.d.ts.map +0 -1
- package/resources/org/project/project.js +0 -90
- package/resources/org/project/project.js.map +0 -1
- package/resources/org/project/project.mjs +0 -85
- package/resources/org/project/project.mjs.map +0 -1
- package/resources/org/project/trigger.d.mts +0 -145
- package/resources/org/project/trigger.d.mts.map +0 -1
- package/resources/org/project/trigger.d.ts +0 -145
- package/resources/org/project/trigger.d.ts.map +0 -1
- package/resources/org/project/trigger.js +0 -35
- package/resources/org/project/trigger.js.map +0 -1
- package/resources/org/project/trigger.mjs +0 -31
- package/resources/org/project/trigger.mjs.map +0 -1
- package/resources/org/project/webhook.d.mts +0 -166
- package/resources/org/project/webhook.d.mts.map +0 -1
- package/resources/org/project/webhook.d.ts +0 -166
- package/resources/org/project/webhook.d.ts.map +0 -1
- package/resources/org/project/webhook.js +0 -74
- package/resources/org/project/webhook.js.map +0 -1
- package/resources/org/project/webhook.mjs +0 -70
- package/resources/org/project/webhook.mjs.map +0 -1
- package/resources/org/project.d.mts +0 -2
- package/resources/org/project.d.mts.map +0 -1
- package/resources/org/project.d.ts +0 -2
- package/resources/org/project.d.ts.map +0 -1
- package/resources/org/project.js +0 -6
- package/resources/org/project.js.map +0 -1
- package/resources/org/project.mjs +0 -3
- package/resources/org/project.mjs.map +0 -1
- package/resources/org.d.mts +0 -2
- package/resources/org.d.mts.map +0 -1
- package/resources/org.d.ts +0 -2
- package/resources/org.d.ts.map +0 -1
- package/resources/org.js +0 -6
- package/resources/org.js.map +0 -1
- package/resources/org.mjs +0 -3
- package/resources/org.mjs.map +0 -1
- package/resources/team-members.d.mts +0 -55
- package/resources/team-members.d.mts.map +0 -1
- package/resources/team-members.d.ts +0 -55
- package/resources/team-members.d.ts.map +0 -1
- package/resources/team-members.js +0 -38
- package/resources/team-members.js.map +0 -1
- package/resources/team-members.mjs +0 -34
- package/resources/team-members.mjs.map +0 -1
- package/resources/trigger-instances/handle.d.mts +0 -25
- package/resources/trigger-instances/handle.d.mts.map +0 -1
- package/resources/trigger-instances/handle.d.ts +0 -25
- package/resources/trigger-instances/handle.d.ts.map +0 -1
- package/resources/trigger-instances/handle.js +0 -18
- package/resources/trigger-instances/handle.js.map +0 -1
- package/resources/trigger-instances/handle.mjs +0 -14
- package/resources/trigger-instances/handle.mjs.map +0 -1
- package/src/resources/org/api-key.ts +0 -57
- package/src/resources/org/index.ts +0 -13
- package/src/resources/org/org.ts +0 -41
- package/src/resources/org/project/api-keys.ts +0 -180
- package/src/resources/org/project/index.ts +0 -35
- package/src/resources/org/project/project.ts +0 -381
- package/src/resources/org/project/trigger.ts +0 -188
- package/src/resources/org/project/webhook.ts +0 -205
- package/src/resources/org/project.ts +0 -3
- package/src/resources/org.ts +0 -3
- package/src/resources/team-members.ts +0 -101
- package/src/resources/trigger-instances/handle.ts +0 -53
package/src/resources/index.ts
CHANGED
|
@@ -17,9 +17,7 @@ export {
|
|
|
17
17
|
Cli,
|
|
18
18
|
type CliCreateSessionResponse,
|
|
19
19
|
type CliGetSessionResponse,
|
|
20
|
-
type CliLinkSessionResponse,
|
|
21
20
|
type CliGetSessionParams,
|
|
22
|
-
type CliLinkSessionParams,
|
|
23
21
|
} from './cli';
|
|
24
22
|
export {
|
|
25
23
|
ConnectedAccounts,
|
|
@@ -41,14 +39,7 @@ export {
|
|
|
41
39
|
type FileListParams,
|
|
42
40
|
type FileCreatePresignedURLParams,
|
|
43
41
|
} from './files';
|
|
44
|
-
export {
|
|
45
|
-
Link,
|
|
46
|
-
type LinkCreateResponse,
|
|
47
|
-
type LinkRetrieveResponse,
|
|
48
|
-
type LinkSubmitResponse,
|
|
49
|
-
type LinkCreateParams,
|
|
50
|
-
type LinkSubmitParams,
|
|
51
|
-
} from './link';
|
|
42
|
+
export { Link, type LinkCreateResponse, type LinkCreateParams } from './link';
|
|
52
43
|
export {
|
|
53
44
|
Mcp,
|
|
54
45
|
type McpCreateResponse,
|
|
@@ -57,31 +48,27 @@ export {
|
|
|
57
48
|
type McpListResponse,
|
|
58
49
|
type McpDeleteResponse,
|
|
59
50
|
type McpRetrieveAppResponse,
|
|
60
|
-
type McpValidateResponse,
|
|
61
51
|
type McpCreateParams,
|
|
62
52
|
type McpUpdateParams,
|
|
63
53
|
type McpListParams,
|
|
64
54
|
type McpRetrieveAppParams,
|
|
65
|
-
type McpValidateParams,
|
|
66
55
|
} from './mcp/mcp';
|
|
67
56
|
export {
|
|
68
57
|
Migration,
|
|
69
58
|
type MigrationRetrieveNanoidResponse,
|
|
70
59
|
type MigrationRetrieveNanoidParams,
|
|
71
60
|
} from './migration';
|
|
72
|
-
export { Org } from './org/org';
|
|
73
61
|
export {
|
|
74
|
-
|
|
75
|
-
type
|
|
76
|
-
type
|
|
77
|
-
|
|
78
|
-
type TeamMemberUpdateParams,
|
|
79
|
-
} from './team-members';
|
|
62
|
+
ToolRouter,
|
|
63
|
+
type ToolRouterCreateSessionResponse,
|
|
64
|
+
type ToolRouterCreateSessionParams,
|
|
65
|
+
} from './tool-router';
|
|
80
66
|
export {
|
|
81
67
|
Toolkits,
|
|
82
68
|
type ToolkitRetrieveResponse,
|
|
83
69
|
type ToolkitListResponse,
|
|
84
70
|
type ToolkitRetrieveCategoriesResponse,
|
|
71
|
+
type ToolkitRetrieveParams,
|
|
85
72
|
type ToolkitListParams,
|
|
86
73
|
type ToolkitRetrieveCategoriesParams,
|
|
87
74
|
} from './toolkits';
|
package/src/resources/link.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
|
-
import { path } from '../internal/utils/path';
|
|
7
6
|
|
|
8
7
|
export class Link extends APIResource {
|
|
9
8
|
/**
|
|
@@ -13,20 +12,6 @@ export class Link extends APIResource {
|
|
|
13
12
|
create(body: LinkCreateParams, options?: RequestOptions): APIPromise<LinkCreateResponse> {
|
|
14
13
|
return this._client.post('/api/v3/connected_accounts/link', { body, ...options });
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves information about an authentication session using the link token
|
|
19
|
-
*/
|
|
20
|
-
retrieve(token: string, options?: RequestOptions): APIPromise<LinkRetrieveResponse> {
|
|
21
|
-
return this._client.get(path`/api/v3/internal/connected_accounts/link/${token}`, options);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Submits authentication input for a link session
|
|
26
|
-
*/
|
|
27
|
-
submit(token: string, body: LinkSubmitParams, options?: RequestOptions): APIPromise<LinkSubmitResponse> {
|
|
28
|
-
return this._client.post(path`/api/v3/internal/connected_accounts/link/${token}`, { body, ...options });
|
|
29
|
-
}
|
|
30
15
|
}
|
|
31
16
|
|
|
32
17
|
export interface LinkCreateResponse {
|
|
@@ -51,108 +36,6 @@ export interface LinkCreateResponse {
|
|
|
51
36
|
redirect_url: string;
|
|
52
37
|
}
|
|
53
38
|
|
|
54
|
-
export interface LinkRetrieveResponse {
|
|
55
|
-
connected_account: LinkRetrieveResponse.ConnectedAccount;
|
|
56
|
-
|
|
57
|
-
project: LinkRetrieveResponse.Project;
|
|
58
|
-
|
|
59
|
-
toolkit: LinkRetrieveResponse.Toolkit;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export namespace LinkRetrieveResponse {
|
|
63
|
-
export interface ConnectedAccount {
|
|
64
|
-
/**
|
|
65
|
-
* The connected account ID
|
|
66
|
-
*/
|
|
67
|
-
id: string;
|
|
68
|
-
|
|
69
|
-
mode:
|
|
70
|
-
| 'OAUTH2'
|
|
71
|
-
| 'OAUTH1'
|
|
72
|
-
| 'API_KEY'
|
|
73
|
-
| 'BASIC'
|
|
74
|
-
| 'BILLCOM_AUTH'
|
|
75
|
-
| 'BEARER_TOKEN'
|
|
76
|
-
| 'GOOGLE_SERVICE_ACCOUNT'
|
|
77
|
-
| 'NO_AUTH'
|
|
78
|
-
| 'BASIC_WITH_JWT'
|
|
79
|
-
| 'CALCOM_AUTH';
|
|
80
|
-
|
|
81
|
-
status: 'INITIATED' | 'ACTIVE' | 'FAILED';
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* The user callback URL if applicable. If active, redirect to this URL
|
|
85
|
-
*/
|
|
86
|
-
callback_url?: string;
|
|
87
|
-
|
|
88
|
-
expected_input_fields?: Array<ConnectedAccount.ExpectedInputField>;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* The OAuth provider redirect URL if applicable. If active, redirect to this URL
|
|
92
|
-
*/
|
|
93
|
-
redirect_url?: string;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export namespace ConnectedAccount {
|
|
97
|
-
export interface ExpectedInputField {
|
|
98
|
-
displayName: string;
|
|
99
|
-
|
|
100
|
-
name: string;
|
|
101
|
-
|
|
102
|
-
required: boolean;
|
|
103
|
-
|
|
104
|
-
type: string;
|
|
105
|
-
|
|
106
|
-
default?: string | null;
|
|
107
|
-
|
|
108
|
-
description?: string;
|
|
109
|
-
|
|
110
|
-
legacy_template_name?: string;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface Project {
|
|
115
|
-
/**
|
|
116
|
-
* The project logo URL
|
|
117
|
-
*/
|
|
118
|
-
logo?: string;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* The project name
|
|
122
|
-
*/
|
|
123
|
-
name?: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface Toolkit {
|
|
127
|
-
/**
|
|
128
|
-
* The toolkit logo
|
|
129
|
-
*/
|
|
130
|
-
logo: string;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The toolkit display name
|
|
134
|
-
*/
|
|
135
|
-
name: string;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* The toolkit slug
|
|
139
|
-
*/
|
|
140
|
-
slug: string;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface LinkSubmitResponse {
|
|
145
|
-
/**
|
|
146
|
-
* The status of the connection attempt
|
|
147
|
-
*/
|
|
148
|
-
status: 'ACTIVE' | 'FAILED';
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* The user callback URL if applicable
|
|
152
|
-
*/
|
|
153
|
-
user_callback_url?: string;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
39
|
export interface LinkCreateParams {
|
|
157
40
|
/**
|
|
158
41
|
* The auth config id to create a link for
|
|
@@ -170,19 +53,6 @@ export interface LinkCreateParams {
|
|
|
170
53
|
callback_url?: string;
|
|
171
54
|
}
|
|
172
55
|
|
|
173
|
-
export interface LinkSubmitParams {
|
|
174
|
-
/**
|
|
175
|
-
* The input fields for authentication
|
|
176
|
-
*/
|
|
177
|
-
input: { [key: string]: unknown };
|
|
178
|
-
}
|
|
179
|
-
|
|
180
56
|
export declare namespace Link {
|
|
181
|
-
export {
|
|
182
|
-
type LinkCreateResponse as LinkCreateResponse,
|
|
183
|
-
type LinkRetrieveResponse as LinkRetrieveResponse,
|
|
184
|
-
type LinkSubmitResponse as LinkSubmitResponse,
|
|
185
|
-
type LinkCreateParams as LinkCreateParams,
|
|
186
|
-
type LinkSubmitParams as LinkSubmitParams,
|
|
187
|
-
};
|
|
57
|
+
export { type LinkCreateResponse as LinkCreateResponse, type LinkCreateParams as LinkCreateParams };
|
|
188
58
|
}
|
|
@@ -10,10 +10,8 @@ export {
|
|
|
10
10
|
type McpListResponse,
|
|
11
11
|
type McpDeleteResponse,
|
|
12
12
|
type McpRetrieveAppResponse,
|
|
13
|
-
type McpValidateResponse,
|
|
14
13
|
type McpCreateParams,
|
|
15
14
|
type McpUpdateParams,
|
|
16
15
|
type McpListParams,
|
|
17
16
|
type McpRetrieveAppParams,
|
|
18
|
-
type McpValidateParams,
|
|
19
17
|
} from './mcp';
|
package/src/resources/mcp/mcp.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { Custom, CustomCreateParams, CustomCreateResponse } from './custom';
|
|
|
6
6
|
import * as GenerateAPI from './generate';
|
|
7
7
|
import { Generate, GenerateURLParams, GenerateURLResponse } from './generate';
|
|
8
8
|
import { APIPromise } from '../../core/api-promise';
|
|
9
|
-
import { buildHeaders } from '../../internal/headers';
|
|
10
9
|
import { RequestOptions } from '../../internal/request-options';
|
|
11
10
|
import { path } from '../../internal/utils/path';
|
|
12
11
|
|
|
@@ -121,32 +120,6 @@ export class Mcp extends APIResource {
|
|
|
121
120
|
): APIPromise<McpRetrieveAppResponse> {
|
|
122
121
|
return this._client.get(path`/api/v3/mcp/app/${appKey}`, { query, ...options });
|
|
123
122
|
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Admin-only endpoint that validates a Model Control Protocol (MCP) server and
|
|
127
|
-
* retrieves its complete configuration details, including authentication
|
|
128
|
-
* information. This endpoint is typically used by the MCP service itself to
|
|
129
|
-
* authenticate and authorize connection requests from clients.
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```ts
|
|
133
|
-
* const response = await client.mcp.validate(
|
|
134
|
-
* '550e8400-e29b-41d4-a716-446655440000',
|
|
135
|
-
* { 'x-composio-admin-token': 'admin_tk_12345abcdef' },
|
|
136
|
-
* );
|
|
137
|
-
* ```
|
|
138
|
-
*/
|
|
139
|
-
validate(
|
|
140
|
-
uuid: string,
|
|
141
|
-
params: McpValidateParams,
|
|
142
|
-
options?: RequestOptions,
|
|
143
|
-
): APIPromise<McpValidateResponse> {
|
|
144
|
-
const { 'x-composio-admin-token': xComposioAdminToken } = params;
|
|
145
|
-
return this._client.get(path`/api/v3/mcp/validate/${uuid}`, {
|
|
146
|
-
...options,
|
|
147
|
-
headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
123
|
}
|
|
151
124
|
|
|
152
125
|
/**
|
|
@@ -663,93 +636,6 @@ export namespace McpRetrieveAppResponse {
|
|
|
663
636
|
}
|
|
664
637
|
}
|
|
665
638
|
|
|
666
|
-
/**
|
|
667
|
-
* Complete validation and connection details for an MCP server
|
|
668
|
-
*/
|
|
669
|
-
export interface McpValidateResponse {
|
|
670
|
-
/**
|
|
671
|
-
* Unique identifier of the validated MCP server
|
|
672
|
-
*/
|
|
673
|
-
id: string;
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* Client information for the MCP server
|
|
677
|
-
*/
|
|
678
|
-
client: McpValidateResponse.Client;
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* Human-readable name of the MCP server
|
|
682
|
-
*/
|
|
683
|
-
name: string;
|
|
684
|
-
|
|
685
|
-
/**
|
|
686
|
-
* URL endpoint for connecting to this MCP server
|
|
687
|
-
*/
|
|
688
|
-
url: string;
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* User authentication data for the MCP server
|
|
692
|
-
*/
|
|
693
|
-
userData: McpValidateResponse.UserData;
|
|
694
|
-
|
|
695
|
-
/**
|
|
696
|
-
* List of action identifiers enabled for this server
|
|
697
|
-
*/
|
|
698
|
-
allowed_tools?: Array<string> | null;
|
|
699
|
-
|
|
700
|
-
/**
|
|
701
|
-
* Flag indicating if this server uses custom authentication headers
|
|
702
|
-
*/
|
|
703
|
-
customAuthHeaders?: boolean;
|
|
704
|
-
|
|
705
|
-
/**
|
|
706
|
-
* Flag indicating if this server is managed by Composio and not by the user
|
|
707
|
-
*/
|
|
708
|
-
managed_auth_via_composio?: boolean;
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* List of application identifiers this server is configured for
|
|
712
|
-
*/
|
|
713
|
-
toolkits?: Array<string>;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
export namespace McpValidateResponse {
|
|
717
|
-
/**
|
|
718
|
-
* Client information for the MCP server
|
|
719
|
-
*/
|
|
720
|
-
export interface Client {
|
|
721
|
-
/**
|
|
722
|
-
* Project identifier that owns this MCP server
|
|
723
|
-
*/
|
|
724
|
-
id: string;
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Organization identifier that owns the project
|
|
728
|
-
*/
|
|
729
|
-
orgId: string;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* User authentication data for the MCP server
|
|
734
|
-
*/
|
|
735
|
-
export interface UserData {
|
|
736
|
-
/**
|
|
737
|
-
* User identifier for API access
|
|
738
|
-
*/
|
|
739
|
-
id: string;
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
* API key for authenticating requests to the Composio API
|
|
743
|
-
*/
|
|
744
|
-
apiKey: string;
|
|
745
|
-
|
|
746
|
-
/**
|
|
747
|
-
* Email address associated with the API key user
|
|
748
|
-
*/
|
|
749
|
-
email: string;
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
|
|
753
639
|
export interface McpCreateParams {
|
|
754
640
|
/**
|
|
755
641
|
* ID references to existing authentication configurations
|
|
@@ -883,13 +769,6 @@ export interface McpRetrieveAppParams {
|
|
|
883
769
|
toolkits?: string;
|
|
884
770
|
}
|
|
885
771
|
|
|
886
|
-
export interface McpValidateParams {
|
|
887
|
-
/**
|
|
888
|
-
* Administrative access token required for validating MCP servers
|
|
889
|
-
*/
|
|
890
|
-
'x-composio-admin-token': string;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
772
|
Mcp.Custom = Custom;
|
|
894
773
|
Mcp.Generate = Generate;
|
|
895
774
|
|
|
@@ -901,12 +780,10 @@ export declare namespace Mcp {
|
|
|
901
780
|
type McpListResponse as McpListResponse,
|
|
902
781
|
type McpDeleteResponse as McpDeleteResponse,
|
|
903
782
|
type McpRetrieveAppResponse as McpRetrieveAppResponse,
|
|
904
|
-
type McpValidateResponse as McpValidateResponse,
|
|
905
783
|
type McpCreateParams as McpCreateParams,
|
|
906
784
|
type McpUpdateParams as McpUpdateParams,
|
|
907
785
|
type McpListParams as McpListParams,
|
|
908
786
|
type McpRetrieveAppParams as McpRetrieveAppParams,
|
|
909
|
-
type McpValidateParams as McpValidateParams,
|
|
910
787
|
};
|
|
911
788
|
|
|
912
789
|
export {
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class ToolRouter extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new session for the tool router lab feature. This endpoint initializes
|
|
10
|
+
* a new session with specified toolkits and their authentication configurations.
|
|
11
|
+
* The session provides an isolated environment for testing and managing tool
|
|
12
|
+
* routing logic with scoped MCP server access.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response = await client.toolRouter.createSession({
|
|
17
|
+
* user_id: 'user_123456789',
|
|
18
|
+
* config: {
|
|
19
|
+
* toolkits: [
|
|
20
|
+
* { toolkit: 'gmail', auth_config: 'auth_config_123' },
|
|
21
|
+
* { toolkit: 'slack', auth_config: 'auth_config_456' },
|
|
22
|
+
* { toolkit: 'github' },
|
|
23
|
+
* ],
|
|
24
|
+
* },
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
createSession(
|
|
29
|
+
body: ToolRouterCreateSessionParams,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<ToolRouterCreateSessionResponse> {
|
|
32
|
+
return this._client.post('/api/v3/labs/tool_router/session', { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ToolRouterCreateSessionResponse {
|
|
37
|
+
/**
|
|
38
|
+
* MCP server endpoint URL for this specific session
|
|
39
|
+
*/
|
|
40
|
+
chat_session_mcp_url: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Generated session identifier
|
|
44
|
+
*/
|
|
45
|
+
session_id: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ToolRouterCreateSessionParams {
|
|
49
|
+
/**
|
|
50
|
+
* Unique user identifier for the session owner
|
|
51
|
+
*/
|
|
52
|
+
user_id: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Session configuration including enabled toolkits and their auth configs
|
|
56
|
+
*/
|
|
57
|
+
config?: ToolRouterCreateSessionParams.Config;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export namespace ToolRouterCreateSessionParams {
|
|
61
|
+
/**
|
|
62
|
+
* Session configuration including enabled toolkits and their auth configs
|
|
63
|
+
*/
|
|
64
|
+
export interface Config {
|
|
65
|
+
/**
|
|
66
|
+
* Whether to manually manage connections
|
|
67
|
+
*/
|
|
68
|
+
manually_manage_connections?: boolean | null;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Array of toolkit configurations with optional auth configs
|
|
72
|
+
*/
|
|
73
|
+
toolkits?: Array<Config.Toolkit>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export namespace Config {
|
|
77
|
+
export interface Toolkit {
|
|
78
|
+
/**
|
|
79
|
+
* Toolkit identifier (e.g., gmail, slack, github)
|
|
80
|
+
*/
|
|
81
|
+
toolkit: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Specific auth configuration ID for this toolkit
|
|
85
|
+
*/
|
|
86
|
+
auth_config?: string;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare namespace ToolRouter {
|
|
92
|
+
export {
|
|
93
|
+
type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse,
|
|
94
|
+
type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -11,8 +11,12 @@ export class Toolkits extends APIResource {
|
|
|
11
11
|
* slug identifier. This endpoint provides detailed metadata, authentication
|
|
12
12
|
* configuration options, and feature counts for the requested toolkit.
|
|
13
13
|
*/
|
|
14
|
-
retrieve(
|
|
15
|
-
|
|
14
|
+
retrieve(
|
|
15
|
+
slug: string,
|
|
16
|
+
query: ToolkitRetrieveParams | null | undefined = {},
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): APIPromise<ToolkitRetrieveResponse> {
|
|
19
|
+
return this._client.get(path`/api/v3/toolkits/${slug}`, { query, ...options });
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
/**
|
|
@@ -147,6 +151,11 @@ export namespace ToolkitRetrieveResponse {
|
|
|
147
151
|
*/
|
|
148
152
|
updated_at: string;
|
|
149
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Version of the toolkit
|
|
156
|
+
*/
|
|
157
|
+
version: string;
|
|
158
|
+
|
|
150
159
|
/**
|
|
151
160
|
* Link to the toolkit's main application or service website
|
|
152
161
|
*/
|
|
@@ -416,6 +425,11 @@ export namespace ToolkitListResponse {
|
|
|
416
425
|
*/
|
|
417
426
|
updated_at: string;
|
|
418
427
|
|
|
428
|
+
/**
|
|
429
|
+
* Version of the toolkit
|
|
430
|
+
*/
|
|
431
|
+
version: string;
|
|
432
|
+
|
|
419
433
|
/**
|
|
420
434
|
* Link to the toolkit's main application or service website
|
|
421
435
|
*/
|
|
@@ -467,6 +481,13 @@ export namespace ToolkitRetrieveCategoriesResponse {
|
|
|
467
481
|
}
|
|
468
482
|
}
|
|
469
483
|
|
|
484
|
+
export interface ToolkitRetrieveParams {
|
|
485
|
+
/**
|
|
486
|
+
* Version of the toolkit
|
|
487
|
+
*/
|
|
488
|
+
version?: string;
|
|
489
|
+
}
|
|
490
|
+
|
|
470
491
|
export interface ToolkitListParams {
|
|
471
492
|
/**
|
|
472
493
|
* Filter toolkits by category
|
|
@@ -514,6 +535,7 @@ export declare namespace Toolkits {
|
|
|
514
535
|
type ToolkitRetrieveResponse as ToolkitRetrieveResponse,
|
|
515
536
|
type ToolkitListResponse as ToolkitListResponse,
|
|
516
537
|
type ToolkitRetrieveCategoriesResponse as ToolkitRetrieveCategoriesResponse,
|
|
538
|
+
type ToolkitRetrieveParams as ToolkitRetrieveParams,
|
|
517
539
|
type ToolkitListParams as ToolkitListParams,
|
|
518
540
|
type ToolkitRetrieveCategoriesParams as ToolkitRetrieveCategoriesParams,
|
|
519
541
|
};
|