@composio/client 0.1.0-alpha.25 → 0.1.0-alpha.26
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 +28 -0
- package/client.d.mts +4 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -5
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/internal/request-options.d.mts +42 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +42 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/types.d.mts +8 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +8 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +26 -5
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +26 -5
- package/internal/utils/path.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +22 -4
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +22 -4
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/connected-accounts.d.mts +2153 -633
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +2153 -633
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +7 -2
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +7 -2
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +14 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +14 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +1 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +5 -9
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +5 -9
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +1 -1
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +1 -1
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/toolkits.d.mts +17 -2
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +17 -2
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/tools.d.mts +9 -4
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +9 -4
- package/resources/tools.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +12 -3
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +12 -3
- 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/triggers-types.d.mts +8 -3
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +8 -3
- package/resources/triggers-types.d.ts.map +1 -1
- package/src/client.ts +4 -5
- package/src/internal/request-options.ts +53 -0
- package/src/internal/types.ts +9 -6
- package/src/internal/uploads.ts +1 -1
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +32 -7
- package/src/resources/auth-configs.ts +27 -4
- package/src/resources/connected-accounts.ts +4045 -1211
- package/src/resources/files.ts +18 -1
- package/src/resources/index.ts +1 -1
- package/src/resources/mcp/mcp.ts +6 -11
- package/src/resources/toolkits.ts +23 -2
- package/src/resources/tools.ts +11 -4
- package/src/resources/trigger-instances/trigger-instances.ts +15 -3
- package/src/resources/triggers-types.ts +10 -3
- 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/v3/auth/auth.d.mts +0 -10
- package/resources/v3/auth/auth.d.mts.map +0 -1
- package/resources/v3/auth/auth.d.ts +0 -10
- package/resources/v3/auth/auth.d.ts.map +0 -1
- package/resources/v3/auth/auth.js +0 -17
- package/resources/v3/auth/auth.js.map +0 -1
- package/resources/v3/auth/auth.mjs +0 -12
- package/resources/v3/auth/auth.mjs.map +0 -1
- package/resources/v3/auth/index.d.mts +0 -3
- package/resources/v3/auth/index.d.mts.map +0 -1
- package/resources/v3/auth/index.d.ts +0 -3
- package/resources/v3/auth/index.d.ts.map +0 -1
- package/resources/v3/auth/index.js +0 -9
- package/resources/v3/auth/index.js.map +0 -1
- package/resources/v3/auth/index.mjs +0 -4
- package/resources/v3/auth/index.mjs.map +0 -1
- package/resources/v3/auth/session.d.mts +0 -246
- package/resources/v3/auth/session.d.mts.map +0 -1
- package/resources/v3/auth/session.d.ts +0 -246
- package/resources/v3/auth/session.d.ts.map +0 -1
- package/resources/v3/auth/session.js +0 -25
- package/resources/v3/auth/session.js.map +0 -1
- package/resources/v3/auth/session.mjs +0 -21
- package/resources/v3/auth/session.mjs.map +0 -1
- package/resources/v3/auth.d.mts +0 -2
- package/resources/v3/auth.d.mts.map +0 -1
- package/resources/v3/auth.d.ts +0 -2
- package/resources/v3/auth.d.ts.map +0 -1
- package/resources/v3/auth.js +0 -6
- package/resources/v3/auth.js.map +0 -1
- package/resources/v3/auth.mjs +0 -3
- package/resources/v3/auth.mjs.map +0 -1
- package/resources/v3/cli.d.mts +0 -167
- package/resources/v3/cli.d.mts.map +0 -1
- package/resources/v3/cli.d.ts +0 -167
- package/resources/v3/cli.d.ts.map +0 -1
- package/resources/v3/cli.js +0 -55
- package/resources/v3/cli.js.map +0 -1
- package/resources/v3/cli.mjs +0 -51
- package/resources/v3/cli.mjs.map +0 -1
- package/resources/v3/index.d.mts +0 -5
- package/resources/v3/index.d.mts.map +0 -1
- package/resources/v3/index.d.ts +0 -5
- package/resources/v3/index.d.ts.map +0 -1
- package/resources/v3/index.js +0 -13
- package/resources/v3/index.js.map +0 -1
- package/resources/v3/index.mjs +0 -6
- package/resources/v3/index.mjs.map +0 -1
- package/resources/v3/internal/action-execution.d.mts +0 -169
- package/resources/v3/internal/action-execution.d.mts.map +0 -1
- package/resources/v3/internal/action-execution.d.ts +0 -169
- package/resources/v3/internal/action-execution.d.ts.map +0 -1
- package/resources/v3/internal/action-execution.js +0 -38
- package/resources/v3/internal/action-execution.js.map +0 -1
- package/resources/v3/internal/action-execution.mjs +0 -34
- package/resources/v3/internal/action-execution.mjs.map +0 -1
- package/resources/v3/internal/index.d.mts +0 -4
- package/resources/v3/internal/index.d.mts.map +0 -1
- package/resources/v3/internal/index.d.ts +0 -4
- package/resources/v3/internal/index.d.ts.map +0 -1
- package/resources/v3/internal/index.js +0 -11
- package/resources/v3/internal/index.js.map +0 -1
- package/resources/v3/internal/index.mjs +0 -5
- package/resources/v3/internal/index.mjs.map +0 -1
- package/resources/v3/internal/internal.d.mts +0 -14
- package/resources/v3/internal/internal.d.mts.map +0 -1
- package/resources/v3/internal/internal.d.ts +0 -14
- package/resources/v3/internal/internal.d.ts.map +0 -1
- package/resources/v3/internal/internal.js +0 -21
- package/resources/v3/internal/internal.js.map +0 -1
- package/resources/v3/internal/internal.mjs +0 -16
- package/resources/v3/internal/internal.mjs.map +0 -1
- package/resources/v3/internal/trigger.d.mts +0 -84
- package/resources/v3/internal/trigger.d.mts.map +0 -1
- package/resources/v3/internal/trigger.d.ts +0 -84
- package/resources/v3/internal/trigger.d.ts.map +0 -1
- package/resources/v3/internal/trigger.js +0 -23
- package/resources/v3/internal/trigger.js.map +0 -1
- package/resources/v3/internal/trigger.mjs +0 -19
- package/resources/v3/internal/trigger.mjs.map +0 -1
- package/resources/v3/internal.d.mts +0 -2
- package/resources/v3/internal.d.mts.map +0 -1
- package/resources/v3/internal.d.ts +0 -2
- package/resources/v3/internal.d.ts.map +0 -1
- package/resources/v3/internal.js +0 -6
- package/resources/v3/internal.js.map +0 -1
- package/resources/v3/internal.mjs +0 -3
- package/resources/v3/internal.mjs.map +0 -1
- package/resources/v3/v3.d.mts +0 -18
- package/resources/v3/v3.d.mts.map +0 -1
- package/resources/v3/v3.d.ts +0 -18
- package/resources/v3/v3.d.ts.map +0 -1
- package/resources/v3/v3.js +0 -25
- package/resources/v3/v3.js.map +0 -1
- package/resources/v3/v3.mjs +0 -20
- package/resources/v3/v3.mjs.map +0 -1
- package/resources/v3.d.mts +0 -2
- package/resources/v3.d.mts.map +0 -1
- package/resources/v3.d.ts +0 -2
- package/resources/v3.d.ts.map +0 -1
- package/resources/v3.js +0 -6
- package/resources/v3.js.map +0 -1
- package/resources/v3.mjs +0 -3
- package/resources/v3.mjs.map +0 -1
- package/src/resources/v3/auth/auth.ts +0 -15
- package/src/resources/v3/auth/index.ts +0 -4
- package/src/resources/v3/auth/session.ts +0 -298
- package/src/resources/v3/auth.ts +0 -3
- package/src/resources/v3/cli.ts +0 -209
- package/src/resources/v3/index.ts +0 -13
- package/src/resources/v3/internal/action-execution.ts +0 -236
- package/src/resources/v3/internal/index.ts +0 -10
- package/src/resources/v3/internal/internal.ts +0 -35
- package/src/resources/v3/internal/trigger.ts +0 -122
- package/src/resources/v3/internal.ts +0 -3
- package/src/resources/v3/v3.ts +0 -41
- package/src/resources/v3.ts +0 -3
|
@@ -1,298 +0,0 @@
|
|
|
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 Session extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Retrieves detailed information about the current authenticated user session,
|
|
10
|
-
* including project details, organization membership, and API key information if
|
|
11
|
-
* applicable. This endpoint is useful for verifying authentication status and
|
|
12
|
-
* retrieving contextual information about the authenticated user and their access
|
|
13
|
-
* privileges.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* const response =
|
|
18
|
-
* await client.v3.auth.session.retrieveInfo();
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
retrieveInfo(options?: RequestOptions): APIPromise<SessionRetrieveInfoResponse> {
|
|
22
|
-
return this._client.get('/api/v3/auth/session/info', options);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Response containing user session information
|
|
28
|
-
*/
|
|
29
|
-
export interface SessionRetrieveInfoResponse {
|
|
30
|
-
/**
|
|
31
|
-
* Details of the API key used for authentication (null if using session auth)
|
|
32
|
-
*/
|
|
33
|
-
api_key: SessionRetrieveInfoResponse.APIKey | null;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Information about the authenticated user
|
|
37
|
-
*/
|
|
38
|
-
org_member: SessionRetrieveInfoResponse.OrgMember;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Details of the current active project (null if accessing with org-level
|
|
42
|
-
* credentials)
|
|
43
|
-
*/
|
|
44
|
-
project: SessionRetrieveInfoResponse.Project | null;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export namespace SessionRetrieveInfoResponse {
|
|
48
|
-
/**
|
|
49
|
-
* Details of the API key used for authentication (null if using session auth)
|
|
50
|
-
*/
|
|
51
|
-
export interface APIKey {
|
|
52
|
-
/**
|
|
53
|
-
* UUID identifier for the API key
|
|
54
|
-
*/
|
|
55
|
-
id: string;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Internal auto-incrementing ID for the API key
|
|
59
|
-
*/
|
|
60
|
-
auto_id: number;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Date and time when the API key was created
|
|
64
|
-
*/
|
|
65
|
-
created_at: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Flag indicating if the API key has been deleted
|
|
69
|
-
*/
|
|
70
|
-
deleted: boolean;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Date and time when the API key was deleted (if applicable)
|
|
74
|
-
*/
|
|
75
|
-
deleted_at: string | null;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* The actual API key value (usually only shown once during creation)
|
|
79
|
-
*/
|
|
80
|
-
key: string;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* User-defined name for the API key
|
|
84
|
-
*/
|
|
85
|
-
name: string;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* UUID identifier for the organization member who owns this API key
|
|
89
|
-
*/
|
|
90
|
-
org_member_id: string;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Short, URL-friendly unique identifier for the associated project
|
|
94
|
-
*/
|
|
95
|
-
project_id: string;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Date and time when the API key was last modified
|
|
99
|
-
*/
|
|
100
|
-
updated_at: string;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Information about the authenticated user
|
|
105
|
-
*/
|
|
106
|
-
export interface OrgMember {
|
|
107
|
-
/**
|
|
108
|
-
* UUID identifier for the organization member
|
|
109
|
-
*/
|
|
110
|
-
id: string;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Email address of the authenticated user
|
|
114
|
-
*/
|
|
115
|
-
email: string;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Display name of the authenticated user
|
|
119
|
-
*/
|
|
120
|
-
name: string;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Access role of the authenticated user within the organization
|
|
124
|
-
*/
|
|
125
|
-
role: string;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Details of the current active project (null if accessing with org-level
|
|
130
|
-
* credentials)
|
|
131
|
-
*/
|
|
132
|
-
export interface Project {
|
|
133
|
-
/**
|
|
134
|
-
* UUID identifier for the project
|
|
135
|
-
*/
|
|
136
|
-
id: string;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Internal auto-incrementing ID for the project
|
|
140
|
-
*/
|
|
141
|
-
auto_id: number;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Date and time when the project was created
|
|
145
|
-
*/
|
|
146
|
-
created_at: string;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Flag indicating if the project has been deleted
|
|
150
|
-
*/
|
|
151
|
-
deleted: boolean;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Email address used for project notifications
|
|
155
|
-
*/
|
|
156
|
-
email: string;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Endpoint URL for event webhook notifications
|
|
160
|
-
*/
|
|
161
|
-
event_webhook_url: string | null;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Flag indicating if the project uses the new webhook format
|
|
165
|
-
*/
|
|
166
|
-
is_new_webhook: boolean;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Date and time when the project last subscribed to updates
|
|
170
|
-
*/
|
|
171
|
-
last_subscribed_at: string | null;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* User-defined name for the project
|
|
175
|
-
*/
|
|
176
|
-
name: string;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Short, URL-friendly unique identifier for the project
|
|
180
|
-
*/
|
|
181
|
-
nano_id: string;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Organization details including members
|
|
185
|
-
*/
|
|
186
|
-
org: Project.Org;
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Organization UUID that this project belongs to
|
|
190
|
-
*/
|
|
191
|
-
org_id: string;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Flag indicating if triggers are enabled for this project
|
|
195
|
-
*/
|
|
196
|
-
triggers_enabled: boolean;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Date and time when the project was last modified
|
|
200
|
-
*/
|
|
201
|
-
updated_at: string;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Secret used to verify webhook signatures
|
|
205
|
-
*/
|
|
206
|
-
webhook_secret: string | null;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Endpoint URL for trigger webhook notifications
|
|
210
|
-
*/
|
|
211
|
-
webhook_url: string | null;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
export namespace Project {
|
|
215
|
-
/**
|
|
216
|
-
* Organization details including members
|
|
217
|
-
*/
|
|
218
|
-
export interface Org {
|
|
219
|
-
/**
|
|
220
|
-
* Short, URL-friendly unique identifier for the organization
|
|
221
|
-
*/
|
|
222
|
-
id: string;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* User-defined name for the organization
|
|
226
|
-
*/
|
|
227
|
-
name: string;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Array of members belonging to this organization
|
|
231
|
-
*/
|
|
232
|
-
org_members: Array<Org.OrgMember>;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Current subscription plan level
|
|
236
|
-
*/
|
|
237
|
-
plan: string;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export namespace Org {
|
|
241
|
-
export interface OrgMember {
|
|
242
|
-
/**
|
|
243
|
-
* UUID identifier for the organization member
|
|
244
|
-
*/
|
|
245
|
-
id: string;
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Internal auto-incrementing ID for the organization member
|
|
249
|
-
*/
|
|
250
|
-
auto_id: number;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Date and time when the member was added to the organization
|
|
254
|
-
*/
|
|
255
|
-
created_at: string;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Date and time when the member was removed from the organization (if applicable)
|
|
259
|
-
*/
|
|
260
|
-
deleted_at: string | null;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Email address of the organization member
|
|
264
|
-
*/
|
|
265
|
-
email: string;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* User-defined name for the organization member
|
|
269
|
-
*/
|
|
270
|
-
name: string;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* Organization UUID that this member belongs to
|
|
274
|
-
*/
|
|
275
|
-
org_id: string;
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Access role of the member within the organization
|
|
279
|
-
*/
|
|
280
|
-
role: string;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Date and time when the member was last modified
|
|
284
|
-
*/
|
|
285
|
-
updated_at: string;
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Optional custom metadata for the organization member
|
|
289
|
-
*/
|
|
290
|
-
metadata?: unknown;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
export declare namespace Session {
|
|
297
|
-
export { type SessionRetrieveInfoResponse as SessionRetrieveInfoResponse };
|
|
298
|
-
}
|
package/src/resources/v3/auth.ts
DELETED
package/src/resources/v3/cli.ts
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export { Auth } from './auth/index';
|
|
4
|
-
export {
|
|
5
|
-
Cli,
|
|
6
|
-
type CliCreateSessionResponse,
|
|
7
|
-
type CliLinkSessionResponse,
|
|
8
|
-
type CliRetrieveSessionResponse,
|
|
9
|
-
type CliLinkSessionParams,
|
|
10
|
-
type CliRetrieveSessionParams,
|
|
11
|
-
} from './cli';
|
|
12
|
-
export { Internal } from './internal/index';
|
|
13
|
-
export { V3 } from './v3';
|