@composio/client 2.0.0-rc.1 → 2.0.0-rc.3

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 +32 -0
  2. package/dist/{api-key-revocation-BZL5FAx7.mjs → api-key-revocation-Cbokr5zZ.mjs} +4 -3
  3. package/dist/{auth-CEq4JqWm.mjs → auth-CNDyZgjw.mjs} +1 -1
  4. package/dist/{auth-configs-CyksMqNB.mjs → auth-configs-4u-8I2K7.mjs} +17 -11
  5. package/dist/{clanker-4wByThQJ.mjs → clanker-D6FjS8Lj.mjs} +4 -3
  6. package/dist/cli-LIRIGe7k.mjs +45 -0
  7. package/dist/{client-CK6bm7nf.d.mts → client-ByIYmMzt.d.mts} +48 -7
  8. package/dist/{connected-accounts-B-qN_yLT.mjs → connected-accounts-Bqtl42g0.mjs} +23 -15
  9. package/dist/{consumer-DWlaGBmh.mjs → consumer-BauHsJXO.mjs} +8 -8
  10. package/dist/{custom-BQWoONFY.mjs → custom-CGqEBUWj.mjs} +4 -3
  11. package/dist/{files-B-UnEejx.mjs → files-BYEsIET1.mjs} +7 -5
  12. package/dist/{files-CNZ-ttVS.mjs → files-DkH2-irQ.mjs} +13 -9
  13. package/dist/{generate-DSqfJENZ.mjs → generate-DTodgjHD.mjs} +4 -3
  14. package/dist/{request-DwPfYYNF.mjs → generated-operations-WtSYnmW0.mjs} +1130 -83
  15. package/dist/index.d.mts +3 -3
  16. package/dist/index.mjs +274 -819
  17. package/dist/{link-CukKZMxs.mjs → link-DL53IiYh.mjs} +4 -3
  18. package/dist/{logs-B87z4hq7.mjs → logs-DPgNkEde.mjs} +8 -6
  19. package/dist/{manage-By-b66OH.mjs → manage-DDmuMlFb.mjs} +6 -4
  20. package/dist/mcp-CS9s4sDK.mjs +82 -0
  21. package/dist/{org-BSq_z6fP.mjs → org-9gTqtmtc.mjs} +9 -8
  22. package/dist/{owner-BDkEFEVF.mjs → owner-EZzWtfQx.mjs} +1 -1
  23. package/dist/{project-_s0fWHut.mjs → project-4Ol46ZwD.mjs} +7 -7
  24. package/dist/project-CKmDHyu_.mjs +47 -0
  25. package/dist/{project-D-c0Zrrl.mjs → project-DeRwedA-.mjs} +1 -1
  26. package/dist/{project-Cj-NKnWZ.mjs → project-uN9dGkls.mjs} +4 -3
  27. package/dist/realtime-C8DEUgai.mjs +28 -0
  28. package/dist/resources/api-key-revocation.d.mts +1 -1
  29. package/dist/resources/api-key-revocation.mjs +1 -1
  30. package/dist/resources/auth/auth.d.mts +1 -1
  31. package/dist/resources/auth/auth.mjs +1 -1
  32. package/dist/resources/auth/index.d.mts +1 -1
  33. package/dist/resources/auth/index.mjs +2 -2
  34. package/dist/resources/auth/session.d.mts +1 -1
  35. package/dist/resources/auth/session.mjs +1 -1
  36. package/dist/resources/auth-configs.d.mts +1 -1
  37. package/dist/resources/auth-configs.mjs +1 -1
  38. package/dist/resources/auth.d.mts +1 -1
  39. package/dist/resources/auth.mjs +2 -2
  40. package/dist/resources/cli/cli.d.mts +1 -1
  41. package/dist/resources/cli/cli.mjs +1 -1
  42. package/dist/resources/cli/index.d.mts +1 -1
  43. package/dist/resources/cli/index.mjs +2 -2
  44. package/dist/resources/cli/realtime.d.mts +1 -1
  45. package/dist/resources/cli/realtime.mjs +1 -1
  46. package/dist/resources/cli.d.mts +1 -1
  47. package/dist/resources/cli.mjs +2 -2
  48. package/dist/resources/connected-accounts.d.mts +1 -1
  49. package/dist/resources/connected-accounts.mjs +1 -1
  50. package/dist/resources/files.d.mts +1 -1
  51. package/dist/resources/files.mjs +1 -1
  52. package/dist/resources/index.d.mts +1 -1
  53. package/dist/resources/index.mjs +13 -13
  54. package/dist/resources/link.d.mts +1 -1
  55. package/dist/resources/link.mjs +1 -1
  56. package/dist/resources/logs/index.d.mts +1 -1
  57. package/dist/resources/logs/index.mjs +3 -3
  58. package/dist/resources/logs/logs.d.mts +1 -1
  59. package/dist/resources/logs/logs.mjs +1 -1
  60. package/dist/resources/logs/tools.d.mts +1 -1
  61. package/dist/resources/logs/tools.mjs +1 -1
  62. package/dist/resources/logs/triggers.d.mts +1 -1
  63. package/dist/resources/logs/triggers.mjs +1 -1
  64. package/dist/resources/logs.d.mts +1 -1
  65. package/dist/resources/logs.mjs +3 -3
  66. package/dist/resources/mcp/custom.d.mts +1 -1
  67. package/dist/resources/mcp/custom.mjs +1 -1
  68. package/dist/resources/mcp/generate.d.mts +1 -1
  69. package/dist/resources/mcp/generate.mjs +1 -1
  70. package/dist/resources/mcp/index.d.mts +1 -1
  71. package/dist/resources/mcp/index.mjs +3 -3
  72. package/dist/resources/mcp/mcp.d.mts +1 -1
  73. package/dist/resources/mcp/mcp.mjs +1 -1
  74. package/dist/resources/mcp.d.mts +1 -1
  75. package/dist/resources/mcp.mjs +3 -3
  76. package/dist/resources/org/clanker.d.mts +1 -1
  77. package/dist/resources/org/clanker.mjs +1 -1
  78. package/dist/resources/org/consumer/consumer.d.mts +1 -1
  79. package/dist/resources/org/consumer/consumer.mjs +1 -1
  80. package/dist/resources/org/consumer/index.d.mts +1 -1
  81. package/dist/resources/org/consumer/index.mjs +2 -2
  82. package/dist/resources/org/consumer/project.d.mts +1 -1
  83. package/dist/resources/org/consumer/project.mjs +1 -1
  84. package/dist/resources/org/consumer.d.mts +1 -1
  85. package/dist/resources/org/consumer.mjs +2 -2
  86. package/dist/resources/org/index.d.mts +1 -1
  87. package/dist/resources/org/index.mjs +6 -6
  88. package/dist/resources/org/org.d.mts +1 -1
  89. package/dist/resources/org/org.mjs +1 -1
  90. package/dist/resources/org/owner/index.d.mts +1 -1
  91. package/dist/resources/org/owner/index.mjs +2 -2
  92. package/dist/resources/org/owner/owner.d.mts +1 -1
  93. package/dist/resources/org/owner/owner.mjs +1 -1
  94. package/dist/resources/org/owner/project.d.mts +1 -1
  95. package/dist/resources/org/owner/project.mjs +1 -1
  96. package/dist/resources/org/owner.d.mts +1 -1
  97. package/dist/resources/org/owner.mjs +2 -2
  98. package/dist/resources/org/project.d.mts +1 -1
  99. package/dist/resources/org/project.mjs +1 -1
  100. package/dist/resources/org/usage.d.mts +1 -1
  101. package/dist/resources/org/usage.mjs +1 -1
  102. package/dist/resources/org.d.mts +1 -1
  103. package/dist/resources/org.mjs +6 -6
  104. package/dist/resources/project/index.d.mts +1 -1
  105. package/dist/resources/project/index.mjs +1 -1
  106. package/dist/resources/project/project.d.mts +1 -1
  107. package/dist/resources/project/project.mjs +1 -1
  108. package/dist/resources/project/usage.d.mts +1 -1
  109. package/dist/resources/project/usage.mjs +1 -1
  110. package/dist/resources/project.d.mts +1 -1
  111. package/dist/resources/project.mjs +1 -1
  112. package/dist/resources/tool-router/index.d.mts +1 -1
  113. package/dist/resources/tool-router/index.mjs +2 -2
  114. package/dist/resources/tool-router/session/files.d.mts +1 -1
  115. package/dist/resources/tool-router/session/files.mjs +1 -1
  116. package/dist/resources/tool-router/session/index.d.mts +1 -1
  117. package/dist/resources/tool-router/session/index.mjs +2 -2
  118. package/dist/resources/tool-router/session/session.d.mts +1 -1
  119. package/dist/resources/tool-router/session/session.mjs +1 -1
  120. package/dist/resources/tool-router/session.d.mts +1 -1
  121. package/dist/resources/tool-router/session.mjs +2 -2
  122. package/dist/resources/tool-router/tool-router.d.mts +1 -1
  123. package/dist/resources/tool-router/tool-router.mjs +1 -1
  124. package/dist/resources/tool-router.d.mts +1 -1
  125. package/dist/resources/tool-router.mjs +2 -2
  126. package/dist/resources/toolkits.d.mts +1 -1
  127. package/dist/resources/toolkits.mjs +1 -1
  128. package/dist/resources/tools.d.mts +1 -1
  129. package/dist/resources/tools.mjs +1 -1
  130. package/dist/resources/trigger-instances/index.d.mts +1 -1
  131. package/dist/resources/trigger-instances/index.mjs +2 -2
  132. package/dist/resources/trigger-instances/manage.d.mts +1 -1
  133. package/dist/resources/trigger-instances/manage.mjs +1 -1
  134. package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
  135. package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
  136. package/dist/resources/trigger-instances.d.mts +1 -1
  137. package/dist/resources/trigger-instances.mjs +2 -2
  138. package/dist/resources/triggers-types.d.mts +1 -1
  139. package/dist/resources/triggers-types.mjs +1 -1
  140. package/dist/resources/webhook-endpoints.d.mts +1 -1
  141. package/dist/resources/webhook-endpoints.mjs +1 -1
  142. package/dist/resources/webhook-subscriptions.d.mts +1 -1
  143. package/dist/resources/webhook-subscriptions.mjs +1 -1
  144. package/dist/{session-Do3wHYNe.mjs → session-DWQaRfV_.mjs} +39 -26
  145. package/dist/{session-DNm4GFO-.mjs → session-EJK1YmKD.mjs} +3 -2
  146. package/dist/{tool-router-5OfsPkJ_.mjs → tool-router-CqRP0_gv.mjs} +1 -1
  147. package/dist/toolkits-B3eGuBu0.mjs +48 -0
  148. package/dist/tools-B4uip2mE.mjs +33 -0
  149. package/dist/tools-fb-vXe-l.mjs +67 -0
  150. package/dist/{trigger-instances-lkKWqHgd.mjs → trigger-instances-BCL5DJ0o.mjs} +8 -6
  151. package/dist/{triggers-DNx9yjbS.mjs → triggers-DnDhI69h.mjs} +6 -4
  152. package/dist/triggers-types-HHDB0mLH.mjs +34 -0
  153. package/dist/{usage-Cv9VNy5H.mjs → usage-B6vtknow.mjs} +7 -5
  154. package/dist/{usage-CKyu9RzD.mjs → usage-CzAfsIc4.mjs} +7 -5
  155. package/dist/{webhook-endpoints-DIyg3YlR.mjs → webhook-endpoints-DRJgQ6s0.mjs} +15 -10
  156. package/dist/webhook-subscriptions-WcdnIkGU.mjs +55 -0
  157. package/package.json +5 -2
  158. package/dist/cli-Bi4_ORQO.mjs +0 -45
  159. package/dist/mcp-B0wla_93.mjs +0 -73
  160. package/dist/project-C0h91WGF.mjs +0 -42
  161. package/dist/realtime-BcHoYszT.mjs +0 -26
  162. package/dist/toolkits-CcE90C2S.mjs +0 -43
  163. package/dist/tools-B5uEInC8.mjs +0 -30
  164. package/dist/tools-CdVgfSpk.mjs +0 -63
  165. package/dist/triggers-types-MjEcrPbH.mjs +0 -31
  166. package/dist/webhook-subscriptions-B7AgTACq.mjs +0 -48
