@composio/client 2.0.0-rc.5 → 2.0.0-rc.7

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 (166) hide show
  1. package/README.md +78 -4
  2. package/dist/{api-key-revocation-qTsznJmF.mjs → api-key-revocation-BPURmRJx.mjs} +1 -1
  3. package/dist/{auth-configs-B0IbEao2.mjs → auth-configs-DYkxc_It.mjs} +1 -1
  4. package/dist/{auth-Dw30Hpb_.mjs → auth-iqhTmHa9.mjs} +1 -1
  5. package/dist/{clanker-BJNgPfZ2.mjs → clanker-CzfQDpuy.mjs} +1 -1
  6. package/dist/{cli-CUWplx80.mjs → cli-Er9a9rGs.mjs} +2 -2
  7. package/dist/{client-CtqZaY-5.d.mts → client-CcYk8XXt.d.mts} +3857 -684
  8. package/dist/{connected-accounts-hwz_Ahf8.mjs → connected-accounts-DDgErVLd.mjs} +8 -1
  9. package/dist/{consumer-BX9lVqTG.mjs → consumer-BPCfagDO.mjs} +2 -2
  10. package/dist/custom-Cs019zcM.mjs +31 -0
  11. package/dist/{custom-tBFB6wwF.mjs → custom-VZyKhTTG.mjs} +2 -1
  12. package/dist/error-DPPtjCl1.mjs +75 -0
  13. package/dist/{files-Blm1q37V.mjs → files-C1QA5PTw.mjs} +1 -1
  14. package/dist/{files-vyDo0NH0.mjs → files-hhfQpMSx.mjs} +1 -1
  15. package/dist/{generate-DnzpeBp5.mjs → generate-iwm8bHWW.mjs} +2 -1
  16. package/dist/{generated-operations-DEPr4e2f.mjs → generated-operations-CJ7bbwvC.mjs} +50 -83
  17. package/dist/index.d.mts +2 -2
  18. package/dist/index.mjs +51 -29
  19. package/dist/keyring-Dkcbmstv.mjs +17 -0
  20. package/dist/{link-UHD4M7zo.mjs → link-Dk-yWRgc.mjs} +1 -1
  21. package/dist/{logs-B61ufb_6.mjs → logs-DnZUgpLM.mjs} +3 -3
  22. package/dist/{manage-6ysZI9l4.mjs → manage-DfB0PrkM.mjs} +1 -1
  23. package/dist/{mcp-C9IT8Cpv.mjs → mcp-BfStaFrR.mjs} +12 -3
  24. package/dist/{org-Bj5m1nn8.mjs → org-bXBx5whI.mjs} +6 -6
  25. package/dist/{owner-BSIXkRF0.mjs → owner-BlJ0zURX.mjs} +1 -1
  26. package/dist/pagination.d.mts +56 -0
  27. package/dist/pagination.mjs +50 -0
  28. package/dist/{project-84ETQ8s3.mjs → project-B0ax2ZoD.mjs} +1 -1
  29. package/dist/{project-BrbKVCdG.mjs → project-BeWloPLZ.mjs} +1 -1
  30. package/dist/{project-BfNWC2nb.mjs → project-BnMfaNjl.mjs} +1 -1
  31. package/dist/{project-CPmAuLg4.mjs → project-CGi2urmA.mjs} +1 -1
  32. package/dist/{realtime-D7OslBiN.mjs → realtime-BNfA3u3B.mjs} +1 -1
  33. package/dist/resources/api-key-revocation.d.mts +1 -1
  34. package/dist/resources/api-key-revocation.mjs +1 -1
  35. package/dist/resources/auth/auth.d.mts +1 -1
  36. package/dist/resources/auth/auth.mjs +1 -1
  37. package/dist/resources/auth/index.d.mts +1 -1
  38. package/dist/resources/auth/index.mjs +2 -2
  39. package/dist/resources/auth/session.d.mts +1 -1
  40. package/dist/resources/auth/session.mjs +1 -1
  41. package/dist/resources/auth-configs.d.mts +1 -1
  42. package/dist/resources/auth-configs.mjs +1 -1
  43. package/dist/resources/auth.d.mts +1 -1
  44. package/dist/resources/auth.mjs +2 -2
  45. package/dist/resources/cli/cli.d.mts +1 -1
  46. package/dist/resources/cli/cli.mjs +1 -1
  47. package/dist/resources/cli/index.d.mts +1 -1
  48. package/dist/resources/cli/index.mjs +2 -2
  49. package/dist/resources/cli/realtime.d.mts +1 -1
  50. package/dist/resources/cli/realtime.mjs +1 -1
  51. package/dist/resources/cli.d.mts +1 -1
  52. package/dist/resources/cli.mjs +2 -2
  53. package/dist/resources/connected-accounts.d.mts +1 -1
  54. package/dist/resources/connected-accounts.mjs +1 -1
  55. package/dist/resources/custom.d.mts +2 -0
  56. package/dist/resources/custom.mjs +3 -0
  57. package/dist/resources/files.d.mts +1 -1
  58. package/dist/resources/files.mjs +1 -1
  59. package/dist/resources/index.d.mts +1 -1
  60. package/dist/resources/index.mjs +13 -13
  61. package/dist/resources/keyring.d.mts +2 -0
  62. package/dist/resources/keyring.mjs +3 -0
  63. package/dist/resources/link.d.mts +1 -1
  64. package/dist/resources/link.mjs +1 -1
  65. package/dist/resources/logs/index.d.mts +1 -1
  66. package/dist/resources/logs/index.mjs +3 -3
  67. package/dist/resources/logs/logs.d.mts +1 -1
  68. package/dist/resources/logs/logs.mjs +1 -1
  69. package/dist/resources/logs/tools.d.mts +1 -1
  70. package/dist/resources/logs/tools.mjs +1 -1
  71. package/dist/resources/logs/triggers.d.mts +1 -1
  72. package/dist/resources/logs/triggers.mjs +1 -1
  73. package/dist/resources/logs.d.mts +1 -1
  74. package/dist/resources/logs.mjs +3 -3
  75. package/dist/resources/mcp/custom.d.mts +1 -1
  76. package/dist/resources/mcp/custom.mjs +1 -1
  77. package/dist/resources/mcp/generate.d.mts +1 -1
  78. package/dist/resources/mcp/generate.mjs +1 -1
  79. package/dist/resources/mcp/index.d.mts +1 -1
  80. package/dist/resources/mcp/index.mjs +3 -3
  81. package/dist/resources/mcp/mcp.d.mts +1 -1
  82. package/dist/resources/mcp/mcp.mjs +1 -1
  83. package/dist/resources/mcp.d.mts +1 -1
  84. package/dist/resources/mcp.mjs +3 -3
  85. package/dist/resources/org/clanker.d.mts +1 -1
  86. package/dist/resources/org/clanker.mjs +1 -1
  87. package/dist/resources/org/consumer/consumer.d.mts +1 -1
  88. package/dist/resources/org/consumer/consumer.mjs +1 -1
  89. package/dist/resources/org/consumer/index.d.mts +1 -1
  90. package/dist/resources/org/consumer/index.mjs +2 -2
  91. package/dist/resources/org/consumer/project.d.mts +1 -1
  92. package/dist/resources/org/consumer/project.mjs +1 -1
  93. package/dist/resources/org/consumer.d.mts +1 -1
  94. package/dist/resources/org/consumer.mjs +2 -2
  95. package/dist/resources/org/index.d.mts +1 -1
  96. package/dist/resources/org/index.mjs +6 -6
  97. package/dist/resources/org/org.d.mts +1 -1
  98. package/dist/resources/org/org.mjs +1 -1
  99. package/dist/resources/org/owner/index.d.mts +1 -1
  100. package/dist/resources/org/owner/index.mjs +2 -2
  101. package/dist/resources/org/owner/owner.d.mts +1 -1
  102. package/dist/resources/org/owner/owner.mjs +1 -1
  103. package/dist/resources/org/owner/project.d.mts +1 -1
  104. package/dist/resources/org/owner/project.mjs +1 -1
  105. package/dist/resources/org/owner.d.mts +1 -1
  106. package/dist/resources/org/owner.mjs +2 -2
  107. package/dist/resources/org/project.d.mts +1 -1
  108. package/dist/resources/org/project.mjs +1 -1
  109. package/dist/resources/org/usage.d.mts +1 -1
  110. package/dist/resources/org/usage.mjs +1 -1
  111. package/dist/resources/org.d.mts +1 -1
  112. package/dist/resources/org.mjs +6 -6
  113. package/dist/resources/project/index.d.mts +1 -1
  114. package/dist/resources/project/index.mjs +1 -1
  115. package/dist/resources/project/project.d.mts +1 -1
  116. package/dist/resources/project/project.mjs +1 -1
  117. package/dist/resources/project/usage.d.mts +1 -1
  118. package/dist/resources/project/usage.mjs +1 -1
  119. package/dist/resources/project.d.mts +1 -1
  120. package/dist/resources/project.mjs +1 -1
  121. package/dist/resources/tool-router/index.d.mts +1 -1
  122. package/dist/resources/tool-router/index.mjs +2 -2
  123. package/dist/resources/tool-router/session/files.d.mts +1 -1
  124. package/dist/resources/tool-router/session/files.mjs +1 -1
  125. package/dist/resources/tool-router/session/index.d.mts +1 -1
  126. package/dist/resources/tool-router/session/index.mjs +2 -2
  127. package/dist/resources/tool-router/session/session.d.mts +1 -1
  128. package/dist/resources/tool-router/session/session.mjs +1 -1
  129. package/dist/resources/tool-router/session.d.mts +1 -1
  130. package/dist/resources/tool-router/session.mjs +2 -2
  131. package/dist/resources/tool-router/tool-router.d.mts +1 -1
  132. package/dist/resources/tool-router/tool-router.mjs +1 -1
  133. package/dist/resources/tool-router.d.mts +1 -1
  134. package/dist/resources/tool-router.mjs +2 -2
  135. package/dist/resources/toolkits.d.mts +1 -1
  136. package/dist/resources/toolkits.mjs +1 -1
  137. package/dist/resources/tools.d.mts +1 -1
  138. package/dist/resources/tools.mjs +1 -1
  139. package/dist/resources/trigger-instances/index.d.mts +1 -1
  140. package/dist/resources/trigger-instances/index.mjs +2 -2
  141. package/dist/resources/trigger-instances/manage.d.mts +1 -1
  142. package/dist/resources/trigger-instances/manage.mjs +1 -1
  143. package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
  144. package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
  145. package/dist/resources/trigger-instances.d.mts +1 -1
  146. package/dist/resources/trigger-instances.mjs +2 -2
  147. package/dist/resources/triggers-types.d.mts +1 -1
  148. package/dist/resources/triggers-types.mjs +1 -1
  149. package/dist/resources/webhook-endpoints.d.mts +1 -1
  150. package/dist/resources/webhook-endpoints.mjs +1 -1
  151. package/dist/resources/webhook-subscriptions.d.mts +1 -1
  152. package/dist/resources/webhook-subscriptions.mjs +1 -1
  153. package/dist/{session-CJLfSQti.mjs → session-B78Twedd.mjs} +1 -1
  154. package/dist/{session-HQf03_ub.mjs → session-D3Azxyck.mjs} +2 -2
  155. package/dist/{tool-router-kFw8Xqp9.mjs → tool-router-Bx1tQfx-.mjs} +1 -1
  156. package/dist/{toolkits-wapurMFl.mjs → toolkits-DFC0JDvT.mjs} +15 -1
  157. package/dist/{tools-BmHuPUvd.mjs → tools-Bv2Txlel.mjs} +1 -1
  158. package/dist/{tools-KN8T5BtJ.mjs → tools-EL1x4SBb.mjs} +2 -1
  159. package/dist/{trigger-instances-DeRL4DhM.mjs → trigger-instances-BI-STHc4.mjs} +2 -2
  160. package/dist/{triggers-types-DLap3EOR.mjs → triggers-types-CJWi--Kk.mjs} +1 -1
  161. package/dist/{triggers-DZWXfIwq.mjs → triggers-vTkWuT5B.mjs} +1 -1
  162. package/dist/{usage-DwYx7p-o.mjs → usage-DspCrBUv.mjs} +1 -1
  163. package/dist/{usage-Buq-FwCY.mjs → usage-cffJ-ds7.mjs} +1 -1
  164. package/dist/{webhook-endpoints-DbIlhiI-.mjs → webhook-endpoints-DSN8i5KN.mjs} +1 -1
  165. package/dist/{webhook-subscriptions-CXC0oAhI.mjs → webhook-subscriptions-Bgsnr29T.mjs} +1 -1
  166. package/package.json +17 -5
