@composio/client 0.1.0-alpha.55 → 0.1.0-alpha.57
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 +50 -0
- package/client.d.mts +3 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -2
- package/client.d.ts.map +1 -1
- package/client.js +16 -3
- package/client.js.map +1 -1
- package/client.mjs +16 -3
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +19 -5
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +19 -5
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +8 -2
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +8 -2
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/cli/cli.d.mts +120 -0
- package/resources/cli/cli.d.mts.map +1 -0
- package/resources/cli/cli.d.ts +120 -0
- package/resources/cli/cli.d.ts.map +1 -0
- package/resources/cli/cli.js +36 -0
- package/resources/cli/cli.js.map +1 -0
- package/resources/cli/cli.mjs +31 -0
- package/resources/cli/cli.mjs.map +1 -0
- package/resources/cli/index.d.mts +3 -0
- package/resources/cli/index.d.mts.map +1 -0
- package/resources/cli/index.d.ts +3 -0
- package/resources/cli/index.d.ts.map +1 -0
- package/resources/cli/index.js +9 -0
- package/resources/cli/index.js.map +1 -0
- package/resources/cli/index.mjs +4 -0
- package/resources/cli/index.mjs.map +1 -0
- package/resources/cli/realtime.d.mts +53 -0
- package/resources/cli/realtime.d.mts.map +1 -0
- package/resources/cli/realtime.d.ts +53 -0
- package/resources/cli/realtime.d.ts.map +1 -0
- package/resources/cli/realtime.js +22 -0
- package/resources/cli/realtime.js.map +1 -0
- package/resources/cli/realtime.mjs +18 -0
- package/resources/cli/realtime.mjs.map +1 -0
- package/resources/cli.d.mts +1 -95
- package/resources/cli.d.mts.map +1 -1
- package/resources/cli.d.ts +1 -95
- package/resources/cli.d.ts.map +1 -1
- package/resources/cli.js +2 -23
- package/resources/cli.js.map +1 -1
- package/resources/cli.mjs +1 -21
- package/resources/cli.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +11 -4
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +11 -4
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +9 -2
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +9 -2
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +42 -111
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +42 -111
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +5 -5
- package/resources/files.mjs +5 -5
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/project/config.d.mts +3 -0
- package/resources/project/config.d.mts.map +1 -1
- package/resources/project/config.d.ts +3 -0
- package/resources/project/config.d.ts.map +1 -1
- package/resources/tool-router/session.d.mts +43 -4
- package/resources/tool-router/session.d.mts.map +1 -1
- package/resources/tool-router/session.d.ts +43 -4
- package/resources/tool-router/session.d.ts.map +1 -1
- package/resources/toolkits.d.mts +4 -8
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +4 -8
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/tools.d.mts +30 -22
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +30 -22
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +11 -2
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +11 -2
- package/resources/tools.mjs.map +1 -1
- package/resources/trigger-instances/manage.d.mts +9 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -1
- package/resources/trigger-instances/manage.d.ts +9 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -1
- package/resources/trigger-instances/manage.js +9 -0
- package/resources/trigger-instances/manage.js.map +1 -1
- package/resources/trigger-instances/manage.mjs +9 -0
- package/resources/trigger-instances/manage.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +11 -4
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +11 -4
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +11 -0
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +11 -0
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/triggers-types.d.mts +0 -8
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +0 -8
- package/resources/triggers-types.d.ts.map +1 -1
- package/src/client.ts +26 -4
- package/src/internal/parse.ts +6 -0
- package/src/resources/auth-configs.ts +24 -5
- package/src/resources/cli/cli.ts +163 -0
- package/src/resources/cli/index.ts +15 -0
- package/src/resources/cli/realtime.ts +72 -0
- package/src/resources/cli.ts +1 -120
- package/src/resources/connected-accounts.ts +13 -4
- package/src/resources/files.ts +43 -130
- package/src/resources/index.ts +2 -1
- package/src/resources/project/config.ts +6 -0
- package/src/resources/tool-router/session.ts +48 -5
- package/src/resources/toolkits.ts +5 -10
- package/src/resources/tools.ts +42 -25
- package/src/resources/trigger-instances/manage.ts +9 -0
- package/src/resources/trigger-instances/trigger-instances.ts +11 -5
- package/src/resources/triggers-types.ts +0 -10
- 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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../internal/headers';
|
|
5
6
|
import { RequestOptions } from '../internal/request-options';
|
|
6
7
|
import { path } from '../internal/utils/path';
|
|
7
8
|
|
|
@@ -54,10 +55,18 @@ export class Tools extends APIResource {
|
|
|
54
55
|
*/
|
|
55
56
|
execute(
|
|
56
57
|
toolSlug: string,
|
|
57
|
-
|
|
58
|
+
params: ToolExecuteParams | null | undefined = {},
|
|
58
59
|
options?: RequestOptions,
|
|
59
60
|
): APIPromise<ToolExecuteResponse> {
|
|
60
|
-
|
|
61
|
+
const { 'x-llm-gateway-headers': xLlmGatewayHeaders, ...body } = params ?? {};
|
|
62
|
+
return this._client.post(path`/api/v3/tools/execute/${toolSlug}`, {
|
|
63
|
+
body,
|
|
64
|
+
...options,
|
|
65
|
+
headers: buildHeaders([
|
|
66
|
+
{ ...(xLlmGatewayHeaders != null ? { 'x-llm-gateway-headers': xLlmGatewayHeaders } : undefined) },
|
|
67
|
+
options?.headers,
|
|
68
|
+
]),
|
|
69
|
+
});
|
|
61
70
|
}
|
|
62
71
|
|
|
63
72
|
/**
|
|
@@ -161,11 +170,6 @@ export interface ToolRetrieveResponse {
|
|
|
161
170
|
*/
|
|
162
171
|
slug: string;
|
|
163
172
|
|
|
164
|
-
/**
|
|
165
|
-
* Lifecycle status of the tool
|
|
166
|
-
*/
|
|
167
|
-
status: string;
|
|
168
|
-
|
|
169
173
|
/**
|
|
170
174
|
* List of tags associated with the tool for categorization and filtering
|
|
171
175
|
*/
|
|
@@ -292,11 +296,6 @@ export namespace ToolListResponse {
|
|
|
292
296
|
*/
|
|
293
297
|
slug: string;
|
|
294
298
|
|
|
295
|
-
/**
|
|
296
|
-
* Lifecycle status of the tool
|
|
297
|
-
*/
|
|
298
|
-
status: string;
|
|
299
|
-
|
|
300
299
|
/**
|
|
301
300
|
* List of tags associated with the tool for categorization and filtering
|
|
302
301
|
*/
|
|
@@ -499,13 +498,20 @@ export interface ToolListParams {
|
|
|
499
498
|
*/
|
|
500
499
|
limit?: number | null;
|
|
501
500
|
|
|
501
|
+
/**
|
|
502
|
+
* Full-text search query to filter tools by name, slug, or description. Applied as
|
|
503
|
+
* a soft filter on top of other filters.
|
|
504
|
+
*/
|
|
505
|
+
query?: string;
|
|
506
|
+
|
|
502
507
|
/**
|
|
503
508
|
* Array of scopes to filter tools by)
|
|
504
509
|
*/
|
|
505
510
|
scopes?: Array<string> | null;
|
|
506
511
|
|
|
507
512
|
/**
|
|
508
|
-
* Free-text search query to find tools by name,
|
|
513
|
+
* Deprecated: use "query" instead. Free-text search query to find tools by name,
|
|
514
|
+
* description, or functionality.
|
|
509
515
|
*/
|
|
510
516
|
search?: string;
|
|
511
517
|
|
|
@@ -534,28 +540,31 @@ export interface ToolListParams {
|
|
|
534
540
|
|
|
535
541
|
export interface ToolExecuteParams {
|
|
536
542
|
/**
|
|
537
|
-
* Enable debug tracing for tool execution
|
|
543
|
+
* @deprecated Body param: Deprecated. Enable debug tracing for tool execution
|
|
544
|
+
* (useful for debugging)
|
|
538
545
|
*/
|
|
539
546
|
allow_tracing?: boolean | null;
|
|
540
547
|
|
|
541
548
|
/**
|
|
542
|
-
* Key-value pairs of arguments required by the tool (mutually
|
|
549
|
+
* Body param: Key-value pairs of arguments required by the tool (mutually
|
|
550
|
+
* exclusive with text)
|
|
543
551
|
*/
|
|
544
552
|
arguments?: { [key: string]: unknown };
|
|
545
553
|
|
|
546
554
|
/**
|
|
547
|
-
* Unique identifier for the connected account to use for
|
|
555
|
+
* Body param: Unique identifier for the connected account to use for
|
|
556
|
+
* authentication
|
|
548
557
|
*/
|
|
549
558
|
connected_account_id?: string;
|
|
550
559
|
|
|
551
560
|
/**
|
|
552
|
-
* Custom authentication parameters for tools that support
|
|
553
|
-
* authentication
|
|
561
|
+
* Body param: Custom authentication parameters for tools that support
|
|
562
|
+
* parameterized authentication
|
|
554
563
|
*/
|
|
555
564
|
custom_auth_params?: ToolExecuteParams.CustomAuthParams;
|
|
556
565
|
|
|
557
566
|
/**
|
|
558
|
-
* Custom connection data for tools that support custom connection data
|
|
567
|
+
* Body param: Custom connection data for tools that support custom connection data
|
|
559
568
|
*/
|
|
560
569
|
custom_connection_data?:
|
|
561
570
|
| ToolExecuteParams.UnionMember0
|
|
@@ -570,26 +579,34 @@ export interface ToolExecuteParams {
|
|
|
570
579
|
| ToolExecuteParams.UnionMember9;
|
|
571
580
|
|
|
572
581
|
/**
|
|
573
|
-
* @deprecated Deprecated: please use user_id instead. Entity
|
|
574
|
-
* multi-entity connected accounts (e.g. multiple repositories,
|
|
582
|
+
* @deprecated Body param: Deprecated: please use user_id instead. Entity
|
|
583
|
+
* identifier for multi-entity connected accounts (e.g. multiple repositories,
|
|
584
|
+
* organizations)
|
|
575
585
|
*/
|
|
576
586
|
entity_id?: string;
|
|
577
587
|
|
|
578
588
|
/**
|
|
579
|
-
* Natural language description of the task to perform (mutually
|
|
580
|
-
* arguments)
|
|
589
|
+
* Body param: Natural language description of the task to perform (mutually
|
|
590
|
+
* exclusive with arguments)
|
|
581
591
|
*/
|
|
582
592
|
text?: string;
|
|
583
593
|
|
|
584
594
|
/**
|
|
585
|
-
* User id for multi-user connected accounts (e.g. multiple users,
|
|
595
|
+
* Body param: User id for multi-user connected accounts (e.g. multiple users,
|
|
596
|
+
* organizations)
|
|
586
597
|
*/
|
|
587
598
|
user_id?: string;
|
|
588
599
|
|
|
589
600
|
/**
|
|
590
|
-
* Tool version to execute (defaults to "00000000_00" if not specified)
|
|
601
|
+
* Body param: Tool version to execute (defaults to "00000000_00" if not specified)
|
|
591
602
|
*/
|
|
592
603
|
version?: string;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Header param: JSON object containing custom headers to pass to LLM providers
|
|
607
|
+
* (OpenAI, Bedrock, etc.)
|
|
608
|
+
*/
|
|
609
|
+
'x-llm-gateway-headers'?: string;
|
|
593
610
|
}
|
|
594
611
|
|
|
595
612
|
export namespace ToolExecuteParams {
|
|
@@ -7,6 +7,11 @@ import { path } from '../../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Manage extends APIResource {
|
|
9
9
|
/**
|
|
10
|
+
* Updates the status of a trigger instance to enable or disable it. Disabling a
|
|
11
|
+
* trigger pauses event listening without deleting the trigger configuration.
|
|
12
|
+
* Re-enabling restores the trigger to its active state. Use this for temporary
|
|
13
|
+
* maintenance or to control trigger execution.
|
|
14
|
+
*
|
|
10
15
|
* @example
|
|
11
16
|
* ```ts
|
|
12
17
|
* const manage = await client.triggerInstances.manage.update(
|
|
@@ -24,6 +29,10 @@ export class Manage extends APIResource {
|
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
/**
|
|
32
|
+
* Permanently deletes a trigger instance. This stops the trigger from listening
|
|
33
|
+
* for events and removes it from your project. Use the PATCH endpoint with status
|
|
34
|
+
* "disable" if you want to temporarily pause a trigger instead.
|
|
35
|
+
*
|
|
27
36
|
* @example
|
|
28
37
|
* ```ts
|
|
29
38
|
* const manage = await client.triggerInstances.manage.delete(
|
|
@@ -11,6 +11,11 @@ export class TriggerInstances extends APIResource {
|
|
|
11
11
|
manage: ManageAPI.Manage = new ManageAPI.Manage(this._client);
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
+
* Retrieves all active trigger instances for your project. Triggers listen for
|
|
15
|
+
* events from connected accounts (e.g., new emails, Slack messages, GitHub
|
|
16
|
+
* commits) and can invoke webhooks or workflows. Use filters to find triggers for
|
|
17
|
+
* specific users, connected accounts, or trigger types.
|
|
18
|
+
*
|
|
14
19
|
* @example
|
|
15
20
|
* ```ts
|
|
16
21
|
* const response = await client.triggerInstances.listActive();
|
|
@@ -24,6 +29,12 @@ export class TriggerInstances extends APIResource {
|
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
/**
|
|
32
|
+
* Creates a new trigger instance or updates an existing one with the same
|
|
33
|
+
* configuration. Triggers listen for events from external services (webhooks or
|
|
34
|
+
* polling) and can invoke your workflows. If a matching trigger already exists and
|
|
35
|
+
* is disabled, it will be re-enabled. Requires a connected account ID to associate
|
|
36
|
+
* the trigger with a specific user connection.
|
|
37
|
+
*
|
|
27
38
|
* @example
|
|
28
39
|
* ```ts
|
|
29
40
|
* const response = await client.triggerInstances.upsert(
|
|
@@ -224,11 +235,6 @@ export interface TriggerInstanceListActiveParams {
|
|
|
224
235
|
*/
|
|
225
236
|
limit?: number | null;
|
|
226
237
|
|
|
227
|
-
/**
|
|
228
|
-
* Page number for pagination. Starts from 1.
|
|
229
|
-
*/
|
|
230
|
-
page?: number;
|
|
231
|
-
|
|
232
238
|
/**
|
|
233
239
|
* When set to true, includes disabled triggers in the response.
|
|
234
240
|
*/
|
|
@@ -69,11 +69,6 @@ export interface TriggersTypeRetrieveResponse {
|
|
|
69
69
|
*/
|
|
70
70
|
slug: string;
|
|
71
71
|
|
|
72
|
-
/**
|
|
73
|
-
* Lifecycle status of the trigger
|
|
74
|
-
*/
|
|
75
|
-
status: string;
|
|
76
|
-
|
|
77
72
|
/**
|
|
78
73
|
* Information about the toolkit that provides this trigger
|
|
79
74
|
*/
|
|
@@ -156,11 +151,6 @@ export namespace TriggersTypeListResponse {
|
|
|
156
151
|
*/
|
|
157
152
|
slug: string;
|
|
158
153
|
|
|
159
|
-
/**
|
|
160
|
-
* Lifecycle status of the trigger
|
|
161
|
-
*/
|
|
162
|
-
status: string;
|
|
163
|
-
|
|
164
154
|
/**
|
|
165
155
|
* Information about the toolkit that provides this trigger
|
|
166
156
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.57'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.57";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.57";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '0.1.0-alpha.
|
|
4
|
+
exports.VERSION = '0.1.0-alpha.57'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.57'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|