@composio/client 0.1.0-alpha.32 → 0.1.0-alpha.34

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 (94) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/auth-configs.d.mts +20 -14
  12. package/resources/auth-configs.d.mts.map +1 -1
  13. package/resources/auth-configs.d.ts +20 -14
  14. package/resources/auth-configs.d.ts.map +1 -1
  15. package/resources/auth-configs.js +1 -1
  16. package/resources/auth-configs.mjs +1 -1
  17. package/resources/connected-accounts.d.mts +1423 -623
  18. package/resources/connected-accounts.d.mts.map +1 -1
  19. package/resources/connected-accounts.d.ts +1423 -623
  20. package/resources/connected-accounts.d.ts.map +1 -1
  21. package/resources/index.d.mts +3 -2
  22. package/resources/index.d.mts.map +1 -1
  23. package/resources/index.d.ts +3 -2
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js +3 -1
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs +1 -0
  28. package/resources/index.mjs.map +1 -1
  29. package/resources/link.d.mts +94 -0
  30. package/resources/link.d.mts.map +1 -0
  31. package/resources/link.d.ts +94 -0
  32. package/resources/link.d.ts.map +1 -0
  33. package/resources/link.js +22 -0
  34. package/resources/link.js.map +1 -0
  35. package/resources/link.mjs +18 -0
  36. package/resources/link.mjs.map +1 -0
  37. package/resources/mcp/mcp.d.mts +4 -0
  38. package/resources/mcp/mcp.d.mts.map +1 -1
  39. package/resources/mcp/mcp.d.ts +4 -0
  40. package/resources/mcp/mcp.d.ts.map +1 -1
  41. package/resources/mcp/mcp.js.map +1 -1
  42. package/resources/mcp/mcp.mjs.map +1 -1
  43. package/resources/org/project/api-keys.d.mts +1 -45
  44. package/resources/org/project/api-keys.d.mts.map +1 -1
  45. package/resources/org/project/api-keys.d.ts +1 -45
  46. package/resources/org/project/api-keys.d.ts.map +1 -1
  47. package/resources/org/project/api-keys.js +0 -18
  48. package/resources/org/project/api-keys.js.map +1 -1
  49. package/resources/org/project/api-keys.mjs +0 -18
  50. package/resources/org/project/api-keys.mjs.map +1 -1
  51. package/resources/org/project/index.d.mts +1 -1
  52. package/resources/org/project/index.d.mts.map +1 -1
  53. package/resources/org/project/index.d.ts +1 -1
  54. package/resources/org/project/index.d.ts.map +1 -1
  55. package/resources/org/project/index.js.map +1 -1
  56. package/resources/org/project/index.mjs.map +1 -1
  57. package/resources/org/project/project.d.mts +2 -2
  58. package/resources/org/project/project.d.mts.map +1 -1
  59. package/resources/org/project/project.d.ts +2 -2
  60. package/resources/org/project/project.d.ts.map +1 -1
  61. package/resources/org/project/project.js.map +1 -1
  62. package/resources/org/project/project.mjs.map +1 -1
  63. package/resources/tools.d.mts +14 -2
  64. package/resources/tools.d.mts.map +1 -1
  65. package/resources/tools.d.ts +14 -2
  66. package/resources/tools.d.ts.map +1 -1
  67. package/resources/tools.js +2 -2
  68. package/resources/tools.js.map +1 -1
  69. package/resources/tools.mjs +2 -2
  70. package/resources/tools.mjs.map +1 -1
  71. package/resources/triggers-types.d.mts +14 -2
  72. package/resources/triggers-types.d.mts.map +1 -1
  73. package/resources/triggers-types.d.ts +14 -2
  74. package/resources/triggers-types.d.ts.map +1 -1
  75. package/resources/triggers-types.js +2 -2
  76. package/resources/triggers-types.js.map +1 -1
  77. package/resources/triggers-types.mjs +2 -2
  78. package/resources/triggers-types.mjs.map +1 -1
  79. package/src/client.ts +14 -0
  80. package/src/resources/auth-configs.ts +24 -9
  81. package/src/resources/connected-accounts.ts +3361 -1749
  82. package/src/resources/index.ts +8 -0
  83. package/src/resources/link.ts +143 -0
  84. package/src/resources/mcp/mcp.ts +5 -0
  85. package/src/resources/org/project/api-keys.ts +0 -53
  86. package/src/resources/org/project/index.ts +0 -1
  87. package/src/resources/org/project/project.ts +0 -2
  88. package/src/resources/tools.ts +19 -2
  89. package/src/resources/triggers-types.ts +19 -2
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.ts +1 -1
  93. package/version.js +1 -1
  94. package/version.mjs +1 -1
