@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.
- package/CHANGELOG.md +36 -0
- package/README.md +7 -7
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +168 -29
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +168 -29
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +50 -4
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +50 -4
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +80 -17
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +80 -17
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +56 -4
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +56 -4
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +72 -23
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +72 -23
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +20 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +20 -2
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/custom.d.mts +87 -0
- package/resources/mcp/custom.d.mts.map +1 -0
- package/resources/mcp/custom.d.ts +87 -0
- package/resources/mcp/custom.d.ts.map +1 -0
- package/resources/mcp/custom.js +26 -0
- package/resources/mcp/custom.js.map +1 -0
- package/resources/mcp/custom.mjs +22 -0
- package/resources/mcp/custom.mjs.map +1 -0
- package/resources/mcp/index.d.mts +2 -2
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +2 -2
- package/resources/mcp/index.d.ts.map +1 -1
- package/resources/mcp/index.js +3 -3
- package/resources/mcp/index.js.map +1 -1
- package/resources/mcp/index.mjs +1 -1
- package/resources/mcp/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +322 -217
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +322 -217
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +72 -25
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +72 -25
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/migration.d.mts +11 -2
- package/resources/migration.d.mts.map +1 -1
- package/resources/migration.d.ts +11 -2
- package/resources/migration.d.ts.map +1 -1
- package/resources/migration.js +3 -1
- package/resources/migration.js.map +1 -1
- package/resources/migration.mjs +3 -1
- package/resources/migration.mjs.map +1 -1
- package/resources/org/api-key.d.mts +23 -2
- package/resources/org/api-key.d.mts.map +1 -1
- package/resources/org/api-key.d.ts +23 -2
- package/resources/org/api-key.d.ts.map +1 -1
- package/resources/org/api-key.js +15 -2
- package/resources/org/api-key.js.map +1 -1
- package/resources/org/api-key.mjs +15 -2
- package/resources/org/api-key.mjs.map +1 -1
- package/resources/org/project/api-keys.d.mts +114 -22
- package/resources/org/project/api-keys.d.mts.map +1 -1
- package/resources/org/project/api-keys.d.ts +114 -22
- package/resources/org/project/api-keys.d.ts.map +1 -1
- package/resources/org/project/api-keys.js +57 -0
- package/resources/org/project/api-keys.js.map +1 -1
- package/resources/org/project/api-keys.mjs +57 -0
- package/resources/org/project/api-keys.mjs.map +1 -1
- package/resources/org/project/project.d.mts +176 -4
- package/resources/org/project/project.d.mts.map +1 -1
- package/resources/org/project/project.d.ts +176 -4
- package/resources/org/project/project.d.ts.map +1 -1
- package/resources/org/project/project.js +46 -3
- package/resources/org/project/project.js.map +1 -1
- package/resources/org/project/project.mjs +46 -3
- package/resources/org/project/project.mjs.map +1 -1
- package/resources/org/project/trigger.d.mts +101 -1
- package/resources/org/project/trigger.d.mts.map +1 -1
- package/resources/org/project/trigger.d.ts +101 -1
- package/resources/org/project/trigger.d.ts.map +1 -1
- package/resources/org/project/trigger.js +21 -0
- package/resources/org/project/trigger.js.map +1 -1
- package/resources/org/project/trigger.mjs +21 -0
- package/resources/org/project/trigger.mjs.map +1 -1
- package/resources/org/project/webhook.d.mts +86 -15
- package/resources/org/project/webhook.d.mts.map +1 -1
- package/resources/org/project/webhook.d.ts +86 -15
- package/resources/org/project/webhook.d.ts.map +1 -1
- package/resources/org/project/webhook.js +49 -2
- package/resources/org/project/webhook.js.map +1 -1
- package/resources/org/project/webhook.mjs +49 -2
- package/resources/org/project/webhook.mjs.map +1 -1
- package/resources/team-members.d.mts +7 -7
- package/resources/team-members.d.mts.map +1 -1
- package/resources/team-members.d.ts +7 -7
- package/resources/team-members.d.ts.map +1 -1
- package/resources/toolkits.d.mts +195 -7
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +195 -7
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +14 -6
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +14 -6
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +211 -44
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +211 -44
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +62 -9
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +62 -9
- package/resources/tools.mjs.map +1 -1
- package/resources/trigger-instances/index.d.mts +1 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +1 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +86 -19
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +86 -19
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +6 -6
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +6 -6
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/triggers-types.d.mts +96 -2
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +96 -2
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +23 -1
- package/resources/triggers-types.js.map +1 -1
- package/resources/triggers-types.mjs +23 -1
- package/resources/triggers-types.mjs.map +1 -1
- package/src/client.ts +6 -6
- package/src/resources/auth-configs.ts +169 -29
- package/src/resources/connected-accounts.ts +80 -17
- package/src/resources/files.ts +75 -23
- package/src/resources/index.ts +3 -3
- package/src/resources/mcp/custom.ts +103 -0
- package/src/resources/mcp/index.ts +2 -3
- package/src/resources/mcp/mcp.ts +342 -256
- package/src/resources/migration.ts +11 -2
- package/src/resources/org/api-key.ts +23 -2
- package/src/resources/org/project/api-keys.ts +117 -22
- package/src/resources/org/project/project.ts +176 -4
- package/src/resources/org/project/trigger.ts +101 -1
- package/src/resources/org/project/webhook.ts +86 -15
- package/src/resources/team-members.ts +7 -7
- package/src/resources/toolkits.ts +200 -7
- package/src/resources/tools.ts +213 -46
- package/src/resources/trigger-instances/index.ts +1 -1
- package/src/resources/trigger-instances/trigger-instances.ts +106 -25
- package/src/resources/triggers-types.ts +96 -2
- 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/resources/mcp/command.d.mts +0 -37
- package/resources/mcp/command.d.mts.map +0 -1
- package/resources/mcp/command.d.ts +0 -37
- package/resources/mcp/command.d.ts.map +0 -1
- package/resources/mcp/command.js +0 -15
- package/resources/mcp/command.js.map +0 -1
- package/resources/mcp/command.mjs +0 -11
- package/resources/mcp/command.mjs.map +0 -1
- package/src/resources/mcp/command.ts +0 -50
|
@@ -8,20 +8,44 @@ import { path } from '../internal/utils/path';
|
|
|
8
8
|
export class AuthConfigs extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create new authentication configuration
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const authConfig = await client.authConfigs.create({
|
|
15
|
+
* toolkit: { slug: 'slug' },
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
11
18
|
*/
|
|
12
19
|
create(body: AuthConfigCreateParams, options?: RequestOptions): APIPromise<AuthConfigCreateResponse> {
|
|
13
20
|
return this._client.post('/api/v3/auth_configs', { body, ...options });
|
|
14
21
|
}
|
|
15
22
|
|
|
16
23
|
/**
|
|
17
|
-
*
|
|
24
|
+
* Retrieves detailed information about a specific authentication configuration
|
|
25
|
+
* using its unique identifier.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const authConfig = await client.authConfigs.retrieve(
|
|
30
|
+
* 'nanoid',
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
18
33
|
*/
|
|
19
34
|
retrieve(nanoid: string, options?: RequestOptions): APIPromise<AuthConfigRetrieveResponse> {
|
|
20
35
|
return this._client.get(path`/api/v3/auth_configs/${nanoid}`, options);
|
|
21
36
|
}
|
|
22
37
|
|
|
23
38
|
/**
|
|
24
|
-
*
|
|
39
|
+
* Modifies an existing authentication configuration with new credentials or other
|
|
40
|
+
* settings. Only specified fields will be updated.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const authConfig = await client.authConfigs.update(
|
|
45
|
+
* 'nanoid',
|
|
46
|
+
* { credentials: { foo: 'bar' }, type: 'custom' },
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
25
49
|
*/
|
|
26
50
|
update(nanoid: string, body: AuthConfigUpdateParams, options?: RequestOptions): APIPromise<unknown> {
|
|
27
51
|
return this._client.patch(path`/api/v3/auth_configs/${nanoid}`, { body, ...options });
|
|
@@ -29,6 +53,11 @@ export class AuthConfigs extends APIResource {
|
|
|
29
53
|
|
|
30
54
|
/**
|
|
31
55
|
* List authentication configurations with optional filters
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const authConfigs = await client.authConfigs.list();
|
|
60
|
+
* ```
|
|
32
61
|
*/
|
|
33
62
|
list(
|
|
34
63
|
query: AuthConfigListParams | null | undefined = {},
|
|
@@ -38,14 +67,31 @@ export class AuthConfigs extends APIResource {
|
|
|
38
67
|
}
|
|
39
68
|
|
|
40
69
|
/**
|
|
41
|
-
*
|
|
70
|
+
* Soft-deletes an authentication configuration by marking it as deleted in the
|
|
71
|
+
* database. This operation cannot be undone.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const authConfig = await client.authConfigs.delete(
|
|
76
|
+
* 'nanoid',
|
|
77
|
+
* );
|
|
78
|
+
* ```
|
|
42
79
|
*/
|
|
43
80
|
delete(nanoid: string, options?: RequestOptions): APIPromise<unknown> {
|
|
44
81
|
return this._client.delete(path`/api/v3/auth_configs/${nanoid}`, options);
|
|
45
82
|
}
|
|
46
83
|
|
|
47
84
|
/**
|
|
48
|
-
*
|
|
85
|
+
* Updates the status of an authentication configuration to either enabled or
|
|
86
|
+
* disabled. Disabled configurations cannot be used for new connections.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const response = await client.authConfigs.updateStatus(
|
|
91
|
+
* 'ENABLED',
|
|
92
|
+
* { nanoid: 'nanoid' },
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
49
95
|
*/
|
|
50
96
|
updateStatus(
|
|
51
97
|
status: 'ENABLED' | 'DISABLED',
|
|
@@ -66,12 +112,12 @@ export interface AuthConfigCreateResponse {
|
|
|
66
112
|
export namespace AuthConfigCreateResponse {
|
|
67
113
|
export interface AuthConfig {
|
|
68
114
|
/**
|
|
69
|
-
* The auth config id of the
|
|
115
|
+
* The auth config id of the toolkit (must be a valid auth config id)
|
|
70
116
|
*/
|
|
71
117
|
id: string;
|
|
72
118
|
|
|
73
119
|
/**
|
|
74
|
-
* The authentication mode of the
|
|
120
|
+
* The authentication mode of the toolkit
|
|
75
121
|
*/
|
|
76
122
|
auth_scheme: string;
|
|
77
123
|
|
|
@@ -81,7 +127,7 @@ export namespace AuthConfigCreateResponse {
|
|
|
81
127
|
is_composio_managed: boolean;
|
|
82
128
|
|
|
83
129
|
/**
|
|
84
|
-
* The
|
|
130
|
+
* The tools that the user can use with the auth config
|
|
85
131
|
*/
|
|
86
132
|
restrict_to_following_tools?: Array<string>;
|
|
87
133
|
}
|
|
@@ -96,36 +142,48 @@ export namespace AuthConfigCreateResponse {
|
|
|
96
142
|
|
|
97
143
|
export interface AuthConfigRetrieveResponse {
|
|
98
144
|
/**
|
|
99
|
-
* The unique
|
|
145
|
+
* The unique ID of the authentication configuration
|
|
100
146
|
*/
|
|
101
147
|
id: string;
|
|
102
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Deprecated parameters maintained for backward compatibility
|
|
151
|
+
*/
|
|
103
152
|
deprecated_params: AuthConfigRetrieveResponse.DeprecatedParams;
|
|
104
153
|
|
|
105
154
|
/**
|
|
106
|
-
* The name of the
|
|
155
|
+
* The display name of the authentication configuration
|
|
107
156
|
*/
|
|
108
157
|
name: string;
|
|
109
158
|
|
|
110
159
|
/**
|
|
111
|
-
* The number of connections
|
|
160
|
+
* The number of active connections using this auth config
|
|
112
161
|
*/
|
|
113
162
|
no_of_connections: number;
|
|
114
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Current status of the authentication configuration
|
|
166
|
+
*/
|
|
115
167
|
status: 'ENABLED' | 'DISABLED';
|
|
116
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Information about the associated integration
|
|
171
|
+
*/
|
|
117
172
|
toolkit: AuthConfigRetrieveResponse.Toolkit;
|
|
118
173
|
|
|
119
174
|
/**
|
|
120
|
-
* The type of the
|
|
175
|
+
* The type of the authentication configuration (custom or default)
|
|
121
176
|
*/
|
|
122
177
|
type: 'default' | 'custom';
|
|
123
178
|
|
|
124
179
|
/**
|
|
125
|
-
* The
|
|
180
|
+
* The UUID of the authentication configuration (for backward compatibility)
|
|
126
181
|
*/
|
|
127
182
|
uuid: string;
|
|
128
183
|
|
|
184
|
+
/**
|
|
185
|
+
* The authentication scheme used (e.g., OAuth2, API Key, etc.)
|
|
186
|
+
*/
|
|
129
187
|
auth_scheme?:
|
|
130
188
|
| 'OAUTH2'
|
|
131
189
|
| 'OAUTH1'
|
|
@@ -142,48 +200,79 @@ export interface AuthConfigRetrieveResponse {
|
|
|
142
200
|
| 'SNOWFLAKE';
|
|
143
201
|
|
|
144
202
|
/**
|
|
145
|
-
*
|
|
203
|
+
* ISO 8601 date-time when the auth config was created
|
|
146
204
|
*/
|
|
147
205
|
created_at?: string;
|
|
148
206
|
|
|
149
207
|
/**
|
|
150
|
-
* The user who created the auth config
|
|
208
|
+
* The identifier of the user who created the auth config
|
|
151
209
|
*/
|
|
152
210
|
created_by?: string;
|
|
153
211
|
|
|
212
|
+
/**
|
|
213
|
+
* The authentication credentials (tokens, keys, etc.) - may be partially hidden
|
|
214
|
+
* for security
|
|
215
|
+
*/
|
|
154
216
|
credentials?: Record<string, unknown>;
|
|
155
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Fields expected during connection initialization
|
|
220
|
+
*/
|
|
156
221
|
expected_input_fields?: Array<unknown>;
|
|
157
222
|
|
|
223
|
+
/**
|
|
224
|
+
* Whether this authentication configuration is managed by Composio or the user
|
|
225
|
+
*/
|
|
158
226
|
is_composio_managed?: boolean;
|
|
159
227
|
|
|
160
228
|
/**
|
|
161
|
-
*
|
|
229
|
+
* ISO 8601 date-time when the auth config was last updated
|
|
162
230
|
*/
|
|
163
231
|
last_updated_at?: string;
|
|
164
232
|
|
|
233
|
+
/**
|
|
234
|
+
* List of tool IDs this auth config is restricted to use with
|
|
235
|
+
*/
|
|
165
236
|
restrict_to_following_tools?: Array<string>;
|
|
166
237
|
}
|
|
167
238
|
|
|
168
239
|
export namespace AuthConfigRetrieveResponse {
|
|
240
|
+
/**
|
|
241
|
+
* Deprecated parameters maintained for backward compatibility
|
|
242
|
+
*/
|
|
169
243
|
export interface DeprecatedParams {
|
|
244
|
+
/**
|
|
245
|
+
* Deprecated: Default connector ID
|
|
246
|
+
*/
|
|
170
247
|
default_connector_id: string | null;
|
|
171
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Deprecated: Fields expected during connection initialization
|
|
251
|
+
*/
|
|
172
252
|
expected_input_fields?: Array<Record<string, unknown>>;
|
|
173
253
|
|
|
254
|
+
/**
|
|
255
|
+
* Deprecated: Member UUID
|
|
256
|
+
*/
|
|
174
257
|
member_uuid?: string;
|
|
175
258
|
|
|
259
|
+
/**
|
|
260
|
+
* Deprecated: Toolkit ID
|
|
261
|
+
*/
|
|
176
262
|
toolkit_id?: string;
|
|
177
263
|
}
|
|
178
264
|
|
|
265
|
+
/**
|
|
266
|
+
* Information about the associated integration
|
|
267
|
+
*/
|
|
179
268
|
export interface Toolkit {
|
|
180
269
|
/**
|
|
181
|
-
* The
|
|
270
|
+
* The URL to the integration app's logo image
|
|
182
271
|
*/
|
|
183
272
|
logo: string;
|
|
184
273
|
|
|
185
274
|
/**
|
|
186
|
-
* The unique
|
|
275
|
+
* The unique identifier of the integration app
|
|
187
276
|
*/
|
|
188
277
|
slug: string;
|
|
189
278
|
}
|
|
@@ -202,36 +291,48 @@ export interface AuthConfigListResponse {
|
|
|
202
291
|
export namespace AuthConfigListResponse {
|
|
203
292
|
export interface Item {
|
|
204
293
|
/**
|
|
205
|
-
* The unique
|
|
294
|
+
* The unique ID of the authentication configuration
|
|
206
295
|
*/
|
|
207
296
|
id: string;
|
|
208
297
|
|
|
298
|
+
/**
|
|
299
|
+
* Deprecated parameters maintained for backward compatibility
|
|
300
|
+
*/
|
|
209
301
|
deprecated_params: Item.DeprecatedParams;
|
|
210
302
|
|
|
211
303
|
/**
|
|
212
|
-
* The name of the
|
|
304
|
+
* The display name of the authentication configuration
|
|
213
305
|
*/
|
|
214
306
|
name: string;
|
|
215
307
|
|
|
216
308
|
/**
|
|
217
|
-
* The number of connections
|
|
309
|
+
* The number of active connections using this auth config
|
|
218
310
|
*/
|
|
219
311
|
no_of_connections: number;
|
|
220
312
|
|
|
313
|
+
/**
|
|
314
|
+
* Current status of the authentication configuration
|
|
315
|
+
*/
|
|
221
316
|
status: 'ENABLED' | 'DISABLED';
|
|
222
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Information about the associated integration
|
|
320
|
+
*/
|
|
223
321
|
toolkit: Item.Toolkit;
|
|
224
322
|
|
|
225
323
|
/**
|
|
226
|
-
* The type of the
|
|
324
|
+
* The type of the authentication configuration (custom or default)
|
|
227
325
|
*/
|
|
228
326
|
type: 'default' | 'custom';
|
|
229
327
|
|
|
230
328
|
/**
|
|
231
|
-
* The
|
|
329
|
+
* The UUID of the authentication configuration (for backward compatibility)
|
|
232
330
|
*/
|
|
233
331
|
uuid: string;
|
|
234
332
|
|
|
333
|
+
/**
|
|
334
|
+
* The authentication scheme used (e.g., OAuth2, API Key, etc.)
|
|
335
|
+
*/
|
|
235
336
|
auth_scheme?:
|
|
236
337
|
| 'OAUTH2'
|
|
237
338
|
| 'OAUTH1'
|
|
@@ -248,48 +349,79 @@ export namespace AuthConfigListResponse {
|
|
|
248
349
|
| 'SNOWFLAKE';
|
|
249
350
|
|
|
250
351
|
/**
|
|
251
|
-
*
|
|
352
|
+
* ISO 8601 date-time when the auth config was created
|
|
252
353
|
*/
|
|
253
354
|
created_at?: string;
|
|
254
355
|
|
|
255
356
|
/**
|
|
256
|
-
* The user who created the auth config
|
|
357
|
+
* The identifier of the user who created the auth config
|
|
257
358
|
*/
|
|
258
359
|
created_by?: string;
|
|
259
360
|
|
|
361
|
+
/**
|
|
362
|
+
* The authentication credentials (tokens, keys, etc.) - may be partially hidden
|
|
363
|
+
* for security
|
|
364
|
+
*/
|
|
260
365
|
credentials?: Record<string, unknown>;
|
|
261
366
|
|
|
367
|
+
/**
|
|
368
|
+
* Fields expected during connection initialization
|
|
369
|
+
*/
|
|
262
370
|
expected_input_fields?: Array<unknown>;
|
|
263
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Whether this authentication configuration is managed by Composio or the user
|
|
374
|
+
*/
|
|
264
375
|
is_composio_managed?: boolean;
|
|
265
376
|
|
|
266
377
|
/**
|
|
267
|
-
*
|
|
378
|
+
* ISO 8601 date-time when the auth config was last updated
|
|
268
379
|
*/
|
|
269
380
|
last_updated_at?: string;
|
|
270
381
|
|
|
382
|
+
/**
|
|
383
|
+
* List of tool IDs this auth config is restricted to use with
|
|
384
|
+
*/
|
|
271
385
|
restrict_to_following_tools?: Array<string>;
|
|
272
386
|
}
|
|
273
387
|
|
|
274
388
|
export namespace Item {
|
|
389
|
+
/**
|
|
390
|
+
* Deprecated parameters maintained for backward compatibility
|
|
391
|
+
*/
|
|
275
392
|
export interface DeprecatedParams {
|
|
393
|
+
/**
|
|
394
|
+
* Deprecated: Default connector ID
|
|
395
|
+
*/
|
|
276
396
|
default_connector_id: string | null;
|
|
277
397
|
|
|
398
|
+
/**
|
|
399
|
+
* Deprecated: Fields expected during connection initialization
|
|
400
|
+
*/
|
|
278
401
|
expected_input_fields?: Array<Record<string, unknown>>;
|
|
279
402
|
|
|
403
|
+
/**
|
|
404
|
+
* Deprecated: Member UUID
|
|
405
|
+
*/
|
|
280
406
|
member_uuid?: string;
|
|
281
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Deprecated: Toolkit ID
|
|
410
|
+
*/
|
|
282
411
|
toolkit_id?: string;
|
|
283
412
|
}
|
|
284
413
|
|
|
414
|
+
/**
|
|
415
|
+
* Information about the associated integration
|
|
416
|
+
*/
|
|
285
417
|
export interface Toolkit {
|
|
286
418
|
/**
|
|
287
|
-
* The
|
|
419
|
+
* The URL to the integration app's logo image
|
|
288
420
|
*/
|
|
289
421
|
logo: string;
|
|
290
422
|
|
|
291
423
|
/**
|
|
292
|
-
* The unique
|
|
424
|
+
* The unique identifier of the integration app
|
|
293
425
|
*/
|
|
294
426
|
slug: string;
|
|
295
427
|
}
|
|
@@ -309,7 +441,7 @@ export interface AuthConfigCreateParams {
|
|
|
309
441
|
export namespace AuthConfigCreateParams {
|
|
310
442
|
export interface Toolkit {
|
|
311
443
|
/**
|
|
312
|
-
* List of
|
|
444
|
+
* List of toolkits unique keys to filter by
|
|
313
445
|
*/
|
|
314
446
|
slug: string;
|
|
315
447
|
}
|
|
@@ -403,7 +535,12 @@ export interface AuthConfigListParams {
|
|
|
403
535
|
/**
|
|
404
536
|
* The number of auth configs to return
|
|
405
537
|
*/
|
|
406
|
-
limit?:
|
|
538
|
+
limit?: number | null;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Show disabled auth configs
|
|
542
|
+
*/
|
|
543
|
+
show_disabled?: boolean;
|
|
407
544
|
|
|
408
545
|
/**
|
|
409
546
|
* The slug of the toolkit to filter by
|
|
@@ -412,6 +549,9 @@ export interface AuthConfigListParams {
|
|
|
412
549
|
}
|
|
413
550
|
|
|
414
551
|
export interface AuthConfigUpdateStatusParams {
|
|
552
|
+
/**
|
|
553
|
+
* The unique identifier of the authentication configuration to update
|
|
554
|
+
*/
|
|
415
555
|
nanoid: string;
|
|
416
556
|
}
|
|
417
557
|
|
|
@@ -8,6 +8,15 @@ import { path } from '../internal/utils/path';
|
|
|
8
8
|
export class ConnectedAccounts extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create a new connected account
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const connectedAccount =
|
|
15
|
+
* await client.connectedAccounts.create({
|
|
16
|
+
* auth_config: { id: 'id' },
|
|
17
|
+
* connection: {},
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
11
20
|
*/
|
|
12
21
|
create(
|
|
13
22
|
body: ConnectedAccountCreateParams,
|
|
@@ -17,7 +26,16 @@ export class ConnectedAccounts extends APIResource {
|
|
|
17
26
|
}
|
|
18
27
|
|
|
19
28
|
/**
|
|
20
|
-
*
|
|
29
|
+
* Retrieves comprehensive details of a connected account, including authentication
|
|
30
|
+
* configuration, connection status, and all parameters needed for API requests.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const connectedAccount =
|
|
35
|
+
* await client.connectedAccounts.retrieve(
|
|
36
|
+
* 'con_1a2b3c4d5e6f',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
21
39
|
*/
|
|
22
40
|
retrieve(nanoid: string, options?: RequestOptions): APIPromise<ConnectedAccountRetrieveResponse> {
|
|
23
41
|
return this._client.get(path`/api/v3/connected_accounts/${nanoid}`, options);
|
|
@@ -25,6 +43,12 @@ export class ConnectedAccounts extends APIResource {
|
|
|
25
43
|
|
|
26
44
|
/**
|
|
27
45
|
* List connected accounts with optional filters
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const connectedAccounts =
|
|
50
|
+
* await client.connectedAccounts.list();
|
|
51
|
+
* ```
|
|
28
52
|
*/
|
|
29
53
|
list(
|
|
30
54
|
query: ConnectedAccountListParams | null | undefined = {},
|
|
@@ -34,21 +58,49 @@ export class ConnectedAccounts extends APIResource {
|
|
|
34
58
|
}
|
|
35
59
|
|
|
36
60
|
/**
|
|
37
|
-
*
|
|
61
|
+
* Soft-deletes a connected account by marking it as deleted in the database. This
|
|
62
|
+
* prevents the account from being used for API calls but preserves the record for
|
|
63
|
+
* audit purposes.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const connectedAccount =
|
|
68
|
+
* await client.connectedAccounts.delete('con_1a2b3c4d5e6f');
|
|
69
|
+
* ```
|
|
38
70
|
*/
|
|
39
71
|
delete(nanoid: string, options?: RequestOptions): APIPromise<ConnectedAccountDeleteResponse> {
|
|
40
72
|
return this._client.delete(path`/api/v3/connected_accounts/${nanoid}`, options);
|
|
41
73
|
}
|
|
42
74
|
|
|
43
75
|
/**
|
|
44
|
-
*
|
|
76
|
+
* Initiates a new authentication flow for a connected account when credentials
|
|
77
|
+
* have expired or become invalid. This may generate a new authentication URL for
|
|
78
|
+
* OAuth flows or refresh tokens for other auth schemes.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const response = await client.connectedAccounts.refresh(
|
|
83
|
+
* 'con_1a2b3c4d5e6f',
|
|
84
|
+
* );
|
|
85
|
+
* ```
|
|
45
86
|
*/
|
|
46
87
|
refresh(nanoid: string, options?: RequestOptions): APIPromise<ConnectedAccountRefreshResponse> {
|
|
47
88
|
return this._client.post(path`/api/v3/connected_accounts/${nanoid}/refresh`, options);
|
|
48
89
|
}
|
|
49
90
|
|
|
50
91
|
/**
|
|
51
|
-
*
|
|
92
|
+
* Updates the status of a connected account to either enabled (active) or disabled
|
|
93
|
+
* (inactive). Disabled accounts cannot be used for API calls but remain in the
|
|
94
|
+
* database.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* const response =
|
|
99
|
+
* await client.connectedAccounts.updateStatus(
|
|
100
|
+
* 'con_1a2b3c4d5e6f',
|
|
101
|
+
* { enabled: true },
|
|
102
|
+
* );
|
|
103
|
+
* ```
|
|
52
104
|
*/
|
|
53
105
|
updateStatus(
|
|
54
106
|
nanoID: string,
|
|
@@ -81,7 +133,7 @@ export interface ConnectedAccountCreateResponse {
|
|
|
81
133
|
/**
|
|
82
134
|
* The status of the connected account
|
|
83
135
|
*/
|
|
84
|
-
status: '
|
|
136
|
+
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED';
|
|
85
137
|
}
|
|
86
138
|
|
|
87
139
|
export namespace ConnectedAccountCreateResponse {
|
|
@@ -117,22 +169,23 @@ export interface ConnectedAccountRetrieveResponse {
|
|
|
117
169
|
data: Record<string, unknown>;
|
|
118
170
|
|
|
119
171
|
/**
|
|
120
|
-
* Whether the connected account is disabled
|
|
172
|
+
* Whether the connected account is disabled. When true, the account cannot be used
|
|
173
|
+
* for API calls
|
|
121
174
|
*/
|
|
122
175
|
is_disabled: boolean;
|
|
123
176
|
|
|
124
177
|
/**
|
|
125
|
-
* The
|
|
178
|
+
* The initialization data of the connection, including configuration parameters
|
|
126
179
|
*/
|
|
127
180
|
params: Record<string, unknown>;
|
|
128
181
|
|
|
129
182
|
/**
|
|
130
183
|
* The status of the connection
|
|
131
184
|
*/
|
|
132
|
-
status: '
|
|
185
|
+
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED';
|
|
133
186
|
|
|
134
187
|
/**
|
|
135
|
-
* The reason the connected account is disabled
|
|
188
|
+
* The reason why the connected account is disabled, if applicable
|
|
136
189
|
*/
|
|
137
190
|
status_reason: string | null;
|
|
138
191
|
|
|
@@ -258,7 +311,7 @@ export namespace ConnectedAccountListResponse {
|
|
|
258
311
|
/**
|
|
259
312
|
* The status of the connection
|
|
260
313
|
*/
|
|
261
|
-
status: '
|
|
314
|
+
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED';
|
|
262
315
|
|
|
263
316
|
/**
|
|
264
317
|
* The reason the connection is disabled
|
|
@@ -353,33 +406,40 @@ export namespace ConnectedAccountListResponse {
|
|
|
353
406
|
}
|
|
354
407
|
}
|
|
355
408
|
|
|
409
|
+
/**
|
|
410
|
+
* Response returned after successfully deleting a connected account
|
|
411
|
+
*/
|
|
356
412
|
export interface ConnectedAccountDeleteResponse {
|
|
357
413
|
/**
|
|
358
|
-
*
|
|
414
|
+
* Indicates whether the connected account was successfully deleted
|
|
359
415
|
*/
|
|
360
416
|
success: boolean;
|
|
361
417
|
}
|
|
362
418
|
|
|
363
419
|
export interface ConnectedAccountRefreshResponse {
|
|
364
420
|
/**
|
|
365
|
-
* The
|
|
421
|
+
* The unique identifier of the connected account
|
|
366
422
|
*/
|
|
367
423
|
id: string;
|
|
368
424
|
|
|
369
425
|
/**
|
|
370
|
-
* The
|
|
426
|
+
* The URL to which the user should be redirected to complete the authentication
|
|
427
|
+
* process (null for auth schemes that do not require redirection)
|
|
371
428
|
*/
|
|
372
429
|
redirect_url: string | null;
|
|
373
430
|
|
|
374
431
|
/**
|
|
375
|
-
* The status of the connected account
|
|
432
|
+
* The current status of the connected account (e.g., active, pending, failed)
|
|
376
433
|
*/
|
|
377
|
-
status: '
|
|
434
|
+
status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED';
|
|
378
435
|
}
|
|
379
436
|
|
|
437
|
+
/**
|
|
438
|
+
* Response returned after successfully updating a connected account status
|
|
439
|
+
*/
|
|
380
440
|
export interface ConnectedAccountUpdateStatusResponse {
|
|
381
441
|
/**
|
|
382
|
-
*
|
|
442
|
+
* Indicates whether the connected account status was successfully updated
|
|
383
443
|
*/
|
|
384
444
|
success: boolean;
|
|
385
445
|
}
|
|
@@ -456,7 +516,7 @@ export interface ConnectedAccountListParams {
|
|
|
456
516
|
/**
|
|
457
517
|
* The status of the connected account
|
|
458
518
|
*/
|
|
459
|
-
statuses?: Array<'
|
|
519
|
+
statuses?: Array<'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED'> | null;
|
|
460
520
|
|
|
461
521
|
/**
|
|
462
522
|
* The toolkit slugs of the connected accounts
|
|
@@ -470,6 +530,9 @@ export interface ConnectedAccountListParams {
|
|
|
470
530
|
}
|
|
471
531
|
|
|
472
532
|
export interface ConnectedAccountUpdateStatusParams {
|
|
533
|
+
/**
|
|
534
|
+
* Set to true to enable the account or false to disable it
|
|
535
|
+
*/
|
|
473
536
|
enabled: boolean;
|
|
474
537
|
}
|
|
475
538
|
|