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

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 (72) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +3 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts.map +1 -1
  5. package/client.js +1 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -0
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/auth-configs.d.mts +24 -10
  11. package/resources/auth-configs.d.mts.map +1 -1
  12. package/resources/auth-configs.d.ts +24 -10
  13. package/resources/auth-configs.d.ts.map +1 -1
  14. package/resources/connected-accounts.d.mts +651 -1919
  15. package/resources/connected-accounts.d.mts.map +1 -1
  16. package/resources/connected-accounts.d.ts +651 -1919
  17. package/resources/connected-accounts.d.ts.map +1 -1
  18. package/resources/tools.d.mts +39 -9
  19. package/resources/tools.d.mts.map +1 -1
  20. package/resources/tools.d.ts +39 -9
  21. package/resources/tools.d.ts.map +1 -1
  22. package/resources/trigger-instances/trigger-instances.d.mts +12 -4
  23. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  24. package/resources/trigger-instances/trigger-instances.d.ts +12 -4
  25. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  26. package/resources/triggers-types.d.mts +32 -16
  27. package/resources/triggers-types.d.mts.map +1 -1
  28. package/resources/triggers-types.d.ts +32 -16
  29. package/resources/triggers-types.d.ts.map +1 -1
  30. package/resources/v3/index.d.mts +0 -1
  31. package/resources/v3/index.d.mts.map +1 -1
  32. package/resources/v3/index.d.ts +0 -1
  33. package/resources/v3/index.d.ts.map +1 -1
  34. package/resources/v3/index.js +1 -3
  35. package/resources/v3/index.js.map +1 -1
  36. package/resources/v3/index.mjs +0 -1
  37. package/resources/v3/index.mjs.map +1 -1
  38. package/resources/v3/internal/action-execution.d.mts +24 -8
  39. package/resources/v3/internal/action-execution.d.mts.map +1 -1
  40. package/resources/v3/internal/action-execution.d.ts +24 -8
  41. package/resources/v3/internal/action-execution.d.ts.map +1 -1
  42. package/resources/v3/v3.d.mts +0 -4
  43. package/resources/v3/v3.d.mts.map +1 -1
  44. package/resources/v3/v3.d.ts +0 -4
  45. package/resources/v3/v3.d.ts.map +1 -1
  46. package/resources/v3/v3.js +0 -4
  47. package/resources/v3/v3.js.map +1 -1
  48. package/resources/v3/v3.mjs +0 -4
  49. package/resources/v3/v3.mjs.map +1 -1
  50. package/src/client.ts +1 -0
  51. package/src/resources/auth-configs.ts +10 -13
  52. package/src/resources/connected-accounts.ts +1118 -3554
  53. package/src/resources/tools.ts +24 -9
  54. package/src/resources/trigger-instances/trigger-instances.ts +4 -4
  55. package/src/resources/triggers-types.ts +26 -16
  56. package/src/resources/v3/index.ts +0 -1
  57. package/src/resources/v3/internal/action-execution.ts +8 -8
  58. package/src/resources/v3/v3.ts +0 -10
  59. package/src/version.ts +1 -1
  60. package/version.d.mts +1 -1
  61. package/version.d.ts +1 -1
  62. package/version.js +1 -1
  63. package/version.mjs +1 -1
  64. package/resources/v3/admin.d.mts +0 -61
  65. package/resources/v3/admin.d.mts.map +0 -1
  66. package/resources/v3/admin.d.ts +0 -61
  67. package/resources/v3/admin.d.ts.map +0 -1
  68. package/resources/v3/admin.js +0 -32
  69. package/resources/v3/admin.js.map +0 -1
  70. package/resources/v3/admin.mjs +0 -28
  71. package/resources/v3/admin.mjs.map +0 -1
  72. package/src/resources/v3/admin.ts +0 -85
