@composio/client 2.0.0-rc.2 → 2.0.0-rc.3
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 +32 -0
- package/dist/{api-key-revocation-BqiqlJh6.mjs → api-key-revocation-Cbokr5zZ.mjs} +4 -3
- package/dist/{auth-ClFXmN5T.mjs → auth-CNDyZgjw.mjs} +1 -1
- package/dist/{auth-configs-COkEdwlP.mjs → auth-configs-4u-8I2K7.mjs} +17 -11
- package/dist/{clanker-1ptspWLR.mjs → clanker-D6FjS8Lj.mjs} +4 -3
- package/dist/{cli-BWTXVRT4.mjs → cli-LIRIGe7k.mjs} +11 -8
- package/dist/{client-D5v0_f-k.d.mts → client-ByIYmMzt.d.mts} +30 -2
- package/dist/{connected-accounts-DK24qYIM.mjs → connected-accounts-Bqtl42g0.mjs} +23 -15
- package/dist/{consumer-Do3lg_vI.mjs → consumer-BauHsJXO.mjs} +5 -4
- package/dist/{custom-CH7n4Dyd.mjs → custom-CGqEBUWj.mjs} +4 -3
- package/dist/{files-DoNtYu2Q.mjs → files-BYEsIET1.mjs} +7 -5
- package/dist/{files-lfGzAnJ_.mjs → files-DkH2-irQ.mjs} +13 -9
- package/dist/{generate-B7ClqhN0.mjs → generate-DTodgjHD.mjs} +4 -3
- package/dist/{request-zLX87M09.mjs → generated-operations-WtSYnmW0.mjs} +843 -16
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +127 -800
- package/dist/{link-NsFv9L3R.mjs → link-DL53IiYh.mjs} +4 -3
- package/dist/{logs-BhCTVSZE.mjs → logs-DPgNkEde.mjs} +8 -6
- package/dist/{manage-7vQYn-gu.mjs → manage-DDmuMlFb.mjs} +6 -4
- package/dist/mcp-CS9s4sDK.mjs +82 -0
- package/dist/{org-C12wx9QM.mjs → org-9gTqtmtc.mjs} +9 -8
- package/dist/{owner-D4ghEkrK.mjs → owner-EZzWtfQx.mjs} +1 -1
- package/dist/{project-By-OBe-4.mjs → project-4Ol46ZwD.mjs} +4 -3
- package/dist/project-CKmDHyu_.mjs +47 -0
- package/dist/{project-DgdqyoZJ.mjs → project-DeRwedA-.mjs} +1 -1
- package/dist/{project-Cnr9eceg.mjs → project-uN9dGkls.mjs} +4 -3
- package/dist/realtime-C8DEUgai.mjs +28 -0
- 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/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/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/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-CmqSfXtq.mjs → session-DWQaRfV_.mjs} +39 -26
- package/dist/{session-Ci0MoTTn.mjs → session-EJK1YmKD.mjs} +3 -2
- package/dist/{tool-router-DbmIxiU5.mjs → tool-router-CqRP0_gv.mjs} +1 -1
- package/dist/toolkits-B3eGuBu0.mjs +48 -0
- package/dist/tools-B4uip2mE.mjs +33 -0
- package/dist/{tools-BO1wTIiE.mjs → tools-fb-vXe-l.mjs} +21 -14
- package/dist/{trigger-instances-CoEohjcv.mjs → trigger-instances-BCL5DJ0o.mjs} +8 -6
- package/dist/{triggers-BwsETpsM.mjs → triggers-DnDhI69h.mjs} +6 -4
- package/dist/triggers-types-HHDB0mLH.mjs +34 -0
- package/dist/{usage-D6ahTV_Y.mjs → usage-B6vtknow.mjs} +7 -5
- package/dist/{usage-BJsJ4nsd.mjs → usage-CzAfsIc4.mjs} +7 -5
- package/dist/{webhook-endpoints-CyWYVPMe.mjs → webhook-endpoints-DRJgQ6s0.mjs} +15 -10
- package/dist/webhook-subscriptions-WcdnIkGU.mjs +55 -0
- package/package.json +3 -1
- package/dist/mcp-r-SWyCDh.mjs +0 -73
- package/dist/project-DzrdSIis.mjs +0 -42
- package/dist/realtime-DHJnO2Ye.mjs +0 -26
- package/dist/toolkits-BUWB3p_C.mjs +0 -43
- package/dist/tools-B4kHPHbe.mjs +0 -30
- package/dist/triggers-types-DmOurxxx.mjs +0 -31
- package/dist/webhook-subscriptions-BgnCTUGn.mjs +0 -48
package/README.md
CHANGED
|
@@ -17,6 +17,32 @@ const session = await composio.toolRouter.session.create({ user_id: 'user_123' }
|
|
|
17
17
|
console.log(session.session_id, session.mcp.url)
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
Use `fromEnv` when configuration must come from a specific environment snapshot instead of the
|
|
21
|
+
host process. Explicit options replace mapped values, so this is safe for tests, workers, and
|
|
22
|
+
applications that load configuration themselves:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
const composio = Composio.fromEnv(config, { environment: 'staging' })
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`fromEnv` recognizes `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY`, `COMPOSIO_ORG_API_KEY`,
|
|
29
|
+
`COMPOSIO_BASE_URL`, `COMPOSIO_CUSTOM_HEADERS`, and `COMPOSIO_LOG`. Derived clients created with
|
|
30
|
+
`withOptions()` keep using the resolved snapshot and do not fall back to ambient values.
|
|
31
|
+
|
|
32
|
+
Inject a `Transport` when an application or test needs to own HTTP dispatch. The transport receives
|
|
33
|
+
a complete `Request`; retries, credential-safe redirects, timeouts, and response parsing stay in the
|
|
34
|
+
client:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import Composio, { createFetchTransport } from '@composio/client'
|
|
38
|
+
|
|
39
|
+
const transport = createFetchTransport({ fetch: instrumentedFetch })
|
|
40
|
+
const composio = new Composio({ apiKey, transport })
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Existing `fetch` and `fetchOptions` constructor options remain supported. They cannot be combined
|
|
44
|
+
with `transport` because a request can have only one HTTP dispatcher.
|
|
45
|
+
|
|
20
46
|
## Development
|
|
21
47
|
|
|
22
48
|
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).
|
|
@@ -31,6 +57,8 @@ pnpm codegen:check # verify committed src/compat/resources matches the generato
|
|
|
31
57
|
pnpm test # unit tests (MSW mocks) + codegen tests
|
|
32
58
|
pnpm build # tsdown → dist/ (runs publint + arethetypeswrong)
|
|
33
59
|
pnpm test:pack # pack the real tarball, typecheck + import every drop-in subpath
|
|
60
|
+
pnpm benchmark:baseline # capture the dist/ a benchmark run compares against
|
|
61
|
+
pnpm benchmark # score SDK overhead against that baseline and against Stainless
|
|
34
62
|
pnpm test:contract # live API tests; requires COMPOSIO_API_KEY (copy .env.example to .env)
|
|
35
63
|
pnpm refresh-spec # re-fetch spec/openapi.json from the live backend
|
|
36
64
|
```
|
|
@@ -49,3 +77,7 @@ uv run ruff check
|
|
|
49
77
|
uv run mypy src scripts
|
|
50
78
|
uv run pytest
|
|
51
79
|
```
|
|
80
|
+
|
|
81
|
+
Client-overhead measurements use a deterministic in-memory transport and are documented in
|
|
82
|
+
[`docs/benchmarks/client-overhead.md`](./docs/benchmarks/client-overhead.md). They do not measure API
|
|
83
|
+
latency.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/api-key-revocation.ts
|
|
4
|
+
const OP_CREATE = generatedOperation("apiKeyRevocation.create");
|
|
4
5
|
/**
|
|
5
6
|
* Spec-surface `client.apiKeyRevocation` resource: the 1-method public
|
|
6
7
|
* leaked-key revocation surface of the v3.1 spec
|
|
@@ -13,10 +14,10 @@ var ApiKeyRevocation = class {
|
|
|
13
14
|
this.#client = client;
|
|
14
15
|
}
|
|
15
16
|
create(body, options) {
|
|
16
|
-
return this.#client.post(
|
|
17
|
+
return this.#client.post("/api/v3.1/api_key_revocation", withOperation(OP_CREATE, {
|
|
17
18
|
body,
|
|
18
19
|
...options
|
|
19
|
-
});
|
|
20
|
+
}));
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/auth-configs.ts
|
|
4
|
+
const OP_CREATE = generatedOperation("authConfigs.create");
|
|
5
|
+
const OP_RETRIEVE = generatedOperation("authConfigs.retrieve");
|
|
6
|
+
const OP_UPDATE = generatedOperation("authConfigs.update");
|
|
7
|
+
const OP_LIST = generatedOperation("authConfigs.list");
|
|
8
|
+
const OP_DELETE = generatedOperation("authConfigs.delete");
|
|
9
|
+
const OP_UPDATE_STATUS = generatedOperation("authConfigs.updateStatus");
|
|
4
10
|
/**
|
|
5
11
|
* Stainless-shaped `client.authConfigs` resource: the exact 6-method surface of
|
|
6
12
|
* `@composio/client` (create/retrieve/update/list/delete/updateStatus),
|
|
@@ -12,35 +18,35 @@ var AuthConfigs = class {
|
|
|
12
18
|
this.#client = client;
|
|
13
19
|
}
|
|
14
20
|
create(body, options) {
|
|
15
|
-
return this.#client.post(
|
|
21
|
+
return this.#client.post("/api/v3.1/auth_configs", withOperation(OP_CREATE, {
|
|
16
22
|
body,
|
|
17
23
|
...options
|
|
18
|
-
});
|
|
24
|
+
}));
|
|
19
25
|
}
|
|
20
26
|
retrieve(nanoid, options) {
|
|
21
|
-
return this.#client.get(path`/api/v3.1/auth_configs/${nanoid}`, { ...options });
|
|
27
|
+
return this.#client.get(path`/api/v3.1/auth_configs/${nanoid}`, withOperation(OP_RETRIEVE, { ...options }));
|
|
22
28
|
}
|
|
23
29
|
update(nanoid, body, options) {
|
|
24
|
-
return this.#client.patch(path`/api/v3.1/auth_configs/${nanoid}`, {
|
|
30
|
+
return this.#client.patch(path`/api/v3.1/auth_configs/${nanoid}`, withOperation(OP_UPDATE, {
|
|
25
31
|
body,
|
|
26
32
|
...options
|
|
27
|
-
});
|
|
33
|
+
}));
|
|
28
34
|
}
|
|
29
35
|
list(query = {}, options) {
|
|
30
|
-
return this.#client.get(
|
|
36
|
+
return this.#client.get("/api/v3.1/auth_configs", withOperation(OP_LIST, {
|
|
31
37
|
query,
|
|
32
38
|
...options
|
|
33
|
-
});
|
|
39
|
+
}));
|
|
34
40
|
}
|
|
35
41
|
delete(nanoid, query = {}, options) {
|
|
36
|
-
return this.#client.delete(path`/api/v3.1/auth_configs/${nanoid}`, {
|
|
42
|
+
return this.#client.delete(path`/api/v3.1/auth_configs/${nanoid}`, withOperation(OP_DELETE, {
|
|
37
43
|
query,
|
|
38
44
|
...options
|
|
39
|
-
});
|
|
45
|
+
}));
|
|
40
46
|
}
|
|
41
47
|
updateStatus(status, params, options) {
|
|
42
48
|
const { nanoid } = params;
|
|
43
|
-
return this.#client.patch(path`/api/v3.1/auth_configs/${nanoid}/${status}`, { ...options });
|
|
49
|
+
return this.#client.patch(path`/api/v3.1/auth_configs/${nanoid}/${status}`, withOperation(OP_UPDATE_STATUS, { ...options }));
|
|
44
50
|
}
|
|
45
51
|
};
|
|
46
52
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/org/clanker.ts
|
|
4
|
+
const OP_CREATE_CLAIM = generatedOperation("org.clanker.createClaim");
|
|
4
5
|
/**
|
|
5
6
|
* Spec-surface `client.org.clanker` resource: the 1-method claim surface of
|
|
6
7
|
* the v3.1 spec (`POST /org/clanker/create_claim`), never published by
|
|
@@ -12,10 +13,10 @@ var Clanker = class {
|
|
|
12
13
|
this.#client = client;
|
|
13
14
|
}
|
|
14
15
|
createClaim(body, options) {
|
|
15
|
-
return this.#client.post(
|
|
16
|
+
return this.#client.post("/api/v3.1/org/clanker/create_claim", withOperation(OP_CREATE_CLAIM, {
|
|
16
17
|
body,
|
|
17
18
|
...options
|
|
18
|
-
});
|
|
19
|
+
}));
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { c as mergeHeaders,
|
|
2
|
-
import { t as Realtime } from "./realtime-
|
|
1
|
+
import { c as withOperation, f as mergeHeaders, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
|
+
import { t as Realtime } from "./realtime-C8DEUgai.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/resources/cli/cli.ts
|
|
5
|
+
const OP_CREATE_CODACT_FAILURE = generatedOperation("cli.createCodactFailure");
|
|
6
|
+
const OP_CREATE_SESSION = generatedOperation("cli.createSession");
|
|
7
|
+
const OP_GET_SESSION = generatedOperation("cli.getSession");
|
|
5
8
|
/**
|
|
6
9
|
* Stainless-shaped `client.cli` resource: the 2-method published CLI
|
|
7
10
|
* authentication surface of `@composio/client` (createSession/getSession)
|
|
@@ -17,23 +20,23 @@ var Cli = class {
|
|
|
17
20
|
}
|
|
18
21
|
createCodactFailure(params, options) {
|
|
19
22
|
const { "x-user-api-key": xUserApiKey, ...body } = params;
|
|
20
|
-
return this.#client.post(
|
|
23
|
+
return this.#client.post("/api/v3.1/cli/codact_failures", withOperation(OP_CREATE_CODACT_FAILURE, {
|
|
21
24
|
body,
|
|
22
25
|
...options,
|
|
23
26
|
headers: mergeHeaders([{ ...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0 }, options?.headers])
|
|
24
|
-
});
|
|
27
|
+
}));
|
|
25
28
|
}
|
|
26
29
|
createSession(body = {}, options) {
|
|
27
|
-
return this.#client.post(
|
|
30
|
+
return this.#client.post("/api/v3.1/cli/create-session", withOperation(OP_CREATE_SESSION, {
|
|
28
31
|
body,
|
|
29
32
|
...options
|
|
30
|
-
});
|
|
33
|
+
}));
|
|
31
34
|
}
|
|
32
35
|
getSession(query, options) {
|
|
33
|
-
return this.#client.get(
|
|
36
|
+
return this.#client.get("/api/v3.1/cli/get-session", withOperation(OP_GET_SESSION, {
|
|
34
37
|
query,
|
|
35
38
|
...options
|
|
36
|
-
});
|
|
39
|
+
}));
|
|
37
40
|
}
|
|
38
41
|
};
|
|
39
42
|
Cli.Realtime = Realtime;
|
|
@@ -20891,6 +20891,21 @@ type GetApiV31ToolkitsChangelogResponses = {
|
|
|
20891
20891
|
};
|
|
20892
20892
|
};
|
|
20893
20893
|
//#endregion
|
|
20894
|
+
//#region src/compat/transport.d.ts
|
|
20895
|
+
/** Sends one prepared HTTP request without retries or redirect handling. */
|
|
20896
|
+
interface Transport {
|
|
20897
|
+
send(request: Request): Promise<Response>;
|
|
20898
|
+
}
|
|
20899
|
+
type KernelOwnedRequestInitKey = 'method' | 'headers' | 'body' | 'signal' | 'redirect';
|
|
20900
|
+
/** Fetch defaults that cannot replace fields owned by the request kernel. */
|
|
20901
|
+
type FetchTransportDefaults<Extra extends object = object> = Omit<RequestInit & Extra, KernelOwnedRequestInitKey>;
|
|
20902
|
+
type FetchImplementation<Extra extends object> = (input: RequestInfo | URL, init?: FetchTransportDefaults<Extra>) => Promise<Response>;
|
|
20903
|
+
/** Creates a transport backed by the supplied or global fetch function. */
|
|
20904
|
+
declare const createFetchTransport: <Extra extends object = object>(options?: {
|
|
20905
|
+
fetch?: FetchImplementation<Extra> | undefined;
|
|
20906
|
+
defaults?: FetchTransportDefaults<Extra> | undefined;
|
|
20907
|
+
}) => Transport;
|
|
20908
|
+
//#endregion
|
|
20894
20909
|
//#region src/compat/request.d.ts
|
|
20895
20910
|
/**
|
|
20896
20911
|
* Per-request options bag — the Stainless last-positional-argument contract.
|
|
@@ -22643,6 +22658,8 @@ declare const environments: {
|
|
|
22643
22658
|
local: string;
|
|
22644
22659
|
};
|
|
22645
22660
|
type Environment = keyof typeof environments;
|
|
22661
|
+
/** Environment values consumed by {@link Composio.fromEnv}. */
|
|
22662
|
+
type EnvironmentMap = Readonly<Record<string, string | undefined>>;
|
|
22646
22663
|
type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
|
|
22647
22664
|
interface Logger {
|
|
22648
22665
|
error: (...args: unknown[]) => void;
|
|
@@ -22696,6 +22713,8 @@ interface ClientOptions {
|
|
|
22696
22713
|
fetchOptions?: RequestInit | undefined;
|
|
22697
22714
|
/** Custom `fetch` implementation; defaults to the global `fetch`. */
|
|
22698
22715
|
fetch?: typeof globalThis.fetch | undefined;
|
|
22716
|
+
/** Sends fully prepared requests. Mutually exclusive with `fetch` and `fetchOptions`. */
|
|
22717
|
+
transport?: Transport | undefined;
|
|
22699
22718
|
/** Maximum retries for temporary failures. Defaults to 2. */
|
|
22700
22719
|
maxRetries?: number | undefined;
|
|
22701
22720
|
/** Headers sent on every request; per-request headers win, `null` deletes. */
|
|
@@ -22724,7 +22743,16 @@ declare class Composio {
|
|
|
22724
22743
|
logger: Logger;
|
|
22725
22744
|
logLevel: LogLevel | undefined;
|
|
22726
22745
|
fetchOptions: RequestInit | undefined;
|
|
22727
|
-
constructor(
|
|
22746
|
+
constructor(input?: ClientOptions);
|
|
22747
|
+
/**
|
|
22748
|
+
* Constructs a client from a caller-supplied environment snapshot.
|
|
22749
|
+
*
|
|
22750
|
+
* Unlike the compatibility constructor, this method never reads ambient
|
|
22751
|
+
* process or Deno state. Explicit options replace values from `environment`;
|
|
22752
|
+
* in particular, an explicit named environment replaces
|
|
22753
|
+
* `COMPOSIO_BASE_URL`, and `apiKey: null` disables a mapped API key.
|
|
22754
|
+
*/
|
|
22755
|
+
static fromEnv<T extends typeof Composio>(this: T, environment: EnvironmentMap, options?: ClientOptions): InstanceType<T>;
|
|
22728
22756
|
/** Returns a new client reusing the current options with `options` merged over them. */
|
|
22729
22757
|
withOptions(options: Partial<ClientOptions>): this;
|
|
22730
22758
|
get<Rsp>(path: string, opts?: RequestOptions & {
|
|
@@ -22787,4 +22815,4 @@ declare namespace Composio {
|
|
|
22787
22815
|
export { ApiKeyRevocation, type ApiKeyRevocationCreateResponse, type ApiKeyRevocationCreateParams };
|
|
22788
22816
|
}
|
|
22789
22817
|
//#endregion
|
|
22790
|
-
export {
|
|
22818
|
+
export { WebhookSubscriptionCreateResponse as $, ConnectedAccountRefreshResponse as $n, FileListParams$1 as $r, McpRetrieveResponse as $t, ProjectResolveParams as A, AuthConfigUpdateParams as An, SessionExecuteMetaParams as Ar, CliCreateCodactFailureResponse as At, ProjectRegenerateAPIKeyResponse as B, Toolkits as Bn, SessionRetrieveResponse as Br, McpCreateInstanceParams as Bt, Project$1 as C, AuthConfigCreateParams as Cn, SessionAttachParams as Cr, Tools as Ct, ConsumerListConnectedToolkitsParams as D, AuthConfigListParams as Dn, SessionCreateParams as Dr, Triggers as Dt, Consumer as E, AuthConfigDeleteResponse as En, SessionConfigHistoryResponse as Er, TriggerRetrieveResponse as Et, ProjectCreateResponse as F, ToolkitListParams as Fn, SessionLinkResponse as Fr, Realtime as Ft, WebhookEndpointListResponse as G, ConnectedAccountCreateResponse as Gn, SessionToolsParams as Gr, McpDeleteInstanceResponse as Gt, WebhookEndpointCreateParams as H, LinkCreateParams as Hn, SessionSearchResponse as Hr, McpCreateParams as Ht, ProjectDeleteParams as I, ToolkitListResponse as In, SessionPatchParams as Ir, RealtimeAuthParams as It, WebhookEndpointRetrieveResponse as J, ConnectedAccountListParams as Jn, FileCreateDownloadURLResponse as Jr, McpListInstancesResponse as Jt, WebhookEndpointReplaceParams as K, ConnectedAccountDeleteParams as Kn, SessionToolsResponse as Kr, McpDeleteResponse as Kt, ProjectDeleteResponse as L, ToolkitRetrieveCategoriesResponse as Ln, SessionPatchResponse as Lr, RealtimeAuthResponse as Lt, Owner as M, AuthConfigUpdateStatusParams as Mn, SessionExecuteParams as Mr, CliCreateSessionResponse as Mt, Project$3 as N, AuthConfigUpdateStatusResponse as Nn, SessionExecuteResponse as Nr, CliGetSessionParams as Nt, ConsumerListConnectedToolkitsResponse as O, AuthConfigListResponse as On, SessionCreateResponse as Or, Cli as Ot, ProjectCreateParams as P, AuthConfigs as Pn, SessionLinkParams as Pr, CliGetSessionResponse as Pt, WebhookSubscriptionCreateParams as Q, ConnectedAccountRefreshParams as Qn, FileDeleteResponse as Qr, McpRetrieveAppResponse as Qt, ProjectListParams$1 as R, ToolkitRetrieveParams as Rn, SessionProxyExecuteParams as Rr, RealtimeCredentialsResponse as Rt, UsageRetrieveSummaryResponse as S, TriggersTypes as Sn, Session$1 as Sr, ToolRetrieveResponse as St, ProjectListResponse as T, AuthConfigDeleteParams as Tn, SessionConfigHistoryParams as Tr, TriggerListResponse as Tt, WebhookEndpointCreateResponse as U, LinkCreateResponse as Un, SessionToolkitsParams as Ur, McpCreateResponse as Ut, ProjectRetrieveResponse as V, Link as Vn, SessionSearchParams as Vr, McpCreateInstanceResponse as Vt, WebhookEndpointListParams as W, ConnectedAccountCreateParams as Wn, SessionToolkitsResponse as Wr, McpDeleteInstanceParams as Wt, WebhookEndpointUpdateResponse as X, ConnectedAccountPatchParams as Xn, FileCreateUploadURLResponse as Xr, McpListResponse as Xt, WebhookEndpointUpdateParams as Y, ConnectedAccountListResponse as Yn, FileCreateUploadURLParams as Yr, McpListParams as Yt, WebhookEndpoints as Z, ConnectedAccountPatchResponse as Zn, FileDeleteParams as Zr, McpRetrieveAppParams as Zt, ClankerCreateClaimResponse as _, RateLimitError as _i, TriggersTypeListParams as _n, ToolRetrieveEnumResponse as _r, LogRetrieveToolExecutionResponse as _t, Logger as a, createFetchTransport as ai, Custom as an, FileCreatePresignedURLResponse as ar, WebhookSubscriptionRotateSecretResponse as at, UsageRetrieveResponse as b, TriggersTypeRetrieveParams as bn, Tools$1 as br, ToolListParams as bt, ApiKeyRevocationCreateResponse as c, APIError as ci, TriggerInstanceListActiveParams as cn, Files as cr, WebhookSubscriptions as ct, SessionRetrieveInfoResponse as d, BadRequestError as di, TriggerInstanceUpsertResponse as dn, ToolGetInputParams as dr, UsageRetrieveParams$1 as dt, FileListResponse$1 as ei, McpUpdateParams as en, ConnectedAccountRetrieveResponse as er, WebhookSubscriptionDeleteResponse as et, Org as f, ComposioError as fi, TriggerInstances as fn, ToolGetInputResponse as fr, UsageRetrieveResponse$1 as ft, ClankerCreateClaimParams as g, PermissionDeniedError as gi, ManageUpdateResponse as gn, ToolProxyResponse as gr, LogCreateToolExecutionResponse as gt, Clanker as h, NotFoundError as hi, ManageUpdateParams as hn, ToolProxyParams as hr, LogCreateToolExecutionParams as ht, LogLevel as i, Transport as ii, GenerateURLResponse as in, FileCreatePresignedURLParams as ir, WebhookSubscriptionRetrieveResponse as it, ProjectResolveResponse as j, AuthConfigUpdateResponse as jn, SessionExecuteMetaResponse as jr, CliCreateSessionParams as jt, Project$2 as k, AuthConfigRetrieveResponse as kn, SessionDeleteResponse as kr, CliCreateCodactFailureParams as kt, Auth as l, APIUserAbortError as li, TriggerInstanceListActiveResponse as ln, ToolExecuteParams as lr, Project$4 as lt, OrgListResponse as m, InternalServerError as mi, ManageDeleteResponse as mn, ToolListResponse$1 as mr, UsageRetrieveSummaryResponse$1 as mt, Composio as n, RequestOptions as ni, Generate as nn, ConnectedAccountUpdateStatusResponse as nr, WebhookSubscriptionListParams as nt, ApiKeyRevocation as o, APIConnectionError as oi, CustomCreateParams as on, FileListParams as or, WebhookSubscriptionUpdateParams as ot, OrgListParams as p, ConflictError as pi, Manage as pn, ToolListParams$1 as pr, UsageRetrieveSummaryParams$1 as pt, WebhookEndpointReplaceResponse as q, ConnectedAccountDeleteResponse as qn, FileCreateDownloadURLParams as qr, McpListInstancesParams as qt, EnvironmentMap as r, FetchTransportDefaults as ri, GenerateURLParams as rn, ConnectedAccounts as rr, WebhookSubscriptionListResponse as rt, ApiKeyRevocationCreateParams as s, APIConnectionTimeoutError as si, CustomCreateResponse as sn, FileListResponse as sr, WebhookSubscriptionUpdateResponse as st, ClientOptions as t, Files$1 as ti, McpUpdateResponse as tn, ConnectedAccountUpdateStatusParams as tr, WebhookSubscriptionListEventTypesResponse as tt, Session as u, AuthenticationError as ui, TriggerInstanceUpsertParams as un, ToolExecuteResponse as ur, Usage$1 as ut, Usage as v, UnprocessableEntityError as vi, TriggersTypeListResponse as vn, ToolRetrieveParams as vr, Logs as vt, ProjectListParams as w, AuthConfigCreateResponse as wn, SessionAttachResponse as wr, TriggerListParams as wt, UsageRetrieveSummaryParams as x, TriggersTypeRetrieveResponse as xn, ToolRouter as xr, ToolListResponse as xt, UsageRetrieveParams as y, APIPromise as yi, TriggersTypeRetrieveEnumResponse as yn, ToolRetrieveResponse$1 as yr, ToolListFieldsResponse as yt, ProjectListResponse$1 as z, ToolkitRetrieveResponse as zn, SessionProxyExecuteResponse as zr, Mcp as zt };
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/connected-accounts.ts
|
|
4
|
+
const OP_CREATE = generatedOperation("connectedAccounts.create");
|
|
5
|
+
const OP_RETRIEVE = generatedOperation("connectedAccounts.retrieve");
|
|
6
|
+
const OP_LIST = generatedOperation("connectedAccounts.list");
|
|
7
|
+
const OP_DELETE = generatedOperation("connectedAccounts.delete");
|
|
8
|
+
const OP_PATCH = generatedOperation("connectedAccounts.patch");
|
|
9
|
+
const OP_REFRESH = generatedOperation("connectedAccounts.refresh");
|
|
10
|
+
const OP_REVOKE = generatedOperation("connectedAccounts.revoke");
|
|
11
|
+
const OP_UPDATE_STATUS = generatedOperation("connectedAccounts.updateStatus");
|
|
4
12
|
/**
|
|
5
13
|
* Stainless-shaped `client.connectedAccounts` resource: the 7-method published
|
|
6
14
|
* surface of `@composio/client` (create/retrieve/list/delete/patch/refresh/
|
|
@@ -14,52 +22,52 @@ var ConnectedAccounts = class {
|
|
|
14
22
|
this.#client = client;
|
|
15
23
|
}
|
|
16
24
|
create(body, options) {
|
|
17
|
-
return this.#client.post(
|
|
25
|
+
return this.#client.post("/api/v3.1/connected_accounts", withOperation(OP_CREATE, {
|
|
18
26
|
body,
|
|
19
27
|
...options
|
|
20
|
-
});
|
|
28
|
+
}));
|
|
21
29
|
}
|
|
22
30
|
retrieve(nanoid, options) {
|
|
23
|
-
return this.#client.get(path`/api/v3.1/connected_accounts/${nanoid}`, { ...options });
|
|
31
|
+
return this.#client.get(path`/api/v3.1/connected_accounts/${nanoid}`, withOperation(OP_RETRIEVE, { ...options }));
|
|
24
32
|
}
|
|
25
33
|
list(query = {}, options) {
|
|
26
|
-
return this.#client.get(
|
|
34
|
+
return this.#client.get("/api/v3.1/connected_accounts", withOperation(OP_LIST, {
|
|
27
35
|
query,
|
|
28
36
|
...options
|
|
29
|
-
});
|
|
37
|
+
}));
|
|
30
38
|
}
|
|
31
39
|
delete(nanoid, query = {}, options) {
|
|
32
|
-
return this.#client.delete(path`/api/v3.1/connected_accounts/${nanoid}`, {
|
|
40
|
+
return this.#client.delete(path`/api/v3.1/connected_accounts/${nanoid}`, withOperation(OP_DELETE, {
|
|
33
41
|
query,
|
|
34
42
|
...options
|
|
35
|
-
});
|
|
43
|
+
}));
|
|
36
44
|
}
|
|
37
45
|
patch(nanoid, body = {}, options) {
|
|
38
|
-
return this.#client.patch(path`/api/v3.1/connected_accounts/${nanoid}`, {
|
|
46
|
+
return this.#client.patch(path`/api/v3.1/connected_accounts/${nanoid}`, withOperation(OP_PATCH, {
|
|
39
47
|
body,
|
|
40
48
|
...options
|
|
41
|
-
});
|
|
49
|
+
}));
|
|
42
50
|
}
|
|
43
51
|
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
44
52
|
refresh(nanoid, params = {}, options) {
|
|
45
53
|
const { query_redirect_url, body_redirect_url, ...body } = params ?? {};
|
|
46
|
-
return this.#client.post(path`/api/v3.1/connected_accounts/${nanoid}/refresh`, {
|
|
54
|
+
return this.#client.post(path`/api/v3.1/connected_accounts/${nanoid}/refresh`, withOperation(OP_REFRESH, {
|
|
47
55
|
query: { redirect_url: query_redirect_url },
|
|
48
56
|
body: {
|
|
49
57
|
...body,
|
|
50
58
|
redirect_url: body_redirect_url
|
|
51
59
|
},
|
|
52
60
|
...options
|
|
53
|
-
});
|
|
61
|
+
}));
|
|
54
62
|
}
|
|
55
63
|
revoke(nanoid, options) {
|
|
56
|
-
return this.#client.post(path`/api/v3.1/connected_accounts/${nanoid}/revoke`, { ...options });
|
|
64
|
+
return this.#client.post(path`/api/v3.1/connected_accounts/${nanoid}/revoke`, withOperation(OP_REVOKE, { ...options }));
|
|
57
65
|
}
|
|
58
66
|
updateStatus(nanoID, body, options) {
|
|
59
|
-
return this.#client.patch(path`/api/v3.1/connected_accounts/${nanoID}/status`, {
|
|
67
|
+
return this.#client.patch(path`/api/v3.1/connected_accounts/${nanoID}/status`, withOperation(OP_UPDATE_STATUS, {
|
|
60
68
|
body,
|
|
61
69
|
...options
|
|
62
|
-
});
|
|
70
|
+
}));
|
|
63
71
|
}
|
|
64
72
|
};
|
|
65
73
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { c as mergeHeaders,
|
|
2
|
-
import { t as Project } from "./project-
|
|
1
|
+
import { c as withOperation, f as mergeHeaders, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
|
+
import { t as Project } from "./project-4Ol46ZwD.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/resources/org/consumer/consumer.ts
|
|
5
|
+
const OP_LIST_CONNECTED_TOOLKITS = generatedOperation("org.consumer.listConnectedToolkits");
|
|
5
6
|
/**
|
|
6
7
|
* Spec-surface `client.org.consumer` resource: the 1-method consumer surface
|
|
7
8
|
* of the v3.1 spec (listConnectedToolkits over
|
|
@@ -17,14 +18,14 @@ var Consumer = class {
|
|
|
17
18
|
}
|
|
18
19
|
listConnectedToolkits(params, options) {
|
|
19
20
|
const { "x-user-api-key": xUserApiKey, "x-org-id": xOrgId, ...query } = params;
|
|
20
|
-
return this.#client.get(
|
|
21
|
+
return this.#client.get("/api/v3.1/org/consumer/connected_toolkits", withOperation(OP_LIST_CONNECTED_TOOLKITS, {
|
|
21
22
|
query,
|
|
22
23
|
...options,
|
|
23
24
|
headers: mergeHeaders([{
|
|
24
25
|
...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0,
|
|
25
26
|
...xOrgId != null ? { "x-org-id": xOrgId } : void 0
|
|
26
27
|
}, options?.headers])
|
|
27
|
-
});
|
|
28
|
+
}));
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
Consumer.Project = Project;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/mcp/custom.ts
|
|
4
|
+
const OP_CREATE = generatedOperation("mcp.custom.create");
|
|
4
5
|
/**
|
|
5
6
|
* Stainless-shaped `client.mcp.custom` resource: the 1-method custom MCP
|
|
6
7
|
* server sub-surface of `@composio/client` (`POST /mcp/servers/custom`).
|
|
@@ -11,10 +12,10 @@ var Custom = class {
|
|
|
11
12
|
this.#client = client;
|
|
12
13
|
}
|
|
13
14
|
create(body, options) {
|
|
14
|
-
return this.#client.post(
|
|
15
|
+
return this.#client.post("/api/v3.1/mcp/servers/custom", withOperation(OP_CREATE, {
|
|
15
16
|
body,
|
|
16
17
|
...options
|
|
17
|
-
});
|
|
18
|
+
}));
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
21
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/files.ts
|
|
4
|
+
const OP_LIST = generatedOperation("files.list");
|
|
5
|
+
const OP_CREATE_PRESIGNED_URL = generatedOperation("files.createPresignedURL");
|
|
4
6
|
/**
|
|
5
7
|
* Stainless-shaped `client.files` resource: the 2-method project file surface
|
|
6
8
|
* of `@composio/client` (list, createPresignedURL).
|
|
@@ -12,16 +14,16 @@ var Files = class {
|
|
|
12
14
|
}
|
|
13
15
|
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
14
16
|
list(query = {}, options) {
|
|
15
|
-
return this.#client.get(
|
|
17
|
+
return this.#client.get("/api/v3.1/files/list", withOperation(OP_LIST, {
|
|
16
18
|
query,
|
|
17
19
|
...options
|
|
18
|
-
});
|
|
20
|
+
}));
|
|
19
21
|
}
|
|
20
22
|
createPresignedURL(body, options) {
|
|
21
|
-
return this.#client.post(
|
|
23
|
+
return this.#client.post("/api/v3.1/files/upload/request", withOperation(OP_CREATE_PRESIGNED_URL, {
|
|
22
24
|
body,
|
|
23
25
|
...options
|
|
24
|
-
});
|
|
26
|
+
}));
|
|
25
27
|
}
|
|
26
28
|
};
|
|
27
29
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/tool-router/session/files.ts
|
|
4
|
+
const OP_LIST = generatedOperation("toolRouter.session.files.list");
|
|
5
|
+
const OP_DELETE = generatedOperation("toolRouter.session.files.delete");
|
|
6
|
+
const OP_CREATE_DOWNLOAD_URL = generatedOperation("toolRouter.session.files.createDownloadURL");
|
|
7
|
+
const OP_CREATE_UPLOAD_URL = generatedOperation("toolRouter.session.files.createUploadURL");
|
|
4
8
|
/**
|
|
5
9
|
* Stainless-shaped `client.toolRouter.session.files` resource — the 4-method
|
|
6
10
|
* mounts/files sub-surface, `(mountID, params, options?)` with `session_id`
|
|
@@ -13,31 +17,31 @@ var Files = class {
|
|
|
13
17
|
}
|
|
14
18
|
list(mountID, params, options) {
|
|
15
19
|
const { session_id, ...query } = params;
|
|
16
|
-
return this.#client.get(path`/api/v3.1/tool_router/session/${session_id}/mounts/${mountID}/items`, {
|
|
20
|
+
return this.#client.get(path`/api/v3.1/tool_router/session/${session_id}/mounts/${mountID}/items`, withOperation(OP_LIST, {
|
|
17
21
|
query,
|
|
18
22
|
...options
|
|
19
|
-
});
|
|
23
|
+
}));
|
|
20
24
|
}
|
|
21
25
|
delete(mountID, params, options) {
|
|
22
26
|
const { session_id, ...body } = params;
|
|
23
|
-
return this.#client.post(path`/api/v3.1/tool_router/session/${session_id}/mounts/${mountID}/delete`, {
|
|
27
|
+
return this.#client.post(path`/api/v3.1/tool_router/session/${session_id}/mounts/${mountID}/delete`, withOperation(OP_DELETE, {
|
|
24
28
|
body,
|
|
25
29
|
...options
|
|
26
|
-
});
|
|
30
|
+
}));
|
|
27
31
|
}
|
|
28
32
|
createDownloadURL(mountID, params, options) {
|
|
29
33
|
const { session_id, ...body } = params;
|
|
30
|
-
return this.#client.post(path`/api/v3.1/tool_router/session/${session_id}/mounts/${mountID}/download_url`, {
|
|
34
|
+
return this.#client.post(path`/api/v3.1/tool_router/session/${session_id}/mounts/${mountID}/download_url`, withOperation(OP_CREATE_DOWNLOAD_URL, {
|
|
31
35
|
body,
|
|
32
36
|
...options
|
|
33
|
-
});
|
|
37
|
+
}));
|
|
34
38
|
}
|
|
35
39
|
createUploadURL(mountID, params, options) {
|
|
36
40
|
const { session_id, ...body } = params;
|
|
37
|
-
return this.#client.post(path`/api/v3.1/tool_router/session/${session_id}/mounts/${mountID}/upload_url`, {
|
|
41
|
+
return this.#client.post(path`/api/v3.1/tool_router/session/${session_id}/mounts/${mountID}/upload_url`, withOperation(OP_CREATE_UPLOAD_URL, {
|
|
38
42
|
body,
|
|
39
43
|
...options
|
|
40
|
-
});
|
|
44
|
+
}));
|
|
41
45
|
}
|
|
42
46
|
};
|
|
43
47
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-WtSYnmW0.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/mcp/generate.ts
|
|
4
|
+
const OP_URL = generatedOperation("mcp.generate.url");
|
|
4
5
|
/**
|
|
5
6
|
* Stainless-shaped `client.mcp.generate` resource: the 1-method MCP URL
|
|
6
7
|
* generation sub-surface of `@composio/client` (`POST /mcp/servers/generate`).
|
|
@@ -11,10 +12,10 @@ var Generate = class {
|
|
|
11
12
|
this.#client = client;
|
|
12
13
|
}
|
|
13
14
|
url(body, options) {
|
|
14
|
-
return this.#client.post(
|
|
15
|
+
return this.#client.post("/api/v3.1/mcp/servers/generate", withOperation(OP_URL, {
|
|
15
16
|
body,
|
|
16
17
|
...options
|
|
17
|
-
});
|
|
18
|
+
}));
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
21
|
|