@smithery/api 0.18.0 → 0.21.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 +39 -0
- package/package.json +1 -1
- package/resources/beta/connect/connect.d.mts +2 -6
- package/resources/beta/connect/connect.d.mts.map +1 -1
- package/resources/beta/connect/connect.d.ts +2 -6
- package/resources/beta/connect/connect.d.ts.map +1 -1
- package/resources/beta/connect/connect.js +0 -4
- package/resources/beta/connect/connect.js.map +1 -1
- package/resources/beta/connect/connect.mjs +0 -4
- package/resources/beta/connect/connect.mjs.map +1 -1
- package/resources/beta/connect/connections.d.mts +63 -34
- package/resources/beta/connect/connections.d.mts.map +1 -1
- package/resources/beta/connect/connections.d.ts +63 -34
- package/resources/beta/connect/connections.d.ts.map +1 -1
- package/resources/beta/connect/connections.js +35 -23
- package/resources/beta/connect/connections.js.map +1 -1
- package/resources/beta/connect/connections.mjs +35 -23
- package/resources/beta/connect/connections.mjs.map +1 -1
- package/resources/beta/connect/index.d.mts +1 -2
- package/resources/beta/connect/index.d.mts.map +1 -1
- package/resources/beta/connect/index.d.ts +1 -2
- package/resources/beta/connect/index.d.ts.map +1 -1
- package/resources/beta/connect/index.js +1 -3
- package/resources/beta/connect/index.js.map +1 -1
- package/resources/beta/connect/index.mjs +0 -1
- package/resources/beta/connect/index.mjs.map +1 -1
- package/resources/beta/connect/rpc.d.mts +2 -2
- package/resources/beta/connect/rpc.d.mts.map +1 -1
- package/resources/beta/connect/rpc.d.ts +2 -2
- package/resources/beta/connect/rpc.d.ts.map +1 -1
- package/resources/beta/connect/rpc.js +3 -6
- package/resources/beta/connect/rpc.js.map +1 -1
- package/resources/beta/connect/rpc.mjs +3 -6
- package/resources/beta/connect/rpc.mjs.map +1 -1
- package/src/resources/beta/connect/connect.ts +2 -11
- package/src/resources/beta/connect/connections.ts +78 -48
- package/src/resources/beta/connect/index.ts +1 -6
- package/src/resources/beta/connect/rpc.ts +4 -7
- 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
- package/resources/beta/connect/namespaces.d.mts +0 -76
- package/resources/beta/connect/namespaces.d.mts.map +0 -1
- package/resources/beta/connect/namespaces.d.ts +0 -76
- package/resources/beta/connect/namespaces.d.ts.map +0 -1
- package/resources/beta/connect/namespaces.js +0 -61
- package/resources/beta/connect/namespaces.js.map +0 -1
- package/resources/beta/connect/namespaces.mjs +0 -57
- package/resources/beta/connect/namespaces.mjs.map +0 -1
- package/src/resources/beta/connect/namespaces.ts +0 -101
|
@@ -7,32 +7,20 @@ import { path } from '../../../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Connections extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Create a new MCP connection with
|
|
11
|
-
* ownership.
|
|
10
|
+
* Create a new MCP connection with an auto-generated ID. Requires API key and
|
|
11
|
+
* namespace ownership.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
15
|
* const connection =
|
|
16
16
|
* await client.beta.connect.connections.create(
|
|
17
|
-
* '
|
|
18
|
-
* {
|
|
19
|
-
* namespaceId: 'namespaceId',
|
|
20
|
-
* mcpUrl: 'https://mcp.example.com/sse',
|
|
21
|
-
* name: 'My MCP Server',
|
|
22
|
-
* },
|
|
17
|
+
* 'namespace',
|
|
18
|
+
* { mcpUrl: 'https://mcp.example.com/sse' },
|
|
23
19
|
* );
|
|
24
20
|
* ```
|
|
25
21
|
*/
|
|
26
|
-
create(
|
|
27
|
-
|
|
28
|
-
params: ConnectionCreateParams,
|
|
29
|
-
options?: RequestOptions,
|
|
30
|
-
): APIPromise<Connection> {
|
|
31
|
-
const { namespaceId, ...body } = params;
|
|
32
|
-
return this._client.put(path`/connect/namespaces/${namespaceId}/connections/${connectionID}`, {
|
|
33
|
-
body,
|
|
34
|
-
...options,
|
|
35
|
-
});
|
|
22
|
+
create(namespace: string, body: ConnectionCreateParams, options?: RequestOptions): APIPromise<Connection> {
|
|
23
|
+
return this._client.post(path`/connect/${namespace}`, { body, ...options });
|
|
36
24
|
}
|
|
37
25
|
|
|
38
26
|
/**
|
|
@@ -44,7 +32,7 @@ export class Connections extends APIResource {
|
|
|
44
32
|
* const connection =
|
|
45
33
|
* await client.beta.connect.connections.retrieve(
|
|
46
34
|
* 'connectionId',
|
|
47
|
-
* {
|
|
35
|
+
* { namespace: 'namespace' },
|
|
48
36
|
* );
|
|
49
37
|
* ```
|
|
50
38
|
*/
|
|
@@ -53,8 +41,8 @@ export class Connections extends APIResource {
|
|
|
53
41
|
params: ConnectionRetrieveParams,
|
|
54
42
|
options?: RequestOptions,
|
|
55
43
|
): APIPromise<Connection> {
|
|
56
|
-
const {
|
|
57
|
-
return this._client.get(path`/connect
|
|
44
|
+
const { namespace } = params;
|
|
45
|
+
return this._client.get(path`/connect/${namespace}/${connectionID}`, options);
|
|
58
46
|
}
|
|
59
47
|
|
|
60
48
|
/**
|
|
@@ -64,11 +52,11 @@ export class Connections extends APIResource {
|
|
|
64
52
|
* @example
|
|
65
53
|
* ```ts
|
|
66
54
|
* const connectionsListResponse =
|
|
67
|
-
* await client.beta.connect.connections.list('
|
|
55
|
+
* await client.beta.connect.connections.list('namespace');
|
|
68
56
|
* ```
|
|
69
57
|
*/
|
|
70
|
-
list(
|
|
71
|
-
return this._client.get(path`/connect
|
|
58
|
+
list(namespace: string, options?: RequestOptions): APIPromise<ConnectionsListResponse> {
|
|
59
|
+
return this._client.get(path`/connect/${namespace}`, options);
|
|
72
60
|
}
|
|
73
61
|
|
|
74
62
|
/**
|
|
@@ -80,7 +68,7 @@ export class Connections extends APIResource {
|
|
|
80
68
|
* const connection =
|
|
81
69
|
* await client.beta.connect.connections.delete(
|
|
82
70
|
* 'connectionId',
|
|
83
|
-
* {
|
|
71
|
+
* { namespace: 'namespace' },
|
|
84
72
|
* );
|
|
85
73
|
* ```
|
|
86
74
|
*/
|
|
@@ -89,14 +77,35 @@ export class Connections extends APIResource {
|
|
|
89
77
|
params: ConnectionDeleteParams,
|
|
90
78
|
options?: RequestOptions,
|
|
91
79
|
): APIPromise<ConnectionDeleteResponse> {
|
|
92
|
-
const {
|
|
93
|
-
return this._client.delete(path`/connect
|
|
80
|
+
const { namespace } = params;
|
|
81
|
+
return this._client.delete(path`/connect/${namespace}/${connectionID}`, options);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Create a new MCP connection with the given ID. Requires API key and namespace
|
|
86
|
+
* ownership.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const connection =
|
|
91
|
+
* await client.beta.connect.connections.set(
|
|
92
|
+
* 'connectionId',
|
|
93
|
+
* {
|
|
94
|
+
* namespace: 'namespace',
|
|
95
|
+
* mcpUrl: 'https://mcp.example.com/sse',
|
|
96
|
+
* },
|
|
97
|
+
* );
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
set(connectionID: string, params: ConnectionSetParams, options?: RequestOptions): APIPromise<Connection> {
|
|
101
|
+
const { namespace, ...body } = params;
|
|
102
|
+
return this._client.put(path`/connect/${namespace}/${connectionID}`, { body, ...options });
|
|
94
103
|
}
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
export interface Connection {
|
|
98
107
|
/**
|
|
99
|
-
*
|
|
108
|
+
* Connection ID (auto-generated or developer-defined)
|
|
100
109
|
*/
|
|
101
110
|
connectionId: string;
|
|
102
111
|
|
|
@@ -122,15 +131,18 @@ export interface Connection {
|
|
|
122
131
|
/**
|
|
123
132
|
* Connection status after initialization (only returned on create)
|
|
124
133
|
*/
|
|
125
|
-
status?:
|
|
134
|
+
status?:
|
|
135
|
+
| Connection.ConnectConnectionStatusConnected
|
|
136
|
+
| Connection.ConnectConnectionStatusAuthRequired
|
|
137
|
+
| Connection.ConnectConnectionStatusError;
|
|
126
138
|
}
|
|
127
139
|
|
|
128
140
|
export namespace Connection {
|
|
129
|
-
export interface
|
|
141
|
+
export interface ConnectConnectionStatusConnected {
|
|
130
142
|
state: 'connected';
|
|
131
143
|
}
|
|
132
144
|
|
|
133
|
-
export interface
|
|
145
|
+
export interface ConnectConnectionStatusAuthRequired {
|
|
134
146
|
state: 'auth_required';
|
|
135
147
|
|
|
136
148
|
/**
|
|
@@ -139,7 +151,7 @@ export namespace Connection {
|
|
|
139
151
|
authorizationUrl?: string;
|
|
140
152
|
}
|
|
141
153
|
|
|
142
|
-
export interface
|
|
154
|
+
export interface ConnectConnectionStatusError {
|
|
143
155
|
/**
|
|
144
156
|
* Error message
|
|
145
157
|
*/
|
|
@@ -165,14 +177,14 @@ export interface CreateConnectionRequest {
|
|
|
165
177
|
mcpUrl: string;
|
|
166
178
|
|
|
167
179
|
/**
|
|
168
|
-
*
|
|
180
|
+
* Custom metadata for filtering connections
|
|
169
181
|
*/
|
|
170
|
-
|
|
182
|
+
metadata?: { [key: string]: unknown };
|
|
171
183
|
|
|
172
184
|
/**
|
|
173
|
-
*
|
|
185
|
+
* Human-readable name (optional, defaults to connection ID)
|
|
174
186
|
*/
|
|
175
|
-
|
|
187
|
+
name?: string;
|
|
176
188
|
}
|
|
177
189
|
|
|
178
190
|
export interface ConnectionDeleteResponse {
|
|
@@ -181,32 +193,49 @@ export interface ConnectionDeleteResponse {
|
|
|
181
193
|
|
|
182
194
|
export interface ConnectionCreateParams {
|
|
183
195
|
/**
|
|
184
|
-
*
|
|
185
|
-
*/
|
|
186
|
-
namespaceId: string;
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Body param: URL of the MCP server
|
|
196
|
+
* URL of the MCP server
|
|
190
197
|
*/
|
|
191
198
|
mcpUrl: string;
|
|
192
199
|
|
|
193
200
|
/**
|
|
194
|
-
*
|
|
201
|
+
* Custom metadata for filtering connections
|
|
195
202
|
*/
|
|
196
|
-
|
|
203
|
+
metadata?: { [key: string]: unknown };
|
|
197
204
|
|
|
198
205
|
/**
|
|
199
|
-
*
|
|
206
|
+
* Human-readable name (optional, defaults to connection ID)
|
|
200
207
|
*/
|
|
201
|
-
|
|
208
|
+
name?: string;
|
|
202
209
|
}
|
|
203
210
|
|
|
204
211
|
export interface ConnectionRetrieveParams {
|
|
205
|
-
|
|
212
|
+
namespace: string;
|
|
206
213
|
}
|
|
207
214
|
|
|
208
215
|
export interface ConnectionDeleteParams {
|
|
209
|
-
|
|
216
|
+
namespace: string;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface ConnectionSetParams {
|
|
220
|
+
/**
|
|
221
|
+
* Path param
|
|
222
|
+
*/
|
|
223
|
+
namespace: string;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Body param: URL of the MCP server
|
|
227
|
+
*/
|
|
228
|
+
mcpUrl: string;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Body param: Custom metadata for filtering connections
|
|
232
|
+
*/
|
|
233
|
+
metadata?: { [key: string]: unknown };
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Body param: Human-readable name (optional, defaults to connection ID)
|
|
237
|
+
*/
|
|
238
|
+
name?: string;
|
|
210
239
|
}
|
|
211
240
|
|
|
212
241
|
export declare namespace Connections {
|
|
@@ -218,5 +247,6 @@ export declare namespace Connections {
|
|
|
218
247
|
type ConnectionCreateParams as ConnectionCreateParams,
|
|
219
248
|
type ConnectionRetrieveParams as ConnectionRetrieveParams,
|
|
220
249
|
type ConnectionDeleteParams as ConnectionDeleteParams,
|
|
250
|
+
type ConnectionSetParams as ConnectionSetParams,
|
|
221
251
|
};
|
|
222
252
|
}
|
|
@@ -10,11 +10,6 @@ export {
|
|
|
10
10
|
type ConnectionCreateParams,
|
|
11
11
|
type ConnectionRetrieveParams,
|
|
12
12
|
type ConnectionDeleteParams,
|
|
13
|
+
type ConnectionSetParams,
|
|
13
14
|
} from './connections';
|
|
14
|
-
export {
|
|
15
|
-
Namespaces,
|
|
16
|
-
type Namespace,
|
|
17
|
-
type NamespaceListResponse,
|
|
18
|
-
type NamespaceDeleteResponse,
|
|
19
|
-
} from './namespaces';
|
|
20
15
|
export { Rpc, type JsonRpcRequest, type JsonRpcResponse, type RpcCallParams } from './rpc';
|
|
@@ -15,7 +15,7 @@ export class Rpc extends APIResource {
|
|
|
15
15
|
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
16
16
|
* 'connectionId',
|
|
17
17
|
* {
|
|
18
|
-
*
|
|
18
|
+
* namespace: 'namespace',
|
|
19
19
|
* jsonrpc: '2.0',
|
|
20
20
|
* method: 'tools/list',
|
|
21
21
|
* },
|
|
@@ -23,11 +23,8 @@ export class Rpc extends APIResource {
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
call(connectionID: string, params: RpcCallParams, options?: RequestOptions): APIPromise<JsonRpcResponse> {
|
|
26
|
-
const {
|
|
27
|
-
return this._client.post(path`/connect
|
|
28
|
-
body,
|
|
29
|
-
...options,
|
|
30
|
-
});
|
|
26
|
+
const { namespace, ...body } = params;
|
|
27
|
+
return this._client.post(path`/connect/${namespace}/${connectionID}/rpc`, { body, ...options });
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
|
|
@@ -59,7 +56,7 @@ export interface RpcCallParams {
|
|
|
59
56
|
/**
|
|
60
57
|
* Path param
|
|
61
58
|
*/
|
|
62
|
-
|
|
59
|
+
namespace: string;
|
|
63
60
|
|
|
64
61
|
/**
|
|
65
62
|
* Body param
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.21.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.21.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.21.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.21.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,76 +0,0 @@
|
|
|
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. Name must be URL-friendly (lowercase
|
|
7
|
-
* alphanumeric + hyphens, 3-64 chars). Requires a valid Smithery API key.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const namespace =
|
|
12
|
-
* await client.beta.connect.namespaces.create('name');
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
create(name: string, options?: RequestOptions): APIPromise<Namespace>;
|
|
16
|
-
/**
|
|
17
|
-
* Get details for a namespace. Requires API key and namespace ownership.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts
|
|
21
|
-
* const namespace =
|
|
22
|
-
* await client.beta.connect.namespaces.retrieve('name');
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
retrieve(name: string, options?: RequestOptions): APIPromise<Namespace>;
|
|
26
|
-
/**
|
|
27
|
-
* List all namespaces owned by the authenticated user. Requires service token with
|
|
28
|
-
* namespaces:read permission.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const namespaces =
|
|
33
|
-
* await client.beta.connect.namespaces.list();
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
list(options?: RequestOptions): APIPromise<NamespaceListResponse>;
|
|
37
|
-
/**
|
|
38
|
-
* Delete a namespace and all its connections. Requires API key and namespace
|
|
39
|
-
* ownership.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const namespace =
|
|
44
|
-
* await client.beta.connect.namespaces.delete('name');
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
delete(name: string, options?: RequestOptions): APIPromise<NamespaceDeleteResponse>;
|
|
48
|
-
}
|
|
49
|
-
export interface Namespace {
|
|
50
|
-
/**
|
|
51
|
-
* ISO 8601 timestamp
|
|
52
|
-
*/
|
|
53
|
-
createdAt: string;
|
|
54
|
-
/**
|
|
55
|
-
* Namespace name (also the unique ID)
|
|
56
|
-
*/
|
|
57
|
-
name: string;
|
|
58
|
-
/**
|
|
59
|
-
* ISO 8601 timestamp
|
|
60
|
-
*/
|
|
61
|
-
updatedAt?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface NamespaceListResponse {
|
|
64
|
-
namespaces: Array<Namespace>;
|
|
65
|
-
/**
|
|
66
|
-
* Cursor for next page, null if no more results
|
|
67
|
-
*/
|
|
68
|
-
nextCursor: string | null;
|
|
69
|
-
}
|
|
70
|
-
export interface NamespaceDeleteResponse {
|
|
71
|
-
success: true;
|
|
72
|
-
}
|
|
73
|
-
export declare namespace Namespaces {
|
|
74
|
-
export { type Namespace as Namespace, type NamespaceListResponse as NamespaceListResponse, type NamespaceDeleteResponse as NamespaceDeleteResponse, };
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=namespaces.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIrE;;;;;;;;OAQG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIvE;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjE;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGpF;AAED,MAAM,WAAW,SAAS;IACxB;;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,qBAAqB;IACpC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -1,76 +0,0 @@
|
|
|
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. Name must be URL-friendly (lowercase
|
|
7
|
-
* alphanumeric + hyphens, 3-64 chars). Requires a valid Smithery API key.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const namespace =
|
|
12
|
-
* await client.beta.connect.namespaces.create('name');
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
create(name: string, options?: RequestOptions): APIPromise<Namespace>;
|
|
16
|
-
/**
|
|
17
|
-
* Get details for a namespace. Requires API key and namespace ownership.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts
|
|
21
|
-
* const namespace =
|
|
22
|
-
* await client.beta.connect.namespaces.retrieve('name');
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
retrieve(name: string, options?: RequestOptions): APIPromise<Namespace>;
|
|
26
|
-
/**
|
|
27
|
-
* List all namespaces owned by the authenticated user. Requires service token with
|
|
28
|
-
* namespaces:read permission.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const namespaces =
|
|
33
|
-
* await client.beta.connect.namespaces.list();
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
list(options?: RequestOptions): APIPromise<NamespaceListResponse>;
|
|
37
|
-
/**
|
|
38
|
-
* Delete a namespace and all its connections. Requires API key and namespace
|
|
39
|
-
* ownership.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const namespace =
|
|
44
|
-
* await client.beta.connect.namespaces.delete('name');
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
delete(name: string, options?: RequestOptions): APIPromise<NamespaceDeleteResponse>;
|
|
48
|
-
}
|
|
49
|
-
export interface Namespace {
|
|
50
|
-
/**
|
|
51
|
-
* ISO 8601 timestamp
|
|
52
|
-
*/
|
|
53
|
-
createdAt: string;
|
|
54
|
-
/**
|
|
55
|
-
* Namespace name (also the unique ID)
|
|
56
|
-
*/
|
|
57
|
-
name: string;
|
|
58
|
-
/**
|
|
59
|
-
* ISO 8601 timestamp
|
|
60
|
-
*/
|
|
61
|
-
updatedAt?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface NamespaceListResponse {
|
|
64
|
-
namespaces: Array<Namespace>;
|
|
65
|
-
/**
|
|
66
|
-
* Cursor for next page, null if no more results
|
|
67
|
-
*/
|
|
68
|
-
nextCursor: string | null;
|
|
69
|
-
}
|
|
70
|
-
export interface NamespaceDeleteResponse {
|
|
71
|
-
success: true;
|
|
72
|
-
}
|
|
73
|
-
export declare namespace Namespaces {
|
|
74
|
-
export { type Namespace as Namespace, type NamespaceListResponse as NamespaceListResponse, type NamespaceDeleteResponse as NamespaceDeleteResponse, };
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=namespaces.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIrE;;;;;;;;OAQG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIvE;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjE;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGpF;AAED,MAAM,WAAW,SAAS;IACxB;;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,qBAAqB;IACpC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -1,61 +0,0 @@
|
|
|
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. Name must be URL-friendly (lowercase
|
|
10
|
-
* alphanumeric + hyphens, 3-64 chars). Requires a valid Smithery API key.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const namespace =
|
|
15
|
-
* await client.beta.connect.namespaces.create('name');
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
create(name, options) {
|
|
19
|
-
return this._client.put((0, path_1.path) `/connect/namespaces/${name}`, options);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get details for a namespace. Requires API key and namespace ownership.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const namespace =
|
|
27
|
-
* await client.beta.connect.namespaces.retrieve('name');
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
retrieve(name, options) {
|
|
31
|
-
return this._client.get((0, path_1.path) `/connect/namespaces/${name}`, options);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* List all namespaces owned by the authenticated user. Requires service token with
|
|
35
|
-
* namespaces:read permission.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const namespaces =
|
|
40
|
-
* await client.beta.connect.namespaces.list();
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
list(options) {
|
|
44
|
-
return this._client.get('/connect/namespaces', options);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Delete a namespace and all its connections. Requires API key and namespace
|
|
48
|
-
* ownership.
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const namespace =
|
|
53
|
-
* await client.beta.connect.namespaces.delete('name');
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
delete(name, options) {
|
|
57
|
-
return this._client.delete((0, path_1.path) `/connect/namespaces/${name}`, options);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.Namespaces = Namespaces;
|
|
61
|
-
//# sourceMappingURL=namespaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAY,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAY,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,uBAAuB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF;AAvDD,gCAuDC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
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. Name must be URL-friendly (lowercase
|
|
7
|
-
* alphanumeric + hyphens, 3-64 chars). Requires a valid Smithery API key.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const namespace =
|
|
12
|
-
* await client.beta.connect.namespaces.create('name');
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
create(name, options) {
|
|
16
|
-
return this._client.put(path `/connect/namespaces/${name}`, options);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Get details for a namespace. Requires API key and namespace ownership.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* const namespace =
|
|
24
|
-
* await client.beta.connect.namespaces.retrieve('name');
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
retrieve(name, options) {
|
|
28
|
-
return this._client.get(path `/connect/namespaces/${name}`, options);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* List all namespaces owned by the authenticated user. Requires service token with
|
|
32
|
-
* namespaces:read permission.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* const namespaces =
|
|
37
|
-
* await client.beta.connect.namespaces.list();
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
list(options) {
|
|
41
|
-
return this._client.get('/connect/namespaces', options);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Delete a namespace and all its connections. Requires API key and namespace
|
|
45
|
-
* ownership.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* const namespace =
|
|
50
|
-
* await client.beta.connect.namespaces.delete('name');
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
delete(name, options) {
|
|
54
|
-
return this._client.delete(path `/connect/namespaces/${name}`, options);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=namespaces.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAY,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAY,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF"}
|