@composio/client 2.0.0-rc.2 → 2.0.0-rc.21

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 (507) hide show
  1. package/README.md +629 -9
  2. package/dist/{client-D5v0_f-k.d.mts → api-key-revocation-BB3FTdR3.d.mts} +5686 -2238
  3. package/dist/effect/schemas/api-key-revocation/create.d.mts +8 -0
  4. package/dist/effect/schemas/api-key-revocation/create.mjs +8 -0
  5. package/dist/effect/schemas/auth/session/retrieve-info.d.mts +56 -0
  6. package/dist/effect/schemas/auth/session/retrieve-info.mjs +174 -0
  7. package/dist/effect/schemas/auth-configs/create.d.mts +16 -0
  8. package/dist/effect/schemas/auth-configs/create.mjs +22 -0
  9. package/dist/effect/schemas/auth-configs/delete.d.mts +10 -0
  10. package/dist/effect/schemas/auth-configs/delete.mjs +15 -0
  11. package/dist/effect/schemas/auth-configs/list.d.mts +54 -0
  12. package/dist/effect/schemas/auth-configs/list.mjs +66 -0
  13. package/dist/effect/schemas/auth-configs/retrieve.d.mts +48 -0
  14. package/dist/effect/schemas/auth-configs/retrieve.mjs +60 -0
  15. package/dist/effect/schemas/auth-configs/update-status.d.mts +9 -0
  16. package/dist/effect/schemas/auth-configs/update-status.mjs +11 -0
  17. package/dist/effect/schemas/auth-configs/update.d.mts +9 -0
  18. package/dist/effect/schemas/auth-configs/update.mjs +11 -0
  19. package/dist/effect/schemas/cli/create-codact-failure.d.mts +9 -0
  20. package/dist/effect/schemas/cli/create-codact-failure.mjs +17 -0
  21. package/dist/effect/schemas/cli/create-session.d.mts +12 -0
  22. package/dist/effect/schemas/cli/create-session.mjs +26 -0
  23. package/dist/effect/schemas/cli/get-session.d.mts +18 -0
  24. package/dist/effect/schemas/cli/get-session.mjs +48 -0
  25. package/dist/effect/schemas/cli/realtime/auth.d.mts +9 -0
  26. package/dist/effect/schemas/cli/realtime/auth.mjs +11 -0
  27. package/dist/effect/schemas/cli/realtime/credentials.d.mts +10 -0
  28. package/dist/effect/schemas/cli/realtime/credentials.mjs +12 -0
  29. package/dist/effect/schemas/components/auth-config-retrieve-response-expected-input-fields.d.mts +17 -0
  30. package/dist/effect/schemas/components/auth-config-retrieve-response-expected-input-fields.mjs +22 -0
  31. package/dist/effect/schemas/components/auth-config-retrieve-response-tool-access-config.d.mts +9 -0
  32. package/dist/effect/schemas/components/auth-config-retrieve-response-tool-access-config.mjs +20 -0
  33. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option1.d.mts +31 -0
  34. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option1.mjs +33 -0
  35. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option4.d.mts +33 -0
  36. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option4.mjs +35 -0
  37. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option5.d.mts +32 -0
  38. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1-val-option5.mjs +34 -0
  39. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1.d.mts +179 -0
  40. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option1.mjs +113 -0
  41. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option10.d.mts +168 -0
  42. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option10.mjs +104 -0
  43. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option11.d.mts +140 -0
  44. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option11.mjs +76 -0
  45. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option12.d.mts +162 -0
  46. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option12.mjs +12 -0
  47. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option13.d.mts +202 -0
  48. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option13.mjs +130 -0
  49. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option14.d.mts +193 -0
  50. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option14.mjs +211 -0
  51. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option15.d.mts +176 -0
  52. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option15.mjs +86 -0
  53. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option1.d.mts +33 -0
  54. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option1.mjs +35 -0
  55. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option5.d.mts +35 -0
  56. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option5.mjs +37 -0
  57. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option6.d.mts +34 -0
  58. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2-val-option6.mjs +36 -0
  59. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2.d.mts +231 -0
  60. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option2.mjs +160 -0
  61. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option2.d.mts +31 -0
  62. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option2.mjs +33 -0
  63. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option6.d.mts +31 -0
  64. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3-val-option6.mjs +33 -0
  65. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3.d.mts +171 -0
  66. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option3.mjs +108 -0
  67. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option4.d.mts +139 -0
  68. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option4.mjs +74 -0
  69. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option5.d.mts +136 -0
  70. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option5.mjs +72 -0
  71. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option6.d.mts +139 -0
  72. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option6.mjs +98 -0
  73. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7-val.d.mts +159 -0
  74. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7-val.mjs +69 -0
  75. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7.d.mts +162 -0
  76. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option7.mjs +12 -0
  77. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option8.d.mts +162 -0
  78. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option8.mjs +12 -0
  79. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option9.d.mts +167 -0
  80. package/dist/effect/schemas/components/connected-account-create-response-connection-data-option9.mjs +101 -0
  81. package/dist/effect/schemas/components/connected-account-retrieve-response-state.d.mts +2443 -0
  82. package/dist/effect/schemas/components/connected-account-retrieve-response-state.mjs +42 -0
  83. package/dist/effect/schemas/components/deprecated-toolkit-info.d.mts +8 -0
  84. package/dist/effect/schemas/components/deprecated-toolkit-info.mjs +12 -0
  85. package/dist/effect/schemas/components/execute-completed.d.mts +16 -0
  86. package/dist/effect/schemas/components/execute-completed.mjs +27 -0
  87. package/dist/effect/schemas/components/execute-failed.d.mts +16 -0
  88. package/dist/effect/schemas/components/execute-failed.mjs +27 -0
  89. package/dist/effect/schemas/components/execute-requires-user-input.d.mts +15 -0
  90. package/dist/effect/schemas/components/execute-requires-user-input.mjs +16 -0
  91. package/dist/effect/schemas/components/instant-account.d.mts +12 -0
  92. package/dist/effect/schemas/components/instant-account.mjs +15 -0
  93. package/dist/effect/schemas/components/mcp-create-response-commands.d.mts +10 -0
  94. package/dist/effect/schemas/components/mcp-create-response-commands.mjs +24 -0
  95. package/dist/effect/schemas/components/mcp-list-response-items.d.mts +23 -0
  96. package/dist/effect/schemas/components/mcp-list-response-items.mjs +96 -0
  97. package/dist/effect/schemas/components/project-list-response-data.d.mts +21 -0
  98. package/dist/effect/schemas/components/project-list-response-data.mjs +74 -0
  99. package/dist/effect/schemas/components/proxy-execute-completed.d.mts +17 -0
  100. package/dist/effect/schemas/components/proxy-execute-completed.mjs +36 -0
  101. package/dist/effect/schemas/components/session-create-response-config.d.mts +84 -0
  102. package/dist/effect/schemas/components/session-create-response-config.mjs +143 -0
  103. package/dist/effect/schemas/components/session-create-response-experimental-custom-toolkits.d.mts +20 -0
  104. package/dist/effect/schemas/components/session-create-response-experimental-custom-toolkits.mjs +25 -0
  105. package/dist/effect/schemas/components/session-create-response-warnings.d.mts +9 -0
  106. package/dist/effect/schemas/components/session-create-response-warnings.mjs +25 -0
  107. package/dist/effect/schemas/components/session-link-response-experimental.d.mts +13 -0
  108. package/dist/effect/schemas/components/session-link-response-experimental.mjs +18 -0
  109. package/dist/effect/schemas/components/session-retrieve-response-experimental.d.mts +37 -0
  110. package/dist/effect/schemas/components/session-retrieve-response-experimental.mjs +27 -0
  111. package/dist/effect/schemas/components/tool-details.d.mts +51 -0
  112. package/dist/effect/schemas/components/tool-details.mjs +144 -0
  113. package/dist/effect/schemas/components/tool-pricing.d.mts +9 -0
  114. package/dist/effect/schemas/components/tool-pricing.mjs +14 -0
  115. package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.d.mts +95 -0
  116. package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.mjs +154 -0
  117. package/dist/effect/schemas/components/tool-router-toolkits-list-response.d.mts +34 -0
  118. package/dist/effect/schemas/components/tool-router-toolkits-list-response.mjs +45 -0
  119. package/dist/effect/schemas/components/tool.d.mts +51 -0
  120. package/dist/effect/schemas/components/tool.mjs +144 -0
  121. package/dist/effect/schemas/components/toolkit-list-response-items.d.mts +36 -0
  122. package/dist/effect/schemas/components/toolkit-list-response-items.mjs +101 -0
  123. package/dist/effect/schemas/components/tools-paginated.d.mts +57 -0
  124. package/dist/effect/schemas/components/tools-paginated.mjs +15 -0
  125. package/dist/effect/schemas/components/trigger-retrieve-response-log.d.mts +31 -0
  126. package/dist/effect/schemas/components/trigger-retrieve-response-log.mjs +39 -0
  127. package/dist/effect/schemas/components/user-input-request.d.mts +11 -0
  128. package/dist/effect/schemas/components/user-input-request.mjs +19 -0
  129. package/dist/effect/schemas/connected-accounts/complete-auth.d.mts +9 -0
  130. package/dist/effect/schemas/connected-accounts/complete-auth.mjs +11 -0
  131. package/dist/effect/schemas/connected-accounts/create.d.mts +2457 -0
  132. package/dist/effect/schemas/connected-accounts/create.mjs +58 -0
  133. package/dist/effect/schemas/connected-accounts/delete.d.mts +9 -0
  134. package/dist/effect/schemas/connected-accounts/delete.mjs +17 -0
  135. package/dist/effect/schemas/connected-accounts/list.d.mts +2480 -0
  136. package/dist/effect/schemas/connected-accounts/list.mjs +84 -0
  137. package/dist/effect/schemas/connected-accounts/patch.d.mts +10 -0
  138. package/dist/effect/schemas/connected-accounts/patch.mjs +19 -0
  139. package/dist/effect/schemas/connected-accounts/refresh.d.mts +10 -0
  140. package/dist/effect/schemas/connected-accounts/refresh.mjs +27 -0
  141. package/dist/effect/schemas/connected-accounts/retrieve.d.mts +2477 -0
  142. package/dist/effect/schemas/connected-accounts/retrieve.mjs +81 -0
  143. package/dist/effect/schemas/connected-accounts/revoke.d.mts +12 -0
  144. package/dist/effect/schemas/connected-accounts/revoke.mjs +35 -0
  145. package/dist/effect/schemas/connected-accounts/update-status.d.mts +8 -0
  146. package/dist/effect/schemas/connected-accounts/update-status.mjs +11 -0
  147. package/dist/effect/schemas/custom/delete-toolkit.d.mts +12 -0
  148. package/dist/effect/schemas/custom/delete-toolkit.mjs +17 -0
  149. package/dist/effect/schemas/custom/sync.d.mts +10 -0
  150. package/dist/effect/schemas/custom/sync.mjs +21 -0
  151. package/dist/effect/schemas/custom/upsert.d.mts +8 -0
  152. package/dist/effect/schemas/custom/upsert.mjs +11 -0
  153. package/dist/effect/schemas/files/create-presigned-url.d.mts +15 -0
  154. package/dist/effect/schemas/files/create-presigned-url.mjs +15 -0
  155. package/dist/effect/schemas/files/list.d.mts +18 -0
  156. package/dist/effect/schemas/files/list.mjs +20 -0
  157. package/dist/effect/schemas/keyring/list-transfer-keys.d.mts +17 -0
  158. package/dist/effect/schemas/keyring/list-transfer-keys.mjs +19 -0
  159. package/dist/effect/schemas/link/create.d.mts +19 -0
  160. package/dist/effect/schemas/link/create.mjs +18 -0
  161. package/dist/effect/schemas/logs/create-tool-execution.d.mts +25 -0
  162. package/dist/effect/schemas/logs/create-tool-execution.mjs +39 -0
  163. package/dist/effect/schemas/logs/retrieve-tool-execution.d.mts +37 -0
  164. package/dist/effect/schemas/logs/retrieve-tool-execution.mjs +51 -0
  165. package/dist/effect/schemas/logs/tools/list-fields.d.mts +13 -0
  166. package/dist/effect/schemas/logs/tools/list-fields.mjs +13 -0
  167. package/dist/effect/schemas/logs/tools/list.d.mts +28 -0
  168. package/dist/effect/schemas/logs/tools/list.mjs +33 -0
  169. package/dist/effect/schemas/logs/tools/retrieve.d.mts +60 -0
  170. package/dist/effect/schemas/logs/tools/retrieve.mjs +74 -0
  171. package/dist/effect/schemas/logs/triggers/list.d.mts +34 -0
  172. package/dist/effect/schemas/logs/triggers/list.mjs +12 -0
  173. package/dist/effect/schemas/logs/triggers/retrieve.d.mts +33 -0
  174. package/dist/effect/schemas/logs/triggers/retrieve.mjs +9 -0
  175. package/dist/effect/schemas/mcp/create-instance.d.mts +12 -0
  176. package/dist/effect/schemas/mcp/create-instance.mjs +29 -0
  177. package/dist/effect/schemas/mcp/create.d.mts +23 -0
  178. package/dist/effect/schemas/mcp/create.mjs +67 -0
  179. package/dist/effect/schemas/mcp/custom/create.d.mts +17 -0
  180. package/dist/effect/schemas/mcp/custom/create.mjs +48 -0
  181. package/dist/effect/schemas/mcp/delete-instance.d.mts +9 -0
  182. package/dist/effect/schemas/mcp/delete-instance.mjs +11 -0
  183. package/dist/effect/schemas/mcp/delete.d.mts +9 -0
  184. package/dist/effect/schemas/mcp/delete.mjs +17 -0
  185. package/dist/effect/schemas/mcp/generate/url.d.mts +10 -0
  186. package/dist/effect/schemas/mcp/generate/url.mjs +21 -0
  187. package/dist/effect/schemas/mcp/list-instances.d.mts +18 -0
  188. package/dist/effect/schemas/mcp/list-instances.mjs +56 -0
  189. package/dist/effect/schemas/mcp/list.d.mts +27 -0
  190. package/dist/effect/schemas/mcp/list.mjs +19 -0
  191. package/dist/effect/schemas/mcp/retrieve-app.d.mts +27 -0
  192. package/dist/effect/schemas/mcp/retrieve-app.mjs +19 -0
  193. package/dist/effect/schemas/mcp/retrieve.d.mts +24 -0
  194. package/dist/effect/schemas/mcp/retrieve.mjs +68 -0
  195. package/dist/effect/schemas/mcp/update.d.mts +24 -0
  196. package/dist/effect/schemas/mcp/update.mjs +68 -0
  197. package/dist/effect/schemas/org/clanker/create-claim.d.mts +9 -0
  198. package/dist/effect/schemas/org/clanker/create-claim.mjs +14 -0
  199. package/dist/effect/schemas/org/consumer/list-connected-toolkits.d.mts +8 -0
  200. package/dist/effect/schemas/org/consumer/list-connected-toolkits.mjs +8 -0
  201. package/dist/effect/schemas/org/consumer/project/resolve.d.mts +19 -0
  202. package/dist/effect/schemas/org/consumer/project/resolve.mjs +30 -0
  203. package/dist/effect/schemas/org/list.d.mts +17 -0
  204. package/dist/effect/schemas/org/list.mjs +22 -0
  205. package/dist/effect/schemas/org/owner/project/create.d.mts +10 -0
  206. package/dist/effect/schemas/org/owner/project/create.mjs +22 -0
  207. package/dist/effect/schemas/org/owner/project/delete.d.mts +9 -0
  208. package/dist/effect/schemas/org/owner/project/delete.mjs +17 -0
  209. package/dist/effect/schemas/org/owner/project/list.d.mts +27 -0
  210. package/dist/effect/schemas/org/owner/project/list.mjs +15 -0
  211. package/dist/effect/schemas/org/owner/project/regenerate-api-key.d.mts +14 -0
  212. package/dist/effect/schemas/org/owner/project/regenerate-api-key.mjs +31 -0
  213. package/dist/effect/schemas/org/owner/project/retrieve.d.mts +27 -0
  214. package/dist/effect/schemas/org/owner/project/retrieve.mjs +93 -0
  215. package/dist/effect/schemas/org/project/list.d.mts +27 -0
  216. package/dist/effect/schemas/org/project/list.mjs +15 -0
  217. package/dist/effect/schemas/org/usage/retrieve-summary.d.mts +13 -0
  218. package/dist/effect/schemas/org/usage/retrieve-summary.mjs +15 -0
  219. package/dist/effect/schemas/org/usage/retrieve.d.mts +16 -0
  220. package/dist/effect/schemas/org/usage/retrieve.mjs +18 -0
  221. package/dist/effect/schemas/project/usage/retrieve-summary.d.mts +13 -0
  222. package/dist/effect/schemas/project/usage/retrieve-summary.mjs +15 -0
  223. package/dist/effect/schemas/project/usage/retrieve.d.mts +16 -0
  224. package/dist/effect/schemas/project/usage/retrieve.mjs +18 -0
  225. package/dist/effect/schemas/session-configs/list.d.mts +15 -0
  226. package/dist/effect/schemas/session-configs/list.mjs +26 -0
  227. package/dist/effect/schemas/session-configs/retrieve.d.mts +34 -0
  228. package/dist/effect/schemas/session-configs/retrieve.mjs +67 -0
  229. package/dist/effect/schemas/tool-router/session/attach.d.mts +129 -0
  230. package/dist/effect/schemas/tool-router/session/attach.mjs +30 -0
  231. package/dist/effect/schemas/tool-router/session/config-history.d.mts +94 -0
  232. package/dist/effect/schemas/tool-router/session/config-history.mjs +8 -0
  233. package/dist/effect/schemas/tool-router/session/create.d.mts +129 -0
  234. package/dist/effect/schemas/tool-router/session/create.mjs +45 -0
  235. package/dist/effect/schemas/tool-router/session/delete.d.mts +9 -0
  236. package/dist/effect/schemas/tool-router/session/delete.mjs +18 -0
  237. package/dist/effect/schemas/tool-router/session/execute-meta.d.mts +35 -0
  238. package/dist/effect/schemas/tool-router/session/execute-meta.mjs +15 -0
  239. package/dist/effect/schemas/tool-router/session/execute.d.mts +35 -0
  240. package/dist/effect/schemas/tool-router/session/execute.mjs +15 -0
  241. package/dist/effect/schemas/tool-router/session/files/create-download-url.d.mts +11 -0
  242. package/dist/effect/schemas/tool-router/session/files/create-download-url.mjs +13 -0
  243. package/dist/effect/schemas/tool-router/session/files/create-upload-url.d.mts +11 -0
  244. package/dist/effect/schemas/tool-router/session/files/create-upload-url.mjs +13 -0
  245. package/dist/effect/schemas/tool-router/session/files/delete.d.mts +9 -0
  246. package/dist/effect/schemas/tool-router/session/files/delete.mjs +11 -0
  247. package/dist/effect/schemas/tool-router/session/files/list.d.mts +14 -0
  248. package/dist/effect/schemas/tool-router/session/files/list.mjs +16 -0
  249. package/dist/effect/schemas/tool-router/session/link.d.mts +18 -0
  250. package/dist/effect/schemas/tool-router/session/link.mjs +25 -0
  251. package/dist/effect/schemas/tool-router/session/patch.d.mts +129 -0
  252. package/dist/effect/schemas/tool-router/session/patch.mjs +30 -0
  253. package/dist/effect/schemas/tool-router/session/proxy-execute.d.mts +26 -0
  254. package/dist/effect/schemas/tool-router/session/proxy-execute.mjs +10 -0
  255. package/dist/effect/schemas/tool-router/session/retrieve.d.mts +129 -0
  256. package/dist/effect/schemas/tool-router/session/retrieve.mjs +30 -0
  257. package/dist/effect/schemas/tool-router/session/search.d.mts +80 -0
  258. package/dist/effect/schemas/tool-router/session/search.mjs +78 -0
  259. package/dist/effect/schemas/tool-router/session/toolkits.d.mts +33 -0
  260. package/dist/effect/schemas/tool-router/session/toolkits.mjs +8 -0
  261. package/dist/effect/schemas/tool-router/session/tools.d.mts +56 -0
  262. package/dist/effect/schemas/tool-router/session/tools.mjs +8 -0
  263. package/dist/effect/schemas/toolkits/list.d.mts +42 -0
  264. package/dist/effect/schemas/toolkits/list.mjs +15 -0
  265. package/dist/effect/schemas/toolkits/recommend-scopes.d.mts +19 -0
  266. package/dist/effect/schemas/toolkits/recommend-scopes.mjs +21 -0
  267. package/dist/effect/schemas/toolkits/retrieve-categories.d.mts +15 -0
  268. package/dist/effect/schemas/toolkits/retrieve-categories.mjs +23 -0
  269. package/dist/effect/schemas/toolkits/retrieve-changelog.d.mts +16 -0
  270. package/dist/effect/schemas/toolkits/retrieve-changelog.mjs +16 -0
  271. package/dist/effect/schemas/toolkits/retrieve-multi.d.mts +42 -0
  272. package/dist/effect/schemas/toolkits/retrieve-multi.mjs +15 -0
  273. package/dist/effect/schemas/toolkits/retrieve-scopes-grant-context.d.mts +15 -0
  274. package/dist/effect/schemas/toolkits/retrieve-scopes-grant-context.mjs +17 -0
  275. package/dist/effect/schemas/toolkits/retrieve.d.mts +110 -0
  276. package/dist/effect/schemas/toolkits/retrieve.mjs +202 -0
  277. package/dist/effect/schemas/tools/execute.d.mts +12 -0
  278. package/dist/effect/schemas/tools/execute.mjs +35 -0
  279. package/dist/effect/schemas/tools/get-input.d.mts +9 -0
  280. package/dist/effect/schemas/tools/get-input.mjs +22 -0
  281. package/dist/effect/schemas/tools/list.d.mts +56 -0
  282. package/dist/effect/schemas/tools/list.mjs +8 -0
  283. package/dist/effect/schemas/tools/proxy.d.mts +16 -0
  284. package/dist/effect/schemas/tools/proxy.mjs +36 -0
  285. package/dist/effect/schemas/tools/retrieve-enum.d.mts +6 -0
  286. package/dist/effect/schemas/tools/retrieve-enum.mjs +8 -0
  287. package/dist/effect/schemas/tools/retrieve-required-scopes.d.mts +22 -0
  288. package/dist/effect/schemas/tools/retrieve-required-scopes.mjs +33 -0
  289. package/dist/effect/schemas/tools/retrieve.d.mts +50 -0
  290. package/dist/effect/schemas/tools/retrieve.mjs +8 -0
  291. package/dist/effect/schemas/trigger-instances/list-active.d.mts +34 -0
  292. package/dist/effect/schemas/trigger-instances/list-active.mjs +37 -0
  293. package/dist/effect/schemas/trigger-instances/manage/delete.d.mts +8 -0
  294. package/dist/effect/schemas/trigger-instances/manage/delete.mjs +11 -0
  295. package/dist/effect/schemas/trigger-instances/manage/update.d.mts +8 -0
  296. package/dist/effect/schemas/trigger-instances/manage/update.mjs +8 -0
  297. package/dist/effect/schemas/trigger-instances/upsert.d.mts +8 -0
  298. package/dist/effect/schemas/trigger-instances/upsert.mjs +8 -0
  299. package/dist/effect/schemas/triggers-types/list.d.mts +27 -0
  300. package/dist/effect/schemas/triggers-types/list.mjs +86 -0
  301. package/dist/effect/schemas/triggers-types/retrieve-enum.d.mts +6 -0
  302. package/dist/effect/schemas/triggers-types/retrieve-enum.mjs +8 -0
  303. package/dist/effect/schemas/triggers-types/retrieve.d.mts +21 -0
  304. package/dist/effect/schemas/triggers-types/retrieve.mjs +80 -0
  305. package/dist/effect/schemas/webhook-endpoints/create.d.mts +13 -0
  306. package/dist/effect/schemas/webhook-endpoints/create.mjs +15 -0
  307. package/dist/effect/schemas/webhook-endpoints/list.d.mts +12 -0
  308. package/dist/effect/schemas/webhook-endpoints/list.mjs +12 -0
  309. package/dist/effect/schemas/webhook-endpoints/replace.d.mts +13 -0
  310. package/dist/effect/schemas/webhook-endpoints/replace.mjs +15 -0
  311. package/dist/effect/schemas/webhook-endpoints/retrieve.d.mts +13 -0
  312. package/dist/effect/schemas/webhook-endpoints/retrieve.mjs +15 -0
  313. package/dist/effect/schemas/webhook-endpoints/update.d.mts +13 -0
  314. package/dist/effect/schemas/webhook-endpoints/update.mjs +15 -0
  315. package/dist/effect/schemas/webhook-subscriptions/create.d.mts +14 -0
  316. package/dist/effect/schemas/webhook-subscriptions/create.mjs +23 -0
  317. package/dist/effect/schemas/webhook-subscriptions/delete.d.mts +8 -0
  318. package/dist/effect/schemas/webhook-subscriptions/delete.mjs +8 -0
  319. package/dist/effect/schemas/webhook-subscriptions/list-event-types.d.mts +12 -0
  320. package/dist/effect/schemas/webhook-subscriptions/list-event-types.mjs +16 -0
  321. package/dist/effect/schemas/webhook-subscriptions/list.d.mts +20 -0
  322. package/dist/effect/schemas/webhook-subscriptions/list.mjs +29 -0
  323. package/dist/effect/schemas/webhook-subscriptions/retrieve.d.mts +14 -0
  324. package/dist/effect/schemas/webhook-subscriptions/retrieve.mjs +23 -0
  325. package/dist/effect/schemas/webhook-subscriptions/rotate-secret.d.mts +9 -0
  326. package/dist/effect/schemas/webhook-subscriptions/rotate-secret.mjs +14 -0
  327. package/dist/effect/schemas/webhook-subscriptions/update.d.mts +14 -0
  328. package/dist/effect/schemas/webhook-subscriptions/update.mjs +23 -0
  329. package/dist/effect/schemas.d.mts +9645 -0
  330. package/dist/effect/schemas.mjs +131 -0
  331. package/dist/effect.d.mts +756 -0
  332. package/dist/effect.mjs +1626 -0
  333. package/dist/environments-BXSnADKo.d.mts +19 -0
  334. package/dist/environments-CmxYUUsW.mjs +222 -0
  335. package/dist/error-Bw7_G2NZ.mjs +117 -0
  336. package/dist/{request-zLX87M09.mjs → generated-operations-BNRn8az6.mjs} +1493 -307
  337. package/dist/index.d.mts +3 -5
  338. package/dist/index.mjs +157 -1098
  339. package/dist/pagination-rules-CMnBwktJ.mjs +36 -0
  340. package/dist/pagination.d.mts +56 -0
  341. package/dist/pagination.mjs +46 -0
  342. package/dist/resources/api-key-revocation.d.mts +2 -2
  343. package/dist/resources/api-key-revocation.mjs +13 -2
  344. package/dist/resources/auth/auth.d.mts +2 -2
  345. package/dist/resources/auth/auth.mjs +7 -2
  346. package/dist/resources/auth/session.d.mts +2 -2
  347. package/dist/resources/auth/session.mjs +10 -2
  348. package/dist/resources/auth-configs.d.mts +2 -2
  349. package/dist/resources/auth-configs.mjs +45 -2
  350. package/dist/resources/auth.d.mts +2 -2
  351. package/dist/resources/auth.mjs +1 -5
  352. package/dist/resources/cli/cli.d.mts +2 -2
  353. package/dist/resources/cli/cli.mjs +32 -2
  354. package/dist/resources/cli/realtime.d.mts +2 -2
  355. package/dist/resources/cli/realtime.mjs +19 -2
  356. package/dist/resources/cli.d.mts +2 -2
  357. package/dist/resources/cli.mjs +1 -5
  358. package/dist/resources/connected-accounts.d.mts +2 -2
  359. package/dist/resources/connected-accounts.mjs +70 -2
  360. package/dist/resources/custom.d.mts +2 -0
  361. package/dist/resources/custom.mjs +30 -0
  362. package/dist/resources/files.d.mts +2 -2
  363. package/dist/resources/files.mjs +22 -2
  364. package/dist/resources/keyring.d.mts +2 -0
  365. package/dist/resources/keyring.mjs +11 -0
  366. package/dist/resources/link.d.mts +2 -2
  367. package/dist/resources/link.mjs +13 -2
  368. package/dist/resources/logs/logs.d.mts +2 -2
  369. package/dist/resources/logs/logs.mjs +23 -2
  370. package/dist/resources/logs/tools.d.mts +2 -2
  371. package/dist/resources/logs/tools.mjs +23 -2
  372. package/dist/resources/logs/triggers.d.mts +2 -2
  373. package/dist/resources/logs/triggers.mjs +19 -2
  374. package/dist/resources/logs.d.mts +2 -2
  375. package/dist/resources/logs.mjs +1 -6
  376. package/dist/resources/mcp/custom.d.mts +2 -2
  377. package/dist/resources/mcp/custom.mjs +13 -2
  378. package/dist/resources/mcp/generate.d.mts +2 -2
  379. package/dist/resources/mcp/generate.mjs +13 -2
  380. package/dist/resources/mcp/mcp.d.mts +2 -2
  381. package/dist/resources/mcp/mcp.mjs +67 -2
  382. package/dist/resources/mcp.d.mts +2 -2
  383. package/dist/resources/mcp.mjs +1 -6
  384. package/dist/resources/org/clanker.d.mts +2 -2
  385. package/dist/resources/org/clanker.mjs +13 -2
  386. package/dist/resources/org/consumer/consumer.d.mts +2 -2
  387. package/dist/resources/org/consumer/consumer.mjs +21 -2
  388. package/dist/resources/org/consumer/project.d.mts +2 -2
  389. package/dist/resources/org/consumer/project.mjs +14 -2
  390. package/dist/resources/org/consumer.d.mts +2 -2
  391. package/dist/resources/org/consumer.mjs +1 -5
  392. package/dist/resources/org/org.d.mts +2 -2
  393. package/dist/resources/org/org.mjs +25 -2
  394. package/dist/resources/org/owner/owner.d.mts +2 -2
  395. package/dist/resources/org/owner/owner.mjs +7 -2
  396. package/dist/resources/org/owner/project.d.mts +2 -2
  397. package/dist/resources/org/owner/project.mjs +37 -2
  398. package/dist/resources/org/owner.d.mts +2 -2
  399. package/dist/resources/org/owner.mjs +1 -5
  400. package/dist/resources/org/project.d.mts +2 -2
  401. package/dist/resources/org/project.mjs +13 -2
  402. package/dist/resources/org/usage.d.mts +2 -2
  403. package/dist/resources/org/usage.mjs +22 -2
  404. package/dist/resources/org.d.mts +2 -2
  405. package/dist/resources/org.mjs +1 -9
  406. package/dist/resources/project/project.d.mts +2 -2
  407. package/dist/resources/project/project.mjs +7 -2
  408. package/dist/resources/project/usage.d.mts +2 -2
  409. package/dist/resources/project/usage.mjs +22 -2
  410. package/dist/resources/project.d.mts +2 -3
  411. package/dist/resources/project.mjs +1 -5
  412. package/dist/resources/session-configs.d.mts +2 -0
  413. package/dist/resources/session-configs.mjs +20 -0
  414. package/dist/resources/tool-router/session/files.d.mts +2 -2
  415. package/dist/resources/tool-router/session/files.mjs +40 -2
  416. package/dist/resources/tool-router/session/session.d.mts +2 -2
  417. package/dist/resources/tool-router/session/session.mjs +95 -2
  418. package/dist/resources/tool-router/session.d.mts +2 -2
  419. package/dist/resources/tool-router/session.mjs +1 -5
  420. package/dist/resources/tool-router/tool-router.d.mts +2 -2
  421. package/dist/resources/tool-router/tool-router.mjs +7 -2
  422. package/dist/resources/tool-router.d.mts +2 -2
  423. package/dist/resources/tool-router.mjs +1 -5
  424. package/dist/resources/toolkits.d.mts +2 -2
  425. package/dist/resources/toolkits.mjs +51 -2
  426. package/dist/resources/tools.d.mts +2 -2
  427. package/dist/resources/tools.mjs +56 -2
  428. package/dist/resources/trigger-instances/manage.d.mts +2 -2
  429. package/dist/resources/trigger-instances/manage.mjs +19 -2
  430. package/dist/resources/trigger-instances/trigger-instances.d.mts +2 -2
  431. package/dist/resources/trigger-instances/trigger-instances.mjs +24 -2
  432. package/dist/resources/trigger-instances.d.mts +2 -2
  433. package/dist/resources/trigger-instances.mjs +1 -5
  434. package/dist/resources/triggers-types.d.mts +2 -2
  435. package/dist/resources/triggers-types.mjs +26 -2
  436. package/dist/resources/webhook-endpoints.d.mts +2 -2
  437. package/dist/resources/webhook-endpoints.mjs +40 -2
  438. package/dist/resources/webhook-subscriptions.d.mts +2 -2
  439. package/dist/resources/webhook-subscriptions.mjs +45 -2
  440. package/package.json +35 -27
  441. package/dist/api-key-revocation-BqiqlJh6.mjs +0 -24
  442. package/dist/auth-ClFXmN5T.mjs +0 -17
  443. package/dist/auth-configs-COkEdwlP.mjs +0 -48
  444. package/dist/clanker-1ptspWLR.mjs +0 -23
  445. package/dist/cli-BWTXVRT4.mjs +0 -42
  446. package/dist/config-BLBbhLe1.mjs +0 -10
  447. package/dist/config-DnyMhILW.d.mts +0 -9
  448. package/dist/connected-accounts-DK24qYIM.mjs +0 -67
  449. package/dist/consumer-Do3lg_vI.mjs +0 -33
  450. package/dist/custom-CH7n4Dyd.mjs +0 -22
  451. package/dist/files-DoNtYu2Q.mjs +0 -29
  452. package/dist/files-lfGzAnJ_.mjs +0 -45
  453. package/dist/generate-B7ClqhN0.mjs +0 -22
  454. package/dist/link-NsFv9L3R.mjs +0 -22
  455. package/dist/logs-BhCTVSZE.mjs +0 -36
  456. package/dist/manage-7vQYn-gu.mjs +0 -26
  457. package/dist/mcp-r-SWyCDh.mjs +0 -73
  458. package/dist/migration-CBhnoN-Y.mjs +0 -10
  459. package/dist/migration-CKGKuRO3.d.mts +0 -9
  460. package/dist/org-C12wx9QM.mjs +0 -44
  461. package/dist/owner-D4ghEkrK.mjs +0 -17
  462. package/dist/project-By-OBe-4.mjs +0 -28
  463. package/dist/project-Cnr9eceg.mjs +0 -24
  464. package/dist/project-DgdqyoZJ.mjs +0 -22
  465. package/dist/project-DzrdSIis.mjs +0 -42
  466. package/dist/realtime-DHJnO2Ye.mjs +0 -26
  467. package/dist/resources/auth/index.d.mts +0 -2
  468. package/dist/resources/auth/index.mjs +0 -4
  469. package/dist/resources/cli/index.d.mts +0 -2
  470. package/dist/resources/cli/index.mjs +0 -4
  471. package/dist/resources/index.d.mts +0 -3
  472. package/dist/resources/index.mjs +0 -16
  473. package/dist/resources/logs/index.d.mts +0 -2
  474. package/dist/resources/logs/index.mjs +0 -5
  475. package/dist/resources/mcp/index.d.mts +0 -2
  476. package/dist/resources/mcp/index.mjs +0 -5
  477. package/dist/resources/migration.d.mts +0 -2
  478. package/dist/resources/migration.mjs +0 -3
  479. package/dist/resources/org/consumer/index.d.mts +0 -2
  480. package/dist/resources/org/consumer/index.mjs +0 -4
  481. package/dist/resources/org/index.d.mts +0 -2
  482. package/dist/resources/org/index.mjs +0 -8
  483. package/dist/resources/org/owner/index.d.mts +0 -2
  484. package/dist/resources/org/owner/index.mjs +0 -4
  485. package/dist/resources/project/config.d.mts +0 -2
  486. package/dist/resources/project/config.mjs +0 -3
  487. package/dist/resources/project/index.d.mts +0 -3
  488. package/dist/resources/project/index.mjs +0 -4
  489. package/dist/resources/tool-router/index.d.mts +0 -2
  490. package/dist/resources/tool-router/index.mjs +0 -4
  491. package/dist/resources/tool-router/session/index.d.mts +0 -2
  492. package/dist/resources/tool-router/session/index.mjs +0 -4
  493. package/dist/resources/trigger-instances/index.d.mts +0 -2
  494. package/dist/resources/trigger-instances/index.mjs +0 -4
  495. package/dist/session-Ci0MoTTn.mjs +0 -21
  496. package/dist/session-CmqSfXtq.mjs +0 -97
  497. package/dist/tool-router-DbmIxiU5.mjs +0 -14
  498. package/dist/toolkits-BUWB3p_C.mjs +0 -43
  499. package/dist/tools-B4kHPHbe.mjs +0 -30
  500. package/dist/tools-BO1wTIiE.mjs +0 -60
  501. package/dist/trigger-instances-CoEohjcv.mjs +0 -33
  502. package/dist/triggers-BwsETpsM.mjs +0 -26
  503. package/dist/triggers-types-DmOurxxx.mjs +0 -31
  504. package/dist/usage-BJsJ4nsd.mjs +0 -29
  505. package/dist/usage-D6ahTV_Y.mjs +0 -29
  506. package/dist/webhook-endpoints-CyWYVPMe.mjs +0 -46
  507. package/dist/webhook-subscriptions-BgnCTUGn.mjs +0 -48
