@composio/client 0.1.0-alpha.39 → 0.1.0-alpha.41
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 +21 -0
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +41 -3
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +41 -3
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/connected-accounts.d.mts +2656 -964
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +2656 -964
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/files.d.mts +30 -0
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +30 -0
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/link.d.mts +410 -1
- package/resources/link.d.mts.map +1 -1
- package/resources/link.d.ts +410 -1
- package/resources/link.d.ts.map +1 -1
- package/resources/mcp/custom.d.mts +9 -6
- package/resources/mcp/custom.d.mts.map +1 -1
- package/resources/mcp/custom.d.ts +9 -6
- package/resources/mcp/custom.d.ts.map +1 -1
- package/resources/mcp/mcp.d.mts +2 -4
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +2 -4
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/tool-router/index.d.mts +3 -0
- package/resources/tool-router/index.d.mts.map +1 -0
- package/resources/tool-router/index.d.ts +3 -0
- package/resources/tool-router/index.d.ts.map +1 -0
- package/resources/tool-router/index.js +9 -0
- package/resources/tool-router/index.js.map +1 -0
- package/resources/tool-router/index.mjs +4 -0
- package/resources/tool-router/index.mjs.map +1 -0
- package/resources/tool-router/session.d.mts +708 -0
- package/resources/tool-router/session.d.mts.map +1 -0
- package/resources/tool-router/session.d.ts +708 -0
- package/resources/tool-router/session.d.ts.map +1 -0
- package/resources/tool-router/session.js +98 -0
- package/resources/tool-router/session.js.map +1 -0
- package/resources/tool-router/session.mjs +94 -0
- package/resources/tool-router/session.mjs.map +1 -0
- package/resources/tool-router/tool-router.d.mts +91 -0
- package/resources/tool-router/tool-router.d.mts.map +1 -0
- package/resources/tool-router/tool-router.d.ts +91 -0
- package/resources/tool-router/tool-router.d.ts.map +1 -0
- package/resources/tool-router/tool-router.js +46 -0
- package/resources/tool-router/tool-router.js.map +1 -0
- package/resources/tool-router/tool-router.mjs +41 -0
- package/resources/tool-router/tool-router.mjs.map +1 -0
- package/resources/tool-router.d.mts +1 -86
- package/resources/tool-router.d.mts.map +1 -1
- package/resources/tool-router.d.ts +1 -86
- package/resources/tool-router.d.ts.map +1 -1
- package/resources/tool-router.js +2 -34
- package/resources/tool-router.js.map +1 -1
- package/resources/tool-router.mjs +1 -32
- package/resources/tool-router.mjs.map +1 -1
- package/resources/toolkits.d.mts +9 -9
- package/resources/toolkits.d.ts +9 -9
- package/resources/toolkits.js +9 -9
- package/resources/toolkits.mjs +9 -9
- package/resources/tools.d.mts +161 -45
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +161 -45
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +3 -3
- package/resources/tools.mjs +3 -3
- package/resources/trigger-instances/manage.d.mts +17 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -1
- package/resources/trigger-instances/manage.d.ts +17 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -1
- package/resources/trigger-instances/manage.js +17 -0
- package/resources/trigger-instances/manage.js.map +1 -1
- package/resources/trigger-instances/manage.mjs +17 -0
- package/resources/trigger-instances/manage.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +25 -0
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +25 -0
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +14 -0
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +14 -0
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/triggers-types.d.mts +1 -5
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +1 -5
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +1 -1
- package/resources/triggers-types.mjs +1 -1
- package/src/client.ts +5 -5
- package/src/resources/auth-configs.ts +43 -3
- package/src/resources/connected-accounts.ts +4657 -1579
- package/src/resources/files.ts +36 -0
- package/src/resources/index.ts +1 -1
- package/src/resources/link.ts +741 -1
- package/src/resources/mcp/custom.ts +10 -6
- package/src/resources/mcp/mcp.ts +2 -4
- package/src/resources/tool-router/index.ts +19 -0
- package/src/resources/tool-router/session.ts +858 -0
- package/src/resources/tool-router/tool-router.ts +137 -0
- package/src/resources/tool-router.ts +1 -105
- package/src/resources/toolkits.ts +9 -9
- package/src/resources/tools.ts +237 -45
- package/src/resources/trigger-instances/manage.ts +17 -0
- package/src/resources/trigger-instances/trigger-instances.ts +25 -0
- package/src/resources/triggers-types.ts +1 -6
- 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
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as SessionAPI from './session';
|
|
5
|
+
import {
|
|
6
|
+
Session,
|
|
7
|
+
SessionCreateParams,
|
|
8
|
+
SessionCreateResponse,
|
|
9
|
+
SessionExecuteParams,
|
|
10
|
+
SessionExecuteResponse,
|
|
11
|
+
SessionLinkParams,
|
|
12
|
+
SessionLinkResponse,
|
|
13
|
+
SessionRetrieveResponse,
|
|
14
|
+
SessionToolkitsParams,
|
|
15
|
+
SessionToolkitsResponse,
|
|
16
|
+
} from './session';
|
|
17
|
+
import { APIPromise } from '../../core/api-promise';
|
|
18
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
19
|
+
|
|
20
|
+
export class ToolRouter extends APIResource {
|
|
21
|
+
session: SessionAPI.Session = new SessionAPI.Session(this._client);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Creates a new session for the tool router lab feature. This endpoint initializes
|
|
25
|
+
* a new session with specified toolkits and their authentication configurations.
|
|
26
|
+
* The session provides an isolated environment for testing and managing tool
|
|
27
|
+
* routing logic with scoped MCP server access.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.toolRouter.createSession({
|
|
32
|
+
* user_id: 'user_123456789',
|
|
33
|
+
* config: {
|
|
34
|
+
* toolkits: [
|
|
35
|
+
* {
|
|
36
|
+
* toolkit: 'gmail',
|
|
37
|
+
* auth_config_id: 'auth_config_123',
|
|
38
|
+
* },
|
|
39
|
+
* {
|
|
40
|
+
* toolkit: 'slack',
|
|
41
|
+
* auth_config_id: 'auth_config_456',
|
|
42
|
+
* },
|
|
43
|
+
* { toolkit: 'github' },
|
|
44
|
+
* ],
|
|
45
|
+
* },
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
createSession(
|
|
50
|
+
body: ToolRouterCreateSessionParams,
|
|
51
|
+
options?: RequestOptions,
|
|
52
|
+
): APIPromise<ToolRouterCreateSessionResponse> {
|
|
53
|
+
return this._client.post('/api/v3/labs/tool_router/session', { body, ...options });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ToolRouterCreateSessionResponse {
|
|
58
|
+
/**
|
|
59
|
+
* MCP server endpoint URL for this specific chat session
|
|
60
|
+
*/
|
|
61
|
+
chat_session_mcp_url: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Generated session identifier
|
|
65
|
+
*/
|
|
66
|
+
session_id: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* MCP server endpoint URL for this specific tool router instance
|
|
70
|
+
*/
|
|
71
|
+
tool_router_instance_mcp_url: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface ToolRouterCreateSessionParams {
|
|
75
|
+
/**
|
|
76
|
+
* Unique user identifier for the session owner
|
|
77
|
+
*/
|
|
78
|
+
user_id: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Session configuration including enabled toolkits and their auth configs
|
|
82
|
+
*/
|
|
83
|
+
config?: ToolRouterCreateSessionParams.Config;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export namespace ToolRouterCreateSessionParams {
|
|
87
|
+
/**
|
|
88
|
+
* Session configuration including enabled toolkits and their auth configs
|
|
89
|
+
*/
|
|
90
|
+
export interface Config {
|
|
91
|
+
/**
|
|
92
|
+
* Whether to manually manage connections
|
|
93
|
+
*/
|
|
94
|
+
manually_manage_connections?: boolean | null;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Array of toolkit configurations with optional auth configs
|
|
98
|
+
*/
|
|
99
|
+
toolkits?: Array<Config.Toolkit>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export namespace Config {
|
|
103
|
+
export interface Toolkit {
|
|
104
|
+
/**
|
|
105
|
+
* Toolkit identifier (e.g., gmail, slack, github)
|
|
106
|
+
*/
|
|
107
|
+
toolkit: string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Specific auth configuration ID for this toolkit
|
|
111
|
+
*/
|
|
112
|
+
auth_config_id?: string;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
ToolRouter.Session = Session;
|
|
118
|
+
|
|
119
|
+
export declare namespace ToolRouter {
|
|
120
|
+
export {
|
|
121
|
+
type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse,
|
|
122
|
+
type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams,
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export {
|
|
126
|
+
Session as Session,
|
|
127
|
+
type SessionCreateResponse as SessionCreateResponse,
|
|
128
|
+
type SessionRetrieveResponse as SessionRetrieveResponse,
|
|
129
|
+
type SessionExecuteResponse as SessionExecuteResponse,
|
|
130
|
+
type SessionLinkResponse as SessionLinkResponse,
|
|
131
|
+
type SessionToolkitsResponse as SessionToolkitsResponse,
|
|
132
|
+
type SessionCreateParams as SessionCreateParams,
|
|
133
|
+
type SessionExecuteParams as SessionExecuteParams,
|
|
134
|
+
type SessionLinkParams as SessionLinkParams,
|
|
135
|
+
type SessionToolkitsParams as SessionToolkitsParams,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
@@ -1,107 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
* {
|
|
21
|
-
* toolkit: 'gmail',
|
|
22
|
-
* auth_config_id: 'auth_config_123',
|
|
23
|
-
* },
|
|
24
|
-
* {
|
|
25
|
-
* toolkit: 'slack',
|
|
26
|
-
* auth_config_id: 'auth_config_456',
|
|
27
|
-
* },
|
|
28
|
-
* { toolkit: 'github' },
|
|
29
|
-
* ],
|
|
30
|
-
* },
|
|
31
|
-
* });
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
createSession(
|
|
35
|
-
body: ToolRouterCreateSessionParams,
|
|
36
|
-
options?: RequestOptions,
|
|
37
|
-
): APIPromise<ToolRouterCreateSessionResponse> {
|
|
38
|
-
return this._client.post('/api/v3/labs/tool_router/session', { body, ...options });
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface ToolRouterCreateSessionResponse {
|
|
43
|
-
/**
|
|
44
|
-
* MCP server endpoint URL for this specific chat session
|
|
45
|
-
*/
|
|
46
|
-
chat_session_mcp_url: string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Generated session identifier
|
|
50
|
-
*/
|
|
51
|
-
session_id: string;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* MCP server endpoint URL for this specific tool router instance
|
|
55
|
-
*/
|
|
56
|
-
tool_router_instance_mcp_url: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface ToolRouterCreateSessionParams {
|
|
60
|
-
/**
|
|
61
|
-
* Unique user identifier for the session owner
|
|
62
|
-
*/
|
|
63
|
-
user_id: string;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Session configuration including enabled toolkits and their auth configs
|
|
67
|
-
*/
|
|
68
|
-
config?: ToolRouterCreateSessionParams.Config;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export namespace ToolRouterCreateSessionParams {
|
|
72
|
-
/**
|
|
73
|
-
* Session configuration including enabled toolkits and their auth configs
|
|
74
|
-
*/
|
|
75
|
-
export interface Config {
|
|
76
|
-
/**
|
|
77
|
-
* Whether to manually manage connections
|
|
78
|
-
*/
|
|
79
|
-
manually_manage_connections?: boolean | null;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Array of toolkit configurations with optional auth configs
|
|
83
|
-
*/
|
|
84
|
-
toolkits?: Array<Config.Toolkit>;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export namespace Config {
|
|
88
|
-
export interface Toolkit {
|
|
89
|
-
/**
|
|
90
|
-
* Toolkit identifier (e.g., gmail, slack, github)
|
|
91
|
-
*/
|
|
92
|
-
toolkit: string;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Specific auth configuration ID for this toolkit
|
|
96
|
-
*/
|
|
97
|
-
auth_config_id?: string;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export declare namespace ToolRouter {
|
|
103
|
-
export {
|
|
104
|
-
type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse,
|
|
105
|
-
type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
3
|
+
export * from './tool-router/index';
|
|
@@ -20,11 +20,11 @@ export class Toolkits extends APIResource {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Retrieves a comprehensive list of toolkits
|
|
24
|
-
* authenticated project. Toolkits represent integration points
|
|
25
|
-
* services and applications, each containing a collection of tools
|
|
26
|
-
* This endpoint supports filtering by category, management type, and
|
|
27
|
-
* availability, as well as different sorting options.
|
|
23
|
+
* Retrieves a comprehensive list of toolkits of their latest versions that are
|
|
24
|
+
* available to the authenticated project. Toolkits represent integration points
|
|
25
|
+
* with external services and applications, each containing a collection of tools
|
|
26
|
+
* and triggers. This endpoint supports filtering by category, management type, and
|
|
27
|
+
* local availability, as well as different sorting options.
|
|
28
28
|
*/
|
|
29
29
|
list(
|
|
30
30
|
query: ToolkitListParams | null | undefined = {},
|
|
@@ -34,10 +34,10 @@ export class Toolkits extends APIResource {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Retrieves a comprehensive list of all available toolkit categories
|
|
38
|
-
* categories can be used to filter toolkits by type or
|
|
39
|
-
* toolkit listing endpoint. Categories help organize
|
|
40
|
-
* based on their functionality or industry focus.
|
|
37
|
+
* Retrieves a comprehensive list of all available toolkit categories from their
|
|
38
|
+
* latest versions. These categories can be used to filter toolkits by type or
|
|
39
|
+
* purpose when using the toolkit listing endpoint. Categories help organize
|
|
40
|
+
* toolkits into logical groups based on their functionality or industry focus.
|
|
41
41
|
*/
|
|
42
42
|
retrieveCategories(
|
|
43
43
|
query: ToolkitRetrieveCategoriesParams | null | undefined = {},
|