@composio/client 0.1.0-alpha.10 → 0.1.0-alpha.11
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 +20 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +163 -24
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +163 -24
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +50 -4
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +50 -4
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +80 -17
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +80 -17
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +56 -4
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +56 -4
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +56 -23
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +56 -23
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +20 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +20 -2
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/command.d.mts +0 -33
- package/resources/mcp/command.d.mts.map +1 -1
- package/resources/mcp/command.d.ts +0 -33
- package/resources/mcp/command.d.ts.map +1 -1
- package/resources/mcp/command.js +0 -6
- package/resources/mcp/command.js.map +1 -1
- package/resources/mcp/command.mjs +0 -6
- package/resources/mcp/command.mjs.map +1 -1
- package/resources/mcp/index.d.mts +2 -2
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +2 -2
- 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 +232 -235
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +232 -235
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +55 -19
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +55 -19
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/migration.d.mts +11 -2
- package/resources/migration.d.mts.map +1 -1
- package/resources/migration.d.ts +11 -2
- package/resources/migration.d.ts.map +1 -1
- package/resources/migration.js +3 -1
- package/resources/migration.js.map +1 -1
- package/resources/migration.mjs +3 -1
- package/resources/migration.mjs.map +1 -1
- package/resources/org/api-key.d.mts +23 -2
- package/resources/org/api-key.d.mts.map +1 -1
- package/resources/org/api-key.d.ts +23 -2
- package/resources/org/api-key.d.ts.map +1 -1
- package/resources/org/api-key.js +15 -2
- package/resources/org/api-key.js.map +1 -1
- package/resources/org/api-key.mjs +15 -2
- package/resources/org/api-key.mjs.map +1 -1
- package/resources/org/project/api-keys.d.mts +97 -20
- package/resources/org/project/api-keys.d.mts.map +1 -1
- package/resources/org/project/api-keys.d.ts +97 -20
- package/resources/org/project/api-keys.d.ts.map +1 -1
- package/resources/org/project/api-keys.js +57 -0
- package/resources/org/project/api-keys.js.map +1 -1
- package/resources/org/project/api-keys.mjs +57 -0
- package/resources/org/project/api-keys.mjs.map +1 -1
- package/resources/org/project/project.d.mts +176 -4
- package/resources/org/project/project.d.mts.map +1 -1
- package/resources/org/project/project.d.ts +176 -4
- package/resources/org/project/project.d.ts.map +1 -1
- package/resources/org/project/project.js +46 -3
- package/resources/org/project/project.js.map +1 -1
- package/resources/org/project/project.mjs +46 -3
- package/resources/org/project/project.mjs.map +1 -1
- package/resources/org/project/trigger.d.mts +101 -1
- package/resources/org/project/trigger.d.mts.map +1 -1
- package/resources/org/project/trigger.d.ts +101 -1
- package/resources/org/project/trigger.d.ts.map +1 -1
- package/resources/org/project/trigger.js +21 -0
- package/resources/org/project/trigger.js.map +1 -1
- package/resources/org/project/trigger.mjs +21 -0
- package/resources/org/project/trigger.mjs.map +1 -1
- package/resources/org/project/webhook.d.mts +86 -15
- package/resources/org/project/webhook.d.mts.map +1 -1
- package/resources/org/project/webhook.d.ts +86 -15
- package/resources/org/project/webhook.d.ts.map +1 -1
- package/resources/org/project/webhook.js +49 -2
- package/resources/org/project/webhook.js.map +1 -1
- package/resources/org/project/webhook.mjs +49 -2
- package/resources/org/project/webhook.mjs.map +1 -1
- package/resources/toolkits.d.mts +195 -7
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +195 -7
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +14 -6
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +14 -6
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +207 -40
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +207 -40
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +58 -5
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +58 -5
- package/resources/tools.mjs.map +1 -1
- package/resources/trigger-instances/index.d.mts +1 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +1 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +21 -24
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +21 -24
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +1 -8
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +1 -8
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/triggers-types.d.mts +96 -2
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +96 -2
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +23 -1
- package/resources/triggers-types.js.map +1 -1
- package/resources/triggers-types.mjs +23 -1
- package/resources/triggers-types.mjs.map +1 -1
- package/src/client.ts +4 -14
- package/src/resources/auth-configs.ts +164 -24
- package/src/resources/connected-accounts.ts +80 -17
- package/src/resources/files.ts +56 -23
- package/src/resources/index.ts +2 -7
- package/src/resources/mcp/command.ts +1 -46
- package/src/resources/mcp/index.ts +2 -5
- package/src/resources/mcp/mcp.ts +240 -280
- package/src/resources/migration.ts +11 -2
- package/src/resources/org/api-key.ts +23 -2
- package/src/resources/org/project/api-keys.ts +97 -20
- package/src/resources/org/project/project.ts +176 -4
- package/src/resources/org/project/trigger.ts +101 -1
- package/src/resources/org/project/webhook.ts +86 -15
- package/src/resources/toolkits.ts +200 -7
- package/src/resources/tools.ts +207 -40
- package/src/resources/trigger-instances/index.ts +0 -3
- package/src/resources/trigger-instances/trigger-instances.ts +22 -38
- package/src/resources/triggers-types.ts +96 -2
- 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/src/resources/tools.ts
CHANGED
|
@@ -7,15 +7,28 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Tools extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Retrieve detailed information about a specific tool using its slug identifier
|
|
10
|
+
* Retrieve detailed information about a specific tool using its slug identifier.
|
|
11
|
+
* This endpoint returns full metadata about a tool including input/output
|
|
12
|
+
* parameters, versions, and toolkit information.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const tool = await client.tools.retrieve('tool_slug');
|
|
17
|
+
* ```
|
|
11
18
|
*/
|
|
12
19
|
retrieve(toolSlug: string, options?: RequestOptions): APIPromise<ToolRetrieveResponse> {
|
|
13
20
|
return this._client.get(path`/api/v3/tools/${toolSlug}`, options);
|
|
14
21
|
}
|
|
15
22
|
|
|
16
23
|
/**
|
|
17
|
-
* Retrieve a list of available tools with
|
|
18
|
-
* capabilities
|
|
24
|
+
* Retrieve a paginated list of available tools with comprehensive filtering,
|
|
25
|
+
* sorting and search capabilities. Use query parameters to narrow down results by
|
|
26
|
+
* toolkit, tags, or search terms.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const tools = await client.tools.list();
|
|
31
|
+
* ```
|
|
19
32
|
*/
|
|
20
33
|
list(
|
|
21
34
|
query: ToolListParams | null | undefined = {},
|
|
@@ -25,7 +38,15 @@ export class Tools extends APIResource {
|
|
|
25
38
|
}
|
|
26
39
|
|
|
27
40
|
/**
|
|
28
|
-
* Execute a specific tool operation with provided arguments and authentication
|
|
41
|
+
* Execute a specific tool operation with provided arguments and authentication.
|
|
42
|
+
* This is the primary endpoint for integrating with third-party services and
|
|
43
|
+
* executing tools. You can provide structured arguments or use natural language
|
|
44
|
+
* processing by providing a text description of what you want to accomplish.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response = await client.tools.execute('action');
|
|
49
|
+
* ```
|
|
29
50
|
*/
|
|
30
51
|
execute(
|
|
31
52
|
action: string,
|
|
@@ -35,6 +56,19 @@ export class Tools extends APIResource {
|
|
|
35
56
|
return this._client.post(path`/api/v3/tools/execute/${action}`, { body, ...options });
|
|
36
57
|
}
|
|
37
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Uses AI to translate a natural language description into structured arguments
|
|
61
|
+
* for a specific tool. This endpoint is useful when you want to let users describe
|
|
62
|
+
* what they want to do in plain language instead of providing structured
|
|
63
|
+
* parameters.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const response = await client.tools.getInput('actionName', {
|
|
68
|
+
* text: 'I need to trigger the main workflow in the octocat/Hello-World repository to deploy to production',
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
38
72
|
getInput(
|
|
39
73
|
actionName: string,
|
|
40
74
|
body: ToolGetInputParams,
|
|
@@ -43,13 +77,32 @@ export class Tools extends APIResource {
|
|
|
43
77
|
return this._client.post(path`/api/v3/tools/execute/${actionName}/input`, { body, ...options });
|
|
44
78
|
}
|
|
45
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Proxy an HTTP request to a third-party API using connected account credentials.
|
|
82
|
+
* This endpoint allows making authenticated API calls to external services while
|
|
83
|
+
* abstracting away authentication details.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const response = await client.tools.proxy({
|
|
88
|
+
* endpoint: '/api/v1/resources',
|
|
89
|
+
* method: 'GET',
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
46
93
|
proxy(body: ToolProxyParams, options?: RequestOptions): APIPromise<ToolProxyResponse> {
|
|
47
94
|
return this._client.post('/api/v3/tools/execute/proxy', { body, ...options });
|
|
48
95
|
}
|
|
49
96
|
|
|
50
97
|
/**
|
|
51
98
|
* Retrieve a list of all available tool enumeration values (tool slugs) for the
|
|
52
|
-
* project
|
|
99
|
+
* project. This endpoint returns a comma-separated string of tool slugs that can
|
|
100
|
+
* be used in other API calls.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const response = await client.tools.retrieveEnum();
|
|
105
|
+
* ```
|
|
53
106
|
*/
|
|
54
107
|
retrieveEnum(options?: RequestOptions): APIPromise<string> {
|
|
55
108
|
return this._client.get('/api/v3/tools/enum', options);
|
|
@@ -57,26 +110,53 @@ export class Tools extends APIResource {
|
|
|
57
110
|
}
|
|
58
111
|
|
|
59
112
|
export interface ToolRetrieveResponse {
|
|
113
|
+
/**
|
|
114
|
+
* List of all available versions for this tool
|
|
115
|
+
*/
|
|
60
116
|
available_versions: Array<string>;
|
|
61
117
|
|
|
62
118
|
deprecated: ToolRetrieveResponse.Deprecated;
|
|
63
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Detailed description of what the tool does
|
|
122
|
+
*/
|
|
64
123
|
description: string;
|
|
65
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Schema definition of required input parameters for the tool
|
|
127
|
+
*/
|
|
66
128
|
input_parameters: Record<string, unknown>;
|
|
67
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Human-readable name of the tool
|
|
132
|
+
*/
|
|
68
133
|
name: string;
|
|
69
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Indicates if the tool can be used without authentication
|
|
137
|
+
*/
|
|
70
138
|
no_auth: boolean;
|
|
71
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Schema definition of return values from the tool
|
|
142
|
+
*/
|
|
72
143
|
output_parameters: Record<string, unknown>;
|
|
73
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Unique identifier for the tool
|
|
147
|
+
*/
|
|
74
148
|
slug: string;
|
|
75
149
|
|
|
150
|
+
/**
|
|
151
|
+
* List of tags associated with the tool for categorization
|
|
152
|
+
*/
|
|
76
153
|
tags: Array<string>;
|
|
77
154
|
|
|
78
155
|
toolkit: ToolRetrieveResponse.Toolkit;
|
|
79
156
|
|
|
157
|
+
/**
|
|
158
|
+
* Current version of the tool
|
|
159
|
+
*/
|
|
80
160
|
version: string;
|
|
81
161
|
}
|
|
82
162
|
|
|
@@ -94,10 +174,19 @@ export namespace ToolRetrieveResponse {
|
|
|
94
174
|
}
|
|
95
175
|
|
|
96
176
|
export interface Toolkit {
|
|
177
|
+
/**
|
|
178
|
+
* URL to the toolkit logo image
|
|
179
|
+
*/
|
|
97
180
|
logo: string;
|
|
98
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Human-readable name of the parent toolkit
|
|
184
|
+
*/
|
|
99
185
|
name: string;
|
|
100
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Unique identifier of the parent toolkit
|
|
189
|
+
*/
|
|
101
190
|
slug: string;
|
|
102
191
|
}
|
|
103
192
|
}
|
|
@@ -115,37 +204,37 @@ export namespace ToolListResponse {
|
|
|
115
204
|
deprecated: Item.Deprecated;
|
|
116
205
|
|
|
117
206
|
/**
|
|
118
|
-
*
|
|
207
|
+
* Detailed explanation of the tool's functionality and purpose
|
|
119
208
|
*/
|
|
120
209
|
description: string;
|
|
121
210
|
|
|
122
211
|
/**
|
|
123
|
-
*
|
|
212
|
+
* Schema definition of required input parameters for the tool
|
|
124
213
|
*/
|
|
125
214
|
input_parameters: Record<string, unknown>;
|
|
126
215
|
|
|
127
216
|
/**
|
|
128
|
-
*
|
|
217
|
+
* Human-readable display name of the tool
|
|
129
218
|
*/
|
|
130
219
|
name: string;
|
|
131
220
|
|
|
132
221
|
/**
|
|
133
|
-
*
|
|
222
|
+
* Indicates if the tool can be used without authentication
|
|
134
223
|
*/
|
|
135
224
|
no_auth: boolean;
|
|
136
225
|
|
|
137
226
|
/**
|
|
138
|
-
*
|
|
227
|
+
* Schema definition of return values from the tool
|
|
139
228
|
*/
|
|
140
229
|
output_parameters: Record<string, unknown>;
|
|
141
230
|
|
|
142
231
|
/**
|
|
143
|
-
*
|
|
232
|
+
* Unique identifier for the tool
|
|
144
233
|
*/
|
|
145
234
|
slug: string;
|
|
146
235
|
|
|
147
236
|
/**
|
|
148
|
-
*
|
|
237
|
+
* List of tags associated with the tool for categorization and filtering
|
|
149
238
|
*/
|
|
150
239
|
tags: Array<string>;
|
|
151
240
|
|
|
@@ -155,7 +244,7 @@ export namespace ToolListResponse {
|
|
|
155
244
|
export namespace Item {
|
|
156
245
|
export interface Deprecated {
|
|
157
246
|
/**
|
|
158
|
-
*
|
|
247
|
+
* List of all available versions for this tool
|
|
159
248
|
*/
|
|
160
249
|
available_versions: Array<string>;
|
|
161
250
|
|
|
@@ -165,14 +254,14 @@ export namespace ToolListResponse {
|
|
|
165
254
|
displayName: string;
|
|
166
255
|
|
|
167
256
|
/**
|
|
168
|
-
*
|
|
257
|
+
* Indicates if this tool is deprecated and may be removed in the future
|
|
169
258
|
*/
|
|
170
259
|
is_deprecated: boolean;
|
|
171
260
|
|
|
172
261
|
toolkit: Deprecated.Toolkit;
|
|
173
262
|
|
|
174
263
|
/**
|
|
175
|
-
*
|
|
264
|
+
* Current version identifier of the tool
|
|
176
265
|
*/
|
|
177
266
|
version: string;
|
|
178
267
|
}
|
|
@@ -180,7 +269,7 @@ export namespace ToolListResponse {
|
|
|
180
269
|
export namespace Deprecated {
|
|
181
270
|
export interface Toolkit {
|
|
182
271
|
/**
|
|
183
|
-
*
|
|
272
|
+
* URL to the toolkit logo image
|
|
184
273
|
*/
|
|
185
274
|
logo: string;
|
|
186
275
|
}
|
|
@@ -188,12 +277,12 @@ export namespace ToolListResponse {
|
|
|
188
277
|
|
|
189
278
|
export interface Toolkit {
|
|
190
279
|
/**
|
|
191
|
-
*
|
|
280
|
+
* Human-readable name of the parent toolkit
|
|
192
281
|
*/
|
|
193
282
|
name: string;
|
|
194
283
|
|
|
195
284
|
/**
|
|
196
|
-
*
|
|
285
|
+
* Unique identifier of the parent toolkit
|
|
197
286
|
*/
|
|
198
287
|
slug: string;
|
|
199
288
|
}
|
|
@@ -201,69 +290,98 @@ export namespace ToolListResponse {
|
|
|
201
290
|
}
|
|
202
291
|
|
|
203
292
|
export interface ToolExecuteResponse {
|
|
293
|
+
/**
|
|
294
|
+
* Tool execution output data that varies based on the specific tool
|
|
295
|
+
*/
|
|
204
296
|
data: Record<string, unknown>;
|
|
205
297
|
|
|
298
|
+
/**
|
|
299
|
+
* Error message if the tool execution was not successful (null if successful)
|
|
300
|
+
*/
|
|
206
301
|
error: string | null;
|
|
207
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Indicates if the tool execution was successful
|
|
305
|
+
*/
|
|
208
306
|
successful: boolean;
|
|
209
307
|
|
|
308
|
+
/**
|
|
309
|
+
* Unique identifier for the execution log (useful for debugging and support)
|
|
310
|
+
*/
|
|
210
311
|
log_id?: string;
|
|
211
312
|
|
|
313
|
+
/**
|
|
314
|
+
* Optional session information for tools that return session context
|
|
315
|
+
*/
|
|
212
316
|
session_info?: unknown;
|
|
213
317
|
}
|
|
214
318
|
|
|
215
319
|
export interface ToolGetInputResponse {
|
|
216
320
|
/**
|
|
217
|
-
*
|
|
321
|
+
* Key-value pairs of arguments required by the tool to accomplish the described
|
|
322
|
+
* task
|
|
218
323
|
*/
|
|
219
324
|
arguments?: Record<string, unknown>;
|
|
220
325
|
|
|
221
326
|
/**
|
|
222
|
-
*
|
|
327
|
+
* Error message if the arguments could not be generated (null if successful)
|
|
223
328
|
*/
|
|
224
329
|
error?: string;
|
|
225
330
|
}
|
|
226
331
|
|
|
227
332
|
export interface ToolProxyResponse {
|
|
333
|
+
/**
|
|
334
|
+
* The HTTP status code returned from the proxied API
|
|
335
|
+
*/
|
|
228
336
|
status: number;
|
|
229
337
|
|
|
338
|
+
/**
|
|
339
|
+
* The response data returned from the proxied API
|
|
340
|
+
*/
|
|
230
341
|
data?: unknown;
|
|
231
342
|
|
|
343
|
+
/**
|
|
344
|
+
* The HTTP headers returned from the proxied API
|
|
345
|
+
*/
|
|
232
346
|
headers?: Record<string, string>;
|
|
233
347
|
}
|
|
234
348
|
|
|
349
|
+
/**
|
|
350
|
+
* Comma-separated list of tool slugs available to the project
|
|
351
|
+
*/
|
|
235
352
|
export type ToolRetrieveEnumResponse = string;
|
|
236
353
|
|
|
237
354
|
export interface ToolListParams {
|
|
238
355
|
/**
|
|
239
|
-
*
|
|
356
|
+
* Pagination cursor for fetching next page of results (base64 encoded)
|
|
240
357
|
*/
|
|
241
358
|
cursor?: string;
|
|
242
359
|
|
|
243
360
|
/**
|
|
244
|
-
*
|
|
361
|
+
* Filter to only show important/featured tools (set to "true" to enable)
|
|
245
362
|
*/
|
|
246
|
-
important?:
|
|
363
|
+
important?: 'true' | 'false';
|
|
247
364
|
|
|
248
365
|
/**
|
|
249
|
-
*
|
|
366
|
+
* Maximum number of tools to return per page (defaults to 20, max 100)
|
|
250
367
|
*/
|
|
251
368
|
limit?: string;
|
|
252
369
|
|
|
253
370
|
/**
|
|
254
|
-
*
|
|
371
|
+
* Free-text search query to find tools by name, description, or functionality
|
|
255
372
|
*/
|
|
256
373
|
search?: string;
|
|
257
374
|
|
|
258
375
|
/**
|
|
259
|
-
*
|
|
376
|
+
* Filter tools by one or more tags (can be specified multiple times)
|
|
260
377
|
*/
|
|
261
|
-
tags?: Array<string
|
|
378
|
+
tags?: Array<string>;
|
|
262
379
|
|
|
263
380
|
/**
|
|
264
|
-
*
|
|
381
|
+
* Comma-separated list of specific tool slugs to retrieve (overrides other
|
|
382
|
+
* filters)
|
|
265
383
|
*/
|
|
266
|
-
tool_slugs?:
|
|
384
|
+
tool_slugs?: string;
|
|
267
385
|
|
|
268
386
|
/**
|
|
269
387
|
* The slug of the toolkit to filter by
|
|
@@ -272,29 +390,49 @@ export interface ToolListParams {
|
|
|
272
390
|
}
|
|
273
391
|
|
|
274
392
|
export interface ToolExecuteParams {
|
|
393
|
+
/**
|
|
394
|
+
* Enable debug tracing for tool execution (useful for debugging)
|
|
395
|
+
*/
|
|
275
396
|
allow_tracing?: boolean;
|
|
276
397
|
|
|
398
|
+
/**
|
|
399
|
+
* Key-value pairs of arguments required by the tool (mutually exclusive with text)
|
|
400
|
+
*/
|
|
277
401
|
arguments?: Record<string, unknown>;
|
|
278
402
|
|
|
403
|
+
/**
|
|
404
|
+
* Unique identifier for the connected account to use for authentication
|
|
405
|
+
*/
|
|
279
406
|
connected_account_id?: string;
|
|
280
407
|
|
|
281
408
|
/**
|
|
282
|
-
*
|
|
283
|
-
*
|
|
409
|
+
* Custom authentication parameters for tools that support parameterized
|
|
410
|
+
* authentication
|
|
284
411
|
*/
|
|
285
412
|
custom_auth_params?: ToolExecuteParams.CustomAuthParams;
|
|
286
413
|
|
|
414
|
+
/**
|
|
415
|
+
* Entity identifier for multi-entity connected accounts (e.g. multiple
|
|
416
|
+
* repositories, organizations)
|
|
417
|
+
*/
|
|
287
418
|
entity_id?: string;
|
|
288
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Natural language description of the task to perform (mutually exclusive with
|
|
422
|
+
* arguments)
|
|
423
|
+
*/
|
|
289
424
|
text?: string;
|
|
290
425
|
|
|
426
|
+
/**
|
|
427
|
+
* Tool version to execute (defaults to "latest" if not specified)
|
|
428
|
+
*/
|
|
291
429
|
version?: string;
|
|
292
430
|
}
|
|
293
431
|
|
|
294
432
|
export namespace ToolExecuteParams {
|
|
295
433
|
/**
|
|
296
|
-
*
|
|
297
|
-
*
|
|
434
|
+
* Custom authentication parameters for tools that support parameterized
|
|
435
|
+
* authentication
|
|
298
436
|
*/
|
|
299
437
|
export interface CustomAuthParams {
|
|
300
438
|
parameters: Array<CustomAuthParams.Parameter>;
|
|
@@ -308,7 +446,7 @@ export namespace ToolExecuteParams {
|
|
|
308
446
|
|
|
309
447
|
/**
|
|
310
448
|
* The body to be sent to the endpoint for authentication. This is a JSON object.
|
|
311
|
-
* Note: This is very rarely
|
|
449
|
+
* Note: This is very rarely needed and is only required by very few apps.
|
|
312
450
|
*/
|
|
313
451
|
body?: Record<string, unknown>;
|
|
314
452
|
}
|
|
@@ -335,44 +473,73 @@ export namespace ToolExecuteParams {
|
|
|
335
473
|
|
|
336
474
|
export interface ToolGetInputParams {
|
|
337
475
|
/**
|
|
338
|
-
*
|
|
339
|
-
* generate the correct inputs for the action.
|
|
476
|
+
* Natural language description of what you want to accomplish with this tool
|
|
340
477
|
*/
|
|
341
478
|
text: string;
|
|
342
479
|
|
|
343
480
|
/**
|
|
344
|
-
*
|
|
345
|
-
*
|
|
481
|
+
* Custom description of the tool to help guide the LLM in generating more accurate
|
|
482
|
+
* inputs
|
|
346
483
|
*/
|
|
347
484
|
customDescription?: string;
|
|
348
485
|
|
|
349
486
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
487
|
+
* System prompt to control and guide the behavior of the LLM when generating
|
|
488
|
+
* inputs
|
|
352
489
|
*/
|
|
353
490
|
systemPrompt?: string;
|
|
354
491
|
|
|
492
|
+
/**
|
|
493
|
+
* Tool version to use when generating inputs (defaults to "latest" if not
|
|
494
|
+
* specified)
|
|
495
|
+
*/
|
|
355
496
|
version?: string;
|
|
356
497
|
}
|
|
357
498
|
|
|
358
499
|
export interface ToolProxyParams {
|
|
500
|
+
/**
|
|
501
|
+
* The API endpoint to call (absolute URL or path relative to base URL of the
|
|
502
|
+
* connected account)
|
|
503
|
+
*/
|
|
359
504
|
endpoint: string;
|
|
360
505
|
|
|
506
|
+
/**
|
|
507
|
+
* The HTTP method to use for the request
|
|
508
|
+
*/
|
|
361
509
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
362
510
|
|
|
511
|
+
/**
|
|
512
|
+
* The request body (for POST, PUT, and PATCH requests)
|
|
513
|
+
*/
|
|
363
514
|
body?: unknown;
|
|
364
515
|
|
|
516
|
+
/**
|
|
517
|
+
* The ID of the connected account to use for authentication (if not provided, will
|
|
518
|
+
* use the default account for the project)
|
|
519
|
+
*/
|
|
365
520
|
connected_account_id?: string;
|
|
366
521
|
|
|
522
|
+
/**
|
|
523
|
+
* Additional HTTP headers or query parameters to include in the request
|
|
524
|
+
*/
|
|
367
525
|
parameters?: Array<ToolProxyParams.Parameter>;
|
|
368
526
|
}
|
|
369
527
|
|
|
370
528
|
export namespace ToolProxyParams {
|
|
371
529
|
export interface Parameter {
|
|
530
|
+
/**
|
|
531
|
+
* Parameter name
|
|
532
|
+
*/
|
|
372
533
|
name: string;
|
|
373
534
|
|
|
535
|
+
/**
|
|
536
|
+
* Parameter type (header or query)
|
|
537
|
+
*/
|
|
374
538
|
type: 'header' | 'query';
|
|
375
539
|
|
|
540
|
+
/**
|
|
541
|
+
* Parameter value
|
|
542
|
+
*/
|
|
376
543
|
value: string;
|
|
377
544
|
}
|
|
378
545
|
}
|
|
@@ -10,10 +10,7 @@ export {
|
|
|
10
10
|
export {
|
|
11
11
|
TriggerInstances,
|
|
12
12
|
type TriggerInstanceListActiveResponse,
|
|
13
|
-
type TriggerInstanceRemoveUpsertResponse,
|
|
14
|
-
type TriggerInstanceUpdateStatusResponse,
|
|
15
13
|
type TriggerInstanceUpsertResponse,
|
|
16
14
|
type TriggerInstanceListActiveParams,
|
|
17
|
-
type TriggerInstanceUpdateStatusParams,
|
|
18
15
|
type TriggerInstanceUpsertParams,
|
|
19
16
|
} from './trigger-instances';
|
|
@@ -23,22 +23,9 @@ export class TriggerInstances extends APIResource {
|
|
|
23
23
|
return this._client.get('/api/v3/trigger_instances/active', { query, ...options });
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
removeUpsert(slug: string, options?: RequestOptions): APIPromise<TriggerInstanceRemoveUpsertResponse> {
|
|
27
|
-
return this._client.delete(path`/api/v3/trigger_instances/${slug}/upsert`, options);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
updateStatus(
|
|
31
|
-
status: 'enable' | 'disable',
|
|
32
|
-
params: TriggerInstanceUpdateStatusParams,
|
|
33
|
-
options?: RequestOptions,
|
|
34
|
-
): APIPromise<TriggerInstanceUpdateStatusResponse> {
|
|
35
|
-
const { slug } = params;
|
|
36
|
-
return this._client.patch(path`/api/v3/trigger_instances/${slug}/status/${status}`, options);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
26
|
upsert(
|
|
40
27
|
slug: string,
|
|
41
|
-
body: TriggerInstanceUpsertParams,
|
|
28
|
+
body: TriggerInstanceUpsertParams | null | undefined = {},
|
|
42
29
|
options?: RequestOptions,
|
|
43
30
|
): APIPromise<TriggerInstanceUpsertResponse> {
|
|
44
31
|
return this._client.post(path`/api/v3/trigger_instances/${slug}/upsert`, { body, ...options });
|
|
@@ -119,25 +106,22 @@ export namespace TriggerInstanceListActiveResponse {
|
|
|
119
106
|
}
|
|
120
107
|
}
|
|
121
108
|
|
|
122
|
-
export interface
|
|
109
|
+
export interface TriggerInstanceUpsertResponse {
|
|
110
|
+
deprecated: TriggerInstanceUpsertResponse.Deprecated;
|
|
111
|
+
|
|
123
112
|
/**
|
|
124
113
|
* ID of the updated trigger
|
|
125
114
|
*/
|
|
126
115
|
triggerId: string;
|
|
127
116
|
}
|
|
128
117
|
|
|
129
|
-
export
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
export interface TriggerInstanceUpsertResponse {
|
|
137
|
-
/**
|
|
138
|
-
* ID of the updated trigger
|
|
139
|
-
*/
|
|
140
|
-
triggerId: string;
|
|
118
|
+
export namespace TriggerInstanceUpsertResponse {
|
|
119
|
+
export interface Deprecated {
|
|
120
|
+
/**
|
|
121
|
+
* ID of the updated trigger
|
|
122
|
+
*/
|
|
123
|
+
uuid: string;
|
|
124
|
+
}
|
|
141
125
|
}
|
|
142
126
|
|
|
143
127
|
export interface TriggerInstanceListActiveParams {
|
|
@@ -187,23 +171,26 @@ export interface TriggerInstanceListActiveParams {
|
|
|
187
171
|
triggerNames?: Array<string> | null;
|
|
188
172
|
}
|
|
189
173
|
|
|
190
|
-
export interface
|
|
174
|
+
export interface TriggerInstanceUpsertParams {
|
|
191
175
|
/**
|
|
192
|
-
*
|
|
176
|
+
* Connected account nanoid
|
|
193
177
|
*/
|
|
194
|
-
|
|
195
|
-
}
|
|
178
|
+
connected_account_id?: string;
|
|
196
179
|
|
|
197
|
-
export interface TriggerInstanceUpsertParams {
|
|
198
180
|
/**
|
|
199
|
-
*
|
|
181
|
+
* Connected account ID (deprecated)
|
|
200
182
|
*/
|
|
201
|
-
connectedAuthId
|
|
183
|
+
connectedAuthId?: string;
|
|
202
184
|
|
|
203
185
|
/**
|
|
204
186
|
* Trigger configuration
|
|
205
187
|
*/
|
|
206
|
-
|
|
188
|
+
trigger_config?: Record<string, unknown>;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Trigger configuration (deprecated)
|
|
192
|
+
*/
|
|
193
|
+
triggerConfig?: Record<string, unknown>;
|
|
207
194
|
}
|
|
208
195
|
|
|
209
196
|
TriggerInstances.Handle = Handle;
|
|
@@ -211,11 +198,8 @@ TriggerInstances.Handle = Handle;
|
|
|
211
198
|
export declare namespace TriggerInstances {
|
|
212
199
|
export {
|
|
213
200
|
type TriggerInstanceListActiveResponse as TriggerInstanceListActiveResponse,
|
|
214
|
-
type TriggerInstanceRemoveUpsertResponse as TriggerInstanceRemoveUpsertResponse,
|
|
215
|
-
type TriggerInstanceUpdateStatusResponse as TriggerInstanceUpdateStatusResponse,
|
|
216
201
|
type TriggerInstanceUpsertResponse as TriggerInstanceUpsertResponse,
|
|
217
202
|
type TriggerInstanceListActiveParams as TriggerInstanceListActiveParams,
|
|
218
|
-
type TriggerInstanceUpdateStatusParams as TriggerInstanceUpdateStatusParams,
|
|
219
203
|
type TriggerInstanceUpsertParams as TriggerInstanceUpsertParams,
|
|
220
204
|
};
|
|
221
205
|
|