package/dist/index.mjs CHANGED
@@ -1,986 +1,70 @@
1
- import { _ as InternalServerError, a as inspectDeprecatedInputs, b as RateLimitError, c as mergeHeaders, d as APIError, f as APIUserAbortError, g as ConflictError, h as ComposioError, i as safeJSON, l as APIConnectionError, m as BadRequestError, n as makeRequest, o as inspectDeprecation, p as AuthenticationError, s as assertCredentialTransport, t as castToError, u as APIConnectionTimeoutError, v as NotFoundError, x as UnprocessableEntityError, y as PermissionDeniedError } from "./request-zLX87M09.mjs";
2
- import { t as ApiKeyRevocation } from "./api-key-revocation-BqiqlJh6.mjs";
3
- import { t as AuthConfigs } from "./auth-configs-COkEdwlP.mjs";
4
- import { t as Auth } from "./auth-ClFXmN5T.mjs";
5
- import { t as Cli } from "./cli-BWTXVRT4.mjs";
6
- import { t as ConnectedAccounts } from "./connected-accounts-DK24qYIM.mjs";
7
- import { t as Files$1 } from "./files-DoNtYu2Q.mjs";
8
- import { t as Link } from "./link-NsFv9L3R.mjs";
9
- import { t as Logs } from "./logs-BhCTVSZE.mjs";
10
- import { t as Mcp } from "./mcp-r-SWyCDh.mjs";
11
- import { t as Migration } from "./migration-CBhnoN-Y.mjs";
12
- import { t as Org } from "./org-C12wx9QM.mjs";
13
- import { t as Project } from "./project-DgdqyoZJ.mjs";
14
- import { t as Files } from "./files-lfGzAnJ_.mjs";
15
- import { t as Session } from "./session-CmqSfXtq.mjs";
16
- import { t as ToolRouter } from "./tool-router-DbmIxiU5.mjs";
17
- import { t as Toolkits } from "./toolkits-BUWB3p_C.mjs";
18
- import { t as Tools } from "./tools-BO1wTIiE.mjs";
19
- import { t as TriggerInstances } from "./trigger-instances-CoEohjcv.mjs";
20
- import { t as TriggersTypes } from "./triggers-types-DmOurxxx.mjs";
21
- import { t as WebhookEndpoints } from "./webhook-endpoints-CyWYVPMe.mjs";
22
- import { t as WebhookSubscriptions } from "./webhook-subscriptions-BgnCTUGn.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-Bw7_G2NZ.mjs";
2
+ import { A as Auth, C as resolveIdentity, D as inspectDeprecatedInputs, E as mergeHeaders, L as resolveAuth, O as inspectDeprecation, P as authFromCredentials, R as resolveScope, S as reservedHeaders, U as parseHTTPURL, V as assertCredentialTransport, b as createFetchTransport, j as assertNoRemovedCredentialOptions, p as readOperation, t as GENERATED_OPERATIONS, u as makeRequest, w as VERSION, x as assertNoReservedHeaders } from "./generated-operations-BNRn8az6.mjs";
3
+ import { makeApiKeyRevocation } from "./resources/api-key-revocation.mjs";
4
+ import { makeAuthConfigs } from "./resources/auth-configs.mjs";
5
+ import { makeAuth } from "./resources/auth/auth.mjs";
6
+ import { makeCli } from "./resources/cli/cli.mjs";
7
+ import { makeConnectedAccounts } from "./resources/connected-accounts.mjs";
8
+ import { makeCustom } from "./resources/custom.mjs";
9
+ import { makeFiles } from "./resources/files.mjs";
10
+ import { makeKeyring } from "./resources/keyring.mjs";
11
+ import { makeLink } from "./resources/link.mjs";
12
+ import { makeLogs } from "./resources/logs/logs.mjs";
13
+ import { makeMcp } from "./resources/mcp/mcp.mjs";
14
+ import { makeOrg } from "./resources/org/org.mjs";
15
+ import { makeProject } from "./resources/project/project.mjs";
16
+ import { makeSessionConfigs } from "./resources/session-configs.mjs";
17
+ import { makeToolRouter } from "./resources/tool-router/tool-router.mjs";
18
+ import { makeToolkits } from "./resources/toolkits.mjs";
19
+ import { makeTools } from "./resources/tools.mjs";
20
+ import { makeTriggerInstances } from "./resources/trigger-instances/trigger-instances.mjs";
21
+ import { makeTriggersTypes } from "./resources/triggers-types.mjs";
22
+ import { makeWebhookEndpoints } from "./resources/webhook-endpoints.mjs";
23
+ import { makeWebhookSubscriptions } from "./resources/webhook-subscriptions.mjs";
24
+ import { n as GENERATED_DEPRECATED_INPUTS, r as APIPromise, t as ENVIRONMENTS } from "./environments-CmxYUUsW.mjs";
23
25
 
