@composio/client 0.1.0-alpha.10 → 0.1.0-alpha.12

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 (185) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +7 -7
  3. package/client.d.mts +6 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/auth-configs.d.mts +168 -29
  11. package/resources/auth-configs.d.mts.map +1 -1
  12. package/resources/auth-configs.d.ts +168 -29
  13. package/resources/auth-configs.d.ts.map +1 -1
  14. package/resources/auth-configs.js +50 -4
  15. package/resources/auth-configs.js.map +1 -1
  16. package/resources/auth-configs.mjs +50 -4
  17. package/resources/auth-configs.mjs.map +1 -1
  18. package/resources/connected-accounts.d.mts +80 -17
  19. package/resources/connected-accounts.d.mts.map +1 -1
  20. package/resources/connected-accounts.d.ts +80 -17
  21. package/resources/connected-accounts.d.ts.map +1 -1
  22. package/resources/connected-accounts.js +56 -4
  23. package/resources/connected-accounts.js.map +1 -1
  24. package/resources/connected-accounts.mjs +56 -4
  25. package/resources/connected-accounts.mjs.map +1 -1
  26. package/resources/files.d.mts +72 -23
  27. package/resources/files.d.mts.map +1 -1
  28. package/resources/files.d.ts +72 -23
  29. package/resources/files.d.ts.map +1 -1
  30. package/resources/files.js +20 -2
  31. package/resources/files.js.map +1 -1
  32. package/resources/files.mjs +20 -2
  33. package/resources/files.mjs.map +1 -1
  34. package/resources/index.d.mts +3 -3
  35. package/resources/index.d.mts.map +1 -1
  36. package/resources/index.d.ts +3 -3
  37. package/resources/index.d.ts.map +1 -1
  38. package/resources/index.js.map +1 -1
  39. package/resources/index.mjs.map +1 -1
  40. package/resources/mcp/custom.d.mts +87 -0
  41. package/resources/mcp/custom.d.mts.map +1 -0
  42. package/resources/mcp/custom.d.ts +87 -0
  43. package/resources/mcp/custom.d.ts.map +1 -0
  44. package/resources/mcp/custom.js +26 -0
  45. package/resources/mcp/custom.js.map +1 -0
  46. package/resources/mcp/custom.mjs +22 -0
  47. package/resources/mcp/custom.mjs.map +1 -0
  48. package/resources/mcp/index.d.mts +2 -2
  49. package/resources/mcp/index.d.mts.map +1 -1
  50. package/resources/mcp/index.d.ts +2 -2
  51. package/resources/mcp/index.d.ts.map +1 -1
  52. package/resources/mcp/index.js +3 -3
  53. package/resources/mcp/index.js.map +1 -1
  54. package/resources/mcp/index.mjs +1 -1
  55. package/resources/mcp/index.mjs.map +1 -1
  56. package/resources/mcp/mcp.d.mts +322 -217
  57. package/resources/mcp/mcp.d.mts.map +1 -1
  58. package/resources/mcp/mcp.d.ts +322 -217
  59. package/resources/mcp/mcp.d.ts.map +1 -1
  60. package/resources/mcp/mcp.js +72 -25
  61. package/resources/mcp/mcp.js.map +1 -1
  62. package/resources/mcp/mcp.mjs +72 -25
  63. package/resources/mcp/mcp.mjs.map +1 -1
  64. package/resources/migration.d.mts +11 -2
  65. package/resources/migration.d.mts.map +1 -1
  66. package/resources/migration.d.ts +11 -2
  67. package/resources/migration.d.ts.map +1 -1
  68. package/resources/migration.js +3 -1
  69. package/resources/migration.js.map +1 -1
  70. package/resources/migration.mjs +3 -1
  71. package/resources/migration.mjs.map +1 -1
  72. package/resources/org/api-key.d.mts +23 -2
  73. package/resources/org/api-key.d.mts.map +1 -1
  74. package/resources/org/api-key.d.ts +23 -2
  75. package/resources/org/api-key.d.ts.map +1 -1
  76. package/resources/org/api-key.js +15 -2
  77. package/resources/org/api-key.js.map +1 -1
  78. package/resources/org/api-key.mjs +15 -2
  79. package/resources/org/api-key.mjs.map +1 -1
  80. package/resources/org/project/api-keys.d.mts +114 -22
  81. package/resources/org/project/api-keys.d.mts.map +1 -1
  82. package/resources/org/project/api-keys.d.ts +114 -22
  83. package/resources/org/project/api-keys.d.ts.map +1 -1
  84. package/resources/org/project/api-keys.js +57 -0
  85. package/resources/org/project/api-keys.js.map +1 -1
  86. package/resources/org/project/api-keys.mjs +57 -0
  87. package/resources/org/project/api-keys.mjs.map +1 -1
  88. package/resources/org/project/project.d.mts +176 -4
  89. package/resources/org/project/project.d.mts.map +1 -1
  90. package/resources/org/project/project.d.ts +176 -4
  91. package/resources/org/project/project.d.ts.map +1 -1
  92. package/resources/org/project/project.js +46 -3
  93. package/resources/org/project/project.js.map +1 -1
  94. package/resources/org/project/project.mjs +46 -3
  95. package/resources/org/project/project.mjs.map +1 -1
  96. package/resources/org/project/trigger.d.mts +101 -1
  97. package/resources/org/project/trigger.d.mts.map +1 -1
  98. package/resources/org/project/trigger.d.ts +101 -1
  99. package/resources/org/project/trigger.d.ts.map +1 -1
  100. package/resources/org/project/trigger.js +21 -0
  101. package/resources/org/project/trigger.js.map +1 -1
  102. package/resources/org/project/trigger.mjs +21 -0
  103. package/resources/org/project/trigger.mjs.map +1 -1
  104. package/resources/org/project/webhook.d.mts +86 -15
  105. package/resources/org/project/webhook.d.mts.map +1 -1
  106. package/resources/org/project/webhook.d.ts +86 -15
  107. package/resources/org/project/webhook.d.ts.map +1 -1
  108. package/resources/org/project/webhook.js +49 -2
  109. package/resources/org/project/webhook.js.map +1 -1
  110. package/resources/org/project/webhook.mjs +49 -2
  111. package/resources/org/project/webhook.mjs.map +1 -1
  112. package/resources/team-members.d.mts +7 -7
  113. package/resources/team-members.d.mts.map +1 -1
  114. package/resources/team-members.d.ts +7 -7
  115. package/resources/team-members.d.ts.map +1 -1
  116. package/resources/toolkits.d.mts +195 -7
  117. package/resources/toolkits.d.mts.map +1 -1
  118. package/resources/toolkits.d.ts +195 -7
  119. package/resources/toolkits.d.ts.map +1 -1
  120. package/resources/toolkits.js +14 -6
  121. package/resources/toolkits.js.map +1 -1
  122. package/resources/toolkits.mjs +14 -6
  123. package/resources/toolkits.mjs.map +1 -1
  124. package/resources/tools.d.mts +211 -44
  125. package/resources/tools.d.mts.map +1 -1
  126. package/resources/tools.d.ts +211 -44
  127. package/resources/tools.d.ts.map +1 -1
  128. package/resources/tools.js +62 -9
  129. package/resources/tools.js.map +1 -1
  130. package/resources/tools.mjs +62 -9
  131. package/resources/tools.mjs.map +1 -1
  132. package/resources/trigger-instances/index.d.mts +1 -1
  133. package/resources/trigger-instances/index.d.mts.map +1 -1
  134. package/resources/trigger-instances/index.d.ts +1 -1
  135. package/resources/trigger-instances/index.d.ts.map +1 -1
  136. package/resources/trigger-instances/trigger-instances.d.mts +86 -19
  137. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  138. package/resources/trigger-instances/trigger-instances.d.ts +86 -19
  139. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  140. package/resources/trigger-instances/trigger-instances.js +6 -6
  141. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  142. package/resources/trigger-instances/trigger-instances.mjs +6 -6
  143. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  144. package/resources/triggers-types.d.mts +96 -2
  145. package/resources/triggers-types.d.mts.map +1 -1
  146. package/resources/triggers-types.d.ts +96 -2
  147. package/resources/triggers-types.d.ts.map +1 -1
  148. package/resources/triggers-types.js +23 -1
  149. package/resources/triggers-types.js.map +1 -1
  150. package/resources/triggers-types.mjs +23 -1
  151. package/resources/triggers-types.mjs.map +1 -1
  152. package/src/client.ts +6 -6
  153. package/src/resources/auth-configs.ts +169 -29
  154. package/src/resources/connected-accounts.ts +80 -17
  155. package/src/resources/files.ts +75 -23
  156. package/src/resources/index.ts +3 -3
  157. package/src/resources/mcp/custom.ts +103 -0
  158. package/src/resources/mcp/index.ts +2 -3
  159. package/src/resources/mcp/mcp.ts +342 -256
  160. package/src/resources/migration.ts +11 -2
  161. package/src/resources/org/api-key.ts +23 -2
  162. package/src/resources/org/project/api-keys.ts +117 -22
  163. package/src/resources/org/project/project.ts +176 -4
  164. package/src/resources/org/project/trigger.ts +101 -1
  165. package/src/resources/org/project/webhook.ts +86 -15
  166. package/src/resources/team-members.ts +7 -7
  167. package/src/resources/toolkits.ts +200 -7
  168. package/src/resources/tools.ts +213 -46
  169. package/src/resources/trigger-instances/index.ts +1 -1
  170. package/src/resources/trigger-instances/trigger-instances.ts +106 -25
  171. package/src/resources/triggers-types.ts +96 -2
  172. package/src/version.ts +1 -1
  173. package/version.d.mts +1 -1
  174. package/version.d.ts +1 -1
  175. package/version.js +1 -1
  176. package/version.mjs +1 -1
  177. package/resources/mcp/command.d.mts +0 -37
  178. package/resources/mcp/command.d.mts.map +0 -1
  179. package/resources/mcp/command.d.ts +0 -37
  180. package/resources/mcp/command.d.ts.map +0 -1
  181. package/resources/mcp/command.js +0 -15
  182. package/resources/mcp/command.js.map +0 -1
  183. package/resources/mcp/command.mjs +0 -11
  184. package/resources/mcp/command.mjs.map +0 -1
  185. package/src/resources/mcp/command.ts +0 -50
