@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.
Files changed (170) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/auth-configs.d.mts +163 -24
  10. package/resources/auth-configs.d.mts.map +1 -1
  11. package/resources/auth-configs.d.ts +163 -24
  12. package/resources/auth-configs.d.ts.map +1 -1
  13. package/resources/auth-configs.js +50 -4
  14. package/resources/auth-configs.js.map +1 -1
  15. package/resources/auth-configs.mjs +50 -4
  16. package/resources/auth-configs.mjs.map +1 -1
  17. package/resources/connected-accounts.d.mts +80 -17
  18. package/resources/connected-accounts.d.mts.map +1 -1
  19. package/resources/connected-accounts.d.ts +80 -17
  20. package/resources/connected-accounts.d.ts.map +1 -1
  21. package/resources/connected-accounts.js +56 -4
  22. package/resources/connected-accounts.js.map +1 -1
  23. package/resources/connected-accounts.mjs +56 -4
  24. package/resources/connected-accounts.mjs.map +1 -1
  25. package/resources/files.d.mts +56 -23
  26. package/resources/files.d.mts.map +1 -1
  27. package/resources/files.d.ts +56 -23
  28. package/resources/files.d.ts.map +1 -1
  29. package/resources/files.js +20 -2
  30. package/resources/files.js.map +1 -1
  31. package/resources/files.mjs +20 -2
  32. package/resources/files.mjs.map +1 -1
  33. package/resources/index.d.mts +3 -3
  34. package/resources/index.d.mts.map +1 -1
  35. package/resources/index.d.ts +3 -3
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js.map +1 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/mcp/command.d.mts +0 -33
  40. package/resources/mcp/command.d.mts.map +1 -1
  41. package/resources/mcp/command.d.ts +0 -33
  42. package/resources/mcp/command.d.ts.map +1 -1
  43. package/resources/mcp/command.js +0 -6
  44. package/resources/mcp/command.js.map +1 -1
  45. package/resources/mcp/command.mjs +0 -6
  46. package/resources/mcp/command.mjs.map +1 -1
  47. package/resources/mcp/index.d.mts +2 -2
  48. package/resources/mcp/index.d.mts.map +1 -1
  49. package/resources/mcp/index.d.ts +2 -2
  50. package/resources/mcp/index.d.ts.map +1 -1
  51. package/resources/mcp/index.js.map +1 -1
  52. package/resources/mcp/index.mjs.map +1 -1
  53. package/resources/mcp/mcp.d.mts +232 -235
  54. package/resources/mcp/mcp.d.mts.map +1 -1
  55. package/resources/mcp/mcp.d.ts +232 -235
  56. package/resources/mcp/mcp.d.ts.map +1 -1
  57. package/resources/mcp/mcp.js +55 -19
  58. package/resources/mcp/mcp.js.map +1 -1
  59. package/resources/mcp/mcp.mjs +55 -19
  60. package/resources/mcp/mcp.mjs.map +1 -1
  61. package/resources/migration.d.mts +11 -2
  62. package/resources/migration.d.mts.map +1 -1
  63. package/resources/migration.d.ts +11 -2
  64. package/resources/migration.d.ts.map +1 -1
  65. package/resources/migration.js +3 -1
  66. package/resources/migration.js.map +1 -1
  67. package/resources/migration.mjs +3 -1
  68. package/resources/migration.mjs.map +1 -1
  69. package/resources/org/api-key.d.mts +23 -2
  70. package/resources/org/api-key.d.mts.map +1 -1
  71. package/resources/org/api-key.d.ts +23 -2
  72. package/resources/org/api-key.d.ts.map +1 -1
  73. package/resources/org/api-key.js +15 -2
  74. package/resources/org/api-key.js.map +1 -1
  75. package/resources/org/api-key.mjs +15 -2
  76. package/resources/org/api-key.mjs.map +1 -1
  77. package/resources/org/project/api-keys.d.mts +97 -20
  78. package/resources/org/project/api-keys.d.mts.map +1 -1
  79. package/resources/org/project/api-keys.d.ts +97 -20
  80. package/resources/org/project/api-keys.d.ts.map +1 -1
  81. package/resources/org/project/api-keys.js +57 -0
  82. package/resources/org/project/api-keys.js.map +1 -1
  83. package/resources/org/project/api-keys.mjs +57 -0
  84. package/resources/org/project/api-keys.mjs.map +1 -1
  85. package/resources/org/project/project.d.mts +176 -4
  86. package/resources/org/project/project.d.mts.map +1 -1
  87. package/resources/org/project/project.d.ts +176 -4
  88. package/resources/org/project/project.d.ts.map +1 -1
  89. package/resources/org/project/project.js +46 -3
  90. package/resources/org/project/project.js.map +1 -1
  91. package/resources/org/project/project.mjs +46 -3
  92. package/resources/org/project/project.mjs.map +1 -1
  93. package/resources/org/project/trigger.d.mts +101 -1
  94. package/resources/org/project/trigger.d.mts.map +1 -1
  95. package/resources/org/project/trigger.d.ts +101 -1
  96. package/resources/org/project/trigger.d.ts.map +1 -1
  97. package/resources/org/project/trigger.js +21 -0
  98. package/resources/org/project/trigger.js.map +1 -1
  99. package/resources/org/project/trigger.mjs +21 -0
  100. package/resources/org/project/trigger.mjs.map +1 -1
  101. package/resources/org/project/webhook.d.mts +86 -15
  102. package/resources/org/project/webhook.d.mts.map +1 -1
  103. package/resources/org/project/webhook.d.ts +86 -15
  104. package/resources/org/project/webhook.d.ts.map +1 -1
  105. package/resources/org/project/webhook.js +49 -2
  106. package/resources/org/project/webhook.js.map +1 -1
  107. package/resources/org/project/webhook.mjs +49 -2
  108. package/resources/org/project/webhook.mjs.map +1 -1
  109. package/resources/toolkits.d.mts +195 -7
  110. package/resources/toolkits.d.mts.map +1 -1
  111. package/resources/toolkits.d.ts +195 -7
  112. package/resources/toolkits.d.ts.map +1 -1
  113. package/resources/toolkits.js +14 -6
  114. package/resources/toolkits.js.map +1 -1
  115. package/resources/toolkits.mjs +14 -6
  116. package/resources/toolkits.mjs.map +1 -1
  117. package/resources/tools.d.mts +207 -40
  118. package/resources/tools.d.mts.map +1 -1
  119. package/resources/tools.d.ts +207 -40
  120. package/resources/tools.d.ts.map +1 -1
  121. package/resources/tools.js +58 -5
  122. package/resources/tools.js.map +1 -1
  123. package/resources/tools.mjs +58 -5
  124. package/resources/tools.mjs.map +1 -1
  125. package/resources/trigger-instances/index.d.mts +1 -1
  126. package/resources/trigger-instances/index.d.mts.map +1 -1
  127. package/resources/trigger-instances/index.d.ts +1 -1
  128. package/resources/trigger-instances/index.d.ts.map +1 -1
  129. package/resources/trigger-instances/index.js.map +1 -1
  130. package/resources/trigger-instances/index.mjs.map +1 -1
  131. package/resources/trigger-instances/trigger-instances.d.mts +21 -24
  132. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  133. package/resources/trigger-instances/trigger-instances.d.ts +21 -24
  134. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  135. package/resources/trigger-instances/trigger-instances.js +1 -8
  136. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  137. package/resources/trigger-instances/trigger-instances.mjs +1 -8
  138. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  139. package/resources/triggers-types.d.mts +96 -2
  140. package/resources/triggers-types.d.mts.map +1 -1
  141. package/resources/triggers-types.d.ts +96 -2
  142. package/resources/triggers-types.d.ts.map +1 -1
  143. package/resources/triggers-types.js +23 -1
  144. package/resources/triggers-types.js.map +1 -1
  145. package/resources/triggers-types.mjs +23 -1
  146. package/resources/triggers-types.mjs.map +1 -1
  147. package/src/client.ts +4 -14
  148. package/src/resources/auth-configs.ts +164 -24
  149. package/src/resources/connected-accounts.ts +80 -17
  150. package/src/resources/files.ts +56 -23
  151. package/src/resources/index.ts +2 -7
  152. package/src/resources/mcp/command.ts +1 -46
  153. package/src/resources/mcp/index.ts +2 -5
  154. package/src/resources/mcp/mcp.ts +240 -280
  155. package/src/resources/migration.ts +11 -2
  156. package/src/resources/org/api-key.ts +23 -2
  157. package/src/resources/org/project/api-keys.ts +97 -20
  158. package/src/resources/org/project/project.ts +176 -4
  159. package/src/resources/org/project/trigger.ts +101 -1
  160. package/src/resources/org/project/webhook.ts +86 -15
  161. package/src/resources/toolkits.ts +200 -7
  162. package/src/resources/tools.ts +207 -40
  163. package/src/resources/trigger-instances/index.ts +0 -3
  164. package/src/resources/trigger-instances/trigger-instances.ts +22 -38
  165. package/src/resources/triggers-types.ts +96 -2
  166. package/src/version.ts +1 -1
  167. package/version.d.mts +1 -1
  168. package/version.d.ts +1 -1
  169. package/version.js +1 -1
  170. package/version.mjs +1 -1