@@ -1,3 +1,3 @@
1
- import { t as TriggersTypes } from "../triggers-types-MjEcrPbH.mjs";
1
+ import { t as TriggersTypes } from "../triggers-types-HHDB0mLH.mjs";
2
2
 
3
3
  export { TriggersTypes };
@@ -1,2 +1,2 @@
1
- import { G as WebhookEndpointReplaceParams, H as WebhookEndpointCreateResponse, J as WebhookEndpointUpdateParams, K as WebhookEndpointReplaceResponse, U as WebhookEndpointListParams, V as WebhookEndpointCreateParams, W as WebhookEndpointListResponse, X as WebhookEndpoints, Y as WebhookEndpointUpdateResponse, q as WebhookEndpointRetrieveResponse } from "../client-CK6bm7nf.mjs";
1
+ import { G as WebhookEndpointListResponse, H as WebhookEndpointCreateParams, J as WebhookEndpointRetrieveResponse, K as WebhookEndpointReplaceParams, U as WebhookEndpointCreateResponse, W as WebhookEndpointListParams, X as WebhookEndpointUpdateResponse, Y as WebhookEndpointUpdateParams, Z as WebhookEndpoints, q as WebhookEndpointReplaceResponse } from "../client-ByIYmMzt.mjs";
2
2
  export { type WebhookEndpointCreateParams, type WebhookEndpointCreateResponse, type WebhookEndpointListParams, type WebhookEndpointListResponse, type WebhookEndpointReplaceParams, type WebhookEndpointReplaceResponse, type WebhookEndpointRetrieveResponse, type WebhookEndpointUpdateParams, type WebhookEndpointUpdateResponse, WebhookEndpoints };
