@composio/client 2.0.0-rc.19 → 2.0.0-rc.20

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 (178) hide show
  1. package/README.md +19 -6
  2. package/dist/{session-configs-BLy_O6bX.d.mts → api-key-revocation-DUHNHxSZ.d.mts} +177 -1205
  3. package/dist/effect.d.mts +3 -3
  4. package/dist/effect.mjs +4 -4
  5. package/dist/{generated-deprecated-inputs-Dy_lBver.mjs → environments-BGA2C5nZ.mjs} +18 -2
  6. package/dist/environments-xPjIJ-r7.d.mts +19 -0
  7. package/dist/{generated-operations-Dv7pAKDT.mjs → generated-operations-DhZryVXy.mjs} +1 -1
  8. package/dist/index.d.mts +3 -3
  9. package/dist/index.mjs +46 -71
  10. package/dist/resources/api-key-revocation.d.mts +2 -2
  11. package/dist/resources/api-key-revocation.mjs +13 -2
  12. package/dist/resources/auth/auth.d.mts +2 -2
  13. package/dist/resources/auth/auth.mjs +7 -2
  14. package/dist/resources/auth/session.d.mts +2 -2
  15. package/dist/resources/auth/session.mjs +10 -2
  16. package/dist/resources/auth-configs.d.mts +2 -2
  17. package/dist/resources/auth-configs.mjs +45 -2
  18. package/dist/resources/auth.d.mts +2 -2
  19. package/dist/resources/auth.mjs +1 -5
  20. package/dist/resources/cli/cli.d.mts +2 -2
  21. package/dist/resources/cli/cli.mjs +32 -2
  22. package/dist/resources/cli/realtime.d.mts +2 -2
  23. package/dist/resources/cli/realtime.mjs +19 -2
  24. package/dist/resources/cli.d.mts +2 -2
  25. package/dist/resources/cli.mjs +1 -5
  26. package/dist/resources/connected-accounts.d.mts +2 -2
  27. package/dist/resources/connected-accounts.mjs +70 -2
  28. package/dist/resources/custom.d.mts +2 -2
  29. package/dist/resources/custom.mjs +29 -2
  30. package/dist/resources/files.d.mts +2 -2
  31. package/dist/resources/files.mjs +22 -2
  32. package/dist/resources/keyring.d.mts +2 -2
  33. package/dist/resources/keyring.mjs +10 -2
  34. package/dist/resources/link.d.mts +2 -2
  35. package/dist/resources/link.mjs +13 -2
  36. package/dist/resources/logs/logs.d.mts +2 -2
  37. package/dist/resources/logs/logs.mjs +23 -2
  38. package/dist/resources/logs/tools.d.mts +2 -2
  39. package/dist/resources/logs/tools.mjs +23 -2
  40. package/dist/resources/logs/triggers.d.mts +2 -2
  41. package/dist/resources/logs/triggers.mjs +19 -2
  42. package/dist/resources/logs.d.mts +2 -2
  43. package/dist/resources/logs.mjs +1 -6
  44. package/dist/resources/mcp/custom.d.mts +2 -2
  45. package/dist/resources/mcp/custom.mjs +13 -2
  46. package/dist/resources/mcp/generate.d.mts +2 -2
  47. package/dist/resources/mcp/generate.mjs +13 -2
  48. package/dist/resources/mcp/mcp.d.mts +2 -2
  49. package/dist/resources/mcp/mcp.mjs +67 -2
  50. package/dist/resources/mcp.d.mts +2 -2
  51. package/dist/resources/mcp.mjs +1 -6
  52. package/dist/resources/org/clanker.d.mts +2 -2
  53. package/dist/resources/org/clanker.mjs +13 -2
  54. package/dist/resources/org/consumer/consumer.d.mts +2 -2
  55. package/dist/resources/org/consumer/consumer.mjs +21 -2
  56. package/dist/resources/org/consumer/project.d.mts +2 -2
  57. package/dist/resources/org/consumer/project.mjs +14 -2
  58. package/dist/resources/org/consumer.d.mts +2 -2
  59. package/dist/resources/org/consumer.mjs +1 -5
  60. package/dist/resources/org/org.d.mts +2 -2
  61. package/dist/resources/org/org.mjs +25 -2
  62. package/dist/resources/org/owner/owner.d.mts +2 -2
  63. package/dist/resources/org/owner/owner.mjs +7 -2
  64. package/dist/resources/org/owner/project.d.mts +2 -2
  65. package/dist/resources/org/owner/project.mjs +37 -2
  66. package/dist/resources/org/owner.d.mts +2 -2
  67. package/dist/resources/org/owner.mjs +1 -5
  68. package/dist/resources/org/project.d.mts +2 -2
  69. package/dist/resources/org/project.mjs +13 -2
  70. package/dist/resources/org/usage.d.mts +2 -2
  71. package/dist/resources/org/usage.mjs +22 -2
  72. package/dist/resources/org.d.mts +2 -2
  73. package/dist/resources/org.mjs +1 -9
  74. package/dist/resources/project/project.d.mts +2 -2
  75. package/dist/resources/project/project.mjs +7 -2
  76. package/dist/resources/project/usage.d.mts +2 -2
  77. package/dist/resources/project/usage.mjs +22 -2
  78. package/dist/resources/project.d.mts +2 -3
  79. package/dist/resources/project.mjs +1 -5
  80. package/dist/resources/session-configs.d.mts +2 -2
  81. package/dist/resources/session-configs.mjs +8 -12
  82. package/dist/resources/tool-router/session/files.d.mts +2 -2
  83. package/dist/resources/tool-router/session/files.mjs +40 -2
  84. package/dist/resources/tool-router/session/session.d.mts +2 -2
  85. package/dist/resources/tool-router/session/session.mjs +95 -2
  86. package/dist/resources/tool-router/session.d.mts +2 -2
  87. package/dist/resources/tool-router/session.mjs +1 -5
  88. package/dist/resources/tool-router/tool-router.d.mts +2 -2
  89. package/dist/resources/tool-router/tool-router.mjs +7 -2
  90. package/dist/resources/tool-router.d.mts +2 -2
  91. package/dist/resources/tool-router.mjs +1 -5
  92. package/dist/resources/toolkits.d.mts +2 -2
  93. package/dist/resources/toolkits.mjs +51 -2
  94. package/dist/resources/tools.d.mts +2 -2
  95. package/dist/resources/tools.mjs +56 -2
  96. package/dist/resources/trigger-instances/manage.d.mts +2 -2
  97. package/dist/resources/trigger-instances/manage.mjs +19 -2
  98. package/dist/resources/trigger-instances/trigger-instances.d.mts +2 -2
  99. package/dist/resources/trigger-instances/trigger-instances.mjs +24 -2
  100. package/dist/resources/trigger-instances.d.mts +2 -2
  101. package/dist/resources/trigger-instances.mjs +1 -5
  102. package/dist/resources/triggers-types.d.mts +2 -2
  103. package/dist/resources/triggers-types.mjs +26 -2
  104. package/dist/resources/webhook-endpoints.d.mts +2 -2
  105. package/dist/resources/webhook-endpoints.mjs +40 -2
  106. package/dist/resources/webhook-subscriptions.d.mts +2 -2
  107. package/dist/resources/webhook-subscriptions.mjs +45 -2
  108. package/package.json +2 -31
  109. package/dist/api-key-revocation-DMCgun-A.mjs +0 -25
  110. package/dist/auth-D-U9Aq8C.mjs +0 -17
  111. package/dist/auth-configs-DAG5mMeH.mjs +0 -55
  112. package/dist/clanker-Yomp86hJ.mjs +0 -24
  113. package/dist/cli-zihiw3aI.mjs +0 -44
  114. package/dist/config-BLBbhLe1.mjs +0 -10
  115. package/dist/config-DnyMhILW.d.mts +0 -9
  116. package/dist/connected-accounts-Bd4AbWoH.mjs +0 -83
  117. package/dist/consumer-Bk0cyIii.mjs +0 -33
  118. package/dist/custom-Ce8G2c11.mjs +0 -34
  119. package/dist/custom-DWT3cCog.mjs +0 -24
  120. package/dist/files-DRp_J4zH.mjs +0 -49
  121. package/dist/files-ZxEVlE_y.mjs +0 -31
  122. package/dist/generate-Du9XUrlx.mjs +0 -24
  123. package/dist/keyring-CgOIS5x7.mjs +0 -17
  124. package/dist/link-CW1ts4pm.mjs +0 -23
  125. package/dist/logs-DFdH5DoT.mjs +0 -37
  126. package/dist/manage-CeB03gO8.mjs +0 -28
  127. package/dist/mcp-DNRMWWum.mjs +0 -91
  128. package/dist/migration-CBhnoN-Y.mjs +0 -10
  129. package/dist/migration-CKGKuRO3.d.mts +0 -9
  130. package/dist/org-HuYaKgVf.mjs +0 -45
  131. package/dist/owner-I9fXmIO_.mjs +0 -17
  132. package/dist/project-CxQ2H8UB.mjs +0 -22
  133. package/dist/project-DcV01umC.mjs +0 -25
  134. package/dist/project-Dwblmpw8.mjs +0 -47
  135. package/dist/project-FuP5k9R1.mjs +0 -25
  136. package/dist/realtime-F_sGuTd8.mjs +0 -28
  137. package/dist/resources/auth/index.d.mts +0 -2
  138. package/dist/resources/auth/index.mjs +0 -4
  139. package/dist/resources/cli/index.d.mts +0 -2
  140. package/dist/resources/cli/index.mjs +0 -4
  141. package/dist/resources/index.d.mts +0 -3
  142. package/dist/resources/index.mjs +0 -16
  143. package/dist/resources/logs/index.d.mts +0 -2
  144. package/dist/resources/logs/index.mjs +0 -5
  145. package/dist/resources/mcp/index.d.mts +0 -2
  146. package/dist/resources/mcp/index.mjs +0 -5
  147. package/dist/resources/migration.d.mts +0 -2
  148. package/dist/resources/migration.mjs +0 -3
  149. package/dist/resources/org/consumer/index.d.mts +0 -2
  150. package/dist/resources/org/consumer/index.mjs +0 -4
  151. package/dist/resources/org/index.d.mts +0 -2
  152. package/dist/resources/org/index.mjs +0 -8
  153. package/dist/resources/org/owner/index.d.mts +0 -2
  154. package/dist/resources/org/owner/index.mjs +0 -4
  155. package/dist/resources/project/config.d.mts +0 -2
  156. package/dist/resources/project/config.mjs +0 -3
  157. package/dist/resources/project/index.d.mts +0 -3
  158. package/dist/resources/project/index.mjs +0 -4
  159. package/dist/resources/tool-router/index.d.mts +0 -2
  160. package/dist/resources/tool-router/index.mjs +0 -4
  161. package/dist/resources/tool-router/session/index.d.mts +0 -2
  162. package/dist/resources/tool-router/session/index.mjs +0 -4
  163. package/dist/resources/trigger-instances/index.d.mts +0 -2
  164. package/dist/resources/trigger-instances/index.mjs +0 -4
  165. package/dist/session-B-ifOjVv.mjs +0 -21
  166. package/dist/session-CpwJh7Hn.mjs +0 -110
  167. package/dist/tool-router-jNsaldKV.mjs +0 -14
  168. package/dist/toolkits-DK4My9FW.mjs +0 -62
  169. package/dist/tools-DNkimllW.mjs +0 -33
  170. package/dist/tools-Gun_2We6.mjs +0 -69
  171. package/dist/trigger-instances-vvKswQSW.mjs +0 -35
  172. package/dist/triggers-CfrGxKIo.mjs +0 -28
  173. package/dist/triggers-types-DYW2Mr8z.mjs +0 -34
  174. package/dist/usage-YIBYNpVF.mjs +0 -31
  175. package/dist/usage-vt9HmnNf.mjs +0 -31
  176. package/dist/version-DB98yI2B.d.mts +0 -4
  177. package/dist/webhook-endpoints-HqLteVW6.mjs +0 -50
  178. package/dist/webhook-subscriptions-CXhNXIOM.mjs +0 -55