@@ -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 optional filtering and search
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
- * The description of the tool
207
+ * Detailed explanation of the tool's functionality and purpose
119
208
  */
120
209
  description: string;
121
210
 
122
211
  /**
123
- * The input parameters of the tool
212
+ * Schema definition of required input parameters for the tool
124
213
  */
125
214
  input_parameters: Record<string, unknown>;
126
215
 
127
216
  /**
128
- * The name of the tool
217
+ * Human-readable display name of the tool
129
218
  */
130
219
  name: string;
131
220
 
132
221
  /**
133
- * Whether the tool requires authentication
222
+ * Indicates if the tool can be used without authentication
134
223
  */
135
224
  no_auth: boolean;
136
225
 
137
226
  /**
138
- * The output parameters of the tool
227
+ * Schema definition of return values from the tool
139
228
  */
140
229
  output_parameters: Record<string, unknown>;
141
230
 
142
231
  /**
143
- * The slug of the tool
232
+ * Unique identifier for the tool
144
233
  */
145
234
  slug: string;
146
235
 
147
236
  /**
148
- * The tags of the tool
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
- * The available versions of the tool
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
- * Whether the tool is deprecated
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
- * The version of the tool
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
- * The logo of the toolkit
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
- * The name of the toolkit
280
+ * Human-readable name of the parent toolkit
192
281
  */
