@composio/client 0.1.0-alpha.31 → 0.1.0-alpha.32

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 (51) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +2 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +2 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/auth-configs.d.mts +33 -0
  12. package/resources/auth-configs.d.mts.map +1 -1
  13. package/resources/auth-configs.d.ts +33 -0
  14. package/resources/auth-configs.d.ts.map +1 -1
  15. package/resources/index.d.mts +1 -1
  16. package/resources/index.d.mts.map +1 -1
  17. package/resources/index.d.ts +1 -1
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js.map +1 -1
  20. package/resources/index.mjs.map +1 -1
  21. package/resources/team-members.d.mts +2 -16
  22. package/resources/team-members.d.mts.map +1 -1
  23. package/resources/team-members.d.ts +2 -16
  24. package/resources/team-members.d.ts.map +1 -1
  25. package/resources/team-members.js +6 -2
  26. package/resources/team-members.js.map +1 -1
  27. package/resources/team-members.mjs +6 -2
  28. package/resources/team-members.mjs.map +1 -1
  29. package/resources/tools.d.mts +3 -3
  30. package/resources/tools.d.mts.map +1 -1
  31. package/resources/tools.d.ts +3 -3
  32. package/resources/tools.d.ts.map +1 -1
  33. package/resources/triggers-types.d.mts +2 -19
  34. package/resources/triggers-types.d.mts.map +1 -1
  35. package/resources/triggers-types.d.ts +2 -19
  36. package/resources/triggers-types.d.ts.map +1 -1
  37. package/resources/triggers-types.js +0 -17
  38. package/resources/triggers-types.js.map +1 -1
  39. package/resources/triggers-types.mjs +0 -17
  40. package/resources/triggers-types.mjs.map +1 -1
  41. package/src/client.ts +4 -6
  42. package/src/resources/auth-configs.ts +42 -0
  43. package/src/resources/index.ts +0 -2
  44. package/src/resources/team-members.ts +6 -28
  45. package/src/resources/tools.ts +3 -3
  46. package/src/resources/triggers-types.ts +2 -19
  47. package/src/version.ts +1 -1
  48. package/version.d.mts +1 -1
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
  51. package/version.mjs +1 -1
