@composio/client 0.1.0-alpha.9 → 2.0.0-rc.2

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 (815) hide show
  1. package/README.md +32 -354
  2. package/dist/api-key-revocation-BqiqlJh6.mjs +24 -0
  3. package/dist/auth-ClFXmN5T.mjs +17 -0
  4. package/dist/auth-configs-COkEdwlP.mjs +48 -0
  5. package/dist/clanker-1ptspWLR.mjs +23 -0
  6. package/dist/cli-BWTXVRT4.mjs +42 -0
  7. package/dist/client-D5v0_f-k.d.mts +22790 -0
  8. package/dist/config-BLBbhLe1.mjs +10 -0
  9. package/dist/config-DnyMhILW.d.mts +9 -0
  10. package/dist/connected-accounts-DK24qYIM.mjs +67 -0
  11. package/dist/consumer-Do3lg_vI.mjs +33 -0
  12. package/dist/custom-CH7n4Dyd.mjs +22 -0
  13. package/dist/files-DoNtYu2Q.mjs +29 -0
  14. package/dist/files-lfGzAnJ_.mjs +45 -0
  15. package/dist/generate-B7ClqhN0.mjs +22 -0
  16. package/dist/index.d.mts +5 -0
  17. package/dist/index.mjs +1219 -0
  18. package/dist/link-NsFv9L3R.mjs +22 -0
  19. package/dist/logs-BhCTVSZE.mjs +36 -0
  20. package/dist/manage-7vQYn-gu.mjs +26 -0
  21. package/dist/mcp-r-SWyCDh.mjs +73 -0
  22. package/dist/migration-CBhnoN-Y.mjs +10 -0
  23. package/dist/migration-CKGKuRO3.d.mts +9 -0
  24. package/dist/org-C12wx9QM.mjs +44 -0
  25. package/dist/owner-D4ghEkrK.mjs +17 -0
  26. package/dist/project-By-OBe-4.mjs +28 -0
  27. package/dist/project-Cnr9eceg.mjs +24 -0
  28. package/dist/project-DgdqyoZJ.mjs +22 -0
  29. package/dist/project-DzrdSIis.mjs +42 -0
  30. package/dist/realtime-DHJnO2Ye.mjs +26 -0
  31. package/dist/request-zLX87M09.mjs +1423 -0
  32. package/dist/resources/api-key-revocation.d.mts +2 -0
  33. package/dist/resources/api-key-revocation.mjs +3 -0
  34. package/dist/resources/auth/auth.d.mts +2 -0
  35. package/dist/resources/auth/auth.mjs +3 -0
  36. package/dist/resources/auth/index.d.mts +2 -0
  37. package/dist/resources/auth/index.mjs +4 -0
  38. package/dist/resources/auth/session.d.mts +2 -0
  39. package/dist/resources/auth/session.mjs +3 -0
  40. package/dist/resources/auth-configs.d.mts +2 -0
  41. package/dist/resources/auth-configs.mjs +3 -0
  42. package/dist/resources/auth.d.mts +2 -0
  43. package/dist/resources/auth.mjs +5 -0
  44. package/dist/resources/cli/cli.d.mts +2 -0
  45. package/dist/resources/cli/cli.mjs +3 -0
  46. package/dist/resources/cli/index.d.mts +2 -0
  47. package/dist/resources/cli/index.mjs +4 -0
  48. package/dist/resources/cli/realtime.d.mts +2 -0
  49. package/dist/resources/cli/realtime.mjs +3 -0
  50. package/dist/resources/cli.d.mts +2 -0
  51. package/dist/resources/cli.mjs +5 -0
  52. package/dist/resources/connected-accounts.d.mts +2 -0
  53. package/dist/resources/connected-accounts.mjs +3 -0
  54. package/dist/resources/files.d.mts +2 -0
  55. package/dist/resources/files.mjs +3 -0
  56. package/dist/resources/index.d.mts +3 -0
  57. package/dist/resources/index.mjs +16 -0
  58. package/dist/resources/link.d.mts +2 -0
  59. package/dist/resources/link.mjs +3 -0
  60. package/dist/resources/logs/index.d.mts +2 -0
  61. package/dist/resources/logs/index.mjs +5 -0
  62. package/dist/resources/logs/logs.d.mts +2 -0
  63. package/dist/resources/logs/logs.mjs +3 -0
  64. package/dist/resources/logs/tools.d.mts +2 -0
  65. package/dist/resources/logs/tools.mjs +3 -0
  66. package/dist/resources/logs/triggers.d.mts +2 -0
  67. package/dist/resources/logs/triggers.mjs +3 -0
  68. package/dist/resources/logs.d.mts +2 -0
  69. package/dist/resources/logs.mjs +6 -0
  70. package/dist/resources/mcp/custom.d.mts +2 -0
  71. package/dist/resources/mcp/custom.mjs +3 -0
  72. package/dist/resources/mcp/generate.d.mts +2 -0
  73. package/dist/resources/mcp/generate.mjs +3 -0
  74. package/dist/resources/mcp/index.d.mts +2 -0
  75. package/dist/resources/mcp/index.mjs +5 -0
  76. package/dist/resources/mcp/mcp.d.mts +2 -0
  77. package/dist/resources/mcp/mcp.mjs +3 -0
  78. package/dist/resources/mcp.d.mts +2 -0
  79. package/dist/resources/mcp.mjs +6 -0
  80. package/dist/resources/migration.d.mts +2 -0
  81. package/dist/resources/migration.mjs +3 -0
  82. package/dist/resources/org/clanker.d.mts +2 -0
  83. package/dist/resources/org/clanker.mjs +3 -0
  84. package/dist/resources/org/consumer/consumer.d.mts +2 -0
  85. package/dist/resources/org/consumer/consumer.mjs +3 -0
  86. package/dist/resources/org/consumer/index.d.mts +2 -0
  87. package/dist/resources/org/consumer/index.mjs +4 -0
  88. package/dist/resources/org/consumer/project.d.mts +2 -0
  89. package/dist/resources/org/consumer/project.mjs +3 -0
  90. package/dist/resources/org/consumer.d.mts +2 -0
  91. package/dist/resources/org/consumer.mjs +5 -0
  92. package/dist/resources/org/index.d.mts +2 -0
  93. package/dist/resources/org/index.mjs +8 -0
  94. package/dist/resources/org/org.d.mts +2 -0
  95. package/dist/resources/org/org.mjs +3 -0
  96. package/dist/resources/org/owner/index.d.mts +2 -0
  97. package/dist/resources/org/owner/index.mjs +4 -0
  98. package/dist/resources/org/owner/owner.d.mts +2 -0
  99. package/dist/resources/org/owner/owner.mjs +3 -0
  100. package/dist/resources/org/owner/project.d.mts +2 -0
  101. package/dist/resources/org/owner/project.mjs +3 -0
  102. package/dist/resources/org/owner.d.mts +2 -0
  103. package/dist/resources/org/owner.mjs +5 -0
  104. package/dist/resources/org/project.d.mts +2 -0
  105. package/dist/resources/org/project.mjs +3 -0
  106. package/dist/resources/org/usage.d.mts +2 -0
  107. package/dist/resources/org/usage.mjs +3 -0
  108. package/dist/resources/org.d.mts +2 -0
  109. package/dist/resources/org.mjs +9 -0
  110. package/dist/resources/project/config.d.mts +2 -0
  111. package/dist/resources/project/config.mjs +3 -0
  112. package/dist/resources/project/index.d.mts +3 -0
  113. package/dist/resources/project/index.mjs +4 -0
  114. package/dist/resources/project/project.d.mts +2 -0
  115. package/dist/resources/project/project.mjs +3 -0
  116. package/dist/resources/project/usage.d.mts +2 -0
  117. package/dist/resources/project/usage.mjs +3 -0
  118. package/dist/resources/project.d.mts +3 -0
  119. package/dist/resources/project.mjs +5 -0
  120. package/dist/resources/tool-router/index.d.mts +2 -0
  121. package/dist/resources/tool-router/index.mjs +4 -0
  122. package/dist/resources/tool-router/session/files.d.mts +2 -0
  123. package/dist/resources/tool-router/session/files.mjs +3 -0
  124. package/dist/resources/tool-router/session/index.d.mts +2 -0
  125. package/dist/resources/tool-router/session/index.mjs +4 -0
  126. package/dist/resources/tool-router/session/session.d.mts +2 -0
  127. package/dist/resources/tool-router/session/session.mjs +3 -0
  128. package/dist/resources/tool-router/session.d.mts +2 -0
  129. package/dist/resources/tool-router/session.mjs +5 -0
  130. package/dist/resources/tool-router/tool-router.d.mts +2 -0
  131. package/dist/resources/tool-router/tool-router.mjs +3 -0
  132. package/dist/resources/tool-router.d.mts +2 -0
  133. package/dist/resources/tool-router.mjs +5 -0
  134. package/dist/resources/toolkits.d.mts +2 -0
  135. package/dist/resources/toolkits.mjs +3 -0
  136. package/dist/resources/tools.d.mts +2 -0
  137. package/dist/resources/tools.mjs +3 -0
  138. package/dist/resources/trigger-instances/index.d.mts +2 -0
  139. package/dist/resources/trigger-instances/index.mjs +4 -0
  140. package/dist/resources/trigger-instances/manage.d.mts +2 -0
  141. package/dist/resources/trigger-instances/manage.mjs +3 -0
  142. package/dist/resources/trigger-instances/trigger-instances.d.mts +2 -0
  143. package/dist/resources/trigger-instances/trigger-instances.mjs +3 -0
  144. package/dist/resources/trigger-instances.d.mts +2 -0
  145. package/dist/resources/trigger-instances.mjs +5 -0
  146. package/dist/resources/triggers-types.d.mts +2 -0
  147. package/dist/resources/triggers-types.mjs +3 -0
  148. package/dist/resources/webhook-endpoints.d.mts +2 -0
  149. package/dist/resources/webhook-endpoints.mjs +3 -0
  150. package/dist/resources/webhook-subscriptions.d.mts +2 -0
  151. package/dist/resources/webhook-subscriptions.mjs +3 -0
  152. package/dist/session-Ci0MoTTn.mjs +21 -0
  153. package/dist/session-CmqSfXtq.mjs +97 -0
  154. package/dist/tool-router-DbmIxiU5.mjs +14 -0
  155. package/dist/toolkits-BUWB3p_C.mjs +43 -0
  156. package/dist/tools-B4kHPHbe.mjs +30 -0
  157. package/dist/tools-BO1wTIiE.mjs +60 -0
  158. package/dist/trigger-instances-CoEohjcv.mjs +33 -0
  159. package/dist/triggers-BwsETpsM.mjs +26 -0
  160. package/dist/triggers-types-DmOurxxx.mjs +31 -0
  161. package/dist/usage-BJsJ4nsd.mjs +29 -0
  162. package/dist/usage-D6ahTV_Y.mjs +29 -0
  163. package/dist/webhook-endpoints-CyWYVPMe.mjs +46 -0
  164. package/dist/webhook-subscriptions-BgnCTUGn.mjs +48 -0
  165. package/package.json +74 -129
  166. package/CHANGELOG.md +0 -96
  167. package/LICENSE +0 -201
  168. package/api-promise.d.mts +0 -2
  169. package/api-promise.d.mts.map +0 -1
  170. package/api-promise.d.ts +0 -2
  171. package/api-promise.d.ts.map +0 -1
  172. package/api-promise.js +0 -19
  173. package/api-promise.js.map +0 -1
  174. package/api-promise.mjs +0 -2
  175. package/api-promise.mjs.map +0 -1
  176. package/client.d.mts +0 -224
  177. package/client.d.mts.map +0 -1
  178. package/client.d.ts +0 -224
  179. package/client.d.ts.map +0 -1
  180. package/client.js +0 -502
  181. package/client.js.map +0 -1
  182. package/client.mjs +0 -475
  183. package/client.mjs.map +0 -1
  184. package/core/api-promise.d.mts +0 -47
  185. package/core/api-promise.d.mts.map +0 -1
  186. package/core/api-promise.d.ts +0 -47
  187. package/core/api-promise.d.ts.map +0 -1
  188. package/core/api-promise.js +0 -84
  189. package/core/api-promise.js.map +0 -1
  190. package/core/api-promise.mjs +0 -80
  191. package/core/api-promise.mjs.map +0 -1
  192. package/core/error.d.mts +0 -47
  193. package/core/error.d.mts.map +0 -1
  194. package/core/error.d.ts +0 -47
  195. package/core/error.d.ts.map +0 -1
  196. package/core/error.js +0 -113
  197. package/core/error.js.map +0 -1
  198. package/core/error.mjs +0 -97
  199. package/core/error.mjs.map +0 -1
  200. package/core/resource.d.mts +0 -6
  201. package/core/resource.d.mts.map +0 -1
  202. package/core/resource.d.ts +0 -6
  203. package/core/resource.d.ts.map +0 -1
  204. package/core/resource.js +0 -11
  205. package/core/resource.js.map +0 -1
  206. package/core/resource.mjs +0 -7
  207. package/core/resource.mjs.map +0 -1
  208. package/core/uploads.d.mts +0 -3
  209. package/core/uploads.d.mts.map +0 -1
  210. package/core/uploads.d.ts +0 -3
  211. package/core/uploads.d.ts.map +0 -1
  212. package/core/uploads.js +0 -6
  213. package/core/uploads.js.map +0 -1
  214. package/core/uploads.mjs +0 -2
  215. package/core/uploads.mjs.map +0 -1
  216. package/error.d.mts +0 -2
  217. package/error.d.mts.map +0 -1
  218. package/error.d.ts +0 -2
  219. package/error.d.ts.map +0 -1
  220. package/error.js +0 -19
  221. package/error.js.map +0 -1
  222. package/error.mjs +0 -2
  223. package/error.mjs.map +0 -1
  224. package/index.d.mts +0 -6
  225. package/index.d.mts.map +0 -1
  226. package/index.d.ts +0 -6
  227. package/index.d.ts.map +0 -1
  228. package/index.js +0 -30
  229. package/index.js.map +0 -1
  230. package/index.mjs +0 -7
  231. package/index.mjs.map +0 -1
  232. package/internal/builtin-types.d.mts +0 -75
  233. package/internal/builtin-types.d.mts.map +0 -1
  234. package/internal/builtin-types.d.ts +0 -75
  235. package/internal/builtin-types.d.ts.map +0 -1
  236. package/internal/builtin-types.js +0 -4
  237. package/internal/builtin-types.js.map +0 -1
  238. package/internal/builtin-types.mjs +0 -3
  239. package/internal/builtin-types.mjs.map +0 -1
  240. package/internal/detect-platform.d.mts +0 -15
  241. package/internal/detect-platform.d.mts.map +0 -1
  242. package/internal/detect-platform.d.ts +0 -15
  243. package/internal/detect-platform.d.ts.map +0 -1
  244. package/internal/detect-platform.js +0 -162
  245. package/internal/detect-platform.js.map +0 -1
  246. package/internal/detect-platform.mjs +0 -157
  247. package/internal/detect-platform.mjs.map +0 -1
  248. package/internal/errors.d.mts +0 -3
  249. package/internal/errors.d.mts.map +0 -1
  250. package/internal/errors.d.ts +0 -3
  251. package/internal/errors.d.ts.map +0 -1
  252. package/internal/errors.js +0 -41
  253. package/internal/errors.js.map +0 -1
  254. package/internal/errors.mjs +0 -36
  255. package/internal/errors.mjs.map +0 -1
  256. package/internal/headers.d.mts +0 -21
  257. package/internal/headers.d.mts.map +0 -1
  258. package/internal/headers.d.ts +0 -21
  259. package/internal/headers.d.ts.map +0 -1
  260. package/internal/headers.js +0 -77
  261. package/internal/headers.js.map +0 -1
  262. package/internal/headers.mjs +0 -72
  263. package/internal/headers.mjs.map +0 -1
  264. package/internal/parse.d.mts +0 -13
  265. package/internal/parse.d.mts.map +0 -1
  266. package/internal/parse.d.ts +0 -13
  267. package/internal/parse.d.ts.map +0 -1
  268. package/internal/parse.js +0 -36
  269. package/internal/parse.js.map +0 -1
  270. package/internal/parse.mjs +0 -32
  271. package/internal/parse.mjs.map +0 -1
  272. package/internal/qs/formats.d.mts +0 -6
  273. package/internal/qs/formats.d.mts.map +0 -1
  274. package/internal/qs/formats.d.ts +0 -6
  275. package/internal/qs/formats.d.ts.map +0 -1
  276. package/internal/qs/formats.js +0 -11
  277. package/internal/qs/formats.js.map +0 -1
  278. package/internal/qs/formats.mjs +0 -8
  279. package/internal/qs/formats.mjs.map +0 -1
  280. package/internal/qs/index.d.mts +0 -10
  281. package/internal/qs/index.d.mts.map +0 -1
  282. package/internal/qs/index.d.ts +0 -10
  283. package/internal/qs/index.d.ts.map +0 -1
  284. package/internal/qs/index.js +0 -14
  285. package/internal/qs/index.js.map +0 -1
  286. package/internal/qs/index.mjs +0 -10
  287. package/internal/qs/index.mjs.map +0 -1
  288. package/internal/qs/stringify.d.mts +0 -3
  289. package/internal/qs/stringify.d.mts.map +0 -1
  290. package/internal/qs/stringify.d.ts +0 -3
  291. package/internal/qs/stringify.d.ts.map +0 -1
  292. package/internal/qs/stringify.js +0 -280
  293. package/internal/qs/stringify.js.map +0 -1
  294. package/internal/qs/stringify.mjs +0 -276
  295. package/internal/qs/stringify.mjs.map +0 -1
  296. package/internal/qs/types.d.mts +0 -57
  297. package/internal/qs/types.d.mts.map +0 -1
  298. package/internal/qs/types.d.ts +0 -57
  299. package/internal/qs/types.d.ts.map +0 -1
  300. package/internal/qs/types.js +0 -3
  301. package/internal/qs/types.js.map +0 -1
  302. package/internal/qs/types.mjs +0 -2
  303. package/internal/qs/types.mjs.map +0 -1
  304. package/internal/qs/utils.d.mts +0 -14
  305. package/internal/qs/utils.d.mts.map +0 -1
  306. package/internal/qs/utils.d.ts +0 -14
  307. package/internal/qs/utils.d.ts.map +0 -1
  308. package/internal/qs/utils.js +0 -229
  309. package/internal/qs/utils.js.map +0 -1
  310. package/internal/qs/utils.mjs +0 -217
  311. package/internal/qs/utils.mjs.map +0 -1
  312. package/internal/request-options.d.mts +0 -33
  313. package/internal/request-options.d.mts.map +0 -1
  314. package/internal/request-options.d.ts +0 -33
  315. package/internal/request-options.d.ts.map +0 -1
  316. package/internal/request-options.js +0 -14
  317. package/internal/request-options.js.map +0 -1
  318. package/internal/request-options.mjs +0 -10
  319. package/internal/request-options.mjs.map +0 -1
  320. package/internal/shim-types.d.mts +0 -28
  321. package/internal/shim-types.d.ts +0 -28
  322. package/internal/shims/crypto.d.mts +0 -13
  323. package/internal/shims/crypto.d.mts.map +0 -1
  324. package/internal/shims/crypto.d.ts +0 -13
  325. package/internal/shims/crypto.d.ts.map +0 -1
  326. package/internal/shims/crypto.js +0 -13
  327. package/internal/shims/crypto.js.map +0 -1
  328. package/internal/shims/crypto.mjs +0 -9
  329. package/internal/shims/crypto.mjs.map +0 -1
  330. package/internal/shims/file.d.mts +0 -23
  331. package/internal/shims/file.d.mts.map +0 -1
  332. package/internal/shims/file.d.ts +0 -23
  333. package/internal/shims/file.d.ts.map +0 -1
  334. package/internal/shims/file.js +0 -16
  335. package/internal/shims/file.js.map +0 -1
  336. package/internal/shims/file.mjs +0 -12
  337. package/internal/shims/file.mjs.map +0 -1
  338. package/internal/shims/getBuiltinModule.d.mts +0 -11
  339. package/internal/shims/getBuiltinModule.d.mts.map +0 -1
  340. package/internal/shims/getBuiltinModule.d.ts +0 -11
  341. package/internal/shims/getBuiltinModule.d.ts.map +0 -1
  342. package/internal/shims/getBuiltinModule.js +0 -71
  343. package/internal/shims/getBuiltinModule.js.map +0 -1
  344. package/internal/shims/getBuiltinModule.mjs +0 -67
  345. package/internal/shims/getBuiltinModule.mjs.map +0 -1
  346. package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
  347. package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
  348. package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
  349. package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
  350. package/internal/shims/nullGetBuiltinModule.js +0 -5
  351. package/internal/shims/nullGetBuiltinModule.js.map +0 -1
  352. package/internal/shims/nullGetBuiltinModule.mjs +0 -2
  353. package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
  354. package/internal/shims.d.mts +0 -20
  355. package/internal/shims.d.mts.map +0 -1
  356. package/internal/shims.d.ts +0 -20
  357. package/internal/shims.d.ts.map +0 -1
  358. package/internal/shims.js +0 -93
  359. package/internal/shims.js.map +0 -1
  360. package/internal/shims.mjs +0 -85
  361. package/internal/shims.mjs.map +0 -1
  362. package/internal/to-file.d.mts +0 -46
  363. package/internal/to-file.d.mts.map +0 -1
  364. package/internal/to-file.d.ts +0 -46
  365. package/internal/to-file.d.ts.map +0 -1
  366. package/internal/to-file.js +0 -91
  367. package/internal/to-file.js.map +0 -1
  368. package/internal/to-file.mjs +0 -87
  369. package/internal/to-file.mjs.map +0 -1
  370. package/internal/types.d.mts +0 -68
  371. package/internal/types.d.mts.map +0 -1
  372. package/internal/types.d.ts +0 -68
  373. package/internal/types.d.ts.map +0 -1
  374. package/internal/types.js +0 -4
  375. package/internal/types.js.map +0 -1
  376. package/internal/types.mjs +0 -3
  377. package/internal/types.mjs.map +0 -1
  378. package/internal/uploads.d.mts +0 -44
  379. package/internal/uploads.d.mts.map +0 -1
  380. package/internal/uploads.d.ts +0 -44
  381. package/internal/uploads.d.ts.map +0 -1
  382. package/internal/uploads.js +0 -131
  383. package/internal/uploads.js.map +0 -1
  384. package/internal/uploads.mjs +0 -122
  385. package/internal/uploads.mjs.map +0 -1
  386. package/internal/utils/base64.d.mts +0 -3
  387. package/internal/utils/base64.d.mts.map +0 -1
  388. package/internal/utils/base64.d.ts +0 -3
  389. package/internal/utils/base64.d.ts.map +0 -1
  390. package/internal/utils/base64.js +0 -37
  391. package/internal/utils/base64.js.map +0 -1
  392. package/internal/utils/base64.mjs +0 -32
  393. package/internal/utils/base64.mjs.map +0 -1
  394. package/internal/utils/env.d.mts +0 -9
  395. package/internal/utils/env.d.mts.map +0 -1
  396. package/internal/utils/env.d.ts +0 -9
  397. package/internal/utils/env.d.ts.map +0 -1
  398. package/internal/utils/env.js +0 -22
  399. package/internal/utils/env.js.map +0 -1
  400. package/internal/utils/env.mjs +0 -18
  401. package/internal/utils/env.mjs.map +0 -1
  402. package/internal/utils/log.d.mts +0 -38
  403. package/internal/utils/log.d.mts.map +0 -1
  404. package/internal/utils/log.d.ts +0 -38
  405. package/internal/utils/log.d.ts.map +0 -1
  406. package/internal/utils/log.js +0 -86
  407. package/internal/utils/log.js.map +0 -1
  408. package/internal/utils/log.mjs +0 -80
  409. package/internal/utils/log.mjs.map +0 -1
  410. package/internal/utils/path.d.mts +0 -15
  411. package/internal/utils/path.d.mts.map +0 -1
  412. package/internal/utils/path.d.ts +0 -15
  413. package/internal/utils/path.d.ts.map +0 -1
  414. package/internal/utils/path.js +0 -58
  415. package/internal/utils/path.js.map +0 -1
  416. package/internal/utils/path.mjs +0 -53
  417. package/internal/utils/path.mjs.map +0 -1
  418. package/internal/utils/sleep.d.mts +0 -2
  419. package/internal/utils/sleep.d.mts.map +0 -1
  420. package/internal/utils/sleep.d.ts +0 -2
  421. package/internal/utils/sleep.d.ts.map +0 -1
  422. package/internal/utils/sleep.js +0 -7
  423. package/internal/utils/sleep.js.map +0 -1
  424. package/internal/utils/sleep.mjs +0 -3
  425. package/internal/utils/sleep.mjs.map +0 -1
  426. package/internal/utils/uuid.d.mts +0 -5
  427. package/internal/utils/uuid.d.mts.map +0 -1
  428. package/internal/utils/uuid.d.ts +0 -5
  429. package/internal/utils/uuid.d.ts.map +0 -1
  430. package/internal/utils/uuid.js +0 -20
  431. package/internal/utils/uuid.js.map +0 -1
  432. package/internal/utils/uuid.mjs +0 -16
  433. package/internal/utils/uuid.mjs.map +0 -1
  434. package/internal/utils/values.d.mts +0 -16
  435. package/internal/utils/values.d.mts.map +0 -1
  436. package/internal/utils/values.d.ts +0 -16
  437. package/internal/utils/values.d.ts.map +0 -1
  438. package/internal/utils/values.js +0 -109
  439. package/internal/utils/values.js.map +0 -1
  440. package/internal/utils/values.mjs +0 -92
  441. package/internal/utils/values.mjs.map +0 -1
  442. package/internal/utils.d.mts +0 -7
  443. package/internal/utils.d.mts.map +0 -1
  444. package/internal/utils.d.ts +0 -7
  445. package/internal/utils.d.ts.map +0 -1
  446. package/internal/utils.js +0 -24
  447. package/internal/utils.js.map +0 -1
  448. package/internal/utils.mjs +0 -8
  449. package/internal/utils.mjs.map +0 -1
  450. package/resource.d.mts +0 -2
  451. package/resource.d.mts.map +0 -1
  452. package/resource.d.ts +0 -2
  453. package/resource.d.ts.map +0 -1
  454. package/resource.js +0 -19
  455. package/resource.js.map +0 -1
  456. package/resource.mjs +0 -2
  457. package/resource.mjs.map +0 -1
  458. package/resources/action-execution.d.mts +0 -155
  459. package/resources/action-execution.d.mts.map +0 -1
  460. package/resources/action-execution.d.ts +0 -155
  461. package/resources/action-execution.d.ts.map +0 -1
  462. package/resources/action-execution.js +0 -19
  463. package/resources/action-execution.js.map +0 -1
  464. package/resources/action-execution.mjs +0 -15
  465. package/resources/action-execution.mjs.map +0 -1
  466. package/resources/auth/auth.d.mts +0 -10
  467. package/resources/auth/auth.d.mts.map +0 -1
  468. package/resources/auth/auth.d.ts +0 -10
  469. package/resources/auth/auth.d.ts.map +0 -1
  470. package/resources/auth/auth.js +0 -39
  471. package/resources/auth/auth.js.map +0 -1
  472. package/resources/auth/auth.mjs +0 -12
  473. package/resources/auth/auth.mjs.map +0 -1
  474. package/resources/auth/index.d.mts +0 -3
  475. package/resources/auth/index.d.mts.map +0 -1
  476. package/resources/auth/index.d.ts +0 -3
  477. package/resources/auth/index.d.ts.map +0 -1
  478. package/resources/auth/index.js +0 -9
  479. package/resources/auth/index.js.map +0 -1
  480. package/resources/auth/index.mjs +0 -4
  481. package/resources/auth/index.mjs.map +0 -1
  482. package/resources/auth/session.d.mts +0 -75
  483. package/resources/auth/session.d.mts.map +0 -1
  484. package/resources/auth/session.d.ts +0 -75
  485. package/resources/auth/session.d.ts.map +0 -1
  486. package/resources/auth/session.js +0 -12
  487. package/resources/auth/session.js.map +0 -1
  488. package/resources/auth/session.mjs +0 -8
  489. package/resources/auth/session.mjs.map +0 -1
  490. package/resources/auth-configs.d.mts +0 -217
  491. package/resources/auth-configs.d.mts.map +0 -1
  492. package/resources/auth-configs.d.ts +0 -217
  493. package/resources/auth-configs.d.ts.map +0 -1
  494. package/resources/auth-configs.js +0 -29
  495. package/resources/auth-configs.js.map +0 -1
  496. package/resources/auth-configs.mjs +0 -25
  497. package/resources/auth-configs.mjs.map +0 -1
  498. package/resources/auth.d.mts +0 -2
  499. package/resources/auth.d.mts.map +0 -1
  500. package/resources/auth.d.ts +0 -2
  501. package/resources/auth.d.ts.map +0 -1
  502. package/resources/auth.js +0 -19
  503. package/resources/auth.js.map +0 -1
  504. package/resources/auth.mjs +0 -3
  505. package/resources/auth.mjs.map +0 -1
  506. package/resources/cli.d.mts +0 -124
  507. package/resources/cli.d.mts.map +0 -1
  508. package/resources/cli.d.ts +0 -124
  509. package/resources/cli.d.ts.map +0 -1
  510. package/resources/cli.js +0 -18
  511. package/resources/cli.js.map +0 -1
  512. package/resources/cli.mjs +0 -14
  513. package/resources/cli.mjs.map +0 -1
  514. package/resources/connected-accounts.d.mts +0 -449
  515. package/resources/connected-accounts.d.mts.map +0 -1
  516. package/resources/connected-accounts.d.ts +0 -449
  517. package/resources/connected-accounts.d.ts.map +0 -1
  518. package/resources/connected-accounts.js +0 -28
  519. package/resources/connected-accounts.js.map +0 -1
  520. package/resources/connected-accounts.mjs +0 -24
  521. package/resources/connected-accounts.mjs.map +0 -1
  522. package/resources/index.d.mts +0 -14
  523. package/resources/index.d.mts.map +0 -1
  524. package/resources/index.d.ts +0 -14
  525. package/resources/index.d.ts.map +0 -1
  526. package/resources/index.js +0 -31
  527. package/resources/index.js.map +0 -1
  528. package/resources/index.mjs +0 -15
  529. package/resources/index.mjs.map +0 -1
  530. package/resources/mcp/command.d.mts +0 -34
  531. package/resources/mcp/command.d.mts.map +0 -1
  532. package/resources/mcp/command.d.ts +0 -34
  533. package/resources/mcp/command.d.ts.map +0 -1
  534. package/resources/mcp/command.js +0 -12
  535. package/resources/mcp/command.js.map +0 -1
  536. package/resources/mcp/command.mjs +0 -8
  537. package/resources/mcp/command.mjs.map +0 -1
  538. package/resources/mcp/index.d.mts +0 -3
  539. package/resources/mcp/index.d.mts.map +0 -1
  540. package/resources/mcp/index.d.ts +0 -3
  541. package/resources/mcp/index.d.ts.map +0 -1
  542. package/resources/mcp/index.js +0 -9
  543. package/resources/mcp/index.js.map +0 -1
  544. package/resources/mcp/index.mjs +0 -4
  545. package/resources/mcp/index.mjs.map +0 -1
  546. package/resources/mcp/mcp.d.mts +0 -378
  547. package/resources/mcp/mcp.d.mts.map +0 -1
  548. package/resources/mcp/mcp.d.ts +0 -378
  549. package/resources/mcp/mcp.d.ts.map +0 -1
  550. package/resources/mcp/mcp.js +0 -66
  551. package/resources/mcp/mcp.js.map +0 -1
  552. package/resources/mcp/mcp.mjs +0 -39
  553. package/resources/mcp/mcp.mjs.map +0 -1
  554. package/resources/mcp.d.mts +0 -2
  555. package/resources/mcp.d.mts.map +0 -1
  556. package/resources/mcp.d.ts +0 -2
  557. package/resources/mcp.d.ts.map +0 -1
  558. package/resources/mcp.js +0 -19
  559. package/resources/mcp.js.map +0 -1
  560. package/resources/mcp.mjs +0 -3
  561. package/resources/mcp.mjs.map +0 -1
  562. package/resources/org/api-key.d.mts +0 -17
  563. package/resources/org/api-key.d.mts.map +0 -1
  564. package/resources/org/api-key.d.ts +0 -17
  565. package/resources/org/api-key.d.ts.map +0 -1
  566. package/resources/org/api-key.js +0 -15
  567. package/resources/org/api-key.js.map +0 -1
  568. package/resources/org/api-key.mjs +0 -11
  569. package/resources/org/api-key.mjs.map +0 -1
  570. package/resources/org/index.d.mts +0 -4
  571. package/resources/org/index.d.mts.map +0 -1
  572. package/resources/org/index.d.ts +0 -4
  573. package/resources/org/index.d.ts.map +0 -1
  574. package/resources/org/index.js +0 -11
  575. package/resources/org/index.js.map +0 -1
  576. package/resources/org/index.mjs +0 -5
  577. package/resources/org/index.mjs.map +0 -1
  578. package/resources/org/org.d.mts +0 -14
  579. package/resources/org/org.d.mts.map +0 -1
  580. package/resources/org/org.d.ts +0 -14
  581. package/resources/org/org.d.ts.map +0 -1
  582. package/resources/org/org.js +0 -43
  583. package/resources/org/org.js.map +0 -1
  584. package/resources/org/org.mjs +0 -16
  585. package/resources/org/org.mjs.map +0 -1
  586. package/resources/org/project/api-keys.d.mts +0 -109
  587. package/resources/org/project/api-keys.d.mts.map +0 -1
  588. package/resources/org/project/api-keys.d.ts +0 -109
  589. package/resources/org/project/api-keys.d.ts.map +0 -1
  590. package/resources/org/project/api-keys.js +0 -23
  591. package/resources/org/project/api-keys.js.map +0 -1
  592. package/resources/org/project/api-keys.mjs +0 -19
  593. package/resources/org/project/api-keys.mjs.map +0 -1
  594. package/resources/org/project/index.d.mts +0 -5
  595. package/resources/org/project/index.d.mts.map +0 -1
  596. package/resources/org/project/index.d.ts +0 -5
  597. package/resources/org/project/index.d.ts.map +0 -1
  598. package/resources/org/project/index.js +0 -13
  599. package/resources/org/project/index.js.map +0 -1
  600. package/resources/org/project/index.mjs +0 -6
  601. package/resources/org/project/index.mjs.map +0 -1
  602. package/resources/org/project/project.d.mts +0 -90
  603. package/resources/org/project/project.d.mts.map +0 -1
  604. package/resources/org/project/project.d.ts +0 -90
  605. package/resources/org/project/project.d.ts.map +0 -1
  606. package/resources/org/project/project.js +0 -60
  607. package/resources/org/project/project.js.map +0 -1
  608. package/resources/org/project/project.mjs +0 -33
  609. package/resources/org/project/project.mjs.map +0 -1
  610. package/resources/org/project/trigger.d.mts +0 -51
  611. package/resources/org/project/trigger.d.mts.map +0 -1
  612. package/resources/org/project/trigger.d.ts +0 -51
  613. package/resources/org/project/trigger.d.ts.map +0 -1
  614. package/resources/org/project/trigger.js +0 -16
  615. package/resources/org/project/trigger.js.map +0 -1
  616. package/resources/org/project/trigger.mjs +0 -12
  617. package/resources/org/project/trigger.mjs.map +0 -1
  618. package/resources/org/project/webhook.d.mts +0 -92
  619. package/resources/org/project/webhook.d.mts.map +0 -1
  620. package/resources/org/project/webhook.d.ts +0 -92
  621. package/resources/org/project/webhook.d.ts.map +0 -1
  622. package/resources/org/project/webhook.js +0 -24
  623. package/resources/org/project/webhook.js.map +0 -1
  624. package/resources/org/project/webhook.mjs +0 -20
  625. package/resources/org/project/webhook.mjs.map +0 -1
  626. package/resources/org/project.d.mts +0 -2
  627. package/resources/org/project.d.mts.map +0 -1
  628. package/resources/org/project.d.ts +0 -2
  629. package/resources/org/project.d.ts.map +0 -1
  630. package/resources/org/project.js +0 -19
  631. package/resources/org/project.js.map +0 -1
  632. package/resources/org/project.mjs +0 -3
  633. package/resources/org/project.mjs.map +0 -1
  634. package/resources/org.d.mts +0 -2
  635. package/resources/org.d.mts.map +0 -1
  636. package/resources/org.d.ts +0 -2
  637. package/resources/org.d.ts.map +0 -1
  638. package/resources/org.js +0 -19
  639. package/resources/org.js.map +0 -1
  640. package/resources/org.mjs +0 -3
  641. package/resources/org.mjs.map +0 -1
  642. package/resources/team-members.d.mts +0 -57
  643. package/resources/team-members.d.mts.map +0 -1
  644. package/resources/team-members.d.ts +0 -57
  645. package/resources/team-members.d.ts.map +0 -1
  646. package/resources/team-members.js +0 -22
  647. package/resources/team-members.js.map +0 -1
  648. package/resources/team-members.mjs +0 -18
  649. package/resources/team-members.mjs.map +0 -1
  650. package/resources/toolkits.d.mts +0 -141
  651. package/resources/toolkits.d.mts.map +0 -1
  652. package/resources/toolkits.d.ts +0 -141
  653. package/resources/toolkits.d.ts.map +0 -1
  654. package/resources/toolkits.js +0 -19
  655. package/resources/toolkits.js.map +0 -1
  656. package/resources/toolkits.mjs +0 -15
  657. package/resources/toolkits.mjs.map +0 -1
  658. package/resources/tools.d.mts +0 -210
  659. package/resources/tools.d.mts.map +0 -1
  660. package/resources/tools.d.ts +0 -210
  661. package/resources/tools.d.ts.map +0 -1
  662. package/resources/tools.js +0 -28
  663. package/resources/tools.js.map +0 -1
  664. package/resources/tools.mjs +0 -24
  665. package/resources/tools.mjs.map +0 -1
  666. package/resources/trigger-instances/handle.d.mts +0 -25
  667. package/resources/trigger-instances/handle.d.mts.map +0 -1
  668. package/resources/trigger-instances/handle.d.ts +0 -25
  669. package/resources/trigger-instances/handle.d.ts.map +0 -1
  670. package/resources/trigger-instances/handle.js +0 -18
  671. package/resources/trigger-instances/handle.js.map +0 -1
  672. package/resources/trigger-instances/handle.mjs +0 -14
  673. package/resources/trigger-instances/handle.mjs.map +0 -1
  674. package/resources/trigger-instances/index.d.mts +0 -3
  675. package/resources/trigger-instances/index.d.mts.map +0 -1
  676. package/resources/trigger-instances/index.d.ts +0 -3
  677. package/resources/trigger-instances/index.d.ts.map +0 -1
  678. package/resources/trigger-instances/index.js +0 -9
  679. package/resources/trigger-instances/index.js.map +0 -1
  680. package/resources/trigger-instances/index.mjs +0 -4
  681. package/resources/trigger-instances/index.mjs.map +0 -1
  682. package/resources/trigger-instances/trigger-instances.d.mts +0 -126
  683. package/resources/trigger-instances/trigger-instances.d.mts.map +0 -1
  684. package/resources/trigger-instances/trigger-instances.d.ts +0 -126
  685. package/resources/trigger-instances/trigger-instances.d.ts.map +0 -1
  686. package/resources/trigger-instances/trigger-instances.js +0 -53
  687. package/resources/trigger-instances/trigger-instances.js.map +0 -1
  688. package/resources/trigger-instances/trigger-instances.mjs +0 -26
  689. package/resources/trigger-instances/trigger-instances.mjs.map +0 -1
  690. package/resources/trigger-instances.d.mts +0 -2
  691. package/resources/trigger-instances.d.mts.map +0 -1
  692. package/resources/trigger-instances.d.ts +0 -2
  693. package/resources/trigger-instances.d.ts.map +0 -1
  694. package/resources/trigger-instances.js +0 -19
  695. package/resources/trigger-instances.js.map +0 -1
  696. package/resources/trigger-instances.mjs +0 -3
  697. package/resources/trigger-instances.mjs.map +0 -1
  698. package/resources/trigger.d.mts +0 -73
  699. package/resources/trigger.d.mts.map +0 -1
  700. package/resources/trigger.d.ts +0 -73
  701. package/resources/trigger.d.ts.map +0 -1
  702. package/resources/trigger.js +0 -12
  703. package/resources/trigger.js.map +0 -1
  704. package/resources/trigger.mjs +0 -8
  705. package/resources/trigger.mjs.map +0 -1
  706. package/resources/triggers-types.d.mts +0 -59
  707. package/resources/triggers-types.d.mts.map +0 -1
  708. package/resources/triggers-types.d.ts +0 -59
  709. package/resources/triggers-types.d.ts.map +0 -1
  710. package/resources/triggers-types.js +0 -19
  711. package/resources/triggers-types.js.map +0 -1
  712. package/resources/triggers-types.mjs +0 -15
  713. package/resources/triggers-types.mjs.map +0 -1
  714. package/resources.d.mts +0 -2
  715. package/resources.d.mts.map +0 -1
  716. package/resources.d.ts +0 -2
  717. package/resources.d.ts.map +0 -1
  718. package/resources.js +0 -18
  719. package/resources.js.map +0 -1
  720. package/resources.mjs +0 -2
  721. package/resources.mjs.map +0 -1
  722. package/src/api-promise.ts +0 -2
  723. package/src/client.ts +0 -938
  724. package/src/core/README.md +0 -3
  725. package/src/core/api-promise.ts +0 -92
  726. package/src/core/error.ts +0 -130
  727. package/src/core/resource.ts +0 -11
  728. package/src/core/uploads.ts +0 -2
  729. package/src/error.ts +0 -2
  730. package/src/index.ts +0 -22
  731. package/src/internal/README.md +0 -3
  732. package/src/internal/builtin-types.ts +0 -93
  733. package/src/internal/detect-platform.ts +0 -196
  734. package/src/internal/errors.ts +0 -33
  735. package/src/internal/headers.ts +0 -96
  736. package/src/internal/parse.ts +0 -50
  737. package/src/internal/qs/LICENSE.md +0 -13
  738. package/src/internal/qs/README.md +0 -3
  739. package/src/internal/qs/formats.ts +0 -9
  740. package/src/internal/qs/index.ts +0 -13
  741. package/src/internal/qs/stringify.ts +0 -388
  742. package/src/internal/qs/types.ts +0 -71
  743. package/src/internal/qs/utils.ts +0 -265
  744. package/src/internal/request-options.ts +0 -37
  745. package/src/internal/shim-types.d.ts +0 -28
  746. package/src/internal/shims/crypto.ts +0 -18
  747. package/src/internal/shims/file.ts +0 -32
  748. package/src/internal/shims/getBuiltinModule.ts +0 -66
  749. package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
  750. package/src/internal/shims.ts +0 -107
  751. package/src/internal/to-file.ts +0 -152
  752. package/src/internal/types.ts +0 -92
  753. package/src/internal/uploads.ts +0 -175
  754. package/src/internal/utils/base64.ts +0 -39
  755. package/src/internal/utils/env.ts +0 -18
  756. package/src/internal/utils/log.ts +0 -127
  757. package/src/internal/utils/path.ts +0 -63
  758. package/src/internal/utils/sleep.ts +0 -3
  759. package/src/internal/utils/uuid.ts +0 -19
  760. package/src/internal/utils/values.ts +0 -102
  761. package/src/internal/utils.ts +0 -8
  762. package/src/lib/.keep +0 -4
  763. package/src/resource.ts +0 -2
  764. package/src/resources/action-execution.ts +0 -244
  765. package/src/resources/auth/auth.ts +0 -15
  766. package/src/resources/auth/index.ts +0 -4
  767. package/src/resources/auth/session.ts +0 -127
  768. package/src/resources/auth-configs.ts +0 -362
  769. package/src/resources/auth.ts +0 -3
  770. package/src/resources/cli.ts +0 -166
  771. package/src/resources/connected-accounts.ts +0 -661
  772. package/src/resources/index.ts +0 -105
  773. package/src/resources/mcp/command.ts +0 -47
  774. package/src/resources/mcp/index.ts +0 -17
  775. package/src/resources/mcp/mcp.ts +0 -519
  776. package/src/resources/mcp.ts +0 -3
  777. package/src/resources/org/api-key.ts +0 -30
  778. package/src/resources/org/index.ts +0 -12
  779. package/src/resources/org/org.ts +0 -39
  780. package/src/resources/org/project/api-keys.ts +0 -156
  781. package/src/resources/org/project/index.ts +0 -35
  782. package/src/resources/org/project/project.ts +0 -206
  783. package/src/resources/org/project/trigger.ts +0 -95
  784. package/src/resources/org/project/webhook.ts +0 -131
  785. package/src/resources/org/project.ts +0 -3
  786. package/src/resources/org.ts +0 -3
  787. package/src/resources/team-members.ts +0 -111
  788. package/src/resources/toolkits.ts +0 -232
  789. package/src/resources/tools.ts +0 -319
  790. package/src/resources/trigger-instances/handle.ts +0 -45
  791. package/src/resources/trigger-instances/index.ts +0 -19
  792. package/src/resources/trigger-instances/trigger-instances.ts +0 -202
  793. package/src/resources/trigger-instances.ts +0 -3
  794. package/src/resources/trigger.ts +0 -108
  795. package/src/resources/triggers-types.ts +0 -105
  796. package/src/resources.ts +0 -1
  797. package/src/tsconfig.json +0 -11
  798. package/src/uploads.ts +0 -2
  799. package/src/version.ts +0 -1
  800. package/uploads.d.mts +0 -2
  801. package/uploads.d.mts.map +0 -1
  802. package/uploads.d.ts +0 -2
  803. package/uploads.d.ts.map +0 -1
  804. package/uploads.js +0 -19
  805. package/uploads.js.map +0 -1
  806. package/uploads.mjs +0 -2
  807. package/uploads.mjs.map +0 -1
  808. package/version.d.mts +0 -2
  809. package/version.d.mts.map +0 -1
  810. package/version.d.ts +0 -2
  811. package/version.d.ts.map +0 -1
  812. package/version.js +0 -5
  813. package/version.js.map +0 -1
  814. package/version.mjs +0 -2
  815. package/version.mjs.map +0 -1