@@ -1,10 +1,11 @@
1
- import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
2
 
3
3
  //#region src/compat/resources/connected-accounts.ts
4
4
  const OP_CREATE = generatedOperation("connectedAccounts.create");
5
5
  const OP_RETRIEVE = generatedOperation("connectedAccounts.retrieve");
6
6
  const OP_LIST = generatedOperation("connectedAccounts.list");
7
7
  const OP_DELETE = generatedOperation("connectedAccounts.delete");
8
+ const OP_COMPLETE_AUTH = generatedOperation("connectedAccounts.completeAuth");
8
9
  const OP_PATCH = generatedOperation("connectedAccounts.patch");
9
10
  const OP_REFRESH = generatedOperation("connectedAccounts.refresh");
10
11
  const OP_REVOKE = generatedOperation("connectedAccounts.revoke");
@@ -42,6 +43,12 @@ var ConnectedAccounts = class {
42
43
  ...options
43
44
  }));
44
45
  }
46
+ completeAuth(body, options) {
47
+ return this.#client.post("/api/v3.1/connected_accounts/complete_auth", withOperation(OP_COMPLETE_AUTH, {
48
+ body,
49
+ ...options
50
+ }));
51
+ }
45
52
  patch(nanoid, body = {}, options) {
46
53
  return this.#client.patch(path`/api/v3.1/connected_accounts/${nanoid}`, withOperation(OP_PATCH, {
47
54
  body,
@@ -1,5 +1,5 @@
1
- import { c as withOperation, f as mergeHeaders, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
2
- import { t as Project } from "./project-BrbKVCdG.mjs";
1
+ import { c as withOperation, n as generatedOperation, p as mergeHeaders } from "./generated-operations-CJ7bbwvC.mjs";
2
+ import { t as Project } from "./project-BeWloPLZ.mjs";
3
3
 
4
4
  //#region src/compat/resources/org/consumer/consumer.ts
5
5
  const OP_LIST_CONNECTED_TOOLKITS = generatedOperation("org.consumer.listConnectedToolkits");
@@ -0,0 +1,31 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
+
3
+ //#region src/compat/resources/custom.ts
4
+ const OP_DELETE_TOOLKIT = generatedOperation("custom.deleteToolkit");
5
+ const OP_SYNC = generatedOperation("custom.sync");
6
+ const OP_UPSERT = generatedOperation("custom.upsert");
7
+ /** OpenAPI resource for `custom`. */
8
+ var Custom = class {
9
+ #client;
10
+ constructor(client) {
11
+ this.#client = client;
12
+ }
13
+ deleteToolkit(slug, options) {
14
+ return this.#client.delete(path`/api/v3.1/custom/toolkits/${slug}`, withOperation(OP_DELETE_TOOLKIT, { ...options }));
15
+ }
16
+ sync(body, options) {
17
+ return this.#client.post("/api/v3.1/custom/toolkits/sync", withOperation(OP_SYNC, {
18
+ body,
19
+ ...options
20
+ }));
21
+ }
22
+ upsert(body, options) {
23
+ return this.#client.post("/api/v3.1/custom/toolkits/upsert", withOperation(OP_UPSERT, {
24
+ body,
25
+ ...options
26
+ }));
27
+ }
28
+ };
29
+
30
+ //#endregion
31
+ export { Custom as t };
@@ -1,4 +1,4 @@
1
- import { c as withOperation, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
1
+ import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
2
 
3
3
  //#region src/compat/resources/mcp/custom.ts
4
4
  const OP_CREATE = generatedOperation("mcp.custom.create");
@@ -11,6 +11,7 @@ var Custom = class {
11
11
  constructor(client) {
12
12
  this.#client = client;
13
13
  }
14
+ /** @deprecated Deprecated in the input OpenAPI schema. */
14
15
  create(body, options) {
15
16
  return this.#client.post("/api/v3.1/mcp/servers/custom", withOperation(OP_CREATE, {
16
17
  body,
@@ -0,0 +1,75 @@
1
+ //#region src/compat/error.ts
2
+ /**
3
+ * Stainless-compatible error hierarchy.
4
+ *
5
+ * Downstream code does `instanceof` checks and reads `status` / `error` /
6
+ * `headers` on these classes (see docs/research/drop-in-contract.md §4), so
7
+ * both the class names and the inheritance chain are part of the drop-in
8
+ * contract: `BadRequestError extends APIError extends ComposioError extends Error`.
9
+ */
10
+ var ComposioError = class extends Error {};
11
+ var APIError = class APIError extends ComposioError {
12
+ /** HTTP status for the response that caused the error. */
13
+ status;
14
+ /** HTTP headers of the response that caused the error. */
15
+ headers;
16
+ /** JSON body of the response that caused the error. */
17
+ error;
18
+ constructor(status, error, message, headers) {
19
+ super(APIError.makeMessage(status, error, message));
20
+ this.status = status;
21
+ this.headers = headers;
22
+ this.error = error;
23
+ }
24
+ static makeMessage(status, error, message) {
25
+ const errorMessage = error?.message;
26
+ const msg = errorMessage ? typeof errorMessage === "string" ? errorMessage : JSON.stringify(errorMessage) : error ? JSON.stringify(error) : message;
27
+ if (status && msg) return `${status} ${msg}`;
28
+ if (status) return `${status} status code (no body)`;
29
+ if (msg) return msg;
30
+ return "(no status code or body)";
31
+ }
32
+ static generate(status, errorResponse, message, headers) {
33
+ if (!status || !headers) return new APIConnectionError({
34
+ message,
35
+ cause: errorResponse
36
+ });
37
+ const error = errorResponse;
38
+ if (status === 400) return new BadRequestError(status, error, message, headers);
39
+ if (status === 401) return new AuthenticationError(status, error, message, headers);
40
+ if (status === 403) return new PermissionDeniedError(status, error, message, headers);
41
+ if (status === 404) return new NotFoundError(status, error, message, headers);
42
+ if (status === 409) return new ConflictError(status, error, message, headers);
43
+ if (status === 422) return new UnprocessableEntityError(status, error, message, headers);
44
+ if (status === 429) return new RateLimitError(status, error, message, headers);
45
+ if (status >= 500) return new InternalServerError(status, error, message, headers);
46
+ return new APIError(status, error, message, headers);
47
+ }
48
+ };
49
+ var APIUserAbortError = class extends APIError {
50
+ constructor({ message } = {}) {
51
+ super(void 0, void 0, message ?? "Request was aborted.", void 0);
52
+ }
53
+ };
54
+ var APIConnectionError = class extends APIError {
55
+ constructor({ message, cause }) {
56
+ super(void 0, void 0, message ?? "Connection error.", void 0);
57
+ if (cause) this.cause = cause;
58
+ }
59
+ };
60
+ var APIConnectionTimeoutError = class extends APIConnectionError {
61
+ constructor({ message } = {}) {
62
+ super({ message: message ?? "Request timed out." });
63
+ }
64
+ };
65
+ var BadRequestError = class extends APIError {};
66
+ var AuthenticationError = class extends APIError {};
67
+ var PermissionDeniedError = class extends APIError {};
68
+ var NotFoundError = class extends APIError {};
69
+ var ConflictError = class extends APIError {};
70
+ var UnprocessableEntityError = class extends APIError {};
71
+ var RateLimitError = class extends APIError {};
72
+ var InternalServerError = class extends APIError {};
73
+
74
+ //#endregion
75
+ export { AuthenticationError as a, ConflictError as c, PermissionDeniedError as d, RateLimitError as f, APIUserAbortError as i, InternalServerError as l, APIConnectionTimeoutError as n, BadRequestError as o, UnprocessableEntityError as p, APIError as r, ComposioError as s, APIConnectionError as t, NotFoundError as u };
@@ -1,4 +1,4 @@
1
- import { c as withOperation, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
1
+ import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
2
 
3
3
  //#region src/compat/resources/files.ts
4
4
  const OP_LIST = generatedOperation("files.list");
@@ -1,4 +1,4 @@
1
- import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
2
 
3
3
  //#region src/compat/resources/tool-router/session/files.ts
4
4
  const OP_LIST = generatedOperation("toolRouter.session.files.list");
@@ -1,4 +1,4 @@
1
- import { c as withOperation, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
1
+ import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
2
 
3
3
  //#region src/compat/resources/mcp/generate.ts
4
4
  const OP_URL = generatedOperation("mcp.generate.url");
@@ -11,6 +11,7 @@ var Generate = class {
11
11
  constructor(client) {
12
12
  this.#client = client;
13
13
  }
14
+ /** @deprecated Deprecated in the input OpenAPI schema. */
14
15
  url(body, options) {
15
16
  return this.#client.post("/api/v3.1/mcp/servers/generate", withOperation(OP_URL, {
16
17
  body,
@@ -1,77 +1,5 @@
1
- //#region src/compat/error.ts
2
- /**
3
- * Stainless-compatible error hierarchy.
4
- *
5
- * Downstream code does `instanceof` checks and reads `status` / `error` /
6
- * `headers` on these classes (see docs/research/drop-in-contract.md §4), so
7
- * both the class names and the inheritance chain are part of the drop-in
8
- * contract: `BadRequestError extends APIError extends ComposioError extends Error`.
9
- */
10
- var ComposioError = class extends Error {};
11
- var APIError = class APIError extends ComposioError {
12
- /** HTTP status for the response that caused the error. */
13
- status;
14
- /** HTTP headers of the response that caused the error. */
15
- headers;
16
- /** JSON body of the response that caused the error. */
17
- error;
18
- constructor(status, error, message, headers) {
19
- super(APIError.makeMessage(status, error, message));
20
- this.status = status;
21
- this.headers = headers;
22
- this.error = error;
23
- }
24
- static makeMessage(status, error, message) {
25
- const errorMessage = error?.message;
26
- const msg = errorMessage ? typeof errorMessage === "string" ? errorMessage : JSON.stringify(errorMessage) : error ? JSON.stringify(error) : message;
27
- if (status && msg) return `${status} ${msg}`;
28
- if (status) return `${status} status code (no body)`;
29
- if (msg) return msg;
30
- return "(no status code or body)";
31
- }
32
- static generate(status, errorResponse, message, headers) {
33
- if (!status || !headers) return new APIConnectionError({
34
- message,
35
- cause: errorResponse
36
- });
37
- const error = errorResponse;
38
- if (status === 400) return new BadRequestError(status, error, message, headers);
39
- if (status === 401) return new AuthenticationError(status, error, message, headers);
40
- if (status === 403) return new PermissionDeniedError(status, error, message, headers);
41
- if (status === 404) return new NotFoundError(status, error, message, headers);
42
- if (status === 409) return new ConflictError(status, error, message, headers);
43
- if (status === 422) return new UnprocessableEntityError(status, error, message, headers);
44
- if (status === 429) return new RateLimitError(status, error, message, headers);
45
- if (status >= 500) return new InternalServerError(status, error, message, headers);
46
- return new APIError(status, error, message, headers);
47
- }
48
- };
49
- var APIUserAbortError = class extends APIError {
50
- constructor({ message } = {}) {
51
- super(void 0, void 0, message ?? "Request was aborted.", void 0);
52
- }
53
- };
54
- var APIConnectionError = class extends APIError {
55
- constructor({ message, cause }) {
56
- super(void 0, void 0, message ?? "Connection error.", void 0);
57
- if (cause) this.cause = cause;
58
- }
59
- };
60
- var APIConnectionTimeoutError = class extends APIConnectionError {
61
- constructor({ message } = {}) {
62
- super({ message: message ?? "Request timed out." });
63
- }
64
- };
65
- var BadRequestError = class extends APIError {};
66
- var AuthenticationError = class extends APIError {};
67
- var PermissionDeniedError = class extends APIError {};
68
- var NotFoundError = class extends APIError {};
69
- var ConflictError = class extends APIError {};
70
- var UnprocessableEntityError = class extends APIError {};
71
- var RateLimitError = class extends APIError {};
72
- var InternalServerError = class extends APIError {};
1
+ import { i as APIUserAbortError, n as APIConnectionTimeoutError, s as ComposioError, t as APIConnectionError } from "./error-DPPtjCl1.mjs";
73
2
 
74
- //#endregion
75
3
  //#region src/compat/headers.ts
76
4
  const hasEntries = (value) => typeof value === "object" && value !== null && "append" in value && typeof value.append === "function" && "delete" in value && typeof value.delete === "function" && "entries" in value && typeof value.entries === "function" && "get" in value && typeof value.get === "function";
77
5
  const isHeaders = (value) => value instanceof Headers || hasEntries(value);
@@ -158,8 +86,9 @@ const buildHeaders = (sources) => mergeHeaders(sources).values;
158
86
  * decides which one that is. See wayfinder ticket 48 and §4 of
159
87
  * `docs/research/drop-in-contract.md`.
160
88
  * 1. **A credentialed API origin must use HTTPS.** Plain `http:` is permitted
161
- * only for loopback development endpoints — which is exactly what the
162
- * sanctioned `environment: 'local'` default (`http://localhost:9900`) is.
89
+ * only for loopback development endpoints, or for the exact origin a
90
+ * caller opts into with `allowInsecureHTTP` or
91
+ * `COMPOSIO_ALLOW_INSECURE_HTTP=1`.
163
92
  * Enforced by {@link assertCredentialTransport} at construction and again
164
93
  * by {@link credentialForRequest} at dispatch, because `apiKey` and
165
94
  * `baseURL` are both public mutable fields on the client.
@@ -340,9 +269,9 @@ const resolveHTTPURL = (target, base) => {
340
269
  }
341
270
  };
342
271
  /** Whether a credential may be sent to this origin at all. */
343
- const isCredentialSafeOrigin = (url) => url.protocol === "https:" || url.protocol === "http:" && isLoopbackHostname(url.hostname);
272
+ const isCredentialSafeOrigin = (url, allowedHTTPOrigin = null) => url.protocol === "https:" || url.protocol === "http:" && (isLoopbackHostname(url.hostname) || allowedHTTPOrigin !== null && url.origin === allowedHTTPOrigin);
344
273
  const LOOPBACK_DESCRIPTION = "localhost, *.localhost, 127.0.0.0/8, [::1]";
345
- const insecureOriginMessage = (baseURL) => `Refusing to send a Composio API credential to ${baseURL}: a credentialed API origin must use HTTPS. Plain http:// is permitted only for loopback development endpoints (${LOOPBACK_DESCRIPTION}). Pass an https:// baseURL, use environment: 'local', or construct the client without credentials.`;
274
+ const insecureOriginMessage = (baseURL) => `Refusing to send a Composio API credential to ${baseURL}: a credentialed API origin must use HTTPS. By default, plain http:// is permitted only for loopback development endpoints (${LOOPBACK_DESCRIPTION}). Pass an https:// baseURL, use environment: 'local', set allowInsecureHTTP: true (or COMPOSIO_ALLOW_INSECURE_HTTP=1) for the configured development origin, or construct the client without credentials.`;
346
275
  /** Whether the client holds anything at all that rule 1 has to protect. */
347
276
  const anyCredential = (credentials) => credentials.apiKey !== null || hasAlternateCredential(credentials);
348
277
  /**
@@ -358,10 +287,10 @@ const anyCredential = (credentials) => credentials.apiKey !== null || hasAlterna
358
287
  * request carries is decided per operation, so a client holding *any* of them
359
288
  * is a client that can put one on the wire.
360
289
  */
361
- const assertCredentialTransport = (baseURL, credentials) => {
290
+ const assertCredentialTransport = (baseURL, credentials, allowedHTTPOrigin = null) => {
362
291
  if (!anyCredential(credentials)) return;
363
292
  const url = parseHTTPURL(baseURL);
364
- if (url === null || !isCredentialSafeOrigin(url)) throw new ComposioError(insecureOriginMessage(baseURL));
293
+ if (url === null || !isCredentialSafeOrigin(url, allowedHTTPOrigin)) throw new ComposioError(insecureOriginMessage(baseURL));
365
294
  };
366
295
  /**
367
296
  * The credential this request may carry, or `null` for none.
@@ -381,14 +310,14 @@ const assertCredentialTransport = (baseURL, credentials) => {
381
310
  * with credentials, so that one dies at the transport instead. httpx has no
382
311
  * such objection, which is why the Python port checks the same thing.)
383
312
  */
384
- const credentialForRequest = (baseURL, scheme, credentials, requestURL) => {
313
+ const credentialForRequest = (baseURL, scheme, credentials, requestURL, allowedHTTPOrigin = null) => {
385
314
  const value = valueFor(scheme, credentials);
386
315
  if (value === null) return null;
387
316
  const base = parseHTTPURL(baseURL);
388
317
  const target = parseHTTPURL(requestURL);
389
318
  if (base === null || target === null) return null;
390
319
  if (base.origin !== target.origin) return null;
391
- if (!isCredentialSafeOrigin(target)) throw new ComposioError(insecureOriginMessage(baseURL));
320
+ if (!isCredentialSafeOrigin(target, allowedHTTPOrigin)) throw new ComposioError(insecureOriginMessage(baseURL));
392
321
  return {
393
322
  name: SCHEME_HEADERS[scheme],
394
323
  value
@@ -1277,7 +1206,7 @@ const kernelInternals = { sleep };
1277
1206
  * chose and are dropped once the *server* has chosen one.
1278
1207
  */
1279
1208
  const buildRequestHeaders = (config, options, requestURL, bodyHeaders, withdrawn, scheme, callerPlaced) => {
1280
- const credential = withdrawn || callerPlaced ? null : credentialForRequest(config.baseURL, scheme, config.credentials, requestURL);
1209
+ const credential = withdrawn || callerPlaced ? null : credentialForRequest(config.baseURL, scheme, config.credentials, requestURL, config.allowedHTTPOrigin);
1281
1210
  if (!withdrawn && bodyHeaders === void 0 && !config.defaultHeaders && !options.headers) {
1282
1211
  const direct = new Headers({
1283
1212
  accept: "application/json",
@@ -1514,6 +1443,12 @@ const GENERATED_OPERATIONS = [
1514
1443
  chain: ["connectedAccounts", "delete"],
1515
1444
  schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
1516
1445
  },
1446
+ {
1447
+ method: "delete",
1448
+ path: "/api/v3.1/custom/toolkits/{slug}",
1449
+ chain: ["custom", "deleteToolkit"],
1450
+ schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
1451
+ },
1517
1452
  {
1518
1453
  method: "delete",
1519
1454
  path: "/api/v3.1/mcp/servers/{serverId}/instances/{instanceId}",
@@ -1642,6 +1577,11 @@ const GENERATED_OPERATIONS = [
1642
1577
  "retrieve"
1643
1578
  ]
1644
1579
  },
1580
+ {
1581
+ method: "get",
1582
+ path: "/api/v3.1/keyring/transfer_keys",
1583
+ chain: ["keyring", "listTransferKeys"]
1584
+ },
1645
1585
  {
1646
1586
  method: "get",
1647
1587
  path: "/api/v3.1/logs/tool_execution/{id}",
@@ -1783,6 +1723,11 @@ const GENERATED_OPERATIONS = [
1783
1723
  chain: ["toolkits", "retrieve"],
1784
1724
  schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
1785
1725
  },
1726
+ {
1727
+ method: "get",
1728
+ path: "/api/v3.1/toolkits/{toolkit_slug}/scopes/grant_context",
1729
+ chain: ["toolkits", "retrieveScopesGrantContext"]
1730
+ },
1786
1731
  {
1787
1732
  method: "get",
1788
1733
  path: "/api/v3.1/tools",
@@ -1947,6 +1892,11 @@ const GENERATED_OPERATIONS = [
1947
1892
  path: "/api/v3.1/connected_accounts",
1948
1893
  chain: ["connectedAccounts", "create"]
1949
1894
  },
1895
+ {
1896
+ method: "post",
1897
+ path: "/api/v3.1/connected_accounts/complete_auth",
1898
+ chain: ["connectedAccounts", "completeAuth"]
1899
+ },
1950
1900
  {
1951
1901
  method: "post",
1952
1902
  path: "/api/v3.1/connected_accounts/link",
@@ -1963,6 +1913,18 @@ const GENERATED_OPERATIONS = [
1963
1913
  path: "/api/v3.1/connected_accounts/{nanoid}/revoke",
1964
1914
  chain: ["connectedAccounts", "revoke"]
1965
1915
  },
1916
+ {
1917
+ method: "post",
1918
+ path: "/api/v3.1/custom/toolkits/sync",
1919
+ chain: ["custom", "sync"],
1920
+ schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
1921
+ },
1922
+ {
1923
+ method: "post",
1924
+ path: "/api/v3.1/custom/toolkits/upsert",
1925
+ chain: ["custom", "upsert"],
1926
+ schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
1927
+ },
1966
1928
  {
1967
1929
  method: "post",
1968
1930
  path: "/api/v3.1/files/upload/request",
@@ -2200,6 +2162,11 @@ const GENERATED_OPERATIONS = [
2200
2162
  path: "/api/v3.1/toolkits/multi",
2201
2163
  chain: ["toolkits", "retrieveMulti"]
2202
2164
  },
2165
+ {
2166
+ method: "post",
2167
+ path: "/api/v3.1/toolkits/{toolkit_slug}/scopes/recommended",
2168
+ chain: ["toolkits", "recommendScopes"]
2169
+ },
2203
2170
  {
2204
2171
  method: "post",
2205
2172
  path: "/api/v3.1/tools/execute/proxy",
@@ -2272,4 +2239,4 @@ const generatedOperation = (chainKey) => {
2272
2239
  };
2273
2240
 
2274
2241
  //#endregion
2275
- export { PermissionDeniedError as C, NotFoundError as S, UnprocessableEntityError as T, AuthenticationError as _, path as a, ConflictError as b, withOperation as c, assertCredentialTransport as d, mergeHeaders as f, APIUserAbortError as g, APIError as h, makeRequest as i, inspectDeprecatedInputs as l, APIConnectionTimeoutError as m, generatedOperation as n, readOperation as o, APIConnectionError as p, castToError as r, safeJSON as s, GENERATED_OPERATIONS as t, inspectDeprecation as u, BadRequestError as v, RateLimitError as w, InternalServerError as x, ComposioError as y };
2242
+ export { path as a, withOperation as c, assertCredentialTransport as d, parseHTTPURL as f, makeRequest as i, inspectDeprecatedInputs as l, generatedOperation as n, readOperation as o, mergeHeaders as p, castToError as r, safeJSON as s, GENERATED_OPERATIONS as t, inspectDeprecation as u };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $r as FileListParams, Ar as SessionExecuteMetaParams, Br as SessionRetrieveResponse, Cr as SessionAttachParams, Dr as SessionCreateParams, Er as SessionConfigHistoryResponse, Fr as SessionLinkResponse, Gr as SessionToolsParams, Hr as SessionSearchResponse, Ir as SessionPatchParams, Jr as FileCreateDownloadURLResponse, Kr as SessionToolsResponse, Lr as SessionPatchResponse, Mr as SessionExecuteParams, Nr as SessionExecuteResponse, Or as SessionCreateResponse, Pr as SessionLinkParams, Qr as FileDeleteResponse, Rr as SessionProxyExecuteParams, Sr as Session, Tr as SessionConfigHistoryParams, Ur as SessionToolkitsParams, Vr as SessionSearchParams, Wr as SessionToolkitsResponse, Xr as FileCreateUploadURLResponse, Yr as FileCreateUploadURLParams, Zr as FileDeleteParams, _i as RateLimitError, a as Logger, ai as createFetchTransport, ci as APIError, di as BadRequestError, ei as FileListResponse, fi as ComposioError, gi as PermissionDeniedError, hi as NotFoundError, i as LogLevel, ii as Transport, jr as SessionExecuteMetaResponse, kr as SessionDeleteResponse, li as APIUserAbortError, mi as InternalServerError, n as Composio, ni as RequestOptions, oi as APIConnectionError, pi as ConflictError, qr as FileCreateDownloadURLParams, r as EnvironmentMap, ri as FetchTransportDefaults, si as APIConnectionTimeoutError, t as ClientOptions, ti as Files, ui as AuthenticationError, vi as UnprocessableEntityError, wr as SessionAttachResponse, xr as ToolRouter, yi as APIPromise, zr as SessionProxyExecuteResponse } from "./client-CtqZaY-5.mjs";
1
+ import { $r as SessionToolsParams, Ar as Session, Br as SessionExecuteParams, Ci as NotFoundError, Di as APIPromise, Ei as UnprocessableEntityError, Fr as SessionCreateParams, Gr as SessionPatchResponse, Hr as SessionLinkParams, Ir as SessionCreateResponse, Jr as SessionRetrieveResponse, Kr as SessionProxyExecuteParams, Lr as SessionDeleteResponse, Mr as SessionAttachResponse, Nr as SessionConfigHistoryParams, Pr as SessionConfigHistoryResponse, Qr as SessionToolkitsResponse, Rr as SessionExecuteMetaParams, Si as InternalServerError, Ti as RateLimitError, Ur as SessionLinkResponse, Vr as SessionExecuteResponse, Wr as SessionPatchParams, Xr as SessionSearchResponse, Yr as SessionSearchParams, Zr as SessionToolkitsParams, _i as APIUserAbortError, a as Logger, ai as FileDeleteParams, bi as ComposioError, ci as FileListResponse, di as FetchTransportDefaults, ei as SessionToolsResponse, fi as Transport, gi as APIError, hi as APIConnectionTimeoutError, i as LogLevel, ii as FileCreateUploadURLResponse, jr as SessionAttachParams, kr as ToolRouter, li as Files, mi as APIConnectionError, n as Composio, ni as FileCreateDownloadURLResponse, oi as FileDeleteResponse, pi as createFetchTransport, qr as SessionProxyExecuteResponse, r as EnvironmentMap, ri as FileCreateUploadURLParams, si as FileListParams, t as ClientOptions, ti as FileCreateDownloadURLParams, ui as RequestOptions, vi as AuthenticationError, wi as PermissionDeniedError, xi as ConflictError, yi as BadRequestError, zr as SessionExecuteMetaResponse } from "./client-CcYk8XXt.mjs";
2
2
  //#region src/version.d.ts
3
- declare const VERSION = "2.0.0-rc.5";
3
+ declare const VERSION = "2.0.0-rc.7";
4
4
  //#endregion
5
5
  export { APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BadRequestError, type ClientOptions, Composio, Composio as default, ComposioError, ConflictError, type EnvironmentMap, type FetchTransportDefaults, type FileCreateDownloadURLParams, type FileCreateDownloadURLResponse, type FileCreateUploadURLParams, type FileCreateUploadURLResponse, type FileDeleteParams, type FileDeleteResponse, type FileListParams, type FileListResponse, Files, InternalServerError, type LogLevel, type Logger, NotFoundError, PermissionDeniedError, RateLimitError, type RequestOptions, Session, type SessionAttachParams, type SessionAttachResponse, type SessionConfigHistoryParams, type SessionConfigHistoryResponse, type SessionCreateParams, type SessionCreateResponse, type SessionDeleteResponse, type SessionExecuteMetaParams, type SessionExecuteMetaResponse, type SessionExecuteParams, type SessionExecuteResponse, type SessionLinkParams, type SessionLinkResponse, type SessionPatchParams, type SessionPatchResponse, type SessionProxyExecuteParams, type SessionProxyExecuteResponse, type SessionRetrieveResponse, type SessionSearchParams, type SessionSearchResponse, type SessionToolkitsParams, type SessionToolkitsResponse, type SessionToolsParams, type SessionToolsResponse, ToolRouter, type Transport, UnprocessableEntityError, VERSION, createFetchTransport };
package/dist/index.mjs CHANGED
@@ -1,25 +1,28 @@
1
- import { C as PermissionDeniedError, S as NotFoundError, T as UnprocessableEntityError, _ as AuthenticationError, b as ConflictError, d as assertCredentialTransport, f as mergeHeaders, g as APIUserAbortError, h as APIError, i as makeRequest, l as inspectDeprecatedInputs, m as APIConnectionTimeoutError, o as readOperation, p as APIConnectionError, r as castToError, s as safeJSON, t as GENERATED_OPERATIONS, u as inspectDeprecation, v as BadRequestError, w as RateLimitError, x as InternalServerError, y as ComposioError } from "./generated-operations-DEPr4e2f.mjs";
2
- import { t as ApiKeyRevocation } from "./api-key-revocation-qTsznJmF.mjs";
3
- import { t as AuthConfigs } from "./auth-configs-B0IbEao2.mjs";
4
- import { t as Auth } from "./auth-Dw30Hpb_.mjs";
5
- import { t as Cli } from "./cli-CUWplx80.mjs";
6
- import { t as ConnectedAccounts } from "./connected-accounts-hwz_Ahf8.mjs";
7
- import { t as Files$1 } from "./files-Blm1q37V.mjs";
8
- import { t as Link } from "./link-UHD4M7zo.mjs";
9
- import { t as Logs } from "./logs-B61ufb_6.mjs";
10
- import { t as Mcp } from "./mcp-C9IT8Cpv.mjs";
1
+ import { a as AuthenticationError, c as ConflictError, d as PermissionDeniedError, f as RateLimitError, i as APIUserAbortError, l as InternalServerError, n as APIConnectionTimeoutError, o as BadRequestError, p as UnprocessableEntityError, r as APIError, s as ComposioError, t as APIConnectionError, u as NotFoundError } from "./error-DPPtjCl1.mjs";
2
+ import { d as assertCredentialTransport, f as parseHTTPURL, i as makeRequest, l as inspectDeprecatedInputs, o as readOperation, p as mergeHeaders, r as castToError, s as safeJSON, t as GENERATED_OPERATIONS, u as inspectDeprecation } from "./generated-operations-CJ7bbwvC.mjs";
3
+ import { t as ApiKeyRevocation } from "./api-key-revocation-BPURmRJx.mjs";
4
+ import { t as AuthConfigs } from "./auth-configs-DYkxc_It.mjs";
5
+ import { t as Auth } from "./auth-iqhTmHa9.mjs";
6
+ import { t as Cli } from "./cli-Er9a9rGs.mjs";
7
+ import { t as ConnectedAccounts } from "./connected-accounts-DDgErVLd.mjs";
8
+ import { t as Custom } from "./custom-Cs019zcM.mjs";
9
+ import { t as Files$1 } from "./files-C1QA5PTw.mjs";
10
+ import { t as Keyring } from "./keyring-Dkcbmstv.mjs";
11
+ import { t as Link } from "./link-Dk-yWRgc.mjs";
12
+ import { t as Logs } from "./logs-DnZUgpLM.mjs";
13
+ import { t as Mcp } from "./mcp-BfStaFrR.mjs";
11
14
  import { t as Migration } from "./migration-CBhnoN-Y.mjs";
12
- import { t as Org } from "./org-Bj5m1nn8.mjs";
13
- import { t as Project } from "./project-84ETQ8s3.mjs";
14
- import { t as Files } from "./files-vyDo0NH0.mjs";
15
- import { t as Session } from "./session-HQf03_ub.mjs";
16
- import { t as ToolRouter } from "./tool-router-kFw8Xqp9.mjs";
17
- import { t as Toolkits } from "./toolkits-wapurMFl.mjs";
18
- import { t as Tools } from "./tools-KN8T5BtJ.mjs";
19
- import { t as TriggerInstances } from "./trigger-instances-DeRL4DhM.mjs";
20
- import { t as TriggersTypes } from "./triggers-types-DLap3EOR.mjs";
21
- import { t as WebhookEndpoints } from "./webhook-endpoints-DbIlhiI-.mjs";
22
- import { t as WebhookSubscriptions } from "./webhook-subscriptions-CXC0oAhI.mjs";
15
+ import { t as Org } from "./org-bXBx5whI.mjs";
16
+ import { t as Project } from "./project-B0ax2ZoD.mjs";
17
+ import { t as Files } from "./files-hhfQpMSx.mjs";
18
+ import { t as Session } from "./session-D3Azxyck.mjs";
19
+ import { t as ToolRouter } from "./tool-router-Bx1tQfx-.mjs";
20
+ import { t as Toolkits } from "./toolkits-DFC0JDvT.mjs";
21
+ import { t as Tools } from "./tools-EL1x4SBb.mjs";
22
+ import { t as TriggerInstances } from "./trigger-instances-BI-STHc4.mjs";
23
+ import { t as TriggersTypes } from "./triggers-types-CJWi--Kk.mjs";
24
+ import { t as WebhookEndpoints } from "./webhook-endpoints-DSN8i5KN.mjs";
25
+ import { t as WebhookSubscriptions } from "./webhook-subscriptions-Bgsnr29T.mjs";
23
26
 
24
27
  //#region src/compat/api-promise.ts
25
28
  /**
@@ -113,7 +116,11 @@ const GENERATED_DEPRECATED_INPUTS = /* @__PURE__ */ new Map([
113
116
  ["authConfigs.update", [{
114
117
  wire: "restrict_to_following_tools",
115
118
  in: "body",
116
- replacementWire: "tool_access_config"
119
+ replacementWire: null
120
+ }, {
121
+ wire: "tool_access_config",
122
+ in: "body",
123
+ replacementWire: null
117
124
  }]],
118
125
  ["tools.execute", [{
119
126
  wire: "entity_id",
@@ -125,6 +132,10 @@ const GENERATED_DEPRECATED_INPUTS = /* @__PURE__ */ new Map([
125
132
  replacementWire: null
126
133
  }]],
127
134
  ["tools.list", [{
135
+ wire: "auth_config_ids",
136
+ in: "query",
137
+ replacementWire: null
138
+ }, {
128
139
  wire: "search",
129
140
  in: "query",
130
141
  replacementWire: "query"
@@ -211,12 +222,14 @@ const createClientResources = (client) => ({
211
222
  webhookEndpoints: new WebhookEndpoints(client),
212
223
  org: new Org(client),
213
224
  auth: new Auth(client),
214
- apiKeyRevocation: new ApiKeyRevocation(client)
225
+ apiKeyRevocation: new ApiKeyRevocation(client),
226
+ custom: new Custom(client),
227
+ keyring: new Keyring(client)
215
228
  });
216
229
 
217
230
  //#endregion
218
231
  //#region src/version.ts
219
- const VERSION = "2.0.0-rc.5";
232
+ const VERSION = "2.0.0-rc.7";
220
233
 
221
234
  //#endregion
222
235
  //#region src/compat/client.ts
@@ -262,7 +275,7 @@ const LOG_LEVELS = {
262
275
  };
263
276
  /**
264
277
  * `logLevel` is a plain string on the public surface and may arrive from
265
- * `COMPOSIO_LOG`, so it can hold anything. An unrecognized value falls back to
278
+ * `COMPOSIO_LOG_LEVEL`, so it can hold anything. An unrecognized value falls back to
266
279
  * the default rather than silencing the client or making it shout.
267
280
  */
268
281
  const isLogLevel = (value) => value !== void 0 && Object.hasOwn(LOG_LEVELS, value);
@@ -289,9 +302,11 @@ const resolveClientOptions = (input) => {
289
302
  apiKey,
290
303
  userApiKey,
291
304
  orgApiKey,
305
+ allowInsecureHTTP: input.allowInsecureHTTP ?? readEnvironment("COMPOSIO_ALLOW_INSECURE_HTTP") === "1",
306
+ allowedHTTPOrigin: input.allowedHTTPOrigin ?? null,
292
307
  baseURL,
293
308
  environment: input.environment ?? "production",
294
- logLevel: input.logLevel ?? readEnvironment("COMPOSIO_LOG") ?? "warn"
309
+ logLevel: input.logLevel ?? readEnvironment("COMPOSIO_LOG_LEVEL") ?? "warn"
295
310
  };
296
311
  options.defaultHeaders = mergeEnvironmentHeaders(readEnvironment("COMPOSIO_CUSTOM_HEADERS"), input.defaultHeaders);
297
312
  if (hasExplicitEnvironment) options[environmentReader] = emptyEnvironmentReader;
@@ -335,11 +350,12 @@ var Composio = class Composio {
335
350
  this.maxRetries = options.maxRetries ?? 2;
336
351
  this.#fetch = options.fetch ?? ((input, init) => globalThis.fetch(input, init));
337
352
  this.#transport = options.transport;
353
+ options.allowedHTTPOrigin = options.allowInsecureHTTP ? options.allowedHTTPOrigin ?? parseHTTPURL(this.baseURL)?.origin ?? null : null;
338
354
  this.#options = options;
339
355
  this.apiKey = options.apiKey;
340
356
  this.userApiKey = options.userApiKey;
341
357
  this.orgApiKey = options.orgApiKey;
342
- assertCredentialTransport(this.baseURL, this.#credentials());
358
+ assertCredentialTransport(this.baseURL, this.#credentials(), options.allowedHTTPOrigin);
343
359
  Object.assign(this, createClientResources(this));
344
360
  }
345
361
  /**
@@ -365,7 +381,8 @@ var Composio = class Composio {
365
381
  const transport = Object.hasOwn(options, "transport") ? options.transport : replacesTransport ? void 0 : this.#transport;
366
382
  const fetch = transport === void 0 ? hasFetch ? options.fetch : this.#fetch : void 0;
367
383
  const fetchOptions = transport === void 0 ? hasFetchOptions ? options.fetchOptions : this.fetchOptions : void 0;
368
- const client = new this.constructor({
384
+ const allowedHTTPOrigin = options.allowInsecureHTTP === true ? void 0 : this.#options.allowedHTTPOrigin;
385
+ const derivedOptions = {
369
386
  ...this.#options,
370
387
  environment: options.environment ? options.environment : void 0,
371
388
  baseURL: options.environment ? void 0 : this.baseURL,
@@ -377,10 +394,12 @@ var Composio = class Composio {
377
394
  userApiKey: this.userApiKey,
378
395
  orgApiKey: this.orgApiKey,
379
396
  ...options,
397
+ allowedHTTPOrigin,
380
398
  transport,
381
399
  fetch,
382
400
  fetchOptions
383
- });
401
+ };
402
+ const client = new this.constructor(derivedOptions);
384
403
  client.#deprecationSeen = this.#deprecationSeen;
385
404
  return client;
386
405
  }
@@ -453,6 +472,7 @@ var Composio = class Composio {
453
472
  return {
454
473
  baseURL: this.baseURL,
455
474
  credentials: this.#credentials(),
475
+ allowedHTTPOrigin: this.#options.allowedHTTPOrigin,
456
476
  operations: GENERATED_OPERATIONS,
457
477
  maxRetries: this.maxRetries,
458
478
  timeout: this.timeout,
@@ -520,6 +540,8 @@ Composio.WebhookEndpoints = WebhookEndpoints;
520
540
  Composio.Org = Org;
521
541
  Composio.Auth = Auth;
522
542
  Composio.ApiKeyRevocation = ApiKeyRevocation;
543
+ Composio.Custom = Custom;
544
+ Composio.Keyring = Keyring;
523
545
 
524
546
  //#endregion
525
547
  //#region src/compat/transport.ts
@@ -0,0 +1,17 @@
1
+ import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
+
3
+ //#region src/compat/resources/keyring.ts
4
+ const OP_LIST_TRANSFER_KEYS = generatedOperation("keyring.listTransferKeys");
5
+ /** OpenAPI resource for `keyring`. */
6
+ var Keyring = class {
7
+ #client;
8
+ constructor(client) {
9
+ this.#client = client;
10
+ }
11
+ listTransferKeys(options) {
12
+ return this.#client.get("/api/v3.1/keyring/transfer_keys", withOperation(OP_LIST_TRANSFER_KEYS, { ...options }));
13
+ }
14
+ };
15
+
16
+ //#endregion
17
+ export { Keyring as t };
@@ -1,4 +1,4 @@
1
- import { c as withOperation, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
1
+ import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
2
 
3
3
  //#region src/compat/resources/link.ts
4
4
  const OP_CREATE = generatedOperation("link.create");
@@ -1,6 +1,6 @@
1
- import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
2
- import { t as Triggers } from "./triggers-DZWXfIwq.mjs";
3
- import { t as Tools } from "./tools-BmHuPUvd.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
+ import { t as Triggers } from "./triggers-vTkWuT5B.mjs";
3
+ import { t as Tools } from "./tools-Bv2Txlel.mjs";
4
4
 
5
5
  //#region src/compat/resources/logs/logs.ts
6
6
  const OP_CREATE_TOOL_EXECUTION = generatedOperation("logs.createToolExecution");
@@ -1,4 +1,4 @@
1
- import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-DEPr4e2f.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
2
2
 
3
3
  //#region src/compat/resources/trigger-instances/manage.ts
4
4
  const OP_UPDATE = generatedOperation("triggerInstances.manage.update");