@composio/client 0.1.0-alpha.34 → 0.1.0-alpha.36

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/src/client.ts CHANGED
@@ -61,7 +61,14 @@ import {
61
61
  FileListResponse,
62
62
  Files,
63
63
  } from './resources/files';
64
- import { Link, LinkRetrieveResponse, LinkSubmitInputParams, LinkSubmitInputResponse } from './resources/link';
64
+ import {
65
+ Link,
66
+ LinkCreateParams,
67
+ LinkCreateResponse,
68
+ LinkRetrieveResponse,
69
+ LinkSubmitParams,
70
+ LinkSubmitResponse,
71
+ } from './resources/link';
65
72
  import {
66
73
  Migration,
67
74
  MigrationRetrieveNanoidParams,
@@ -890,9 +897,11 @@ export declare namespace Composio {
890
897
 
891
898
  export {
892
899
  Link as Link,
900
+ type LinkCreateResponse as LinkCreateResponse,
893
901
  type LinkRetrieveResponse as LinkRetrieveResponse,
894
- type LinkSubmitInputResponse as LinkSubmitInputResponse,
895
- type LinkSubmitInputParams as LinkSubmitInputParams,
902
+ type LinkSubmitResponse as LinkSubmitResponse,
903
+ type LinkCreateParams as LinkCreateParams,
904
+ type LinkSubmitParams as LinkSubmitParams,
896
905
  };
897
906
 
898
907
  export { Org as Org };
@@ -1289,8 +1289,6 @@ export namespace ConnectedAccountCreateResponse {
1289
1289
  }
1290
1290
 
1291
1291
  export interface UnionMember2 {
1292
- password: string;
1293
-
1294
1292
  status: 'ACTIVE';
1295
1293
 
1296
1294
  username: string;
@@ -1319,6 +1317,8 @@ export namespace ConnectedAccountCreateResponse {
1319
1317
 
1320
1318
  instanceName?: string;
1321
1319
 
1320
+ password?: string;
1321
+
1322
1322
  proxy_password?: string;
1323
1323
 
1324
1324
  proxy_username?: string;
@@ -1343,8 +1343,6 @@ export namespace ConnectedAccountCreateResponse {
1343
1343
  }
1344
1344
 
1345
1345
  export interface UnionMember3 {
1346
- password: string;
1347
-
1348
1346
  status: 'INACTIVE';
1349
1347
 
1350
1348
  username: string;
@@ -1373,6 +1371,8 @@ export namespace ConnectedAccountCreateResponse {
1373
1371
 
1374
1372
  instanceName?: string;
1375
1373
 
1374
+ password?: string;
1375
+
1376
1376
  proxy_password?: string;
1377
1377
 
1378
1378
  proxy_username?: string;
@@ -4383,8 +4383,6 @@ export namespace ConnectedAccountRetrieveResponse {
4383
4383
  }
4384
4384
 
4385
4385
  export interface UnionMember2 {
4386
- password: string;
4387
-
4388
4386
  status: 'ACTIVE';
4389
4387
 
4390
4388
  username: string;
@@ -4413,6 +4411,8 @@ export namespace ConnectedAccountRetrieveResponse {
4413
4411
 
4414
4412
  instanceName?: string;
4415
4413
 
4414
+ password?: string;
4415
+
4416
4416
  proxy_password?: string;
4417
4417
 
4418
4418
  proxy_username?: string;
@@ -4437,8 +4437,6 @@ export namespace ConnectedAccountRetrieveResponse {
4437
4437
  }
4438
4438
 
4439
4439
  export interface UnionMember3 {
4440
- password: string;
4441
-
4442
4440
  status: 'INACTIVE';
4443
4441
 
4444
4442
  username: string;
@@ -4467,6 +4465,8 @@ export namespace ConnectedAccountRetrieveResponse {
4467
4465
 
4468
4466
  instanceName?: string;
4469
4467
 
4468
+ password?: string;
4469
+
4470
4470
  proxy_password?: string;
4471
4471
 
4472
4472
  proxy_username?: string;
@@ -7497,8 +7497,6 @@ export namespace ConnectedAccountListResponse {
7497
7497
  }
7498
7498
 
7499
7499
  export interface UnionMember2 {
7500
- password: string;
7501
-
7502
7500
  status: 'ACTIVE';
7503
7501
 
7504
7502
  username: string;
@@ -7527,6 +7525,8 @@ export namespace ConnectedAccountListResponse {
7527
7525
 
7528
7526
  instanceName?: string;
7529
7527
 
7528
+ password?: string;
7529
+
7530
7530
  proxy_password?: string;
7531
7531
 
7532
7532
  proxy_username?: string;
@@ -7551,8 +7551,6 @@ export namespace ConnectedAccountListResponse {
7551
7551
  }
7552
7552
 
7553
7553
  export interface UnionMember3 {
7554
- password: string;
7555
-
7556
7554
  status: 'INACTIVE';
7557
7555
 
7558
7556
  username: string;
@@ -7581,6 +7579,8 @@ export namespace ConnectedAccountListResponse {
7581
7579
 
7582
7580
  instanceName?: string;
7583
7581
 
7582
+ password?: string;
7583
+
7584
7584
  proxy_password?: string;
7585
7585
 
7586
7586
  proxy_username?: string;
@@ -10595,8 +10595,6 @@ export namespace ConnectedAccountCreateParams {
10595
10595
  }
10596
10596
 
10597
10597
  export interface UnionMember2 {
10598
- password: string;
10599
-
10600
10598
  status: 'ACTIVE';
10601
10599
 
10602
10600
  username: string;
@@ -10625,6 +10623,8 @@ export namespace ConnectedAccountCreateParams {
10625
10623
 
10626
10624
  instanceName?: string;
10627
10625
 
10626
+ password?: string;
10627
+
10628
10628
  proxy_password?: string;
10629
10629
 
10630
10630
  proxy_username?: string;
@@ -10649,8 +10649,6 @@ export namespace ConnectedAccountCreateParams {
10649
10649
  }
10650
10650
 
10651
10651
  export interface UnionMember3 {
10652
- password: string;
10653
-
10654
10652
  status: 'INACTIVE';
10655
10653
 
10656
10654
  username: string;
@@ -10679,6 +10677,8 @@ export namespace ConnectedAccountCreateParams {
10679
10677
 
10680
10678
  instanceName?: string;
10681
10679
 
10680
+ password?: string;
10681
+
10682
10682
  proxy_password?: string;
10683
10683
 
10684
10684
  proxy_username?: string;
@@ -43,9 +43,11 @@ export {
43
43
  } from './files';
44
44
  export {
45
45
  Link,
46
+ type LinkCreateResponse,
46
47
  type LinkRetrieveResponse,
47
- type LinkSubmitInputResponse,
48
- type LinkSubmitInputParams,
48
+ type LinkSubmitResponse,
49
+ type LinkCreateParams,
50
+ type LinkSubmitParams,
49
51
  } from './link';
50
52
  export {
51
53
  Mcp,
@@ -6,6 +6,14 @@ import { RequestOptions } from '../internal/request-options';
6
6
  import { path } from '../internal/utils/path';
7
7
 
8
8
  export class Link extends APIResource {
9
+ /**
10
+ * Creates a new authentication link session that users can use to connect their
11
+ * accounts
12
+ */
13
+ create(body: LinkCreateParams, options?: RequestOptions): APIPromise<LinkCreateResponse> {
14
+ return this._client.post('/api/v3/connected_accounts/link', { body, ...options });
15
+ }
16
+
9
17
  /**
10
18
  * Retrieves information about an authentication session using the link token
11
19
  */
@@ -16,15 +24,33 @@ export class Link extends APIResource {
16
24
  /**
17
25
  * Submits authentication input for a link session
18
26
  */
19
- submitInput(
20
- token: string,
21
- body: LinkSubmitInputParams,
22
- options?: RequestOptions,
23
- ): APIPromise<LinkSubmitInputResponse> {
27
+ submit(token: string, body: LinkSubmitParams, options?: RequestOptions): APIPromise<LinkSubmitResponse> {
24
28
  return this._client.post(path`/api/v3/internal/connected_accounts/link/${token}`, { body, ...options });
25
29
  }
26
30
  }
27
31
 
32
+ export interface LinkCreateResponse {
33
+ /**
34
+ * The connected account ID that was created
35
+ */
36
+ connected_account_id: string;
37
+
38
+ /**
39
+ * ISO timestamp when the link expires
40
+ */
41
+ expires_at: string;
42
+
43
+ /**
44
+ * The generated link token for the auth session
45
+ */
46
+ link_token: string;
47
+
48
+ /**
49
+ * The redirect URI to send users to for authentication
50
+ */
51
+ redirect_url: string;
52
+ }
53
+
28
54
  export interface LinkRetrieveResponse {
29
55
  connected_account: LinkRetrieveResponse.ConnectedAccount;
30
56
 
@@ -115,19 +141,42 @@ export namespace LinkRetrieveResponse {
115
141
  }
116
142
  }
117
143
 
118
- export interface LinkSubmitInputResponse {
144
+ export interface LinkSubmitResponse {
119
145
  /**
120
146
  * The status of the connection attempt
121
147
  */
122
- status: 'ACTIVE' | 'FAILED';
148
+ status: 'ACTIVE' | 'FAILED' | 'INITIATED';
123
149
 
124
150
  /**
125
151
  * The user callback URL if applicable
126
152
  */
127
- user_callback_url?: string;
153
+ callback_url?: string;
154
+
155
+ /**
156
+ * The OAuth provider redirect URL if applicable. If initiated, redirect to this
157
+ * URL
158
+ */
159
+ redirect_url?: string;
160
+ }
161
+
162
+ export interface LinkCreateParams {
163
+ /**
164
+ * The auth config id to create a link for
165
+ */
166
+ auth_config_id: string;
167
+
168
+ /**
169
+ * The user id to create a link for
170
+ */
171
+ user_id: string;
172
+
173
+ /**
174
+ * The callback url to create a link for
175
+ */
176
+ callback_url?: string;
128
177
  }
129
178
 
130
- export interface LinkSubmitInputParams {
179
+ export interface LinkSubmitParams {
131
180
  /**
132
181
  * The input fields for authentication
133
182
  */
@@ -136,8 +185,10 @@ export interface LinkSubmitInputParams {
136
185
 
137
186
  export declare namespace Link {
138
187
  export {
188
+ type LinkCreateResponse as LinkCreateResponse,
139
189
  type LinkRetrieveResponse as LinkRetrieveResponse,
140
- type LinkSubmitInputResponse as LinkSubmitInputResponse,
141
- type LinkSubmitInputParams as LinkSubmitInputParams,
190
+ type LinkSubmitResponse as LinkSubmitResponse,
191
+ type LinkCreateParams as LinkCreateParams,
192
+ type LinkSubmitParams as LinkSubmitParams,
142
193
  };
143
194
  }
@@ -406,6 +406,11 @@ export interface ToolProxyResponse {
406
406
  export type ToolRetrieveEnumResponse = Array<string>;
407
407
 
408
408
  export interface ToolRetrieveParams {
409
+ /**
410
+ * Can be omitted, null, a string, or an object mapping toolkit names to versions
411
+ */
412
+ toolkit_versions?: string | { [key: string]: string };
413
+
409
414
  /**
410
415
  * Optional version of the tool to retrieve
411
416
  */
@@ -801,8 +806,6 @@ export namespace ToolExecuteParams {
801
806
 
802
807
  export namespace UnionMember3 {
803
808
  export interface Val {
804
- password: string;
805
-
806
809
  username: string;
807
810
 
808
811
  account_id?: string;
@@ -829,6 +832,8 @@ export namespace ToolExecuteParams {
829
832
 
830
833
  instanceName?: string;
831
834
 
835
+ password?: string;
836
+
832
837
  proxy_password?: string;
833
838
 
834
839
  proxy_username?: string;
@@ -1342,8 +1347,6 @@ export namespace ToolProxyParams {
1342
1347
 
1343
1348
  export namespace UnionMember3 {
1344
1349
  export interface Val {
1345
- password: string;
1346
-
1347
1350
  username: string;
1348
1351
 
1349
1352
  account_id?: string;
@@ -1370,6 +1373,8 @@ export namespace ToolProxyParams {
1370
1373
 
1371
1374
  instanceName?: string;
1372
1375
 
1376
+ password?: string;
1377
+
1373
1378
  proxy_password?: string;
1374
1379
 
1375
1380
  proxy_username?: string;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.34'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.36'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.34";
1
+ export declare const VERSION = "0.1.0-alpha.36";
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.34";
1
+ export declare const VERSION = "0.1.0-alpha.36";
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.34'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.36'; // 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.34'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.36'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map