@composio/client 2.0.0-rc.18 → 2.0.0-rc.19
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.
- package/README.md +36 -14
- package/dist/{api-key-revocation-JkA4sOGH.mjs → api-key-revocation-DMCgun-A.mjs} +1 -1
- package/dist/{auth-B_K-wdMm.mjs → auth-D-U9Aq8C.mjs} +1 -1
- package/dist/{auth-configs-RAgN782Z.mjs → auth-configs-DAG5mMeH.mjs} +1 -1
- package/dist/{clanker-Pgyyh95r.mjs → clanker-Yomp86hJ.mjs} +1 -1
- package/dist/{cli-Ca5bRiEN.mjs → cli-zihiw3aI.mjs} +2 -2
- package/dist/{connected-accounts-D6NTwvbi.mjs → connected-accounts-Bd4AbWoH.mjs} +1 -1
- package/dist/{consumer-BP4OyJS0.mjs → consumer-Bk0cyIii.mjs} +2 -2
- package/dist/{custom-DA3ABHnI.mjs → custom-Ce8G2c11.mjs} +1 -1
- package/dist/{custom-BBr7KbCv.mjs → custom-DWT3cCog.mjs} +1 -1
- package/dist/effect.d.mts +16 -60
- package/dist/effect.mjs +146 -182
- package/dist/{files-CeBs4ZE1.mjs → files-DRp_J4zH.mjs} +1 -1
- package/dist/{files-DLRmNLRD.mjs → files-ZxEVlE_y.mjs} +1 -1
- package/dist/{generate-16uLPwUU.mjs → generate-Du9XUrlx.mjs} +1 -1
- package/dist/{generated-deprecated-inputs-zx6ml908.mjs → generated-deprecated-inputs-Dy_lBver.mjs} +1 -1
- package/dist/{generated-operations-DKgGT6Dg.mjs → generated-operations-Dv7pAKDT.mjs} +150 -250
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +60 -140
- package/dist/{keyring-Q8GSieAv.mjs → keyring-CgOIS5x7.mjs} +1 -1
- package/dist/{link-D4dY_eaN.mjs → link-CW1ts4pm.mjs} +1 -1
- package/dist/{logs-Dc63Ju74.mjs → logs-DFdH5DoT.mjs} +3 -3
- package/dist/{manage-ByF6b3OD.mjs → manage-CeB03gO8.mjs} +1 -1
- package/dist/{mcp-Cw7-Mtkm.mjs → mcp-DNRMWWum.mjs} +3 -3
- package/dist/{org-RRUxKfRw.mjs → org-HuYaKgVf.mjs} +6 -6
- package/dist/{owner-GZX-sp-h.mjs → owner-I9fXmIO_.mjs} +1 -1
- package/dist/{project-Cj9ULE0a.mjs → project-CxQ2H8UB.mjs} +1 -1
- package/dist/{project-C_YZ-eLI.mjs → project-DcV01umC.mjs} +1 -1
- package/dist/{project-BsKmk9T7.mjs → project-Dwblmpw8.mjs} +1 -1
- package/dist/{project-C1uq7bV_.mjs → project-FuP5k9R1.mjs} +1 -1
- package/dist/{realtime-W-lJ0Vcs.mjs → realtime-F_sGuTd8.mjs} +1 -1
- package/dist/resources/api-key-revocation.d.mts +1 -1
- package/dist/resources/api-key-revocation.mjs +1 -1
- package/dist/resources/auth/auth.d.mts +1 -1
- package/dist/resources/auth/auth.mjs +1 -1
- package/dist/resources/auth/index.d.mts +1 -1
- package/dist/resources/auth/index.mjs +2 -2
- package/dist/resources/auth/session.d.mts +1 -1
- package/dist/resources/auth/session.mjs +1 -1
- package/dist/resources/auth-configs.d.mts +1 -1
- package/dist/resources/auth-configs.mjs +1 -1
- package/dist/resources/auth.d.mts +1 -1
- package/dist/resources/auth.mjs +2 -2
- package/dist/resources/cli/cli.d.mts +1 -1
- package/dist/resources/cli/cli.mjs +1 -1
- package/dist/resources/cli/index.d.mts +1 -1
- package/dist/resources/cli/index.mjs +2 -2
- package/dist/resources/cli/realtime.d.mts +1 -1
- package/dist/resources/cli/realtime.mjs +1 -1
- package/dist/resources/cli.d.mts +1 -1
- package/dist/resources/cli.mjs +2 -2
- package/dist/resources/connected-accounts.d.mts +1 -1
- package/dist/resources/connected-accounts.mjs +1 -1
- package/dist/resources/custom.d.mts +1 -1
- package/dist/resources/custom.mjs +1 -1
- package/dist/resources/files.d.mts +1 -1
- package/dist/resources/files.mjs +1 -1
- package/dist/resources/index.d.mts +1 -1
- package/dist/resources/index.mjs +13 -13
- package/dist/resources/keyring.d.mts +1 -1
- package/dist/resources/keyring.mjs +1 -1
- package/dist/resources/link.d.mts +1 -1
- package/dist/resources/link.mjs +1 -1
- package/dist/resources/logs/index.d.mts +1 -1
- package/dist/resources/logs/index.mjs +3 -3
- package/dist/resources/logs/logs.d.mts +1 -1
- package/dist/resources/logs/logs.mjs +1 -1
- package/dist/resources/logs/tools.d.mts +1 -1
- package/dist/resources/logs/tools.mjs +1 -1
- package/dist/resources/logs/triggers.d.mts +1 -1
- package/dist/resources/logs/triggers.mjs +1 -1
- package/dist/resources/logs.d.mts +1 -1
- package/dist/resources/logs.mjs +3 -3
- package/dist/resources/mcp/custom.d.mts +1 -1
- package/dist/resources/mcp/custom.mjs +1 -1
- package/dist/resources/mcp/generate.d.mts +1 -1
- package/dist/resources/mcp/generate.mjs +1 -1
- package/dist/resources/mcp/index.d.mts +1 -1
- package/dist/resources/mcp/index.mjs +3 -3
- package/dist/resources/mcp/mcp.d.mts +1 -1
- package/dist/resources/mcp/mcp.mjs +1 -1
- package/dist/resources/mcp.d.mts +1 -1
- package/dist/resources/mcp.mjs +3 -3
- package/dist/resources/org/clanker.d.mts +1 -1
- package/dist/resources/org/clanker.mjs +1 -1
- package/dist/resources/org/consumer/consumer.d.mts +1 -1
- package/dist/resources/org/consumer/consumer.mjs +1 -1
- package/dist/resources/org/consumer/index.d.mts +1 -1
- package/dist/resources/org/consumer/index.mjs +2 -2
- package/dist/resources/org/consumer/project.d.mts +1 -1
- package/dist/resources/org/consumer/project.mjs +1 -1
- package/dist/resources/org/consumer.d.mts +1 -1
- package/dist/resources/org/consumer.mjs +2 -2
- package/dist/resources/org/index.d.mts +1 -1
- package/dist/resources/org/index.mjs +6 -6
- package/dist/resources/org/org.d.mts +1 -1
- package/dist/resources/org/org.mjs +1 -1
- package/dist/resources/org/owner/index.d.mts +1 -1
- package/dist/resources/org/owner/index.mjs +2 -2
- package/dist/resources/org/owner/owner.d.mts +1 -1
- package/dist/resources/org/owner/owner.mjs +1 -1
- package/dist/resources/org/owner/project.d.mts +1 -1
- package/dist/resources/org/owner/project.mjs +1 -1
- package/dist/resources/org/owner.d.mts +1 -1
- package/dist/resources/org/owner.mjs +2 -2
- package/dist/resources/org/project.d.mts +1 -1
- package/dist/resources/org/project.mjs +1 -1
- package/dist/resources/org/usage.d.mts +1 -1
- package/dist/resources/org/usage.mjs +1 -1
- package/dist/resources/org.d.mts +1 -1
- package/dist/resources/org.mjs +6 -6
- package/dist/resources/project/index.d.mts +1 -1
- package/dist/resources/project/index.mjs +1 -1
- package/dist/resources/project/project.d.mts +1 -1
- package/dist/resources/project/project.mjs +1 -1
- package/dist/resources/project/usage.d.mts +1 -1
- package/dist/resources/project/usage.mjs +1 -1
- package/dist/resources/project.d.mts +1 -1
- package/dist/resources/project.mjs +1 -1
- package/dist/resources/session-configs.d.mts +1 -1
- package/dist/resources/session-configs.mjs +1 -1
- package/dist/resources/tool-router/index.d.mts +1 -1
- package/dist/resources/tool-router/index.mjs +2 -2
- package/dist/resources/tool-router/session/files.d.mts +1 -1
- package/dist/resources/tool-router/session/files.mjs +1 -1
- package/dist/resources/tool-router/session/index.d.mts +1 -1
- package/dist/resources/tool-router/session/index.mjs +2 -2
- package/dist/resources/tool-router/session/session.d.mts +1 -1
- package/dist/resources/tool-router/session/session.mjs +1 -1
- package/dist/resources/tool-router/session.d.mts +1 -1
- package/dist/resources/tool-router/session.mjs +2 -2
- package/dist/resources/tool-router/tool-router.d.mts +1 -1
- package/dist/resources/tool-router/tool-router.mjs +1 -1
- package/dist/resources/tool-router.d.mts +1 -1
- package/dist/resources/tool-router.mjs +2 -2
- package/dist/resources/toolkits.d.mts +1 -1
- package/dist/resources/toolkits.mjs +1 -1
- package/dist/resources/tools.d.mts +1 -1
- package/dist/resources/tools.mjs +1 -1
- package/dist/resources/trigger-instances/index.d.mts +1 -1
- package/dist/resources/trigger-instances/index.mjs +2 -2
- package/dist/resources/trigger-instances/manage.d.mts +1 -1
- package/dist/resources/trigger-instances/manage.mjs +1 -1
- package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
- package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
- package/dist/resources/trigger-instances.d.mts +1 -1
- package/dist/resources/trigger-instances.mjs +2 -2
- package/dist/resources/triggers-types.d.mts +1 -1
- package/dist/resources/triggers-types.mjs +1 -1
- package/dist/resources/webhook-endpoints.d.mts +1 -1
- package/dist/resources/webhook-endpoints.mjs +1 -1
- package/dist/resources/webhook-subscriptions.d.mts +1 -1
- package/dist/resources/webhook-subscriptions.mjs +1 -1
- package/dist/{session-BT5NJfbm.mjs → session-B-ifOjVv.mjs} +1 -1
- package/dist/{session-BmXeclWC.mjs → session-CpwJh7Hn.mjs} +2 -2
- package/dist/{session-configs-x3OA4CSe.d.mts → session-configs-BLy_O6bX.d.mts} +21 -101
- package/dist/{tool-router-DYPUf-fN.mjs → tool-router-jNsaldKV.mjs} +1 -1
- package/dist/{toolkits-DZOZDm-4.mjs → toolkits-DK4My9FW.mjs} +1 -1
- package/dist/{tools-C0GjPEpP.mjs → tools-DNkimllW.mjs} +1 -1
- package/dist/{tools-BDCRk80t.mjs → tools-Gun_2We6.mjs} +1 -1
- package/dist/{trigger-instances-J5frdgzO.mjs → trigger-instances-vvKswQSW.mjs} +2 -2
- package/dist/{triggers-CnvE7y0L.mjs → triggers-CfrGxKIo.mjs} +1 -1
- package/dist/{triggers-types-DLVCtuwC.mjs → triggers-types-DYW2Mr8z.mjs} +1 -1
- package/dist/{usage-DjQg9WIV.mjs → usage-YIBYNpVF.mjs} +1 -1
- package/dist/{usage-DPxuivP6.mjs → usage-vt9HmnNf.mjs} +1 -1
- package/dist/version-DB98yI2B.d.mts +4 -0
- package/dist/{webhook-endpoints-BrSjXOf0.mjs → webhook-endpoints-HqLteVW6.mjs} +1 -1
- package/dist/{webhook-subscriptions-HT1acmwH.mjs → webhook-subscriptions-CXhNXIOM.mjs} +1 -1
- package/package.json +2 -2
- package/dist/version-DEAhxVwC.d.mts +0 -4
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ The constructor reads nothing from the process. `Composio.fromEnv` is the one re
|
|
|
110
110
|
environment, and it reads the mapping it is handed:
|
|
111
111
|
|
|
112
112
|
```ts
|
|
113
|
-
const composio = Composio.fromEnv(process.env, {
|
|
113
|
+
const composio = Composio.fromEnv(process.env, { baseURL: 'https://staging-backend.composio.dev' })
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
`fromEnv` reads `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY` and `COMPOSIO_ORG_API_KEY` into `auth`
|
|
@@ -176,13 +176,10 @@ subpaths never import it and load without it.
|
|
|
176
176
|
```ts
|
|
177
177
|
import { Effect, Layer } from 'effect'
|
|
178
178
|
import * as FetchHttpClient from 'effect/http/FetchHttpClient'
|
|
179
|
-
import { Auth, ComposioClient, layer, layerConfig
|
|
179
|
+
import { Auth, ComposioClient, layer, layerConfig } from '@composio/client/effect'
|
|
180
180
|
|
|
181
|
-
// Explicit options, over
|
|
182
|
-
const live =
|
|
183
|
-
|
|
184
|
-
// Explicit options, over the `HttpClient` the application provides.
|
|
185
|
-
const overMyTransport = layer({ auth: Auth.project('your-api-key') }).pipe(Layer.provide(FetchHttpClient.layer))
|
|
181
|
+
// Explicit options, over the `HttpClient` the application provides; here a fetch-backed one.
|
|
182
|
+
const live = layer({ auth: Auth.project('your-api-key') }).pipe(Layer.provide(FetchHttpClient.layer))
|
|
186
183
|
|
|
187
184
|
// Options read from the `COMPOSIO_*` settings.
|
|
188
185
|
const fromConfig = layerConfig().pipe(Layer.provide(FetchHttpClient.layer))
|
|
@@ -210,8 +207,8 @@ Only `layerConfig` reads the environment. It reads `COMPOSIO_API_KEY`, `COMPOSIO
|
|
|
210
207
|
throughout, and `COMPOSIO_BASE_URL` and `COMPOSIO_ALLOW_INSECURE_HTTP=1`, through Effect's `Config`,
|
|
211
208
|
so the `ConfigProvider` in context decides where they come from; by default that is the process
|
|
212
209
|
environment. An option passed to `layerConfig` replaces the setting it names, so
|
|
213
|
-
`layerConfig({ auth: Auth.none() })` means none whatever is configured. `make
|
|
214
|
-
|
|
210
|
+
`layerConfig({ auth: Auth.none() })` means none whatever is configured. `make` and `layer` read
|
|
211
|
+
nothing.
|
|
215
212
|
|
|
216
213
|
Construction fails with a `ConfigurationError` when a credentialed origin is not HTTPS (loopback and
|
|
217
214
|
`allowInsecureHTTP` excepted, as on the root client), when a key or a header option is refused, or
|
|
@@ -421,10 +418,16 @@ the credential check does not see them, and they are not withdrawn on a cross-or
|
|
|
421
418
|
|
|
422
419
|
### Deprecation notices
|
|
423
420
|
|
|
424
|
-
|
|
425
|
-
`
|
|
426
|
-
|
|
427
|
-
|
|
421
|
+
A deprecated input, or a response carrying `Deprecation`, `Sunset` and `Link` headers, is reported
|
|
422
|
+
through `Effect.logWarning`, once per operation and notice for each client. The application's
|
|
423
|
+
`Logger` and `References.MinimumLogLevel` decide what becomes of it; there is no client option.
|
|
424
|
+
`isDeprecationNotice` recognises a notice, so a logger can drop or route the notices alone:
|
|
425
|
+
|
|
426
|
+
```ts
|
|
427
|
+
import { isDeprecationNotice } from '@composio/client/effect'
|
|
428
|
+
|
|
429
|
+
const quiet = Logger.make((options) => (isDeprecationNotice(options) ? undefined : base.log(options)))
|
|
430
|
+
```
|
|
428
431
|
|
|
429
432
|
### Raw methods
|
|
430
433
|
|
|
@@ -540,6 +543,25 @@ The opt-in records the resolved scheme, hostname, and port. Mutating `baseURL` c
|
|
|
540
543
|
and `withOptions({ baseURL: ... })` requires `allowInsecureHTTP: true` again when the origin
|
|
541
544
|
changes. Redirects to another origin remain credential-free.
|
|
542
545
|
|
|
546
|
+
### Removed in 2.0.0-rc.19
|
|
547
|
+
|
|
548
|
+
The two option removals are declared entries in `packages/codegen/assignability-ledger.json`. The
|
|
549
|
+
other rows are class members the type check does not pin, listed so an upgrade can find them.
|
|
550
|
+
|
|
551
|
+
| Removed | Migration |
|
|
552
|
+
| --- | --- |
|
|
553
|
+
| `environment: 'production' \| 'staging' \| 'local'` (root `ClientOptions`) | `baseURL: 'https://staging-backend.composio.dev'` or `'http://localhost:9900'`; omitting it means production |
|
|
554
|
+
| `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
|
+
| `client.apiKey`, `userApiKey`, `orgApiKey` (read-only since rc.18) | Keep your own copy of the key; `client.authMode` says which mode is configured |
|
|
556
|
+
| `client.logger` | None: the sink is the client's own. Pass a different one to `withOptions({ logger })` |
|
|
557
|
+
| Assigning `client.baseURL`, `maxRetries`, `timeout` or `logLevel` | `withOptions({ ... })`, which re-runs every validation. The four stay readable; `logLevel` reads the effective level (`'warn'` by default) |
|
|
558
|
+
| `deprecationNotices: 'warn' \| 'off'` (`./effect` `ComposioClientOptions`) | The application's `Logger` and `References.MinimumLogLevel`; a logger that drops records matching `isDeprecationNotice` is `'off'` |
|
|
559
|
+
| `layerFetch(options)` (`./effect`) | `layer(options).pipe(Layer.provide(FetchHttpClient.layer))` |
|
|
560
|
+
|
|
561
|
+
Python removes `default_query` and the `api_key`, `user_api_key` and `org_api_key` reads, and makes
|
|
562
|
+
`base_url`, `max_retries` and `timeout` read-only; `environment=` stays. See
|
|
563
|
+
[`python/README.md`](./python/README.md).
|
|
564
|
+
|
|
543
565
|
### Removed in 2.0.0-rc.18
|
|
544
566
|
|
|
545
567
|
Each removal is a declared entry in `packages/codegen/assignability-ledger.json`. The other rows are
|
|
@@ -556,7 +578,7 @@ behaviour the type check cannot see, listed so an upgrade can find them.
|
|
|
556
578
|
| the constructor reading `COMPOSIO_*` from the process | `Composio.fromEnv(process.env, overrides)`; nothing else reads the environment. `new Composio()` with no options is gone with it |
|
|
557
579
|
| `layerConfig({ apiKey: null })` | `layerConfig({ auth: Auth.none() })`; an override replaces the whole `auth` |
|
|
558
580
|
| `layer()`, `layerFetch()` with no options | pass the options, `auth` included |
|
|
559
|
-
| assigning `client.apiKey`, `userApiKey` or `orgApiKey` | `withOptions({ auth })`. The three fields
|
|
581
|
+
| assigning `client.apiKey`, `userApiKey` or `orgApiKey` | `withOptions({ auth })`. The three fields stayed readable until rc.19; keep your own copy of a key you need |
|
|
560
582
|
| `Credential` on `./effect` accepting `null` | `Auth.none()`. It now also accepts a function that returns a key |
|
|
561
583
|
|
|
562
584
|
Python makes the same change: `auth=ProjectAuth(key)` (and `UserAuth`, `OrganizationAuth`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as generatedOperation, y as withOperation } from "./generated-operations-
|
|
1
|
+
import { n as generatedOperation, y as withOperation } from "./generated-operations-Dv7pAKDT.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/api-key-revocation.ts
|
|
4
4
|
const OP_CREATE = generatedOperation("apiKeyRevocation.create");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as path, n as generatedOperation, y as withOperation } from "./generated-operations-
|
|
1
|
+
import { d as path, n as generatedOperation, y as withOperation } from "./generated-operations-Dv7pAKDT.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/auth-configs.ts
|
|
4
4
|
const OP_CREATE = generatedOperation("authConfigs.create");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as generatedOperation, y as withOperation } from "./generated-operations-
|
|
1
|
+
import { n as generatedOperation, y as withOperation } from "./generated-operations-Dv7pAKDT.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/org/clanker.ts
|
|
4
4
|
const OP_CREATE_CLAIM = generatedOperation("org.clanker.createClaim");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as generatedOperation, y as withOperation } from "./generated-operations-
|
|
2
|
-
import { t as Realtime } from "./realtime-
|
|
1
|
+
import { n as generatedOperation, y as withOperation } from "./generated-operations-Dv7pAKDT.mjs";
|
|
2
|
+
import { t as Realtime } from "./realtime-F_sGuTd8.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/resources/cli/cli.ts
|
|
5
5
|
const OP_CREATE_CODACT_FAILURE = generatedOperation("cli.createCodactFailure");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as path, n as generatedOperation, y as withOperation } from "./generated-operations-
|
|
1
|
+
import { d as path, n as generatedOperation, y as withOperation } from "./generated-operations-Dv7pAKDT.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/connected-accounts.ts
|
|
4
4
|
const OP_CREATE = generatedOperation("connectedAccounts.create");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as generatedOperation, y as withOperation } from "./generated-operations-
|
|
2
|
-
import { t as Project } from "./project-
|
|
1
|
+
import { n as generatedOperation, y as withOperation } from "./generated-operations-Dv7pAKDT.mjs";
|
|
2
|
+
import { t as Project } from "./project-DcV01umC.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/resources/org/consumer/consumer.ts
|
|
5
5
|
const OP_LIST_CONNECTED_TOOLKITS = generatedOperation("org.consumer.listConnectedToolkits");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as path, n as generatedOperation, y as withOperation } from "./generated-operations-
|
|
1
|
+
import { d as path, n as generatedOperation, y as withOperation } from "./generated-operations-Dv7pAKDT.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/custom.ts
|
|
4
4
|
const OP_DELETE_TOOLKIT = generatedOperation("custom.deleteToolkit");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as generatedOperation, y as withOperation } from "./generated-operations-
|
|
1
|
+
import { n as generatedOperation, y as withOperation } from "./generated-operations-Dv7pAKDT.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/mcp/custom.ts
|
|
4
4
|
const OP_CREATE = generatedOperation("mcp.custom.create");
|
package/dist/effect.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { t as VERSION } from "./version-
|
|
3
|
-
import { Context, Effect, Layer, Redacted, Stream } from "effect";
|
|
1
|
+
import { $ as ProjectRetrieveResponse, $n as ToolkitRetrieveMultiParams, $r as SessionDeleteResponse, $t as McpCreateInstanceResponse, Ai as AutoCredentials, An as TriggersTypeListResponse, B as ConsumerListConnectedToolkitsResponse, Bn as AuthConfigListResponse, Br as ToolRetrieveParams, C as SessionRetrieveInfoResponse, Ci as FileListParams, Cn as TriggerInstanceUpsertResponse, Cr as ConnectedAccountUpdateStatusParams, Ct as UsageRetrieveParams, Di as AuthConstructors, Dn as ManageUpdateParams, Dr as FileCreatePresignedURLResponse, Dt as LogCreateToolExecutionParams, E as OrgListResponse, En as ManageDeleteResponse, Er as FileCreatePresignedURLParams, Et as UsageRetrieveSummaryResponse, Fn as AuthConfigCreateParams, Fr as ToolListParams, Gn as AuthConfigUpdateStatusResponse, Gt as CliGetSessionParams, H as ProjectResolveParams, Hn as AuthConfigUpdateParams, Hr as ToolRetrieveRequiredScopesResponse, Ht as CliCreateCodactFailureResponse, I as ProjectListParams$1, Ii as APIErrorBody, In as AuthConfigCreateResponse, Ir as ToolListResponse, It as TriggerListParams, J as ProjectDeleteParams, Jn as ToolkitListResponse, Jr as SessionAttachResponse, Jt as RealtimeAuthParams, K as ProjectCreateParams, Kt as CliGetSessionResponse, L as ProjectListResponse$1, Ln as AuthConfigDeleteParams, Lr as ToolProxyParams, Lt as TriggerListResponse, M as UsageRetrieveResponse$1, Mi as Scope, Mn as TriggersTypeRetrieveParams, Mr as ToolExecuteResponse, Mt as ToolListParams$1, N as UsageRetrieveSummaryParams$1, Nn as TriggersTypeRetrieveResponse, Nr as ToolGetInputParams, Nt as ToolListResponse$1, O as ClankerCreateClaimParams, On as ManageUpdateResponse, Or as FileListParams$1, Ot as LogCreateToolExecutionResponse, P as UsageRetrieveSummaryResponse$1, Pr as ToolGetInputResponse, Pt as ToolRetrieveResponse$1, Q as ProjectRegenerateAPIKeyResponse, Qi as HeadersLike, Qn as ToolkitRetrieveChangelogResponse, Qr as SessionCreateResponse, Qt as McpCreateInstanceParams, Rn as AuthConfigDeleteResponse, Rr as ToolProxyResponse, Rt as TriggerRetrieveResponse, Si as FileDeleteResponse, Sn as TriggerInstanceUpsertParams, Sr as ConnectedAccountRevokeResponse, T as OrgListParams, Tt as UsageRetrieveSummaryParams, U as ProjectResolveResponse, Un as AuthConfigUpdateResponse, Ur as ToolRetrieveResponse, Ut as CliCreateSessionParams, Vn as AuthConfigRetrieveResponse, Vr as ToolRetrieveRequiredScopesParams, Vt as CliCreateCodactFailureParams, Wn as AuthConfigUpdateStatusParams, Wt as CliCreateSessionResponse, X as ProjectListParams, Xn as ToolkitRecommendScopesResponse, Xr as SessionConfigHistoryResponse, Xt as RealtimeCredentialsResponse, Y as ProjectDeleteResponse, Yn as ToolkitRecommendScopesParams, Yr as SessionConfigHistoryParams, Yt as RealtimeAuthResponse, Z as ProjectListResponse, Zi as ClientIdentity, Zn as ToolkitRetrieveCategoriesResponse, Zr as SessionCreateParams, _ as CustomUpsertResponse, _i as FileCreateDownloadURLParams, _r as ConnectedAccountPatchParams, _t as WebhookSubscriptionRotateSecretResponse, ai as SessionLinkResponse, an as McpListInstancesParams, at as WebhookEndpointReplaceResponse, b as ApiKeyRevocationCreateResponse, bi as FileCreateUploadURLResponse, bn as TriggerInstanceListActiveParams, br as ConnectedAccountRefreshResponse, ci as SessionProxyExecuteParams, cn as McpListResponse, cr as LinkCreateResponse, ct as WebhookEndpointUpdateResponse, di as SessionSearchParams, dn as McpRetrieveResponse, dr as ConnectedAccountCreateParams, dt as WebhookSubscriptionCreateResponse, ei as SessionExecuteMetaParams, en as McpCreateParams, er as ToolkitRetrieveMultiResponse, et as WebhookEndpointCreateParams, f as CustomDeleteToolkitParams, fi as SessionSearchResponse, fn as McpUpdateParams, fr as ConnectedAccountCreateResponse, ft as WebhookSubscriptionDeleteResponse, g as CustomUpsertParams, gi as SessionToolsResponse, gn as GenerateURLResponse, gr as ConnectedAccountListResponse, gt as WebhookSubscriptionRetrieveResponse, h as CustomSyncResponse, hi as SessionToolsParams, hn as GenerateURLParams, hr as ConnectedAccountListParams, ht as WebhookSubscriptionListResponse, i as SessionConfigsRetrieveResponse, ii as SessionLinkParams, in as McpDeleteResponse, ir as ToolkitRetrieveScopesGrantContextResponse, it as WebhookEndpointReplaceParams, j as UsageRetrieveParams$1, jn as TriggersTypeRetrieveEnumResponse, jr as ToolExecuteParams, jt as ToolListFieldsResponse, k as ClankerCreateClaimResponse, ki as AuthOf, kn as TriggersTypeListParams, kr as FileListResponse$1, kt as LogRetrieveToolExecutionResponse, li as SessionProxyExecuteResponse, ln as McpRetrieveAppParams, lr as ConnectedAccountCompleteAuthParams, m as CustomSyncParams, mi as SessionToolkitsResponse, mr as ConnectedAccountDeleteResponse, mt as WebhookSubscriptionListParams, n as SessionConfigsListParams, ni as SessionExecuteParams, nn as McpDeleteInstanceParams, nr as ToolkitRetrieveResponse, nt as WebhookEndpointListParams, oi as SessionPatchParams, on as McpListInstancesResponse, ot as WebhookEndpointRetrieveResponse, p as CustomDeleteToolkitResponse, pi as SessionToolkitsParams, pn as McpUpdateResponse, pr as ConnectedAccountDeleteParams, pt as WebhookSubscriptionListEventTypesResponse, q as ProjectCreateResponse, qn as ToolkitListParams, qr as SessionAttachParams, r as SessionConfigsListResponse, ri as SessionExecuteResponse, rn as McpDeleteInstanceResponse, rr as ToolkitRetrieveScopesGrantContextParams, rt as WebhookEndpointListResponse, si as SessionPatchResponse, sn as McpListParams, sr as LinkCreateParams, st as WebhookEndpointUpdateParams, ti as SessionExecuteMetaResponse, tn as McpCreateResponse, tr as ToolkitRetrieveParams, tt as WebhookEndpointCreateResponse, u as KeyringListTransferKeysResponse, ui as SessionRetrieveResponse, un as McpRetrieveAppResponse, ur as ConnectedAccountCompleteAuthResponse, ut as WebhookSubscriptionCreateParams, vi as FileCreateDownloadURLResponse, vn as CustomCreateParams, vr as ConnectedAccountPatchResponse, vt as WebhookSubscriptionUpdateParams, wi as FileListResponse, wr as ConnectedAccountUpdateStatusResponse, wt as UsageRetrieveResponse, xi as FileDeleteParams, xn as TriggerInstanceListActiveResponse, xr as ConnectedAccountRetrieveResponse, y as ApiKeyRevocationCreateParams, yi as FileCreateUploadURLParams, yn as CustomCreateResponse, yr as ConnectedAccountRefreshParams, yt as WebhookSubscriptionUpdateResponse, z as ConsumerListConnectedToolkitsParams, zn as AuthConfigListParams, zr as ToolRetrieveEnumResponse } from "./session-configs-BLy_O6bX.mjs";
|
|
2
|
+
import { t as VERSION } from "./version-DB98yI2B.mjs";
|
|
3
|
+
import { Context, Effect, Layer, Logger, Predicate, Redacted, Stream } from "effect";
|
|
4
4
|
import * as HttpClient from "effect/http/HttpClient";
|
|
5
5
|
import * as Schema from "effect/Schema";
|
|
6
6
|
//#region src/effect/errors.d.ts
|
|
@@ -132,14 +132,9 @@ declare const isComposioError: (value: unknown) => value is ComposioError;
|
|
|
132
132
|
//#endregion
|
|
133
133
|
//#region src/effect/credentials.d.ts
|
|
134
134
|
type Key = string | Redacted.Redacted<string>;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
* the call starts, and its key is reused across retries and same-origin
|
|
139
|
-
* redirects.
|
|
140
|
-
*/
|
|
141
|
-
type Credential = Key | (() => Key | PromiseLike<Key>);
|
|
142
|
-
/** How the Effect client authenticates: `Auth.project(key)` and its siblings, with `Redacted` keys accepted. */
|
|
135
|
+
type Provider = () => Key | PromiseLike<Key>;
|
|
136
|
+
/** A string or `Redacted` key, or a function returning one, called once per call. */
|
|
137
|
+
type Credential = Key | Provider;
|
|
143
138
|
type Auth$2 = AuthOf<Credential>;
|
|
144
139
|
//#endregion
|
|
145
140
|
//#region src/effect/decode.d.ts
|
|
@@ -150,14 +145,6 @@ type Auth$2 = AuthOf<Credential>;
|
|
|
150
145
|
*/
|
|
151
146
|
type SchemaLoaders = Readonly<Record<string, () => Promise<Schema.Codec<unknown>>>>;
|
|
152
147
|
//#endregion
|
|
153
|
-
//#region src/effect/deprecation.d.ts
|
|
154
|
-
/**
|
|
155
|
-
* Whether the client reports deprecations: `'warn'` logs each distinct notice
|
|
156
|
-
* once per operation, `'off'` logs none — the counterpart of the compat
|
|
157
|
-
* client's `logLevel: 'off'`.
|
|
158
|
-
*/
|
|
159
|
-
type DeprecationNotices = 'warn' | 'off';
|
|
160
|
-
//#endregion
|
|
161
148
|
//#region src/effect/request.d.ts
|
|
162
149
|
/**
|
|
163
150
|
* What the client's own requests add to a trace:
|
|
@@ -647,29 +634,12 @@ interface ClientResources {
|
|
|
647
634
|
}
|
|
648
635
|
//#endregion
|
|
649
636
|
//#region src/effect/client.d.ts
|
|
650
|
-
/** How the client authenticates; a key may be a string, a `Redacted<string>`, or a function that returns either. */
|
|
651
637
|
type Auth = Auth$2;
|
|
652
|
-
/**
|
|
653
|
-
* The constructors of {@link Auth}, the same as the root entry's: `Auth.project(key)`,
|
|
654
|
-
* `Auth.user(key)`, `Auth.organization(key)`, `Auth.auto({ ... })` and
|
|
655
|
-
* `Auth.none()`. A key may be a string, a `Redacted<string>`, or a function
|
|
656
|
-
* that returns either.
|
|
657
|
-
*/
|
|
658
638
|
declare const Auth: AuthConstructors<Credential>;
|
|
659
639
|
interface ClientSettings {
|
|
660
|
-
/**
|
|
661
|
-
* How the client authenticates. A fixed mode sends its credential on every
|
|
662
|
-
* request to the API origin; `Auth.auto` picks one per operation; with
|
|
663
|
-
* `Auth.none()` the credential header names are the caller's. While `auth`
|
|
664
|
-
* is not `none`, neither `defaultHeaders` nor a call's `headers` may name a
|
|
665
|
-
* credential header.
|
|
666
|
-
*/
|
|
640
|
+
/** `Auth.project(key)`, `Auth.user(key)`, `Auth.organization(key)`, `Auth.auto({ ... })` or `Auth.none()`. */
|
|
667
641
|
readonly auth: Auth;
|
|
668
|
-
/**
|
|
669
|
-
* The organization and project the client addresses, sent as `x-org-id` and
|
|
670
|
-
* `x-project-id`. While it is set, neither `defaultHeaders` nor a call's
|
|
671
|
-
* `headers` may name either header.
|
|
672
|
-
*/
|
|
642
|
+
/** Sent as `x-org-id` and `x-project-id`. */
|
|
673
643
|
readonly scope?: Scope | undefined;
|
|
674
644
|
/** The API origin. Defaults to `https://backend.composio.dev`. */
|
|
675
645
|
readonly baseURL?: string | undefined;
|
|
@@ -704,11 +674,6 @@ interface ClientSettings {
|
|
|
704
674
|
* Defaults to one minute.
|
|
705
675
|
*/
|
|
706
676
|
readonly timeout?: number | undefined;
|
|
707
|
-
/**
|
|
708
|
-
* Whether deprecation notices are logged, through Effect's logger at the
|
|
709
|
-
* warning level. Defaults to `'warn'`.
|
|
710
|
-
*/
|
|
711
|
-
readonly deprecationNotices?: DeprecationNotices | undefined;
|
|
712
677
|
/**
|
|
713
678
|
* What the client's own requests add to a trace: `'off'` for nothing,
|
|
714
679
|
* `'span'` for a client span around each request, `'propagate'` for the span
|
|
@@ -778,23 +743,14 @@ declare const make: (options: ComposioClientOptions, httpClient: HttpClient.Http
|
|
|
778
743
|
*/
|
|
779
744
|
declare const layer: (options: ComposioClientOptions) => Layer.Layer<ComposioClient, ConfigurationError, HttpClient.HttpClient>;
|
|
780
745
|
/**
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
* the
|
|
784
|
-
*/
|
|
785
|
-
declare const layerFetch: (options: ComposioClientOptions) => Layer.Layer<ComposioClient, ConfigurationError>;
|
|
786
|
-
/**
|
|
787
|
-
* Provides the client from the `COMPOSIO_*` settings, read through the
|
|
788
|
-
* `ConfigProvider` in context, which is the process environment unless the
|
|
789
|
-
* application says otherwise. `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY` and
|
|
790
|
-
* `COMPOSIO_ORG_API_KEY` become `auth` by the rule `Composio.fromEnv` applies
|
|
791
|
-
* (one set: that fixed mode; several: `Auth.auto`; none: `Auth.none()`), each
|
|
792
|
-
* key `Redacted` throughout; `COMPOSIO_BASE_URL` and
|
|
793
|
-
* `COMPOSIO_ALLOW_INSECURE_HTTP=1` are read too. `COMPOSIO_ORG_ID` and
|
|
794
|
-
* `COMPOSIO_PROJECT_ID` are not: `scope` is an argument. An option given here
|
|
795
|
-
* replaces the whole setting it names, so `{ auth: Auth.none() }` means none
|
|
796
|
-
* whatever is configured.
|
|
746
|
+
* Provides the client from the `COMPOSIO_*` settings through the
|
|
747
|
+
* `ConfigProvider` in context, by `Composio.fromEnv`'s rules. Each override
|
|
748
|
+
* replaces the setting it names.
|
|
797
749
|
*/
|
|
798
750
|
declare const layerConfig: (overrides?: Partial<ClientSettings> & DecodingOptions) => Layer.Layer<ComposioClient, ConfigurationError, HttpClient.HttpClient>;
|
|
799
751
|
//#endregion
|
|
800
|
-
|
|
752
|
+
//#region src/effect/deprecation.d.ts
|
|
753
|
+
/** Whether a log record is one of this client's deprecation notices, for a `Logger` that drops or routes them. */
|
|
754
|
+
declare const isDeprecationNotice: Predicate.Predicate<Logger.Options<unknown>>;
|
|
755
|
+
//#endregion
|
|
756
|
+
export { APIConnectionError, APIConnectionTimeoutError, APIError, type APIErrorBody, type APIErrorFields, type APIStatusError, Auth, AuthenticationError, type AutoCredentials, BadRequestError, type ClientIdentity, ComposioClient, type ComposioClientOptions, type ComposioClientShape, type ComposioError, ConfigurationError, ConflictError, type Credential, DecodeError, type DecodeIssue, type HeadersLike, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, type RawBodyRequestOptions, type RawRequestOptions, type RequestOptions, type SchemaLoaders, type Scope, type Tracing, UnprocessableEntityError, VERSION, isAPIError, isComposioError, isDeprecationNotice, layer, layerConfig, make };
|