@@ -1,3 +1,3 @@
1
- import { t as WebhookEndpoints } from "../webhook-endpoints-DIyg3YlR.mjs";
1
+ import { t as WebhookEndpoints } from "../webhook-endpoints-DRJgQ6s0.mjs";
2
2
 
3
3
  export { WebhookEndpoints };
@@ -1,2 +1,2 @@
1
- import { $ as WebhookSubscriptionDeleteResponse, Q as WebhookSubscriptionCreateResponse, Z as WebhookSubscriptionCreateParams, at as WebhookSubscriptionUpdateParams, et as WebhookSubscriptionListEventTypesResponse, it as WebhookSubscriptionRotateSecretResponse, nt as WebhookSubscriptionListResponse, ot as WebhookSubscriptionUpdateResponse, rt as WebhookSubscriptionRetrieveResponse, st as WebhookSubscriptions, tt as WebhookSubscriptionListParams } from "../client-CK6bm7nf.mjs";
1
+ import { $ as WebhookSubscriptionCreateResponse, Q as WebhookSubscriptionCreateParams, at as WebhookSubscriptionRotateSecretResponse, ct as WebhookSubscriptions, et as WebhookSubscriptionDeleteResponse, it as WebhookSubscriptionRetrieveResponse, nt as WebhookSubscriptionListParams, ot as WebhookSubscriptionUpdateParams, rt as WebhookSubscriptionListResponse, st as WebhookSubscriptionUpdateResponse, tt as WebhookSubscriptionListEventTypesResponse } from "../client-ByIYmMzt.mjs";
2
2
  export { type WebhookSubscriptionCreateParams, type WebhookSubscriptionCreateResponse, type WebhookSubscriptionDeleteResponse, type WebhookSubscriptionListEventTypesResponse, type WebhookSubscriptionListParams, type WebhookSubscriptionListResponse, type WebhookSubscriptionRetrieveResponse, type WebhookSubscriptionRotateSecretResponse, type WebhookSubscriptionUpdateParams, type WebhookSubscriptionUpdateResponse, WebhookSubscriptions };
@@ -1,3 +1,3 @@
1
- import { t as WebhookSubscriptions } from "../webhook-subscriptions-B7AgTACq.mjs";
1
+ import { t as WebhookSubscriptions } from "../webhook-subscriptions-WcdnIkGU.mjs";
2
2
 
3
3
  export { WebhookSubscriptions };
@@ -1,7 +1,20 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
2
- import { t as Files } from "./files-CNZ-ttVS.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
+ import { t as Files } from "./files-DkH2-irQ.mjs";
3
3
 
4
4
  //#region src/compat/resources/tool-router/session/session.ts
