@composio/client 0.1.0-alpha.14 → 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 +43 -0
- package/README.md +12 -24
- package/client.d.mts +7 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -7
- 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 +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +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/index.d.mts +2 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +2 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js +3 -1
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs +1 -0
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/manage.d.mts +26 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -0
- package/resources/trigger-instances/manage.d.ts +26 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -0
- package/resources/trigger-instances/manage.js +16 -0
- package/resources/trigger-instances/manage.js.map +1 -0
- package/resources/trigger-instances/manage.mjs +12 -0
- package/resources/trigger-instances/manage.mjs.map +1 -0
- package/resources/trigger-instances/trigger-instances.d.mts +15 -68
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +15 -68
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +4 -7
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +4 -7
- 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 -11
- 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 -4
- 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/index.ts +6 -3
- package/src/resources/trigger-instances/manage.ts +46 -0
- package/src/resources/trigger-instances/trigger-instances.ts +21 -87
- 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,167 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Cli extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Generates a new CLI session with a random 6-character code. This endpoint is the
|
|
7
|
+
* first step in the CLI authentication flow, creating a session that can later be
|
|
8
|
+
* linked to a user account. The generated code is displayed to the user in the CLI
|
|
9
|
+
* and should be entered in the web interface to complete authentication.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.v3.cli.createSession();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
createSession(options?: RequestOptions): APIPromise<CliCreateSessionResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Links a pending CLI session to the currently authenticated user. This is the
|
|
19
|
+
* final step in the CLI authentication flow, where the user enters the code in the
|
|
20
|
+
* web interface and their account is associated with the CLI session, allowing the
|
|
21
|
+
* CLI to act on their behalf.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response = await client.v3.cli.linkSession({
|
|
26
|
+
* id: 'ABC123',
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
linkSession(body: CliLinkSessionParams, options?: RequestOptions): APIPromise<CliLinkSessionResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the current state of a CLI session using either the session ID (UUID)
|
|
33
|
+
* or the 6-character code. This endpoint is used by both the CLI client to check
|
|
34
|
+
* if the session has been linked, and by the web interface to display session
|
|
35
|
+
* details before linking.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const response = await client.v3.cli.retrieveSession({
|
|
40
|
+
* id: 'ABC123',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
retrieveSession(query: CliRetrieveSessionParams, options?: RequestOptions): APIPromise<CliRetrieveSessionResponse>;
|
|
45
|
+
}
|
|
46
|
+
export interface CliCreateSessionResponse {
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for the CLI session. UUID v4 format used for tracking and
|
|
49
|
+
* retrieval.
|
|
50
|
+
*/
|
|
51
|
+
id: string;
|
|
52
|
+
/**
|
|
53
|
+
* The 6-character hexadecimal code used for CLI login
|
|
54
|
+
*/
|
|
55
|
+
code: string;
|
|
56
|
+
/**
|
|
57
|
+
* The ISO timestamp when the session expires
|
|
58
|
+
*/
|
|
59
|
+
expiresAt: string;
|
|
60
|
+
/**
|
|
61
|
+
* The current status of the session
|
|
62
|
+
*/
|
|
63
|
+
status: 'pending' | 'linked';
|
|
64
|
+
}
|
|
65
|
+
export interface CliLinkSessionResponse {
|
|
66
|
+
/**
|
|
67
|
+
* The unique identifier for the CLI session
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
/**
|
|
71
|
+
* Information about the linked account. Always present for successful responses
|
|
72
|
+
* from this endpoint.
|
|
73
|
+
*/
|
|
74
|
+
account: CliLinkSessionResponse.Account;
|
|
75
|
+
/**
|
|
76
|
+
* The 6-character hexadecimal code used for CLI login
|
|
77
|
+
*/
|
|
78
|
+
code: string;
|
|
79
|
+
/**
|
|
80
|
+
* The ISO timestamp when the session expires
|
|
81
|
+
*/
|
|
82
|
+
expiresAt: string;
|
|
83
|
+
/**
|
|
84
|
+
* The current status of the session
|
|
85
|
+
*/
|
|
86
|
+
status: 'pending' | 'linked';
|
|
87
|
+
}
|
|
88
|
+
export declare namespace CliLinkSessionResponse {
|
|
89
|
+
/**
|
|
90
|
+
* Information about the linked account. Always present for successful responses
|
|
91
|
+
* from this endpoint.
|
|
92
|
+
*/
|
|
93
|
+
interface Account {
|
|
94
|
+
/**
|
|
95
|
+
* The ID of the linked account
|
|
96
|
+
*/
|
|
97
|
+
id: string;
|
|
98
|
+
/**
|
|
99
|
+
* The email address of the linked account
|
|
100
|
+
*/
|
|
101
|
+
email: string;
|
|
102
|
+
/**
|
|
103
|
+
* The display name of the linked account
|
|
104
|
+
*/
|
|
105
|
+
name: string;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
export interface CliRetrieveSessionResponse {
|
|
109
|
+
/**
|
|
110
|
+
* The unique identifier for the CLI session
|
|
111
|
+
*/
|
|
112
|
+
id: string;
|
|
113
|
+
/**
|
|
114
|
+
* Information about the linked account, if any. Null if the session status is
|
|
115
|
+
* "pending".
|
|
116
|
+
*/
|
|
117
|
+
account: CliRetrieveSessionResponse.Account | null;
|
|
118
|
+
/**
|
|
119
|
+
* The 6-character hexadecimal code used for CLI login
|
|
120
|
+
*/
|
|
121
|
+
code: string;
|
|
122
|
+
/**
|
|
123
|
+
* The ISO timestamp when the session expires
|
|
124
|
+
*/
|
|
125
|
+
expiresAt: string;
|
|
126
|
+
/**
|
|
127
|
+
* The current status of the session
|
|
128
|
+
*/
|
|
129
|
+
status: 'pending' | 'linked';
|
|
130
|
+
}
|
|
131
|
+
export declare namespace CliRetrieveSessionResponse {
|
|
132
|
+
/**
|
|
133
|
+
* Information about the linked account, if any. Null if the session status is
|
|
134
|
+
* "pending".
|
|
135
|
+
*/
|
|
136
|
+
interface Account {
|
|
137
|
+
/**
|
|
138
|
+
* The ID of the linked account
|
|
139
|
+
*/
|
|
140
|
+
id: string;
|
|
141
|
+
/**
|
|
142
|
+
* The email address of the linked account
|
|
143
|
+
*/
|
|
144
|
+
email: string;
|
|
145
|
+
/**
|
|
146
|
+
* The display name of the linked account
|
|
147
|
+
*/
|
|
148
|
+
name: string;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export interface CliLinkSessionParams {
|
|
152
|
+
/**
|
|
153
|
+
* The CLI session ID or code to link to the current user
|
|
154
|
+
*/
|
|
155
|
+
id: string;
|
|
156
|
+
}
|
|
157
|
+
export interface CliRetrieveSessionParams {
|
|
158
|
+
/**
|
|
159
|
+
* CLI session ID (UUID format) or 6-character code to check. Both formats are
|
|
160
|
+
* supported for flexibility in client implementations.
|
|
161
|
+
*/
|
|
162
|
+
id: string;
|
|
163
|
+
}
|
|
164
|
+
export declare namespace Cli {
|
|
165
|
+
export { type CliCreateSessionResponse as CliCreateSessionResponse, type CliLinkSessionResponse as CliLinkSessionResponse, type CliRetrieveSessionResponse as CliRetrieveSessionResponse, type CliLinkSessionParams as CliLinkSessionParams, type CliRetrieveSessionParams as CliRetrieveSessionParams, };
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=cli.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.mts","sourceRoot":"","sources":["../../src/resources/v3/cli.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;OAUG;IACH,aAAa,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAI7E;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIrG;;;;;;;;;;;;OAYG;IACH,eAAe,CACb,KAAK,EAAE,wBAAwB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAG1C;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC;IAExC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC9B;AAED,yBAAiB,sBAAsB,CAAC;IACtC;;;OAGG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,OAAO,EAAE,0BAA0B,CAAC,OAAO,GAAG,IAAI,CAAC;IAEnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC9B;AAED,yBAAiB,0BAA0B,CAAC;IAC1C;;;OAGG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Cli extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Generates a new CLI session with a random 6-character code. This endpoint is the
|
|
7
|
+
* first step in the CLI authentication flow, creating a session that can later be
|
|
8
|
+
* linked to a user account. The generated code is displayed to the user in the CLI
|
|
9
|
+
* and should be entered in the web interface to complete authentication.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.v3.cli.createSession();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
createSession(options?: RequestOptions): APIPromise<CliCreateSessionResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Links a pending CLI session to the currently authenticated user. This is the
|
|
19
|
+
* final step in the CLI authentication flow, where the user enters the code in the
|
|
20
|
+
* web interface and their account is associated with the CLI session, allowing the
|
|
21
|
+
* CLI to act on their behalf.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response = await client.v3.cli.linkSession({
|
|
26
|
+
* id: 'ABC123',
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
linkSession(body: CliLinkSessionParams, options?: RequestOptions): APIPromise<CliLinkSessionResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves the current state of a CLI session using either the session ID (UUID)
|
|
33
|
+
* or the 6-character code. This endpoint is used by both the CLI client to check
|
|
34
|
+
* if the session has been linked, and by the web interface to display session
|
|
35
|
+
* details before linking.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const response = await client.v3.cli.retrieveSession({
|
|
40
|
+
* id: 'ABC123',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
retrieveSession(query: CliRetrieveSessionParams, options?: RequestOptions): APIPromise<CliRetrieveSessionResponse>;
|
|
45
|
+
}
|
|
46
|
+
export interface CliCreateSessionResponse {
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for the CLI session. UUID v4 format used for tracking and
|
|
49
|
+
* retrieval.
|
|
50
|
+
*/
|
|
51
|
+
id: string;
|
|
52
|
+
/**
|
|
53
|
+
* The 6-character hexadecimal code used for CLI login
|
|
54
|
+
*/
|
|
55
|
+
code: string;
|
|
56
|
+
/**
|
|
57
|
+
* The ISO timestamp when the session expires
|
|
58
|
+
*/
|
|
59
|
+
expiresAt: string;
|
|
60
|
+
/**
|
|
61
|
+
* The current status of the session
|
|
62
|
+
*/
|
|
63
|
+
status: 'pending' | 'linked';
|
|
64
|
+
}
|
|
65
|
+
export interface CliLinkSessionResponse {
|
|
66
|
+
/**
|
|
67
|
+
* The unique identifier for the CLI session
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
/**
|
|
71
|
+
* Information about the linked account. Always present for successful responses
|
|
72
|
+
* from this endpoint.
|
|
73
|
+
*/
|
|
74
|
+
account: CliLinkSessionResponse.Account;
|
|
75
|
+
/**
|
|
76
|
+
* The 6-character hexadecimal code used for CLI login
|
|
77
|
+
*/
|
|
78
|
+
code: string;
|
|
79
|
+
/**
|
|
80
|
+
* The ISO timestamp when the session expires
|
|
81
|
+
*/
|
|
82
|
+
expiresAt: string;
|
|
83
|
+
/**
|
|
84
|
+
* The current status of the session
|
|
85
|
+
*/
|
|
86
|
+
status: 'pending' | 'linked';
|
|
87
|
+
}
|
|
88
|
+
export declare namespace CliLinkSessionResponse {
|
|
89
|
+
/**
|
|
90
|
+
* Information about the linked account. Always present for successful responses
|
|
91
|
+
* from this endpoint.
|
|
92
|
+
*/
|
|
93
|
+
interface Account {
|
|
94
|
+
/**
|
|
95
|
+
* The ID of the linked account
|
|
96
|
+
*/
|
|
97
|
+
id: string;
|
|
98
|
+
/**
|
|
99
|
+
* The email address of the linked account
|
|
100
|
+
*/
|
|
101
|
+
email: string;
|
|
102
|
+
/**
|
|
103
|
+
* The display name of the linked account
|
|
104
|
+
*/
|
|
105
|
+
name: string;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
export interface CliRetrieveSessionResponse {
|
|
109
|
+
/**
|
|
110
|
+
* The unique identifier for the CLI session
|
|
111
|
+
*/
|
|
112
|
+
id: string;
|
|
113
|
+
/**
|
|
114
|
+
* Information about the linked account, if any. Null if the session status is
|
|
115
|
+
* "pending".
|
|
116
|
+
*/
|
|
117
|
+
account: CliRetrieveSessionResponse.Account | null;
|
|
118
|
+
/**
|
|
119
|
+
* The 6-character hexadecimal code used for CLI login
|
|
120
|
+
*/
|
|
121
|
+
code: string;
|
|
122
|
+
/**
|
|
123
|
+
* The ISO timestamp when the session expires
|
|
124
|
+
*/
|
|
125
|
+
expiresAt: string;
|
|
126
|
+
/**
|
|
127
|
+
* The current status of the session
|
|
128
|
+
*/
|
|
129
|
+
status: 'pending' | 'linked';
|
|
130
|
+
}
|
|
131
|
+
export declare namespace CliRetrieveSessionResponse {
|
|
132
|
+
/**
|
|
133
|
+
* Information about the linked account, if any. Null if the session status is
|
|
134
|
+
* "pending".
|
|
135
|
+
*/
|
|
136
|
+
interface Account {
|
|
137
|
+
/**
|
|
138
|
+
* The ID of the linked account
|
|
139
|
+
*/
|
|
140
|
+
id: string;
|
|
141
|
+
/**
|
|
142
|
+
* The email address of the linked account
|
|
143
|
+
*/
|
|
144
|
+
email: string;
|
|
145
|
+
/**
|
|
146
|
+
* The display name of the linked account
|
|
147
|
+
*/
|
|
148
|
+
name: string;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export interface CliLinkSessionParams {
|
|
152
|
+
/**
|
|
153
|
+
* The CLI session ID or code to link to the current user
|
|
154
|
+
*/
|
|
155
|
+
id: string;
|
|
156
|
+
}
|
|
157
|
+
export interface CliRetrieveSessionParams {
|
|
158
|
+
/**
|
|
159
|
+
* CLI session ID (UUID format) or 6-character code to check. Both formats are
|
|
160
|
+
* supported for flexibility in client implementations.
|
|
161
|
+
*/
|
|
162
|
+
id: string;
|
|
163
|
+
}
|
|
164
|
+
export declare namespace Cli {
|
|
165
|
+
export { type CliCreateSessionResponse as CliCreateSessionResponse, type CliLinkSessionResponse as CliLinkSessionResponse, type CliRetrieveSessionResponse as CliRetrieveSessionResponse, type CliLinkSessionParams as CliLinkSessionParams, type CliRetrieveSessionParams as CliRetrieveSessionParams, };
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/resources/v3/cli.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;OAUG;IACH,aAAa,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAI7E;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIrG;;;;;;;;;;;;OAYG;IACH,eAAe,CACb,KAAK,EAAE,wBAAwB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAG1C;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC;IAExC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC9B;AAED,yBAAiB,sBAAsB,CAAC;IACtC;;;OAGG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,OAAO,EAAE,0BAA0B,CAAC,OAAO,GAAG,IAAI,CAAC;IAEnD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC9B;AAED,yBAAiB,0BAA0B,CAAC;IAC1C;;;OAGG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Cli = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
class Cli extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Generates a new CLI session with a random 6-character code. This endpoint is the
|
|
9
|
+
* first step in the CLI authentication flow, creating a session that can later be
|
|
10
|
+
* linked to a user account. The generated code is displayed to the user in the CLI
|
|
11
|
+
* and should be entered in the web interface to complete authentication.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.v3.cli.createSession();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
createSession(options) {
|
|
19
|
+
return this._client.post('/api/v3/cli/create-session', options);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Links a pending CLI session to the currently authenticated user. This is the
|
|
23
|
+
* final step in the CLI authentication flow, where the user enters the code in the
|
|
24
|
+
* web interface and their account is associated with the CLI session, allowing the
|
|
25
|
+
* CLI to act on their behalf.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.v3.cli.linkSession({
|
|
30
|
+
* id: 'ABC123',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
linkSession(body, options) {
|
|
35
|
+
return this._client.put('/api/v3/cli/link-session', { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the current state of a CLI session using either the session ID (UUID)
|
|
39
|
+
* or the 6-character code. This endpoint is used by both the CLI client to check
|
|
40
|
+
* if the session has been linked, and by the web interface to display session
|
|
41
|
+
* details before linking.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const response = await client.v3.cli.retrieveSession({
|
|
46
|
+
* id: 'ABC123',
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
retrieveSession(query, options) {
|
|
51
|
+
return this._client.get('/api/v3/cli/get-session', { query, ...options });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.Cli = Cli;
|
|
55
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/resources/v3/cli.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,MAAa,GAAI,SAAQ,sBAAW;IAClC;;;;;;;;;;OAUG;IACH,aAAa,CAAC,OAAwB;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,IAA0B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,eAAe,CACb,KAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AApDD,kBAoDC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
export class Cli extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Generates a new CLI session with a random 6-character code. This endpoint is the
|
|
6
|
+
* first step in the CLI authentication flow, creating a session that can later be
|
|
7
|
+
* linked to a user account. The generated code is displayed to the user in the CLI
|
|
8
|
+
* and should be entered in the web interface to complete authentication.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.v3.cli.createSession();
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
createSession(options) {
|
|
16
|
+
return this._client.post('/api/v3/cli/create-session', options);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Links a pending CLI session to the currently authenticated user. This is the
|
|
20
|
+
* final step in the CLI authentication flow, where the user enters the code in the
|
|
21
|
+
* web interface and their account is associated with the CLI session, allowing the
|
|
22
|
+
* CLI to act on their behalf.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response = await client.v3.cli.linkSession({
|
|
27
|
+
* id: 'ABC123',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
linkSession(body, options) {
|
|
32
|
+
return this._client.put('/api/v3/cli/link-session', { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Retrieves the current state of a CLI session using either the session ID (UUID)
|
|
36
|
+
* or the 6-character code. This endpoint is used by both the CLI client to check
|
|
37
|
+
* if the session has been linked, and by the web interface to display session
|
|
38
|
+
* details before linking.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.v3.cli.retrieveSession({
|
|
43
|
+
* id: 'ABC123',
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
retrieveSession(query, options) {
|
|
48
|
+
return this._client.get('/api/v3/cli/get-session', { query, ...options });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=cli.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.mjs","sourceRoot":"","sources":["../../src/resources/v3/cli.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;OAUG;IACH,aAAa,CAAC,OAAwB;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,IAA0B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,eAAe,CACb,KAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Admin, type AdminListConnectionsResponse, type AdminRefreshAuthTokensResponse, type AdminListConnectionsParams, type AdminRefreshAuthTokensParams, } from "./admin.mjs";
|
|
2
|
+
export { Auth } from "./auth/index.mjs";
|
|
3
|
+
export { Cli, type CliCreateSessionResponse, type CliLinkSessionResponse, type CliRetrieveSessionResponse, type CliLinkSessionParams, type CliRetrieveSessionParams, } from "./cli.mjs";
|
|
4
|
+
export { Internal } from "./internal/index.mjs";
|
|
5
|
+
export { V3 } from "./v3.mjs";
|
|
6
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/v3/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,GAClC;OACM,EAAE,IAAI,EAAE;OACR,EACL,GAAG,EACH,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE;OACZ,EAAE,EAAE,EAAE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Admin, type AdminListConnectionsResponse, type AdminRefreshAuthTokensResponse, type AdminListConnectionsParams, type AdminRefreshAuthTokensParams, } from "./admin.js";
|
|
2
|
+
export { Auth } from "./auth/index.js";
|
|
3
|
+
export { Cli, type CliCreateSessionResponse, type CliLinkSessionResponse, type CliRetrieveSessionResponse, type CliLinkSessionParams, type CliRetrieveSessionParams, } from "./cli.js";
|
|
4
|
+
export { Internal } from "./internal/index.js";
|
|
5
|
+
export { V3 } from "./v3.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/v3/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,GAClC;OACM,EAAE,IAAI,EAAE;OACR,EACL,GAAG,EACH,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B;OACM,EAAE,QAAQ,EAAE;OACZ,EAAE,EAAE,EAAE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.V3 = exports.Internal = exports.Cli = exports.Auth = exports.Admin = void 0;
|
|
5
|
+
var admin_1 = require("./admin.js");
|
|
6
|
+
Object.defineProperty(exports, "Admin", { enumerable: true, get: function () { return admin_1.Admin; } });
|
|
7
|
+
var index_1 = require("./auth/index.js");
|
|
8
|
+
Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { return index_1.Auth; } });
|
|
9
|
+
var cli_1 = require("./cli.js");
|
|
10
|
+
Object.defineProperty(exports, "Cli", { enumerable: true, get: function () { return cli_1.Cli; } });
|
|
11
|
+
var index_2 = require("./internal/index.js");
|
|
12
|
+
Object.defineProperty(exports, "Internal", { enumerable: true, get: function () { return index_2.Internal; } });
|
|
13
|
+
var v3_1 = require("./v3.js");
|
|
14
|
+
Object.defineProperty(exports, "V3", { enumerable: true, get: function () { return v3_1.V3; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v3/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAMiB;AALf,8FAAA,KAAK,OAAA;AAMP,yCAAoC;AAA3B,6FAAA,IAAI,OAAA;AACb,gCAOe;AANb,0FAAA,GAAG,OAAA;AAOL,6CAA4C;AAAnC,iGAAA,QAAQ,OAAA;AACjB,8BAA0B;AAAjB,wFAAA,EAAE,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export { Admin, } from "./admin.mjs";
|
|
3
|
+
export { Auth } from "./auth/index.mjs";
|
|
4
|
+
export { Cli, } from "./cli.mjs";
|
|
5
|
+
export { Internal } from "./internal/index.mjs";
|
|
6
|
+
export { V3 } from "./v3.mjs";
|
|
7
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/v3/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,KAAK,GAKN;OACM,EAAE,IAAI,EAAE;OACR,EACL,GAAG,GAMJ;OACM,EAAE,QAAQ,EAAE;OACZ,EAAE,EAAE,EAAE"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
export declare class ActionExecution extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get detailed execution log by ID
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const response =
|
|
11
|
+
* await client.v3.internal.actionExecution.retrieveLog(
|
|
12
|
+
* 'id',
|
|
13
|
+
* );
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
retrieveLog(id: string, options?: RequestOptions): APIPromise<ActionExecutionRetrieveLogResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Search and retrieve action execution logs
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const response =
|
|
23
|
+
* await client.v3.internal.actionExecution.searchLogs({
|
|
24
|
+
* cursor: 0,
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
searchLogs(body: ActionExecutionSearchLogsParams, options?: RequestOptions): APIPromise<ActionExecutionSearchLogsResponse>;
|
|
29
|
+
}
|
|
30
|
+
export interface ActionExecutionRetrieveLogResponse {
|
|
31
|
+
actionId: string;
|
|
32
|
+
actionLogId: string;
|
|
33
|
+
app: ActionExecutionRetrieveLogResponse.App;
|
|
34
|
+
connection: ActionExecutionRetrieveLogResponse.Connection;
|
|
35
|
+
endTime: number;
|
|
36
|
+
error: Record<string, unknown>;
|
|
37
|
+
executionMetadata: Record<string, unknown>;
|
|
38
|
+
payloadReceived: Record<string, unknown>;
|
|
39
|
+
response: Record<string, unknown>;
|
|
40
|
+
session: Record<string, unknown>;
|
|
41
|
+
startTime: number;
|
|
42
|
+
status: 'success' | 'error' | 'warning' | 'info';
|
|
43
|
+
steps: Array<ActionExecutionRetrieveLogResponse.Step>;
|
|
44
|
+
totalDuration: string;
|
|
45
|
+
version: string;
|
|
46
|
+
}
|
|
47
|
+
export declare namespace ActionExecutionRetrieveLogResponse {
|
|
48
|
+
interface App {
|
|
49
|
+
icon: string;
|
|
50
|
+
name: string;
|
|
51
|
+
uniqueId: string;
|
|
52
|
+
}
|
|
53
|
+
interface Connection {
|
|
54
|
+
entity: string;
|
|
55
|
+
id?: string;
|
|
56
|
+
}
|
|
57
|
+
interface Step {
|
|
58
|
+
endTime: number;
|
|
59
|
+
message: string;
|
|
60
|
+
startTime: number;
|
|
61
|
+
status: 'success' | 'failure' | 'error';
|
|
62
|
+
totalDuration: number;
|
|
63
|
+
type: 'tool_execution' | 'fetch_connection_details';
|
|
64
|
+
logs?: Array<Step.Log>;
|
|
65
|
+
metadata?: Step.Metadata;
|
|
66
|
+
}
|
|
67
|
+
namespace Step {
|
|
68
|
+
interface Log {
|
|
69
|
+
level: string;
|
|
70
|
+
message: string;
|
|
71
|
+
request: Log.Request;
|
|
72
|
+
requestId: string;
|
|
73
|
+
response: Log.Response;
|
|
74
|
+
time: number;
|
|
75
|
+
type: 'network' | 'system';
|
|
76
|
+
}
|
|
77
|
+
namespace Log {
|
|
78
|
+
interface Request {
|
|
79
|
+
method: string;
|
|
80
|
+
url: string;
|
|
81
|
+
headers?: Record<string, string>;
|
|
82
|
+
json?: Record<string, unknown>;
|
|
83
|
+
params?: Record<string, unknown>;
|
|
84
|
+
timeout?: number;
|
|
85
|
+
}
|
|
86
|
+
interface Response {
|
|
87
|
+
status: number;
|
|
88
|
+
time: string;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
interface Metadata {
|
|
92
|
+
encryption?: string;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
export interface ActionExecutionSearchLogsResponse {
|
|
97
|
+
data: Array<ActionExecutionSearchLogsResponse.Data>;
|
|
98
|
+
nextCursor: number | null;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace ActionExecutionSearchLogsResponse {
|
|
101
|
+
interface Data {
|
|
102
|
+
id: string;
|
|
103
|
+
actionKey: string;
|
|
104
|
+
app: Data.App;
|
|
105
|
+
appKey: string;
|
|
106
|
+
connectedAccountId: string;
|
|
107
|
+
createdAt: number;
|
|
108
|
+
entityId: string;
|
|
109
|
+
executionTime: number;
|
|
110
|
+
minimalResponse: string;
|
|
111
|
+
status: 'success' | 'failed';
|
|
112
|
+
}
|
|
113
|
+
namespace Data {
|
|
114
|
+
interface App {
|
|
115
|
+
icon: string;
|
|
116
|
+
name: string;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export interface ActionExecutionSearchLogsParams {
|
|
121
|
+
/**
|
|
122
|
+
* cursor_that_can_be_used_to_paginate_through_the_logs
|
|
123
|
+
*/
|
|
124
|
+
cursor: number | null;
|
|
125
|
+
/**
|
|
126
|
+
* whether_the_search_is_case_sensitive_or_not
|
|
127
|
+
*/
|
|
128
|
+
case_sensitive?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* start_time_of_the_logs_in_epoch_time
|
|
131
|
+
*/
|
|
132
|
+
from?: number;
|
|
133
|
+
/**
|
|
134
|
+
* number_of_logs_to_return
|
|
135
|
+
*/
|
|
136
|
+
limit?: number;
|
|
137
|
+
search_params?: Array<ActionExecutionSearchLogsParams.SearchParam>;
|
|
138
|
+
/**
|
|
139
|
+
* end_time_of_the_logs_in_epoch_time
|
|
140
|
+
*/
|
|
141
|
+
to?: number;
|
|
142
|
+
}
|
|
143
|
+
export declare namespace ActionExecutionSearchLogsParams {
|
|
144
|
+
interface SearchParam {
|
|
145
|
+
field?: string;
|
|
146
|
+
operation?: string;
|
|
147
|
+
value?: string;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export declare namespace ActionExecution {
|
|
151
|
+
export { type ActionExecutionRetrieveLogResponse as ActionExecutionRetrieveLogResponse, type ActionExecutionSearchLogsResponse as ActionExecutionSearchLogsResponse, type ActionExecutionSearchLogsParams as ActionExecutionSearchLogsParams, };
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=action-execution.d.mts.map
|