@composio/client 0.1.0-alpha.56 → 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.
Files changed (128) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/client.d.mts +3 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +16 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +16 -3
  9. package/client.mjs.map +1 -1
  10. package/internal/parse.d.mts.map +1 -1
  11. package/internal/parse.d.ts.map +1 -1
  12. package/internal/parse.js +5 -0
  13. package/internal/parse.js.map +1 -1
  14. package/internal/parse.mjs +5 -0
  15. package/internal/parse.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/auth-configs.d.mts +19 -5
  18. package/resources/auth-configs.d.mts.map +1 -1
  19. package/resources/auth-configs.d.ts +19 -5
  20. package/resources/auth-configs.d.ts.map +1 -1
  21. package/resources/auth-configs.js +8 -2
  22. package/resources/auth-configs.js.map +1 -1
  23. package/resources/auth-configs.mjs +8 -2
  24. package/resources/auth-configs.mjs.map +1 -1
  25. package/resources/cli/cli.d.mts +120 -0
  26. package/resources/cli/cli.d.mts.map +1 -0
  27. package/resources/cli/cli.d.ts +120 -0
  28. package/resources/cli/cli.d.ts.map +1 -0
  29. package/resources/cli/cli.js +36 -0
  30. package/resources/cli/cli.js.map +1 -0
  31. package/resources/cli/cli.mjs +31 -0
  32. package/resources/cli/cli.mjs.map +1 -0
  33. package/resources/cli/index.d.mts +3 -0
  34. package/resources/cli/index.d.mts.map +1 -0
  35. package/resources/cli/index.d.ts +3 -0
  36. package/resources/cli/index.d.ts.map +1 -0
  37. package/resources/cli/index.js +9 -0
  38. package/resources/cli/index.js.map +1 -0
  39. package/resources/cli/index.mjs +4 -0
  40. package/resources/cli/index.mjs.map +1 -0
  41. package/resources/cli/realtime.d.mts +53 -0
  42. package/resources/cli/realtime.d.mts.map +1 -0
  43. package/resources/cli/realtime.d.ts +53 -0
  44. package/resources/cli/realtime.d.ts.map +1 -0
  45. package/resources/cli/realtime.js +22 -0
  46. package/resources/cli/realtime.js.map +1 -0
  47. package/resources/cli/realtime.mjs +18 -0
  48. package/resources/cli/realtime.mjs.map +1 -0
  49. package/resources/cli.d.mts +1 -95
  50. package/resources/cli.d.mts.map +1 -1
  51. package/resources/cli.d.ts +1 -95
  52. package/resources/cli.d.ts.map +1 -1
  53. package/resources/cli.js +2 -23
  54. package/resources/cli.js.map +1 -1
  55. package/resources/cli.mjs +1 -21
  56. package/resources/cli.mjs.map +1 -1
  57. package/resources/connected-accounts.d.mts +11 -4
  58. package/resources/connected-accounts.d.mts.map +1 -1
  59. package/resources/connected-accounts.d.ts +11 -4
  60. package/resources/connected-accounts.d.ts.map +1 -1
  61. package/resources/connected-accounts.js +9 -2
  62. package/resources/connected-accounts.js.map +1 -1
  63. package/resources/connected-accounts.mjs +9 -2
  64. package/resources/connected-accounts.mjs.map +1 -1
  65. package/resources/index.d.mts +1 -1
  66. package/resources/index.d.mts.map +1 -1
  67. package/resources/index.d.ts +1 -1
  68. package/resources/index.d.ts.map +1 -1
  69. package/resources/index.js +1 -1
  70. package/resources/index.js.map +1 -1
  71. package/resources/index.mjs +1 -1
  72. package/resources/index.mjs.map +1 -1
  73. package/resources/tool-router/session.d.mts +0 -4
  74. package/resources/tool-router/session.d.mts.map +1 -1
  75. package/resources/tool-router/session.d.ts +0 -4
  76. package/resources/tool-router/session.d.ts.map +1 -1
  77. package/resources/toolkits.d.mts +0 -8
  78. package/resources/toolkits.d.mts.map +1 -1
  79. package/resources/toolkits.d.ts +0 -8
  80. package/resources/toolkits.d.ts.map +1 -1
  81. package/resources/tools.d.mts +30 -22
  82. package/resources/tools.d.mts.map +1 -1
  83. package/resources/tools.d.ts +30 -22
  84. package/resources/tools.d.ts.map +1 -1
  85. package/resources/tools.js +11 -2
  86. package/resources/tools.js.map +1 -1
  87. package/resources/tools.mjs +11 -2
  88. package/resources/tools.mjs.map +1 -1
  89. package/resources/trigger-instances/manage.d.mts +9 -0
  90. package/resources/trigger-instances/manage.d.mts.map +1 -1
  91. package/resources/trigger-instances/manage.d.ts +9 -0
  92. package/resources/trigger-instances/manage.d.ts.map +1 -1
  93. package/resources/trigger-instances/manage.js +9 -0
  94. package/resources/trigger-instances/manage.js.map +1 -1
  95. package/resources/trigger-instances/manage.mjs +9 -0
  96. package/resources/trigger-instances/manage.mjs.map +1 -1
  97. package/resources/trigger-instances/trigger-instances.d.mts +11 -0
  98. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  99. package/resources/trigger-instances/trigger-instances.d.ts +11 -0
  100. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  101. package/resources/trigger-instances/trigger-instances.js +11 -0
  102. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  103. package/resources/trigger-instances/trigger-instances.mjs +11 -0
  104. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  105. package/resources/triggers-types.d.mts +0 -8
  106. package/resources/triggers-types.d.mts.map +1 -1
  107. package/resources/triggers-types.d.ts +0 -8
  108. package/resources/triggers-types.d.ts.map +1 -1
  109. package/src/client.ts +26 -4
  110. package/src/internal/parse.ts +6 -0
  111. package/src/resources/auth-configs.ts +24 -5
  112. package/src/resources/cli/cli.ts +163 -0
  113. package/src/resources/cli/index.ts +15 -0
  114. package/src/resources/cli/realtime.ts +72 -0
  115. package/src/resources/cli.ts +1 -120
  116. package/src/resources/connected-accounts.ts +13 -4
  117. package/src/resources/index.ts +2 -1
  118. package/src/resources/tool-router/session.ts +0 -5
  119. package/src/resources/toolkits.ts +0 -10
  120. package/src/resources/tools.ts +42 -25
  121. package/src/resources/trigger-instances/manage.ts +9 -0
  122. package/src/resources/trigger-instances/trigger-instances.ts +11 -0
  123. package/src/resources/triggers-types.ts +0 -10
  124. package/src/version.ts +1 -1
  125. package/version.d.mts +1 -1
  126. package/version.d.ts +1 -1
  127. package/version.js +1 -1
  128. package/version.mjs +1 -1