5
+ const OP_CREATE = generatedOperation("toolRouter.session.create");
6
+ const OP_RETRIEVE = generatedOperation("toolRouter.session.retrieve");
7
+ const OP_DELETE = generatedOperation("toolRouter.session.delete");
8
+ const OP_ATTACH = generatedOperation("toolRouter.session.attach");
9
+ const OP_CONFIG_HISTORY = generatedOperation("toolRouter.session.configHistory");
10
+ const OP_EXECUTE = generatedOperation("toolRouter.session.execute");
11
+ const OP_EXECUTE_META = generatedOperation("toolRouter.session.executeMeta");
12
+ const OP_LINK = generatedOperation("toolRouter.session.link");
13
+ const OP_PATCH = generatedOperation("toolRouter.session.patch");
14
+ const OP_PROXY_EXECUTE = generatedOperation("toolRouter.session.proxyExecute");
15
+ const OP_SEARCH = generatedOperation("toolRouter.session.search");
16
+ const OP_TOOLKITS = generatedOperation("toolRouter.session.toolkits");
17
+ const OP_TOOLS = generatedOperation("toolRouter.session.tools");
5
18
  /**
6
19
  * Stainless-shaped `client.toolRouter.session` resource: the 12-method
7
20
  * published surface of `@composio/client` plus the spec-surface `delete`
@@ -19,76 +32,76 @@ var Session = class {
19
32
  this.files = new Files(client);
20
33
  }
21
34
  create(body, options) {
22
- return this.#client.post(path`/api/v3.1/tool_router/session`, {
35
+ return this.#client.post("/api/v3.1/tool_router/session", withOperation(OP_CREATE, {
23
36
  body,
24
37
  ...options
25
- });
38
+ }));
26
39
  }
27
40
  retrieve(sessionID, options) {
28
- return this.#client.get(path`/api/v3.1/tool_router/session/${sessionID}`, { ...options });
41
+ return this.#client.get(path`/api/v3.1/tool_router/session/${sessionID}`, withOperation(OP_RETRIEVE, { ...options }));
29
42
  }
30
43
  delete(sessionID, options) {
31
- return this.#client.delete(path`/api/v3.1/tool_router/session/${sessionID}`, { ...options });
44
+ return this.#client.delete(path`/api/v3.1/tool_router/session/${sessionID}`, withOperation(OP_DELETE, { ...options }));
32
45
  }
33
46
  attach(sessionID, body = {}, options) {
34
- return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/attach`, {
47
+ return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/attach`, withOperation(OP_ATTACH, {
35
48
  body,
36
49
  ...options
37
- });
50
+ }));
38
51
  }
39
52
  configHistory(sessionID, query = {}, options) {
40
- return this.#client.get(path`/api/v3.1/tool_router/session/${sessionID}/config_history`, {
53
+ return this.#client.get(path`/api/v3.1/tool_router/session/${sessionID}/config_history`, withOperation(OP_CONFIG_HISTORY, {
41
54
  query,
42
55
  ...options
43
- });
56
+ }));
44
57
  }
45
58
  execute(sessionID, body, options) {
46
- return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/execute`, {
59
+ return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/execute`, withOperation(OP_EXECUTE, {
47
60
  body,
48
61
  ...options
49
- });
62
+ }));
50
63
  }
51
64
  executeMeta(sessionID, body, options) {
52
- return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/execute_meta`, {
65
+ return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/execute_meta`, withOperation(OP_EXECUTE_META, {
53
66
  body,
54
67
  ...options
55
- });
68
+ }));
56
69
  }
57
70
  link(sessionID, body, options) {
58
- return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/link`, {
71
+ return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/link`, withOperation(OP_LINK, {
59
72
  body,
60
73
  ...options
61
- });
74
+ }));
62
75
  }
63
76
  patch(sessionID, body = {}, options) {
64
- return this.#client.patch(path`/api/v3.1/tool_router/session/${sessionID}`, {
77
+ return this.#client.patch(path`/api/v3.1/tool_router/session/${sessionID}`, withOperation(OP_PATCH, {
65
78
  body,
66
79
  ...options
67
- });
80
+ }));
68
81
  }
69
82
  proxyExecute(sessionID, body, options) {
70
- return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/proxy_execute`, {
83
+ return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/proxy_execute`, withOperation(OP_PROXY_EXECUTE, {
71
84
  body,
72
85
  ...options
73
- });
86
+ }));
74
87
  }
75
88
  search(sessionID, body, options) {
76
- return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/search`, {
89
+ return this.#client.post(path`/api/v3.1/tool_router/session/${sessionID}/search`, withOperation(OP_SEARCH, {
77
90
  body,
78
91
  ...options
79
- });
92
+ }));
80
93
  }
81
94
  toolkits(sessionID, query = {}, options) {
82
- return this.#client.get(path`/api/v3.1/tool_router/session/${sessionID}/toolkits`, {
95
+ return this.#client.get(path`/api/v3.1/tool_router/session/${sessionID}/toolkits`, withOperation(OP_TOOLKITS, {
83
96
  query,
84
97
  ...options
85
- });
98
+ }));
86
99
  }
87
100
  tools(sessionID, query = {}, options) {
88
- return this.#client.get(path`/api/v3.1/tool_router/session/${sessionID}/tools`, {
101
+ return this.#client.get(path`/api/v3.1/tool_router/session/${sessionID}/tools`, withOperation(OP_TOOLS, {
89
102
  query,
90
103
  ...options
91
- });
104
+ }));
92
105
  }
93
106
  };
94
107
  Session.Files = Files;
@@ -1,6 +1,7 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
2
 
3
3
  //#region src/compat/resources/auth/session.ts
4
+ const OP_RETRIEVE_INFO = generatedOperation("auth.session.retrieveInfo");
4
5
  /**
5
6
  * Spec-surface `client.auth.session` resource: the 1-method user-session
6
7
  * introspection surface of the v3.1 spec (`GET /auth/session/info` —
@@ -13,7 +14,7 @@ var Session = class {
13
14
  this.#client = client;
14
15
  }
15
16
  retrieveInfo(options) {
16
- return this.#client.get(path`/api/v3.1/auth/session/info`, { ...options });
17
+ return this.#client.get("/api/v3.1/auth/session/info", withOperation(OP_RETRIEVE_INFO, { ...options }));
17
18
  }
18
19
  };
19
20
 
@@ -1,4 +1,4 @@
1
- import { t as Session } from "./session-Do3wHYNe.mjs";
1
+ import { t as Session } from "./session-DWQaRfV_.mjs";
2
2
 
3
3
  //#region src/compat/resources/tool-router/tool-router.ts
4
4
  /** Stainless-shaped `client.toolRouter` resource. */
