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