@@ -125,7 +125,7 @@ export interface ToolRetrieveResponse {
125
125
  /**
126
126
  * Schema definition of required input parameters for the tool
127
127
  */
128
- input_parameters: Record<string, unknown>;
128
+ input_parameters: { [key: string]: unknown };
129
129
 
130
130
  /**
131
131
  * Human-readable display name of the tool
@@ -140,7 +140,12 @@ export interface ToolRetrieveResponse {
140
140
  /**
141
141
  * Schema definition of return values from the tool
142
142
  */
143
- output_parameters: Record<string, unknown>;
143
+ output_parameters: { [key: string]: unknown };
144
+
145
+ /**
146
+ * List of scopes associated with the tool
147
+ */
148
+ scopes: Array<string>;
144
149
 
145
150
  /**
146
151
  * Unique identifier for the tool
@@ -237,7 +242,7 @@ export namespace ToolListResponse {
237
242
  /**
238
243
  * Schema definition of required input parameters for the tool
239
244
  */
240
- input_parameters: Record<string, unknown>;
245
+ input_parameters: { [key: string]: unknown };
241
246
 
242
247
  /**
243
248
  * Human-readable display name of the tool
@@ -252,7 +257,12 @@ export namespace ToolListResponse {
252
257
  /**
253
258
  * Schema definition of return values from the tool
254
259
  */
255
- output_parameters: Record<string, unknown>;
260
+ output_parameters: { [key: string]: unknown };
261
+
262
+ /**
263
+ * List of scopes associated with the tool
264
+ */
265
+ scopes: Array<string>;
256
266
 
257
267
  /**
258
268
  * Unique identifier for the tool
@@ -329,7 +339,7 @@ export interface ToolExecuteResponse {
329
339
  /**
330
340
  * Tool execution output data that varies based on the specific tool
331
341
  */
332
- data: Record<string, unknown>;
342
+ data: { [key: string]: unknown };
333
343
 
334
344
  /**
335
345
  * Error message if the tool execution was not successful (null if successful)
@@ -357,7 +367,7 @@ export interface ToolGetInputResponse {
357
367
  * Key-value pairs of arguments required by the tool to accomplish the described
358
368
  * task
359
369
  */
360
- arguments?: Record<string, unknown>;
370
+ arguments?: { [key: string]: unknown };
361
371
 
362
372
  /**
363
373
  * Error message if the arguments could not be generated (null if successful)
@@ -379,7 +389,7 @@ export interface ToolProxyResponse {
379
389
  /**
380
390
  * The HTTP headers returned from the proxied API
381
391
  */
382
- headers?: Record<string, string>;
392
+ headers?: { [key: string]: string };
383
393
  }
384
394
 
385
395
  /**
@@ -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
  */
@@ -434,7 +449,7 @@ export interface ToolExecuteParams {
434
449
  /**
435
450
  * Key-value pairs of arguments required by the tool (mutually exclusive with text)
436
451
  */
437
- arguments?: Record<string, unknown>;
452
+ arguments?: { [key: string]: unknown };
438
453
 
439
454
  /**
440
455
  * Unique identifier for the connected account to use for authentication
@@ -483,7 +498,7 @@ export namespace ToolExecuteParams {
483
498
  * The body to be sent to the endpoint for authentication. This is a JSON object.
484
499
  * Note: This is very rarely needed and is only required by very few apps.
485
500
  */
486
- body?: Record<string, unknown>;
501
+ body?: { [key: string]: unknown };
487
502
  }
488
503
 