@@ -0,0 +1,48 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
+
3
+ //#region src/compat/resources/toolkits.ts
4
+ const OP_RETRIEVE = generatedOperation("toolkits.retrieve");
5
+ const OP_LIST = generatedOperation("toolkits.list");
6
+ const OP_RETRIEVE_CATEGORIES = generatedOperation("toolkits.retrieveCategories");
7
+ const OP_RETRIEVE_CHANGELOG = generatedOperation("toolkits.retrieveChangelog");
8
+ const OP_RETRIEVE_MULTI = generatedOperation("toolkits.retrieveMulti");
9
+ /**
10
+ * Stainless-shaped `client.toolkits` resource: the 3-method published surface
11
+ * of `@composio/client` (retrieve/list/retrieveCategories) plus the
12
+ * spec-surface `retrieveMulti` (`POST /toolkits/multi`) and
13
+ * `retrieveChangelog` (`GET /toolkits/changelog`), never published by
14
+ * Stainless — wayfinder ticket 29.
15
+ */
16
+ var Toolkits = class {
17
+ #client;
18
+ constructor(client) {
19
+ this.#client = client;
20
+ }
21
+ retrieve(slug, query = {}, options) {
22
+ return this.#client.get(path`/api/v3.1/toolkits/${slug}`, withOperation(OP_RETRIEVE, {
23
+ query,
24
+ ...options
25
+ }));
26
+ }
27
+ list(query = {}, options) {
28
+ return this.#client.get("/api/v3.1/toolkits", withOperation(OP_LIST, {
29
+ query,
30
+ ...options
31
+ }));
32
+ }
33
+ retrieveCategories(options) {
34
+ return this.#client.get("/api/v3.1/toolkits/categories", withOperation(OP_RETRIEVE_CATEGORIES, { ...options }));
35
+ }
36
+ retrieveChangelog(options) {
37
+ return this.#client.get("/api/v3.1/toolkits/changelog", withOperation(OP_RETRIEVE_CHANGELOG, { ...options }));
38
+ }
39
+ retrieveMulti(body = {}, options) {
40
+ return this.#client.post("/api/v3.1/toolkits/multi", withOperation(OP_RETRIEVE_MULTI, {
41
+ body,
42
+ ...options
43
+ }));
44
+ }
45
+ };
46
+
47
+ //#endregion
48
+ export { Toolkits as t };
@@ -0,0 +1,33 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
+
3
+ //#region src/compat/resources/logs/tools.ts
4
+ const OP_RETRIEVE = generatedOperation("logs.tools.retrieve");
5
+ const OP_LIST = generatedOperation("logs.tools.list");
6
+ const OP_LIST_FIELDS = generatedOperation("logs.tools.listFields");
7
+ /**
8
+ * Stainless-shaped `client.logs.tools` resource plus the deprecated
9
+ * spec-surface `listFields` method: tool-execution log retrieval/listing and
10
+ * field metadata over `internal/action_execution/*`.
11
+ */
12
+ var Tools = class {
13
+ #client;
14
+ constructor(client) {
15
+ this.#client = client;
16
+ }
17
+ retrieve(id, options) {
18
+ return this.#client.get(path`/api/v3.1/internal/action_execution/log/${id}`, withOperation(OP_RETRIEVE, { ...options }));
19
+ }
20
+ list(body, options) {
21
+ return this.#client.post("/api/v3.1/internal/action_execution/logs", withOperation(OP_LIST, {
22
+ body,
23
+ ...options
24
+ }));
25
+ }
26
+ /** @deprecated Deprecated in the input OpenAPI schema. */
27
+ listFields(options) {
28
+ return this.#client.get("/api/v3.1/internal/action_execution/fields", withOperation(OP_LIST_FIELDS, { ...options }));
29
+ }
30
+ };
31
+
32
+ //#endregion
33
+ export { Tools as t };
@@ -0,0 +1,67 @@
1
+ import { a as path, c as withOperation, f as mergeHeaders, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
+
3
+ //#region src/compat/resources/tools.ts
4
+ const OP_RETRIEVE = generatedOperation("tools.retrieve");
5
+ const OP_LIST = generatedOperation("tools.list");
6
+ const OP_EXECUTE = generatedOperation("tools.execute");
7
+ const OP_GET_INPUT = generatedOperation("tools.getInput");
8
+ const OP_PROXY = generatedOperation("tools.proxy");
9
+ const OP_RETRIEVE_ENUM = generatedOperation("tools.retrieveEnum");
10
+ const OP_RETRIEVE_REQUIRED_SCOPES = generatedOperation("tools.retrieveRequiredScopes");
11
+ /**
12
+ * Stainless-shaped `client.tools` resource: the 6-method published surface of
13
+ * `@composio/client` (retrieve/list/execute/getInput/proxy/retrieveEnum) plus
14
+ * the spec-surface `retrieveRequiredScopes` (`POST /tools/scopes/required`,
15
+ * never published by Stainless — wayfinder ticket 29), dispatched through the
16
+ * handwritten kernel.
17
+ */
18
+ var Tools = class {
19
+ #client;
20
+ constructor(client) {
21
+ this.#client = client;
22
+ }
23
+ retrieve(toolSlug, query = {}, options) {
24
+ return this.#client.get(path`/api/v3.1/tools/${toolSlug}`, withOperation(OP_RETRIEVE, {
25
+ query,
26
+ ...options
27
+ }));
28
+ }
29
+ list(query = {}, options) {
30
+ return this.#client.get("/api/v3.1/tools", withOperation(OP_LIST, {
31
+ query,
32
+ ...options
33
+ }));
34
+ }
35
+ execute(toolSlug, params = {}, options) {
36
+ const { "x-llm-gateway-headers": xLlmGatewayHeaders, ...body } = params ?? {};
37
+ return this.#client.post(path`/api/v3.1/tools/execute/${toolSlug}`, withOperation(OP_EXECUTE, {
38
+ body,
39
+ ...options,
40
+ headers: mergeHeaders([{ ...xLlmGatewayHeaders != null ? { "x-llm-gateway-headers": xLlmGatewayHeaders } : void 0 }, options?.headers])
41
+ }));
42
+ }
43
+ getInput(toolSlug, body, options) {
44
+ return this.#client.post(path`/api/v3.1/tools/execute/${toolSlug}/input`, withOperation(OP_GET_INPUT, {
45
+ body,
46
+ ...options
47
+ }));
48
+ }
49
+ proxy(body, options) {
50
+ return this.#client.post("/api/v3.1/tools/execute/proxy", withOperation(OP_PROXY, {
51
+ body,
52
+ ...options
53
+ }));
54
+ }
55
+ retrieveEnum(options) {
56
+ return this.#client.get("/api/v3.1/tools/enum", withOperation(OP_RETRIEVE_ENUM, { ...options }));
57
+ }
58
+ retrieveRequiredScopes(body, options) {
59
+ return this.#client.post("/api/v3.1/tools/scopes/required", withOperation(OP_RETRIEVE_REQUIRED_SCOPES, {
60
+ body,
61
+ ...options
62
+ }));
63
+ }
64
+ };
65
+
66
+ //#endregion
67
+ export { Tools as t };
@@ -1,7 +1,9 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
2
- import { t as Manage } from "./manage-By-b66OH.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
+ import { t as Manage } from "./manage-DDmuMlFb.mjs";
3
3
 