193
282
  name: string;
194
283
 
195
284
  /**
196
- * The slug of the toolkit
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
- * The arguments for the action needed to execute the given task.
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
- * The error message if the arguments were not generated successfully.
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
- * The cursor to paginate through the results
356
+ * Pagination cursor for fetching next page of results (base64 encoded)
240
357
  */
241
358
  cursor?: string;
242
359
 
243
360
  /**
244
- * Whether to filter by important tools
361
+ * Filter to only show important/featured tools (set to "true" to enable)
245
362
  */
246
- important?: string;
363
+ important?: 'true' | 'false';
247
364
 
248
365
  /**
249
- * The number of results to return
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
- * The search query to filter by
371
+ * Free-text search query to find tools by name, description, or functionality
255
372
  */
256
373
  search?: string;
257
374
 
258
375
  /**
259
- * The tags to filter the tools by
376
+ * Filter tools by one or more tags (can be specified multiple times)
260
377
  */
261
- tags?: Array<string> | null;
378
+ tags?: Array<string>;
262
379
 
263
380
  /**
264
- * The slugs of the tools to filter by
381
+ * Comma-separated list of specific tool slugs to retrieve (overrides other
382
+ * filters)
265
383
  */
266
- tool_slugs?: Array<string> | null;
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
- * An optional field for people who want to use their own auth to execute the
283
- * action.
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
- * An optional field for people who want to use their own auth to execute the
297
- * action.
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 neeed and is only required by very few apps.
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
- * The use-case description for the action, this will give context to LLM to
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
- * The custom description for the action, use this to provide customised context
345
- * about the action to the LLM to suit your use-case.
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
- * The system prompt to be used by LLM, use this to control and guide the behaviour
351
- * of the LLM.
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 TriggerInstanceRemoveUpsertResponse {
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 interface TriggerInstanceUpdateStatusResponse {
130
- /**
131
- * Status of the operation
132
- */
133
- status: 'success';
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 TriggerInstanceUpdateStatusParams {
174
+ export interface TriggerInstanceUpsertParams {
191
175
  /**
192
- * The slug of the trigger instance
176
+ * Connected account nanoid
193
177
  */
194
- slug: string;
195
- }
178
+ connected_account_id?: string;
196
179
 
197
- export interface TriggerInstanceUpsertParams {
198
180
  /**
199
- * Connection ID
181
+ * Connected account ID (deprecated)
200
182
  */
201
- connectedAuthId: string;
183
+ connectedAuthId?: string;
202
184
 
203
185
  /**
204
186
  * Trigger configuration
205
187
  */
206
- triggerConfig: Record<string, unknown>;
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