@@ -8,13 +8,6 @@ class TriggersTypes extends resource_1.APIResource {
8
8
  /**
9
9
  * Retrieve detailed information about a specific trigger type using its slug
10
10
  * identifier
11
- *
12
- * @example
13
- * ```ts
14
- * const triggersType = await client.triggersTypes.retrieve(
15
- * 'SLACK_NEW_MESSAGE',
16
- * );
17
- * ```
18
11
  */
19
12
  retrieve(slug, options) {
20
13
  return this._client.get((0, path_1.path) `/api/v3/triggers_types/${slug}`, options);
@@ -22,11 +15,6 @@ class TriggersTypes extends resource_1.APIResource {
22
15
  /**
23
16
  * Retrieve a list of available trigger types with optional filtering by toolkit.
24
17
  * Results are paginated and can be filtered by toolkit.
25
- *
26
- * @example
27
- * ```ts
28
- * const triggersTypes = await client.triggersTypes.list();
29
- * ```
30
18
  */
31
19
  list(query = {}, options) {
32
20
  return this._client.get('/api/v3/triggers_types', { query, ...options });
@@ -34,11 +22,6 @@ class TriggersTypes extends resource_1.APIResource {
34
22
  /**
35
23
  * Retrieves a list of all available trigger type enum values that can be used
36
24
  * across the API
37
- *
38
- * @example
39
- * ```ts
40
- * const response = await client.triggersTypes.retrieveEnum();
41
- * ```
42
25
  */
43
26
  retrieveEnum(options) {
44
27
  return this._client.get('/api/v3/triggers_types/list/enum', options);
@@ -1 +1 @@
1
- {"version":3,"file":"triggers-types.js","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,0BAA0B,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AA5CD,sCA4CC"}
1
+ {"version":3,"file":"triggers-types.js","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;OAGG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,0BAA0B,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AA3BD,sCA2BC"}
@@ -5,13 +5,6 @@ export class TriggersTypes extends APIResource {
5
5
  /**
6
6
  * Retrieve detailed information about a specific trigger type using its slug
7
7
  * identifier
8
- *
9
- * @example
10
- * ```ts
11
- * const triggersType = await client.triggersTypes.retrieve(
12
- * 'SLACK_NEW_MESSAGE',
13
- * );
14
- * ```
15
8
  */
16
9
  retrieve(slug, options) {
17
10
  return this._client.get(path `/api/v3/triggers_types/${slug}`, options);
@@ -19,11 +12,6 @@ export class TriggersTypes extends APIResource {
19
12
  /**
20
13
  * Retrieve a list of available trigger types with optional filtering by toolkit.
21
14
  * Results are paginated and can be filtered by toolkit.
22
- *
23
- * @example
24
- * ```ts
25
- * const triggersTypes = await client.triggersTypes.list();
26
- * ```
27
15
  */
28
16
  list(query = {}, options) {
29
17
  return this._client.get('/api/v3/triggers_types', { query, ...options });
@@ -31,11 +19,6 @@ export class TriggersTypes extends APIResource {
31
19
  /**
32
20
  * Retrieves a list of all available trigger type enum values that can be used
33
21
  * across the API
34
- *
35
- * @example
36
- * ```ts
37
- * const response = await client.triggersTypes.retrieveEnum();
38
- * ```
39
22
  */
40
23
  retrieveEnum(options) {
41
24
  return this._client.get('/api/v3/triggers_types/list/enum', options);
@@ -1 +1 @@
1
- {"version":3,"file":"triggers-types.mjs","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
1
+ {"version":3,"file":"triggers-types.mjs","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -67,8 +67,6 @@ import {
67
67
  MigrationRetrieveNanoidResponse,
68
68
  } from './resources/migration';
69
69
  import {
70
- TeamMemberInviteParams,
71
- TeamMemberInviteResponse,
72
70
  TeamMemberListResponse,
73
71
  TeamMemberRemoveResponse,
74
72
  TeamMemberUpdateParams,
@@ -481,7 +479,7 @@ export class Composio {
481
479
  const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError);
482
480
  const headersTime = Date.now();
483
481
 
484
- if (response instanceof Error) {
482
+ if (response instanceof globalThis.Error) {
485
483
  const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
486
484
  if (options.signal?.aborted) {
487
485
  throw new Errors.APIUserAbortError();
@@ -788,7 +786,7 @@ export class Composio {
788
786
  // Preserve legacy string encoding behavior for now
789
787
  headers.values.has('content-type')) ||
790
788
  // `Blob` is superset of `File`
791
- body instanceof Blob ||
789
+ ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) ||
792
790
  // `FormData` -> `multipart/form-data`
793
791
  body instanceof FormData ||
794
792
  // `URLSearchParams` -> `application/x-www-form-urlencoded`
@@ -840,6 +838,7 @@ export class Composio {
840
838
  migration: API.Migration = new API.Migration(this);
841
839
  cli: API.Cli = new API.Cli(this);
842
840
  }
841
+
843
842
  Composio.AuthConfigs = AuthConfigs;
844
843
  Composio.ConnectedAccounts = ConnectedAccounts;
845
844
  Composio.Org = Org;
@@ -852,6 +851,7 @@ Composio.Mcp = Mcp;
852
851
  Composio.Files = Files;
853
852
  Composio.Migration = Migration;
854
853
  Composio.Cli = Cli;
854
+
855
855
  export declare namespace Composio {
856
856
  export type RequestOptions = Opts.RequestOptions;
857
857
 
@@ -889,10 +889,8 @@ export declare namespace Composio {
889
889
  TeamMembers as TeamMembers,
890
890
  type TeamMemberUpdateResponse as TeamMemberUpdateResponse,
891
891
  type TeamMemberListResponse as TeamMemberListResponse,
892
- type TeamMemberInviteResponse as TeamMemberInviteResponse,
893
892
  type TeamMemberRemoveResponse as TeamMemberRemoveResponse,
894
893
  type TeamMemberUpdateParams as TeamMemberUpdateParams,
895
- type TeamMemberInviteParams as TeamMemberInviteParams,
896
894
  };
897
895
 
898
896
  export {
@@ -229,6 +229,8 @@ export interface AuthConfigRetrieveResponse {
229
229
  * ISO 8601 date-time when the auth config was last updated
230
230
  */
231
231
  last_updated_at?: string;
232
+
233
+ proxy_config?: AuthConfigRetrieveResponse.ProxyConfig;
232
234
  }
233
235
 
234
236
  export namespace AuthConfigRetrieveResponse {
@@ -285,6 +287,18 @@ export namespace AuthConfigRetrieveResponse {
285
287
  */
286
288
  slug: string;
287
289
  }
290
+
291
+ export interface ProxyConfig {
292
+ /**
293
+ * The url of the auth proxy
294
+ */
295
+ proxy_url: string;
296
+
297
+ /**
298
+ * The auth key for the auth proxy
299
+ */
300
+ proxy_auth_key?: string;
301
+ }
288
302
  }
289
303
 
290
304
  export type AuthConfigUpdateResponse = unknown;
@@ -391,6 +405,8 @@ export namespace AuthConfigListResponse {
391
405
  * ISO 8601 date-time when the auth config was last updated
392
406
  */
393
407
  last_updated_at?: string;
408
+
409
+ proxy_config?: Item.ProxyConfig;
394
410
  }
395
411
 
396
412
  export namespace Item {
@@ -447,6 +463,18 @@ export namespace AuthConfigListResponse {
447
463
  */
448
464
  slug: string;
449
465
  }
466
+
467
+ export interface ProxyConfig {
468
+ /**
469
+ * The url of the auth proxy
470
+ */
471
+ proxy_url: string;
472
+
473
+ /**
474
+ * The auth key for the auth proxy
475
+ */
476
+ proxy_auth_key?: string;
477
+ }
450
478
  }
451
479
  }
452
480
 
@@ -550,10 +578,24 @@ export declare namespace AuthConfigUpdateParams {
550
578
 
551
579
  type: 'custom';
552
580
 
581
+ proxy_config?: Variant0.ProxyConfig;
582
+
553
583
  tool_access_config?: Variant0.ToolAccessConfig;
554
584
  }
555
585
 
556
586
  export namespace Variant0 {
587
+ export interface ProxyConfig {
588
+ /**
589
+ * The url of the auth proxy
590
+ */
591
+ proxy_url: string;
592
+
593
+ /**
594
+ * The auth key for the auth proxy
595
+ */
596
+ proxy_auth_key?: string;
597
+ }
598
+
557
599
  export interface ToolAccessConfig {
558
600
  /**
559
601
  * The actions that the user can perform on the auth config. If passed, this will
@@ -66,10 +66,8 @@ export {
66
66
  TeamMembers,
67
67
  type TeamMemberUpdateResponse,
68
68
  type TeamMemberListResponse,
69
- type TeamMemberInviteResponse,
70
69
  type TeamMemberRemoveResponse,
71
70
  type TeamMemberUpdateParams,
72
- type TeamMemberInviteParams,
73
71
  } from './team-members';
74
72
  export {
75
73
  Toolkits,
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
+ import { buildHeaders } from '../internal/headers';
5
6
  import { RequestOptions } from '../internal/request-options';
6
7
  import { path } from '../internal/utils/path';
7
8
 
@@ -27,8 +28,11 @@ export class TeamMembers extends APIResource {
27
28
  /**
28
29
  * Send an invitation to a new team member to join the organization
29
30
  */
30
- invite(body: TeamMemberInviteParams, options?: RequestOptions): APIPromise<TeamMemberInviteResponse> {
31
- return this._client.post('/api/v3/team-members/invite', { body, ...options });
31
+ invite(options?: RequestOptions): APIPromise<void> {
32
+ return this._client.post('/api/v3/team-members/invite', {
33
+ ...options,
34
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
35
+ });
32
36
  }
33
37
 
34
38
  /**
@@ -73,20 +77,6 @@ export namespace TeamMemberListResponse {
73
77
  }
74
78
  }
75
79
 
76
- export interface TeamMemberInviteResponse {
77
- id: string;
78
-
79
- created_at: string;
80
-
81
- email: string;
82
-
83
- name: string;
84
-
85
- role: string;
86
-
87
- updated_at: string;
88
- }
89
-
90
80
  export interface TeamMemberRemoveResponse {
91
81
  message: string;
92
82
 
@@ -101,23 +91,11 @@ export interface TeamMemberUpdateParams {
101
91
  role?: 'ADMIN' | 'DEVELOPER';
102
92
  }
103
93
 
104
- export interface TeamMemberInviteParams {
105
- email: string;
106
-
107
- name: string;
108
-
109
- role: string;
110
-
111
- verify_host?: string;
112
- }
113
-
114
94
  export declare namespace TeamMembers {
115
95
  export {
116
96
  type TeamMemberUpdateResponse as TeamMemberUpdateResponse,
117
97
  type TeamMemberListResponse as TeamMemberListResponse,
118
- type TeamMemberInviteResponse as TeamMemberInviteResponse,
119
98
  type TeamMemberRemoveResponse as TeamMemberRemoveResponse,
120
99
  type TeamMemberUpdateParams as TeamMemberUpdateParams,
121
- type TeamMemberInviteParams as TeamMemberInviteParams,
122
100
  };
123
101
  }
@@ -104,7 +104,7 @@ export class Tools extends APIResource {
104
104
  * const response = await client.tools.retrieveEnum();
105
105
  * ```
106
106
  */
107
- retrieveEnum(options?: RequestOptions): APIPromise<string> {
107
+ retrieveEnum(options?: RequestOptions): APIPromise<ToolRetrieveEnumResponse> {
108
108
  return this._client.get('/api/v3/tools/enum', options);
109
109
  }
110
110
  }
@@ -397,9 +397,9 @@ export interface ToolProxyResponse {
397
397
  }
398
398
 
399
399
  /**
400
- * Comma-separated list of tool slugs available to the project
400
+ * JSON string containing all tool enum values
401
401
  */
402
- export type ToolRetrieveEnumResponse = string;
402
+ export type ToolRetrieveEnumResponse = Array<string>;
403
403
 
404
404
  export interface ToolListParams {
405
405
  /**
@@ -9,13 +9,6 @@ export class TriggersTypes extends APIResource {
9
9
  /**
10
10
  * Retrieve detailed information about a specific trigger type using its slug
11
11
  * identifier
12
- *
13
- * @example
14
- * ```ts
15
- * const triggersType = await client.triggersTypes.retrieve(
16
- * 'SLACK_NEW_MESSAGE',
17
- * );
18
- * ```
19
12
  */
20
13
  retrieve(slug: string, options?: RequestOptions): APIPromise<TriggersTypeRetrieveResponse> {
21
14
  return this._client.get(path`/api/v3/triggers_types/${slug}`, options);
@@ -24,11 +17,6 @@ export class TriggersTypes extends APIResource {
24
17
  /**
25
18
  * Retrieve a list of available trigger types with optional filtering by toolkit.
26
19
  * Results are paginated and can be filtered by toolkit.
27
- *
28
- * @example
29
- * ```ts
30
- * const triggersTypes = await client.triggersTypes.list();
31
- * ```
32
20
  */
33
21
  list(
34
22
  query: TriggersTypeListParams | null | undefined = {},
@@ -40,13 +28,8 @@ export class TriggersTypes extends APIResource {
40
28
  /**
41
29
  * Retrieves a list of all available trigger type enum values that can be used
42
30
  * across the API
43
- *
44
- * @example
45
- * ```ts
46
- * const response = await client.triggersTypes.retrieveEnum();
47
- * ```
48
31
  */
49
- retrieveEnum(options?: RequestOptions): APIPromise<string> {
32
+ retrieveEnum(options?: RequestOptions): APIPromise<TriggersTypeRetrieveEnumResponse> {
50
33
  return this._client.get('/api/v3/triggers_types/list/enum', options);
51
34
  }
52
35
  }
@@ -196,7 +179,7 @@ export namespace TriggersTypeListResponse {
196
179
  /**
197
180
  * JSON string containing all trigger enum values
198
181
  */
199
- export type TriggersTypeRetrieveEnumResponse = string;
182
+ export type TriggersTypeRetrieveEnumResponse = Array<string>;
200
183
 
201
184
  export interface TriggersTypeListParams {
202
185
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.31'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.32'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.31";
1
+ export declare const VERSION = "0.1.0-alpha.32";
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.31";
1
+ export declare const VERSION = "0.1.0-alpha.32";
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.31'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.32'; // 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.31'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.32'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map