4
4
  //#region src/compat/resources/trigger-instances/trigger-instances.ts
5
+ const OP_LIST_ACTIVE = generatedOperation("triggerInstances.listActive");
6
+ const OP_UPSERT = generatedOperation("triggerInstances.upsert");
5
7
  /**
6
8
  * Stainless-shaped `client.triggerInstances` resource: the exact 2-method
7
9
  * surface of `@composio/client` (listActive/upsert), dispatched through the
@@ -15,16 +17,16 @@ var TriggerInstances = class {
15
17
  this.manage = new Manage(client);
16
18
  }
17
19
  listActive(query = {}, options) {
18
- return this.#client.get(path`/api/v3.1/trigger_instances/active`, {
20
+ return this.#client.get("/api/v3.1/trigger_instances/active", withOperation(OP_LIST_ACTIVE, {
19
21
  query,
20
22
  ...options
21
- });
23
+ }));
22
24
  }
23
25
  upsert(slug, body = {}, options) {
24
- return this.#client.post(path`/api/v3.1/trigger_instances/${slug}/upsert`, {
26
+ return this.#client.post(path`/api/v3.1/trigger_instances/${slug}/upsert`, withOperation(OP_UPSERT, {
25
27
  body,
26
28
  ...options
27
- });
29
+ }));
28
30
  }
29
31
  };
30
32
  TriggerInstances.Manage = Manage;
@@ -1,6 +1,8 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
2
 
3
3
  //#region src/compat/resources/logs/triggers.ts
4
+ const OP_RETRIEVE = generatedOperation("logs.triggers.retrieve");
5
+ const OP_LIST = generatedOperation("logs.triggers.list");
4
6
  /**
5
7
  * Stainless-shaped `client.logs.triggers` resource: the 2-method trigger-log
6
8
  * sub-surface of `@composio/client` (retrieve/list over `internal/trigger/*`).
@@ -12,13 +14,13 @@ var Triggers = class {
12
14
  }
13
15
  /** @deprecated Deprecated in the input OpenAPI schema. */
14
16
  retrieve(id, options) {
15
- return this.#client.get(path`/api/v3.1/internal/trigger/log/${id}`, { ...options });
17
+ return this.#client.get(path`/api/v3.1/internal/trigger/log/${id}`, withOperation(OP_RETRIEVE, { ...options }));
16
18
  }
17
19
  list(body = {}, options) {
18
- return this.#client.post(path`/api/v3.1/internal/trigger/logs`, {
20
+ return this.#client.post("/api/v3.1/internal/trigger/logs", withOperation(OP_LIST, {
19
21
  body,
20
22
  ...options
21
- });
23
+ }));
22
24
  }
23
25
  };
24
26
 