@@ -1,122 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { RequestOptions } from '../internal/request-options';
6
-
7
- export class Cli extends APIResource {
8
- /**
9
- * Generates a new CLI session with a random 6-character code. This endpoint is the
10
- * first step in the CLI authentication flow, creating a session that can later be
11
- * linked to a user account. The generated code is displayed to the user in the CLI
12
- * and should be entered in the web interface to complete authentication.
13
- */
14
- createSession(options?: RequestOptions): APIPromise<CliCreateSessionResponse> {
15
- return this._client.post('/api/v3/cli/create-session', options);
16
- }
17
-
18
- /**
19
- * Retrieves the current state of a CLI session using either the session ID (UUID)
20
- * or the 6-character code. This endpoint is used by both the CLI client to check
21
- * if the session has been linked, and by the web interface to display session
22
- * details before linking.
23
- */
24
- getSession(query: CliGetSessionParams, options?: RequestOptions): APIPromise<CliGetSessionResponse> {
25
- return this._client.get('/api/v3/cli/get-session', { query, ...options });
26
- }
27
- }
28
-
29
- export interface CliCreateSessionResponse {
30
- /**
31
- * Unique identifier for the CLI session. UUID v4 format used for tracking and
32
- * retrieval.
33
- */
34
- id: string;
35
-
36
- /**
37
- * The 6-character hexadecimal code used for CLI login
38
- */
39
- code: string;
40
-
41
- /**
42
- * The ISO timestamp when the session expires
43
- */
44
- expiresAt: string;
45
-
46
- /**
47
- * The current status of the session
48
- */
49
- status: 'pending' | 'linked';
50
- }
51
-
52
- export interface CliGetSessionResponse {
53
- /**
54
- * The unique identifier for the CLI session
55
- */
56
- id: string;
57
-
58
- /**
59
- * Information about the linked account, if any. Null if the session status is
60
- * "pending".
61
- */
62
- account: CliGetSessionResponse.Account | null;
63
-
64
- /**
65
- * The API key for the linked account
66
- */
67
- api_key: string | null;
68
-
69
- /**
70
- * The 6-character hexadecimal code used for CLI login
71
- */
72
- code: string;
73
-
74
- /**
75
- * The ISO timestamp when the session expires
76
- */
77
- expiresAt: string;
78
-
79
- /**
80
- * The current status of the session
81
- */
82
- status: 'pending' | 'linked';
83
- }
84
-
85
- export namespace CliGetSessionResponse {
86
- /**
87
- * Information about the linked account, if any. Null if the session status is
88
- * "pending".
89
- */
90
- export interface Account {
91
- /**
92
- * The ID of the linked account
93
- */
94
- id: string;
95
-
96
- /**
97
- * The email address of the linked account
98
- */
99
- email: string;
100
-
101
- /**
102
- * The display name of the linked account
103
- */
104
- name: string;
105
- }
106
- }
107
-
108
- export interface CliGetSessionParams {
109
- /**
110
- * CLI session ID (UUID format) or 6-character code to check. Both formats are
111
- * supported for flexibility in client implementations.
112
- */
113
- id: string;
114
- }
115
-
116
- export declare namespace Cli {
117
- export {
118
- type CliCreateSessionResponse as CliCreateSessionResponse,
119
- type CliGetSessionResponse as CliGetSessionResponse,
120
- type CliGetSessionParams as CliGetSessionParams,
121
- };
122
- }
3
+ export * from './cli/index';
@@ -7,7 +7,11 @@ import { path } from '../internal/utils/path';
7
7
 