@@ -41,6 +41,12 @@ export {
41
41
  type FileListParams,
42
42
  type FileCreatePresignedURLParams,
43
43
  } from './files';
44
+ export {
45
+ Link,
46
+ type LinkRetrieveResponse,
47
+ type LinkSubmitInputResponse,
48
+ type LinkSubmitInputParams,
49
+ } from './link';
44
50
  export {
45
51
  Mcp,
46
52
  type McpCreateResponse,
@@ -85,6 +91,7 @@ export {
85
91
  type ToolGetInputResponse,
86
92
  type ToolProxyResponse,
87
93
  type ToolRetrieveEnumResponse,
94
+ type ToolRetrieveParams,
88
95
  type ToolListParams,
89
96
  type ToolExecuteParams,
90
97
  type ToolGetInputParams,
@@ -102,5 +109,6 @@ export {
102
109
  type TriggersTypeRetrieveResponse,
103
110
  type TriggersTypeListResponse,
104
111
  type TriggersTypeRetrieveEnumResponse,
112
+ type TriggersTypeRetrieveParams,
105
113
  type TriggersTypeListParams,
106
114
  } from './triggers-types';
@@ -0,0 +1,143 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ export class Link extends APIResource {
9
+ /**
10
+ * Retrieves information about an authentication session using the link token
11
+ */
12
+ retrieve(token: string, options?: RequestOptions): APIPromise<LinkRetrieveResponse> {
13
+ return this._client.get(path`/api/v3/internal/connected_accounts/link/${token}`, options);
14
+ }
15
+
16
+ /**
17
+ * Submits authentication input for a link session
18
+ */
19
+ submitInput(
20
+ token: string,
21
+ body: LinkSubmitInputParams,
22
+ options?: RequestOptions,
23
+ ): APIPromise<LinkSubmitInputResponse> {
24
+ return this._client.post(path`/api/v3/internal/connected_accounts/link/${token}`, { body, ...options });
25
+ }
26
+ }
27
+
28
+ export interface LinkRetrieveResponse {
29
+ connected_account: LinkRetrieveResponse.ConnectedAccount;
30
+
31
+ project: LinkRetrieveResponse.Project;
32
+
33
+ toolkit: LinkRetrieveResponse.Toolkit;
34
+ }
35
+
36
+ export namespace LinkRetrieveResponse {
37
+ export interface ConnectedAccount {
38
+ /**
39
+ * The connected account ID
40
+ */
41
+ id: string;
42
+
43
+ mode:
44
+ | 'OAUTH2'
45
+ | 'OAUTH1'
46
+ | 'API_KEY'
47
+ | 'BASIC'
48
+ | 'BILLCOM_AUTH'
49
+ | 'BEARER_TOKEN'
50
+ | 'GOOGLE_SERVICE_ACCOUNT'
51
+ | 'NO_AUTH'
52
+ | 'BASIC_WITH_JWT'
53
+ | 'CALCOM_AUTH';
54
+
55
+ status: 'INITIATED' | 'ACTIVE' | 'FAILED';
56
+
57
+ /**
58
+ * The user callback URL if applicable. If active, redirect to this URL
59
+ */
60
+ callback_url?: string;
61
+
62
+ expected_input_fields?: Array<ConnectedAccount.ExpectedInputField>;
63
+
64
+ /**
65
+ * The OAuth provider redirect URL if applicable. If active, redirect to this URL
66
+ */
67
+ redirect_url?: string;
68
+ }
69
+
70
+ export namespace ConnectedAccount {
71
+ export interface ExpectedInputField {
72
+ displayName: string;
73
+
74
+ name: string;
75
+
76
+ required: boolean;
77
+
78
+ type: string;
79
+
80
+ default?: string | null;
81
+
82
+ description?: string;
83
+
84
+ legacy_template_name?: string;
85
+ }
86
+ }
87
+
88
+ export interface Project {
89
+ /**
90
+ * The project logo URL
91
+ */
92
+ logo?: string;
93
+
94
+ /**
95
+ * The project name
96
+ */
97
+ name?: string;
98
+ }
99
+
100
+ export interface Toolkit {
101
+ /**
102
+ * The toolkit logo
103
+ */
104
+ logo: string;
105
+
106
+ /**
107
+ * The toolkit display name
108
+ */
109
+ name: string;
110
+
111
+ /**
112
+ * The toolkit slug
113
+ */
114
+ slug: string;
115
+ }
116
+ }
117
+
118
+ export interface LinkSubmitInputResponse {
119
+ /**
120
+ * The status of the connection attempt
121
+ */
122
+ status: 'ACTIVE' | 'FAILED';
123
+
124
+ /**
125
+ * The user callback URL if applicable
126
+ */
127
+ user_callback_url?: string;
128
+ }
129
+
130
+ export interface LinkSubmitInputParams {
131
+ /**
132
+ * The input fields for authentication
133
+ */
134
+ input: { [key: string]: unknown };
135
+ }
136
+
137
+ export declare namespace Link {
138
+ export {
139
+ type LinkRetrieveResponse as LinkRetrieveResponse,
140
+ type LinkSubmitInputResponse as LinkSubmitInputResponse,
141
+ type LinkSubmitInputParams as LinkSubmitInputParams,
142
+ };
143
+ }
@@ -772,6 +772,11 @@ export interface McpCreateParams {
772
772
  * Whether the MCP server is managed by Composio
773
773
  */
774
774
  managed_auth_via_composio?: boolean;
775
+
776
+ /**
777
+ * List of NO_AUTH apps to enable for this MCP server
778
+ */
779
+ no_auth_apps?: Array<string>;
775
780
  }
776
781
 
777
782
  export interface McpUpdateParams {
@@ -64,25 +64,6 @@ export class APIKeys extends APIResource {
64
64
  const { projectId } = params;
65
65
  return this._client.delete(path`/api/v3/org/project/${projectId}/api_keys/remove/${id}`, options);
66
66
  }
67
-
68
- /**
69
- * Retrieves an existing API key for the project or creates a new one if none
70
- * exists. This endpoint is useful for ensuring a project always has at least one
71
- * API key without the risk of creating duplicates. If an API key already exists,
72
- * it returns the existing key. If no API keys exist for the project, it creates a
73
- * new one with an automatically generated name.
74
- *
75
- * @example
76
- * ```ts
77
- * const response =
78
- * await client.org.project.apiKeys.createAPIKey(
79
- * 'proj_abc123xyz456',
80
- * );
81
- * ```
82
- */
83
- createAPIKey(projectID: string, options?: RequestOptions): APIPromise<APIKeyCreateAPIKeyResponse> {
84
- return this._client.post(path`/api/v3/org/project/${projectID}/api_keys/create-api-key`, options);
85
- }
86
67
  }
87
68
 
88
69
  /**
@@ -173,39 +154,6 @@ export interface APIKeyDeleteResponse {
173
154
  success: boolean;
174
155
  }
175
156
 
176
- /**
177
- * API key object containing the key details
178
- */
179
- export interface APIKeyCreateAPIKeyResponse {
180
- /**
181
- * Database record identifier for the API key
182
- */
183
- id: string;
184
-
185
- /**
186
- * UTC timestamp indicating when the API key was created
187
- */
188
- created_at: string;
189
-
190
- /**
191
- * The API key string value that should be included in API requests. This value is
192
- * only shown once.
193
- */
194
- key: string;
195
-
196
- /**
197
- * Name assigned to help identify the key's purpose. For auto-generated keys, this
198
- * will be a random name.
199
- */
200
- name: string;
201
-
202
- /**
203
- * UTC timestamp indicating when the API key was last used for authentication. Will
204
- * be null for newly created keys.
205
- */
206
- last_used_at?: string;
207
- }
208
-
209
157
  export interface APIKeyCreateParams {
210
158
  /**
211
159
  * A user-friendly name to identify the API key's purpose (e.g., "Production
@@ -226,7 +174,6 @@ export declare namespace APIKeys {
226
174
  type APIKeyCreateResponse as APIKeyCreateResponse,
227
175
  type APIKeyListResponse as APIKeyListResponse,
228
176
  type APIKeyDeleteResponse as APIKeyDeleteResponse,
229
- type APIKeyCreateAPIKeyResponse as APIKeyCreateAPIKeyResponse,
230
177
  type APIKeyCreateParams as APIKeyCreateParams,
231
178
  type APIKeyDeleteParams as APIKeyDeleteParams,
232
179
  };
@@ -5,7 +5,6 @@ export {
5
5
  type APIKeyCreateResponse,
6
6
  type APIKeyListResponse,
7
7
  type APIKeyDeleteResponse,
8
- type APIKeyCreateAPIKeyResponse,
9
8
  type APIKeyCreateParams,
10
9
  type APIKeyDeleteParams,
11
10
  } from './api-keys';
@@ -3,7 +3,6 @@
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as APIKeysAPI from './api-keys';
5
5
  import {
6
- APIKeyCreateAPIKeyResponse,
7
6
  APIKeyCreateParams,
8
7
  APIKeyCreateResponse,
9
8
  APIKeyDeleteParams,
@@ -358,7 +357,6 @@ export declare namespace Project {
358
357
  type APIKeyCreateResponse as APIKeyCreateResponse,
359
358
  type APIKeyListResponse as APIKeyListResponse,
360
359
  type APIKeyDeleteResponse as APIKeyDeleteResponse,
361
- type APIKeyCreateAPIKeyResponse as APIKeyCreateAPIKeyResponse,
362
360
  type APIKeyCreateParams as APIKeyCreateParams,
363
361
  type APIKeyDeleteParams as APIKeyDeleteParams,
364
362
  };
@@ -16,8 +16,12 @@ export class Tools extends APIResource {
16
16
  * const tool = await client.tools.retrieve('tool_slug');
17
17
  * ```
18
18
  */
19
- retrieve(toolSlug: string, options?: RequestOptions): APIPromise<ToolRetrieveResponse> {
20
- return this._client.get(path`/api/v3/tools/${toolSlug}`, options);
19
+ retrieve(
20
+ toolSlug: string,
21
+ query: ToolRetrieveParams | null | undefined = {},
22
+ options?: RequestOptions,
23
+ ): APIPromise<ToolRetrieveResponse> {
24
+ return this._client.get(path`/api/v3/tools/${toolSlug}`, { query, ...options });
21
25
  }
22
26
 
23
27
  /**
@@ -401,6 +405,13 @@ export interface ToolProxyResponse {
401
405
  */
402
406
  export type ToolRetrieveEnumResponse = Array<string>;
403
407
 
408
+ export interface ToolRetrieveParams {
409
+ /**
410
+ * Optional version of the tool to retrieve
411
+ */
412
+ version?: string;
413
+ }
414
+
404
415
  export interface ToolListParams {
405
416
  /**
406
417
  * Filter tools by auth config id
@@ -455,6 +466,11 @@ export interface ToolListParams {
455
466
  * The slug of the toolkit to filter by
456
467
  */
457
468
  toolkit_slug?: string;
469
+
470
+ /**
471
+ * Can be omitted, null, a string, or an object mapping toolkit names to versions
472
+ */
473
+ toolkit_versions?: string | { [key: string]: string };
458
474
  }
459
475
 
460
476
  export interface ToolExecuteParams {
@@ -1592,6 +1608,7 @@ export declare namespace Tools {
1592
1608
  type ToolGetInputResponse as ToolGetInputResponse,
1593
1609
  type ToolProxyResponse as ToolProxyResponse,
1594
1610
  type ToolRetrieveEnumResponse as ToolRetrieveEnumResponse,
1611
+ type ToolRetrieveParams as ToolRetrieveParams,
1595
1612
  type ToolListParams as ToolListParams,
1596
1613
  type ToolExecuteParams as ToolExecuteParams,
1597
1614
  type ToolGetInputParams as ToolGetInputParams,
@@ -10,8 +10,12 @@ export class TriggersTypes extends APIResource {
10
10
  * Retrieve detailed information about a specific trigger type using its slug
11
11
  * identifier
12
12
  */
13
- retrieve(slug: string, options?: RequestOptions): APIPromise<TriggersTypeRetrieveResponse> {
14
- return this._client.get(path`/api/v3/triggers_types/${slug}`, options);
13
+ retrieve(
14
+ slug: string,
15
+ query: TriggersTypeRetrieveParams | null | undefined = {},
16
+ options?: RequestOptions,
17
+ ): APIPromise<TriggersTypeRetrieveResponse> {
18
+ return this._client.get(path`/api/v3/triggers_types/${slug}`, { query, ...options });
15
19
  }
16
20
 
17
21
  /**
@@ -181,6 +185,13 @@ export namespace TriggersTypeListResponse {
181
185
  */
182
186
  export type TriggersTypeRetrieveEnumResponse = Array<string>;
183
187
 
188
+ export interface TriggersTypeRetrieveParams {
189
+ /**
190
+ * Optional version of the trigger type to retrieve
191
+ */
192
+ version?: string;
193
+ }
194
+
184
195
  export interface TriggersTypeListParams {
185
196
  /**
186
197
  * Cursor for pagination. The cursor is a base64 encoded string of the page and
@@ -199,6 +210,11 @@ export interface TriggersTypeListParams {
199
210
  * Array of toolkit slugs to filter triggers by
200
211
  */
201
212
  toolkit_slugs?: Array<string> | null;
213
+
214
+ /**
215
+ * Can be omitted, null, a string, or an object mapping toolkit names to versions
216
+ */
217
+ toolkit_versions?: string | { [key: string]: string };
202
218
  }
203
219
 
204
220
  export declare namespace TriggersTypes {
@@ -206,6 +222,7 @@ export declare namespace TriggersTypes {
206
222
  type TriggersTypeRetrieveResponse as TriggersTypeRetrieveResponse,
207
223
  type TriggersTypeListResponse as TriggersTypeListResponse,
208
224
  type TriggersTypeRetrieveEnumResponse as TriggersTypeRetrieveEnumResponse,
225
+ type TriggersTypeRetrieveParams as TriggersTypeRetrieveParams,
209
226
  type TriggersTypeListParams as TriggersTypeListParams,
210
227
  };
211
228
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.32'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.34'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.32";
1
+ export declare const VERSION = "0.1.0-alpha.34";
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.32";
1
+ export declare const VERSION = "0.1.0-alpha.34";
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.32'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.34'; // 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.32'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.34'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map