24
- //#region src/compat/api-promise.ts
25
- /**
26
- * Body parsing, strictly deferred: nothing here runs until the promise is
27
- * awaited (or `withResponse()` is called). Reads a clone so the `Response`
28
- * handed out by `asResponse()`/`withResponse()` stays readable. Maps HTTP
29
- * error statuses to the Stainless error hierarchy; mirrors Stainless
30
- * `defaultParseResponse` for success bodies (204 → null, JSON by
31
- * content-type, empty content-length → undefined, otherwise text).
32
- */
33
- const defaultParseResponse = async (response) => {
34
- if (!response.ok) {
35
- const errText = await response.clone().text().catch((err) => castToError(err).message);
36
- const errJSON = safeJSON(errText);
37
- throw APIError.generate(response.status, errJSON, errJSON ? void 0 : errText, response.headers);
38
- }
39
- if (response.status === 204) return null;
40
- const mediaType = response.headers.get("content-type")?.split(";")[0]?.trim();
41
- if (mediaType?.includes("application/json") || mediaType?.endsWith("+json")) {
42
- if (response.headers.get("content-length") === "0") return void 0;
43
- return await response.clone().json();
44
- }
45
- return await response.clone().text();
46
- };
47
- /**
48
- * Stainless-compatible `APIPromise`.
49
- *
50
- * Mirrors composio-base-ts `src/core/api-promise.ts`: a `Promise` subclass
51
- * with a no-op executor whose `then`/`catch`/`finally` are overridden to
52
- * parse lazily. The laziness matters — `.asResponse()` must resolve with the
53
- * raw `Response` on HTTP error statuses without ever materializing (and thus
54
- * leaving unhandled) the rejected parsed promise.
55
- */
56
- var APIPromise = class APIPromise extends Promise {
57
- exchangePromise;
58
- parseResponse;
59
- parsedPromise;
60
- constructor(exchangePromise, parseResponse = defaultParseResponse) {
61
- super((resolve) => {
62
- resolve(null);
63
- });
64
- this.exchangePromise = exchangePromise;
65
- this.parseResponse = parseResponse;
66
- }
67
- _thenUnwrap(transform) {
68
- return new APIPromise(this.exchangePromise, async (response) => transform(await this.parseResponse(response), response));
69
- }
70
- /**
71
- * Gets the raw `Response` instead of parsing the body. Resolves (never
72
- * throws an `APIError`) on HTTP error statuses; rejects only on
73
- * connection/abort failures.
74
- */
75
- asResponse() {
76
- return this.exchangePromise.then((response) => response);
77
- }
78
- /** Gets the parsed data plus the raw `Response`. */
79
- async withResponse() {
80
- const [data, response] = await Promise.all([this.parse(), this.asResponse()]);
81
- return {
82
- data,
83
- response
84
- };
85
- }
86
- parse() {
87
- this.parsedPromise ??= this.exchangePromise.then((response) => this.parseResponse(response));
88
- return this.parsedPromise;
89
- }
90
- then(onfulfilled, onrejected) {
91
- return this.parse().then(onfulfilled, onrejected);
92
- }
93
- catch(onrejected) {
94
- return this.parse().catch(onrejected);
95
- }
96
- finally(onfinally) {
97
- return this.parse().finally(onfinally);
98
- }
99
- };
100
-
101
- //#endregion
102
- //#region src/compat/generated-deprecated-inputs.ts
103
- const GENERATED_DEPRECATED_INPUTS = /* @__PURE__ */ new Map([
104
- ["authConfigs.list", [{
105
- wire: "deprecated_app_id",
106
- in: "query",
107
- replacementWire: "toolkit_slug"
108
- }, {
109
- wire: "deprecated_status",
110
- in: "query",
111
- replacementWire: null
112
- }]],
113
- ["authConfigs.update", [{
114
- wire: "restrict_to_following_tools",
115
- in: "body",
116
- replacementWire: "tool_access_config"
117
- }]],
118
- ["tools.execute", [{
119
- wire: "entity_id",
120
- in: "body",
121
- replacementWire: "user_id"
122
- }, {
123
- wire: "allow_tracing",
124
- in: "body",
125
- replacementWire: null
126
- }]],
127
- ["tools.list", [{
128
- wire: "search",
129
- in: "query",
130
- replacementWire: "query"
131
- }]],
132
- ["tools.proxy", [{
133
- wire: "custom_connection_data",
134
- in: "body",
135
- replacementWire: null
136
- }]],
137
- ["triggerInstances.listActive", [
138
- {
139
- wire: "connectedAccountIds",
140
- in: "query",
141
- replacementWire: "connected_account_ids"
142
- },
143
- {
144
- wire: "authConfigIds",
145
- in: "query",
146
- replacementWire: "auth_config_ids"
147
- },
148
- {
149
- wire: "triggerIds",
150
- in: "query",
151
- replacementWire: "trigger_ids"
152
- },
153
- {
154
- wire: "triggerNames",
155
- in: "query",
156
- replacementWire: "trigger_names"
157
- },
158
- {
159
- wire: "showDisabled",
160
- in: "query",
161
- replacementWire: "show_disabled"
162
- },
163
- {
164
- wire: "deprecatedConnectedAccountUuids",
165
- in: "query",
166
- replacementWire: "connected_account_ids"
167
- },
168
- {
169
- wire: "deprecatedAuthConfigUuids",
170
- in: "query",
171
- replacementWire: "auth_config_ids"
172
- }
173
- ]],
174
- ["triggerInstances.upsert", [
175
- {
176
- wire: "connectedAuthId",
177
- in: "body",
178
- replacementWire: "connected_account_id"
179
- },
180
- {
181
- wire: "triggerConfig",
182
- in: "body",
183
- replacementWire: "trigger_config"
184
- },
185
- {
186
- wire: "version",
187
- in: "body",
188
- replacementWire: "toolkit_versions"
189
- }
190
- ]]
191
- ]);
192
-
193
- //#endregion
194
- //#region src/compat/generated-operations.ts
195
- const GENERATED_OPERATIONS = [
196
- {
197
- method: "delete",
198
- path: "/api/v3.1/auth_configs/{nanoid}",
199
- chain: ["authConfigs", "delete"],
200
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
201
- },
202
- {
203
- method: "delete",
204
- path: "/api/v3.1/connected_accounts/{nanoid}",
205
- chain: ["connectedAccounts", "delete"],
206
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
207
- },
208
- {
209
- method: "delete",
210
- path: "/api/v3.1/mcp/servers/{serverId}/instances/{instanceId}",
211
- chain: ["mcp", "deleteInstance"]
212
- },
213
- {
214
- method: "delete",
215
- path: "/api/v3.1/mcp/{id}",
216
- chain: ["mcp", "delete"]
217
- },
218
- {
219
- method: "delete",
220
- path: "/api/v3.1/org/owner/project/{nano_id}",
221
- chain: [
222
- "org",
223
- "owner",
224
- "project",
225
- "delete"
226
- ],
227
- schemes: ["OrgApiKeyAuth"]
228
- },
229
- {
230
- method: "delete",
231
- path: "/api/v3.1/tool_router/session/{session_id}",
232
- chain: [
233
- "toolRouter",
234
- "session",
235
- "delete"
236
- ]
237
- },
238
- {
239
- method: "delete",
240
- path: "/api/v3.1/trigger_instances/manage/{triggerId}",
241
- chain: [
242
- "triggerInstances",
243
- "manage",
244
- "delete"
245
- ],
246
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
247
- },
248
- {
249
- method: "delete",
250
- path: "/api/v3.1/webhook_subscriptions/{id}",
251
- chain: ["webhookSubscriptions", "delete"]
252
- },
253
- {
254
- method: "get",
255
- path: "/api/v3.1/auth/session/info",
256
- chain: [
257
- "auth",
258
- "session",
259
- "retrieveInfo"
260
- ],
261
- schemes: ["UserApiKeyAuth"]
262
- },
263
- {
264
- method: "get",
265
- path: "/api/v3.1/auth_configs",
266
- chain: ["authConfigs", "list"],
267
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
268
- },
269
- {
270
- method: "get",
271
- path: "/api/v3.1/auth_configs/{nanoid}",
272
- chain: ["authConfigs", "retrieve"],
273
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
274
- },
275
- {
276
- method: "get",
277
- path: "/api/v3.1/cli/get-session",
278
- chain: ["cli", "getSession"],
279
- schemes: ["no_auth"]
280
- },
281
- {
282
- method: "get",
283
- path: "/api/v3.1/cli/realtime/credentials",
284
- chain: [
285
- "cli",
286
- "realtime",
287
- "credentials"
288
- ],
289
- schemes: ["UserApiKeyAuth"]
290
- },
291
- {
292
- method: "get",
293
- path: "/api/v3.1/connected_accounts",
294
- chain: ["connectedAccounts", "list"],
295
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
296
- },
297
- {
298
- method: "get",
299
- path: "/api/v3.1/connected_accounts/{nanoid}",
300
- chain: ["connectedAccounts", "retrieve"],
301
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
302
- },
303
- {
304
- method: "get",
305
- path: "/api/v3.1/files/list",
306
- chain: ["files", "list"]
307
- },
308
- {
309
- method: "get",
310
- path: "/api/v3.1/internal/action_execution/fields",
311
- chain: [
312
- "logs",
313
- "tools",
314
- "listFields"
315
- ]
316
- },
317
- {
318
- method: "get",
319
- path: "/api/v3.1/internal/action_execution/log/{id}",
320
- chain: [
321
- "logs",
322
- "tools",
323
- "retrieve"
324
- ]
325
- },
326
- {
327
- method: "get",
328
- path: "/api/v3.1/internal/trigger/log/{id}",
329
- chain: [
330
- "logs",
331
- "triggers",
332
- "retrieve"
333
- ]
334
- },
335
- {
336
- method: "get",
337
- path: "/api/v3.1/logs/tool_execution/{id}",
338
- chain: ["logs", "retrieveToolExecution"]
339
- },
340
- {
341
- method: "get",
342
- path: "/api/v3.1/mcp/app/{appKey}",
343
- chain: ["mcp", "retrieveApp"]
344
- },
345
- {
346
- method: "get",
347
- path: "/api/v3.1/mcp/servers",
348
- chain: ["mcp", "list"]
349
- },
350
- {
351
- method: "get",
352
- path: "/api/v3.1/mcp/servers/{serverId}/instances",
353
- chain: ["mcp", "listInstances"]
354
- },
355
- {
356
- method: "get",
357
- path: "/api/v3.1/mcp/{id}",
358
- chain: ["mcp", "retrieve"]
359
- },
360
- {
361
- method: "get",
362
- path: "/api/v3.1/org/consumer/connected_toolkits",
363
- chain: [
364
- "org",
365
- "consumer",
366
- "listConnectedToolkits"
367
- ],
368
- schemes: ["UserApiKeyAuth"]
369
- },
370
- {
371
- method: "get",
372
- path: "/api/v3.1/org/list",
373
- chain: ["org", "list"],
374
- schemes: ["UserApiKeyAuth"]
375
- },
376
- {
377
- method: "get",
378
- path: "/api/v3.1/org/owner/project/list",
379
- chain: [
380
- "org",
381
- "owner",
382
- "project",
383
- "list"
384
- ],
385
- schemes: ["OrgApiKeyAuth"]
386
- },
387
- {
388
- method: "get",
389
- path: "/api/v3.1/org/owner/project/{nano_id}",
390
- chain: [
391
- "org",
392
- "owner",
393
- "project",
394
- "retrieve"
395
- ],
396
- schemes: ["OrgApiKeyAuth"]
397
- },
398
- {
399
- method: "get",
400
- path: "/api/v3.1/org/project/list",
401
- chain: [
402
- "org",
403
- "project",
404
- "list"
405
- ],
406
- schemes: ["UserApiKeyAuth"]
407
- },
408
- {
409
- method: "get",
410
- path: "/api/v3.1/tool_router/session/{session_id}",
411
- chain: [
412
- "toolRouter",
413
- "session",
414
- "retrieve"
415
- ]
416
- },
417
- {
418
- method: "get",
419
- path: "/api/v3.1/tool_router/session/{session_id}/config_history",
420
- chain: [
421
- "toolRouter",
422
- "session",
423
- "configHistory"
424
- ]
425
- },
426
- {
427
- method: "get",
428
- path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/items",
429
- chain: [
430
- "toolRouter",
431
- "session",
432
- "files",
433
- "list"
434
- ]
435
- },
436
- {
437
- method: "get",
438
- path: "/api/v3.1/tool_router/session/{session_id}/toolkits",
439
- chain: [
440
- "toolRouter",
441
- "session",
442
- "toolkits"
443
- ]
444
- },
445
- {
446
- method: "get",
447
- path: "/api/v3.1/tool_router/session/{session_id}/tools",
448
- chain: [
449
- "toolRouter",
450
- "session",
451
- "tools"
452
- ]
453
- },
454
- {
455
- method: "get",
456
- path: "/api/v3.1/toolkits",
457
- chain: ["toolkits", "list"],
458
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
459
- },
460
- {
461
- method: "get",
462
- path: "/api/v3.1/toolkits/categories",
463
- chain: ["toolkits", "retrieveCategories"]
464
- },
465
- {
466
- method: "get",
467
- path: "/api/v3.1/toolkits/changelog",
468
- chain: ["toolkits", "retrieveChangelog"]
469
- },
470
- {
471
- method: "get",
472
- path: "/api/v3.1/toolkits/{slug}",
473
- chain: ["toolkits", "retrieve"],
474
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
475
- },
476
- {
477
- method: "get",
478
- path: "/api/v3.1/tools",
479
- chain: ["tools", "list"],
480
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
481
- },
482
- {
483
- method: "get",
484
- path: "/api/v3.1/tools/enum",
485
- chain: ["tools", "retrieveEnum"],
486
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
487
- },
488
- {
489
- method: "get",
490
- path: "/api/v3.1/tools/{tool_slug}",
491
- chain: ["tools", "retrieve"],
492
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
493
- },
494
- {
495
- method: "get",
496
- path: "/api/v3.1/trigger_instances/active",
497
- chain: ["triggerInstances", "listActive"],
498
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
499
- },
500
- {
501
- method: "get",
502
- path: "/api/v3.1/triggers_types",
503
- chain: ["triggersTypes", "list"],
504
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
505
- },
506
- {
507
- method: "get",
508
- path: "/api/v3.1/triggers_types/list/enum",
509
- chain: ["triggersTypes", "retrieveEnum"],
510
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
511
- },
512
- {
513
- method: "get",
514
- path: "/api/v3.1/triggers_types/{slug}",
515
- chain: ["triggersTypes", "retrieve"],
516
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
517
- },
518
- {
519
- method: "get",
520
- path: "/api/v3.1/webhook_endpoints",
521
- chain: ["webhookEndpoints", "list"]
522
- },
523
- {
524
- method: "get",
525
- path: "/api/v3.1/webhook_endpoints/{nano_id}",
526
- chain: ["webhookEndpoints", "retrieve"]
527
- },
528
- {
529
- method: "get",
530
- path: "/api/v3.1/webhook_subscriptions",
531
- chain: ["webhookSubscriptions", "list"]
532
- },
533
- {
534
- method: "get",
535
- path: "/api/v3.1/webhook_subscriptions/event_types",
536
- chain: ["webhookSubscriptions", "listEventTypes"]
537
- },
538
- {
539
- method: "get",
540
- path: "/api/v3.1/webhook_subscriptions/{id}",
541
- chain: ["webhookSubscriptions", "retrieve"]
542
- },
543
- {
544
- method: "patch",
545
- path: "/api/v3.1/auth_configs/{nanoid}",
546
- chain: ["authConfigs", "update"],
547
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
548
- },
549
- {
550
- method: "patch",
551
- path: "/api/v3.1/auth_configs/{nanoid}/{status}",
552
- chain: ["authConfigs", "updateStatus"]
553
- },
554
- {
555
- method: "patch",
556
- path: "/api/v3.1/connected_accounts/{nanoId}/status",
557
- chain: ["connectedAccounts", "updateStatus"]
558
- },
559
- {
560
- method: "patch",
561
- path: "/api/v3.1/connected_accounts/{nanoid}",
562
- chain: ["connectedAccounts", "patch"]
563
- },
564
- {
565
- method: "patch",
566
- path: "/api/v3.1/mcp/{id}",
567
- chain: ["mcp", "update"]
568
- },
569
- {
570
- method: "patch",
571
- path: "/api/v3.1/tool_router/session/{session_id}",
572
- chain: [
573
- "toolRouter",
574
- "session",
575
- "patch"
576
- ]
577
- },
578
- {
579
- method: "patch",
580
- path: "/api/v3.1/trigger_instances/manage/{triggerId}",
581
- chain: [
582
- "triggerInstances",
583
- "manage",
584
- "update"
585
- ],
586
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
587
- },
588
- {
589
- method: "patch",
590
- path: "/api/v3.1/webhook_endpoints/{nano_id}",
591
- chain: ["webhookEndpoints", "update"]
592
- },
593
- {
594
- method: "patch",
595
- path: "/api/v3.1/webhook_subscriptions/{id}",
596
- chain: ["webhookSubscriptions", "update"]
597
- },
598
- {
599
- method: "post",
600
- path: "/api/v3.1/api_key_revocation",
601
- chain: ["apiKeyRevocation", "create"],
602
- schemes: ["no_auth"]
603
- },
604
- {
605
- method: "post",
606
- path: "/api/v3.1/auth_configs",
607
- chain: ["authConfigs", "create"],
608
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
609
- },
610
- {
611
- method: "post",
612
- path: "/api/v3.1/cli/codact_failures",
613
- chain: ["cli", "createCodactFailure"],
614
- schemes: ["UserApiKeyAuth"]
615
- },
616
- {
617
- method: "post",
618
- path: "/api/v3.1/cli/create-session",
619
- chain: ["cli", "createSession"],
620
- schemes: ["no_auth"]
621
- },
622
- {
623
- method: "post",
624
- path: "/api/v3.1/cli/realtime/auth",
625
- chain: [
626
- "cli",
627
- "realtime",
628
- "auth"
629
- ],
630
- schemes: ["UserApiKeyAuth"]
631
- },
632
- {
633
- method: "post",
634
- path: "/api/v3.1/connected_accounts",
635
- chain: ["connectedAccounts", "create"]
636
- },
637
- {
638
- method: "post",
639
- path: "/api/v3.1/connected_accounts/link",
640
- chain: ["link", "create"],
641
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
642
- },
643
- {
644
- method: "post",
645
- path: "/api/v3.1/connected_accounts/{nanoid}/refresh",
646
- chain: ["connectedAccounts", "refresh"]
647
- },
648
- {
649
- method: "post",
650
- path: "/api/v3.1/connected_accounts/{nanoid}/revoke",
651
- chain: ["connectedAccounts", "revoke"]
652
- },
653
- {
654
- method: "post",
655
- path: "/api/v3.1/files/upload/request",
656
- chain: ["files", "createPresignedURL"]
657
- },
658
- {
659
- method: "post",
660
- path: "/api/v3.1/internal/action_execution/logs",
661
- chain: [
662
- "logs",
663
- "tools",
664
- "list"
665
- ]
666
- },
667
- {
668
- method: "post",
669
- path: "/api/v3.1/internal/trigger/logs",
670
- chain: [
671
- "logs",
672
- "triggers",
673
- "list"
674
- ]
675
- },
676
- {
677
- method: "post",
678
- path: "/api/v3.1/logs/tool_execution",
679
- chain: ["logs", "createToolExecution"]
680
- },
681
- {
682
- method: "post",
683
- path: "/api/v3.1/mcp/servers",
684
- chain: ["mcp", "create"]
685
- },
686
- {
687
- method: "post",
688
- path: "/api/v3.1/mcp/servers/custom",
689
- chain: [
690
- "mcp",
691
- "custom",
692
- "create"
693
- ]
694
- },
695
- {
696
- method: "post",
697
- path: "/api/v3.1/mcp/servers/generate",
698
- chain: [
699
- "mcp",
700
- "generate",
701
- "url"
702
- ]
703
- },
704
- {
705
- method: "post",
706
- path: "/api/v3.1/mcp/servers/{serverId}/instances",
707
- chain: ["mcp", "createInstance"]
708
- },
709
- {
710
- method: "post",
711
- path: "/api/v3.1/org/clanker/create_claim",
712
- chain: [
713
- "org",
714
- "clanker",
715
- "createClaim"
716
- ],
717
- schemes: ["OrgApiKeyAuth"]
718
- },
719
- {
720
- method: "post",
721
- path: "/api/v3.1/org/consumer/project/resolve",
722
- chain: [
723
- "org",
724
- "consumer",
725
- "project",
726
- "resolve"
727
- ],
728
- schemes: ["UserApiKeyAuth"]
729
- },
730
- {
731
- method: "post",
732
- path: "/api/v3.1/org/owner/project/new",
733
- chain: [
734
- "org",
735
- "owner",
736
- "project",
737
- "create"
738
- ],
739
- schemes: ["OrgApiKeyAuth"]
740
- },
741
- {
742
- method: "post",
743
- path: "/api/v3.1/org/owner/project/{nano_id}/regenerate_api_key",
744
- chain: [
745
- "org",
746
- "owner",
747
- "project",
748
- "regenerateAPIKey"
749
- ],
750
- schemes: ["OrgApiKeyAuth"]
751
- },
752
- {
753
- method: "post",
754
- path: "/api/v3.1/org/usage/summary",
755
- chain: [
756
- "org",
757
- "usage",
758
- "retrieveSummary"
759
- ],
760
- schemes: ["OrgApiKeyAuth"]
761
- },
762
- {
763
- method: "post",
764
- path: "/api/v3.1/org/usage/{entity_type}",
765
- chain: [
766
- "org",
767
- "usage",
768
- "retrieve"
769
- ],
770
- schemes: ["OrgApiKeyAuth"]
771
- },
772
- {
773
- method: "post",
774
- path: "/api/v3.1/project/usage/summary",
775
- chain: [
776
- "project",
777
- "usage",
778
- "retrieveSummary"
779
- ]
780
- },
781
- {
782
- method: "post",
783
- path: "/api/v3.1/project/usage/{entity_type}",
784
- chain: [
785
- "project",
786
- "usage",
787
- "retrieve"
788
- ]
789
- },
790
- {
791
- method: "post",
792
- path: "/api/v3.1/tool_router/session",
793
- chain: [
794
- "toolRouter",
795
- "session",
796
- "create"
797
- ]
798
- },
799
- {
800
- method: "post",
801
- path: "/api/v3.1/tool_router/session/{session_id}/attach",
802
- chain: [
803
- "toolRouter",
804
- "session",
805
- "attach"
806
- ]
807
- },
808
- {
809
- method: "post",
810
- path: "/api/v3.1/tool_router/session/{session_id}/execute",
811
- chain: [
812
- "toolRouter",
813
- "session",
814
- "execute"
815
- ],
816
- schemes: ["ApiKeyAuth", "workbench_access_key"]
817
- },
818
- {
819
- method: "post",
820
- path: "/api/v3.1/tool_router/session/{session_id}/execute_meta",
821
- chain: [
822
- "toolRouter",
823
- "session",
824
- "executeMeta"
825
- ]
826
- },
827
- {
828
- method: "post",
829
- path: "/api/v3.1/tool_router/session/{session_id}/link",
830
- chain: [
831
- "toolRouter",
832
- "session",
833
- "link"
834
- ]
835
- },
836
- {
837
- method: "post",
838
- path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/delete",
839
- chain: [
840
- "toolRouter",
841
- "session",
842
- "files",
843
- "delete"
844
- ]
845
- },
846
- {
847
- method: "post",
848
- path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/download_url",
849
- chain: [
850
- "toolRouter",
851
- "session",
852
- "files",
853
- "createDownloadURL"
854
- ]
855
- },
856
- {
857
- method: "post",
858
- path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/upload_url",
859
- chain: [
860
- "toolRouter",
861
- "session",
862
- "files",
863
- "createUploadURL"
864
- ]
865
- },
866
- {
867
- method: "post",
868
- path: "/api/v3.1/tool_router/session/{session_id}/proxy_execute",
869
- chain: [
870
- "toolRouter",
871
- "session",
872
- "proxyExecute"
873
- ],
874
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
875
- },
876
- {
877
- method: "post",
878
- path: "/api/v3.1/tool_router/session/{session_id}/search",
879
- chain: [
880
- "toolRouter",
881
- "session",
882
- "search"
883
- ]
884
- },
885
- {
886
- method: "post",
887
- path: "/api/v3.1/toolkits/multi",
888
- chain: ["toolkits", "retrieveMulti"]
889
- },
890
- {
891
- method: "post",
892
- path: "/api/v3.1/tools/execute/proxy",
893
- chain: ["tools", "proxy"]
894
- },
895
- {
896
- method: "post",
897
- path: "/api/v3.1/tools/execute/{tool_slug}",
898
- chain: ["tools", "execute"],
899
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
900
- },
901
- {
902
- method: "post",
903
- path: "/api/v3.1/tools/execute/{tool_slug}/input",
904
- chain: ["tools", "getInput"]
905
- },
906
- {
907
- method: "post",
908
- path: "/api/v3.1/tools/scopes/required",
909
- chain: ["tools", "retrieveRequiredScopes"]
910
- },
911
- {
912
- method: "post",
913
- path: "/api/v3.1/trigger_instances/{slug}/upsert",
914
- chain: ["triggerInstances", "upsert"],
915
- schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
916
- },
917
- {
918
- method: "post",
919
- path: "/api/v3.1/webhook_endpoints",
920
- chain: ["webhookEndpoints", "create"]
921
- },
922
- {
923
- method: "post",
924
- path: "/api/v3.1/webhook_endpoints/{nano_id}",
925
- chain: ["webhookEndpoints", "replace"]
926
- },
927
- {
928
- method: "post",
929
- path: "/api/v3.1/webhook_subscriptions",
930
- chain: ["webhookSubscriptions", "create"]
931
- },
932
- {
933
- method: "post",
934
- path: "/api/v3.1/webhook_subscriptions/{id}/rotate_secret",
935
- chain: ["webhookSubscriptions", "rotateSecret"]
936
- }
937
- ];
938
-
939
- //#endregion
940
26
  //#region src/compat/generated-resource-wiring.ts