@@ -6,7 +6,13 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Files extends APIResource {
8
8
  /**
9
- * List files with optional app and action filters
9
+ * Retrieves a list of files associated with the authenticated project. Results can
10
+ * be filtered by toolkit and tool slugs.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const files = await client.files.list();
15
+ * ```
10
16
  */
11
17
  list(
12
18
  query: FileListParams | null | undefined = {},
@@ -16,7 +22,19 @@ export class Files extends APIResource {
16
22
  }
17
23
 
18
24
  /**
19
- * Create presigned URL for request file upload to S3
25
+ * Generates a presigned URL for uploading a file to S3. This endpoint handles
26
+ * deduplication by checking if a file with the same MD5 hash already exists.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const response = await client.files.createPresignedURL({
31
+ * filename: 'photo.jpg',
32
+ * md5: 'd41d8cd98f00b204e9800998ecf8427e',
33
+ * mimetype: 'image/jpeg',
34
+ * tool_slug: 'resize-image',
35
+ * toolkit_slug: 'image-processing',
36
+ * });
37
+ * ```
20
38
  */
21
39
  createPresignedURL(
22
40
  body: FileCreatePresignedURLParams,
@@ -37,27 +55,29 @@ export interface FileListResponse {
37
55
  export namespace FileListResponse {
38
56
  export interface Item {
39
57
  /**
40
- * Name of the original file.
58
+ * Name of the original file. Example: "document.docx"
41
59
  */
42
60
  filename: string;
43
61
 
44
62
  /**
45
- * MD5 of a file.
63
+ * MD5 hash of the file for integrity verification. Example:
64
+ * "d41d8cd98f00b204e9800998ecf8427e"
46
65
  */
47
66
  md5: string;
48
67
 
49
68
  /**
50
- * Mime type of the original file.
69
+ * Mime type of the original file. Example:
70
+ * "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
51
71
  */
52
72
  mimetype: string;
53
73
 
54
74
  /**
55
- * Name of the action where this file belongs to.
75
+ * Slug of the action where this file belongs to. Example: "convert-to-pdf"
56
76
  */
57
77
  tool_slug: string;
58
78
 
59
79
  /**
60
- * Slug of the app where this file belongs to.
80
+ * Slug of the app where this file belongs to. Example: "file-converter"
61
81
  */
62
82
  toolkit_slug: string;
63
83
  }
@@ -71,57 +91,88 @@ export type FileCreatePresignedURLResponse =
71
91
  export namespace FileCreatePresignedURLResponse {
72
92
  export interface UnionMember0 {
73
93
  /**
74
- * ID of the request file
94
+ * ID of the request file. Example: "f1e2d3c4b5a6"
75
95
  */
76
96
  id: string;
77
97
 
78
98
  /**
79
- * URL of the existing request file
99
+ * URL of the existing request file. Example:
100
+ * "https://storage.example.com/projects/123/files/photo-1234.jpg"
101
+ */
102
+ existing_url: string;
103
+
104
+ /**
105
+ * [DEPRECATED] Use existing_url instead. URL of the existing request file.
106
+ * Example: "https://storage.example.com/projects/123/files/photo-1234.jpg"
80
107
  */
81
108
  existingUrl: string;
82
109
 
83
110
  /**
84
- * S3 upload location
111
+ * S3 upload location. Example: "projects/123/files/photo-1234.jpg"
85
112
  */
86
113
  key: string;
87
114
 
115
+ /**
116
+ * Indicates the file already exists and does not need to be uploaded again
117
+ */
88
118
  type: 'existing';
89
119
  }
90
120
 
91
121
  export interface UnionMember1 {
92
122
  /**
93
- * ID of the request file
123
+ * ID of the request file. Example: "f1e2d3c4b5a6"
94
124
  */
95
125
  id: string;
96
126
 
97
127
  /**
98
- * S3 upload location
128
+ * S3 upload location. Example: "projects/123/files/photo-1234.jpg"
99
129
  */
100
130
  key: string;
101
131
 
102
132
  /**
103
- * Presigned URL for upload
133
+ * Presigned URL for upload. Example:
134
+ * "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
135
+ */
136
+ new_presigned_url: string;
137
+
138
+ /**
139
+ * [DEPRECATED] Use new_presigned_url instead. Presigned URL for upload. Example:
140
+ * "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
104
141
  */
105
142
  newPresignedUrl: string;
106
143
 
144
+ /**
145
+ * Indicates this is a new file that needs to be uploaded
146
+ */
107
147
  type: 'new';
108
148
  }
109
149
 
110
150
  export interface UnionMember2 {
111
151
  /**
112
- * ID of the request file
152
+ * ID of the request file. Example: "f1e2d3c4b5a6"
113
153
  */
114
154
  id: string;
115
155
 
116
156
  /**
117
- * S3 upload location
157
+ * S3 upload location. Example: "projects/123/files/photo-1234.jpg"
118
158
  */
119
159
  key: string;
120
160
 
161
+ /**
162
+ * Indicates this file exists but needs to be updated with a new version
163
+ */
121
164
  type: 'update';
122
165
 
123
166
  /**
124
- * Presigned URL for upload
167
+ * Presigned URL for upload. Example:
168
+ * "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
169
+ */
170
+ update_presigned_url: string;
171
+
172
+ /**
173
+ * [DEPRECATED] Use update_presigned_url instead. Presigned URL for upload.
174
+ * Example:
175
+ * "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
125
176
  */
126
177
  updatePresignedUrl: string;
127
178
  }
@@ -129,39 +180,40 @@ export namespace FileCreatePresignedURLResponse {
129
180
 
130
181
  export interface FileListParams {
131
182
  /**
132
- * Name of the action where this file belongs to.
183
+ * Filter files by action slug. Example: "convert-to-pdf"
133
184
  */
134
185
  tool_slug?: string;
135
186
 
136
187
  /**
137
- * Slug of the app where this file belongs to.
188
+ * Filter files by app slug. Example: "file-converter"
138
189
  */
139
190
  toolkit_slug?: string;
140
191
  }
141
192
 
142
193
  export interface FileCreatePresignedURLParams {
143
194
  /**
144
- * Name of the original file.
195
+ * Name of the original file. Example: "photo.jpg"
145
196
  */
146
197
  filename: string;
147
198
 
148
199
  /**
149
- * MD5 of a file.
200
+ * MD5 hash of the file for deduplication and integrity verification. Example:
201
+ * "d41d8cd98f00b204e9800998ecf8427e"
150
202
  */
151
203
  md5: string;
152
204
 
153
205
  /**
154
- * Mime type of the original file.
206
+ * Mime type of the original file. Example: "image/jpeg"
155
207
  */
156
208
  mimetype: string;
157
209
 
158
210
  /**
159
- * Slug of the action where this file belongs to.
211
+ * Slug of the action where this file belongs to. Example: "resize-image"
160
212
  */
161
213
  tool_slug: string;
162
214
 
163
215
  /**
164
- * Slug of the app where this file belongs to.
216
+ * Slug of the app where this file belongs to. Example: "image-processing"
165
217
  */
166
218
  toolkit_slug: string;
167
219
  }
@@ -40,11 +40,10 @@ export {
40
40
  type McpListResponse,
41
41
  type McpDeleteResponse,
42
42
  type McpRetrieveAppResponse,
43
- type McpValidateResponse,
44
43
  type McpCreateParams,
45
44
  type McpUpdateParams,
46
45
  type McpListParams,
47
- type McpValidateParams,
46
+ type McpRetrieveAppParams,
48
47
  } from './mcp/mcp';
49
48
  export {
50
49
  Migration,
@@ -67,6 +66,7 @@ export {
67
66
  type ToolkitListResponse,
68
67
  type ToolkitRetrieveCategoriesResponse,
69
68
  type ToolkitListParams,
69
+ type ToolkitRetrieveCategoriesParams,
70
70
  } from './toolkits';
71
71
  export {
72
72
  Tools,
@@ -83,8 +83,8 @@ export {
83
83
  } from './tools';
84
84
  export {
85
85
  TriggerInstances,
86
+ type TriggerInstanceDeleteResponse,
86
87
  type TriggerInstanceListActiveResponse,
87
- type TriggerInstanceRemoveUpsertResponse,
88
88
  type TriggerInstanceUpdateStatusResponse,
89
89
  type TriggerInstanceUpsertResponse,
90
90
  type TriggerInstanceListActiveParams,
@@ -0,0 +1,103 @@
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
+
7
+ export class Custom extends APIResource {
8
+ /**
9
+ * Creates a new Model Control Protocol (MCP) server instance that can integrate
10
+ * with multiple applications or toolkits simultaneously. This endpoint allows you
11
+ * to create a server that can access tools from different applications, making it
12
+ * suitable for complex workflows that span multiple services.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const custom = await client.mcp.custom.create({
17
+ * name: 'Development Integration Server',
18
+ * toolkits: ['github', 'jira'],
19
+ * });
20
+ * ```
21
+ */
22
+ create(body: CustomCreateParams, options?: RequestOptions): APIPromise<CustomCreateResponse> {
23
+ return this._client.post('/api/v3/mcp/servers/custom', { body, ...options });
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Response for a successfully created custom MCP server with multiple applications
29
+ */
30
+ export interface CustomCreateResponse {
31
+ /**
32
+ * Unique identifier for the newly created custom MCP server
33
+ */
34
+ id: string;
35
+
36
+ /**
37
+ * List of tool identifiers that are enabled for this server
38
+ */
39
+ allowed_tools: Array<string>;
40
+
41
+ /**
42
+ * Set of command line instructions for connecting various clients to this MCP
43
+ * server
44
+ */
45
+ commands: CustomCreateResponse.Commands;
46
+
47
+ /**
48
+ * URL endpoint for establishing Server-Sent Events (SSE) connection to this MCP
49
+ * server
50
+ */
51
+ mcp_url: string;
52
+
53
+ /**
54
+ * Human-readable name of the custom MCP server
55
+ */
56
+ name: string;
57
+ }
58
+
59
+ export namespace CustomCreateResponse {
60
+ /**
61
+ * Set of command line instructions for connecting various clients to this MCP
62
+ * server
63
+ */
64
+ export interface Commands {
65
+ /**
66
+ * Command line instruction for Claude client setup
67
+ */
68
+ claude: string;
69
+
70
+ /**
71
+ * Command line instruction for Cursor client setup
72
+ */
73
+ cursor: string;
74
+
75
+ /**
76
+ * Command line instruction for Windsurf client setup
77
+ */
78
+ windsurf: string;
79
+ }
80
+ }
81
+
82
+ export interface CustomCreateParams {
83
+ /**
84
+ * Human-readable name to identify this custom MCP server (4-25 characters,
85
+ * alphanumeric and hyphens only)
86
+ */
87
+ name: string;
88
+
89
+ /**
90
+ * List of application/toolkit identifiers to enable for this server
91
+ */
92
+ toolkits: Array<string>;
93
+
94
+ /**
95
+ * Additional custom tool identifiers to enable that aren't part of standard
96
+ * toolkits
97
+ */
98
+ custom_tools?: Array<string>;
99
+ }
100
+
101
+ export declare namespace Custom {
102
+ export { type CustomCreateResponse as CustomCreateResponse, type CustomCreateParams as CustomCreateParams };
103
+ }
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Command, type CommandGenerateResponse, type CommandGenerateParams } from './command';
3
+ export { Custom, type CustomCreateResponse, type CustomCreateParams } from './custom';
4
4
  export {
5
5
  Mcp,
6
6
  type McpCreateResponse,
@@ -9,9 +9,8 @@ export {
9
9
  type McpListResponse,
10
10
  type McpDeleteResponse,
11
11
  type McpRetrieveAppResponse,
12
- type McpValidateResponse,
13
12
  type McpCreateParams,
14
13
  type McpUpdateParams,
15
14
  type McpListParams,
16
- type McpValidateParams,
15
+ type McpRetrieveAppParams,
17
16
  } from './mcp';