@composio/client 2.0.0-rc.6 → 2.0.0-rc.7
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 +51 -3
- package/dist/{api-key-revocation-CSNyQo6m.mjs → api-key-revocation-BPURmRJx.mjs} +1 -1
- package/dist/{auth-configs-DAS68quO.mjs → auth-configs-DYkxc_It.mjs} +1 -1
- package/dist/{auth-BpeKOtkr.mjs → auth-iqhTmHa9.mjs} +1 -1
- package/dist/{clanker-CdTX3VrN.mjs → clanker-CzfQDpuy.mjs} +1 -1
- package/dist/{cli-BwAcGYUv.mjs → cli-Er9a9rGs.mjs} +2 -2
- package/dist/{client-Cu0FrKmX.d.mts → client-CcYk8XXt.d.mts} +3849 -684
- package/dist/{connected-accounts-Bri1c8_y.mjs → connected-accounts-DDgErVLd.mjs} +8 -1
- package/dist/{consumer-C-Sr8ilJ.mjs → consumer-BPCfagDO.mjs} +2 -2
- package/dist/custom-Cs019zcM.mjs +31 -0
- package/dist/{custom-CZ41HKuF.mjs → custom-VZyKhTTG.mjs} +2 -1
- package/dist/error-DPPtjCl1.mjs +75 -0
- package/dist/{files-nKAca7MP.mjs → files-C1QA5PTw.mjs} +1 -1
- package/dist/{files-Bw-q9jvQ.mjs → files-hhfQpMSx.mjs} +1 -1
- package/dist/{generate-22I_8m4Q.mjs → generate-iwm8bHWW.mjs} +2 -1
- package/dist/{generated-operations-BQO2JR1q.mjs → generated-operations-CJ7bbwvC.mjs} +40 -74
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +41 -26
- package/dist/keyring-Dkcbmstv.mjs +17 -0
- package/dist/{link-D68LLK4Z.mjs → link-Dk-yWRgc.mjs} +1 -1
- package/dist/{logs-D51p26Kb.mjs → logs-DnZUgpLM.mjs} +3 -3
- package/dist/{manage-D8yy7vO-.mjs → manage-DfB0PrkM.mjs} +1 -1
- package/dist/{mcp-YTLiywS3.mjs → mcp-BfStaFrR.mjs} +12 -3
- package/dist/{org-Cutt-dnU.mjs → org-bXBx5whI.mjs} +6 -6
- package/dist/{owner-ZVJeAZpU.mjs → owner-BlJ0zURX.mjs} +1 -1
- package/dist/pagination.d.mts +56 -0
- package/dist/pagination.mjs +50 -0
- package/dist/{project-DKhGV5KP.mjs → project-B0ax2ZoD.mjs} +1 -1
- package/dist/{project-D0caI7O8.mjs → project-BeWloPLZ.mjs} +1 -1
- package/dist/{project-BObd0xOa.mjs → project-BnMfaNjl.mjs} +1 -1
- package/dist/{project-C8ZpAfnV.mjs → project-CGi2urmA.mjs} +1 -1
- package/dist/{realtime-CtLFFEf8.mjs → realtime-BNfA3u3B.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 +2 -0
- package/dist/resources/custom.mjs +3 -0
- 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 +2 -0
- package/dist/resources/keyring.mjs +3 -0
- 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-Byj-qri0.mjs → session-B78Twedd.mjs} +1 -1
- package/dist/{session-BFEAeE9G.mjs → session-D3Azxyck.mjs} +2 -2
- package/dist/{tool-router-CyuTk9t-.mjs → tool-router-Bx1tQfx-.mjs} +1 -1
- package/dist/{toolkits-Bck41m7-.mjs → toolkits-DFC0JDvT.mjs} +15 -1
- package/dist/{tools-D8kKy_iy.mjs → tools-Bv2Txlel.mjs} +1 -1
- package/dist/{tools-Bvbrgij6.mjs → tools-EL1x4SBb.mjs} +2 -1
- package/dist/{trigger-instances-B3oj-IJW.mjs → trigger-instances-BI-STHc4.mjs} +2 -2
- package/dist/{triggers-types-CHJxtojA.mjs → triggers-types-CJWi--Kk.mjs} +1 -1
- package/dist/{triggers-CirhOG03.mjs → triggers-vTkWuT5B.mjs} +1 -1
- package/dist/{usage-CD53euIq.mjs → usage-DspCrBUv.mjs} +1 -1
- package/dist/{usage-C5VBnFfd.mjs → usage-cffJ-ds7.mjs} +1 -1
- package/dist/{webhook-endpoints-gTzzFJ1c.mjs → webhook-endpoints-DSN8i5KN.mjs} +1 -1
- package/dist/{webhook-subscriptions-bZFki65N.mjs → webhook-subscriptions-Bgsnr29T.mjs} +1 -1
- package/package.json +17 -5
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/connected-accounts.ts
|
|
4
4
|
const OP_CREATE = generatedOperation("connectedAccounts.create");
|
|
5
5
|
const OP_RETRIEVE = generatedOperation("connectedAccounts.retrieve");
|
|
6
6
|
const OP_LIST = generatedOperation("connectedAccounts.list");
|
|
7
7
|
const OP_DELETE = generatedOperation("connectedAccounts.delete");
|
|
8
|
+
const OP_COMPLETE_AUTH = generatedOperation("connectedAccounts.completeAuth");
|
|
8
9
|
const OP_PATCH = generatedOperation("connectedAccounts.patch");
|
|
9
10
|
const OP_REFRESH = generatedOperation("connectedAccounts.refresh");
|
|
10
11
|
const OP_REVOKE = generatedOperation("connectedAccounts.revoke");
|
|
@@ -42,6 +43,12 @@ var ConnectedAccounts = class {
|
|
|
42
43
|
...options
|
|
43
44
|
}));
|
|
44
45
|
}
|
|
46
|
+
completeAuth(body, options) {
|
|
47
|
+
return this.#client.post("/api/v3.1/connected_accounts/complete_auth", withOperation(OP_COMPLETE_AUTH, {
|
|
48
|
+
body,
|
|
49
|
+
...options
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
45
52
|
patch(nanoid, body = {}, options) {
|
|
46
53
|
return this.#client.patch(path`/api/v3.1/connected_accounts/${nanoid}`, withOperation(OP_PATCH, {
|
|
47
54
|
body,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as withOperation, n as generatedOperation, p as mergeHeaders } from "./generated-operations-
|
|
2
|
-
import { t as Project } from "./project-
|
|
1
|
+
import { c as withOperation, n as generatedOperation, p as mergeHeaders } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
|
+
import { t as Project } from "./project-BeWloPLZ.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,31 @@
|
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.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, options) {
|
|
14
|
+
return this.#client.delete(path`/api/v3.1/custom/toolkits/${slug}`, withOperation(OP_DELETE_TOOLKIT, { ...options }));
|
|
15
|
+
}
|
|
16
|
+
sync(body, options) {
|
|
17
|
+
return this.#client.post("/api/v3.1/custom/toolkits/sync", withOperation(OP_SYNC, {
|
|
18
|
+
body,
|
|
19
|
+
...options
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
upsert(body, options) {
|
|
23
|
+
return this.#client.post("/api/v3.1/custom/toolkits/upsert", withOperation(OP_UPSERT, {
|
|
24
|
+
body,
|
|
25
|
+
...options
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Custom as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/mcp/custom.ts
|
|
4
4
|
const OP_CREATE = generatedOperation("mcp.custom.create");
|
|
@@ -11,6 +11,7 @@ var Custom = class {
|
|
|
11
11
|
constructor(client) {
|
|
12
12
|
this.#client = client;
|
|
13
13
|
}
|
|
14
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
14
15
|
create(body, options) {
|
|
15
16
|
return this.#client.post("/api/v3.1/mcp/servers/custom", withOperation(OP_CREATE, {
|
|
16
17
|
body,
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
//#region src/compat/error.ts
|
|
2
|
+
/**
|
|
3
|
+
* Stainless-compatible error hierarchy.
|
|
4
|
+
*
|
|
5
|
+
* Downstream code does `instanceof` checks and reads `status` / `error` /
|
|
6
|
+
* `headers` on these classes (see docs/research/drop-in-contract.md §4), so
|
|
7
|
+
* both the class names and the inheritance chain are part of the drop-in
|
|
8
|
+
* contract: `BadRequestError extends APIError extends ComposioError extends Error`.
|
|
9
|
+
*/
|
|
10
|
+
var ComposioError = class extends Error {};
|
|
11
|
+
var APIError = class APIError extends ComposioError {
|
|
12
|
+
/** HTTP status for the response that caused the error. */
|
|
13
|
+
status;
|
|
14
|
+
/** HTTP headers of the response that caused the error. */
|
|
15
|
+
headers;
|
|
16
|
+
/** JSON body of the response that caused the error. */
|
|
17
|
+
error;
|
|
18
|
+
constructor(status, error, message, headers) {
|
|
19
|
+
super(APIError.makeMessage(status, error, message));
|
|
20
|
+
this.status = status;
|
|
21
|
+
this.headers = headers;
|
|
22
|
+
this.error = error;
|
|
23
|
+
}
|
|
24
|
+
static makeMessage(status, error, message) {
|
|
25
|
+
const errorMessage = error?.message;
|
|
26
|
+
const msg = errorMessage ? typeof errorMessage === "string" ? errorMessage : JSON.stringify(errorMessage) : error ? JSON.stringify(error) : message;
|
|
27
|
+
if (status && msg) return `${status} ${msg}`;
|
|
28
|
+
if (status) return `${status} status code (no body)`;
|
|
29
|
+
if (msg) return msg;
|
|
30
|
+
return "(no status code or body)";
|
|
31
|
+
}
|
|
32
|
+
static generate(status, errorResponse, message, headers) {
|
|
33
|
+
if (!status || !headers) return new APIConnectionError({
|
|
34
|
+
message,
|
|
35
|
+
cause: errorResponse
|
|
36
|
+
});
|
|
37
|
+
const error = errorResponse;
|
|
38
|
+
if (status === 400) return new BadRequestError(status, error, message, headers);
|
|
39
|
+
if (status === 401) return new AuthenticationError(status, error, message, headers);
|
|
40
|
+
if (status === 403) return new PermissionDeniedError(status, error, message, headers);
|
|
41
|
+
if (status === 404) return new NotFoundError(status, error, message, headers);
|
|
42
|
+
if (status === 409) return new ConflictError(status, error, message, headers);
|
|
43
|
+
if (status === 422) return new UnprocessableEntityError(status, error, message, headers);
|
|
44
|
+
if (status === 429) return new RateLimitError(status, error, message, headers);
|
|
45
|
+
if (status >= 500) return new InternalServerError(status, error, message, headers);
|
|
46
|
+
return new APIError(status, error, message, headers);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var APIUserAbortError = class extends APIError {
|
|
50
|
+
constructor({ message } = {}) {
|
|
51
|
+
super(void 0, void 0, message ?? "Request was aborted.", void 0);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var APIConnectionError = class extends APIError {
|
|
55
|
+
constructor({ message, cause }) {
|
|
56
|
+
super(void 0, void 0, message ?? "Connection error.", void 0);
|
|
57
|
+
if (cause) this.cause = cause;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var APIConnectionTimeoutError = class extends APIConnectionError {
|
|
61
|
+
constructor({ message } = {}) {
|
|
62
|
+
super({ message: message ?? "Request timed out." });
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var BadRequestError = class extends APIError {};
|
|
66
|
+
var AuthenticationError = class extends APIError {};
|
|
67
|
+
var PermissionDeniedError = class extends APIError {};
|
|
68
|
+
var NotFoundError = class extends APIError {};
|
|
69
|
+
var ConflictError = class extends APIError {};
|
|
70
|
+
var UnprocessableEntityError = class extends APIError {};
|
|
71
|
+
var RateLimitError = class extends APIError {};
|
|
72
|
+
var InternalServerError = class extends APIError {};
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export { AuthenticationError as a, ConflictError as c, PermissionDeniedError as d, RateLimitError as f, APIUserAbortError as i, InternalServerError as l, APIConnectionTimeoutError as n, BadRequestError as o, UnprocessableEntityError as p, APIError as r, ComposioError as s, APIConnectionError as t, NotFoundError as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.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 { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.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 { c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/mcp/generate.ts
|
|
4
4
|
const OP_URL = generatedOperation("mcp.generate.url");
|
|
@@ -11,6 +11,7 @@ var Generate = class {
|
|
|
11
11
|
constructor(client) {
|
|
12
12
|
this.#client = client;
|
|
13
13
|
}
|
|
14
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
14
15
|
url(body, options) {
|
|
15
16
|
return this.#client.post("/api/v3.1/mcp/servers/generate", withOperation(OP_URL, {
|
|
16
17
|
body,
|
|
@@ -1,77 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Stainless-compatible error hierarchy.
|
|
4
|
-
*
|
|
5
|
-
* Downstream code does `instanceof` checks and reads `status` / `error` /
|
|
6
|
-
* `headers` on these classes (see docs/research/drop-in-contract.md §4), so
|
|
7
|
-
* both the class names and the inheritance chain are part of the drop-in
|
|
8
|
-
* contract: `BadRequestError extends APIError extends ComposioError extends Error`.
|
|
9
|
-
*/
|
|
10
|
-
var ComposioError = class extends Error {};
|
|
11
|
-
var APIError = class APIError extends ComposioError {
|
|
12
|
-
/** HTTP status for the response that caused the error. */
|
|
13
|
-
status;
|
|
14
|
-
/** HTTP headers of the response that caused the error. */
|
|
15
|
-
headers;
|
|
16
|
-
/** JSON body of the response that caused the error. */
|
|
17
|
-
error;
|
|
18
|
-
constructor(status, error, message, headers) {
|
|
19
|
-
super(APIError.makeMessage(status, error, message));
|
|
20
|
-
this.status = status;
|
|
21
|
-
this.headers = headers;
|
|
22
|
-
this.error = error;
|
|
23
|
-
}
|
|
24
|
-
static makeMessage(status, error, message) {
|
|
25
|
-
const errorMessage = error?.message;
|
|
26
|
-
const msg = errorMessage ? typeof errorMessage === "string" ? errorMessage : JSON.stringify(errorMessage) : error ? JSON.stringify(error) : message;
|
|
27
|
-
if (status && msg) return `${status} ${msg}`;
|
|
28
|
-
if (status) return `${status} status code (no body)`;
|
|
29
|
-
if (msg) return msg;
|
|
30
|
-
return "(no status code or body)";
|
|
31
|
-
}
|
|
32
|
-
static generate(status, errorResponse, message, headers) {
|
|
33
|
-
if (!status || !headers) return new APIConnectionError({
|
|
34
|
-
message,
|
|
35
|
-
cause: errorResponse
|
|
36
|
-
});
|
|
37
|
-
const error = errorResponse;
|
|
38
|
-
if (status === 400) return new BadRequestError(status, error, message, headers);
|
|
39
|
-
if (status === 401) return new AuthenticationError(status, error, message, headers);
|
|
40
|
-
if (status === 403) return new PermissionDeniedError(status, error, message, headers);
|
|
41
|
-
if (status === 404) return new NotFoundError(status, error, message, headers);
|
|
42
|
-
if (status === 409) return new ConflictError(status, error, message, headers);
|
|
43
|
-
if (status === 422) return new UnprocessableEntityError(status, error, message, headers);
|
|
44
|
-
if (status === 429) return new RateLimitError(status, error, message, headers);
|
|
45
|
-
if (status >= 500) return new InternalServerError(status, error, message, headers);
|
|
46
|
-
return new APIError(status, error, message, headers);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var APIUserAbortError = class extends APIError {
|
|
50
|
-
constructor({ message } = {}) {
|
|
51
|
-
super(void 0, void 0, message ?? "Request was aborted.", void 0);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
var APIConnectionError = class extends APIError {
|
|
55
|
-
constructor({ message, cause }) {
|
|
56
|
-
super(void 0, void 0, message ?? "Connection error.", void 0);
|
|
57
|
-
if (cause) this.cause = cause;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
var APIConnectionTimeoutError = class extends APIConnectionError {
|
|
61
|
-
constructor({ message } = {}) {
|
|
62
|
-
super({ message: message ?? "Request timed out." });
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
var BadRequestError = class extends APIError {};
|
|
66
|
-
var AuthenticationError = class extends APIError {};
|
|
67
|
-
var PermissionDeniedError = class extends APIError {};
|
|
68
|
-
var NotFoundError = class extends APIError {};
|
|
69
|
-
var ConflictError = class extends APIError {};
|
|
70
|
-
var UnprocessableEntityError = class extends APIError {};
|
|
71
|
-
var RateLimitError = class extends APIError {};
|
|
72
|
-
var InternalServerError = class extends APIError {};
|
|
1
|
+
import { i as APIUserAbortError, n as APIConnectionTimeoutError, s as ComposioError, t as APIConnectionError } from "./error-DPPtjCl1.mjs";
|
|
73
2
|
|
|
74
|
-
//#endregion
|
|
75
3
|
//#region src/compat/headers.ts
|
|
76
4
|
const hasEntries = (value) => typeof value === "object" && value !== null && "append" in value && typeof value.append === "function" && "delete" in value && typeof value.delete === "function" && "entries" in value && typeof value.entries === "function" && "get" in value && typeof value.get === "function";
|
|
77
5
|
const isHeaders = (value) => value instanceof Headers || hasEntries(value);
|
|
@@ -1515,6 +1443,12 @@ const GENERATED_OPERATIONS = [
|
|
|
1515
1443
|
chain: ["connectedAccounts", "delete"],
|
|
1516
1444
|
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
1517
1445
|
},
|
|
1446
|
+
{
|
|
1447
|
+
method: "delete",
|
|
1448
|
+
path: "/api/v3.1/custom/toolkits/{slug}",
|
|
1449
|
+
chain: ["custom", "deleteToolkit"],
|
|
1450
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
1451
|
+
},
|
|
1518
1452
|
{
|
|
1519
1453
|
method: "delete",
|
|
1520
1454
|
path: "/api/v3.1/mcp/servers/{serverId}/instances/{instanceId}",
|
|
@@ -1643,6 +1577,11 @@ const GENERATED_OPERATIONS = [
|
|
|
1643
1577
|
"retrieve"
|
|
1644
1578
|
]
|
|
1645
1579
|
},
|
|
1580
|
+
{
|
|
1581
|
+
method: "get",
|
|
1582
|
+
path: "/api/v3.1/keyring/transfer_keys",
|
|
1583
|
+
chain: ["keyring", "listTransferKeys"]
|
|
1584
|
+
},
|
|
1646
1585
|
{
|
|
1647
1586
|
method: "get",
|
|
1648
1587
|
path: "/api/v3.1/logs/tool_execution/{id}",
|
|
@@ -1784,6 +1723,11 @@ const GENERATED_OPERATIONS = [
|
|
|
1784
1723
|
chain: ["toolkits", "retrieve"],
|
|
1785
1724
|
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
1786
1725
|
},
|
|
1726
|
+
{
|
|
1727
|
+
method: "get",
|
|
1728
|
+
path: "/api/v3.1/toolkits/{toolkit_slug}/scopes/grant_context",
|
|
1729
|
+
chain: ["toolkits", "retrieveScopesGrantContext"]
|
|
1730
|
+
},
|
|
1787
1731
|
{
|
|
1788
1732
|
method: "get",
|
|
1789
1733
|
path: "/api/v3.1/tools",
|
|
@@ -1948,6 +1892,11 @@ const GENERATED_OPERATIONS = [
|
|
|
1948
1892
|
path: "/api/v3.1/connected_accounts",
|
|
1949
1893
|
chain: ["connectedAccounts", "create"]
|
|
1950
1894
|
},
|
|
1895
|
+
{
|
|
1896
|
+
method: "post",
|
|
1897
|
+
path: "/api/v3.1/connected_accounts/complete_auth",
|
|
1898
|
+
chain: ["connectedAccounts", "completeAuth"]
|
|
1899
|
+
},
|
|
1951
1900
|
{
|
|
1952
1901
|
method: "post",
|
|
1953
1902
|
path: "/api/v3.1/connected_accounts/link",
|
|
@@ -1964,6 +1913,18 @@ const GENERATED_OPERATIONS = [
|
|
|
1964
1913
|
path: "/api/v3.1/connected_accounts/{nanoid}/revoke",
|
|
1965
1914
|
chain: ["connectedAccounts", "revoke"]
|
|
1966
1915
|
},
|
|
1916
|
+
{
|
|
1917
|
+
method: "post",
|
|
1918
|
+
path: "/api/v3.1/custom/toolkits/sync",
|
|
1919
|
+
chain: ["custom", "sync"],
|
|
1920
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
method: "post",
|
|
1924
|
+
path: "/api/v3.1/custom/toolkits/upsert",
|
|
1925
|
+
chain: ["custom", "upsert"],
|
|
1926
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
1927
|
+
},
|
|
1967
1928
|
{
|
|
1968
1929
|
method: "post",
|
|
1969
1930
|
path: "/api/v3.1/files/upload/request",
|
|
@@ -2201,6 +2162,11 @@ const GENERATED_OPERATIONS = [
|
|
|
2201
2162
|
path: "/api/v3.1/toolkits/multi",
|
|
2202
2163
|
chain: ["toolkits", "retrieveMulti"]
|
|
2203
2164
|
},
|
|
2165
|
+
{
|
|
2166
|
+
method: "post",
|
|
2167
|
+
path: "/api/v3.1/toolkits/{toolkit_slug}/scopes/recommended",
|
|
2168
|
+
chain: ["toolkits", "recommendScopes"]
|
|
2169
|
+
},
|
|
2204
2170
|
{
|
|
2205
2171
|
method: "post",
|
|
2206
2172
|
path: "/api/v3.1/tools/execute/proxy",
|
|
@@ -2273,4 +2239,4 @@ const generatedOperation = (chainKey) => {
|
|
|
2273
2239
|
};
|
|
2274
2240
|
|
|
2275
2241
|
//#endregion
|
|
2276
|
-
export {
|
|
2242
|
+
export { path as a, withOperation as c, assertCredentialTransport as d, parseHTTPURL as f, makeRequest as i, inspectDeprecatedInputs as l, generatedOperation as n, readOperation as o, mergeHeaders as p, castToError as r, safeJSON as s, GENERATED_OPERATIONS as t, inspectDeprecation as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $r as
|
|
1
|
+
import { $r as SessionToolsParams, Ar as Session, Br as SessionExecuteParams, Ci as NotFoundError, Di as APIPromise, Ei as UnprocessableEntityError, Fr as SessionCreateParams, Gr as SessionPatchResponse, Hr as SessionLinkParams, Ir as SessionCreateResponse, Jr as SessionRetrieveResponse, Kr as SessionProxyExecuteParams, Lr as SessionDeleteResponse, Mr as SessionAttachResponse, Nr as SessionConfigHistoryParams, Pr as SessionConfigHistoryResponse, Qr as SessionToolkitsResponse, Rr as SessionExecuteMetaParams, Si as InternalServerError, Ti as RateLimitError, Ur as SessionLinkResponse, Vr as SessionExecuteResponse, Wr as SessionPatchParams, Xr as SessionSearchResponse, Yr as SessionSearchParams, Zr as SessionToolkitsParams, _i as APIUserAbortError, a as Logger, ai as FileDeleteParams, bi as ComposioError, ci as FileListResponse, di as FetchTransportDefaults, ei as SessionToolsResponse, fi as Transport, gi as APIError, hi as APIConnectionTimeoutError, i as LogLevel, ii as FileCreateUploadURLResponse, jr as SessionAttachParams, kr as ToolRouter, li as Files, mi as APIConnectionError, n as Composio, ni as FileCreateDownloadURLResponse, oi as FileDeleteResponse, pi as createFetchTransport, qr as SessionProxyExecuteResponse, r as EnvironmentMap, ri as FileCreateUploadURLParams, si as FileListParams, t as ClientOptions, ti as FileCreateDownloadURLParams, ui as RequestOptions, vi as AuthenticationError, wi as PermissionDeniedError, xi as ConflictError, yi as BadRequestError, zr as SessionExecuteMetaResponse } from "./client-CcYk8XXt.mjs";
|
|
2
2
|
//#region src/version.d.ts
|
|
3
|
-
declare const VERSION = "2.0.0-rc.
|
|
3
|
+
declare const VERSION = "2.0.0-rc.7";
|
|
4
4
|
//#endregion
|
|
5
5
|
export { APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BadRequestError, type ClientOptions, Composio, Composio as default, ComposioError, ConflictError, type EnvironmentMap, type FetchTransportDefaults, type FileCreateDownloadURLParams, type FileCreateDownloadURLResponse, type FileCreateUploadURLParams, type FileCreateUploadURLResponse, type FileDeleteParams, type FileDeleteResponse, type FileListParams, type FileListResponse, Files, InternalServerError, type LogLevel, type Logger, NotFoundError, PermissionDeniedError, RateLimitError, type RequestOptions, Session, type SessionAttachParams, type SessionAttachResponse, type SessionConfigHistoryParams, type SessionConfigHistoryResponse, type SessionCreateParams, type SessionCreateResponse, type SessionDeleteResponse, type SessionExecuteMetaParams, type SessionExecuteMetaResponse, type SessionExecuteParams, type SessionExecuteResponse, type SessionLinkParams, type SessionLinkResponse, type SessionPatchParams, type SessionPatchResponse, type SessionProxyExecuteParams, type SessionProxyExecuteResponse, type SessionRetrieveResponse, type SessionSearchParams, type SessionSearchResponse, type SessionToolkitsParams, type SessionToolkitsResponse, type SessionToolsParams, type SessionToolsResponse, ToolRouter, type Transport, UnprocessableEntityError, VERSION, createFetchTransport };
|
package/dist/index.mjs
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
1
|
+
import { a as AuthenticationError, c as ConflictError, d as PermissionDeniedError, f as RateLimitError, i as APIUserAbortError, l as InternalServerError, n as APIConnectionTimeoutError, o as BadRequestError, p as UnprocessableEntityError, r as APIError, s as ComposioError, t as APIConnectionError, u as NotFoundError } from "./error-DPPtjCl1.mjs";
|
|
2
|
+
import { d as assertCredentialTransport, f as parseHTTPURL, i as makeRequest, l as inspectDeprecatedInputs, o as readOperation, p as mergeHeaders, r as castToError, s as safeJSON, t as GENERATED_OPERATIONS, u as inspectDeprecation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
3
|
+
import { t as ApiKeyRevocation } from "./api-key-revocation-BPURmRJx.mjs";
|
|
4
|
+
import { t as AuthConfigs } from "./auth-configs-DYkxc_It.mjs";
|
|
5
|
+
import { t as Auth } from "./auth-iqhTmHa9.mjs";
|
|
6
|
+
import { t as Cli } from "./cli-Er9a9rGs.mjs";
|
|
7
|
+
import { t as ConnectedAccounts } from "./connected-accounts-DDgErVLd.mjs";
|
|
8
|
+
import { t as Custom } from "./custom-Cs019zcM.mjs";
|
|
9
|
+
import { t as Files$1 } from "./files-C1QA5PTw.mjs";
|
|
10
|
+
import { t as Keyring } from "./keyring-Dkcbmstv.mjs";
|
|
11
|
+
import { t as Link } from "./link-Dk-yWRgc.mjs";
|
|
12
|
+
import { t as Logs } from "./logs-DnZUgpLM.mjs";
|
|
13
|
+
import { t as Mcp } from "./mcp-BfStaFrR.mjs";
|
|
11
14
|
import { t as Migration } from "./migration-CBhnoN-Y.mjs";
|
|
12
|
-
import { t as Org } from "./org-
|
|
13
|
-
import { t as Project } from "./project-
|
|
14
|
-
import { t as Files } from "./files-
|
|
15
|
-
import { t as Session } from "./session-
|
|
16
|
-
import { t as ToolRouter } from "./tool-router-
|
|
17
|
-
import { t as Toolkits } from "./toolkits-
|
|
18
|
-
import { t as Tools } from "./tools-
|
|
19
|
-
import { t as TriggerInstances } from "./trigger-instances-
|
|
20
|
-
import { t as TriggersTypes } from "./triggers-types-
|
|
21
|
-
import { t as WebhookEndpoints } from "./webhook-endpoints-
|
|
22
|
-
import { t as WebhookSubscriptions } from "./webhook-subscriptions-
|
|
15
|
+
import { t as Org } from "./org-bXBx5whI.mjs";
|
|
16
|
+
import { t as Project } from "./project-B0ax2ZoD.mjs";
|
|
17
|
+
import { t as Files } from "./files-hhfQpMSx.mjs";
|
|
18
|
+
import { t as Session } from "./session-D3Azxyck.mjs";
|
|
19
|
+
import { t as ToolRouter } from "./tool-router-Bx1tQfx-.mjs";
|
|
20
|
+
import { t as Toolkits } from "./toolkits-DFC0JDvT.mjs";
|
|
21
|
+
import { t as Tools } from "./tools-EL1x4SBb.mjs";
|
|
22
|
+
import { t as TriggerInstances } from "./trigger-instances-BI-STHc4.mjs";
|
|
23
|
+
import { t as TriggersTypes } from "./triggers-types-CJWi--Kk.mjs";
|
|
24
|
+
import { t as WebhookEndpoints } from "./webhook-endpoints-DSN8i5KN.mjs";
|
|
25
|
+
import { t as WebhookSubscriptions } from "./webhook-subscriptions-Bgsnr29T.mjs";
|
|
23
26
|
|
|
24
27
|
//#region src/compat/api-promise.ts
|
|
25
28
|
/**
|
|
@@ -113,7 +116,11 @@ const GENERATED_DEPRECATED_INPUTS = /* @__PURE__ */ new Map([
|
|
|
113
116
|
["authConfigs.update", [{
|
|
114
117
|
wire: "restrict_to_following_tools",
|
|
115
118
|
in: "body",
|
|
116
|
-
replacementWire:
|
|
119
|
+
replacementWire: null
|
|
120
|
+
}, {
|
|
121
|
+
wire: "tool_access_config",
|
|
122
|
+
in: "body",
|
|
123
|
+
replacementWire: null
|
|
117
124
|
}]],
|
|
118
125
|
["tools.execute", [{
|
|
119
126
|
wire: "entity_id",
|
|
@@ -125,6 +132,10 @@ const GENERATED_DEPRECATED_INPUTS = /* @__PURE__ */ new Map([
|
|
|
125
132
|
replacementWire: null
|
|
126
133
|
}]],
|
|
127
134
|
["tools.list", [{
|
|
135
|
+
wire: "auth_config_ids",
|
|
136
|
+
in: "query",
|
|
137
|
+
replacementWire: null
|
|
138
|
+
}, {
|
|
128
139
|
wire: "search",
|
|
129
140
|
in: "query",
|
|
130
141
|
replacementWire: "query"
|
|
@@ -211,12 +222,14 @@ const createClientResources = (client) => ({
|
|
|
211
222
|
webhookEndpoints: new WebhookEndpoints(client),
|
|
212
223
|
org: new Org(client),
|
|
213
224
|
auth: new Auth(client),
|
|
214
|
-
apiKeyRevocation: new ApiKeyRevocation(client)
|
|
225
|
+
apiKeyRevocation: new ApiKeyRevocation(client),
|
|
226
|
+
custom: new Custom(client),
|
|
227
|
+
keyring: new Keyring(client)
|
|
215
228
|
});
|
|
216
229
|
|
|
217
230
|
//#endregion
|
|
218
231
|
//#region src/version.ts
|
|
219
|
-
const VERSION = "2.0.0-rc.
|
|
232
|
+
const VERSION = "2.0.0-rc.7";
|
|
220
233
|
|
|
221
234
|
//#endregion
|
|
222
235
|
//#region src/compat/client.ts
|
|
@@ -262,7 +275,7 @@ const LOG_LEVELS = {
|
|
|
262
275
|
};
|
|
263
276
|
/**
|
|
264
277
|
* `logLevel` is a plain string on the public surface and may arrive from
|
|
265
|
-
* `
|
|
278
|
+
* `COMPOSIO_LOG_LEVEL`, so it can hold anything. An unrecognized value falls back to
|
|
266
279
|
* the default rather than silencing the client or making it shout.
|
|
267
280
|
*/
|
|
268
281
|
const isLogLevel = (value) => value !== void 0 && Object.hasOwn(LOG_LEVELS, value);
|
|
@@ -293,7 +306,7 @@ const resolveClientOptions = (input) => {
|
|
|
293
306
|
allowedHTTPOrigin: input.allowedHTTPOrigin ?? null,
|
|
294
307
|
baseURL,
|
|
295
308
|
environment: input.environment ?? "production",
|
|
296
|
-
logLevel: input.logLevel ?? readEnvironment("
|
|
309
|
+
logLevel: input.logLevel ?? readEnvironment("COMPOSIO_LOG_LEVEL") ?? "warn"
|
|
297
310
|
};
|
|
298
311
|
options.defaultHeaders = mergeEnvironmentHeaders(readEnvironment("COMPOSIO_CUSTOM_HEADERS"), input.defaultHeaders);
|
|
299
312
|
if (hasExplicitEnvironment) options[environmentReader] = emptyEnvironmentReader;
|
|
@@ -527,6 +540,8 @@ Composio.WebhookEndpoints = WebhookEndpoints;
|
|
|
527
540
|
Composio.Org = Org;
|
|
528
541
|
Composio.Auth = Auth;
|
|
529
542
|
Composio.ApiKeyRevocation = ApiKeyRevocation;
|
|
543
|
+
Composio.Custom = Custom;
|
|
544
|
+
Composio.Keyring = Keyring;
|
|
530
545
|
|
|
531
546
|
//#endregion
|
|
532
547
|
//#region src/compat/transport.ts
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/keyring.ts
|
|
4
|
+
const OP_LIST_TRANSFER_KEYS = generatedOperation("keyring.listTransferKeys");
|
|
5
|
+
/** OpenAPI resource for `keyring`. */
|
|
6
|
+
var Keyring = class {
|
|
7
|
+
#client;
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.#client = client;
|
|
10
|
+
}
|
|
11
|
+
listTransferKeys(options) {
|
|
12
|
+
return this.#client.get("/api/v3.1/keyring/transfer_keys", withOperation(OP_LIST_TRANSFER_KEYS, { ...options }));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Keyring as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/link.ts
|
|
4
4
|
const OP_CREATE = generatedOperation("link.create");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
2
|
-
import { t as Triggers } from "./triggers-
|
|
3
|
-
import { t as Tools } from "./tools-
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
|
+
import { t as Triggers } from "./triggers-vTkWuT5B.mjs";
|
|
3
|
+
import { t as Tools } from "./tools-Bv2Txlel.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/resources/logs/logs.ts
|
|
6
6
|
const OP_CREATE_TOOL_EXECUTION = generatedOperation("logs.createToolExecution");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compat/resources/trigger-instances/manage.ts
|
|
4
4
|
const OP_UPDATE = generatedOperation("triggerInstances.manage.update");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
2
|
-
import { t as Custom } from "./custom-
|
|
3
|
-
import { t as Generate } from "./generate-
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
|
+
import { t as Custom } from "./custom-VZyKhTTG.mjs";
|
|
3
|
+
import { t as Generate } from "./generate-iwm8bHWW.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/resources/mcp/mcp.ts
|
|
6
6
|
const OP_CREATE = generatedOperation("mcp.create");
|
|
@@ -28,46 +28,55 @@ var Mcp = class {
|
|
|
28
28
|
this.custom = new Custom(client);
|
|
29
29
|
this.generate = new Generate(client);
|
|
30
30
|
}
|
|
31
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
31
32
|
create(body, options) {
|
|
32
33
|
return this.#client.post("/api/v3.1/mcp/servers", withOperation(OP_CREATE, {
|
|
33
34
|
body,
|
|
34
35
|
...options
|
|
35
36
|
}));
|
|
36
37
|
}
|
|
38
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
37
39
|
retrieve(id, options) {
|
|
38
40
|
return this.#client.get(path`/api/v3.1/mcp/${id}`, withOperation(OP_RETRIEVE, { ...options }));
|
|
39
41
|
}
|
|
42
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
40
43
|
update(id, body = {}, options) {
|
|
41
44
|
return this.#client.patch(path`/api/v3.1/mcp/${id}`, withOperation(OP_UPDATE, {
|
|
42
45
|
body,
|
|
43
46
|
...options
|
|
44
47
|
}));
|
|
45
48
|
}
|
|
49
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
46
50
|
list(query = {}, options) {
|
|
47
51
|
return this.#client.get("/api/v3.1/mcp/servers", withOperation(OP_LIST, {
|
|
48
52
|
query,
|
|
49
53
|
...options
|
|
50
54
|
}));
|
|
51
55
|
}
|
|
56
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
52
57
|
delete(id, options) {
|
|
53
58
|
return this.#client.delete(path`/api/v3.1/mcp/${id}`, withOperation(OP_DELETE, { ...options }));
|
|
54
59
|
}
|
|
60
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
55
61
|
createInstance(serverID, body, options) {
|
|
56
62
|
return this.#client.post(path`/api/v3.1/mcp/servers/${serverID}/instances`, withOperation(OP_CREATE_INSTANCE, {
|
|
57
63
|
body,
|
|
58
64
|
...options
|
|
59
65
|
}));
|
|
60
66
|
}
|
|
67
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
61
68
|
deleteInstance(instanceID, params, options) {
|
|
62
69
|
const { serverId } = params;
|
|
63
70
|
return this.#client.delete(path`/api/v3.1/mcp/servers/${serverId}/instances/${instanceID}`, withOperation(OP_DELETE_INSTANCE, { ...options }));
|
|
64
71
|
}
|
|
72
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
65
73
|
listInstances(serverID, query = {}, options) {
|
|
66
74
|
return this.#client.get(path`/api/v3.1/mcp/servers/${serverID}/instances`, withOperation(OP_LIST_INSTANCES, {
|
|
67
75
|
query,
|
|
68
76
|
...options
|
|
69
77
|
}));
|
|
70
78
|
}
|
|
79
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
71
80
|
retrieveApp(appKey, query = {}, options) {
|
|
72
81
|
return this.#client.get(path`/api/v3.1/mcp/app/${appKey}`, withOperation(OP_RETRIEVE_APP, {
|
|
73
82
|
query,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as withOperation, n as generatedOperation } from "./generated-operations-
|
|
2
|
-
import { t as Clanker } from "./clanker-
|
|
3
|
-
import { t as Consumer } from "./consumer-
|
|
4
|
-
import { t as Owner } from "./owner-
|
|
5
|
-
import { t as Project } from "./project-
|
|
6
|
-
import { t as Usage } from "./usage-
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-CJ7bbwvC.mjs";
|
|
2
|
+
import { t as Clanker } from "./clanker-CzfQDpuy.mjs";
|
|
3
|
+
import { t as Consumer } from "./consumer-BPCfagDO.mjs";
|
|
4
|
+
import { t as Owner } from "./owner-BlJ0zURX.mjs";
|
|
5
|
+
import { t as Project } from "./project-BnMfaNjl.mjs";
|
|
6
|
+
import { t as Usage } from "./usage-DspCrBUv.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/compat/resources/org/org.ts
|
|
9
9
|
const OP_LIST = generatedOperation("org.list");
|