@composio/client 0.1.0-alpha.56 → 0.1.0-alpha.58
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 +44 -0
- package/client.d.mts +6 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -2
- package/client.d.ts.map +1 -1
- package/client.js +19 -3
- package/client.js.map +1 -1
- package/client.mjs +19 -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/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/logs/index.d.mts +4 -0
- package/resources/logs/index.d.mts.map +1 -0
- package/resources/logs/index.d.ts +4 -0
- package/resources/logs/index.d.ts.map +1 -0
- package/resources/logs/index.js +11 -0
- package/resources/logs/index.js.map +1 -0
- package/resources/logs/index.mjs +5 -0
- package/resources/logs/index.mjs.map +1 -0
- package/resources/logs/logs.d.mts +14 -0
- package/resources/logs/logs.d.mts.map +1 -0
- package/resources/logs/logs.d.ts +14 -0
- package/resources/logs/logs.d.ts.map +1 -0
- package/resources/logs/logs.js +21 -0
- package/resources/logs/logs.js.map +1 -0
- package/resources/logs/logs.mjs +16 -0
- package/resources/logs/logs.mjs.map +1 -0
- package/resources/logs/tools.d.mts +151 -0
- package/resources/logs/tools.d.mts.map +1 -0
- package/resources/logs/tools.d.ts +151 -0
- package/resources/logs/tools.d.ts.map +1 -0
- package/resources/logs/tools.js +33 -0
- package/resources/logs/tools.js.map +1 -0
- package/resources/logs/tools.mjs +29 -0
- package/resources/logs/tools.mjs.map +1 -0
- package/resources/logs/triggers.d.mts +109 -0
- package/resources/logs/triggers.d.mts.map +1 -0
- package/resources/logs/triggers.d.ts +109 -0
- package/resources/logs/triggers.d.ts.map +1 -0
- package/resources/logs/triggers.js +21 -0
- package/resources/logs/triggers.js.map +1 -0
- package/resources/logs/triggers.mjs +17 -0
- package/resources/logs/triggers.mjs.map +1 -0
- package/resources/logs.d.mts +2 -0
- package/resources/logs.d.mts.map +1 -0
- package/resources/logs.d.ts +2 -0
- package/resources/logs.d.ts.map +1 -0
- package/resources/logs.js +6 -0
- package/resources/logs.js.map +1 -0
- package/resources/logs.mjs +3 -0
- package/resources/logs.mjs.map +1 -0
- package/resources/tool-router/index.d.mts +1 -1
- package/resources/tool-router/index.d.mts.map +1 -1
- package/resources/tool-router/index.d.ts +1 -1
- package/resources/tool-router/index.d.ts.map +1 -1
- package/resources/tool-router/index.js.map +1 -1
- package/resources/tool-router/index.mjs.map +1 -1
- package/resources/tool-router/session.d.mts +293 -5
- package/resources/tool-router/session.d.mts.map +1 -1
- package/resources/tool-router/session.d.ts +293 -5
- package/resources/tool-router/session.d.ts.map +1 -1
- package/resources/tool-router/session.js +20 -0
- package/resources/tool-router/session.js.map +1 -1
- package/resources/tool-router/session.mjs +20 -0
- package/resources/tool-router/session.mjs.map +1 -1
- package/resources/tool-router/tool-router.d.mts +2 -2
- package/resources/tool-router/tool-router.d.mts.map +1 -1
- package/resources/tool-router/tool-router.d.ts +2 -2
- package/resources/tool-router/tool-router.d.ts.map +1 -1
- package/resources/tool-router/tool-router.js.map +1 -1
- package/resources/tool-router/tool-router.mjs.map +1 -1
- package/resources/toolkits.d.mts +0 -8
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +0 -8
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/tools.d.mts +38 -22
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +38 -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 -0
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +11 -0
- 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 +31 -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/index.ts +3 -1
- package/src/resources/logs/index.ts +11 -0
- package/src/resources/logs/logs.ts +31 -0
- package/src/resources/logs/tools.ts +214 -0
- package/src/resources/logs/triggers.ts +157 -0
- package/src/resources/logs.ts +3 -0
- package/src/resources/tool-router/index.ts +2 -0
- package/src/resources/tool-router/session.ts +340 -5
- package/src/resources/tool-router/tool-router.ts +4 -0
- package/src/resources/toolkits.ts +0 -10
- package/src/resources/tools.ts +52 -25
- package/src/resources/trigger-instances/manage.ts +9 -0
- package/src/resources/trigger-instances/trigger-instances.ts +11 -0
- 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,163 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as RealtimeAPI from './realtime';
|
|
5
|
+
import { Realtime, RealtimeAuthParams, RealtimeAuthResponse, RealtimeCredentialsResponse } from './realtime';
|
|
6
|
+
import { APIPromise } from '../../core/api-promise';
|
|
7
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
8
|
+
|
|
9
|
+
export class Cli extends APIResource {
|
|
10
|
+
realtime: RealtimeAPI.Realtime = new RealtimeAPI.Realtime(this._client);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Generates a new CLI session with a random 6-character code. This endpoint is the
|
|
14
|
+
* first step in the CLI authentication flow, creating a session that can later be
|
|
15
|
+
* linked to a user account. The generated code is displayed to the user in the CLI
|
|
16
|
+
* and should be entered in the web interface to complete authentication.
|
|
17
|
+
* Optionally accepts a scope ('project' or 'user') and a source string.
|
|
18
|
+
*/
|
|
19
|
+
createSession(
|
|
20
|
+
body: CliCreateSessionParams | null | undefined = {},
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): APIPromise<CliCreateSessionResponse> {
|
|
23
|
+
return this._client.post('/api/v3/cli/create-session', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves the current state of a CLI session using either the session ID (UUID)
|
|
28
|
+
* or the 6-character code. This endpoint is used by both the CLI client to check
|
|
29
|
+
* if the session has been linked, and by the web interface to display session
|
|
30
|
+
* details before linking.
|
|
31
|
+
*/
|
|
32
|
+
getSession(query: CliGetSessionParams, options?: RequestOptions): APIPromise<CliGetSessionResponse> {
|
|
33
|
+
return this._client.get('/api/v3/cli/get-session', { query, ...options });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface CliCreateSessionResponse {
|
|
38
|
+
/**
|
|
39
|
+
* Unique identifier for the CLI session. UUID v4 format used for tracking and
|
|
40
|
+
* retrieval.
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The 6-character hexadecimal code used for CLI login
|
|
46
|
+
*/
|
|
47
|
+
code: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The ISO timestamp when the session expires
|
|
51
|
+
*/
|
|
52
|
+
expiresAt: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The key scope for this session
|
|
56
|
+
*/
|
|
57
|
+
scope: 'project' | 'user';
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The current status of the session
|
|
61
|
+
*/
|
|
62
|
+
status: 'pending' | 'linked';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface CliGetSessionResponse {
|
|
66
|
+
/**
|
|
67
|
+
* The unique identifier for the CLI session
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Information about the linked account, if any. Null if the session status is
|
|
73
|
+
* "pending".
|
|
74
|
+
*/
|
|
75
|
+
account: CliGetSessionResponse.Account | null;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The API key for the linked account
|
|
79
|
+
*/
|
|
80
|
+
api_key: string | null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The 6-character hexadecimal code used for CLI login
|
|
84
|
+
*/
|
|
85
|
+
code: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The ISO timestamp when the session expires
|
|
89
|
+
*/
|
|
90
|
+
expiresAt: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The key scope for this session
|
|
94
|
+
*/
|
|
95
|
+
scope: 'project' | 'user' | null;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The current status of the session
|
|
99
|
+
*/
|
|
100
|
+
status: 'pending' | 'linked';
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export namespace CliGetSessionResponse {
|
|
104
|
+
/**
|
|
105
|
+
* Information about the linked account, if any. Null if the session status is
|
|
106
|
+
* "pending".
|
|
107
|
+
*/
|
|
108
|
+
export interface Account {
|
|
109
|
+
/**
|
|
110
|
+
* The ID of the linked account
|
|
111
|
+
*/
|
|
112
|
+
id: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The email address of the linked account
|
|
116
|
+
*/
|
|
117
|
+
email: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The display name of the linked account
|
|
121
|
+
*/
|
|
122
|
+
name: string;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface CliCreateSessionParams {
|
|
127
|
+
/**
|
|
128
|
+
* Key scope. 'project' (default) returns a project-level API key; 'user' returns a
|
|
129
|
+
* user-level API key valid across projects.
|
|
130
|
+
*/
|
|
131
|
+
scope?: 'project' | 'user';
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Free-form string describing the source, e.g. 'Johns MacBook (darwin, v1.2.3)'
|
|
135
|
+
*/
|
|
136
|
+
source?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface CliGetSessionParams {
|
|
140
|
+
/**
|
|
141
|
+
* CLI session ID (UUID format) or 6-character code to check. Both formats are
|
|
142
|
+
* supported for flexibility in client implementations.
|
|
143
|
+
*/
|
|
144
|
+
id: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
Cli.Realtime = Realtime;
|
|
148
|
+
|
|
149
|
+
export declare namespace Cli {
|
|
150
|
+
export {
|
|
151
|
+
type CliCreateSessionResponse as CliCreateSessionResponse,
|
|
152
|
+
type CliGetSessionResponse as CliGetSessionResponse,
|
|
153
|
+
type CliCreateSessionParams as CliCreateSessionParams,
|
|
154
|
+
type CliGetSessionParams as CliGetSessionParams,
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export {
|
|
158
|
+
Realtime as Realtime,
|
|
159
|
+
type RealtimeAuthResponse as RealtimeAuthResponse,
|
|
160
|
+
type RealtimeCredentialsResponse as RealtimeCredentialsResponse,
|
|
161
|
+
type RealtimeAuthParams as RealtimeAuthParams,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Cli,
|
|
5
|
+
type CliCreateSessionResponse,
|
|
6
|
+
type CliGetSessionResponse,
|
|
7
|
+
type CliCreateSessionParams,
|
|
8
|
+
type CliGetSessionParams,
|
|
9
|
+
} from './cli';
|
|
10
|
+
export {
|
|
11
|
+
Realtime,
|
|
12
|
+
type RealtimeAuthResponse,
|
|
13
|
+
type RealtimeCredentialsResponse,
|
|
14
|
+
type RealtimeAuthParams,
|
|
15
|
+
} from './realtime';
|
|
@@ -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/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,
|
|
@@ -40,6 +41,7 @@ export {
|
|
|
40
41
|
type FileCreatePresignedURLParams,
|
|
41
42
|
} from './files';
|
|
42
43
|
export { Link, type LinkCreateResponse, type LinkCreateParams } from './link';
|
|
44
|
+
export { Logs } from './logs/logs';
|
|
43
45
|
export {
|
|
44
46
|
Mcp,
|
|
45
47
|
type McpCreateResponse,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export { Logs } from './logs';
|
|
4
|
+
export {
|
|
5
|
+
Tools,
|
|
6
|
+
type ToolRetrieveResponse,
|
|
7
|
+
type ToolListResponse,
|
|
8
|
+
type ToolRetrieveParams,
|
|
9
|
+
type ToolListParams,
|
|
10
|
+
} from './tools';
|
|
11
|
+
export { Triggers, type TriggerListResponse, type TriggerListParams } from './triggers';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as ToolsAPI from './tools';
|
|
5
|
+
import { ToolListParams, ToolListResponse, ToolRetrieveParams, ToolRetrieveResponse, Tools } from './tools';
|
|
6
|
+
import * as TriggersAPI from './triggers';
|
|
7
|
+
import { TriggerListParams, TriggerListResponse, Triggers } from './triggers';
|
|
8
|
+
|
|
9
|
+
export class Logs extends APIResource {
|
|
10
|
+
triggers: TriggersAPI.Triggers = new TriggersAPI.Triggers(this._client);
|
|
11
|
+
tools: ToolsAPI.Tools = new ToolsAPI.Tools(this._client);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
Logs.Triggers = Triggers;
|
|
15
|
+
Logs.Tools = Tools;
|
|
16
|
+
|
|
17
|
+
export declare namespace Logs {
|
|
18
|
+
export {
|
|
19
|
+
Triggers as Triggers,
|
|
20
|
+
type TriggerListResponse as TriggerListResponse,
|
|
21
|
+
type TriggerListParams as TriggerListParams,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
Tools as Tools,
|
|
26
|
+
type ToolRetrieveResponse as ToolRetrieveResponse,
|
|
27
|
+
type ToolListResponse as ToolListResponse,
|
|
28
|
+
type ToolRetrieveParams as ToolRetrieveParams,
|
|
29
|
+
type ToolListParams as ToolListParams,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
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 Tools extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Search and retrieve action execution logs
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const tool = await client.logs.tools.retrieve({
|
|
14
|
+
* cursor: 0,
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
retrieve(body: ToolRetrieveParams, options?: RequestOptions): APIPromise<ToolRetrieveResponse> {
|
|
19
|
+
return this._client.post('/api/v3/internal/action_execution/logs', { body, ...options });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Search and retrieve action execution logs
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const tools = await client.logs.tools.list({ cursor: 0 });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
list(body: ToolListParams, options?: RequestOptions): APIPromise<ToolListResponse> {
|
|
31
|
+
return this._client.post('/api/v3/internal/action_execution/logs', { body, ...options });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ToolRetrieveResponse {
|
|
36
|
+
data: Array<ToolRetrieveResponse.Data>;
|
|
37
|
+
|
|
38
|
+
nextCursor: number | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export namespace ToolRetrieveResponse {
|
|
42
|
+
export interface Data {
|
|
43
|
+
id: string;
|
|
44
|
+
|
|
45
|
+
actionKey: string;
|
|
46
|
+
|
|
47
|
+
app: Data.App;
|
|
48
|
+
|
|
49
|
+
appKey: string;
|
|
50
|
+
|
|
51
|
+
connectedAccountId: string;
|
|
52
|
+
|
|
53
|
+
createdAt: number;
|
|
54
|
+
|
|
55
|
+
entityId: string;
|
|
56
|
+
|
|
57
|
+
executionTime: number;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated
|
|
61
|
+
*/
|
|
62
|
+
minimalResponse: string;
|
|
63
|
+
|
|
64
|
+
status: 'success' | 'failed';
|
|
65
|
+
|
|
66
|
+
metadata?: Data.Metadata;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export namespace Data {
|
|
70
|
+
export interface App {
|
|
71
|
+
icon: string;
|
|
72
|
+
|
|
73
|
+
name: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface Metadata {
|
|
77
|
+
recipe_id?: string;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ToolListResponse {
|
|
83
|
+
data: Array<ToolListResponse.Data>;
|
|
84
|
+
|
|
85
|
+
nextCursor: number | null;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export namespace ToolListResponse {
|
|
89
|
+
export interface Data {
|
|
90
|
+
id: string;
|
|
91
|
+
|
|
92
|
+
actionKey: string;
|
|
93
|
+
|
|
94
|
+
app: Data.App;
|
|
95
|
+
|
|
96
|
+
appKey: string;
|
|
97
|
+
|
|
98
|
+
connectedAccountId: string;
|
|
99
|
+
|
|
100
|
+
createdAt: number;
|
|
101
|
+
|
|
102
|
+
entityId: string;
|
|
103
|
+
|
|
104
|
+
executionTime: number;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @deprecated
|
|
108
|
+
*/
|
|
109
|
+
minimalResponse: string;
|
|
110
|
+
|
|
111
|
+
status: 'success' | 'failed';
|
|
112
|
+
|
|
113
|
+
metadata?: Data.Metadata;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export namespace Data {
|
|
117
|
+
export interface App {
|
|
118
|
+
icon: string;
|
|
119
|
+
|
|
120
|
+
name: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface Metadata {
|
|
124
|
+
recipe_id?: string;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface ToolRetrieveParams {
|
|
130
|
+
/**
|
|
131
|
+
* cursor_that_can_be_used_to_paginate_through_the_logs
|
|
132
|
+
*/
|
|
133
|
+
cursor: number | null;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* whether_the_search_is_case_sensitive_or_not
|
|
137
|
+
*/
|
|
138
|
+
case_sensitive?: boolean | null;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* start_time_of_the_logs_in_epoch_time
|
|
142
|
+
*/
|
|
143
|
+
from?: number;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* number_of_logs_to_return
|
|
147
|
+
*/
|
|
148
|
+
limit?: number;
|
|
149
|
+
|
|
150
|
+
search_params?: Array<ToolRetrieveParams.SearchParam>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* end_time_of_the_logs_in_epoch_time
|
|
154
|
+
*/
|
|
155
|
+
to?: number;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export namespace ToolRetrieveParams {
|
|
159
|
+
export interface SearchParam {
|
|
160
|
+
field?: string;
|
|
161
|
+
|
|
162
|
+
operation?: string;
|
|
163
|
+
|
|
164
|
+
value?: string;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface ToolListParams {
|
|
169
|
+
/**
|
|
170
|
+
* cursor_that_can_be_used_to_paginate_through_the_logs
|
|
171
|
+
*/
|
|
172
|
+
cursor: number | null;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* whether_the_search_is_case_sensitive_or_not
|
|
176
|
+
*/
|
|
177
|
+
case_sensitive?: boolean | null;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* start_time_of_the_logs_in_epoch_time
|
|
181
|
+
*/
|
|
182
|
+
from?: number;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* number_of_logs_to_return
|
|
186
|
+
*/
|
|
187
|
+
limit?: number;
|
|
188
|
+
|
|
189
|
+
search_params?: Array<ToolListParams.SearchParam>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* end_time_of_the_logs_in_epoch_time
|
|
193
|
+
*/
|
|
194
|
+
to?: number;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export namespace ToolListParams {
|
|
198
|
+
export interface SearchParam {
|
|
199
|
+
field?: string;
|
|
200
|
+
|
|
201
|
+
operation?: string;
|
|
202
|
+
|
|
203
|
+
value?: string;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export declare namespace Tools {
|
|
208
|
+
export {
|
|
209
|
+
type ToolRetrieveResponse as ToolRetrieveResponse,
|
|
210
|
+
type ToolListResponse as ToolListResponse,
|
|
211
|
+
type ToolRetrieveParams as ToolRetrieveParams,
|
|
212
|
+
type ToolListParams as ToolListParams,
|
|
213
|
+
};
|
|
214
|
+
}
|