941
27
  const createClientResources = (client) => ({
942
- toolRouter: new ToolRouter(client),
943
- tools: new Tools(client),
944
- files: new Files$1(client),
945
- connectedAccounts: new ConnectedAccounts(client),
946
- link: new Link(client),
947
- toolkits: new Toolkits(client),
948
- authConfigs: new AuthConfigs(client),
949
- triggersTypes: new TriggersTypes(client),
950
- triggerInstances: new TriggerInstances(client),
951
- mcp: new Mcp(client),
952
- cli: new Cli(client),
953
- logs: new Logs(client),
954
- project: new Project(client),
955
- migration: new Migration(),
956
- webhookSubscriptions: new WebhookSubscriptions(client),
957
- webhookEndpoints: new WebhookEndpoints(client),
958
- org: new Org(client),
959
- auth: new Auth(client),
960
- apiKeyRevocation: new ApiKeyRevocation(client)
28
+ toolRouter: makeToolRouter(client),
29
+ tools: makeTools(client),
30
+ files: makeFiles(client),
31
+ connectedAccounts: makeConnectedAccounts(client),
32
+ link: makeLink(client),
33
+ toolkits: makeToolkits(client),
34
+ authConfigs: makeAuthConfigs(client),
35
+ triggersTypes: makeTriggersTypes(client),
36
+ triggerInstances: makeTriggerInstances(client),
37
+ mcp: makeMcp(client),
38
+ cli: makeCli(client),
39
+ logs: makeLogs(client),
40
+ project: makeProject(client),
41
+ webhookSubscriptions: makeWebhookSubscriptions(client),
42
+ webhookEndpoints: makeWebhookEndpoints(client),
43
+ org: makeOrg(client),
44
+ auth: makeAuth(client),
45
+ apiKeyRevocation: makeApiKeyRevocation(client),
46
+ custom: makeCustom(client),
47
+ keyring: makeKeyring(client),
48
+ sessionConfigs: makeSessionConfigs(client)
961
49
  });
