@smithery/api 0.24.0 → 0.25.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 +13 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +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 +16 -11
- package/lib/mcp-transport.d.mts.map +1 -1
- package/lib/mcp-transport.d.ts +16 -11
- package/lib/mcp-transport.d.ts.map +1 -1
- package/lib/mcp-transport.js +36 -16
- package/lib/mcp-transport.js.map +1 -1
- package/lib/mcp-transport.mjs +34 -14
- package/lib/mcp-transport.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/connect/connect.d.mts +2 -2
- package/resources/beta/connect/connect.d.mts.map +1 -1
- package/resources/beta/connect/connect.d.ts +2 -2
- package/resources/beta/connect/connect.d.ts.map +1 -1
- package/resources/beta/connect/connect.js.map +1 -1
- package/resources/beta/connect/connect.mjs.map +1 -1
- package/resources/beta/connect/connections.d.mts +38 -24
- package/resources/beta/connect/connections.d.mts.map +1 -1
- package/resources/beta/connect/connections.d.ts +38 -24
- package/resources/beta/connect/connections.d.ts.map +1 -1
- package/resources/beta/connect/connections.js +21 -21
- package/resources/beta/connect/connections.js.map +1 -1
- package/resources/beta/connect/connections.mjs +21 -21
- package/resources/beta/connect/connections.mjs.map +1 -1
- package/resources/beta/connect/index.d.mts +1 -1
- package/resources/beta/connect/index.d.mts.map +1 -1
- package/resources/beta/connect/index.d.ts +1 -1
- package/resources/beta/connect/index.d.ts.map +1 -1
- package/resources/beta/connect/index.js.map +1 -1
- package/resources/beta/connect/index.mjs.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.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/namespaces.d.mts +11 -16
- package/resources/namespaces.d.mts.map +1 -1
- package/resources/namespaces.d.ts +11 -16
- package/resources/namespaces.d.ts.map +1 -1
- package/resources/namespaces.js +12 -15
- package/resources/namespaces.js.map +1 -1
- package/resources/namespaces.mjs +12 -15
- package/resources/namespaces.mjs.map +1 -1
- package/resources/servers/deployments.d.mts +30 -27
- package/resources/servers/deployments.d.mts.map +1 -1
- package/resources/servers/deployments.d.ts +30 -27
- package/resources/servers/deployments.d.ts.map +1 -1
- package/resources/servers/deployments.js +7 -7
- package/resources/servers/deployments.js.map +1 -1
- package/resources/servers/deployments.mjs +7 -7
- package/resources/servers/deployments.mjs.map +1 -1
- package/resources/servers/index.d.mts +2 -2
- package/resources/servers/index.d.mts.map +1 -1
- package/resources/servers/index.d.ts +2 -2
- package/resources/servers/index.d.ts.map +1 -1
- package/resources/servers/servers.d.mts +30 -30
- package/resources/servers/servers.d.mts.map +1 -1
- package/resources/servers/servers.d.ts +30 -30
- package/resources/servers/servers.d.ts.map +1 -1
- package/resources/servers/servers.js +6 -6
- package/resources/servers/servers.js.map +1 -1
- package/resources/servers/servers.mjs +6 -6
- package/resources/servers/servers.mjs.map +1 -1
- package/resources/tokens.d.mts +96 -63
- package/resources/tokens.d.mts.map +1 -1
- package/resources/tokens.d.ts +96 -63
- package/resources/tokens.d.ts.map +1 -1
- package/resources/tokens.js +1 -4
- package/resources/tokens.js.map +1 -1
- package/resources/tokens.mjs +1 -4
- package/resources/tokens.mjs.map +1 -1
- package/src/client.ts +20 -5
- package/src/lib/mcp-transport.ts +42 -19
- package/src/resources/beta/connect/connect.ts +4 -2
- package/src/resources/beta/connect/connections.ts +53 -35
- package/src/resources/beta/connect/index.ts +2 -1
- package/src/resources/index.ts +13 -3
- package/src/resources/namespaces.ts +17 -17
- package/src/resources/servers/deployments.ts +45 -47
- package/src/resources/servers/index.ts +3 -3
- package/src/resources/servers/servers.ts +49 -49
- package/src/resources/tokens.ts +103 -58
- 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
|
@@ -16,12 +16,6 @@ export class Servers extends APIResource {
|
|
|
16
16
|
this.logs = new LogsAPI.Logs(this._client);
|
|
17
17
|
this.secrets = new SecretsAPI.Secrets(this._client);
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Get a single server by its qualified name.
|
|
21
|
-
*/
|
|
22
|
-
retrieve(qualifiedName, options) {
|
|
23
|
-
return this._client.get(path `/servers/${qualifiedName}`, options);
|
|
24
|
-
}
|
|
25
19
|
/**
|
|
26
20
|
* Get a paginated list of all servers. Use the `q` parameter to search.
|
|
27
21
|
*/
|
|
@@ -44,6 +38,12 @@ export class Servers extends APIResource {
|
|
|
44
38
|
__binaryResponse: true,
|
|
45
39
|
});
|
|
46
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Get a single server by its qualified name.
|
|
43
|
+
*/
|
|
44
|
+
get(qualifiedName, options) {
|
|
45
|
+
return this._client.get(path `/servers/${qualifiedName}`, options);
|
|
46
|
+
}
|
|
47
47
|
}
|
|
48
48
|
Servers.Deployments = Deployments;
|
|
49
49
|
Servers.Logs = Logs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"servers.mjs","sourceRoot":"","sources":["../../src/resources/servers/servers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EASL,WAAW,GAKZ;OACM,KAAK,OAAO;OACZ,EAAkC,IAAI,EAAE;OACxC,KAAK,UAAU;OACf,EAML,OAAO,GACR;OAEM,EAAe,YAAY,EAA2B;OACtD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC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tD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,aAAa,WAAW,EAAE;YAChE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACxE,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,aAAqB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AAiLD,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;AAClC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
package/resources/tokens.d.mts
CHANGED
|
@@ -9,57 +9,83 @@ export declare class Tokens extends APIResource {
|
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* const createTokenResponse = await client.tokens.create({
|
|
12
|
-
*
|
|
13
|
-
* connections: { can: ['read', 'write'] },
|
|
14
|
-
* 'connections.rpc': { can: ['write'] },
|
|
15
|
-
* },
|
|
12
|
+
* allow: {},
|
|
16
13
|
* ttlSeconds: 3600,
|
|
17
14
|
* });
|
|
18
15
|
* ```
|
|
19
16
|
*/
|
|
20
17
|
create(body: TokenCreateParams, options?: RequestOptions): APIPromise<CreateTokenResponse>;
|
|
21
18
|
}
|
|
22
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Permission action. 'read' allows reading/listing. 'write' allows
|
|
21
|
+
* create/modify/delete.
|
|
22
|
+
*/
|
|
23
|
+
export type Action = 'read' | 'write';
|
|
24
|
+
/**
|
|
25
|
+
* Permission grants with per-resource scoping. Each resource defines its own
|
|
26
|
+
* namespaces and constraints.
|
|
27
|
+
*/
|
|
28
|
+
export interface Allow {
|
|
29
|
+
/**
|
|
30
|
+
* Scope for managing MCP connections.
|
|
31
|
+
*/
|
|
32
|
+
connections?: ConnectionScope;
|
|
33
|
+
/**
|
|
34
|
+
* Scope for deployment operations.
|
|
35
|
+
*/
|
|
36
|
+
deployments?: ResourceScope;
|
|
37
|
+
/**
|
|
38
|
+
* Scope for namespace management.
|
|
39
|
+
*/
|
|
40
|
+
namespaces?: ResourceScope;
|
|
41
|
+
/**
|
|
42
|
+
* Scope for making RPC calls on connections.
|
|
43
|
+
*/
|
|
44
|
+
rpc?: RpcScope;
|
|
45
|
+
/**
|
|
46
|
+
* Scope for server metadata and configuration.
|
|
47
|
+
*/
|
|
48
|
+
servers?: ResourceScope;
|
|
23
49
|
/**
|
|
24
|
-
*
|
|
50
|
+
* Scope for token creation.
|
|
25
51
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
52
|
+
tokens?: ResourceScope;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Scope for connection operations.
|
|
56
|
+
*/
|
|
57
|
+
export interface ConnectionScope {
|
|
58
|
+
/**
|
|
59
|
+
* Actions allowed on connections.
|
|
60
|
+
*/
|
|
61
|
+
actions: Array<Action>;
|
|
62
|
+
/**
|
|
63
|
+
* Namespaces this scope applies to. Use '\*' for all namespaces.
|
|
64
|
+
*/
|
|
65
|
+
namespaces: Array<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Filter access to connections with matching metadata. All keys must match (AND
|
|
68
|
+
* semantics).
|
|
69
|
+
*/
|
|
70
|
+
metadata?: {
|
|
71
|
+
[key: string]: string;
|
|
28
72
|
};
|
|
73
|
+
}
|
|
74
|
+
export interface CreateTokenRequest {
|
|
29
75
|
/**
|
|
30
|
-
*
|
|
76
|
+
* Per-resource permission grants. Format: { [resource]: { actions: [...],
|
|
77
|
+
* namespaces: [...], metadata?: {...} } }
|
|
31
78
|
*/
|
|
32
|
-
|
|
79
|
+
allow: Allow;
|
|
33
80
|
/**
|
|
34
|
-
*
|
|
81
|
+
* Token TTL in seconds. Required. Max 86400 (24 hours).
|
|
35
82
|
*/
|
|
36
|
-
|
|
83
|
+
ttlSeconds: number;
|
|
37
84
|
/**
|
|
38
85
|
* Profile to scope the token to. If not provided, uses the default profile.
|
|
39
86
|
*/
|
|
40
87
|
profileSlug?: string;
|
|
41
88
|
}
|
|
42
|
-
export declare namespace CreateTokenRequest {
|
|
43
|
-
interface Permissions {
|
|
44
|
-
/**
|
|
45
|
-
* Actions granted on this subject.
|
|
46
|
-
*/
|
|
47
|
-
can: Array<'read' | 'write'>;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Optional constraints to limit token access.
|
|
51
|
-
*/
|
|
52
|
-
interface Constraints {
|
|
53
|
-
/**
|
|
54
|
-
* Limit access to specific namespace IDs.
|
|
55
|
-
*/
|
|
56
|
-
namespaceIds?: Array<string>;
|
|
57
|
-
/**
|
|
58
|
-
* Limit access to specific server qualified names.
|
|
59
|
-
*/
|
|
60
|
-
serverQualifiedNames?: Array<string>;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
89
|
export interface CreateTokenResponse {
|
|
64
90
|
/**
|
|
65
91
|
* The signed service token (PASETO v4).
|
|
@@ -70,48 +96,55 @@ export interface CreateTokenResponse {
|
|
|
70
96
|
*/
|
|
71
97
|
expiresAt: string;
|
|
72
98
|
}
|
|
73
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Scope for resource operations.
|
|
101
|
+
*/
|
|
102
|
+
export interface ResourceScope {
|
|
74
103
|
/**
|
|
75
|
-
*
|
|
104
|
+
* Actions allowed on this resource.
|
|
76
105
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
106
|
+
actions: Array<Action>;
|
|
107
|
+
/**
|
|
108
|
+
* Namespaces this scope applies to. Use '\*' for all namespaces.
|
|
109
|
+
*/
|
|
110
|
+
namespaces: Array<string>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Scope for RPC operations on connections.
|
|
114
|
+
*/
|
|
115
|
+
export interface RpcScope {
|
|
116
|
+
/**
|
|
117
|
+
* Actions allowed for RPC calls.
|
|
118
|
+
*/
|
|
119
|
+
actions: Array<Action>;
|
|
120
|
+
/**
|
|
121
|
+
* Namespaces this scope applies to. Use '\*' for all namespaces.
|
|
122
|
+
*/
|
|
123
|
+
namespaces: Array<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Filter access to connections with matching metadata. All keys must match (AND
|
|
126
|
+
* semantics).
|
|
127
|
+
*/
|
|
128
|
+
metadata?: {
|
|
129
|
+
[key: string]: string;
|
|
79
130
|
};
|
|
131
|
+
}
|
|
132
|
+
export interface TokenCreateParams {
|
|
80
133
|
/**
|
|
81
|
-
*
|
|
134
|
+
* Per-resource permission grants. Format: { [resource]: { actions: [...],
|
|
135
|
+
* namespaces: [...], metadata?: {...} } }
|
|
82
136
|
*/
|
|
83
|
-
|
|
137
|
+
allow: Allow;
|
|
84
138
|
/**
|
|
85
|
-
*
|
|
139
|
+
* Token TTL in seconds. Required. Max 86400 (24 hours).
|
|
86
140
|
*/
|
|
87
|
-
|
|
141
|
+
ttlSeconds: number;
|
|
88
142
|
/**
|
|
89
143
|
* Profile to scope the token to. If not provided, uses the default profile.
|
|
90
144
|
*/
|
|
91
145
|
profileSlug?: string;
|
|
92
146
|
}
|
|
93
|
-
export declare namespace TokenCreateParams {
|
|
94
|
-
interface Permissions {
|
|
95
|
-
/**
|
|
96
|
-
* Actions granted on this subject.
|
|
97
|
-
*/
|
|
98
|
-
can: Array<'read' | 'write'>;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Optional constraints to limit token access.
|
|
102
|
-
*/
|
|
103
|
-
interface Constraints {
|
|
104
|
-
/**
|
|
105
|
-
* Limit access to specific namespace IDs.
|
|
106
|
-
*/
|
|
107
|
-
namespaceIds?: Array<string>;
|
|
108
|
-
/**
|
|
109
|
-
* Limit access to specific server qualified names.
|
|
110
|
-
*/
|
|
111
|
-
serverQualifiedNames?: Array<string>;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
147
|
export declare namespace Tokens {
|
|
115
|
-
export { type CreateTokenRequest as CreateTokenRequest, type CreateTokenResponse as CreateTokenResponse, type TokenCreateParams as TokenCreateParams, };
|
|
148
|
+
export { type Action as Action, type Allow as Allow, type ConnectionScope as ConnectionScope, type CreateTokenRequest as CreateTokenRequest, type CreateTokenResponse as CreateTokenResponse, type ResourceScope as ResourceScope, type RpcScope as RpcScope, type TokenCreateParams as TokenCreateParams, };
|
|
116
149
|
}
|
|
117
150
|
//# sourceMappingURL=tokens.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.mts","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"tokens.d.mts","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAG3F;AAED;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;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B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/tokens.d.ts
CHANGED
|
@@ -9,57 +9,83 @@ export declare class Tokens extends APIResource {
|
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
11
|
* const createTokenResponse = await client.tokens.create({
|
|
12
|
-
*
|
|
13
|
-
* connections: { can: ['read', 'write'] },
|
|
14
|
-
* 'connections.rpc': { can: ['write'] },
|
|
15
|
-
* },
|
|
12
|
+
* allow: {},
|
|
16
13
|
* ttlSeconds: 3600,
|
|
17
14
|
* });
|
|
18
15
|
* ```
|
|
19
16
|
*/
|
|
20
17
|
create(body: TokenCreateParams, options?: RequestOptions): APIPromise<CreateTokenResponse>;
|
|
21
18
|
}
|
|
22
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Permission action. 'read' allows reading/listing. 'write' allows
|
|
21
|
+
* create/modify/delete.
|
|
22
|
+
*/
|
|
23
|
+
export type Action = 'read' | 'write';
|
|
24
|
+
/**
|
|
25
|
+
* Permission grants with per-resource scoping. Each resource defines its own
|
|
26
|
+
* namespaces and constraints.
|
|
27
|
+
*/
|
|
28
|
+
export interface Allow {
|
|
29
|
+
/**
|
|
30
|
+
* Scope for managing MCP connections.
|
|
31
|
+
*/
|
|
32
|
+
connections?: ConnectionScope;
|
|
33
|
+
/**
|
|
34
|
+
* Scope for deployment operations.
|
|
35
|
+
*/
|
|
36
|
+
deployments?: ResourceScope;
|
|
37
|
+
/**
|
|
38
|
+
* Scope for namespace management.
|
|
39
|
+
*/
|
|
40
|
+
namespaces?: ResourceScope;
|
|
41
|
+
/**
|
|
42
|
+
* Scope for making RPC calls on connections.
|
|
43
|
+
*/
|
|
44
|
+
rpc?: RpcScope;
|
|
45
|
+
/**
|
|
46
|
+
* Scope for server metadata and configuration.
|
|
47
|
+
*/
|
|
48
|
+
servers?: ResourceScope;
|
|
23
49
|
/**
|
|
24
|
-
*
|
|
50
|
+
* Scope for token creation.
|
|
25
51
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
52
|
+
tokens?: ResourceScope;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Scope for connection operations.
|
|
56
|
+
*/
|
|
57
|
+
export interface ConnectionScope {
|
|
58
|
+
/**
|
|
59
|
+
* Actions allowed on connections.
|
|
60
|
+
*/
|
|
61
|
+
actions: Array<Action>;
|
|
62
|
+
/**
|
|
63
|
+
* Namespaces this scope applies to. Use '\*' for all namespaces.
|
|
64
|
+
*/
|
|
65
|
+
namespaces: Array<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Filter access to connections with matching metadata. All keys must match (AND
|
|
68
|
+
* semantics).
|
|
69
|
+
*/
|
|
70
|
+
metadata?: {
|
|
71
|
+
[key: string]: string;
|
|
28
72
|
};
|
|
73
|
+
}
|
|
74
|
+
export interface CreateTokenRequest {
|
|
29
75
|
/**
|
|
30
|
-
*
|
|
76
|
+
* Per-resource permission grants. Format: { [resource]: { actions: [...],
|
|
77
|
+
* namespaces: [...], metadata?: {...} } }
|
|
31
78
|
*/
|
|
32
|
-
|
|
79
|
+
allow: Allow;
|
|
33
80
|
/**
|
|
34
|
-
*
|
|
81
|
+
* Token TTL in seconds. Required. Max 86400 (24 hours).
|
|
35
82
|
*/
|
|
36
|
-
|
|
83
|
+
ttlSeconds: number;
|
|
37
84
|
/**
|
|
38
85
|
* Profile to scope the token to. If not provided, uses the default profile.
|
|
39
86
|
*/
|
|
40
87
|
profileSlug?: string;
|
|
41
88
|
}
|
|
42
|
-
export declare namespace CreateTokenRequest {
|
|
43
|
-
interface Permissions {
|
|
44
|
-
/**
|
|
45
|
-
* Actions granted on this subject.
|
|
46
|
-
*/
|
|
47
|
-
can: Array<'read' | 'write'>;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Optional constraints to limit token access.
|
|
51
|
-
*/
|
|
52
|
-
interface Constraints {
|
|
53
|
-
/**
|
|
54
|
-
* Limit access to specific namespace IDs.
|
|
55
|
-
*/
|
|
56
|
-
namespaceIds?: Array<string>;
|
|
57
|
-
/**
|
|
58
|
-
* Limit access to specific server qualified names.
|
|
59
|
-
*/
|
|
60
|
-
serverQualifiedNames?: Array<string>;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
89
|
export interface CreateTokenResponse {
|
|
64
90
|
/**
|
|
65
91
|
* The signed service token (PASETO v4).
|
|
@@ -70,48 +96,55 @@ export interface CreateTokenResponse {
|
|
|
70
96
|
*/
|
|
71
97
|
expiresAt: string;
|
|
72
98
|
}
|
|
73
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Scope for resource operations.
|
|
101
|
+
*/
|
|
102
|
+
export interface ResourceScope {
|
|
74
103
|
/**
|
|
75
|
-
*
|
|
104
|
+
* Actions allowed on this resource.
|
|
76
105
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
106
|
+
actions: Array<Action>;
|
|
107
|
+
/**
|
|
108
|
+
* Namespaces this scope applies to. Use '\*' for all namespaces.
|
|
109
|
+
*/
|
|
110
|
+
namespaces: Array<string>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Scope for RPC operations on connections.
|
|
114
|
+
*/
|
|
115
|
+
export interface RpcScope {
|
|
116
|
+
/**
|
|
117
|
+
* Actions allowed for RPC calls.
|
|
118
|
+
*/
|
|
119
|
+
actions: Array<Action>;
|
|
120
|
+
/**
|
|
121
|
+
* Namespaces this scope applies to. Use '\*' for all namespaces.
|
|
122
|
+
*/
|
|
123
|
+
namespaces: Array<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Filter access to connections with matching metadata. All keys must match (AND
|
|
126
|
+
* semantics).
|
|
127
|
+
*/
|
|
128
|
+
metadata?: {
|
|
129
|
+
[key: string]: string;
|
|
79
130
|
};
|
|
131
|
+
}
|
|
132
|
+
export interface TokenCreateParams {
|
|
80
133
|
/**
|
|
81
|
-
*
|
|
134
|
+
* Per-resource permission grants. Format: { [resource]: { actions: [...],
|
|
135
|
+
* namespaces: [...], metadata?: {...} } }
|
|
82
136
|
*/
|
|
83
|
-
|
|
137
|
+
allow: Allow;
|
|
84
138
|
/**
|
|
85
|
-
*
|
|
139
|
+
* Token TTL in seconds. Required. Max 86400 (24 hours).
|
|
86
140
|
*/
|
|
87
|
-
|
|
141
|
+
ttlSeconds: number;
|
|
88
142
|
/**
|
|
89
143
|
* Profile to scope the token to. If not provided, uses the default profile.
|
|
90
144
|
*/
|
|
91
145
|
profileSlug?: string;
|
|
92
146
|
}
|
|
93
|
-
export declare namespace TokenCreateParams {
|
|
94
|
-
interface Permissions {
|
|
95
|
-
/**
|
|
96
|
-
* Actions granted on this subject.
|
|
97
|
-
*/
|
|
98
|
-
can: Array<'read' | 'write'>;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Optional constraints to limit token access.
|
|
102
|
-
*/
|
|
103
|
-
interface Constraints {
|
|
104
|
-
/**
|
|
105
|
-
* Limit access to specific namespace IDs.
|
|
106
|
-
*/
|
|
107
|
-
namespaceIds?: Array<string>;
|
|
108
|
-
/**
|
|
109
|
-
* Limit access to specific server qualified names.
|
|
110
|
-
*/
|
|
111
|
-
serverQualifiedNames?: Array<string>;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
147
|
export declare namespace Tokens {
|
|
115
|
-
export { type CreateTokenRequest as CreateTokenRequest, type CreateTokenResponse as CreateTokenResponse, type TokenCreateParams as TokenCreateParams, };
|
|
148
|
+
export { type Action as Action, type Allow as Allow, type ConnectionScope as ConnectionScope, type CreateTokenRequest as CreateTokenRequest, type CreateTokenResponse as CreateTokenResponse, type ResourceScope as ResourceScope, type RpcScope as RpcScope, type TokenCreateParams as TokenCreateParams, };
|
|
116
149
|
}
|
|
117
150
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAG3F;AAED;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,M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C5C,CAAC;CACH"}
|
package/resources/tokens.js
CHANGED
|
@@ -11,10 +11,7 @@ class Tokens extends resource_1.APIResource {
|
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
13
13
|
* const createTokenResponse = await client.tokens.create({
|
|
14
|
-
*
|
|
15
|
-
* connections: { can: ['read', 'write'] },
|
|
16
|
-
* 'connections.rpc': { can: ['write'] },
|
|
17
|
-
* },
|
|
14
|
+
* allow: {},
|
|
18
15
|
* ttlSeconds: 3600,
|
|
19
16
|
* });
|
|
20
17
|
* ```
|
package/resources/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AAhBD,wBAgBC"}
|
package/resources/tokens.mjs
CHANGED
|
@@ -8,10 +8,7 @@ export class Tokens extends APIResource {
|
|
|
8
8
|
* @example
|
|
9
9
|
* ```ts
|
|
10
10
|
* const createTokenResponse = await client.tokens.create({
|
|
11
|
-
*
|
|
12
|
-
* connections: { can: ['read', 'write'] },
|
|
13
|
-
* 'connections.rpc': { can: ['write'] },
|
|
14
|
-
* },
|
|
11
|
+
* allow: {},
|
|
15
12
|
* ttlSeconds: 3600,
|
|
16
13
|
* });
|
|
17
14
|
* ```
|
package/resources/tokens.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.mjs","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"tokens.mjs","sourceRoot":"","sources":["../src/resources/tokens.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -29,13 +29,23 @@ import * as API from './resources/index';
|
|
|
29
29
|
import { APIPromise } from './core/api-promise';
|
|
30
30
|
import { Health, HealthCheckResponse } from './resources/health';
|
|
31
31
|
import {
|
|
32
|
-
NamespaceCreateParams,
|
|
33
32
|
NamespaceCreateResponse,
|
|
34
33
|
NamespaceListResponse,
|
|
34
|
+
NamespaceSetResponse,
|
|
35
35
|
Namespaces,
|
|
36
36
|
} from './resources/namespaces';
|
|
37
37
|
import { SkillListParams, SkillListResponse, SkillListResponsesSkillsPage, Skills } from './resources/skills';
|
|
38
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
Action,
|
|
40
|
+
Allow,
|
|
41
|
+
ConnectionScope,
|
|
42
|
+
CreateTokenRequest,
|
|
43
|
+
CreateTokenResponse,
|
|
44
|
+
ResourceScope,
|
|
45
|
+
RpcScope,
|
|
46
|
+
TokenCreateParams,
|
|
47
|
+
Tokens,
|
|
48
|
+
} from './resources/tokens';
|
|
39
49
|
import { Uplink, UplinkCreateTokenResponse } from './resources/uplink';
|
|
40
50
|
import { Beta } from './resources/beta/beta';
|
|
41
51
|
import {
|
|
@@ -43,10 +53,10 @@ import {
|
|
|
43
53
|
DeploymentTarget,
|
|
44
54
|
ProjectConfig,
|
|
45
55
|
ServerDeleteResponse,
|
|
56
|
+
ServerGetResponse,
|
|
46
57
|
ServerListParams,
|
|
47
58
|
ServerListResponse,
|
|
48
59
|
ServerListResponsesSmitheryPage,
|
|
49
|
-
ServerRetrieveResponse,
|
|
50
60
|
Servers,
|
|
51
61
|
} from './resources/servers/servers';
|
|
52
62
|
import { type Fetch } from './internal/builtin-types';
|
|
@@ -785,9 +795,9 @@ export declare namespace Smithery {
|
|
|
785
795
|
type BuildConfig as BuildConfig,
|
|
786
796
|
type DeploymentTarget as DeploymentTarget,
|
|
787
797
|
type ProjectConfig as ProjectConfig,
|
|
788
|
-
type ServerRetrieveResponse as ServerRetrieveResponse,
|
|
789
798
|
type ServerListResponse as ServerListResponse,
|
|
790
799
|
type ServerDeleteResponse as ServerDeleteResponse,
|
|
800
|
+
type ServerGetResponse as ServerGetResponse,
|
|
791
801
|
type ServerListResponsesSmitheryPage as ServerListResponsesSmitheryPage,
|
|
792
802
|
type ServerListParams as ServerListParams,
|
|
793
803
|
};
|
|
@@ -805,13 +815,18 @@ export declare namespace Smithery {
|
|
|
805
815
|
Namespaces as Namespaces,
|
|
806
816
|
type NamespaceCreateResponse as NamespaceCreateResponse,
|
|
807
817
|
type NamespaceListResponse as NamespaceListResponse,
|
|
808
|
-
type
|
|
818
|
+
type NamespaceSetResponse as NamespaceSetResponse,
|
|
809
819
|
};
|
|
810
820
|
|
|
811
821
|
export {
|
|
812
822
|
Tokens as Tokens,
|
|
823
|
+
type Action as Action,
|
|
824
|
+
type Allow as Allow,
|
|
825
|
+
type ConnectionScope as ConnectionScope,
|
|
813
826
|
type CreateTokenRequest as CreateTokenRequest,
|
|
814
827
|
type CreateTokenResponse as CreateTokenResponse,
|
|
828
|
+
type ResourceScope as ResourceScope,
|
|
829
|
+
type RpcScope as RpcScope,
|
|
815
830
|
type TokenCreateParams as TokenCreateParams,
|
|
816
831
|
};
|
|
817
832
|
|