package/dist/index.mjs ADDED
@@ -0,0 +1,1219 @@
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";
23
+
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
+ //#region src/compat/generated-resource-wiring.ts
941
+ 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)
961
+ });
962
+
963
+ //#endregion
964
+ //#region src/version.ts
965
+ const VERSION = "2.0.0-rc.2";
966
+
967
+ //#endregion
968
+ //#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 {}
981
+ try {
982
+ return globals.Deno?.env?.get?.(name)?.trim() || void 0;
983
+ } catch {}
984
+ };
985
+ /** Severity order: a record at or below the configured level is emitted. */
986
+ const LOG_LEVELS = {
987
+ off: 0,
988
+ error: 1,
989
+ warn: 2,
990
+ info: 3,
991
+ debug: 4
992
+ };
993
+ /**
994
+ * `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
996
+ * the default rather than silencing the client or making it shout.
997
+ */
998
+ const isLogLevel = (value) => value !== void 0 && Object.hasOwn(LOG_LEVELS, value);
999
+ var Composio = class Composio {
1000
+ apiKey;
1001
+ userApiKey;
1002
+ orgApiKey;
1003
+ baseURL;
1004
+ maxRetries;
1005
+ timeout;
1006
+ logger;
1007
+ logLevel;
1008
+ fetchOptions;
1009
+ #fetch;
1010
+ #options;
1011
+ /**
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.
1024
+ */
1025
+ #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;
1041
+ 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
+ }
1056
+ this.#options = options;
1057
+ this.apiKey = apiKey;
1058
+ this.userApiKey = userApiKey;
1059
+ this.orgApiKey = orgApiKey;
1060
+ assertCredentialTransport(this.baseURL, this.#credentials());
1061
+ Object.assign(this, createClientResources(this));
1062
+ }
1063
+ /** Returns a new client reusing the current options with `options` merged over them. */
1064
+ withOptions(options) {
1065
+ const client = new this.constructor({
1066
+ ...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
+ });
1080
+ client.#deprecationSeen = this.#deprecationSeen;
1081
+ return client;
1082
+ }
1083
+ get(path, opts) {
1084
+ return this.#methodRequest("get", path, opts);
1085
+ }
1086
+ post(path, opts) {
1087
+ return this.#methodRequest("post", path, opts);
1088
+ }
1089
+ patch(path, opts) {
1090
+ return this.#methodRequest("patch", path, opts);
1091
+ }
1092
+ put(path, opts) {
1093
+ return this.#methodRequest("put", path, opts);
1094
+ }
1095
+ delete(path, opts) {
1096
+ return this.#methodRequest("delete", path, opts);
1097
+ }
1098
+ #methodRequest(method, path, opts) {
1099
+ return this.request({
1100
+ method,
1101
+ path,
1102
+ ...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
+ };
1115
+ }
1116
+ #onKernelLog = (level, message, metadata) => {
1117
+ this.#emitLog(level, message, metadata);
1118
+ };
1119
+ #onKernelResponse = (response, options) => {
1120
+ inspectDeprecation({
1121
+ response,
1122
+ method: options.method,
1123
+ path: options.path,
1124
+ baseURL: this.baseURL,
1125
+ operations: GENERATED_OPERATIONS,
1126
+ seen: this.#deprecationSeen,
1127
+ warn: (message) => {
1128
+ this.#emitLog("warn", message);
1129
+ }
1130
+ });
1131
+ };
1132
+ #onKernelRequest = (operation, query, body, headers) => {
1133
+ inspectDeprecatedInputs({
1134
+ operation,
1135
+ query,
1136
+ body,
1137
+ headers,
1138
+ table: GENERATED_DEPRECATED_INPUTS,
1139
+ seen: this.#deprecationSeen,
1140
+ warn: (message) => {
1141
+ this.#emitLog("warn", message);
1142
+ }
1143
+ });
1144
+ };
1145
+ #kernelConfig() {
1146
+ const configuredLogLevel = isLogLevel(this.logLevel) ? this.logLevel : "warn";
1147
+ const lifecycleLoggingEnabled = LOG_LEVELS[configuredLogLevel] >= LOG_LEVELS.info;
1148
+ return {
1149
+ baseURL: this.baseURL,
1150
+ credentials: this.#credentials(),
1151
+ operations: GENERATED_OPERATIONS,
1152
+ maxRetries: this.maxRetries,
1153
+ timeout: this.timeout,
1154
+ userAgent: `${this.constructor.name}/JS ${VERSION}`,
1155
+ fetch: this.#fetch,
1156
+ defaultHeaders: this.#options.defaultHeaders,
1157
+ defaultQuery: this.#options.defaultQuery,
1158
+ fetchOptions: this.fetchOptions,
1159
+ ...lifecycleLoggingEnabled ? { onLog: this.#onKernelLog } : {},
1160
+ onResponse: this.#onKernelResponse,
1161
+ onRequest: this.#onKernelRequest
1162
+ };
1163
+ }
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
+ #emitLog(level, message, ...details) {
1174
+ const configured = isLogLevel(this.logLevel) ? this.logLevel : "warn";
1175
+ if (LOG_LEVELS[configured] < LOG_LEVELS[level]) return;
1176
+ try {
1177
+ const sink = this.logger[level];
1178
+ if (typeof sink !== "function") return;
1179
+ sink.call(this.logger, message, ...details);
1180
+ } catch {}
1181
+ }
1182
+ static Composio = this;
1183
+ static DEFAULT_TIMEOUT = 6e4;
1184
+ static ComposioError = ComposioError;
1185
+ static APIError = APIError;
1186
+ static APIConnectionError = APIConnectionError;
1187
+ static APIConnectionTimeoutError = APIConnectionTimeoutError;
1188
+ static APIUserAbortError = APIUserAbortError;
1189
+ static NotFoundError = NotFoundError;
1190
+ static ConflictError = ConflictError;
1191
+ static RateLimitError = RateLimitError;
1192
+ static BadRequestError = BadRequestError;
1193
+ static AuthenticationError = AuthenticationError;
1194
+ static InternalServerError = InternalServerError;
1195
+ static PermissionDeniedError = PermissionDeniedError;
1196
+ static UnprocessableEntityError = UnprocessableEntityError;
1197
+ };
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
+
1218
+ //#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 };