@composio/client 0.1.0-alpha.23 → 0.1.0-alpha.24

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +3 -4
  3. package/package.json +1 -1
  4. package/resources/auth-configs.d.mts +3 -3
  5. package/resources/auth-configs.d.mts.map +1 -1
  6. package/resources/auth-configs.d.ts +3 -3
  7. package/resources/auth-configs.d.ts.map +1 -1
  8. package/resources/connected-accounts.d.mts +651 -1919
  9. package/resources/connected-accounts.d.mts.map +1 -1
  10. package/resources/connected-accounts.d.ts +651 -1919
  11. package/resources/connected-accounts.d.ts.map +1 -1
  12. package/resources/tools.d.mts +12 -0
  13. package/resources/tools.d.mts.map +1 -1
  14. package/resources/tools.d.ts +12 -0
  15. package/resources/tools.d.ts.map +1 -1
  16. package/resources/v3/index.d.mts +0 -1
  17. package/resources/v3/index.d.mts.map +1 -1
  18. package/resources/v3/index.d.ts +0 -1
  19. package/resources/v3/index.d.ts.map +1 -1
  20. package/resources/v3/index.js +1 -3
  21. package/resources/v3/index.js.map +1 -1
  22. package/resources/v3/index.mjs +0 -1
  23. package/resources/v3/index.mjs.map +1 -1
  24. package/resources/v3/v3.d.mts +0 -4
  25. package/resources/v3/v3.d.mts.map +1 -1
  26. package/resources/v3/v3.d.ts +0 -4
  27. package/resources/v3/v3.d.ts.map +1 -1
  28. package/resources/v3/v3.js +0 -4
  29. package/resources/v3/v3.js.map +1 -1
  30. package/resources/v3/v3.mjs +0 -4
  31. package/resources/v3/v3.mjs.map +1 -1
  32. package/src/resources/auth-configs.ts +3 -6
  33. package/src/resources/connected-accounts.ts +1118 -3554
  34. package/src/resources/tools.ts +15 -0
  35. package/src/resources/v3/index.ts +0 -1
  36. package/src/resources/v3/v3.ts +0 -10
  37. package/src/version.ts +1 -1
  38. package/version.d.mts +1 -1
  39. package/version.d.ts +1 -1
  40. package/version.js +1 -1
  41. package/version.mjs +1 -1
  42. package/resources/v3/admin.d.mts +0 -61
  43. package/resources/v3/admin.d.mts.map +0 -1
  44. package/resources/v3/admin.d.ts +0 -61
  45. package/resources/v3/admin.d.ts.map +0 -1
  46. package/resources/v3/admin.js +0 -32
  47. package/resources/v3/admin.js.map +0 -1
  48. package/resources/v3/admin.mjs +0 -28
  49. package/resources/v3/admin.mjs.map +0 -1
  50. package/src/resources/v3/admin.ts +0 -85