@@ -0,0 +1,34 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
+
3
+ //#region src/compat/resources/triggers-types.ts
4
+ const OP_RETRIEVE = generatedOperation("triggersTypes.retrieve");
5
+ const OP_LIST = generatedOperation("triggersTypes.list");
6
+ const OP_RETRIEVE_ENUM = generatedOperation("triggersTypes.retrieveEnum");
7
+ /**
8
+ * Stainless-shaped `client.triggersTypes` resource: the exact 3-method surface
9
+ * of `@composio/client` (retrieve/list/retrieveEnum).
10
+ */
11
+ var TriggersTypes = class {
12
+ #client;
13
+ constructor(client) {
14
+ this.#client = client;
15
+ }
16
+ retrieve(slug, query = {}, options) {
17
+ return this.#client.get(path`/api/v3.1/triggers_types/${slug}`, withOperation(OP_RETRIEVE, {
18
+ query,
19
+ ...options
20
+ }));
21
+ }
22
+ list(query = {}, options) {
23
+ return this.#client.get("/api/v3.1/triggers_types", withOperation(OP_LIST, {
24
+ query,
25
+ ...options
26
+ }));
27
+ }
28
+ retrieveEnum(options) {
29
+ return this.#client.get("/api/v3.1/triggers_types/list/enum", withOperation(OP_RETRIEVE_ENUM, { ...options }));
30
+ }
31
+ };
32
+
33
+ //#endregion
34
+ export { TriggersTypes as t };
@@ -1,6 +1,8 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
2
 
3
3
  //#region src/compat/resources/org/usage.ts
