@composio/client 0.1.0-alpha.55 → 0.1.0-alpha.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/client.d.mts +3 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -2
- package/client.d.ts.map +1 -1
- package/client.js +16 -3
- package/client.js.map +1 -1
- package/client.mjs +16 -3
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +19 -5
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +19 -5
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +8 -2
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +8 -2
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/cli/cli.d.mts +120 -0
- package/resources/cli/cli.d.mts.map +1 -0
- package/resources/cli/cli.d.ts +120 -0
- package/resources/cli/cli.d.ts.map +1 -0
- package/resources/cli/cli.js +36 -0
- package/resources/cli/cli.js.map +1 -0
- package/resources/cli/cli.mjs +31 -0
- package/resources/cli/cli.mjs.map +1 -0
- package/resources/cli/index.d.mts +3 -0
- package/resources/cli/index.d.mts.map +1 -0
- package/resources/cli/index.d.ts +3 -0
- package/resources/cli/index.d.ts.map +1 -0
- package/resources/cli/index.js +9 -0
- package/resources/cli/index.js.map +1 -0
- package/resources/cli/index.mjs +4 -0
- package/resources/cli/index.mjs.map +1 -0
- package/resources/cli/realtime.d.mts +53 -0
- package/resources/cli/realtime.d.mts.map +1 -0
- package/resources/cli/realtime.d.ts +53 -0
- package/resources/cli/realtime.d.ts.map +1 -0
- package/resources/cli/realtime.js +22 -0
- package/resources/cli/realtime.js.map +1 -0
- package/resources/cli/realtime.mjs +18 -0
- package/resources/cli/realtime.mjs.map +1 -0
- package/resources/cli.d.mts +1 -95
- package/resources/cli.d.mts.map +1 -1
- package/resources/cli.d.ts +1 -95
- package/resources/cli.d.ts.map +1 -1
- package/resources/cli.js +2 -23
- package/resources/cli.js.map +1 -1
- package/resources/cli.mjs +1 -21
- package/resources/cli.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +11 -4
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +11 -4
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +9 -2
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +9 -2
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +42 -111
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +42 -111
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +5 -5
- package/resources/files.mjs +5 -5
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/project/config.d.mts +3 -0
- package/resources/project/config.d.mts.map +1 -1
- package/resources/project/config.d.ts +3 -0
- package/resources/project/config.d.ts.map +1 -1
- package/resources/tool-router/session.d.mts +43 -4
- package/resources/tool-router/session.d.mts.map +1 -1
- package/resources/tool-router/session.d.ts +43 -4
- package/resources/tool-router/session.d.ts.map +1 -1
- package/resources/toolkits.d.mts +4 -8
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +4 -8
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/tools.d.mts +30 -22
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +30 -22
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +11 -2
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +11 -2
- package/resources/tools.mjs.map +1 -1
- package/resources/trigger-instances/manage.d.mts +9 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -1
- package/resources/trigger-instances/manage.d.ts +9 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -1
- package/resources/trigger-instances/manage.js +9 -0
- package/resources/trigger-instances/manage.js.map +1 -1
- package/resources/trigger-instances/manage.mjs +9 -0
- package/resources/trigger-instances/manage.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +11 -4
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +11 -4
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +11 -0
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +11 -0
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/triggers-types.d.mts +0 -8
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +0 -8
- package/resources/triggers-types.d.ts.map +1 -1
- package/src/client.ts +26 -4
- package/src/internal/parse.ts +6 -0
- package/src/resources/auth-configs.ts +24 -5
- package/src/resources/cli/cli.ts +163 -0
- package/src/resources/cli/index.ts +15 -0
- package/src/resources/cli/realtime.ts +72 -0
- package/src/resources/cli.ts +1 -120
- package/src/resources/connected-accounts.ts +13 -4
- package/src/resources/files.ts +43 -130
- package/src/resources/index.ts +2 -1
- package/src/resources/project/config.ts +6 -0
- package/src/resources/tool-router/session.ts +48 -5
- package/src/resources/toolkits.ts +5 -10
- package/src/resources/tools.ts +42 -25
- package/src/resources/trigger-instances/manage.ts +9 -0
- package/src/resources/trigger-instances/trigger-instances.ts +11 -5
- package/src/resources/triggers-types.ts +0 -10
- 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
|
@@ -0,0 +1,72 @@
|
|
|
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 Realtime extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Authenticate CLI client access to a private-cli-{nanoId} Pusher channel
|
|
10
|
+
*/
|
|
11
|
+
auth(body: RealtimeAuthParams, options?: RequestOptions): APIPromise<RealtimeAuthResponse> {
|
|
12
|
+
return this._client.post('/api/v3/cli/realtime/auth', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Get the Pusher key and project nanoId for the CLI realtime trigger channel. The
|
|
17
|
+
* CLI subscribes to private-cli-{project_id}.
|
|
18
|
+
*/
|
|
19
|
+
credentials(options?: RequestOptions): APIPromise<RealtimeCredentialsResponse> {
|
|
20
|
+
return this._client.get('/api/v3/cli/realtime/credentials', options);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface RealtimeAuthResponse {
|
|
25
|
+
/**
|
|
26
|
+
* The authentication string for Pusher
|
|
27
|
+
*/
|
|
28
|
+
auth: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Channel data for presence channels
|
|
32
|
+
*/
|
|
33
|
+
channel_data?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface RealtimeCredentialsResponse {
|
|
37
|
+
/**
|
|
38
|
+
* The project nanoId associated with the API Key provided. Used as part of the CLI
|
|
39
|
+
* channel name: private-cli-{project_id}
|
|
40
|
+
*/
|
|
41
|
+
project_id: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The Pusher cluster for subscribing to the trigger
|
|
45
|
+
*/
|
|
46
|
+
pusher_cluster: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The Pusher client key for subscribing to the trigger
|
|
50
|
+
*/
|
|
51
|
+
pusher_key: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface RealtimeAuthParams {
|
|
55
|
+
/**
|
|
56
|
+
* The channel name to authenticate for
|
|
57
|
+
*/
|
|
58
|
+
channel_name: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The socket ID for Pusher authentication
|
|
62
|
+
*/
|
|
63
|
+
socket_id: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export declare namespace Realtime {
|
|
67
|
+
export {
|
|
68
|
+
type RealtimeAuthResponse as RealtimeAuthResponse,
|
|
69
|
+
type RealtimeCredentialsResponse as RealtimeCredentialsResponse,
|
|
70
|
+
type RealtimeAuthParams as RealtimeAuthParams,
|
|
71
|
+
};
|
|
72
|
+
}
|
package/src/resources/cli.ts
CHANGED
|
@@ -1,122 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../internal/request-options';
|
|
6
|
-
|
|
7
|
-
export class Cli extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Generates a new CLI session with a random 6-character code. This endpoint is the
|
|
10
|
-
* first step in the CLI authentication flow, creating a session that can later be
|
|
11
|
-
* linked to a user account. The generated code is displayed to the user in the CLI
|
|
12
|
-
* and should be entered in the web interface to complete authentication.
|
|
13
|
-
*/
|
|
14
|
-
createSession(options?: RequestOptions): APIPromise<CliCreateSessionResponse> {
|
|
15
|
-
return this._client.post('/api/v3/cli/create-session', options);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves the current state of a CLI session using either the session ID (UUID)
|
|
20
|
-
* or the 6-character code. This endpoint is used by both the CLI client to check
|
|
21
|
-
* if the session has been linked, and by the web interface to display session
|
|
22
|
-
* details before linking.
|
|
23
|
-
*/
|
|
24
|
-
getSession(query: CliGetSessionParams, options?: RequestOptions): APIPromise<CliGetSessionResponse> {
|
|
25
|
-
return this._client.get('/api/v3/cli/get-session', { query, ...options });
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface CliCreateSessionResponse {
|
|
30
|
-
/**
|
|
31
|
-
* Unique identifier for the CLI session. UUID v4 format used for tracking and
|
|
32
|
-
* retrieval.
|
|
33
|
-
*/
|
|
34
|
-
id: string;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* The 6-character hexadecimal code used for CLI login
|
|
38
|
-
*/
|
|
39
|
-
code: string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The ISO timestamp when the session expires
|
|
43
|
-
*/
|
|
44
|
-
expiresAt: string;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The current status of the session
|
|
48
|
-
*/
|
|
49
|
-
status: 'pending' | 'linked';
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface CliGetSessionResponse {
|
|
53
|
-
/**
|
|
54
|
-
* The unique identifier for the CLI session
|
|
55
|
-
*/
|
|
56
|
-
id: string;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Information about the linked account, if any. Null if the session status is
|
|
60
|
-
* "pending".
|
|
61
|
-
*/
|
|
62
|
-
account: CliGetSessionResponse.Account | null;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* The API key for the linked account
|
|
66
|
-
*/
|
|
67
|
-
api_key: string | null;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* The 6-character hexadecimal code used for CLI login
|
|
71
|
-
*/
|
|
72
|
-
code: string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* The ISO timestamp when the session expires
|
|
76
|
-
*/
|
|
77
|
-
expiresAt: string;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* The current status of the session
|
|
81
|
-
*/
|
|
82
|
-
status: 'pending' | 'linked';
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export namespace CliGetSessionResponse {
|
|
86
|
-
/**
|
|
87
|
-
* Information about the linked account, if any. Null if the session status is
|
|
88
|
-
* "pending".
|
|
89
|
-
*/
|
|
90
|
-
export interface Account {
|
|
91
|
-
/**
|
|
92
|
-
* The ID of the linked account
|
|
93
|
-
*/
|
|
94
|
-
id: string;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* The email address of the linked account
|
|
98
|
-
*/
|
|
99
|
-
email: string;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* The display name of the linked account
|
|
103
|
-
*/
|
|
104
|
-
name: string;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface CliGetSessionParams {
|
|
109
|
-
/**
|
|
110
|
-
* CLI session ID (UUID format) or 6-character code to check. Both formats are
|
|
111
|
-
* supported for flexibility in client implementations.
|
|
112
|
-
*/
|
|
113
|
-
id: string;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export declare namespace Cli {
|
|
117
|
-
export {
|
|
118
|
-
type CliCreateSessionResponse as CliCreateSessionResponse,
|
|
119
|
-
type CliGetSessionResponse as CliGetSessionResponse,
|
|
120
|
-
type CliGetSessionParams as CliGetSessionParams,
|
|
121
|
-
};
|
|
122
|
-
}
|
|
3
|
+
export * from './cli/index';
|
|
@@ -7,7 +7,11 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class ConnectedAccounts extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Initiates a new connection to an external service for a user. For OAuth-based
|
|
11
|
+
* toolkits, this returns a redirect URL to complete authentication. For API
|
|
12
|
+
* key-based toolkits, provide the credentials directly in the request body. Use
|
|
13
|
+
* the `user_id` field to associate the connection with a specific user in your
|
|
14
|
+
* system.
|
|
11
15
|
*
|
|
12
16
|
* @example
|
|
13
17
|
* ```ts
|
|
@@ -42,7 +46,10 @@ export class ConnectedAccounts extends APIResource {
|
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
/**
|
|
45
|
-
*
|
|
49
|
+
* Retrieves all connected accounts for your project. Connected accounts represent
|
|
50
|
+
* authenticated user connections to external services (e.g., a user's Gmail
|
|
51
|
+
* account, Slack workspace). Filter by toolkit, status, user ID, or auth config to
|
|
52
|
+
* find specific connections.
|
|
46
53
|
*
|
|
47
54
|
* @example
|
|
48
55
|
* ```ts
|
|
@@ -4280,7 +4287,8 @@ export namespace ConnectedAccountRetrieveResponse {
|
|
|
4280
4287
|
| 'CALCOM_AUTH'
|
|
4281
4288
|
| 'SERVICE_ACCOUNT'
|
|
4282
4289
|
| 'SAML'
|
|
4283
|
-
| 'DCR_OAUTH'
|
|
4290
|
+
| 'DCR_OAUTH'
|
|
4291
|
+
| 'S2S_OAUTH2';
|
|
4284
4292
|
|
|
4285
4293
|
/**
|
|
4286
4294
|
* Whether the auth config is managed by Composio
|
|
@@ -8436,7 +8444,8 @@ export namespace ConnectedAccountListResponse {
|
|
|
8436
8444
|
| 'CALCOM_AUTH'
|
|
8437
8445
|
| 'SERVICE_ACCOUNT'
|
|
8438
8446
|
| 'SAML'
|
|
8439
|
-
| 'DCR_OAUTH'
|
|
8447
|
+
| 'DCR_OAUTH'
|
|
8448
|
+
| 'S2S_OAUTH2';
|
|
8440
8449
|
|
|
8441
8450
|
/**
|
|
8442
8451
|
* Whether the auth config is managed by Composio
|
package/src/resources/files.ts
CHANGED
|
@@ -28,11 +28,11 @@ export class Files extends APIResource {
|
|
|
28
28
|
* @example
|
|
29
29
|
* ```ts
|
|
30
30
|
* const response = await client.files.createPresignedURL({
|
|
31
|
-
* filename: '
|
|
32
|
-
* md5: '
|
|
33
|
-
* mimetype: '
|
|
34
|
-
* tool_slug: '
|
|
35
|
-
* toolkit_slug: '
|
|
31
|
+
* filename: 'quarterly_report.pdf',
|
|
32
|
+
* md5: 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6',
|
|
33
|
+
* mimetype: 'application/pdf',
|
|
34
|
+
* tool_slug: 'GMAIL_SEND_EMAIL',
|
|
35
|
+
* toolkit_slug: 'gmail',
|
|
36
36
|
* });
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
@@ -87,134 +87,46 @@ export namespace FileListResponse {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
export namespace FileCreatePresignedURLResponse {
|
|
96
|
-
export interface UnionMember0 {
|
|
97
|
-
/**
|
|
98
|
-
* ID of the request file. Example: "f1e2d3c4b5a6"
|
|
99
|
-
*/
|
|
100
|
-
id: string;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* URL of the existing request file. Example:
|
|
104
|
-
* "https://storage.example.com/projects/123/files/photo-1234.jpg"
|
|
105
|
-
*/
|
|
106
|
-
existing_url: string;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* [DEPRECATED] Use existing_url instead. URL of the existing request file.
|
|
110
|
-
* Example: "https://storage.example.com/projects/123/files/photo-1234.jpg"
|
|
111
|
-
*/
|
|
112
|
-
existingUrl: string;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* S3 upload location. Example: "projects/123/files/photo-1234.jpg"
|
|
116
|
-
*/
|
|
117
|
-
key: string;
|
|
118
|
-
|
|
119
|
-
metadata: UnionMember0.Metadata;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Indicates the file already exists and does not need to be uploaded again
|
|
123
|
-
*/
|
|
124
|
-
type: 'existing';
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export namespace UnionMember0 {
|
|
128
|
-
export interface Metadata {
|
|
129
|
-
/**
|
|
130
|
-
* Storage backend used for the file. If this is azure, use `x-ms-blob-type` header
|
|
131
|
-
* to set the blob type to `BlockBlob` while uploading the file
|
|
132
|
-
*/
|
|
133
|
-
storage_backend: 's3' | 'azure_blob_storage';
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface UnionMember1 {
|
|
138
|
-
/**
|
|
139
|
-
* ID of the request file. Example: "f1e2d3c4b5a6"
|
|
140
|
-
*/
|
|
141
|
-
id: string;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* S3 upload location. Example: "projects/123/files/photo-1234.jpg"
|
|
145
|
-
*/
|
|
146
|
-
key: string;
|
|
147
|
-
|
|
148
|
-
metadata: UnionMember1.Metadata;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Presigned URL for upload. Example:
|
|
152
|
-
* "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
|
|
153
|
-
*/
|
|
154
|
-
new_presigned_url: string;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* [DEPRECATED] Use new_presigned_url instead. Presigned URL for upload. Example:
|
|
158
|
-
* "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
|
|
159
|
-
*/
|
|
160
|
-
newPresignedUrl: string;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Indicates this is a new file that needs to be uploaded
|
|
164
|
-
*/
|
|
165
|
-
type: 'new';
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export namespace UnionMember1 {
|
|
169
|
-
export interface Metadata {
|
|
170
|
-
/**
|
|
171
|
-
* Storage backend used for the file. If this is azure, use `x-ms-blob-type` header
|
|
172
|
-
* to set the blob type to `BlockBlob` while uploading the file
|
|
173
|
-
*/
|
|
174
|
-
storage_backend: 's3' | 'azure_blob_storage';
|
|
175
|
-
}
|
|
176
|
-
}
|
|
90
|
+
export interface FileCreatePresignedURLResponse {
|
|
91
|
+
/**
|
|
92
|
+
* ID of the request file. Example: "req_file_9mZn4qR8sXwT"
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
177
95
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Object storage upload location. Example:
|
|
98
|
+
* "projects/prj_xyz789/requests/slack/SLACK_UPLOAD_FILE/document_9mZn4q.docx"
|
|
99
|
+
*/
|
|
100
|
+
key: string;
|
|
183
101
|
|
|
184
|
-
|
|
185
|
-
* S3 upload location. Example: "projects/123/files/photo-1234.jpg"
|
|
186
|
-
*/
|
|
187
|
-
key: string;
|
|
102
|
+
metadata: FileCreatePresignedURLResponse.Metadata;
|
|
188
103
|
|
|
189
|
-
|
|
104
|
+
/**
|
|
105
|
+
* Presigned URL for upload. Example:
|
|
106
|
+
* "https://storage.composio.dev/projects/prj_xyz789/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
|
|
107
|
+
*/
|
|
108
|
+
new_presigned_url: string;
|
|
190
109
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated [DEPRECATED] Use new_presigned_url instead. Presigned URL for
|
|
112
|
+
* upload. Example:
|
|
113
|
+
* "https://storage.composio.dev/projects/prj_xyz789/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
|
|
114
|
+
*/
|
|
115
|
+
newPresignedUrl: string;
|
|
195
116
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
117
|
+
/**
|
|
118
|
+
* @deprecated [DEPRECATED] Indicates this is a new file that needs to be uploaded
|
|
119
|
+
*/
|
|
120
|
+
type: 'new';
|
|
121
|
+
}
|
|
201
122
|
|
|
123
|
+
export namespace FileCreatePresignedURLResponse {
|
|
124
|
+
export interface Metadata {
|
|
202
125
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* "https://storage.example.com/projects/123/files/photo-1234.jpg?X-Amz-Algorithm=..."
|
|
126
|
+
* Storage backend used for the file. If this is azure, use `x-ms-blob-type` header
|
|
127
|
+
* to set the blob type to `BlockBlob` while uploading the file
|
|
206
128
|
*/
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
export namespace UnionMember2 {
|
|
211
|
-
export interface Metadata {
|
|
212
|
-
/**
|
|
213
|
-
* Storage backend used for the file. If this is azure, use `x-ms-blob-type` header
|
|
214
|
-
* to set the blob type to `BlockBlob` while uploading the file
|
|
215
|
-
*/
|
|
216
|
-
storage_backend: 's3' | 'azure_blob_storage';
|
|
217
|
-
}
|
|
129
|
+
storage_backend: 's3' | 'azure_blob_storage';
|
|
218
130
|
}
|
|
219
131
|
}
|
|
220
132
|
|
|
@@ -245,28 +157,29 @@ export interface FileListParams {
|
|
|
245
157
|
|
|
246
158
|
export interface FileCreatePresignedURLParams {
|
|
247
159
|
/**
|
|
248
|
-
* Name of the original file. Example: "
|
|
160
|
+
* Name of the original file. Example: "quarterly_report.pdf"
|
|
249
161
|
*/
|
|
250
162
|
filename: string;
|
|
251
163
|
|
|
252
164
|
/**
|
|
253
165
|
* MD5 hash of the file for deduplication and integrity verification. Example:
|
|
254
|
-
* "
|
|
166
|
+
* "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
|
|
255
167
|
*/
|
|
256
168
|
md5: string;
|
|
257
169
|
|
|
258
170
|
/**
|
|
259
|
-
* Mime type of the original file. Example: "image/
|
|
171
|
+
* Mime type of the original file. Example: "application/pdf", "image/png"
|
|
260
172
|
*/
|
|
261
173
|
mimetype: string;
|
|
262
174
|
|
|
263
175
|
/**
|
|
264
|
-
* Slug of the action where this file belongs to. Example: "
|
|
176
|
+
* Slug of the action where this file belongs to. Example: "GMAIL_SEND_EMAIL",
|
|
177
|
+
* "SLACK_UPLOAD_FILE"
|
|
265
178
|
*/
|
|
266
179
|
tool_slug: string;
|
|
267
180
|
|
|
268
181
|
/**
|
|
269
|
-
* Slug of the app where this file belongs to. Example: "
|
|
182
|
+
* Slug of the app where this file belongs to. Example: "gmail", "slack", "github"
|
|
270
183
|
*/
|
|
271
184
|
toolkit_slug: string;
|
|
272
185
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -17,8 +17,9 @@ export {
|
|
|
17
17
|
Cli,
|
|
18
18
|
type CliCreateSessionResponse,
|
|
19
19
|
type CliGetSessionResponse,
|
|
20
|
+
type CliCreateSessionParams,
|
|
20
21
|
type CliGetSessionParams,
|
|
21
|
-
} from './cli';
|
|
22
|
+
} from './cli/cli';
|
|
22
23
|
export {
|
|
23
24
|
ConnectedAccounts,
|
|
24
25
|
type ConnectedAccountCreateResponse,
|
|
@@ -53,6 +53,8 @@ export interface ConfigRetrieveResponse {
|
|
|
53
53
|
logo_url?: string;
|
|
54
54
|
|
|
55
55
|
require_mcp_api_key?: boolean;
|
|
56
|
+
|
|
57
|
+
signed_url_file_expiry_in_seconds?: number;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
export interface ConfigUpdateResponse {
|
|
@@ -73,6 +75,8 @@ export interface ConfigUpdateResponse {
|
|
|
73
75
|
logo_url?: string;
|
|
74
76
|
|
|
75
77
|
require_mcp_api_key?: boolean;
|
|
78
|
+
|
|
79
|
+
signed_url_file_expiry_in_seconds?: number;
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
export interface ConfigUpdateParams {
|
|
@@ -93,6 +97,8 @@ export interface ConfigUpdateParams {
|
|
|
93
97
|
mask_secret_keys_in_connected_account?: boolean;
|
|
94
98
|
|
|
95
99
|
require_mcp_api_key?: boolean;
|
|
100
|
+
|
|
101
|
+
signed_url_file_expiry_in_seconds?: number;
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
export declare namespace Config {
|
|
@@ -163,6 +163,12 @@ export interface SessionCreateResponse {
|
|
|
163
163
|
* List of available tools in this session
|
|
164
164
|
*/
|
|
165
165
|
tool_router_tools: Array<string>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Experimental features including the generated system prompt. Only returned on
|
|
169
|
+
* session creation, not on GET.
|
|
170
|
+
*/
|
|
171
|
+
experimental?: SessionCreateResponse.Experimental;
|
|
166
172
|
}
|
|
167
173
|
|
|
168
174
|
export namespace SessionCreateResponse {
|
|
@@ -314,6 +320,18 @@ export namespace SessionCreateResponse {
|
|
|
314
320
|
*/
|
|
315
321
|
url: string;
|
|
316
322
|
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Experimental features including the generated system prompt. Only returned on
|
|
326
|
+
* session creation, not on GET.
|
|
327
|
+
*/
|
|
328
|
+
export interface Experimental {
|
|
329
|
+
/**
|
|
330
|
+
* The assistive system prompt to inject into your agent for optimal tool router
|
|
331
|
+
* usage
|
|
332
|
+
*/
|
|
333
|
+
assistive_prompt: string;
|
|
334
|
+
}
|
|
317
335
|
}
|
|
318
336
|
|
|
319
337
|
export interface SessionRetrieveResponse {
|
|
@@ -713,11 +731,6 @@ export namespace SessionToolsResponse {
|
|
|
713
731
|
*/
|
|
714
732
|
slug: string;
|
|
715
733
|
|
|
716
|
-
/**
|
|
717
|
-
* Lifecycle status of the tool
|
|
718
|
-
*/
|
|
719
|
-
status: string;
|
|
720
|
-
|
|
721
734
|
/**
|
|
722
735
|
* List of tags associated with the tool for categorization and filtering
|
|
723
736
|
*/
|
|
@@ -804,6 +817,12 @@ export interface SessionCreateParams {
|
|
|
804
817
|
*/
|
|
805
818
|
connected_accounts?: { [key: string]: string };
|
|
806
819
|
|
|
820
|
+
/**
|
|
821
|
+
* Experimental features - not stable, may be modified or removed in future
|
|
822
|
+
* versions.
|
|
823
|
+
*/
|
|
824
|
+
experimental?: SessionCreateParams.Experimental;
|
|
825
|
+
|
|
807
826
|
/**
|
|
808
827
|
* Configuration for connection management settings
|
|
809
828
|
*/
|
|
@@ -840,6 +859,30 @@ export interface SessionCreateParams {
|
|
|
840
859
|
}
|
|
841
860
|
|
|
842
861
|
export namespace SessionCreateParams {
|
|
862
|
+
/**
|
|
863
|
+
* Experimental features - not stable, may be modified or removed in future
|
|
864
|
+
* versions.
|
|
865
|
+
*/
|
|
866
|
+
export interface Experimental {
|
|
867
|
+
/**
|
|
868
|
+
* Customize assistive prompt generation (e.g., timezone).
|
|
869
|
+
*/
|
|
870
|
+
assistive_prompt_config?: Experimental.AssistivePromptConfig;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
export namespace Experimental {
|
|
874
|
+
/**
|
|
875
|
+
* Customize assistive prompt generation (e.g., timezone).
|
|
876
|
+
*/
|
|
877
|
+
export interface AssistivePromptConfig {
|
|
878
|
+
/**
|
|
879
|
+
* IANA timezone identifier (e.g., 'America/New_York', 'Europe/London'). Used to
|
|
880
|
+
* customize the system prompt with timezone-aware instructions.
|
|
881
|
+
*/
|
|
882
|
+
user_timezone?: string;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
|
|
843
886
|
/**
|
|
844
887
|
* Configuration for connection management settings
|
|
845
888
|
*/
|
|
@@ -78,11 +78,6 @@ export interface ToolkitRetrieveResponse {
|
|
|
78
78
|
*/
|
|
79
79
|
slug: string;
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
* Lifecycle status of the toolkit
|
|
83
|
-
*/
|
|
84
|
-
status: string;
|
|
85
|
-
|
|
86
81
|
/**
|
|
87
82
|
* Complete authentication configuration details for each supported auth method
|
|
88
83
|
*/
|
|
@@ -103,6 +98,11 @@ export interface ToolkitRetrieveResponse {
|
|
|
103
98
|
* Endpoint to get the current user
|
|
104
99
|
*/
|
|
105
100
|
get_current_user_endpoint?: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* HTTP method to use when calling the get current user endpoint (e.g., GET, POST)
|
|
104
|
+
*/
|
|
105
|
+
get_current_user_endpoint_method?: string;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export namespace ToolkitRetrieveResponse {
|
|
@@ -387,11 +387,6 @@ export namespace ToolkitListResponse {
|
|
|
387
387
|
*/
|
|
388
388
|
slug: string;
|
|
389
389
|
|
|
390
|
-
/**
|
|
391
|
-
* Lifecycle status of the toolkit
|
|
392
|
-
*/
|
|
393
|
-
status: string;
|
|
394
|
-
|
|
395
390
|
/**
|
|
396
391
|
* List of authentication methods supported by this toolkit
|
|
397
392
|
*/
|