@composio/client 0.1.0-alpha.22 → 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 (144) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +3 -4
  3. package/client.d.mts +2 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js +22 -19
  8. package/client.js.map +1 -1
  9. package/client.mjs +11 -8
  10. package/client.mjs.map +1 -1
  11. package/core/resource.d.mts +1 -1
  12. package/core/resource.d.mts.map +1 -1
  13. package/core/resource.d.ts +1 -1
  14. package/core/resource.d.ts.map +1 -1
  15. package/core/resource.js.map +1 -1
  16. package/core/resource.mjs.map +1 -1
  17. package/internal/headers.d.mts.map +1 -1
  18. package/internal/headers.d.ts.map +1 -1
  19. package/internal/headers.js +4 -4
  20. package/internal/headers.js.map +1 -1
  21. package/internal/headers.mjs +4 -4
  22. package/internal/headers.mjs.map +1 -1
  23. package/internal/qs/formats.d.mts +1 -0
  24. package/internal/qs/formats.d.mts.map +1 -1
  25. package/internal/qs/formats.d.ts +1 -0
  26. package/internal/qs/formats.d.ts.map +1 -1
  27. package/internal/qs/formats.js +4 -2
  28. package/internal/qs/formats.js.map +1 -1
  29. package/internal/qs/formats.mjs +2 -1
  30. package/internal/qs/formats.mjs.map +1 -1
  31. package/internal/qs/stringify.d.mts.map +1 -1
  32. package/internal/qs/stringify.d.ts.map +1 -1
  33. package/internal/qs/stringify.js +15 -17
  34. package/internal/qs/stringify.js.map +1 -1
  35. package/internal/qs/stringify.mjs +17 -19
  36. package/internal/qs/stringify.mjs.map +1 -1
  37. package/internal/qs/utils.d.mts +1 -0
  38. package/internal/qs/utils.d.mts.map +1 -1
  39. package/internal/qs/utils.d.ts +1 -0
  40. package/internal/qs/utils.d.ts.map +1 -1
  41. package/internal/qs/utils.js +14 -13
  42. package/internal/qs/utils.js.map +1 -1
  43. package/internal/qs/utils.mjs +12 -12
  44. package/internal/qs/utils.mjs.map +1 -1
  45. package/internal/request-options.d.mts +1 -0
  46. package/internal/request-options.d.mts.map +1 -1
  47. package/internal/request-options.d.ts +1 -0
  48. package/internal/request-options.d.ts.map +1 -1
  49. package/internal/request-options.js.map +1 -1
  50. package/internal/request-options.mjs.map +1 -1
  51. package/internal/uploads.js +1 -1
  52. package/internal/uploads.js.map +1 -1
  53. package/internal/uploads.mjs +1 -1
  54. package/internal/uploads.mjs.map +1 -1
  55. package/internal/utils/log.js +1 -1
  56. package/internal/utils/log.js.map +1 -1
  57. package/internal/utils/log.mjs +1 -1
  58. package/internal/utils/log.mjs.map +1 -1
  59. package/internal/utils/path.d.mts.map +1 -1
  60. package/internal/utils/path.d.ts.map +1 -1
  61. package/internal/utils/path.js.map +1 -1
  62. package/internal/utils/path.mjs +1 -1
  63. package/internal/utils/path.mjs.map +1 -1
  64. package/internal/utils/values.d.mts +2 -0
  65. package/internal/utils/values.d.mts.map +1 -1
  66. package/internal/utils/values.d.ts +2 -0
  67. package/internal/utils/values.d.ts.map +1 -1
  68. package/internal/utils/values.js +4 -1
  69. package/internal/utils/values.js.map +1 -1
  70. package/internal/utils/values.mjs +2 -0
  71. package/internal/utils/values.mjs.map +1 -1
  72. package/package.json +1 -1
  73. package/resources/auth-configs.d.mts +3 -3
  74. package/resources/auth-configs.d.mts.map +1 -1
  75. package/resources/auth-configs.d.ts +3 -3
  76. package/resources/auth-configs.d.ts.map +1 -1
  77. package/resources/connected-accounts.d.mts +640 -1908
  78. package/resources/connected-accounts.d.mts.map +1 -1
  79. package/resources/connected-accounts.d.ts +640 -1908
  80. package/resources/connected-accounts.d.ts.map +1 -1
  81. package/resources/mcp/custom.d.mts +2 -2
  82. package/resources/mcp/custom.d.ts +2 -2
  83. package/resources/mcp/mcp.d.mts +4 -4
  84. package/resources/mcp/mcp.d.ts +4 -4
  85. package/resources/tools.d.mts +12 -0
  86. package/resources/tools.d.mts.map +1 -1
  87. package/resources/tools.d.ts +12 -0
  88. package/resources/tools.d.ts.map +1 -1
  89. package/resources/triggers-types.d.mts +2 -2
  90. package/resources/triggers-types.d.ts +2 -2
  91. package/resources/v3/index.d.mts +0 -1
  92. package/resources/v3/index.d.mts.map +1 -1
  93. package/resources/v3/index.d.ts +0 -1
  94. package/resources/v3/index.d.ts.map +1 -1
  95. package/resources/v3/index.js +1 -3
  96. package/resources/v3/index.js.map +1 -1
  97. package/resources/v3/index.mjs +0 -1
  98. package/resources/v3/index.mjs.map +1 -1
  99. package/resources/v3/internal/action-execution.d.mts +1 -1
  100. package/resources/v3/internal/action-execution.d.mts.map +1 -1
  101. package/resources/v3/internal/action-execution.d.ts +1 -1
  102. package/resources/v3/internal/action-execution.d.ts.map +1 -1
  103. package/resources/v3/v3.d.mts +0 -4
  104. package/resources/v3/v3.d.mts.map +1 -1
  105. package/resources/v3/v3.d.ts +0 -4
  106. package/resources/v3/v3.d.ts.map +1 -1
  107. package/resources/v3/v3.js +0 -4
  108. package/resources/v3/v3.js.map +1 -1
  109. package/resources/v3/v3.mjs +0 -4
  110. package/resources/v3/v3.mjs.map +1 -1
  111. package/src/client.ts +23 -6
  112. package/src/core/resource.ts +1 -1
  113. package/src/internal/headers.ts +5 -5
  114. package/src/internal/qs/formats.ts +2 -1
  115. package/src/internal/qs/stringify.ts +17 -20
  116. package/src/internal/qs/utils.ts +14 -14
  117. package/src/internal/request-options.ts +1 -0
  118. package/src/internal/uploads.ts +1 -1
  119. package/src/internal/utils/log.ts +1 -1
  120. package/src/internal/utils/path.ts +1 -1
  121. package/src/internal/utils/values.ts +3 -0
  122. package/src/resources/auth-configs.ts +3 -6
  123. package/src/resources/connected-accounts.ts +1120 -3556
  124. package/src/resources/mcp/custom.ts +2 -2
  125. package/src/resources/mcp/mcp.ts +4 -4
  126. package/src/resources/tools.ts +15 -0
  127. package/src/resources/triggers-types.ts +2 -2
  128. package/src/resources/v3/index.ts +0 -1
  129. package/src/resources/v3/internal/action-execution.ts +2 -2
  130. package/src/resources/v3/v3.ts +0 -10
  131. package/src/version.ts +1 -1
  132. package/version.d.mts +1 -1
  133. package/version.d.ts +1 -1
  134. package/version.js +1 -1
  135. package/version.mjs +1 -1
  136. package/resources/v3/admin.d.mts +0 -61
  137. package/resources/v3/admin.d.mts.map +0 -1
  138. package/resources/v3/admin.d.ts +0 -61
  139. package/resources/v3/admin.d.ts.map +0 -1
  140. package/resources/v3/admin.js +0 -32
  141. package/resources/v3/admin.js.map +0 -1
  142. package/resources/v3/admin.mjs +0 -28
  143. package/resources/v3/admin.mjs.map +0 -1
  144. package/src/resources/v3/admin.ts +0 -85
