@composio/client 2.0.0-rc.15 → 2.0.0-rc.17
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 +59 -5
- package/dist/{api-key-revocation-CBTqyv77.mjs → api-key-revocation-lc3308Ao.mjs} +1 -1
- package/dist/{auth-YEGyiIZI.mjs → auth-DkGiEaxg.mjs} +1 -1
- package/dist/{auth-configs-V7U1YdOd.mjs → auth-configs-DbxqGahP.mjs} +1 -1
- package/dist/{clanker-DK892J2n.mjs → clanker-fK9cAkTz.mjs} +1 -1
- package/dist/{cli-BR9p7AMA.mjs → cli-K1MskpaR.mjs} +2 -2
- package/dist/{connected-accounts-DyxruL1q.mjs → connected-accounts-Bfl7_SY_.mjs} +1 -1
- package/dist/{consumer-QHRVNxXs.mjs → consumer-5o2zMQwr.mjs} +2 -2
- package/dist/custom-8rs-sHnb.mjs +34 -0
- package/dist/{custom-DNPJxZK5.mjs → custom-wEkSiPHn.mjs} +1 -1
- package/dist/effect.d.mts +19 -8
- package/dist/effect.mjs +21 -8
- package/dist/{files-Bx7TZpgo.mjs → files-BPKJXlpc.mjs} +1 -1
- package/dist/{files-Cs1Y7Oz6.mjs → files-BjPFzRnM.mjs} +1 -1
- package/dist/{generate-gyrqQd_2.mjs → generate-DDHNgbPS.mjs} +1 -1
- package/dist/{generated-deprecated-inputs-BggrSLuP.mjs → generated-deprecated-inputs--L5LHDO_.mjs} +1 -1
- package/dist/{generated-operations-lxo6Uhzh.mjs → generated-operations-D1e__yar.mjs} +201 -33
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +31 -63
- package/dist/{keyring-CaSbeDWI.mjs → keyring-Dkm6DQIp.mjs} +1 -1
- package/dist/{link-BsD-BXnp.mjs → link-BBU-J5L_.mjs} +1 -1
- package/dist/{logs-CKWNAUJD.mjs → logs-CuuysWk1.mjs} +3 -3
- package/dist/{manage-LE7ZhkxJ.mjs → manage-B1R7I3ZM.mjs} +1 -1
- package/dist/{mcp-BLaouUUs.mjs → mcp-C3beSy48.mjs} +3 -3
- package/dist/{org-Cw6PQdvF.mjs → org-B13XOuKh.mjs} +6 -6
- package/dist/{owner-DnCCAK6L.mjs → owner-BAr5uwk3.mjs} +1 -1
- package/dist/{project-Dug9gbmT.mjs → project-BbCgXD83.mjs} +1 -1
- package/dist/{project-B383tf0r.mjs → project-C30H_5b6.mjs} +1 -1
- package/dist/{project-BdAUzLDU.mjs → project-CDm8tjUw.mjs} +1 -1
- package/dist/{project-CVKYoJ9i.mjs → project-DF5KclHm.mjs} +1 -1
- package/dist/{realtime-IBtbqLYg.mjs → realtime-6LigMh83.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-DcTM2Dmm.mjs → session-DEfDnHZZ.mjs} +2 -2
- package/dist/{session-CGBr6GaO.mjs → session-Dm8WtF4I.mjs} +1 -1
- package/dist/{session-configs-CtHZk-vG.d.mts → session-configs-nA6TL_i4.d.mts} +40 -17
- package/dist/{tool-router-BTK7Mzi8.mjs → tool-router-6l_dREjC.mjs} +1 -1
- package/dist/{toolkits-DqOLVQhl.mjs → toolkits-Mn_uLV98.mjs} +1 -1
- package/dist/{tools-DmZteN_Z.mjs → tools-btk0mzFP.mjs} +1 -1
- package/dist/{tools-BuSJLTWS.mjs → tools-z-PjBsf7.mjs} +1 -1
- package/dist/{trigger-instances--9zM_0OP.mjs → trigger-instances-PQaObQQy.mjs} +2 -2
- package/dist/{triggers-types-BP340boz.mjs → triggers-types-KoRbT0k5.mjs} +1 -1
- package/dist/{triggers-DVow72wn.mjs → triggers-y0mi0XzT.mjs} +1 -1
- package/dist/{usage-Dv5GAePW.mjs → usage-B2Z947BK.mjs} +1 -1
- package/dist/{usage-BwUhfQlH.mjs → usage-DvjkSmpI.mjs} +1 -1
- package/dist/version-DUxhnnPj.d.mts +4 -0
- package/dist/{webhook-endpoints-BMe7DyIe.mjs → webhook-endpoints-kf4Jj2Mz.mjs} +1 -1
- package/dist/{webhook-subscriptions-BHpY2cSc.mjs → webhook-subscriptions-DcYN8qo1.mjs} +1 -1
- package/package.json +2 -2
- package/dist/custom-DaAJruvk.mjs +0 -88
- package/dist/version-CuFIok56.d.mts +0 -4
package/README.md
CHANGED
|
@@ -89,8 +89,10 @@ const transport = createFetchTransport({ fetch: instrumentedFetch })
|
|
|
89
89
|
const composio = new Composio({ apiKey, transport })
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
Without a `transport`, the client resolves `globalThis.fetch` when a request is sent, so late
|
|
93
|
+
polyfills and test interceptors keep working. A custom `fetch` or extra `RequestInit` defaults go
|
|
94
|
+
through `createFetchTransport({ fetch, defaults })`; the former `fetch`, `fetchOptions` and
|
|
95
|
+
`defaultQuery` constructor options are gone (see the upgrade section).
|
|
94
96
|
|
|
95
97
|
## Effect
|
|
96
98
|
|
|
@@ -165,9 +167,8 @@ A credential option takes a `string` or a `Redacted<string>`. Construction fails
|
|
|
165
167
|
excepted, as on the root client), or when `decode: true` is given without `schemas`.
|
|
166
168
|
|
|
167
169
|
The resources are plain objects of functions, not classes, so a method can be passed around without
|
|
168
|
-
binding.
|
|
169
|
-
(`migration`, `project.config`)
|
|
170
|
-
only the current `(slug, query, options)` signature exists.
|
|
170
|
+
binding. One thing on the root client has no counterpart here: the resources that hold no operation
|
|
171
|
+
(`migration`, `project.config`).
|
|
171
172
|
|
|
172
173
|
### Errors
|
|
173
174
|
|
|
@@ -431,6 +432,37 @@ decodes, then with the loader table and every schema it reaches.
|
|
|
431
432
|
of which 2.1 MB and 328 files are `dist/effect/schemas*`, against 1.1 MB in 176 files for
|
|
432
433
|
`2.0.0-rc.11` as published. None of it is on the root entry's import path.
|
|
433
434
|
|
|
435
|
+
### Identify the calling product
|
|
436
|
+
|
|
437
|
+
A product built on the client passes `identity` instead of setting headers by hand. The root client
|
|
438
|
+
and `./effect` take the same option:
|
|
439
|
+
|
|
440
|
+
```ts
|
|
441
|
+
const composio = new Composio({
|
|
442
|
+
apiKey,
|
|
443
|
+
identity: { product: '@composio/core', version: '0.9.0', source: 'TYPESCRIPT_SDK', framework: 'openai' },
|
|
444
|
+
})
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
| Header | Sent from | Without `identity` |
|
|
448
|
+
| --- | --- | --- |
|
|
449
|
+
| `x-client-provenance`, `x-client-version` | `product`, `version` | the package name and version |
|
|
450
|
+
| `x-sdk-version` | `version` | not sent |
|
|
451
|
+
| `x-source`, `x-framework` | `source`, `framework` | not sent |
|
|
452
|
+
| `x-runtime` | `runtime`, else the detected runtime | the detected runtime |
|
|
453
|
+
| `x-client-runtime`, `x-runtime-version` | the detected runtime | the detected runtime |
|
|
454
|
+
| `x-client-library`, `x-client-library-version`, `x-client-language` | the package | the package |
|
|
455
|
+
|
|
456
|
+
The three library headers are the package's own: `defaultHeaders`, `COMPOSIO_CUSTOM_HEADERS` and a
|
|
457
|
+
call's `headers` cannot set or delete them. Once `identity` is set, the same holds for every header
|
|
458
|
+
in the table. A refused name fails construction (`ComposioError`, or `ConfigurationError` on
|
|
459
|
+
`./effect`), or the call before anything is sent. Identity values must be non-empty printable ASCII
|
|
460
|
+
with no surrounding whitespace, and are sent to the configured API origin only.
|
|
461
|
+
|
|
462
|
+
The detected runtime is one of `nodejs`, `bun`, `deno`, `cloudflare`, `vercel_edge`, `netlify`,
|
|
463
|
+
`fastly` or `unknown`, checked in [`std-env`](https://github.com/unjs/std-env)'s order; the
|
|
464
|
+
Python client always reports `python`.
|
|
465
|
+
|
|
434
466
|
## Upgrade from Stainless 0.1.x to 2.0
|
|
435
467
|
|
|
436
468
|
By default, the 2.0 client refuses to send credentials over plain HTTP unless the hostname is
|
|
@@ -456,6 +488,28 @@ The opt-in records the resolved scheme, hostname, and port. Mutating `baseURL` c
|
|
|
456
488
|
and `withOptions({ baseURL: ... })` requires `allowInsecureHTTP: true` again when the origin
|
|
457
489
|
changes. Redirects to another origin remain credential-free.
|
|
458
490
|
|
|
491
|
+
### Changed in 2.0.0-rc.17
|
|
492
|
+
|
|
493
|
+
`defaultHeaders`, `COMPOSIO_CUSTOM_HEADERS` and per-call `headers` refuse the library headers
|
|
494
|
+
(`x-client-library`, `x-client-library-version`, `x-client-language`), and refuse every identity
|
|
495
|
+
header once `identity` is set. A wrapper that set its product headers through `defaultHeaders`
|
|
496
|
+
moves them into `identity` (see [Identify the calling product](#identify-the-calling-product)).
|
|
497
|
+
Python takes `identity=ClientIdentity(...)` under the same rule. The type surface is unchanged
|
|
498
|
+
apart from the added option, so the release declares no ledger entry.
|
|
499
|
+
|
|
500
|
+
### Removed in 2.0.0-rc.16
|
|
501
|
+
|
|
502
|
+
Each row is a declared entry in `packages/codegen/assignability-ledger.json`, the list of what a
|
|
503
|
+
release changes against the previous published version.
|
|
504
|
+
|
|
505
|
+
| Removed | Migration |
|
|
506
|
+
| --- | --- |
|
|
507
|
+
| `fetch: f` (constructor) | `transport: createFetchTransport({ fetch: f })` |
|
|
508
|
+
| `fetchOptions: { cache: 'no-store' }` (constructor) | `transport: createFetchTransport({ defaults: { cache: 'no-store' } })`. The defaults cannot set `method`, `headers`, `body`, `signal` or `redirect`, which the client owns |
|
|
509
|
+
| `fetchOptions` (per call, in `RequestOptions`) | None: `headers`, `timeout`, `signal` and `idempotencyKey` stay, and transport-level defaults go through `createFetchTransport({ defaults })` |
|
|
510
|
+
| `defaultQuery` (root `ClientOptions` and `./effect` `ComposioClientOptions`) | None: generated methods own their query, and the raw methods (`get`, `post`, ...) take an explicit `query` |
|
|
511
|
+
| `custom.deleteToolkit(slug, options)` | `custom.deleteToolkit(slug, query, options)` — pass request options third, as on every other `(id, params?, options?)` method. The runtime guard that recognized an options bag in the params position is gone with the overload |
|
|
512
|
+
|
|
459
513
|
## Development
|
|
460
514
|
|
|
461
515
|
Toolchain is pinned via [mise](https://mise.jdx.dev) (`mise install`): Node 24, pnpm 11, Python 3.13, uv. ESM-only, TypeScript 7 (native compiler for typechecking, `typescript@6` retained for tooling until 7.1 restores the compiler API).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { b as withOperation, n as generatedOperation } from "./generated-operations-D1e__yar.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 { b as withOperation, d as path, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { b as withOperation, d as path, n as generatedOperation } from "./generated-operations-D1e__yar.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 { b as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { b as withOperation, n as generatedOperation } from "./generated-operations-D1e__yar.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 {
|
|
2
|
-
import { t as Realtime } from "./realtime-
|
|
1
|
+
import { F as mergeHeaders, b as withOperation, n as generatedOperation } from "./generated-operations-D1e__yar.mjs";
|
|
2
|
+
import { t as Realtime } from "./realtime-6LigMh83.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 { b as withOperation, d as path, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { b as withOperation, d as path, n as generatedOperation } from "./generated-operations-D1e__yar.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 {
|
|
2
|
-
import { t as Project } from "./project-
|
|
1
|
+
import { F as mergeHeaders, b as withOperation, n as generatedOperation } from "./generated-operations-D1e__yar.mjs";
|
|
2
|
+
import { t as Project } from "./project-DF5KclHm.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/resources/org/consumer/consumer.ts
|
|
5
5
|
const OP_LIST_CONNECTED_TOOLKITS = generatedOperation("org.consumer.listConnectedToolkits");
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { b as withOperation, d as path, n as generatedOperation } from "./generated-operations-D1e__yar.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/custom.ts
|
|
4
|
+
const OP_DELETE_TOOLKIT = generatedOperation("custom.deleteToolkit");
|
|
5
|
+
const OP_SYNC = generatedOperation("custom.sync");
|
|
6
|
+
const OP_UPSERT = generatedOperation("custom.upsert");
|
|
7
|
+
/** OpenAPI resource for `custom`. */
|
|
8
|
+
var Custom = class {
|
|
9
|
+
#client;
|
|
10
|
+
constructor(client) {
|
|
11
|
+
this.#client = client;
|
|
12
|
+
}
|
|
13
|
+
deleteToolkit(slug, query = {}, options) {
|
|
14
|
+
return this.#client.delete(path`/api/v3.1/custom/toolkits/${slug}`, withOperation(OP_DELETE_TOOLKIT, {
|
|
15
|
+
query,
|
|
16
|
+
...options
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
sync(body, options) {
|
|
20
|
+
return this.#client.post("/api/v3.1/custom/toolkits/sync", withOperation(OP_SYNC, {
|
|
21
|
+
body,
|
|
22
|
+
...options
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
upsert(body, options) {
|
|
26
|
+
return this.#client.post("/api/v3.1/custom/toolkits/upsert", withOperation(OP_UPSERT, {
|
|
27
|
+
body,
|
|
28
|
+
...options
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Custom as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { b as withOperation, n as generatedOperation } from "./generated-operations-D1e__yar.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,5 +1,5 @@
|
|
|
1
|
-
import { $ as ProjectRegenerateAPIKeyResponse, $n as ToolkitRetrieveChangelogResponse, $r as SessionCreateResponse, $t as McpCreateInstanceParams, A as ClankerCreateClaimResponse, An as TriggersTypeListParams, Ar as FileListResponse$1, At as LogRetrieveToolExecutionResponse, B as ConsumerListConnectedToolkitsParams, Bn as AuthConfigListParams, Br as ToolRetrieveEnumResponse, Ci as FileDeleteResponse, Cn as TriggerInstanceUpsertParams, Cr as ConnectedAccountRevokeResponse, D as OrgListResponse, Dn as ManageDeleteResponse, Dr as FileCreatePresignedURLParams, Dt as UsageRetrieveSummaryResponse, E as OrgListParams, Et as UsageRetrieveSummaryParams, F as UsageRetrieveSummaryResponse$1,
|
|
2
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { $ as ProjectRegenerateAPIKeyResponse, $n as ToolkitRetrieveChangelogResponse, $r as SessionCreateResponse, $t as McpCreateInstanceParams, A as ClankerCreateClaimResponse, An as TriggersTypeListParams, Ar as FileListResponse$1, At as LogRetrieveToolExecutionResponse, B as ConsumerListConnectedToolkitsParams, Bn as AuthConfigListParams, Br as ToolRetrieveEnumResponse, Ci as FileDeleteResponse, Cn as TriggerInstanceUpsertParams, Cr as ConnectedAccountRevokeResponse, D as OrgListResponse, Dn as ManageDeleteResponse, Dr as FileCreatePresignedURLParams, Dt as UsageRetrieveSummaryResponse, E as OrgListParams, Et as UsageRetrieveSummaryParams, F as UsageRetrieveSummaryResponse$1, Fr as ToolGetInputResponse, Ft as ToolRetrieveResponse$1, Gn as AuthConfigUpdateStatusParams, Gt as CliCreateSessionResponse, Hn as AuthConfigRetrieveResponse, Hr as ToolRetrieveRequiredScopesParams, Ht as CliCreateCodactFailureParams, Ii as APIErrorBody, In as AuthConfigCreateParams, Ir as ToolListParams, J as ProjectCreateResponse, Jn as ToolkitListParams, Jr as SessionAttachParams, Kn as AuthConfigUpdateStatusResponse, Kt as CliGetSessionParams, L as ProjectListParams$1, Ln as AuthConfigCreateResponse, Lr as ToolListResponse, Lt as TriggerListParams, M as UsageRetrieveParams$1, Mi as HeadersLike, Mn as TriggersTypeRetrieveEnumResponse, Mr as ToolExecuteParams, Mt as ToolListFieldsResponse, N as UsageRetrieveResponse$1, Nn as TriggersTypeRetrieveParams, Nr as ToolExecuteResponse, Nt as ToolListParams$1, On as ManageUpdateParams, Or as FileCreatePresignedURLResponse, Ot as LogCreateToolExecutionParams, P as UsageRetrieveSummaryParams$1, Pn as TriggersTypeRetrieveResponse, Pr as ToolGetInputParams, Pt as ToolListResponse$1, Q as ProjectListResponse, Qn as ToolkitRetrieveCategoriesResponse, Qr as SessionCreateParams, R as ProjectListResponse$1, Rn as AuthConfigDeleteParams, Rr as ToolProxyParams, Rt as TriggerListResponse, Si as FileDeleteParams, Sn as TriggerInstanceListActiveResponse, Sr as ConnectedAccountRetrieveResponse, Ti as FileListResponse, Tr as ConnectedAccountUpdateStatusResponse, Tt as UsageRetrieveResponse, U as ProjectResolveParams, Un as AuthConfigUpdateParams, Ur as ToolRetrieveRequiredScopesResponse, Ut as CliCreateCodactFailureResponse, V as ConsumerListConnectedToolkitsResponse, Vn as AuthConfigListResponse, Vr as ToolRetrieveParams, W as ProjectResolveResponse, Wn as AuthConfigUpdateResponse, Wr as ToolRetrieveResponse, Wt as CliCreateSessionParams, X as ProjectDeleteResponse, Xn as ToolkitRecommendScopesParams, Xr as SessionConfigHistoryParams, Xt as RealtimeAuthResponse, Y as ProjectDeleteParams, Yn as ToolkitListResponse, Yr as SessionAttachResponse, Yt as RealtimeAuthParams, Z as ProjectListParams, Zn as ToolkitRecommendScopesResponse, Zr as SessionConfigHistoryResponse, Zt as RealtimeCredentialsResponse, _ as CustomUpsertParams, _i as SessionToolsResponse, _n as GenerateURLResponse, _r as ConnectedAccountListResponse, _t as WebhookSubscriptionRetrieveResponse, ai as SessionLinkParams, an as McpDeleteResponse, ar as ToolkitRetrieveScopesGrantContextResponse, at as WebhookEndpointReplaceParams, b as ApiKeyRevocationCreateParams, bi as FileCreateUploadURLParams, bn as CustomCreateResponse, br as ConnectedAccountRefreshParams, bt as WebhookSubscriptionUpdateResponse, ci as SessionPatchResponse, cn as McpListParams, cr as LinkCreateParams, ct as WebhookEndpointUpdateParams, d as KeyringListTransferKeysResponse, di as SessionRetrieveResponse, dn as McpRetrieveAppResponse, dr as ConnectedAccountCompleteAuthResponse, dt as WebhookSubscriptionCreateParams, ei as SessionDeleteResponse, en as McpCreateInstanceResponse, er as ToolkitRetrieveMultiParams, et as ProjectRetrieveResponse, fi as SessionSearchParams, fn as McpRetrieveResponse, fr as ConnectedAccountCreateParams, ft as WebhookSubscriptionCreateResponse, g as CustomSyncResponse, gi as SessionToolsParams, gn as GenerateURLParams, gr as ConnectedAccountListParams, gt as WebhookSubscriptionListResponse, h as CustomSyncParams, hi as SessionToolkitsResponse, hr as ConnectedAccountDeleteResponse, ht as WebhookSubscriptionListParams, i as SessionConfigsRetrieveResponse, ii as SessionExecuteResponse, in as McpDeleteInstanceResponse, ir as ToolkitRetrieveScopesGrantContextParams, it as WebhookEndpointListResponse, ji as ClientIdentity, jn as TriggersTypeListResponse, k as ClankerCreateClaimParams, kn as ManageUpdateResponse, kr as FileListParams$1, kt as LogCreateToolExecutionResponse, li as SessionProxyExecuteParams, ln as McpListResponse, lr as LinkCreateResponse, lt as WebhookEndpointUpdateResponse, m as CustomDeleteToolkitResponse, mi as SessionToolkitsParams, mn as McpUpdateResponse, mr as ConnectedAccountDeleteParams, mt as WebhookSubscriptionListEventTypesResponse, n as SessionConfigsListParams, ni as SessionExecuteMetaResponse, nn as McpCreateResponse, nr as ToolkitRetrieveParams, nt as WebhookEndpointCreateResponse, oi as SessionLinkResponse, on as McpListInstancesParams, ot as WebhookEndpointReplaceResponse, p as CustomDeleteToolkitParams, pi as SessionSearchResponse, pn as McpUpdateParams, pr as ConnectedAccountCreateResponse, pt as WebhookSubscriptionDeleteResponse, q as ProjectCreateParams, qt as CliGetSessionResponse, r as SessionConfigsListResponse, ri as SessionExecuteParams, rn as McpDeleteInstanceParams, rr as ToolkitRetrieveResponse, rt as WebhookEndpointListParams, si as SessionPatchParams, sn as McpListInstancesResponse, st as WebhookEndpointRetrieveResponse, ti as SessionExecuteMetaParams, tn as McpCreateParams, tr as ToolkitRetrieveMultiResponse, tt as WebhookEndpointCreateParams, ui as SessionProxyExecuteResponse, un as McpRetrieveAppParams, ur as ConnectedAccountCompleteAuthParams, v as CustomUpsertResponse, vi as FileCreateDownloadURLParams, vr as ConnectedAccountPatchParams, vt as WebhookSubscriptionRotateSecretResponse, w as SessionRetrieveInfoResponse, wi as FileListParams, wn as TriggerInstanceUpsertResponse, wr as ConnectedAccountUpdateStatusParams, wt as UsageRetrieveParams, x as ApiKeyRevocationCreateResponse, xi as FileCreateUploadURLResponse, xn as TriggerInstanceListActiveParams, xr as ConnectedAccountRefreshResponse, yi as FileCreateDownloadURLResponse, yn as CustomCreateParams, yr as ConnectedAccountPatchResponse, yt as WebhookSubscriptionUpdateParams, zn as AuthConfigDeleteResponse, zr as ToolProxyResponse, zt as TriggerRetrieveResponse } from "./session-configs-nA6TL_i4.mjs";
|
|
2
|
+
import { t as VERSION } from "./version-DUxhnnPj.mjs";
|
|
3
3
|
import { Context, Effect, Layer, Redacted, Stream } from "effect";
|
|
4
4
|
import * as HttpClient from "effect/http/HttpClient";
|
|
5
5
|
import * as Schema from "effect/Schema";
|
|
@@ -651,10 +651,20 @@ interface ClientSettings {
|
|
|
651
651
|
* origin. The permission is limited to the resolved scheme, host, and port.
|
|
652
652
|
*/
|
|
653
653
|
readonly allowInsecureHTTP?: boolean | undefined;
|
|
654
|
-
/**
|
|
654
|
+
/**
|
|
655
|
+
* The calling product, sent as the product headers (`x-client-provenance`,
|
|
656
|
+
* `x-client-version`, `x-sdk-version`, `x-source`, `x-framework`,
|
|
657
|
+
* `x-runtime`). With it set, neither `defaultHeaders` nor a call's `headers`
|
|
658
|
+
* may name an identity header; without it the client reports itself.
|
|
659
|
+
*/
|
|
660
|
+
readonly identity?: ClientIdentity | undefined;
|
|
661
|
+
/**
|
|
662
|
+
* Headers sent on every request; per-call headers win, `null` deletes. The
|
|
663
|
+
* library headers (`x-client-library`, `x-client-library-version`,
|
|
664
|
+
* `x-client-language`) are the client's own and are refused here, as is
|
|
665
|
+
* every identity header once `identity` is set.
|
|
666
|
+
*/
|
|
655
667
|
readonly defaultHeaders?: HeadersLike;
|
|
656
|
-
/** Query params sent on every request; `undefined` removes a param. */
|
|
657
|
-
readonly defaultQuery?: Record<string, string | undefined> | undefined;
|
|
658
668
|
/**
|
|
659
669
|
* Maximum retries for temporary failures of a call whose method is
|
|
660
670
|
* idempotent (`GET`, `HEAD`, `OPTIONS`, `PUT`, `DELETE`). Defaults to 2. Any
|
|
@@ -730,8 +740,9 @@ declare class ComposioClient extends ComposioClient_base {}
|
|
|
730
740
|
* Reads no environment variable.
|
|
731
741
|
*
|
|
732
742
|
* @throws {ConfigurationError} when a credentialed origin is not HTTPS, a
|
|
733
|
-
* credential cannot be sent as a header,
|
|
734
|
-
*
|
|
743
|
+
* credential cannot be sent as a header, `identity` is invalid or
|
|
744
|
+
* `defaultHeaders` names an identity header, or the client is to decode and
|
|
745
|
+
* was given no schemas.
|
|
735
746
|
*/
|
|
736
747
|
declare const make: (options: ComposioClientOptions, httpClient: HttpClient.HttpClient) => ComposioClientShape;
|
|
737
748
|
/**
|
|
@@ -755,4 +766,4 @@ declare const layerFetch: (options?: ComposioClientOptions) => Layer.Layer<Compo
|
|
|
755
766
|
*/
|
|
756
767
|
declare const layerConfig: (options?: ComposioClientOptions) => Layer.Layer<ComposioClient, ConfigurationError, HttpClient.HttpClient>;
|
|
757
768
|
//#endregion
|
|
758
|
-
export { APIConnectionError, APIConnectionTimeoutError, APIError, type APIErrorBody, type APIErrorFields, type APIStatusError, AuthenticationError, BadRequestError, ComposioClient, type ComposioClientOptions, type ComposioClientShape, type ComposioError, ConfigurationError, ConflictError, type Credential, DecodeError, type DecodeIssue, type DeprecationNotices, type HeadersLike, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, type RawBodyRequestOptions, type RawRequestOptions, type RequestOptions, type SchemaLoaders, type Tracing, UnprocessableEntityError, VERSION, isAPIError, isComposioError, layer, layerConfig, layerFetch, make };
|
|
769
|
+
export { APIConnectionError, APIConnectionTimeoutError, APIError, type APIErrorBody, type APIErrorFields, type APIStatusError, AuthenticationError, BadRequestError, type ClientIdentity, ComposioClient, type ComposioClientOptions, type ComposioClientShape, type ComposioError, ConfigurationError, ConflictError, type Credential, DecodeError, type DecodeIssue, type DeprecationNotices, type HeadersLike, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, type RawBodyRequestOptions, type RawRequestOptions, type RequestOptions, type SchemaLoaders, type Tracing, UnprocessableEntityError, VERSION, isAPIError, isComposioError, layer, layerConfig, layerFetch, make };
|
package/dist/effect.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as makeAPIErrorMessage, m as errorDetails, s as ComposioError } from "./error-D9cG225M.mjs";
|
|
2
|
-
import { A as
|
|
3
|
-
import { r as classifySuccessBody, t as GENERATED_DEPRECATED_INPUTS } from "./generated-deprecated-inputs
|
|
2
|
+
import { A as callerPlacedCredential, C as resolveIdentity, D as matchOperation, E as inspectDeprecation, F as mergeHeaders, M as parseHTTPURL, N as resolveHTTPURL, O as SCHEME_HEADERS, P as buildHeaders, S as assertNoReservedHeaders, T as inspectDeprecatedInputs, _ as schemeForRequest, a as TOO_MANY_REDIRECTS, c as buildURL, d as path, f as printableURL, g as safeJSON, h as rewriteForRedirect, i as REDIRECT_STATUSES, j as carriesCredentials, k as assertCredentialTransport, m as retryDelayMillis, n as generatedOperation, o as buildBody, r as OPAQUE_REDIRECT, s as buildRequestHeaders, t as GENERATED_OPERATIONS, v as shouldRetryResponse, w as VERSION, y as validatePositiveInteger } from "./generated-operations-D1e__yar.mjs";
|
|
3
|
+
import { r as classifySuccessBody, t as GENERATED_DEPRECATED_INPUTS } from "./generated-deprecated-inputs--L5LHDO_.mjs";
|
|
4
4
|
import { i as standardNextCursor, n as assertPageItems, r as isFinalCursor, t as assertCursorAdvanced } from "./pagination-rules-uMUdPq_7.mjs";
|
|
5
5
|
import { Config, Context, Data, Effect, Exit, Layer, Match, Option, Predicate, Redacted, Result, Stream, Tracer } from "effect";
|
|
6
6
|
import * as FetchHttpClient from "effect/http/FetchHttpClient";
|
|
@@ -383,6 +383,7 @@ const substitute = (template, params) => {
|
|
|
383
383
|
const hopHeaders = (prepared, hop) => buildRequestHeaders(prepared.headerConfig, { headers: prepared.callHeaders }, hop.url, hop.bodyHeaders, hop.withdrawn, prepared.scheme, prepared.callerPlaced);
|
|
384
384
|
const prepare = (kernel, call) => {
|
|
385
385
|
const callHeaders = call.headers();
|
|
386
|
+
assertNoReservedHeaders(callHeaders, kernel.identity, "headers");
|
|
386
387
|
const path = call.path();
|
|
387
388
|
if (call.options?.timeout !== void 0) validatePositiveInteger("timeout", call.options.timeout);
|
|
388
389
|
const resolvedRetries = call.options?.maxRetries ?? kernel.maxRetries;
|
|
@@ -411,7 +412,8 @@ const prepare = (kernel, call) => {
|
|
|
411
412
|
credentials,
|
|
412
413
|
allowedHTTPOrigin: kernel.allowedHTTPOrigin,
|
|
413
414
|
userAgent: kernel.userAgent,
|
|
414
|
-
defaultHeaders: kernel.defaultHeaders
|
|
415
|
+
defaultHeaders: kernel.defaultHeaders,
|
|
416
|
+
identity: kernel.identity
|
|
415
417
|
},
|
|
416
418
|
callHeaders,
|
|
417
419
|
scheme: schemeForRequest({ credentials }, call.operation),
|
|
@@ -1489,6 +1491,15 @@ const hold = (credential) => {
|
|
|
1489
1491
|
const resolveKernel = (options, httpClient) => {
|
|
1490
1492
|
const baseURL = options.baseURL || DEFAULT_BASE_URL;
|
|
1491
1493
|
if (options.decode === true && options.schemas === void 0) return Result.fail(new ConfigurationError({ message: SCHEMAS_MISSING }));
|
|
1494
|
+
const identity = Result.try({
|
|
1495
|
+
try: () => {
|
|
1496
|
+
const resolved = resolveIdentity(options.identity);
|
|
1497
|
+
assertNoReservedHeaders(options.defaultHeaders, resolved, "defaultHeaders");
|
|
1498
|
+
return resolved;
|
|
1499
|
+
},
|
|
1500
|
+
catch: configurationErrorFrom
|
|
1501
|
+
});
|
|
1502
|
+
if (Result.isFailure(identity)) return Result.fail(identity.failure);
|
|
1492
1503
|
const kernel = {
|
|
1493
1504
|
httpClient,
|
|
1494
1505
|
baseURL,
|
|
@@ -1498,7 +1509,7 @@ const resolveKernel = (options, httpClient) => {
|
|
|
1498
1509
|
allowedHTTPOrigin: options.allowInsecureHTTP ? parseHTTPURL(baseURL)?.origin ?? null : null,
|
|
1499
1510
|
userAgent: `Composio/JS ${VERSION}`,
|
|
1500
1511
|
defaultHeaders: options.defaultHeaders,
|
|
1501
|
-
|
|
1512
|
+
identity: identity.success,
|
|
1502
1513
|
maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES,
|
|
1503
1514
|
timeout: options.timeout ?? DEFAULT_TIMEOUT,
|
|
1504
1515
|
tracing: options.tracing ?? "off",
|
|
@@ -1529,8 +1540,9 @@ const fromKernel = (kernel) => ({
|
|
|
1529
1540
|
* are built over it, and it is not part of the entry's exports.
|
|
1530
1541
|
*
|
|
1531
1542
|
* @throws {ConfigurationError} when a credentialed origin is not HTTPS, a
|
|
1532
|
-
* credential cannot be sent as a header,
|
|
1533
|
-
*
|
|
1543
|
+
* credential cannot be sent as a header, `identity` is invalid or
|
|
1544
|
+
* `defaultHeaders` names an identity header, or the client is to decode and
|
|
1545
|
+
* was given no schemas.
|
|
1534
1546
|
*/
|
|
1535
1547
|
const makeKernel = (options, httpClient) => Result.getOrThrow(resolveKernel(options, httpClient));
|
|
1536
1548
|
/**
|
|
@@ -1538,8 +1550,9 @@ const makeKernel = (options, httpClient) => Result.getOrThrow(resolveKernel(opti
|
|
|
1538
1550
|
* Reads no environment variable.
|
|
1539
1551
|
*
|
|
1540
1552
|
* @throws {ConfigurationError} when a credentialed origin is not HTTPS, a
|
|
1541
|
-
* credential cannot be sent as a header,
|
|
1542
|
-
*
|
|
1553
|
+
* credential cannot be sent as a header, `identity` is invalid or
|
|
1554
|
+
* `defaultHeaders` names an identity header, or the client is to decode and
|
|
1555
|
+
* was given no schemas.
|
|
1543
1556
|
*/
|
|
1544
1557
|
const make = (options, httpClient) => fromKernel(makeKernel(options, httpClient));
|
|
1545
1558
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as withOperation, d as path, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { b as withOperation, d as path, n as generatedOperation } from "./generated-operations-D1e__yar.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/tool-router/session/files.ts
|
|
4
4
|
const OP_LIST = generatedOperation("toolRouter.session.files.list");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { b as withOperation, n as generatedOperation } from "./generated-operations-D1e__yar.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/files.ts
|
|
4
4
|
const OP_LIST = generatedOperation("files.list");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { b as withOperation, n as generatedOperation } from "./generated-operations-D1e__yar.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/mcp/generate.ts
|
|
4
4
|
const OP_URL = generatedOperation("mcp.generate.url");
|
package/dist/{generated-deprecated-inputs-BggrSLuP.mjs → generated-deprecated-inputs--L5LHDO_.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as APIError } from "./error-D9cG225M.mjs";
|
|
2
|
-
import { g as safeJSON, l as castToError } from "./generated-operations-
|
|
2
|
+
import { g as safeJSON, l as castToError } from "./generated-operations-D1e__yar.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/api-promise.ts
|
|
5
5
|
/**
|