@smithery/api 0.15.0 → 0.16.0
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +4 -0
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +4 -0
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +4 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +4 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/connect/connect.d.mts +18 -0
- package/resources/beta/connect/connect.d.mts.map +1 -0
- package/resources/beta/connect/connect.d.ts +18 -0
- package/resources/beta/connect/connect.d.ts.map +1 -0
- package/resources/beta/connect/connect.js +25 -0
- package/resources/beta/connect/connect.js.map +1 -0
- package/resources/beta/connect/connect.mjs +20 -0
- package/resources/beta/connect/connect.mjs.map +1 -0
- package/resources/beta/connect/connections.d.mts +140 -0
- package/resources/beta/connect/connections.d.mts.map +1 -0
- package/resources/beta/connect/connections.d.ts +140 -0
- package/resources/beta/connect/connections.d.ts.map +1 -0
- package/resources/beta/connect/connections.js +81 -0
- package/resources/beta/connect/connections.js.map +1 -0
- package/resources/beta/connect/connections.mjs +77 -0
- package/resources/beta/connect/connections.mjs.map +1 -0
- package/resources/beta/connect/index.d.mts +5 -0
- package/resources/beta/connect/index.d.mts.map +1 -0
- package/resources/beta/connect/index.d.ts +5 -0
- package/resources/beta/connect/index.d.ts.map +1 -0
- package/resources/beta/connect/index.js +13 -0
- package/resources/beta/connect/index.js.map +1 -0
- package/resources/beta/connect/index.mjs +6 -0
- package/resources/beta/connect/index.mjs.map +1 -0
- package/resources/beta/connect/namespaces.d.mts +79 -0
- package/resources/beta/connect/namespaces.d.mts.map +1 -0
- package/resources/beta/connect/namespaces.d.ts +79 -0
- package/resources/beta/connect/namespaces.d.ts.map +1 -0
- package/resources/beta/connect/namespaces.js +53 -0
- package/resources/beta/connect/namespaces.js.map +1 -0
- package/resources/beta/connect/namespaces.mjs +49 -0
- package/resources/beta/connect/namespaces.mjs.map +1 -0
- package/resources/beta/connect/rpc.d.mts +65 -0
- package/resources/beta/connect/rpc.d.mts.map +1 -0
- package/resources/beta/connect/rpc.d.ts +65 -0
- package/resources/beta/connect/rpc.d.ts.map +1 -0
- package/resources/beta/connect/rpc.js +33 -0
- package/resources/beta/connect/rpc.js.map +1 -0
- package/resources/beta/connect/rpc.mjs +29 -0
- package/resources/beta/connect/rpc.mjs.map +1 -0
- package/resources/beta/connect.d.mts +2 -0
- package/resources/beta/connect.d.mts.map +1 -0
- package/resources/beta/connect.d.ts +2 -0
- package/resources/beta/connect.d.ts.map +1 -0
- package/resources/beta/connect.js +6 -0
- package/resources/beta/connect.js.map +1 -0
- package/resources/beta/connect.mjs +3 -0
- package/resources/beta/connect.mjs.map +1 -0
- package/resources/beta/index.d.mts +1 -0
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -0
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +3 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/tools.d.mts +10 -0
- package/resources/beta/tools.d.mts.map +1 -1
- package/resources/beta/tools.d.ts +10 -0
- package/resources/beta/tools.d.ts.map +1 -1
- package/resources/beta/tools.js +10 -0
- package/resources/beta/tools.js.map +1 -1
- package/resources/beta/tools.mjs +10 -0
- package/resources/beta/tools.mjs.map +1 -1
- package/src/resources/beta/beta.ts +6 -0
- package/src/resources/beta/connect/connect.ts +62 -0
- package/src/resources/beta/connect/connections.ts +193 -0
- package/src/resources/beta/connect/index.ts +21 -0
- package/src/resources/beta/connect/namespaces.ts +103 -0
- package/src/resources/beta/connect/rpc.ts +91 -0
- package/src/resources/beta/connect.ts +3 -0
- package/src/resources/beta/index.ts +1 -0
- package/src/resources/beta/tools.ts +10 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
4
|
+
export class Connections extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new MCP connection with the given ID. Requires API key and namespace
|
|
7
|
+
* ownership.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const connection =
|
|
12
|
+
* await client.beta.connect.connections.create(
|
|
13
|
+
* 'connectionId',
|
|
14
|
+
* {
|
|
15
|
+
* namespaceId: 'namespaceId',
|
|
16
|
+
* mcpUrl: 'https://mcp.example.com/sse',
|
|
17
|
+
* name: 'My MCP Server',
|
|
18
|
+
* },
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(connectionID, params, options) {
|
|
23
|
+
const { namespaceId, ...body } = params;
|
|
24
|
+
return this._client.put(path `/connect/namespaces/${namespaceId}/connections/${connectionID}`, {
|
|
25
|
+
body,
|
|
26
|
+
...options,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get details for a specific connection. Requires service token with
|
|
31
|
+
* connections:read scope.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const connection =
|
|
36
|
+
* await client.beta.connect.connections.retrieve(
|
|
37
|
+
* 'connectionId',
|
|
38
|
+
* { namespaceId: 'namespaceId' },
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
retrieve(connectionID, params, options) {
|
|
43
|
+
const { namespaceId } = params;
|
|
44
|
+
return this._client.get(path `/connect/namespaces/${namespaceId}/connections/${connectionID}`, options);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* List all connections in a namespace. Requires service token with
|
|
48
|
+
* connections:read scope.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const connectionsListResponse =
|
|
53
|
+
* await client.beta.connect.connections.list('namespaceId');
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
list(namespaceID, options) {
|
|
57
|
+
return this._client.get(path `/connect/namespaces/${namespaceID}/connections`, options);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Delete a connection and terminate its MCP session. Requires API key and
|
|
61
|
+
* namespace ownership.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const connection =
|
|
66
|
+
* await client.beta.connect.connections.delete(
|
|
67
|
+
* 'connectionId',
|
|
68
|
+
* { namespaceId: 'namespaceId' },
|
|
69
|
+
* );
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
delete(connectionID, params, options) {
|
|
73
|
+
const { namespaceId } = params;
|
|
74
|
+
return this._client.delete(path `/connect/namespaces/${namespaceId}/connections/${connectionID}`, options);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=connections.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/connections.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,YAAoB,EACpB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,WAAW,gBAAgB,YAAY,EAAE,EAAE;YAC5F,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,YAAoB,EACpB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,WAAW,gBAAgB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IACzG,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,WAAmB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,WAAW,cAAc,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,YAAoB,EACpB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,WAAW,gBAAgB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5G,CAAC;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Connect } from "./connect.mjs";
|
|
2
|
+
export { Connections, type Connection, type ConnectionsListResponse, type CreateConnectionRequest, type ConnectionDeleteResponse, type ConnectionCreateParams, type ConnectionRetrieveParams, type ConnectionDeleteParams, } from "./connections.mjs";
|
|
3
|
+
export { Namespaces, type CreateNamespaceRequest, type Namespace, type NamespaceDeleteResponse, type NamespaceCreateParams, } from "./namespaces.mjs";
|
|
4
|
+
export { Rpc, type JsonRpcRequest, type JsonRpcResponse, type RpcCallParams } from "./rpc.mjs";
|
|
5
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE;OACX,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B;OACM,EACL,UAAU,EACV,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC3B;OACM,EAAE,GAAG,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Connect } from "./connect.js";
|
|
2
|
+
export { Connections, type Connection, type ConnectionsListResponse, type CreateConnectionRequest, type ConnectionDeleteResponse, type ConnectionCreateParams, type ConnectionRetrieveParams, type ConnectionDeleteParams, } from "./connections.js";
|
|
3
|
+
export { Namespaces, type CreateNamespaceRequest, type Namespace, type NamespaceDeleteResponse, type NamespaceCreateParams, } from "./namespaces.js";
|
|
4
|
+
export { Rpc, type JsonRpcRequest, type JsonRpcResponse, type RpcCallParams } from "./rpc.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE;OACX,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B;OACM,EACL,UAAU,EACV,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC3B;OACM,EAAE,GAAG,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Rpc = exports.Namespaces = exports.Connections = exports.Connect = void 0;
|
|
5
|
+
var connect_1 = require("./connect.js");
|
|
6
|
+
Object.defineProperty(exports, "Connect", { enumerable: true, get: function () { return connect_1.Connect; } });
|
|
7
|
+
var connections_1 = require("./connections.js");
|
|
8
|
+
Object.defineProperty(exports, "Connections", { enumerable: true, get: function () { return connections_1.Connections; } });
|
|
9
|
+
var namespaces_1 = require("./namespaces.js");
|
|
10
|
+
Object.defineProperty(exports, "Namespaces", { enumerable: true, get: function () { return namespaces_1.Namespaces; } });
|
|
11
|
+
var rpc_1 = require("./rpc.js");
|
|
12
|
+
Object.defineProperty(exports, "Rpc", { enumerable: true, get: function () { return rpc_1.Rpc; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,gDASuB;AARrB,0GAAA,WAAW,OAAA;AASb,8CAMsB;AALpB,wGAAA,UAAU,OAAA;AAMZ,gCAA2F;AAAlF,0FAAA,GAAG,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export { Connect } from "./connect.mjs";
|
|
3
|
+
export { Connections, } from "./connections.mjs";
|
|
4
|
+
export { Namespaces, } from "./namespaces.mjs";
|
|
5
|
+
export { Rpc } from "./rpc.mjs";
|
|
6
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE;OACX,EACL,WAAW,GAQZ;OACM,EACL,UAAU,GAKX;OACM,EAAE,GAAG,EAAiE"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
export declare class Namespaces extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Connect namespace. Requires a valid Smithery API key.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const namespace =
|
|
11
|
+
* await client.beta.connect.namespaces.create({
|
|
12
|
+
* name: 'my-namespace',
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(body: NamespaceCreateParams, options?: RequestOptions): APIPromise<Namespace>;
|
|
17
|
+
/**
|
|
18
|
+
* Get details for a namespace. Requires API key and namespace ownership.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const namespace =
|
|
23
|
+
* await client.beta.connect.namespaces.retrieve(
|
|
24
|
+
* 'namespaceId',
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
retrieve(namespaceID: string, options?: RequestOptions): APIPromise<Namespace>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a namespace and all its connections. Requires API key and namespace
|
|
31
|
+
* ownership.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const namespace =
|
|
36
|
+
* await client.beta.connect.namespaces.delete(
|
|
37
|
+
* 'namespaceId',
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
delete(namespaceID: string, options?: RequestOptions): APIPromise<NamespaceDeleteResponse>;
|
|
42
|
+
}
|
|
43
|
+
export interface CreateNamespaceRequest {
|
|
44
|
+
/**
|
|
45
|
+
* Namespace name (lowercase alphanumeric with hyphens)
|
|
46
|
+
*/
|
|
47
|
+
name: string;
|
|
48
|
+
}
|
|
49
|
+
export interface Namespace {
|
|
50
|
+
/**
|
|
51
|
+
* Unique namespace ID
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
/**
|
|
55
|
+
* ISO 8601 timestamp
|
|
56
|
+
*/
|
|
57
|
+
createdAt: string;
|
|
58
|
+
/**
|
|
59
|
+
* Namespace name
|
|
60
|
+
*/
|
|
61
|
+
name: string;
|
|
62
|
+
/**
|
|
63
|
+
* ISO 8601 timestamp
|
|
64
|
+
*/
|
|
65
|
+
updatedAt?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface NamespaceDeleteResponse {
|
|
68
|
+
success: true;
|
|
69
|
+
}
|
|
70
|
+
export interface NamespaceCreateParams {
|
|
71
|
+
/**
|
|
72
|
+
* Namespace name (lowercase alphanumeric with hyphens)
|
|
73
|
+
*/
|
|
74
|
+
name: string;
|
|
75
|
+
}
|
|
76
|
+
export declare namespace Namespaces {
|
|
77
|
+
export { type CreateNamespaceRequest as CreateNamespaceRequest, type Namespace as Namespace, type NamespaceDeleteResponse as NamespaceDeleteResponse, type NamespaceCreateParams as NamespaceCreateParams, };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=namespaces.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaces.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/connect/namespaces.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIpF;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAI9E;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAG3F;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
export declare class Namespaces extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Connect namespace. Requires a valid Smithery API key.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const namespace =
|
|
11
|
+
* await client.beta.connect.namespaces.create({
|
|
12
|
+
* name: 'my-namespace',
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(body: NamespaceCreateParams, options?: RequestOptions): APIPromise<Namespace>;
|
|
17
|
+
/**
|
|
18
|
+
* Get details for a namespace. Requires API key and namespace ownership.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const namespace =
|
|
23
|
+
* await client.beta.connect.namespaces.retrieve(
|
|
24
|
+
* 'namespaceId',
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
retrieve(namespaceID: string, options?: RequestOptions): APIPromise<Namespace>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a namespace and all its connections. Requires API key and namespace
|
|
31
|
+
* ownership.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const namespace =
|
|
36
|
+
* await client.beta.connect.namespaces.delete(
|
|
37
|
+
* 'namespaceId',
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
delete(namespaceID: string, options?: RequestOptions): APIPromise<NamespaceDeleteResponse>;
|
|
42
|
+
}
|
|
43
|
+
export interface CreateNamespaceRequest {
|
|
44
|
+
/**
|
|
45
|
+
* Namespace name (lowercase alphanumeric with hyphens)
|
|
46
|
+
*/
|
|
47
|
+
name: string;
|
|
48
|
+
}
|
|
49
|
+
export interface Namespace {
|
|
50
|
+
/**
|
|
51
|
+
* Unique namespace ID
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
/**
|
|
55
|
+
* ISO 8601 timestamp
|
|
56
|
+
*/
|
|
57
|
+
createdAt: string;
|
|
58
|
+
/**
|
|
59
|
+
* Namespace name
|
|
60
|
+
*/
|
|
61
|
+
name: string;
|
|
62
|
+
/**
|
|
63
|
+
* ISO 8601 timestamp
|
|
64
|
+
*/
|
|
65
|
+
updatedAt?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface NamespaceDeleteResponse {
|
|
68
|
+
success: true;
|
|
69
|
+
}
|
|
70
|
+
export interface NamespaceCreateParams {
|
|
71
|
+
/**
|
|
72
|
+
* Namespace name (lowercase alphanumeric with hyphens)
|
|
73
|
+
*/
|
|
74
|
+
name: string;
|
|
75
|
+
}
|
|
76
|
+
export declare namespace Namespaces {
|
|
77
|
+
export { type CreateNamespaceRequest as CreateNamespaceRequest, type Namespace as Namespace, type NamespaceDeleteResponse as NamespaceDeleteResponse, type NamespaceCreateParams as NamespaceCreateParams, };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=namespaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/connect/namespaces.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIpF;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAI9E;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAG3F;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Namespaces = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
7
|
+
class Namespaces extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new Connect namespace. Requires a valid Smithery API key.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const namespace =
|
|
14
|
+
* await client.beta.connect.namespaces.create({
|
|
15
|
+
* name: 'my-namespace',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(body, options) {
|
|
20
|
+
return this._client.post('/connect/namespaces', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get details for a namespace. Requires API key and namespace ownership.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const namespace =
|
|
28
|
+
* await client.beta.connect.namespaces.retrieve(
|
|
29
|
+
* 'namespaceId',
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
retrieve(namespaceID, options) {
|
|
34
|
+
return this._client.get((0, path_1.path) `/connect/namespaces/${namespaceID}`, options);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Delete a namespace and all its connections. Requires API key and namespace
|
|
38
|
+
* ownership.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const namespace =
|
|
43
|
+
* await client.beta.connect.namespaces.delete(
|
|
44
|
+
* 'namespaceId',
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
delete(namespaceID, options) {
|
|
49
|
+
return this._client.delete((0, path_1.path) `/connect/namespaces/${namespaceID}`, options);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.Namespaces = Namespaces;
|
|
53
|
+
//# sourceMappingURL=namespaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaces.js","sourceRoot":"","sources":["../../../src/resources/beta/connect/namespaces.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,uBAAuB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF;AA9CD,gCA8CC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
4
|
+
export class Namespaces extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Connect namespace. Requires a valid Smithery API key.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const namespace =
|
|
11
|
+
* await client.beta.connect.namespaces.create({
|
|
12
|
+
* name: 'my-namespace',
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(body, options) {
|
|
17
|
+
return this._client.post('/connect/namespaces', { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get details for a namespace. Requires API key and namespace ownership.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const namespace =
|
|
25
|
+
* await client.beta.connect.namespaces.retrieve(
|
|
26
|
+
* 'namespaceId',
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
retrieve(namespaceID, options) {
|
|
31
|
+
return this._client.get(path `/connect/namespaces/${namespaceID}`, options);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Delete a namespace and all its connections. Requires API key and namespace
|
|
35
|
+
* ownership.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const namespace =
|
|
40
|
+
* await client.beta.connect.namespaces.delete(
|
|
41
|
+
* 'namespaceId',
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
delete(namespaceID, options) {
|
|
46
|
+
return this._client.delete(path `/connect/namespaces/${namespaceID}`, options);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=namespaces.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaces.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/namespaces.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
export declare class Rpc extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
7
|
+
* scope.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
12
|
+
* 'connectionId',
|
|
13
|
+
* {
|
|
14
|
+
* namespaceId: 'namespaceId',
|
|
15
|
+
* jsonrpc: '2.0',
|
|
16
|
+
* method: 'tools/list',
|
|
17
|
+
* },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
call(connectionID: string, params: RpcCallParams, options?: RequestOptions): APIPromise<JsonRpcResponse>;
|
|
22
|
+
}
|
|
23
|
+
export interface JsonRpcRequest {
|
|
24
|
+
jsonrpc: '2.0';
|
|
25
|
+
/**
|
|
26
|
+
* MCP method to call
|
|
27
|
+
*/
|
|
28
|
+
method: string;
|
|
29
|
+
id?: string | number;
|
|
30
|
+
/**
|
|
31
|
+
* Method parameters
|
|
32
|
+
*/
|
|
33
|
+
params?: unknown;
|
|
34
|
+
}
|
|
35
|
+
export interface JsonRpcResponse {
|
|
36
|
+
id: string | number | null;
|
|
37
|
+
jsonrpc: '2.0';
|
|
38
|
+
result?: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface RpcCallParams {
|
|
41
|
+
/**
|
|
42
|
+
* Path param
|
|
43
|
+
*/
|
|
44
|
+
namespaceId: string;
|
|
45
|
+
/**
|
|
46
|
+
* Body param
|
|
47
|
+
*/
|
|
48
|
+
jsonrpc: '2.0';
|
|
49
|
+
/**
|
|
50
|
+
* Body param: MCP method to call
|
|
51
|
+
*/
|
|
52
|
+
method: string;
|
|
53
|
+
/**
|
|
54
|
+
* Body param
|
|
55
|
+
*/
|
|
56
|
+
id?: string | number;
|
|
57
|
+
/**
|
|
58
|
+
* Body param: Method parameters
|
|
59
|
+
*/
|
|
60
|
+
params?: unknown;
|
|
61
|
+
}
|
|
62
|
+
export declare namespace Rpc {
|
|
63
|
+
export { type JsonRpcRequest as JsonRpcRequest, type JsonRpcResponse as JsonRpcResponse, type RpcCallParams as RpcCallParams, };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=rpc.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAOzG;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAE3B,OAAO,EAAE,KAAK,CAAC;IAEf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
export declare class Rpc extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
7
|
+
* scope.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
12
|
+
* 'connectionId',
|
|
13
|
+
* {
|
|
14
|
+
* namespaceId: 'namespaceId',
|
|
15
|
+
* jsonrpc: '2.0',
|
|
16
|
+
* method: 'tools/list',
|
|
17
|
+
* },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
call(connectionID: string, params: RpcCallParams, options?: RequestOptions): APIPromise<JsonRpcResponse>;
|
|
22
|
+
}
|
|
23
|
+
export interface JsonRpcRequest {
|
|
24
|
+
jsonrpc: '2.0';
|
|
25
|
+
/**
|
|
26
|
+
* MCP method to call
|
|
27
|
+
*/
|
|
28
|
+
method: string;
|
|
29
|
+
id?: string | number;
|
|
30
|
+
/**
|
|
31
|
+
* Method parameters
|
|
32
|
+
*/
|
|
33
|
+
params?: unknown;
|
|
34
|
+
}
|
|
35
|
+
export interface JsonRpcResponse {
|
|
36
|
+
id: string | number | null;
|
|
37
|
+
jsonrpc: '2.0';
|
|
38
|
+
result?: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface RpcCallParams {
|
|
41
|
+
/**
|
|
42
|
+
* Path param
|
|
43
|
+
*/
|
|
44
|
+
namespaceId: string;
|
|
45
|
+
/**
|
|
46
|
+
* Body param
|
|
47
|
+
*/
|
|
48
|
+
jsonrpc: '2.0';
|
|
49
|
+
/**
|
|
50
|
+
* Body param: MCP method to call
|
|
51
|
+
*/
|
|
52
|
+
method: string;
|
|
53
|
+
/**
|
|
54
|
+
* Body param
|
|
55
|
+
*/
|
|
56
|
+
id?: string | number;
|
|
57
|
+
/**
|
|
58
|
+
* Body param: Method parameters
|
|
59
|
+
*/
|
|
60
|
+
params?: unknown;
|
|
61
|
+
}
|
|
62
|
+
export declare namespace Rpc {
|
|
63
|
+
export { type JsonRpcRequest as JsonRpcRequest, type JsonRpcResponse as JsonRpcResponse, type RpcCallParams as RpcCallParams, };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=rpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAOzG;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAE3B,OAAO,EAAE,KAAK,CAAC;IAEf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Rpc = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
7
|
+
class Rpc extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
10
|
+
* scope.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
15
|
+
* 'connectionId',
|
|
16
|
+
* {
|
|
17
|
+
* namespaceId: 'namespaceId',
|
|
18
|
+
* jsonrpc: '2.0',
|
|
19
|
+
* method: 'tools/list',
|
|
20
|
+
* },
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
call(connectionID, params, options) {
|
|
25
|
+
const { namespaceId, ...body } = params;
|
|
26
|
+
return this._client.post((0, path_1.path) `/connect/namespaces/${namespaceId}/connections/${connectionID}/rpc`, {
|
|
27
|
+
body,
|
|
28
|
+
...options,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.Rpc = Rpc;
|
|
33
|
+
//# sourceMappingURL=rpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD,MAAa,GAAI,SAAQ,sBAAW;IAClC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,YAAoB,EAAE,MAAqB,EAAE,OAAwB;QACxE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,uBAAuB,WAAW,gBAAgB,YAAY,MAAM,EAAE;YACjG,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,kBAwBC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
4
|
+
export class Rpc extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
7
|
+
* scope.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
12
|
+
* 'connectionId',
|
|
13
|
+
* {
|
|
14
|
+
* namespaceId: 'namespaceId',
|
|
15
|
+
* jsonrpc: '2.0',
|
|
16
|
+
* method: 'tools/list',
|
|
17
|
+
* },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
call(connectionID, params, options) {
|
|
22
|
+
const { namespaceId, ...body } = params;
|
|
23
|
+
return this._client.post(path `/connect/namespaces/${namespaceId}/connections/${connectionID}/rpc`, {
|
|
24
|
+
body,
|
|
25
|
+
...options,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=rpc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.mjs","sourceRoot":"","sources":["../../../src/resources/beta/connect/rpc.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,GAAI,SAAQ,WAAW;IAClC;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,YAAoB,EAAE,MAAqB,EAAE,OAAwB;QACxE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,uBAAuB,WAAW,gBAAgB,YAAY,MAAM,EAAE;YACjG,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.mts","sourceRoot":"","sources":["../../src/resources/beta/connect.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/resources/beta/connect.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./connect/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/resources/beta/connect.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"}
|