@@ -86,8 +86,8 @@ export namespace CustomCreateResponse {
86
86
 
87
87
  export interface CustomCreateParams {
88
88
  /**
89
- * Human-readable name to identify this custom MCP server (4-25 characters,
90
- * alphanumeric and hyphens only)
89
+ * Human-readable name to identify this custom MCP server (4-30 characters,
90
+ * alphanumeric, spaces, and hyphens only)
91
91
  */
92
92
  name: string;
93
93
 
@@ -697,8 +697,8 @@ export namespace McpValidateResponse {
697
697
 
698
698
  export interface McpCreateParams {
699
699
  /**
700
- * Human-readable name to identify this MCP server instance (4-25 characters,
701
- * alphanumeric and hyphens only)
700
+ * Human-readable name to identify this MCP server instance (4-30 characters,
701
+ * alphanumeric, spaces, and hyphens only)
702
702
  */
703
703
  name: string;
704
704
 
@@ -736,8 +736,8 @@ export interface McpUpdateParams {
736
736
  managed_auth_via_composio?: boolean;
737
737
 
738
738
  /**
739
- * Human-readable name to identify this MCP server instance (4-25 characters,
740
- * alphanumeric and hyphens only)
739
+ * Human-readable name to identify this MCP server instance (4-30 characters,
740
+ * alphanumeric, spaces, and hyphens only)
741
741
  */
742
742
  name?: string;
743
743
 
@@ -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
  */
@@ -99,9 +99,9 @@ export namespace TriggersTypeRetrieveResponse {
99
99
  logo: string;
100
100
 
101
101
  /**
102
- * Name of the toolkit that contains this trigger
102
+ * Slug of the toolkit
103
103
  */
104
- name: string;
104
+ slug: string;
105
105
 
106
106
  /**
107
107
  * Unique identifier for the associated toolkit
@@ -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,
@@ -82,9 +82,9 @@ export namespace ActionExecutionRetrieveLogResponse {
82
82
  }
83
83
 
84
84
  export interface Connection {
85
- entity: string;
85
+ id: string;
86
86
 
87
- id?: string;
87
+ entity: string;
88
88
  }
89
89
 
90
90
  export interface Step {
@@ -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.22'; // 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.22";
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.22";
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.22'; // 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.22'; // 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
- }