@smithery/api 0.27.0 → 0.29.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 +20 -0
- package/README.md +10 -5
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/client.js +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/lib/mcp-transport.d.mts +57 -69
- package/lib/mcp-transport.d.mts.map +1 -1
- package/lib/mcp-transport.d.ts +57 -69
- package/lib/mcp-transport.d.ts.map +1 -1
- package/lib/mcp-transport.js +106 -204
- package/lib/mcp-transport.js.map +1 -1
- package/lib/mcp-transport.mjs +103 -202
- package/lib/mcp-transport.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/connect/connect.d.mts +4 -4
- package/resources/beta/connect/connect.d.ts +4 -4
- package/resources/beta/connect/connect.js +4 -4
- package/resources/beta/connect/connect.mjs +4 -4
- package/resources/beta/connect/connections.d.mts +5 -1
- package/resources/beta/connect/connections.d.mts.map +1 -1
- package/resources/beta/connect/connections.d.ts +5 -1
- package/resources/beta/connect/connections.d.ts.map +1 -1
- package/resources/beta/connect/index.d.mts +1 -1
- package/resources/beta/connect/index.d.ts +1 -1
- package/resources/beta/connect/index.js +3 -3
- package/resources/beta/connect/index.mjs +1 -1
- package/resources/beta/connect/{rpc.d.mts → mcp.d.mts} +9 -9
- package/resources/beta/connect/{rpc.d.mts.map → mcp.d.mts.map} +1 -1
- package/resources/beta/connect/{rpc.d.ts → mcp.d.ts} +9 -9
- package/resources/beta/connect/{rpc.d.ts.map → mcp.d.ts.map} +1 -1
- package/resources/beta/connect/{rpc.js → mcp.js} +8 -8
- package/resources/beta/connect/{rpc.js.map → mcp.js.map} +1 -1
- package/resources/beta/connect/{rpc.mjs → mcp.mjs} +6 -6
- package/resources/beta/connect/{rpc.mjs.map → mcp.mjs.map} +1 -1
- package/resources/beta/connect/tools.d.mts +0 -3
- package/resources/beta/connect/tools.d.mts.map +1 -1
- package/resources/beta/connect/tools.d.ts +0 -3
- package/resources/beta/connect/tools.d.ts.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/namespaces/index.d.mts +3 -0
- package/resources/namespaces/index.d.mts.map +1 -0
- package/resources/namespaces/index.d.ts +3 -0
- package/resources/namespaces/index.d.ts.map +1 -0
- package/resources/namespaces/index.js +9 -0
- package/resources/namespaces/index.js.map +1 -0
- package/resources/namespaces/index.mjs +4 -0
- package/resources/namespaces/index.mjs.map +1 -0
- package/resources/namespaces/namespaces.d.mts +60 -0
- package/resources/namespaces/namespaces.d.mts.map +1 -0
- package/resources/namespaces/namespaces.d.ts +60 -0
- package/resources/namespaces/namespaces.d.ts.map +1 -0
- package/resources/namespaces/namespaces.js +54 -0
- package/resources/namespaces/namespaces.js.map +1 -0
- package/resources/namespaces/namespaces.mjs +49 -0
- package/resources/namespaces/namespaces.mjs.map +1 -0
- package/resources/namespaces/servers.d.mts +46 -0
- package/resources/namespaces/servers.d.mts.map +1 -0
- package/resources/namespaces/servers.d.ts +46 -0
- package/resources/namespaces/servers.d.ts.map +1 -0
- package/resources/namespaces/servers.js +25 -0
- package/resources/namespaces/servers.js.map +1 -0
- package/resources/namespaces/servers.mjs +21 -0
- package/resources/namespaces/servers.mjs.map +1 -0
- package/resources/namespaces.d.mts +1 -39
- package/resources/namespaces.d.mts.map +1 -1
- package/resources/namespaces.d.ts +1 -39
- package/resources/namespaces.d.ts.map +1 -1
- package/resources/namespaces.js +2 -26
- package/resources/namespaces.js.map +1 -1
- package/resources/namespaces.mjs +1 -24
- package/resources/namespaces.mjs.map +1 -1
- package/resources/servers/deployments.d.mts +55 -9
- package/resources/servers/deployments.d.mts.map +1 -1
- package/resources/servers/deployments.d.ts +55 -9
- package/resources/servers/deployments.d.ts.map +1 -1
- package/resources/servers/deployments.js +42 -8
- package/resources/servers/deployments.js.map +1 -1
- package/resources/servers/deployments.mjs +42 -8
- package/resources/servers/deployments.mjs.map +1 -1
- package/resources/servers/index.d.mts +4 -3
- package/resources/servers/index.d.mts.map +1 -1
- package/resources/servers/index.d.ts +4 -3
- package/resources/servers/index.d.ts.map +1 -1
- package/resources/servers/index.js +3 -1
- package/resources/servers/index.js.map +1 -1
- package/resources/servers/index.mjs +1 -0
- package/resources/servers/index.mjs.map +1 -1
- package/resources/servers/logs.d.mts +15 -4
- package/resources/servers/logs.d.mts.map +1 -1
- package/resources/servers/logs.d.ts +15 -4
- package/resources/servers/logs.d.ts.map +1 -1
- package/resources/servers/logs.js +10 -2
- package/resources/servers/logs.js.map +1 -1
- package/resources/servers/logs.mjs +10 -2
- package/resources/servers/logs.mjs.map +1 -1
- package/resources/servers/repo.d.mts +98 -0
- package/resources/servers/repo.d.mts.map +1 -0
- package/resources/servers/repo.d.ts +98 -0
- package/resources/servers/repo.d.ts.map +1 -0
- package/resources/servers/repo.js +55 -0
- package/resources/servers/repo.js.map +1 -0
- package/resources/servers/repo.mjs +51 -0
- package/resources/servers/repo.mjs.map +1 -0
- package/resources/servers/secrets.d.mts +46 -4
- package/resources/servers/secrets.d.mts.map +1 -1
- package/resources/servers/secrets.d.ts +46 -4
- package/resources/servers/secrets.d.ts.map +1 -1
- package/resources/servers/secrets.js +36 -6
- package/resources/servers/secrets.js.map +1 -1
- package/resources/servers/secrets.mjs +36 -6
- package/resources/servers/secrets.mjs.map +1 -1
- package/resources/servers/servers.d.mts +57 -10
- package/resources/servers/servers.d.mts.map +1 -1
- package/resources/servers/servers.d.ts +57 -10
- package/resources/servers/servers.d.ts.map +1 -1
- package/resources/servers/servers.js +47 -8
- package/resources/servers/servers.js.map +1 -1
- package/resources/servers/servers.mjs +47 -8
- package/resources/servers/servers.mjs.map +1 -1
- package/resources/tokens.d.mts +18 -18
- package/resources/tokens.d.mts.map +1 -1
- package/resources/tokens.d.ts +18 -18
- package/resources/tokens.d.ts.map +1 -1
- package/src/client.ts +14 -8
- package/src/lib/mcp-transport.ts +131 -236
- package/src/resources/beta/connect/connect.ts +6 -6
- package/src/resources/beta/connect/connections.ts +6 -1
- package/src/resources/beta/connect/index.ts +1 -1
- package/src/resources/beta/connect/{rpc.ts → mcp.ts} +9 -9
- package/src/resources/beta/connect/tools.ts +0 -2
- package/src/resources/index.ts +5 -2
- package/src/resources/namespaces/index.ts +14 -0
- package/src/resources/namespaces/namespaces.ts +92 -0
- package/src/resources/namespaces/servers.ts +71 -0
- package/src/resources/namespaces.ts +1 -61
- package/src/resources/servers/deployments.ts +76 -15
- package/src/resources/servers/index.ts +14 -0
- package/src/resources/servers/logs.ts +18 -9
- package/src/resources/servers/repo.ts +143 -0
- package/src/resources/servers/secrets.ts +55 -7
- package/src/resources/servers/servers.ts +92 -8
- package/src/resources/tokens.ts +17 -17
- 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,92 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as ServersAPI from './servers';
|
|
5
|
+
import { CreateServerRequest, CreateServerResponse, ServerCreateParams, Servers } from './servers';
|
|
6
|
+
import { APIPromise } from '../../core/api-promise';
|
|
7
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
8
|
+
import { path } from '../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Namespaces extends APIResource {
|
|
11
|
+
servers: ServersAPI.Servers = new ServersAPI.Servers(this._client);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create a new namespace with a server-generated human-readable name, owned by the
|
|
15
|
+
* authenticated user
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const namespace = await client.namespaces.create();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(options?: RequestOptions): APIPromise<NamespaceCreateResponse> {
|
|
23
|
+
return this._client.post('/namespaces', options);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get a list of all namespaces owned by the authenticated user
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const namespaces = await client.namespaces.list();
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
list(options?: RequestOptions): APIPromise<NamespaceListResponse> {
|
|
35
|
+
return this._client.get('/namespaces', options);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create a new namespace owned by the authenticated user. This endpoint is
|
|
40
|
+
* idempotent - if the namespace already exists and is owned by the user, returns
|
|
41
|
+
* success.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const response = await client.namespaces.set('xxx');
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
set(name: string, options?: RequestOptions): APIPromise<NamespaceSetResponse> {
|
|
49
|
+
return this._client.put(path`/namespaces/${name}`, options);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface NamespaceCreateResponse {
|
|
54
|
+
createdAt: string;
|
|
55
|
+
|
|
56
|
+
name: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface NamespaceListResponse {
|
|
60
|
+
namespaces: Array<NamespaceListResponse.Namespace>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export namespace NamespaceListResponse {
|
|
64
|
+
export interface Namespace {
|
|
65
|
+
createdAt: string;
|
|
66
|
+
|
|
67
|
+
name: string;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface NamespaceSetResponse {
|
|
72
|
+
createdAt: string;
|
|
73
|
+
|
|
74
|
+
name: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
Namespaces.Servers = Servers;
|
|
78
|
+
|
|
79
|
+
export declare namespace Namespaces {
|
|
80
|
+
export {
|
|
81
|
+
type NamespaceCreateResponse as NamespaceCreateResponse,
|
|
82
|
+
type NamespaceListResponse as NamespaceListResponse,
|
|
83
|
+
type NamespaceSetResponse as NamespaceSetResponse,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
Servers as Servers,
|
|
88
|
+
type CreateServerRequest as CreateServerRequest,
|
|
89
|
+
type CreateServerResponse as CreateServerResponse,
|
|
90
|
+
type ServerCreateParams as ServerCreateParams,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Servers extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new server under the specified namespace. This endpoint is idempotent.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const createServerResponse =
|
|
15
|
+
* await client.namespaces.servers.create('xxx', {
|
|
16
|
+
* namespace: 'namespace',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(
|
|
21
|
+
server: string,
|
|
22
|
+
params: ServerCreateParams,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): APIPromise<CreateServerResponse> {
|
|
25
|
+
const { namespace, ...body } = params;
|
|
26
|
+
return this._client.put(path`/namespaces/${namespace}/servers/${server}`, { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface CreateServerRequest {
|
|
31
|
+
description?: string;
|
|
32
|
+
|
|
33
|
+
displayName?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface CreateServerResponse {
|
|
37
|
+
createdAt: string;
|
|
38
|
+
|
|
39
|
+
description: string;
|
|
40
|
+
|
|
41
|
+
displayName: string;
|
|
42
|
+
|
|
43
|
+
namespace: string;
|
|
44
|
+
|
|
45
|
+
server: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ServerCreateParams {
|
|
49
|
+
/**
|
|
50
|
+
* Path param
|
|
51
|
+
*/
|
|
52
|
+
namespace: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Body param
|
|
56
|
+
*/
|
|
57
|
+
description?: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Body param
|
|
61
|
+
*/
|
|
62
|
+
displayName?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export declare namespace Servers {
|
|
66
|
+
export {
|
|
67
|
+
type CreateServerRequest as CreateServerRequest,
|
|
68
|
+
type CreateServerResponse as CreateServerResponse,
|
|
69
|
+
type ServerCreateParams as ServerCreateParams,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -1,63 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../internal/request-options';
|
|
6
|
-
import { path } from '../internal/utils/path';
|
|
7
|
-
|
|
8
|
-
export class Namespaces extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Create a new namespace with a server-generated human-readable name, owned by the
|
|
11
|
-
* authenticated user
|
|
12
|
-
*/
|
|
13
|
-
create(options?: RequestOptions): APIPromise<NamespaceCreateResponse> {
|
|
14
|
-
return this._client.post('/namespaces', options);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Get a list of all namespaces owned by the authenticated user
|
|
19
|
-
*/
|
|
20
|
-
list(options?: RequestOptions): APIPromise<NamespaceListResponse> {
|
|
21
|
-
return this._client.get('/namespaces', options);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Create a new namespace with a user-specified name, owned by the authenticated
|
|
26
|
-
* user
|
|
27
|
-
*/
|
|
28
|
-
set(name: string, options?: RequestOptions): APIPromise<NamespaceSetResponse> {
|
|
29
|
-
return this._client.put(path`/namespaces/${name}`, options);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface NamespaceCreateResponse {
|
|
34
|
-
createdAt: string;
|
|
35
|
-
|
|
36
|
-
name: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface NamespaceListResponse {
|
|
40
|
-
namespaces: Array<NamespaceListResponse.Namespace>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export namespace NamespaceListResponse {
|
|
44
|
-
export interface Namespace {
|
|
45
|
-
createdAt: string;
|
|
46
|
-
|
|
47
|
-
name: string;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface NamespaceSetResponse {
|
|
52
|
-
createdAt: string;
|
|
53
|
-
|
|
54
|
-
name: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export declare namespace Namespaces {
|
|
58
|
-
export {
|
|
59
|
-
type NamespaceCreateResponse as NamespaceCreateResponse,
|
|
60
|
-
type NamespaceListResponse as NamespaceListResponse,
|
|
61
|
-
type NamespaceSetResponse as NamespaceSetResponse,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
3
|
+
export * from './namespaces/index';
|
|
@@ -10,43 +10,81 @@ import { path } from '../../internal/utils/path';
|
|
|
10
10
|
export class Deployments extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* List deployments for a server
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const deployments = await client.servers.deployments.list(
|
|
17
|
+
* 'server',
|
|
18
|
+
* { namespace: 'namespace' },
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
13
21
|
*/
|
|
14
|
-
list(
|
|
15
|
-
|
|
22
|
+
list(
|
|
23
|
+
server: string,
|
|
24
|
+
params: DeploymentListParams,
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): APIPromise<DeploymentListResponse> {
|
|
27
|
+
const { namespace } = params;
|
|
28
|
+
return this._client.get(path`/servers/${namespace}/${server}/deployments`, options);
|
|
16
29
|
}
|
|
17
30
|
|
|
18
31
|
/**
|
|
19
32
|
* Upload and deploy an MCP server (hosted or external)
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const response = await client.servers.deployments.deploy(
|
|
37
|
+
* 'server',
|
|
38
|
+
* { namespace: 'namespace', payload: 'payload' },
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
20
41
|
*/
|
|
21
42
|
deploy(
|
|
22
|
-
|
|
23
|
-
|
|
43
|
+
server: string,
|
|
44
|
+
params: DeploymentDeployParams,
|
|
24
45
|
options?: RequestOptions,
|
|
25
46
|
): APIPromise<DeploymentDeployResponse> {
|
|
47
|
+
const { namespace, ...body } = params;
|
|
26
48
|
return this._client.put(
|
|
27
|
-
path`/servers/${
|
|
49
|
+
path`/servers/${namespace}/${server}/deployments`,
|
|
28
50
|
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
29
51
|
);
|
|
30
52
|
}
|
|
31
53
|
|
|
32
54
|
/**
|
|
33
55
|
* Get deployment status
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const deployment = await client.servers.deployments.get(
|
|
60
|
+
* 'id',
|
|
61
|
+
* { namespace: 'namespace', server: 'server' },
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
34
64
|
*/
|
|
35
65
|
get(id: string, params: DeploymentGetParams, options?: RequestOptions): APIPromise<DeploymentGetResponse> {
|
|
36
|
-
const {
|
|
37
|
-
return this._client.get(path`/servers/${
|
|
66
|
+
const { namespace, server } = params;
|
|
67
|
+
return this._client.get(path`/servers/${namespace}/${server}/deployments/${id}`, options);
|
|
38
68
|
}
|
|
39
69
|
|
|
40
70
|
/**
|
|
41
71
|
* Use id='latest' to resume the most recent deployment
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const response = await client.servers.deployments.resume(
|
|
76
|
+
* 'id',
|
|
77
|
+
* { namespace: 'namespace', server: 'server' },
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
42
80
|
*/
|
|
43
81
|
resume(
|
|
44
82
|
id: string,
|
|
45
83
|
params: DeploymentResumeParams,
|
|
46
84
|
options?: RequestOptions,
|
|
47
85
|
): APIPromise<DeploymentResumeResponse> {
|
|
48
|
-
const {
|
|
49
|
-
return this._client.post(path`/servers/${
|
|
86
|
+
const { namespace, server } = params;
|
|
87
|
+
return this._client.post(path`/servers/${namespace}/${server}/deployments/${id}/resume`, options);
|
|
50
88
|
}
|
|
51
89
|
}
|
|
52
90
|
|
|
@@ -58,7 +96,15 @@ export type DeployPayload =
|
|
|
58
96
|
|
|
59
97
|
export namespace DeployPayload {
|
|
60
98
|
export interface RepoDeployPayload {
|
|
99
|
+
baseDirectory: string;
|
|
100
|
+
|
|
101
|
+
repoName: string;
|
|
102
|
+
|
|
103
|
+
repoOwner: string;
|
|
104
|
+
|
|
61
105
|
type: 'repo';
|
|
106
|
+
|
|
107
|
+
branch?: string;
|
|
62
108
|
}
|
|
63
109
|
}
|
|
64
110
|
|
|
@@ -366,34 +412,48 @@ export interface DeploymentResumeResponse {
|
|
|
366
412
|
status: string;
|
|
367
413
|
}
|
|
368
414
|
|
|
415
|
+
export interface DeploymentListParams {
|
|
416
|
+
namespace: string;
|
|
417
|
+
}
|
|
418
|
+
|
|
369
419
|
export interface DeploymentDeployParams {
|
|
370
420
|
/**
|
|
371
|
-
*
|
|
421
|
+
* Path param
|
|
422
|
+
*/
|
|
423
|
+
namespace: string;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Body param: JSON-encoded deployment payload. See DeployPayload schema for
|
|
427
|
+
* structure.
|
|
372
428
|
*/
|
|
373
429
|
payload: string;
|
|
374
430
|
|
|
375
431
|
/**
|
|
376
|
-
* MCPB bundle file (for stdio deployments)
|
|
432
|
+
* Body param: MCPB bundle file (for stdio deployments)
|
|
377
433
|
*/
|
|
378
434
|
bundle?: Uploadable;
|
|
379
435
|
|
|
380
436
|
/**
|
|
381
|
-
* JavaScript module file (for hosted deployments)
|
|
437
|
+
* Body param: JavaScript module file (for hosted deployments)
|
|
382
438
|
*/
|
|
383
439
|
module?: Uploadable;
|
|
384
440
|
|
|
385
441
|
/**
|
|
386
|
-
* Source map file (for hosted deployments)
|
|
442
|
+
* Body param: Source map file (for hosted deployments)
|
|
387
443
|
*/
|
|
388
444
|
sourcemap?: Uploadable;
|
|
389
445
|
}
|
|
390
446
|
|
|
391
447
|
export interface DeploymentGetParams {
|
|
392
|
-
|
|
448
|
+
namespace: string;
|
|
449
|
+
|
|
450
|
+
server: string;
|
|
393
451
|
}
|
|
394
452
|
|
|
395
453
|
export interface DeploymentResumeParams {
|
|
396
|
-
|
|
454
|
+
namespace: string;
|
|
455
|
+
|
|
456
|
+
server: string;
|
|
397
457
|
}
|
|
398
458
|
|
|
399
459
|
export declare namespace Deployments {
|
|
@@ -407,6 +467,7 @@ export declare namespace Deployments {
|
|
|
407
467
|
type DeploymentDeployResponse as DeploymentDeployResponse,
|
|
408
468
|
type DeploymentGetResponse as DeploymentGetResponse,
|
|
409
469
|
type DeploymentResumeResponse as DeploymentResumeResponse,
|
|
470
|
+
type DeploymentListParams as DeploymentListParams,
|
|
410
471
|
type DeploymentDeployParams as DeploymentDeployParams,
|
|
411
472
|
type DeploymentGetParams as DeploymentGetParams,
|
|
412
473
|
type DeploymentResumeParams as DeploymentResumeParams,
|
|
@@ -11,16 +11,27 @@ export {
|
|
|
11
11
|
type DeploymentDeployResponse,
|
|
12
12
|
type DeploymentGetResponse,
|
|
13
13
|
type DeploymentResumeResponse,
|
|
14
|
+
type DeploymentListParams,
|
|
14
15
|
type DeploymentDeployParams,
|
|
15
16
|
type DeploymentGetParams,
|
|
16
17
|
type DeploymentResumeParams,
|
|
17
18
|
} from './deployments';
|
|
18
19
|
export { Logs, type LogListResponse, type LogListParams } from './logs';
|
|
20
|
+
export {
|
|
21
|
+
Repo,
|
|
22
|
+
type RepoDeleteResponse,
|
|
23
|
+
type RepoGetResponse,
|
|
24
|
+
type RepoSetResponse,
|
|
25
|
+
type RepoDeleteParams,
|
|
26
|
+
type RepoGetParams,
|
|
27
|
+
type RepoSetParams,
|
|
28
|
+
} from './repo';
|
|
19
29
|
export {
|
|
20
30
|
Secrets,
|
|
21
31
|
type SecretListResponse,
|
|
22
32
|
type SecretDeleteResponse,
|
|
23
33
|
type SecretSetResponse,
|
|
34
|
+
type SecretListParams,
|
|
24
35
|
type SecretDeleteParams,
|
|
25
36
|
type SecretSetParams,
|
|
26
37
|
} from './secrets';
|
|
@@ -33,5 +44,8 @@ export {
|
|
|
33
44
|
type ServerDeleteResponse,
|
|
34
45
|
type ServerGetResponse,
|
|
35
46
|
type ServerListParams,
|
|
47
|
+
type ServerDeleteParams,
|
|
48
|
+
type ServerDownloadParams,
|
|
49
|
+
type ServerGetParams,
|
|
36
50
|
type ServerListResponsesSmitheryPage,
|
|
37
51
|
} from './servers';
|
|
@@ -9,13 +9,17 @@ export class Logs extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Fetch recent runtime logs for the server's deployed Worker, grouped by
|
|
11
11
|
* invocation (requires ownership).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const logs = await client.servers.logs.list('server', {
|
|
16
|
+
* namespace: 'namespace',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
12
19
|
*/
|
|
13
|
-
list(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
options?: RequestOptions,
|
|
17
|
-
): APIPromise<LogListResponse> {
|
|
18
|
-
return this._client.get(path`/servers/${qualifiedName}/logs`, { query, ...options });
|
|
20
|
+
list(server: string, params: LogListParams, options?: RequestOptions): APIPromise<LogListResponse> {
|
|
21
|
+
const { namespace, ...query } = params;
|
|
22
|
+
return this._client.get(path`/servers/${namespace}/${server}/logs`, { query, ...options });
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
25
|
|
|
@@ -86,17 +90,22 @@ export namespace LogListResponse {
|
|
|
86
90
|
|
|
87
91
|
export interface LogListParams {
|
|
88
92
|
/**
|
|
89
|
-
*
|
|
93
|
+
* Path param
|
|
94
|
+
*/
|
|
95
|
+
namespace: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Query param: Start of time range (ISO 8601).
|
|
90
99
|
*/
|
|
91
100
|
from?: string;
|
|
92
101
|
|
|
93
102
|
/**
|
|
94
|
-
* Max invocations to return. Defaults to 50.
|
|
103
|
+
* Query param: Max invocations to return. Defaults to 50.
|
|
95
104
|
*/
|
|
96
105
|
limit?: number;
|
|
97
106
|
|
|
98
107
|
/**
|
|
99
|
-
* End of time range (ISO 8601).
|
|
108
|
+
* Query param: End of time range (ISO 8601).
|
|
100
109
|
*/
|
|
101
110
|
to?: string;
|
|
102
111
|
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Repo extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Disconnect the GitHub repository connection from a server.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const repo = await client.servers.repo.delete('server', {
|
|
15
|
+
* namespace: 'namespace',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
delete(server: string, params: RepoDeleteParams, options?: RequestOptions): APIPromise<RepoDeleteResponse> {
|
|
20
|
+
const { namespace } = params;
|
|
21
|
+
return this._client.delete(path`/servers/${namespace}/${server}/repo`, options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get the GitHub repository connection for a server, if one exists.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const repo = await client.servers.repo.get('server', {
|
|
30
|
+
* namespace: 'namespace',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
get(server: string, params: RepoGetParams, options?: RequestOptions): APIPromise<RepoGetResponse> {
|
|
35
|
+
const { namespace } = params;
|
|
36
|
+
return this._client.get(path`/servers/${namespace}/${server}/repo`, options);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Upsert a GitHub repository connection for a server. Creates a new connection if
|
|
41
|
+
* none exists, or updates the existing one.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const response = await client.servers.repo.set('server', {
|
|
46
|
+
* namespace: 'namespace',
|
|
47
|
+
* repoName: 'x',
|
|
48
|
+
* repoOwner: 'x',
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
set(server: string, params: RepoSetParams, options?: RequestOptions): APIPromise<RepoSetResponse> {
|
|
53
|
+
const { namespace, ...body } = params;
|
|
54
|
+
return this._client.put(path`/servers/${namespace}/${server}/repo`, { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface RepoDeleteResponse {
|
|
59
|
+
success: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface RepoGetResponse {
|
|
63
|
+
autoDeploy: boolean | null;
|
|
64
|
+
|
|
65
|
+
baseDirectory: string;
|
|
66
|
+
|
|
67
|
+
branch: string | null;
|
|
68
|
+
|
|
69
|
+
isPrivate: boolean;
|
|
70
|
+
|
|
71
|
+
repoName: string;
|
|
72
|
+
|
|
73
|
+
repoOwner: string;
|
|
74
|
+
|
|
75
|
+
type: 'github';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface RepoSetResponse {
|
|
79
|
+
autoDeploy: boolean | null;
|
|
80
|
+
|
|
81
|
+
baseDirectory: string;
|
|
82
|
+
|
|
83
|
+
branch: string | null;
|
|
84
|
+
|
|
85
|
+
isPrivate: boolean;
|
|
86
|
+
|
|
87
|
+
repoName: string;
|
|
88
|
+
|
|
89
|
+
repoOwner: string;
|
|
90
|
+
|
|
91
|
+
type: 'github';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface RepoDeleteParams {
|
|
95
|
+
namespace: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface RepoGetParams {
|
|
99
|
+
namespace: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface RepoSetParams {
|
|
103
|
+
/**
|
|
104
|
+
* Path param
|
|
105
|
+
*/
|
|
106
|
+
namespace: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Body param
|
|
110
|
+
*/
|
|
111
|
+
repoName: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Body param
|
|
115
|
+
*/
|
|
116
|
+
repoOwner: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Body param
|
|
120
|
+
*/
|
|
121
|
+
autoDeploy?: boolean;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Body param
|
|
125
|
+
*/
|
|
126
|
+
baseDirectory?: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Body param
|
|
130
|
+
*/
|
|
131
|
+
branch?: string | null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare namespace Repo {
|
|
135
|
+
export {
|
|
136
|
+
type RepoDeleteResponse as RepoDeleteResponse,
|
|
137
|
+
type RepoGetResponse as RepoGetResponse,
|
|
138
|
+
type RepoSetResponse as RepoSetResponse,
|
|
139
|
+
type RepoDeleteParams as RepoDeleteParams,
|
|
140
|
+
type RepoGetParams as RepoGetParams,
|
|
141
|
+
type RepoSetParams as RepoSetParams,
|
|
142
|
+
};
|
|
143
|
+
}
|