962
50
 
963
- //#endregion
964
- //#region src/version.ts
965
- const VERSION = "2.0.0-rc.2";
966
-
967
51
  //#endregion
968
52
  //#region src/compat/client.ts
969
- const environments = {
970
- production: "https://backend.composio.dev",
971
- staging: "https://staging-backend.composio.dev",
972
- local: "http://localhost:9900"
973
- };
974
- /** Read a trimmed environment value in Node or Deno without assuming either runtime exists. */
975
- const readEnv = (name) => {
976
- const globals = globalThis;
977
- try {
978
- const fromProcess = globals.process?.env?.[name]?.trim();
979
- if (fromProcess) return fromProcess;
980
- } catch {}
53
+ const DEFAULT_BASE_URL = ENVIRONMENTS.production;
54
+ const DEFAULT_TIMEOUT = 6e4;
55
+ /** A setting as `fromEnv` reads one: trimmed, and absent when empty. */
56
+ const setting = (environment, name) => environment[name]?.trim() || void 0;
57
+ const parseCustomHeaders = (raw) => {
58
+ const parsed = {};
59
+ for (const line of raw.split("\n")) {
60
+ const colon = line.indexOf(":");
61
+ if (colon >= 0) parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
62
+ }
981
63
  try {
982
- return globals.Deno?.env?.get?.(name)?.trim() || void 0;
983
- } catch {}
64
+ return mergeHeaders([parsed]);
65
+ } catch (cause) {
66
+ throw new ComposioError(`COMPOSIO_CUSTOM_HEADERS contains an invalid header: ${cause instanceof Error ? cause.message : String(cause)}`);
67
+ }
984
68
  };
