@composio/client 0.1.0-alpha.10 → 0.1.0-alpha.11
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 +20 -0
- 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 +163 -24
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +163 -24
- 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 +56 -23
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +56 -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/command.d.mts +0 -33
- package/resources/mcp/command.d.mts.map +1 -1
- package/resources/mcp/command.d.ts +0 -33
- package/resources/mcp/command.d.ts.map +1 -1
- package/resources/mcp/command.js +0 -6
- package/resources/mcp/command.js.map +1 -1
- package/resources/mcp/command.mjs +0 -6
- package/resources/mcp/command.mjs.map +1 -1
- 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.map +1 -1
- package/resources/mcp/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +232 -235
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +232 -235
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +55 -19
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +55 -19
- 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 +97 -20
- package/resources/org/project/api-keys.d.mts.map +1 -1
- package/resources/org/project/api-keys.d.ts +97 -20
- 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/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 +207 -40
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +207 -40
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +58 -5
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +58 -5
- 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/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +21 -24
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +21 -24
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +1 -8
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +1 -8
- 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 +4 -14
- package/src/resources/auth-configs.ts +164 -24
- package/src/resources/connected-accounts.ts +80 -17
- package/src/resources/files.ts +56 -23
- package/src/resources/index.ts +2 -7
- package/src/resources/mcp/command.ts +1 -46
- package/src/resources/mcp/index.ts +2 -5
- package/src/resources/mcp/mcp.ts +240 -280
- package/src/resources/migration.ts +11 -2
- package/src/resources/org/api-key.ts +23 -2
- package/src/resources/org/project/api-keys.ts +97 -20
- 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/toolkits.ts +200 -7
- package/src/resources/tools.ts +207 -40
- package/src/resources/trigger-instances/index.ts +0 -3
- package/src/resources/trigger-instances/trigger-instances.ts +22 -38
- 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
|
@@ -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
|
|
package/src/resources/files.ts
CHANGED
|
@@ -6,7 +6,13 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class Files extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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,69 @@ 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"
|
|
80
101
|
*/
|
|
81
102
|
existingUrl: string;
|
|
82
103
|
|
|
83
104
|
/**
|
|
84
|
-
* S3 upload location
|
|
105
|
+
* S3 upload location. Example: "projects/123/files/photo-1234.jpg"
|
|
85
106
|
*/
|
|
86
107
|
key: string;
|
|
87
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Indicates the file already exists and does not need to be uploaded again
|
|
111
|
+
*/
|
|
88
112
|
type: 'existing';
|
|
89
113
|
}
|
|
90
114
|
|
|
91
115
|
export interface UnionMember1 {
|
|
92
116
|
/**
|
|
93
|
-
* ID of the request file
|
|
117
|
+
* ID of the request file. Example: "f1e2d3c4b5a6"
|
|
94
118
|
*/
|
|
95
119
|
id: string;
|
|
96
120
|
|
|
97
121
|
/**
|
|
98
|
-
* S3 upload location
|
|
122
|
+
* S3 upload location. Example: "projects/123/files/photo-1234.jpg"
|
|
99
123
|
*/
|
|
100
124
|
key: string;
|
|
101
125
|
|
|
102
126
|
/**
|
|
103
|
-
* Presigned URL for upload
|
|
127
|
+
* Presigned URL for upload. Example:
|
|
128
|
+
* "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
|
|
104
129
|
*/
|
|
105
130
|
newPresignedUrl: string;
|
|
106
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Indicates this is a new file that needs to be uploaded
|
|
134
|
+
*/
|
|
107
135
|
type: 'new';
|
|
108
136
|
}
|
|
109
137
|
|
|
110
138
|
export interface UnionMember2 {
|
|
111
139
|
/**
|
|
112
|
-
* ID of the request file
|
|
140
|
+
* ID of the request file. Example: "f1e2d3c4b5a6"
|
|
113
141
|
*/
|
|
114
142
|
id: string;
|
|
115
143
|
|
|
116
144
|
/**
|
|
117
|
-
* S3 upload location
|
|
145
|
+
* S3 upload location. Example: "projects/123/files/photo-1234.jpg"
|
|
118
146
|
*/
|
|
119
147
|
key: string;
|
|
120
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Indicates this file exists but needs to be updated with a new version
|
|
151
|
+
*/
|
|
121
152
|
type: 'update';
|
|
122
153
|
|
|
123
154
|
/**
|
|
124
|
-
* Presigned URL for upload
|
|
155
|
+
* Presigned URL for upload. Example:
|
|
156
|
+
* "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
|
|
125
157
|
*/
|
|
126
158
|
updatePresignedUrl: string;
|
|
127
159
|
}
|
|
@@ -129,39 +161,40 @@ export namespace FileCreatePresignedURLResponse {
|
|
|
129
161
|
|
|
130
162
|
export interface FileListParams {
|
|
131
163
|
/**
|
|
132
|
-
*
|
|
164
|
+
* Filter files by action slug. Example: "convert-to-pdf"
|
|
133
165
|
*/
|
|
134
166
|
tool_slug?: string;
|
|
135
167
|
|
|
136
168
|
/**
|
|
137
|
-
*
|
|
169
|
+
* Filter files by app slug. Example: "file-converter"
|
|
138
170
|
*/
|
|
139
171
|
toolkit_slug?: string;
|
|
140
172
|
}
|
|
141
173
|
|
|
142
174
|
export interface FileCreatePresignedURLParams {
|
|
143
175
|
/**
|
|
144
|
-
* Name of the original file.
|
|
176
|
+
* Name of the original file. Example: "photo.jpg"
|
|
145
177
|
*/
|
|
146
178
|
filename: string;
|
|
147
179
|
|
|
148
180
|
/**
|
|
149
|
-
* MD5 of
|
|
181
|
+
* MD5 hash of the file for deduplication and integrity verification. Example:
|
|
182
|
+
* "d41d8cd98f00b204e9800998ecf8427e"
|
|
150
183
|
*/
|
|
151
184
|
md5: string;
|
|
152
185
|
|
|
153
186
|
/**
|
|
154
|
-
* Mime type of the original file.
|
|
187
|
+
* Mime type of the original file. Example: "image/jpeg"
|
|
155
188
|
*/
|
|
156
189
|
mimetype: string;
|
|
157
190
|
|
|
158
191
|
/**
|
|
159
|
-
* Slug of the action where this file belongs to.
|
|
192
|
+
* Slug of the action where this file belongs to. Example: "resize-image"
|
|
160
193
|
*/
|
|
161
194
|
tool_slug: string;
|
|
162
195
|
|
|
163
196
|
/**
|
|
164
|
-
* Slug of the app where this file belongs to.
|
|
197
|
+
* Slug of the app where this file belongs to. Example: "image-processing"
|
|
165
198
|
*/
|
|
166
199
|
toolkit_slug: string;
|
|
167
200
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -34,16 +34,13 @@ export {
|
|
|
34
34
|
} from './files';
|
|
35
35
|
export {
|
|
36
36
|
Mcp,
|
|
37
|
-
type McpCreateResponse,
|
|
38
37
|
type McpRetrieveResponse,
|
|
39
38
|
type McpUpdateResponse,
|
|
40
|
-
type McpListResponse,
|
|
41
39
|
type McpDeleteResponse,
|
|
42
40
|
type McpRetrieveAppResponse,
|
|
43
41
|
type McpValidateResponse,
|
|
44
|
-
type McpCreateParams,
|
|
45
42
|
type McpUpdateParams,
|
|
46
|
-
type
|
|
43
|
+
type McpRetrieveAppParams,
|
|
47
44
|
type McpValidateParams,
|
|
48
45
|
} from './mcp/mcp';
|
|
49
46
|
export {
|
|
@@ -67,6 +64,7 @@ export {
|
|
|
67
64
|
type ToolkitListResponse,
|
|
68
65
|
type ToolkitRetrieveCategoriesResponse,
|
|
69
66
|
type ToolkitListParams,
|
|
67
|
+
type ToolkitRetrieveCategoriesParams,
|
|
70
68
|
} from './toolkits';
|
|
71
69
|
export {
|
|
72
70
|
Tools,
|
|
@@ -84,11 +82,8 @@ export {
|
|
|
84
82
|
export {
|
|
85
83
|
TriggerInstances,
|
|
86
84
|
type TriggerInstanceListActiveResponse,
|
|
87
|
-
type TriggerInstanceRemoveUpsertResponse,
|
|
88
|
-
type TriggerInstanceUpdateStatusResponse,
|
|
89
85
|
type TriggerInstanceUpsertResponse,
|
|
90
86
|
type TriggerInstanceListActiveParams,
|
|
91
|
-
type TriggerInstanceUpdateStatusParams,
|
|
92
87
|
type TriggerInstanceUpsertParams,
|
|
93
88
|
} from './trigger-instances/trigger-instances';
|
|
94
89
|
export {
|
|
@@ -1,50 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
6
4
|
|
|
7
|
-
export class Command extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Generate CLI command to set up MCP server
|
|
10
|
-
*/
|
|
11
|
-
generate(body: CommandGenerateParams, options?: RequestOptions): APIPromise<CommandGenerateResponse> {
|
|
12
|
-
return this._client.post('/api/v3/mcp/command/generate', { body, ...options });
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface CommandGenerateResponse {
|
|
17
|
-
/**
|
|
18
|
-
* The generated command to run
|
|
19
|
-
*/
|
|
20
|
-
command?: string;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* The URL for the MCP server
|
|
24
|
-
*/
|
|
25
|
-
url?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface CommandGenerateParams {
|
|
29
|
-
/**
|
|
30
|
-
* The ID of the MCP server
|
|
31
|
-
*/
|
|
32
|
-
id: string;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* MCP client to generate command for
|
|
36
|
-
*/
|
|
37
|
-
mcp_client: 'cursor' | 'claude' | 'windsurf';
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Time to live for the command
|
|
41
|
-
*/
|
|
42
|
-
ttl?: '1d' | '3d' | '1 month' | 'no expiration';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export declare namespace Command {
|
|
46
|
-
export {
|
|
47
|
-
type CommandGenerateResponse as CommandGenerateResponse,
|
|
48
|
-
type CommandGenerateParams as CommandGenerateParams,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
5
|
+
export class Command extends APIResource {}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { Command
|
|
3
|
+
export { Command } from './command';
|
|
4
4
|
export {
|
|
5
5
|
Mcp,
|
|
6
|
-
type McpCreateResponse,
|
|
7
6
|
type McpRetrieveResponse,
|
|
8
7
|
type McpUpdateResponse,
|
|
9
|
-
type McpListResponse,
|
|
10
8
|
type McpDeleteResponse,
|
|
11
9
|
type McpRetrieveAppResponse,
|
|
12
10
|
type McpValidateResponse,
|
|
13
|
-
type McpCreateParams,
|
|
14
11
|
type McpUpdateParams,
|
|
15
|
-
type
|
|
12
|
+
type McpRetrieveAppParams,
|
|
16
13
|
type McpValidateParams,
|
|
17
14
|
} from './mcp';
|