8
8
  export class ConnectedAccounts extends APIResource {
9
9
  /**
10
- * Create a new connected account
10
+ * Initiates a new connection to an external service for a user. For OAuth-based
11
+ * toolkits, this returns a redirect URL to complete authentication. For API
12
+ * key-based toolkits, provide the credentials directly in the request body. Use
13
+ * the `user_id` field to associate the connection with a specific user in your
14
+ * system.
11
15
  *
12
16
  * @example
13
17
  * ```ts
@@ -42,7 +46,10 @@ export class ConnectedAccounts extends APIResource {
42
46
  }
43
47
 
44
48
  /**
45
- * List connected accounts with optional filters
49
+ * Retrieves all connected accounts for your project. Connected accounts represent
50
+ * authenticated user connections to external services (e.g., a user's Gmail
51
+ * account, Slack workspace). Filter by toolkit, status, user ID, or auth config to
52
+ * find specific connections.
46
53
  *
47
54
  * @example
48
55
  * ```ts
@@ -4280,7 +4287,8 @@ export namespace ConnectedAccountRetrieveResponse {
4280
4287
  | 'CALCOM_AUTH'
4281
4288
  | 'SERVICE_ACCOUNT'
4282
4289
  | 'SAML'
4283
- | 'DCR_OAUTH';
4290
+ | 'DCR_OAUTH'
4291
+ | 'S2S_OAUTH2';
4284
4292
 
4285
4293
  /**
4286
4294
  * Whether the auth config is managed by Composio
@@ -8436,7 +8444,8 @@ export namespace ConnectedAccountListResponse {
8436
8444
  | 'CALCOM_AUTH'
8437
8445
  | 'SERVICE_ACCOUNT'
8438
8446
  | 'SAML'
8439
- | 'DCR_OAUTH';
8447
+ | 'DCR_OAUTH'
8448
+ | 'S2S_OAUTH2';
8440
8449
 
8441
8450
  /**
8442
8451
  * Whether the auth config is managed by Composio
@@ -17,8 +17,9 @@ export {
17
17
  Cli,
18
18
  type CliCreateSessionResponse,
19
19
  type CliGetSessionResponse,
20
+ type CliCreateSessionParams,
20
21
  type CliGetSessionParams,
21
- } from './cli';
22
+ } from './cli/cli';
22
23
  export {
23
24
  ConnectedAccounts,
24
25
  type ConnectedAccountCreateResponse,
@@ -731,11 +731,6 @@ export namespace SessionToolsResponse {
731
731
  */
732
732
  slug: string;
733
733
 
734
- /**
735
- * Lifecycle status of the tool
736
- */
737
- status: string;
738
-
739
734
  /**
740
735
  * List of tags associated with the tool for categorization and filtering
741
736
  */
@@ -78,11 +78,6 @@ export interface ToolkitRetrieveResponse {
78
78
  */
79
79
  slug: string;
80
80
 
81
- /**
82
- * Lifecycle status of the toolkit
83
- */
84
- status: string;
85
-
86
81
  /**
87
82
  * Complete authentication configuration details for each supported auth method
88
83
  */
@@ -392,11 +387,6 @@ export namespace ToolkitListResponse {
392
387
  */
393
388
  slug: string;
394
389
 
395
- /**
396
- * Lifecycle status of the toolkit
397
- */
398
- status: string;
399
-
400
390
  /**
401
391
  * List of authentication methods supported by this toolkit
402
392
  */
@@ -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
- body: ToolExecuteParams | null | undefined = {},
58
+ params: ToolExecuteParams | null | undefined = {},
58
59
  options?: RequestOptions,
59
60
  ): APIPromise<ToolExecuteResponse> {
60
- return this._client.post(path`/api/v3/tools/execute/${toolSlug}`, { body, ...options });
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, description, or functionality
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 (useful for debugging)
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 exclusive with text)
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 authentication
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 parameterized
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 identifier for
574
- * multi-entity connected accounts (e.g. multiple repositories, organizations)
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 exclusive with
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, organizations)
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(
@@ -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.56'; // x-release-please-version
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.56";
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.56";
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.56'; // x-release-please-version
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.56'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.57'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map