985
69
  /** Severity order: a record at or below the configured level is emitted. */
986
70
  const LOG_LEVELS = {
@@ -992,91 +76,108 @@ const LOG_LEVELS = {
992
76
  };
993
77
  /**
994
78
  * `logLevel` is a plain string on the public surface and may arrive from
995
- * `COMPOSIO_LOG`, so it can hold anything. An unrecognized value falls back to
79
+ * `COMPOSIO_LOG_LEVEL`, so it can hold anything. An unrecognized value falls back to
996
80
  * the default rather than silencing the client or making it shout.
997
81
  */
998
82
  const isLogLevel = (value) => value !== void 0 && Object.hasOwn(LOG_LEVELS, value);
999
- var Composio = class Composio {
1000
- apiKey;
1001
- userApiKey;
1002
- orgApiKey;
83
+ const COMPAT_CREDENTIAL = {
84
+ is: (value) => typeof value === "string" || typeof value === "function",
85
+ keyOf: (credential) => typeof credential === "string" ? credential : void 0
86
+ };
87
+ const resolveClientOptions = (input) => ({
88
+ ...input,
89
+ allowInsecureHTTP: input.allowInsecureHTTP ?? false,
90
+ allowedHTTPOrigin: input.allowedHTTPOrigin ?? null,
91
+ baseURL: input.baseURL || DEFAULT_BASE_URL,
92
+ logLevel: isLogLevel(input.logLevel) ? input.logLevel : "warn"
93
+ });
94
+ var Composio = class {
1003
95
  baseURL;
1004
96
  maxRetries;
1005
97
  timeout;
1006
- logger;
1007
98
  logLevel;
1008
- fetchOptions;
1009
- #fetch;
99
+ #logger;
100
+ #transport;
1010
101
  #options;
102
+ #identity;
103
+ #auth;
104
+ #scope;
105
+ #scopeHeaders;
106
+ #reserved;
107
+ #kernel;
1011
108
  /**
1012
- * The (operation, notice) pairs, and separately the (operation, deprecated
1013
- * input set) pairs, this instance has already warned about — one Set shared
1014
- * by both triggers under distinct key prefixes (`inspectDeprecation` vs
1015
- * `inspectDeprecatedInputs`), so a deprecated endpoint or a deprecated
1016
- * parameter called in a loop announces itself once — while a *revised*
1017
- * notice from that same endpoint, say once a `Sunset` date is committed,
1018
- * still gets through.
1019
- *
1020
- * Per client *lineage*, not per process: a client built with `new Composio()`
1021
- * starts empty, and `withOptions()` shares this exact Set with the client it
1022
- * returns (see below). Not reassigned anywhere else — the mutability exists
1023
- * only so a derived client can join its parent's record.
109
+ * The (operation, notice) pairs this client lineage has already warned
110
+ * about, under distinct key prefixes for response notices and deprecated
111
+ * inputs. Reassigned only by `withOptions()`, so a derived client joins its
112
+ * parent's record.
1024
113
  */
1025
114
  #deprecationSeen = /* @__PURE__ */ new Set();
1026
- constructor({ baseURL = readEnv("COMPOSIO_BASE_URL"), apiKey = readEnv("COMPOSIO_API_KEY") ?? null, userApiKey = readEnv("COMPOSIO_USER_API_KEY") ?? null, orgApiKey = readEnv("COMPOSIO_ORG_API_KEY") ?? null, ...opts } = {}) {
1027
- const options = {
1028
- apiKey,
1029
- userApiKey,
1030
- orgApiKey,
1031
- ...opts,
1032
- baseURL,
1033
- environment: opts.environment ?? "production"
1034
- };
1035
- if (baseURL && opts.environment) throw new ComposioError("Ambiguous URL; The `baseURL` option (or COMPOSIO_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null");
1036
- this.baseURL = options.baseURL || environments[options.environment || "production"];
1037
- this.timeout = options.timeout ?? Composio.DEFAULT_TIMEOUT;
1038
- this.logger = options.logger ?? console;
1039
- this.logLevel = options.logLevel ?? readEnv("COMPOSIO_LOG") ?? "warn";
1040
- this.fetchOptions = options.fetchOptions;
115
+ constructor(input) {
116
+ if (typeof input !== "object" || input === null) throw new ComposioError("`new Composio(options)` needs an options object with `auth`.");
117
+ assertNoRemovedCredentialOptions(input);
118
+ const options = resolveClientOptions(input);
119
+ this.#auth = resolveAuth(options.auth, COMPAT_CREDENTIAL);
120
+ this.#scopeHeaders = resolveScope(options.scope);
121
+ this.#scope = options.scope === void 0 ? void 0 : Object.freeze({ ...options.scope });
122
+ this.#identity = resolveIdentity(options.identity);
123
+ this.#reserved = reservedHeaders(this.#identity, {
124
+ auth: this.#auth.mode !== "none",
125
+ scope: this.#scopeHeaders !== void 0
126
+ });
127
+ assertNoReservedHeaders(options.defaultHeaders, this.#reserved, "defaultHeaders");
128
+ this.baseURL = options.baseURL;
129
+ this.timeout = options.timeout ?? DEFAULT_TIMEOUT;
130
+ this.#logger = options.logger ?? console;
131
+ this.logLevel = options.logLevel;
1041
132
  this.maxRetries = options.maxRetries ?? 2;
1042
- this.#fetch = options.fetch ?? ((input, init) => globalThis.fetch(input, init));
1043
- const customHeadersEnv = readEnv("COMPOSIO_CUSTOM_HEADERS");
1044
- if (customHeadersEnv) {
1045
- const parsed = {};
1046
- for (const line of customHeadersEnv.split("\n")) {
1047
- const colon = line.indexOf(":");
1048
- if (colon >= 0) parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
1049
- }
1050
- try {
1051
- options.defaultHeaders = mergeHeaders([parsed, options.defaultHeaders]);
1052
- } catch (cause) {
1053
- throw new ComposioError(`COMPOSIO_CUSTOM_HEADERS contains an invalid header: ${cause instanceof Error ? cause.message : String(cause)}`);
1054
- }
1055
- }
133
+ this.#transport = options.transport ?? createFetchTransport();
134
+ options.allowedHTTPOrigin = options.allowInsecureHTTP ? options.allowedHTTPOrigin ?? parseHTTPURL(this.baseURL)?.origin ?? null : null;
1056
135
  this.#options = options;
1057
- this.apiKey = apiKey;
1058
- this.userApiKey = userApiKey;
1059
- this.orgApiKey = orgApiKey;
1060
- assertCredentialTransport(this.baseURL, this.#credentials());
136
+ assertCredentialTransport(this.baseURL, this.#auth.mode !== "none", options.allowedHTTPOrigin);
137
+ this.#kernel = this.#kernelConfig();
1061
138
  Object.assign(this, createClientResources(this));
1062
139
  }
1063
- /** Returns a new client reusing the current options with `options` merged over them. */
140
+ /**
141
+ * Constructs a client from `environment` (such as `process.env`), the only
142
+ * place a client reads `COMPOSIO_*`. Each override replaces the field it names.
143
+ */
144
+ static fromEnv(environment, overrides = {}) {
145
+ const read = (name) => setting(environment, name);
146
+ const mapped = {
147
+ auth: authFromCredentials({
148
+ project: read("COMPOSIO_API_KEY"),
149
+ user: read("COMPOSIO_USER_API_KEY"),
150
+ organization: read("COMPOSIO_ORG_API_KEY")
151
+ }),
152
+ allowInsecureHTTP: read("COMPOSIO_ALLOW_INSECURE_HTTP") === "1",
153
+ baseURL: read("COMPOSIO_BASE_URL")
154
+ };
155
+ const logLevel = read("COMPOSIO_LOG_LEVEL");
156
+ if (logLevel !== void 0) mapped.logLevel = logLevel;
157
+ const customHeaders = read("COMPOSIO_CUSTOM_HEADERS");
158
+ if (customHeaders !== void 0) mapped.defaultHeaders = parseCustomHeaders(customHeaders);
159
+ return new this({
160
+ ...mapped,
161
+ ...overrides
162
+ });
163
+ }
164
+ get authMode() {
165
+ return this.#auth.mode;
166
+ }
167
+ get scope() {
168
+ return this.#scope;
169
+ }
170
+ /** A new client with `options` merged over this one's, key by key, validated as a constructor call is. */
1064
171
  withOptions(options) {
1065
- const client = new this.constructor({
172
+ const transport = Object.hasOwn(options, "transport") ? options.transport : this.#transport;
173
+ const allowedHTTPOrigin = options.allowInsecureHTTP === true ? void 0 : this.#options.allowedHTTPOrigin;
174
+ const derived = {
1066
175
  ...this.#options,
1067
- environment: options.environment ? options.environment : void 0,
1068
- baseURL: options.environment ? void 0 : this.baseURL,
1069
- maxRetries: this.maxRetries,
1070
- timeout: this.timeout,
1071
- logger: this.logger,
1072
- logLevel: this.logLevel,
1073
- fetch: this.#fetch,
1074
- fetchOptions: this.fetchOptions,
1075
- apiKey: this.apiKey,
1076
- userApiKey: this.userApiKey,
1077
- orgApiKey: this.orgApiKey,
1078
- ...options
1079
- });
176
+ ...options,
177
+ allowedHTTPOrigin,
178
+ transport
179
+ };
180
+ const client = new this.constructor(derived);
1080
181
  client.#deprecationSeen = this.#deprecationSeen;
1081
182
  return client;
1082
183
  }
@@ -1096,22 +197,11 @@ var Composio = class Composio {
1096
197
  return this.#methodRequest("delete", path, opts);
1097
198
  }
1098
199
  #methodRequest(method, path, opts) {
1099
- return this.request({
200
+ return new APIPromise(makeRequest(this.#kernel, {
1100
201
  method,
1101
202
  path,
1102
203
  ...opts
1103
- });
1104
- }
1105
- request(options) {
1106
- return new APIPromise(makeRequest(this.#kernelConfig(), options));
1107
- }
1108
- /** Read at dispatch, never cached: all three fields are public and mutable. */
1109
- #credentials() {
1110
- return {
1111
- apiKey: this.apiKey,
1112
- userApiKey: this.userApiKey,
1113
- orgApiKey: this.orgApiKey
1114
- };
204
+ }));
1115
205
  }
1116
206
  #onKernelLog = (level, message, metadata) => {
1117
207
  this.#emitLog(level, message, metadata);
@@ -1121,6 +211,7 @@ var Composio = class Composio {
1121
211
  response,
1122
212
  method: options.method,
1123
213
  path: options.path,
214
+ operation: readOperation(options),
1124
215
  baseURL: this.baseURL,
1125
216
  operations: GENERATED_OPERATIONS,
1126
217
  seen: this.#deprecationSeen,
@@ -1143,44 +234,31 @@ var Composio = class Composio {
1143
234
  });
1144
235
  };
1145
236
  #kernelConfig() {
1146
- const configuredLogLevel = isLogLevel(this.logLevel) ? this.logLevel : "warn";
1147
- const lifecycleLoggingEnabled = LOG_LEVELS[configuredLogLevel] >= LOG_LEVELS.info;
237
+ const lifecycleLoggingEnabled = LOG_LEVELS[this.logLevel] >= LOG_LEVELS.info;
1148
238
  return {
1149
239
  baseURL: this.baseURL,
1150
- credentials: this.#credentials(),
240
+ auth: this.#auth,
241
+ scope: this.#scopeHeaders,
242
+ reserved: this.#reserved,
243
+ allowedHTTPOrigin: this.#options.allowedHTTPOrigin,
1151
244
  operations: GENERATED_OPERATIONS,
1152
245
  maxRetries: this.maxRetries,
1153
246
  timeout: this.timeout,
1154
247
  userAgent: `${this.constructor.name}/JS ${VERSION}`,
1155
- fetch: this.#fetch,
248
+ transport: this.#transport,
1156
249
  defaultHeaders: this.#options.defaultHeaders,
1157
- defaultQuery: this.#options.defaultQuery,
1158
- fetchOptions: this.fetchOptions,
250
+ identity: this.#identity,
1159
251
  ...lifecycleLoggingEnabled ? { onLog: this.#onKernelLog } : {},
1160
252
  onResponse: this.#onKernelResponse,
1161
253
  onRequest: this.#onKernelRequest
1162
254
  };
1163
255
  }
1164
- /**
1165
- * Writes one record through the configured `logger`, gated on `logLevel`.
1166
- *
1167
- * A private method by construction: emitting is the client's own business
1168
- * and the public surface is pinned against the Stainless client, which
1169
- * exposes no such method. The logger is caller-supplied, so a missing method
1170
- * or a throwing one is treated as no logger at all — the same rule the
1171
- * kernel applies to its advisory observer callbacks.
1172
- */
1173
256
  #emitLog(level, message, ...details) {
1174
- const configured = isLogLevel(this.logLevel) ? this.logLevel : "warn";
1175
- if (LOG_LEVELS[configured] < LOG_LEVELS[level]) return;
257
+ if (LOG_LEVELS[this.logLevel] < LOG_LEVELS[level]) return;
1176
258
  try {
1177
- const sink = this.logger[level];
1178
- if (typeof sink !== "function") return;
1179
- sink.call(this.logger, message, ...details);
259
+ this.#logger[level](message, ...details);
1180
260
  } catch {}
1181
261
  }
1182
- static Composio = this;
1183
- static DEFAULT_TIMEOUT = 6e4;
1184
262
  static ComposioError = ComposioError;
1185
263
  static APIError = APIError;
1186
264
  static APIConnectionError = APIConnectionError;
@@ -1195,25 +273,6 @@ var Composio = class Composio {
1195
273
  static PermissionDeniedError = PermissionDeniedError;
1196
274
  static UnprocessableEntityError = UnprocessableEntityError;
1197
275
  };
1198
- Composio.ToolRouter = ToolRouter;
1199
- Composio.Tools = Tools;
1200
- Composio.Files = Files$1;
1201
- Composio.ConnectedAccounts = ConnectedAccounts;
1202
- Composio.Link = Link;
1203
- Composio.Toolkits = Toolkits;
1204
- Composio.AuthConfigs = AuthConfigs;
1205
- Composio.TriggersTypes = TriggersTypes;
1206
- Composio.TriggerInstances = TriggerInstances;
1207
- Composio.Mcp = Mcp;
1208
- Composio.Cli = Cli;
1209
- Composio.Logs = Logs;
1210
- Composio.Project = Project;
1211
- Composio.Migration = Migration;
1212
- Composio.WebhookSubscriptions = WebhookSubscriptions;
1213
- Composio.WebhookEndpoints = WebhookEndpoints;
1214
- Composio.Org = Org;
1215
- Composio.Auth = Auth;
1216
- Composio.ApiKeyRevocation = ApiKeyRevocation;
1217
276
 
1218
277
  //#endregion
1219
- export { APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BadRequestError, Composio, Composio as default, ComposioError, ConflictError, Files, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, Session, ToolRouter, UnprocessableEntityError, VERSION };
278
+ export { APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, Auth, AuthenticationError, BadRequestError, Composio, Composio as default, ComposioError, ConflictError, ENVIRONMENTS, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, UnprocessableEntityError, VERSION, createFetchTransport };