@composio/client 0.1.0-alpha.15 → 0.1.0-alpha.16
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 +29 -0
- package/README.md +12 -24
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/package.json +1 -4
- package/resources/auth-configs.d.mts +3 -3
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +3 -3
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/connected-accounts.d.mts +5262 -52
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +5262 -52
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/index.d.mts +1 -1
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +1 -1
- 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 +99 -1
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +99 -1
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +22 -0
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +22 -0
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/org/project/api-keys.d.mts +0 -15
- package/resources/org/project/api-keys.d.mts.map +1 -1
- package/resources/org/project/api-keys.d.ts +0 -15
- package/resources/org/project/api-keys.d.ts.map +1 -1
- package/resources/tools.d.mts +4 -5
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +4 -5
- package/resources/tools.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +9 -46
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +9 -46
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/v3/admin.d.mts +100 -0
- package/resources/v3/admin.d.mts.map +1 -0
- package/resources/v3/admin.d.ts +100 -0
- package/resources/v3/admin.d.ts.map +1 -0
- package/resources/v3/admin.js +54 -0
- package/resources/v3/admin.js.map +1 -0
- package/resources/v3/admin.mjs +50 -0
- package/resources/v3/admin.mjs.map +1 -0
- package/resources/v3/auth/auth.d.mts +10 -0
- package/resources/v3/auth/auth.d.mts.map +1 -0
- package/resources/v3/auth/auth.d.ts +10 -0
- package/resources/v3/auth/auth.d.ts.map +1 -0
- package/resources/{auth → v3/auth}/auth.js +2 -2
- package/resources/v3/auth/auth.js.map +1 -0
- package/resources/{auth → v3/auth}/auth.mjs +1 -1
- package/resources/v3/auth/auth.mjs.map +1 -0
- package/resources/v3/auth/index.d.mts +3 -0
- package/resources/v3/auth/index.d.mts.map +1 -0
- package/resources/v3/auth/index.d.ts +3 -0
- package/resources/v3/auth/index.d.ts.map +1 -0
- package/resources/v3/auth/index.js.map +1 -0
- package/resources/v3/auth/index.mjs.map +1 -0
- package/resources/{auth → v3/auth}/session.d.mts +16 -10
- package/resources/v3/auth/session.d.mts.map +1 -0
- package/resources/{auth → v3/auth}/session.d.ts +16 -10
- package/resources/v3/auth/session.d.ts.map +1 -0
- package/resources/{auth → v3/auth}/session.js +8 -2
- package/resources/v3/auth/session.js.map +1 -0
- package/resources/{auth → v3/auth}/session.mjs +8 -2
- package/resources/v3/auth/session.mjs.map +1 -0
- package/resources/{auth.d.mts.map → v3/auth.d.mts.map} +1 -1
- package/resources/v3/auth.d.ts.map +1 -0
- package/resources/{auth.js → v3/auth.js} +1 -1
- package/resources/v3/auth.js.map +1 -0
- package/resources/v3/auth.mjs.map +1 -0
- package/resources/v3/cli.d.mts +167 -0
- package/resources/v3/cli.d.mts.map +1 -0
- package/resources/v3/cli.d.ts +167 -0
- package/resources/v3/cli.d.ts.map +1 -0
- package/resources/v3/cli.js +55 -0
- package/resources/v3/cli.js.map +1 -0
- package/resources/v3/cli.mjs +51 -0
- package/resources/v3/cli.mjs.map +1 -0
- package/resources/v3/index.d.mts +6 -0
- package/resources/v3/index.d.mts.map +1 -0
- package/resources/v3/index.d.ts +6 -0
- package/resources/v3/index.d.ts.map +1 -0
- package/resources/v3/index.js +15 -0
- package/resources/v3/index.js.map +1 -0
- package/resources/v3/index.mjs +7 -0
- package/resources/v3/index.mjs.map +1 -0
- package/resources/v3/internal/action-execution.d.mts +153 -0
- package/resources/v3/internal/action-execution.d.mts.map +1 -0
- package/resources/v3/internal/action-execution.d.ts +153 -0
- package/resources/v3/internal/action-execution.d.ts.map +1 -0
- package/resources/v3/internal/action-execution.js +38 -0
- package/resources/v3/internal/action-execution.js.map +1 -0
- package/resources/v3/internal/action-execution.mjs +34 -0
- package/resources/v3/internal/action-execution.mjs.map +1 -0
- package/resources/v3/internal/index.d.mts +4 -0
- package/resources/v3/internal/index.d.mts.map +1 -0
- package/resources/v3/internal/index.d.ts +4 -0
- package/resources/v3/internal/index.d.ts.map +1 -0
- package/resources/v3/internal/index.js +11 -0
- package/resources/v3/internal/index.js.map +1 -0
- package/resources/v3/internal/index.mjs +5 -0
- package/resources/v3/internal/index.mjs.map +1 -0
- package/resources/v3/internal/internal.d.mts +14 -0
- package/resources/v3/internal/internal.d.mts.map +1 -0
- package/resources/v3/internal/internal.d.ts +14 -0
- package/resources/v3/internal/internal.d.ts.map +1 -0
- package/resources/v3/internal/internal.js +21 -0
- package/resources/v3/internal/internal.js.map +1 -0
- package/resources/v3/internal/internal.mjs +16 -0
- package/resources/v3/internal/internal.mjs.map +1 -0
- package/resources/v3/internal/trigger.d.mts +84 -0
- package/resources/v3/internal/trigger.d.mts.map +1 -0
- package/resources/v3/internal/trigger.d.ts +84 -0
- package/resources/v3/internal/trigger.d.ts.map +1 -0
- package/resources/v3/internal/trigger.js +23 -0
- package/resources/v3/internal/trigger.js.map +1 -0
- package/resources/v3/internal/trigger.mjs +19 -0
- package/resources/v3/internal/trigger.mjs.map +1 -0
- package/resources/v3/internal.d.mts +2 -0
- package/resources/v3/internal.d.mts.map +1 -0
- package/resources/v3/internal.d.ts +2 -0
- package/resources/v3/internal.d.ts.map +1 -0
- package/resources/v3/internal.js +6 -0
- package/resources/v3/internal.js.map +1 -0
- package/resources/v3/internal.mjs +3 -0
- package/resources/v3/internal.mjs.map +1 -0
- package/resources/v3/v3.d.mts +22 -0
- package/resources/v3/v3.d.mts.map +1 -0
- package/resources/v3/v3.d.ts +22 -0
- package/resources/v3/v3.d.ts.map +1 -0
- package/resources/v3/v3.js +29 -0
- package/resources/v3/v3.js.map +1 -0
- package/resources/v3/v3.mjs +24 -0
- package/resources/v3/v3.mjs.map +1 -0
- package/resources/v3.d.mts +2 -0
- package/resources/v3.d.mts.map +1 -0
- package/resources/v3.d.ts +2 -0
- package/resources/v3.d.ts.map +1 -0
- package/resources/v3.js +6 -0
- package/resources/v3.js.map +1 -0
- package/resources/v3.mjs +3 -0
- package/resources/v3.mjs.map +1 -0
- package/src/client.ts +9 -5
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/resources/auth-configs.ts +0 -3
- package/src/resources/connected-accounts.ts +10261 -298
- package/src/resources/index.ts +3 -1
- package/src/resources/mcp/index.ts +2 -0
- package/src/resources/mcp/mcp.ts +128 -0
- package/src/resources/org/project/api-keys.ts +0 -18
- package/src/resources/tools.ts +5 -6
- package/src/resources/trigger-instances/trigger-instances.ts +9 -49
- package/src/resources/v3/admin.ts +141 -0
- package/src/resources/{auth → v3/auth}/auth.ts +3 -3
- package/src/resources/{auth → v3/auth}/index.ts +1 -1
- package/src/resources/{auth → v3/auth}/session.ts +16 -10
- package/src/resources/v3/cli.ts +209 -0
- package/src/resources/v3/index.ts +20 -0
- package/src/resources/v3/internal/action-execution.ts +236 -0
- package/src/resources/v3/internal/index.ts +10 -0
- package/src/resources/v3/internal/internal.ts +35 -0
- package/src/resources/v3/internal/trigger.ts +122 -0
- package/src/resources/v3/internal.ts +3 -0
- package/src/resources/v3/v3.ts +59 -0
- package/src/resources/v3.ts +3 -0
- 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/auth/auth.d.mts +0 -10
- package/resources/auth/auth.d.mts.map +0 -1
- package/resources/auth/auth.d.ts +0 -10
- package/resources/auth/auth.d.ts.map +0 -1
- package/resources/auth/auth.js.map +0 -1
- package/resources/auth/auth.mjs.map +0 -1
- package/resources/auth/index.d.mts +0 -3
- package/resources/auth/index.d.mts.map +0 -1
- package/resources/auth/index.d.ts +0 -3
- package/resources/auth/index.d.ts.map +0 -1
- package/resources/auth/index.js.map +0 -1
- package/resources/auth/index.mjs.map +0 -1
- package/resources/auth/session.d.mts.map +0 -1
- package/resources/auth/session.d.ts.map +0 -1
- package/resources/auth/session.js.map +0 -1
- package/resources/auth/session.mjs.map +0 -1
- package/resources/auth.d.ts.map +0 -1
- package/resources/auth.js.map +0 -1
- package/resources/auth.mjs.map +0 -1
- package/src/internal/shim-types.d.ts +0 -28
- /package/resources/{auth → v3/auth}/index.js +0 -0
- /package/resources/{auth → v3/auth}/index.mjs +0 -0
- /package/resources/{auth.d.mts → v3/auth.d.mts} +0 -0
- /package/resources/{auth.d.ts → v3/auth.d.ts} +0 -0
- /package/resources/{auth.mjs → v3/auth.mjs} +0 -0
- /package/src/resources/{auth.ts → v3/auth.ts} +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
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 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
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response = await client.v3.cli.createSession();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
createSession(options?: RequestOptions): APIPromise<CliCreateSessionResponse> {
|
|
20
|
+
return this._client.post('/api/v3/cli/create-session', options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Links a pending CLI session to the currently authenticated user. This is the
|
|
25
|
+
* final step in the CLI authentication flow, where the user enters the code in the
|
|
26
|
+
* web interface and their account is associated with the CLI session, allowing the
|
|
27
|
+
* CLI to act on their behalf.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.v3.cli.linkSession({
|
|
32
|
+
* id: 'ABC123',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
linkSession(body: CliLinkSessionParams, options?: RequestOptions): APIPromise<CliLinkSessionResponse> {
|
|
37
|
+
return this._client.put('/api/v3/cli/link-session', { body, ...options });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves the current state of a CLI session using either the session ID (UUID)
|
|
42
|
+
* or the 6-character code. This endpoint is used by both the CLI client to check
|
|
43
|
+
* if the session has been linked, and by the web interface to display session
|
|
44
|
+
* details before linking.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response = await client.v3.cli.retrieveSession({
|
|
49
|
+
* id: 'ABC123',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
retrieveSession(
|
|
54
|
+
query: CliRetrieveSessionParams,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): APIPromise<CliRetrieveSessionResponse> {
|
|
57
|
+
return this._client.get('/api/v3/cli/get-session', { query, ...options });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface CliCreateSessionResponse {
|
|
62
|
+
/**
|
|
63
|
+
* Unique identifier for the CLI session. UUID v4 format used for tracking and
|
|
64
|
+
* retrieval.
|
|
65
|
+
*/
|
|
66
|
+
id: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The 6-character hexadecimal code used for CLI login
|
|
70
|
+
*/
|
|
71
|
+
code: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The ISO timestamp when the session expires
|
|
75
|
+
*/
|
|
76
|
+
expiresAt: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The current status of the session
|
|
80
|
+
*/
|
|
81
|
+
status: 'pending' | 'linked';
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface CliLinkSessionResponse {
|
|
85
|
+
/**
|
|
86
|
+
* The unique identifier for the CLI session
|
|
87
|
+
*/
|
|
88
|
+
id: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Information about the linked account. Always present for successful responses
|
|
92
|
+
* from this endpoint.
|
|
93
|
+
*/
|
|
94
|
+
account: CliLinkSessionResponse.Account;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The 6-character hexadecimal code used for CLI login
|
|
98
|
+
*/
|
|
99
|
+
code: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The ISO timestamp when the session expires
|
|
103
|
+
*/
|
|
104
|
+
expiresAt: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The current status of the session
|
|
108
|
+
*/
|
|
109
|
+
status: 'pending' | 'linked';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export namespace CliLinkSessionResponse {
|
|
113
|
+
/**
|
|
114
|
+
* Information about the linked account. Always present for successful responses
|
|
115
|
+
* from this endpoint.
|
|
116
|
+
*/
|
|
117
|
+
export interface Account {
|
|
118
|
+
/**
|
|
119
|
+
* The ID of the linked account
|
|
120
|
+
*/
|
|
121
|
+
id: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The email address of the linked account
|
|
125
|
+
*/
|
|
126
|
+
email: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The display name of the linked account
|
|
130
|
+
*/
|
|
131
|
+
name: string;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface CliRetrieveSessionResponse {
|
|
136
|
+
/**
|
|
137
|
+
* The unique identifier for the CLI session
|
|
138
|
+
*/
|
|
139
|
+
id: string;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Information about the linked account, if any. Null if the session status is
|
|
143
|
+
* "pending".
|
|
144
|
+
*/
|
|
145
|
+
account: CliRetrieveSessionResponse.Account | null;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The 6-character hexadecimal code used for CLI login
|
|
149
|
+
*/
|
|
150
|
+
code: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The ISO timestamp when the session expires
|
|
154
|
+
*/
|
|
155
|
+
expiresAt: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The current status of the session
|
|
159
|
+
*/
|
|
160
|
+
status: 'pending' | 'linked';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export namespace CliRetrieveSessionResponse {
|
|
164
|
+
/**
|
|
165
|
+
* Information about the linked account, if any. Null if the session status is
|
|
166
|
+
* "pending".
|
|
167
|
+
*/
|
|
168
|
+
export interface Account {
|
|
169
|
+
/**
|
|
170
|
+
* The ID of the linked account
|
|
171
|
+
*/
|
|
172
|
+
id: string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The email address of the linked account
|
|
176
|
+
*/
|
|
177
|
+
email: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The display name of the linked account
|
|
181
|
+
*/
|
|
182
|
+
name: string;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface CliLinkSessionParams {
|
|
187
|
+
/**
|
|
188
|
+
* The CLI session ID or code to link to the current user
|
|
189
|
+
*/
|
|
190
|
+
id: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface CliRetrieveSessionParams {
|
|
194
|
+
/**
|
|
195
|
+
* CLI session ID (UUID format) or 6-character code to check. Both formats are
|
|
196
|
+
* supported for flexibility in client implementations.
|
|
197
|
+
*/
|
|
198
|
+
id: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export declare namespace Cli {
|
|
202
|
+
export {
|
|
203
|
+
type CliCreateSessionResponse as CliCreateSessionResponse,
|
|
204
|
+
type CliLinkSessionResponse as CliLinkSessionResponse,
|
|
205
|
+
type CliRetrieveSessionResponse as CliRetrieveSessionResponse,
|
|
206
|
+
type CliLinkSessionParams as CliLinkSessionParams,
|
|
207
|
+
type CliRetrieveSessionParams as CliRetrieveSessionParams,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Admin,
|
|
5
|
+
type AdminListConnectionsResponse,
|
|
6
|
+
type AdminRefreshAuthTokensResponse,
|
|
7
|
+
type AdminListConnectionsParams,
|
|
8
|
+
type AdminRefreshAuthTokensParams,
|
|
9
|
+
} from './admin';
|
|
10
|
+
export { Auth } from './auth/index';
|
|
11
|
+
export {
|
|
12
|
+
Cli,
|
|
13
|
+
type CliCreateSessionResponse,
|
|
14
|
+
type CliLinkSessionResponse,
|
|
15
|
+
type CliRetrieveSessionResponse,
|
|
16
|
+
type CliLinkSessionParams,
|
|
17
|
+
type CliRetrieveSessionParams,
|
|
18
|
+
} from './cli';
|
|
19
|
+
export { Internal } from './internal/index';
|
|
20
|
+
export { V3 } from './v3';
|
|
@@ -0,0 +1,236 @@
|
|
|
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
|
+
import { path } from '../../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class ActionExecution extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get detailed execution log by ID
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response =
|
|
15
|
+
* await client.v3.internal.actionExecution.retrieveLog(
|
|
16
|
+
* 'id',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieveLog(id: string, options?: RequestOptions): APIPromise<ActionExecutionRetrieveLogResponse> {
|
|
21
|
+
return this._client.get(path`/api/v3/internal/action_execution/log/${id}`, options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Search and retrieve action execution logs
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response =
|
|
30
|
+
* await client.v3.internal.actionExecution.searchLogs({
|
|
31
|
+
* cursor: 0,
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
searchLogs(
|
|
36
|
+
body: ActionExecutionSearchLogsParams,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<ActionExecutionSearchLogsResponse> {
|
|
39
|
+
return this._client.post('/api/v3/internal/action_execution/logs', { body, ...options });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ActionExecutionRetrieveLogResponse {
|
|
44
|
+
actionId: string;
|
|
45
|
+
|
|
46
|
+
actionLogId: string;
|
|
47
|
+
|
|
48
|
+
app: ActionExecutionRetrieveLogResponse.App;
|
|
49
|
+
|
|
50
|
+
connection: ActionExecutionRetrieveLogResponse.Connection;
|
|
51
|
+
|
|
52
|
+
endTime: number;
|
|
53
|
+
|
|
54
|
+
error: Record<string, unknown>;
|
|
55
|
+
|
|
56
|
+
executionMetadata: Record<string, unknown>;
|
|
57
|
+
|
|
58
|
+
payloadReceived: Record<string, unknown>;
|
|
59
|
+
|
|
60
|
+
response: Record<string, unknown>;
|
|
61
|
+
|
|
62
|
+
session: Record<string, unknown>;
|
|
63
|
+
|
|
64
|
+
startTime: number;
|
|
65
|
+
|
|
66
|
+
status: 'success' | 'error' | 'warning' | 'info';
|
|
67
|
+
|
|
68
|
+
steps: Array<ActionExecutionRetrieveLogResponse.Step>;
|
|
69
|
+
|
|
70
|
+
totalDuration: string;
|
|
71
|
+
|
|
72
|
+
version: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export namespace ActionExecutionRetrieveLogResponse {
|
|
76
|
+
export interface App {
|
|
77
|
+
icon: string;
|
|
78
|
+
|
|
79
|
+
name: string;
|
|
80
|
+
|
|
81
|
+
uniqueId: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface Connection {
|
|
85
|
+
entity: string;
|
|
86
|
+
|
|
87
|
+
id?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface Step {
|
|
91
|
+
endTime: number;
|
|
92
|
+
|
|
93
|
+
message: string;
|
|
94
|
+
|
|
95
|
+
startTime: number;
|
|
96
|
+
|
|
97
|
+
status: 'success' | 'failure' | 'error';
|
|
98
|
+
|
|
99
|
+
totalDuration: number;
|
|
100
|
+
|
|
101
|
+
type: 'tool_execution' | 'fetch_connection_details';
|
|
102
|
+
|
|
103
|
+
logs?: Array<Step.Log>;
|
|
104
|
+
|
|
105
|
+
metadata?: Step.Metadata;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export namespace Step {
|
|
109
|
+
export interface Log {
|
|
110
|
+
level: string;
|
|
111
|
+
|
|
112
|
+
message: string;
|
|
113
|
+
|
|
114
|
+
request: Log.Request;
|
|
115
|
+
|
|
116
|
+
requestId: string;
|
|
117
|
+
|
|
118
|
+
response: Log.Response;
|
|
119
|
+
|
|
120
|
+
time: number;
|
|
121
|
+
|
|
122
|
+
type: 'network' | 'system';
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export namespace Log {
|
|
126
|
+
export interface Request {
|
|
127
|
+
method: string;
|
|
128
|
+
|
|
129
|
+
url: string;
|
|
130
|
+
|
|
131
|
+
headers?: Record<string, string>;
|
|
132
|
+
|
|
133
|
+
json?: Record<string, unknown>;
|
|
134
|
+
|
|
135
|
+
params?: Record<string, unknown>;
|
|
136
|
+
|
|
137
|
+
timeout?: number;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface Response {
|
|
141
|
+
status: number;
|
|
142
|
+
|
|
143
|
+
time: string;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface Metadata {
|
|
148
|
+
encryption?: string;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface ActionExecutionSearchLogsResponse {
|
|
154
|
+
data: Array<ActionExecutionSearchLogsResponse.Data>;
|
|
155
|
+
|
|
156
|
+
nextCursor: number | null;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export namespace ActionExecutionSearchLogsResponse {
|
|
160
|
+
export interface Data {
|
|
161
|
+
id: string;
|
|
162
|
+
|
|
163
|
+
actionKey: string;
|
|
164
|
+
|
|
165
|
+
app: Data.App;
|
|
166
|
+
|
|
167
|
+
appKey: string;
|
|
168
|
+
|
|
169
|
+
connectedAccountId: string;
|
|
170
|
+
|
|
171
|
+
createdAt: number;
|
|
172
|
+
|
|
173
|
+
entityId: string;
|
|
174
|
+
|
|
175
|
+
executionTime: number;
|
|
176
|
+
|
|
177
|
+
minimalResponse: string;
|
|
178
|
+
|
|
179
|
+
status: 'success' | 'failed';
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export namespace Data {
|
|
183
|
+
export interface App {
|
|
184
|
+
icon: string;
|
|
185
|
+
|
|
186
|
+
name: string;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface ActionExecutionSearchLogsParams {
|
|
192
|
+
/**
|
|
193
|
+
* cursor_that_can_be_used_to_paginate_through_the_logs
|
|
194
|
+
*/
|
|
195
|
+
cursor: number | null;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* whether_the_search_is_case_sensitive_or_not
|
|
199
|
+
*/
|
|
200
|
+
case_sensitive?: boolean;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* start_time_of_the_logs_in_epoch_time
|
|
204
|
+
*/
|
|
205
|
+
from?: number;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* number_of_logs_to_return
|
|
209
|
+
*/
|
|
210
|
+
limit?: number;
|
|
211
|
+
|
|
212
|
+
search_params?: Array<ActionExecutionSearchLogsParams.SearchParam>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* end_time_of_the_logs_in_epoch_time
|
|
216
|
+
*/
|
|
217
|
+
to?: number;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export namespace ActionExecutionSearchLogsParams {
|
|
221
|
+
export interface SearchParam {
|
|
222
|
+
field?: string;
|
|
223
|
+
|
|
224
|
+
operation?: string;
|
|
225
|
+
|
|
226
|
+
value?: string;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare namespace ActionExecution {
|
|
231
|
+
export {
|
|
232
|
+
type ActionExecutionRetrieveLogResponse as ActionExecutionRetrieveLogResponse,
|
|
233
|
+
type ActionExecutionSearchLogsResponse as ActionExecutionSearchLogsResponse,
|
|
234
|
+
type ActionExecutionSearchLogsParams as ActionExecutionSearchLogsParams,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
ActionExecution,
|
|
5
|
+
type ActionExecutionRetrieveLogResponse,
|
|
6
|
+
type ActionExecutionSearchLogsResponse,
|
|
7
|
+
type ActionExecutionSearchLogsParams,
|
|
8
|
+
} from './action-execution';
|
|
9
|
+
export { Internal } from './internal';
|
|
10
|
+
export { Trigger, type TriggerSearchLogsResponse, type TriggerSearchLogsParams } from './trigger';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as ActionExecutionAPI from './action-execution';
|
|
5
|
+
import {
|
|
6
|
+
ActionExecution,
|
|
7
|
+
ActionExecutionRetrieveLogResponse,
|
|
8
|
+
ActionExecutionSearchLogsParams,
|
|
9
|
+
ActionExecutionSearchLogsResponse,
|
|
10
|
+
} from './action-execution';
|
|
11
|
+
import * as TriggerAPI from './trigger';
|
|
12
|
+
import { Trigger, TriggerSearchLogsParams, TriggerSearchLogsResponse } from './trigger';
|
|
13
|
+
|
|
14
|
+
export class Internal extends APIResource {
|
|
15
|
+
trigger: TriggerAPI.Trigger = new TriggerAPI.Trigger(this._client);
|
|
16
|
+
actionExecution: ActionExecutionAPI.ActionExecution = new ActionExecutionAPI.ActionExecution(this._client);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Internal.Trigger = Trigger;
|
|
20
|
+
Internal.ActionExecution = ActionExecution;
|
|
21
|
+
|
|
22
|
+
export declare namespace Internal {
|
|
23
|
+
export {
|
|
24
|
+
Trigger as Trigger,
|
|
25
|
+
type TriggerSearchLogsResponse as TriggerSearchLogsResponse,
|
|
26
|
+
type TriggerSearchLogsParams as TriggerSearchLogsParams,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
ActionExecution as ActionExecution,
|
|
31
|
+
type ActionExecutionRetrieveLogResponse as ActionExecutionRetrieveLogResponse,
|
|
32
|
+
type ActionExecutionSearchLogsResponse as ActionExecutionSearchLogsResponse,
|
|
33
|
+
type ActionExecutionSearchLogsParams as ActionExecutionSearchLogsParams,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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 Trigger extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Search and retrieve trigger event logs
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response =
|
|
14
|
+
* await client.v3.internal.trigger.searchLogs({
|
|
15
|
+
* cursor: 'cursor',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
searchLogs(body: TriggerSearchLogsParams, options?: RequestOptions): APIPromise<TriggerSearchLogsResponse> {
|
|
20
|
+
return this._client.post('/api/v3/internal/trigger/logs', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface TriggerSearchLogsResponse {
|
|
25
|
+
nextCursor: string | null;
|
|
26
|
+
|
|
27
|
+
data?: Array<TriggerSearchLogsResponse.Data>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export namespace TriggerSearchLogsResponse {
|
|
31
|
+
export interface Data {
|
|
32
|
+
id: string;
|
|
33
|
+
|
|
34
|
+
appName: string;
|
|
35
|
+
|
|
36
|
+
clientId: string;
|
|
37
|
+
|
|
38
|
+
connectionId: string;
|
|
39
|
+
|
|
40
|
+
createdAt: string;
|
|
41
|
+
|
|
42
|
+
entityId: string;
|
|
43
|
+
|
|
44
|
+
meta: Data.Meta;
|
|
45
|
+
|
|
46
|
+
status: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Log entity type (trigger or action)
|
|
50
|
+
*/
|
|
51
|
+
type: 'trigger' | 'action';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export namespace Data {
|
|
55
|
+
export interface Meta {
|
|
56
|
+
id: string;
|
|
57
|
+
|
|
58
|
+
clientId: string;
|
|
59
|
+
|
|
60
|
+
connectionId: string;
|
|
61
|
+
|
|
62
|
+
createdAt: string;
|
|
63
|
+
|
|
64
|
+
provider: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Log entity type (trigger or action)
|
|
68
|
+
*/
|
|
69
|
+
type: 'trigger' | 'action';
|
|
70
|
+
|
|
71
|
+
updatedAt: string;
|
|
72
|
+
|
|
73
|
+
triggerClientError?: string;
|
|
74
|
+
|
|
75
|
+
triggerClientPayload?: string;
|
|
76
|
+
|
|
77
|
+
triggerClientResponse?: string;
|
|
78
|
+
|
|
79
|
+
triggerName?: string;
|
|
80
|
+
|
|
81
|
+
triggerProviderPayload?: string;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface TriggerSearchLogsParams {
|
|
87
|
+
/**
|
|
88
|
+
* cursor that can be used to paginate through the logs
|
|
89
|
+
*/
|
|
90
|
+
cursor: string | null;
|
|
91
|
+
|
|
92
|
+
entityId?: string;
|
|
93
|
+
|
|
94
|
+
integrationId?: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* number of logs to return
|
|
98
|
+
*/
|
|
99
|
+
limit?: number;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Search term to filter logs
|
|
103
|
+
*/
|
|
104
|
+
search?: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Filter logs by their status level
|
|
108
|
+
*/
|
|
109
|
+
status?: 'all' | 'success' | 'error';
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Return logs from the last N time units
|
|
113
|
+
*/
|
|
114
|
+
time?: '5m' | '30m' | '6h' | '1d' | '1w' | '1month' | '1y';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export declare namespace Trigger {
|
|
118
|
+
export {
|
|
119
|
+
type TriggerSearchLogsResponse as TriggerSearchLogsResponse,
|
|
120
|
+
type TriggerSearchLogsParams as TriggerSearchLogsParams,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as AdminAPI from './admin';
|
|
5
|
+
import {
|
|
6
|
+
Admin,
|
|
7
|
+
AdminListConnectionsParams,
|
|
8
|
+
AdminListConnectionsResponse,
|
|
9
|
+
AdminRefreshAuthTokensParams,
|
|
10
|
+
AdminRefreshAuthTokensResponse,
|
|
11
|
+
} from './admin';
|
|
12
|
+
import * as CliAPI from './cli';
|
|
13
|
+
import {
|
|
14
|
+
Cli,
|
|
15
|
+
CliCreateSessionResponse,
|
|
16
|
+
CliLinkSessionParams,
|
|
17
|
+
CliLinkSessionResponse,
|
|
18
|
+
CliRetrieveSessionParams,
|
|
19
|
+
CliRetrieveSessionResponse,
|
|
20
|
+
} from './cli';
|
|
21
|
+
import * as AuthAPI from './auth/auth';
|
|
22
|
+
import { Auth } from './auth/auth';
|
|
23
|
+
import * as InternalAPI from './internal/internal';
|
|
24
|
+
import { Internal } from './internal/internal';
|
|
25
|
+
|
|
26
|
+
export class V3 extends APIResource {
|
|
27
|
+
auth: AuthAPI.Auth = new AuthAPI.Auth(this._client);
|
|
28
|
+
admin: AdminAPI.Admin = new AdminAPI.Admin(this._client);
|
|
29
|
+
cli: CliAPI.Cli = new CliAPI.Cli(this._client);
|
|
30
|
+
internal: InternalAPI.Internal = new InternalAPI.Internal(this._client);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
V3.Auth = Auth;
|
|
34
|
+
V3.Admin = Admin;
|
|
35
|
+
V3.Cli = Cli;
|
|
36
|
+
V3.Internal = Internal;
|
|
37
|
+
|
|
38
|
+
export declare namespace V3 {
|
|
39
|
+
export { Auth as Auth };
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
Admin as Admin,
|
|
43
|
+
type AdminListConnectionsResponse as AdminListConnectionsResponse,
|
|
44
|
+
type AdminRefreshAuthTokensResponse as AdminRefreshAuthTokensResponse,
|
|
45
|
+
type AdminListConnectionsParams as AdminListConnectionsParams,
|
|
46
|
+
type AdminRefreshAuthTokensParams as AdminRefreshAuthTokensParams,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
Cli as Cli,
|
|
51
|
+
type CliCreateSessionResponse as CliCreateSessionResponse,
|
|
52
|
+
type CliLinkSessionResponse as CliLinkSessionResponse,
|
|
53
|
+
type CliRetrieveSessionResponse as CliRetrieveSessionResponse,
|
|
54
|
+
type CliLinkSessionParams as CliLinkSessionParams,
|
|
55
|
+
type CliRetrieveSessionParams as CliRetrieveSessionParams,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { Internal as Internal };
|
|
59
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.16'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.16";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|