@@ -142,6 +142,11 @@ export interface ToolRetrieveResponse {
142
142
  */
143
143
  output_parameters: Record<string, unknown>;
144
144
 
145
+ /**
146
+ * List of scopes associated with the tool
147
+ */
148
+ scopes: Array<string>;
149
+
145
150
  /**
146
151
  * Unique identifier for the tool
147
152
  */
@@ -254,6 +259,11 @@ export namespace ToolListResponse {
254
259
  */
255
260
  output_parameters: Record<string, unknown>;
256
261
 
262
+ /**
263
+ * List of scopes associated with the tool
264
+ */
265
+ scopes: Array<string>;
266
+
257
267
  /**
258
268
  * Unique identifier for the tool
259
269
  */
@@ -403,6 +413,11 @@ export interface ToolListParams {
403
413
  */
404
414
  limit?: string;
405
415
 
416
+ /**
417
+ * Array of scopes to filter tools by)
418
+ */
419
+ scopes?: Array<string> | null;
420
+
406
421
  /**
407
422
  * Free-text search query to find tools by name, description, or functionality
408
423
  */
@@ -1,6 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Admin, type AdminRefreshAuthTokensResponse, type AdminRefreshAuthTokensParams } from './admin';
4
3
  export { Auth } from './auth/index';
5
4
  export {
6
5
  Cli,
@@ -1,8 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as AdminAPI from './admin';
5
- import { Admin, AdminRefreshAuthTokensParams, AdminRefreshAuthTokensResponse } from './admin';
6
4
  import * as CliAPI from './cli';
7
5
  import {
8
6
  Cli,
@@ -19,25 +17,17 @@ import { Internal } from './internal/internal';
19
17
 
20
18
  export class V3 extends APIResource {
21
19
  auth: AuthAPI.Auth = new AuthAPI.Auth(this._client);
22
- admin: AdminAPI.Admin = new AdminAPI.Admin(this._client);
23
20
  cli: CliAPI.Cli = new CliAPI.Cli(this._client);
24
21
  internal: InternalAPI.Internal = new InternalAPI.Internal(this._client);
25
22
  }
26
23
 
27
24
  V3.Auth = Auth;
28
- V3.Admin = Admin;
29
25
  V3.Cli = Cli;
30
26
  V3.Internal = Internal;
31
27
 
32
28
  export declare namespace V3 {
33
29
  export { Auth as Auth };
34
30
 
35
- export {
36
- Admin as Admin,
37
- type AdminRefreshAuthTokensResponse as AdminRefreshAuthTokensResponse,
38
- type AdminRefreshAuthTokensParams as AdminRefreshAuthTokensParams,
39
- };
40
-
41
31
  export {
42
32
  Cli as Cli,
43
33
  type CliCreateSessionResponse as CliCreateSessionResponse,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.23'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.24'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.23";
1
+ export declare const VERSION = "0.1.0-alpha.24";
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.23";
1
+ export declare const VERSION = "0.1.0-alpha.24";
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.23'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.24'; // 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.23'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.24'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,61 +0,0 @@
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 Admin extends APIResource {
5
- /**
6
- * Administrative endpoint that refreshes authentication tokens for multiple
7
- * connected accounts in parallel. This is useful for proactive token refresh to
8
- * prevent authentication failures or for recovering from authentication issues
9
- * across multiple connections.
10
- *
11
- * @example
12
- * ```ts
13
- * const response = await client.v3.admin.refreshAuthTokens({
14
- * connectionIds: ['conn_123abc', 'conn_456def'],
15
- * 'x-composio-admin-token': 'adm_123456789abcdef',
16
- * });
17
- * ```
18
- */
19
- refreshAuthTokens(params: AdminRefreshAuthTokensParams, options?: RequestOptions): APIPromise<AdminRefreshAuthTokensResponse>;
20
- }
21
- export interface AdminRefreshAuthTokensResponse {
22
- /**
23
- * Array of connections that failed to refresh with detailed error information
24
- */
25
- failures: Array<AdminRefreshAuthTokensResponse.Failure>;
26
- /**
27
- * List of connections where token refresh was successful or not needed
28
- */
29
- success: Array<string>;
30
- }
31
- export declare namespace AdminRefreshAuthTokensResponse {
32
- interface Failure {
33
- /**
34
- * Connection ID that failed during refresh
35
- */
36
- connectionId: string;
37
- /**
38
- * Specific error code identifying why the refresh operation failed
39
- */
40
- error: string;
41
- }
42
- }
43
- export interface AdminRefreshAuthTokensParams {
44
- /**
45
- * Body param: List of connection identifiers that need token refresh
46
- */
47
- connectionIds: Array<string>;
48
- /**
49
- * Header param: Admin authentication token required for administrative operations
50
- */
51
- 'x-composio-admin-token': string;
52
- /**
53
- * Body param: Controls processing speed and system load. Higher values process
54
- * faster but increase load.
55
- */
56
- parallelism?: number;
57
- }
58
- export declare namespace Admin {
59
- export { type AdminRefreshAuthTokensResponse as AdminRefreshAuthTokensResponse, type AdminRefreshAuthTokensParams as AdminRefreshAuthTokensParams, };
60
- }
61
- //# sourceMappingURL=admin.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"admin.d.mts","sourceRoot":"","sources":["../../src/resources/v3/admin.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAQ9C;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;IAExD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED,yBAAiB,8BAA8B,CAAC;IAC9C,UAAiB,OAAO;QACtB;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IAEjC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
@@ -1,61 +0,0 @@
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 Admin extends APIResource {
5
- /**
6
- * Administrative endpoint that refreshes authentication tokens for multiple
7
- * connected accounts in parallel. This is useful for proactive token refresh to
8
- * prevent authentication failures or for recovering from authentication issues
9
- * across multiple connections.
10
- *
11
- * @example
12
- * ```ts
13
- * const response = await client.v3.admin.refreshAuthTokens({
14
- * connectionIds: ['conn_123abc', 'conn_456def'],
15
- * 'x-composio-admin-token': 'adm_123456789abcdef',
16
- * });
17
- * ```
18
- */
19
- refreshAuthTokens(params: AdminRefreshAuthTokensParams, options?: RequestOptions): APIPromise<AdminRefreshAuthTokensResponse>;
20
- }
21
- export interface AdminRefreshAuthTokensResponse {
22
- /**
23
- * Array of connections that failed to refresh with detailed error information
24
- */
25
- failures: Array<AdminRefreshAuthTokensResponse.Failure>;
26
- /**
27
- * List of connections where token refresh was successful or not needed
28
- */
29
- success: Array<string>;
30
- }
31
- export declare namespace AdminRefreshAuthTokensResponse {
32
- interface Failure {
33
- /**
34
- * Connection ID that failed during refresh
35
- */
36
- connectionId: string;
37
- /**
38
- * Specific error code identifying why the refresh operation failed
39
- */
40
- error: string;
41
- }
42
- }
43
- export interface AdminRefreshAuthTokensParams {
44
- /**
45
- * Body param: List of connection identifiers that need token refresh
46
- */
47
- connectionIds: Array<string>;
48
- /**
49
- * Header param: Admin authentication token required for administrative operations
50
- */
51
- 'x-composio-admin-token': string;
52
- /**
53
- * Body param: Controls processing speed and system load. Higher values process
54
- * faster but increase load.
55
- */
56
- parallelism?: number;
57
- }
58
- export declare namespace Admin {
59
- export { type AdminRefreshAuthTokensResponse as AdminRefreshAuthTokensResponse, type AdminRefreshAuthTokensParams as AdminRefreshAuthTokensParams, };
60
- }
61
- //# sourceMappingURL=admin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/resources/v3/admin.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAQ9C;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;IAExD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED,yBAAiB,8BAA8B,CAAC;IAC9C,UAAiB,OAAO;QACtB;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IAEjC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
@@ -1,32 +0,0 @@
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.Admin = void 0;
5
- const resource_1 = require("../../core/resource.js");
6
- const headers_1 = require("../../internal/headers.js");
7
- class Admin extends resource_1.APIResource {
8
- /**
9
- * Administrative endpoint that refreshes authentication tokens for multiple
10
- * connected accounts in parallel. This is useful for proactive token refresh to
11
- * prevent authentication failures or for recovering from authentication issues
12
- * across multiple connections.
13
- *
14
- * @example
15
- * ```ts
16
- * const response = await client.v3.admin.refreshAuthTokens({
17
- * connectionIds: ['conn_123abc', 'conn_456def'],
18
- * 'x-composio-admin-token': 'adm_123456789abcdef',
19
- * });
20
- * ```
21
- */
22
- refreshAuthTokens(params, options) {
23
- const { 'x-composio-admin-token': xComposioAdminToken, ...body } = params;
24
- return this._client.post('/api/v3/admin/auth-refresh', {
25
- body,
26
- ...options,
27
- headers: (0, headers_1.buildHeaders)([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
28
- });
29
- }
30
- }
31
- exports.Admin = Admin;
32
- //# sourceMappingURL=admin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/resources/v3/admin.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAGtD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,MAAoC,EACpC,OAAwB;QAExB,MAAM,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7F,CAAC,CAAC;IACL,CAAC;CACF;AA1BD,sBA0BC"}
@@ -1,28 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../core/resource.mjs";
3
- import { buildHeaders } from "../../internal/headers.mjs";
4
- export class Admin extends APIResource {
5
- /**
6
- * Administrative endpoint that refreshes authentication tokens for multiple
7
- * connected accounts in parallel. This is useful for proactive token refresh to
8
- * prevent authentication failures or for recovering from authentication issues
9
- * across multiple connections.
10
- *
11
- * @example
12
- * ```ts
13
- * const response = await client.v3.admin.refreshAuthTokens({
14
- * connectionIds: ['conn_123abc', 'conn_456def'],
15
- * 'x-composio-admin-token': 'adm_123456789abcdef',
16
- * });
17
- * ```
18
- */
19
- refreshAuthTokens(params, options) {
20
- const { 'x-composio-admin-token': xComposioAdminToken, ...body } = params;
21
- return this._client.post('/api/v3/admin/auth-refresh', {
22
- body,
23
- ...options,
24
- headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
25
- });
26
- }
27
- }
28
- //# sourceMappingURL=admin.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"admin.mjs","sourceRoot":"","sources":["../../src/resources/v3/admin.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CACf,MAAoC,EACpC,OAAwB;QAExB,MAAM,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7F,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,85 +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 { buildHeaders } from '../../internal/headers';
6
- import { RequestOptions } from '../../internal/request-options';
7
-
8
- export class Admin extends APIResource {
9
- /**
10
- * Administrative endpoint that refreshes authentication tokens for multiple
11
- * connected accounts in parallel. This is useful for proactive token refresh to
12
- * prevent authentication failures or for recovering from authentication issues
13
- * across multiple connections.
14
- *
15
- * @example
16
- * ```ts
17
- * const response = await client.v3.admin.refreshAuthTokens({
18
- * connectionIds: ['conn_123abc', 'conn_456def'],
19
- * 'x-composio-admin-token': 'adm_123456789abcdef',
20
- * });
21
- * ```
22
- */
23
- refreshAuthTokens(
24
- params: AdminRefreshAuthTokensParams,
25
- options?: RequestOptions,
26
- ): APIPromise<AdminRefreshAuthTokensResponse> {
27
- const { 'x-composio-admin-token': xComposioAdminToken, ...body } = params;
28
- return this._client.post('/api/v3/admin/auth-refresh', {
29
- body,
30
- ...options,
31
- headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
32
- });
33
- }
34
- }
35
-
36
- export interface AdminRefreshAuthTokensResponse {
37
- /**
38
- * Array of connections that failed to refresh with detailed error information
39
- */
40
- failures: Array<AdminRefreshAuthTokensResponse.Failure>;
41
-
42
- /**
43
- * List of connections where token refresh was successful or not needed
44
- */
45
- success: Array<string>;
46
- }
47
-
48
- export namespace AdminRefreshAuthTokensResponse {
49
- export interface Failure {
50
- /**
51
- * Connection ID that failed during refresh
52
- */
53
- connectionId: string;
54
-
55
- /**
56
- * Specific error code identifying why the refresh operation failed
57
- */
58
- error: string;
59
- }
60
- }
61
-
62
- export interface AdminRefreshAuthTokensParams {
63
- /**
64
- * Body param: List of connection identifiers that need token refresh
65
- */
66
- connectionIds: Array<string>;
67
-
68
- /**
69
- * Header param: Admin authentication token required for administrative operations
70
- */
71
- 'x-composio-admin-token': string;
72
-
73
- /**
74
- * Body param: Controls processing speed and system load. Higher values process
75
- * faster but increase load.
76
- */
77
- parallelism?: number;
78
- }
79
-
80
- export declare namespace Admin {
81
- export {
82
- type AdminRefreshAuthTokensResponse as AdminRefreshAuthTokensResponse,
83
- type AdminRefreshAuthTokensParams as AdminRefreshAuthTokensParams,
84
- };
85
- }