package/README.md CHANGED
@@ -6,7 +6,7 @@ This repo is the successor to the Stainless-generated [`@composio/client`](https
6
6
 
7
7
  ## Usage
8
8
 
9
- The package root is the Promise client: `new Composio({ auth })`, the Stainless type names, and throwing `APIPromise` semantics (shipped via UXE-163/UXE-164).
9
+ The package root is the Promise client: `new Composio({ auth })`, the params and response type names, and throwing `APIPromise` semantics (shipped via UXE-163/UXE-164).
10
10
 
11
11
  ```ts
12
12
  import Composio, { Auth } from '@composio/client'
@@ -157,7 +157,7 @@ input. All 113 operations of the spec are there.
157
157
  pnpm add @composio/client effect
158
158
  ```
159
159
 
160
- `effect` is an optional peer dependency. The root entry and the `./pagination` and `./resources`
160
+ `effect` is an optional peer dependency. The root entry and the `./pagination` and `./resources/*`
161
161
  subpaths never import it and load without it.
162
162
 
163
163
  - **Supported range: `effect >=4.0.3 <4.1.0`.** The manifest declares the peer as `*`, because a
@@ -216,8 +216,7 @@ when `decode: true` is given without `schemas`. A credential provider that fails
216
216
  something a header cannot carry, fails the call with a `ConfigurationError` before anything is sent.
217
217
 
218
218
  The resources are plain objects of functions, not classes, so a method can be passed around without
219
- binding. One thing on the root client has no counterpart here: the resources that hold no operation
220
- (`migration`, `project.config`).
219
+ binding. The root client's resources are the same since rc.20.
221
220
 
222
221
  ### Errors
223
222
 
@@ -543,6 +542,20 @@ The opt-in records the resolved scheme, hostname, and port. Mutating `baseURL` c
543
542
  and `withOptions({ baseURL: ... })` requires `allowInsecureHTTP: true` again when the origin
544
543
  changes. Redirects to another origin remain credential-free.
545
544
 
545
+ ### Removed in 2.0.0-rc.20
546
+
547
+ The Stainless structure goes. The two removal classes are declared rule entries in
548
+ `packages/codegen/assignability-ledger.json`; the export spellings are held by `pnpm test:pack`.
549
+
550
+ | Removed | Migration |
551
+ | --- | --- |
552
+ | Resource classes (`ToolRouter`, `Tools`, `ConnectedAccounts`, ... as values) and `Composio.Tools`-style statics | A resource is a plain object typed by an interface of the same name. `import type { Tools } from '@composio/client/resources/tools'` still works as a type; `Composio['tools']` is the same type. `instanceof` a resource class has no replacement |
553
+ | Namespace-merged nested types (`SessionToolkitsResponse.Item`, `LinkCreateParams.Experimental`) | Indexed access: `SessionToolkitsResponse['items'][number]`, `NonNullable<LinkCreateParams['experimental']>` |
554
+ | The `Composio` namespace (`Composio.RequestOptions`, `Composio.ToolListResponse`, ...) | Import the type: `import type { RequestOptions } from '@composio/client'`, `import type { ToolListResponse } from '@composio/client/resources/tools'` |
555
+ | `@composio/client/resources`, `/resources.js`, `/resources.mjs`, `/resources/index` | The resource's own subpath: `@composio/client/resources/mcp` |
556
+ | `.js` and `.mjs` deep subpaths (`/resources/tool-router/session/session.mjs`), `/pagination.js`, `/pagination.mjs` | The extensionless spelling: `/resources/tool-router/session/session`, `/pagination` |
557
+ | `client.migration`, `client.project.config` | None: neither held an operation |
558
+
546
559
  ### Removed in 2.0.0-rc.19
547
560
 
548
561
  The two option removals are declared entries in `packages/codegen/assignability-ledger.json`. The
@@ -550,7 +563,7 @@ other rows are class members the type check does not pin, listed so an upgrade c
550
563
 
551
564
  | Removed | Migration |
552
565
  | --- | --- |
553
- | `environment: 'production' \| 'staging' \| 'local'` (root `ClientOptions`) | `baseURL: 'https://staging-backend.composio.dev'` or `'http://localhost:9900'`; omitting it means production |
566
+ | `environment: 'production' \| 'staging' \| 'local'` (root `ClientOptions`) | `baseURL: ENVIRONMENTS.staging` or `ENVIRONMENTS.local` — the frozen origin table, exported since rc.20; omitting it means production |
554
567
  | `Logger` (exported interface) | `logger` takes a `Console`-shaped object (`Pick<Console, 'debug' \| 'info' \| 'warn' \| 'error'>`) and defaults to `console`. An adapter that forwards to another logger is the same four methods |
555
568
  | `client.apiKey`, `userApiKey`, `orgApiKey` (read-only since rc.18) | Keep your own copy of the key; `client.authMode` says which mode is configured |
556
569
  | `client.logger` | None: the sink is the client's own. Pass a different one to `withOptions({ logger })` |
@@ -621,7 +634,7 @@ pnpm test # unit tests (MSW mocks) + codegen tests
621
634
  pnpm build # tsdown → dist/ (runs publint + arethetypeswrong)
622
635
  pnpm test:pack # pack the real tarball, typecheck + import every drop-in subpath
623
636
  pnpm benchmark:baseline # capture the dist/ a benchmark run compares against
624
- pnpm benchmark # score SDK overhead against that baseline and against Stainless
637
+ pnpm benchmark # score SDK overhead against that baseline
625
638
  pnpm benchmark:import # time what importing each entry costs, on Node and Bun
626
639
  pnpm test:contract # live API tests; requires COMPOSIO_API_KEY (copy .env.example to .env)
627
640
  pnpm refresh-spec # re-fetch spec/openapi.json from the live backend