489
504
  export namespace CustomAuthParams {
@@ -73,12 +73,12 @@ export namespace TriggerInstanceListActiveResponse {
73
73
  /**
74
74
  * State of the trigger instance
75
75
  */
76
- state: Record<string, unknown>;
76
+ state: { [key: string]: unknown };
77
77
 
78
78
  /**
79
79
  * Configuration for the trigger
80
80
  */
81
- trigger_config: Record<string, unknown>;
81
+ trigger_config: { [key: string]: unknown };
82
82
 
83
83
  /**
84
84
  * Name of the trigger
@@ -208,12 +208,12 @@ export interface TriggerInstanceUpsertParams {
208
208
  /**
209
209
  * Trigger configuration
210
210
  */
211
- trigger_config?: Record<string, unknown>;
211
+ trigger_config?: { [key: string]: unknown };
212
212
 
213
213
  /**
214
214
  * Trigger configuration (deprecated)
215
215
  */
216
- triggerConfig?: Record<string, unknown>;
216
+ triggerConfig?: { [key: string]: unknown };
217
217
  }
218
218
 
219
219
  TriggerInstances.Handle = Handle;
@@ -53,12 +53,12 @@ export class TriggersTypes extends APIResource {
53
53
 
54
54
  export interface TriggersTypeRetrieveResponse {
55
55
  /**
56
- * Configuration parameters required for the trigger
56
+ * Configuration schema required to set up this trigger
57
57
  */
58
- config: Record<string, unknown>;
58
+ config: { [key: string]: unknown };
59
59
 
60
60
  /**
61
- * Detailed description of what the trigger does and when it fires
61
+ * Detailed description of what the trigger does
62
62
  */
63
63
  description: string;
64
64
 
@@ -68,14 +68,14 @@ export interface TriggersTypeRetrieveResponse {
68
68
  instructions: string;
69
69
 
70
70
  /**
71
- * Display name of the trigger type
71
+ * Human-readable name of the trigger
72
72
  */
73
73
  name: string;
74
74
 
75
75
  /**
76
- * Structure of the event payload that will be delivered by this trigger
76
+ * Schema of the data payload this trigger will deliver when it fires
77
77
  */
78
- payload: Record<string, unknown>;
78
+ payload: { [key: string]: unknown };
79
79
 
80
80
  /**
81
81
  * Unique identifier for the trigger type
@@ -83,30 +83,35 @@ export interface TriggersTypeRetrieveResponse {
83
83
  slug: string;
84
84
 
85
85
  /**
86
- * Information about the toolkit that contains this trigger
86
+ * Information about the toolkit that provides this trigger
87
87
  */
88
88
  toolkit: TriggersTypeRetrieveResponse.Toolkit;
89
+
90
+ /**
91
+ * The trigger mechanism - either webhook (event-based) or poll (scheduled check)
92
+ */
93
+ type: 'webhook' | 'poll';
89
94
  }
90
95
 
91
96
  export namespace TriggersTypeRetrieveResponse {
92
97
  /**
93
- * Information about the toolkit that contains this trigger
98
+ * Information about the toolkit that provides this trigger
94
99
  */
95
100
  export interface Toolkit {
96
101
  /**
97
- * URL to the toolkit logo image
102
+ * Logo of the toolkit
98
103
  */
99
104
  logo: string;
100
105
 
101
106
  /**
102
- * Slug of the toolkit
107
+ * Deprecated: Use slug instead
103
108
  */
104
- slug: string;
109
+ name: string;
105
110
 
106
111
  /**
107
- * Unique identifier for the associated toolkit
112
+ * Unique identifier for the parent toolkit
108
113
  */
109
- uuid: string;
114
+ slug: string;
110
115
  }
111
116
  }
112
117
 
@@ -123,13 +128,18 @@ export namespace TriggersTypeListResponse {
123
128
  /**
124
129
  * Configuration schema required to set up this trigger
125
130
  */
126
- config: Record<string, unknown>;
131
+ config: { [key: string]: unknown };
127
132
 
128
133
  /**
129
134
  * Detailed description of what the trigger does
130
135
  */
131
136
  description: string;
132
137
 
138
+ /**
139
+ * Step-by-step instructions on how to set up and use this trigger
140
+ */
141
+ instructions: string;
142
+
133
143
  /**
134
144
  * Human-readable name of the trigger
135
145
  */
@@ -138,7 +148,7 @@ export namespace TriggersTypeListResponse {
138
148
  /**
139
149
  * Schema of the data payload this trigger will deliver when it fires
140
150
  */
141
- payload: Record<string, unknown>;
151
+ payload: { [key: string]: unknown };
142
152
 
143
153
  /**
144
154
  * Unique identifier for the trigger type
@@ -167,7 +177,7 @@ export namespace TriggersTypeListResponse {
167
177
  logo: string;
168
178
 
169
179
  /**
170
- * Name of the parent toolkit
180
+ * Deprecated: Use slug instead
171
181
  */
172
182
  name: string;
173
183
 
@@ -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,
@@ -51,15 +51,15 @@ export interface ActionExecutionRetrieveLogResponse {
51
51
 
52
52
  endTime: number;
53
53
 
54
- error: Record<string, unknown>;
54
+ error: { [key: string]: unknown };
55
55
 
56
- executionMetadata: Record<string, unknown>;
56
+ executionMetadata: { [key: string]: unknown };
57
57
 
58
- payloadReceived: Record<string, unknown>;
58
+ payloadReceived: { [key: string]: unknown };
59
59
 
60
- response: Record<string, unknown>;
60
+ response: { [key: string]: unknown };
61
61
 
62
- session: Record<string, unknown>;
62
+ session: { [key: string]: unknown };
63
63
 
64
64
  startTime: number;
65
65
 
@@ -128,11 +128,11 @@ export namespace ActionExecutionRetrieveLogResponse {
128
128
 
129
129
  url: string;
130
130
 
131
- headers?: Record<string, string>;
131
+ headers?: { [key: string]: string };
132
132
 
133
- json?: Record<string, unknown>;
133
+ json?: { [key: string]: unknown };
134
134
 
135
- params?: Record<string, unknown>;
135
+ params?: { [key: string]: unknown };
136
136
 
137
137
  timeout?: number;
138
138
  }
@@ -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.25'; // 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.25";
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.25";
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.25'; // 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.25'; // 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
- }