4
+ const OP_RETRIEVE = generatedOperation("org.usage.retrieve");
5
+ const OP_RETRIEVE_SUMMARY = generatedOperation("org.usage.retrieveSummary");
4
6
  /**
5
7
  * Spec-surface `client.org.usage` resource: the 2-method org metering surface
6
8
  * of the v3.1 spec (retrieveSummary/retrieve over `/org/usage/*` —
@@ -12,16 +14,16 @@ var Usage = class {
12
14
  this.#client = client;
13
15
  }
14
16
  retrieve(entityType, body = {}, options) {
15
- return this.#client.post(path`/api/v3.1/org/usage/${entityType}`, {
17
+ return this.#client.post(path`/api/v3.1/org/usage/${entityType}`, withOperation(OP_RETRIEVE, {
16
18
  body,
17
19
  ...options
18
- });
20
+ }));
19
21
  }
20
22
  retrieveSummary(body = {}, options) {
21
- return this.#client.post(path`/api/v3.1/org/usage/summary`, {
23
+ return this.#client.post("/api/v3.1/org/usage/summary", withOperation(OP_RETRIEVE_SUMMARY, {
22
24
  body,
23
25
  ...options
24
- });
26
+ }));
25
27
  }
26
28
  };
27
29
 
@@ -1,6 +1,8 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
2
 
3
3
  //#region src/compat/resources/project/usage.ts
4
+ const OP_RETRIEVE = generatedOperation("project.usage.retrieve");
5
+ const OP_RETRIEVE_SUMMARY = generatedOperation("project.usage.retrieveSummary");
4
6
  /**
5
7
  * Spec-surface `client.project.usage` resource: the 2-method project metering
6
8
  * surface of the v3.1 spec (retrieveSummary/retrieve over `/project/usage/*`
@@ -12,16 +14,16 @@ var Usage = class {
12
14
  this.#client = client;
13
15
  }
14
16
  retrieve(entityType, body = {}, options) {
15
- return this.#client.post(path`/api/v3.1/project/usage/${entityType}`, {
17
+ return this.#client.post(path`/api/v3.1/project/usage/${entityType}`, withOperation(OP_RETRIEVE, {
16
18
  body,
17
19
  ...options
18
- });
20
+ }));
19
21
  }
20
22
  retrieveSummary(body = {}, options) {
21
- return this.#client.post(path`/api/v3.1/project/usage/summary`, {
23
+ return this.#client.post("/api/v3.1/project/usage/summary", withOperation(OP_RETRIEVE_SUMMARY, {
22
24
  body,
23
25
  ...options
24
- });
26
+ }));
25
27
  }
26
28
  };
27
29
 
@@ -1,6 +1,11 @@
1
- import { r as path } from "./request-DwPfYYNF.mjs";
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
2
 
3
3
  //#region src/compat/resources/webhook-endpoints.ts
4
+ const OP_CREATE = generatedOperation("webhookEndpoints.create");
5
+ const OP_RETRIEVE = generatedOperation("webhookEndpoints.retrieve");
6
+ const OP_UPDATE = generatedOperation("webhookEndpoints.update");
7
+ const OP_LIST = generatedOperation("webhookEndpoints.list");
8
+ const OP_REPLACE = generatedOperation("webhookEndpoints.replace");
4
9
  /**
5
10
  * Spec-surface `client.webhookEndpoints` resource: the 5-method
6
11
  * `/webhook_endpoints` surface of the v3.1 spec (create/list/retrieve/
@@ -14,31 +19,31 @@ var WebhookEndpoints = class {
14
19
  this.#client = client;
15
20
  }
16
21
  create(body, options) {
17
- return this.#client.post(path`/api/v3.1/webhook_endpoints`, {
22
+ return this.#client.post("/api/v3.1/webhook_endpoints", withOperation(OP_CREATE, {
18
23
  body,
19
24
  ...options
20
- });
25
+ }));
21
26
  }
22
27
  retrieve(nanoID, options) {
23
- return this.#client.get(path`/api/v3.1/webhook_endpoints/${nanoID}`, { ...options });
28
+ return this.#client.get(path`/api/v3.1/webhook_endpoints/${nanoID}`, withOperation(OP_RETRIEVE, { ...options }));
24
29
  }
25
30
  update(nanoID, body, options) {
26
- return this.#client.patch(path`/api/v3.1/webhook_endpoints/${nanoID}`, {
31
+ return this.#client.patch(path`/api/v3.1/webhook_endpoints/${nanoID}`, withOperation(OP_UPDATE, {
27
32
  body,
28
33
  ...options
29
- });
34
+ }));
30
35
  }
31
36
  list(query = {}, options) {
32
- return this.#client.get(path`/api/v3.1/webhook_endpoints`, {
37
+ return this.#client.get("/api/v3.1/webhook_endpoints", withOperation(OP_LIST, {
33
38
  query,
34
39
  ...options
35
- });
40
+ }));
36
41
  }
37
42
  replace(nanoID, body, options) {
38
- return this.#client.post(path`/api/v3.1/webhook_endpoints/${nanoID}`, {
43
+ return this.#client.post(path`/api/v3.1/webhook_endpoints/${nanoID}`, withOperation(OP_REPLACE, {
39
44
  body,
40
45
  ...options
41
- });
46
+ }));
42
47
  }
43
48
  };
44
49
 
@@ -0,0 +1,55 @@
1
+ import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
2
+
3
+ //#region src/compat/resources/webhook-subscriptions.ts
4
+ const OP_CREATE = generatedOperation("webhookSubscriptions.create");
5
+ const OP_RETRIEVE = generatedOperation("webhookSubscriptions.retrieve");
6
+ const OP_UPDATE = generatedOperation("webhookSubscriptions.update");
7
+ const OP_LIST = generatedOperation("webhookSubscriptions.list");
8
+ const OP_DELETE = generatedOperation("webhookSubscriptions.delete");
9
+ const OP_LIST_EVENT_TYPES = generatedOperation("webhookSubscriptions.listEventTypes");
10
+ const OP_ROTATE_SECRET = generatedOperation("webhookSubscriptions.rotateSecret");
11
+ /**
12
+ * Spec-surface `client.webhookSubscriptions` resource: the 7-method
13
+ * `/webhook_subscriptions` surface of the v3.1 spec
14
+ * (create/list/retrieve/update/delete/rotateSecret/listEventTypes), never
15
+ * published by Stainless — wayfinder ticket 30.
16
+ */
17
+ var WebhookSubscriptions = class {
18
+ #client;
19
+ constructor(client) {
20
+ this.#client = client;
21
+ }
22
+ create(body, options) {
23
+ return this.#client.post("/api/v3.1/webhook_subscriptions", withOperation(OP_CREATE, {
24
+ body,
25
+ ...options
26
+ }));
27
+ }
28
+ retrieve(id, options) {
29
+ return this.#client.get(path`/api/v3.1/webhook_subscriptions/${id}`, withOperation(OP_RETRIEVE, { ...options }));
30
+ }
31
+ update(id, body = {}, options) {
32
+ return this.#client.patch(path`/api/v3.1/webhook_subscriptions/${id}`, withOperation(OP_UPDATE, {
33
+ body,
34
+ ...options
35
+ }));
36
+ }
37
+ list(query = {}, options) {
38
+ return this.#client.get("/api/v3.1/webhook_subscriptions", withOperation(OP_LIST, {
39
+ query,
40
+ ...options
41
+ }));
42
+ }
43
+ delete(id, options) {
44
+ return this.#client.delete(path`/api/v3.1/webhook_subscriptions/${id}`, withOperation(OP_DELETE, { ...options }));
45
+ }
46
+ listEventTypes(options) {
47
+ return this.#client.get("/api/v3.1/webhook_subscriptions/event_types", withOperation(OP_LIST_EVENT_TYPES, { ...options }));
48
+ }
49
+ rotateSecret(id, options) {
50
+ return this.#client.post(path`/api/v3.1/webhook_subscriptions/${id}/rotate_secret`, withOperation(OP_ROTATE_SECRET, { ...options }));
51
+ }
52
+ };
53
+
54
+ //#endregion
55
+ export { WebhookSubscriptions as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/client",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.0-rc.3",
4
4
  "description": "Composio API client for TypeScript, generated from the v3.1 OpenAPI spec with hey-api",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -60,6 +60,8 @@
60
60
  "codegen:check": "codegen compat --check && codegen python --check",
61
61
  "refresh-spec": "./scripts/refresh-spec.sh",
62
62
  "build": "tsdown",
63
+ "benchmark": "pnpm build && node --experimental-transform-types scripts/benchmark.ts",
64
+ "benchmark:baseline": "pnpm build && rm -rf .artifacts/benchmark/baseline && mkdir -p .artifacts/benchmark && cp -R dist .artifacts/benchmark/baseline",
63
65
  "typecheck": "tsgo --noEmit && tsgo --noEmit -p tsconfig.type-tests.json && tsgo --noEmit -p packages/codegen && tsgo --noEmit -p packages/parity",
64
66
  "typecheck:tsc": "tsc --noEmit && tsc --noEmit -p tsconfig.type-tests.json && tsc --noEmit -p packages/codegen && tsc --noEmit -p packages/parity",
65
67
  "lint": "eslint src test packages/codegen/src packages/codegen/test packages/parity/src packages/parity/test",
@@ -67,7 +69,8 @@
67
69
  "test:pack": "./scripts/pack-check.sh",
68
70
  "test:contract": "vitest run --project contract",
69
71
  "test:parity:live": "pnpm build && node --experimental-transform-types packages/parity/src/main.ts",
70
- "test:parity:live:python": "cd python && rm -rf dist && uv build && cd .. && node --experimental-transform-types packages/parity/src/main.ts --language python"
72
+ "test:parity:live:python": "cd python && rm -rf dist && uv build && cd .. && node --experimental-transform-types packages/parity/src/main.ts --language python",
73
+ "deprecation-probe": "node --env-file=.env --experimental-transform-types scripts/deprecation-probe.ts"
71
74
  },
72
75
  "devDependencies": {
73
76
  "@arethetypeswrong/cli": "^0.18.4",