latitudesh-typescript-sdk 0.8.21 → 0.8.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/bin/mcp-server.js +32668 -38228
- package/bin/mcp-server.js.map +122 -208
- package/dist/commonjs/funcs/blockStoragePostStorageVolumesMap.js +4 -2
- package/dist/commonjs/funcs/blockStoragePostStorageVolumesMap.js.map +1 -1
- package/dist/commonjs/funcs/blockStoragePostStorageVolumesUnmap.d.ts +17 -0
- package/dist/commonjs/funcs/blockStoragePostStorageVolumesUnmap.d.ts.map +1 -0
- package/dist/commonjs/funcs/blockStoragePostStorageVolumesUnmap.js +122 -0
- package/dist/commonjs/funcs/blockStoragePostStorageVolumesUnmap.js.map +1 -0
- package/dist/commonjs/funcs/firewallsGetAllFirewallAssignments.d.ts +1 -1
- package/dist/commonjs/funcs/firewallsGetAllFirewallAssignments.js +1 -1
- package/dist/commonjs/funcs/serversList.js +14 -0
- package/dist/commonjs/funcs/serversList.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/blockStoragePostStorageVolumesUnmap.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/blockStoragePostStorageVolumesUnmap.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/blockStoragePostStorageVolumesUnmap.js +64 -0
- package/dist/commonjs/mcp-server/tools/blockStoragePostStorageVolumesUnmap.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/firewallsGetAllFirewallAssignments.js +1 -1
- package/dist/commonjs/mcp-server/tools/firewallsGetAllFirewallAssignments.js.map +1 -1
- package/dist/commonjs/models/operations/createfirewallassignment.d.ts +1 -1
- package/dist/commonjs/models/operations/getservers.d.ts +72 -2
- package/dist/commonjs/models/operations/getservers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getservers.js +56 -0
- package/dist/commonjs/models/operations/getservers.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/poststoragevolumesmap.d.ts +29 -29
- package/dist/commonjs/models/operations/poststoragevolumesmap.d.ts.map +1 -1
- package/dist/commonjs/models/operations/poststoragevolumesmap.js +36 -36
- package/dist/commonjs/models/operations/poststoragevolumesmap.js.map +1 -1
- package/dist/commonjs/models/operations/poststoragevolumesunmap.d.ts +48 -0
- package/dist/commonjs/models/operations/poststoragevolumesunmap.d.ts.map +1 -0
- package/dist/commonjs/models/operations/poststoragevolumesunmap.js +89 -0
- package/dist/commonjs/models/operations/poststoragevolumesunmap.js.map +1 -0
- package/dist/commonjs/models/serverregionresourcedata.d.ts +2 -0
- package/dist/commonjs/models/serverregionresourcedata.d.ts.map +1 -1
- package/dist/commonjs/models/serverregionresourcedata.js +4 -0
- package/dist/commonjs/models/serverregionresourcedata.js.map +1 -1
- package/dist/commonjs/models/volumedata.d.ts +1 -1
- package/dist/commonjs/sdk/blockstorage.d.ts +7 -0
- package/dist/commonjs/sdk/blockstorage.d.ts.map +1 -1
- package/dist/commonjs/sdk/blockstorage.js +10 -0
- package/dist/commonjs/sdk/blockstorage.js.map +1 -1
- package/dist/commonjs/sdk/firewalls.d.ts +1 -1
- package/dist/commonjs/sdk/firewalls.js +1 -1
- package/dist/esm/funcs/blockStoragePostStorageVolumesMap.js +4 -2
- package/dist/esm/funcs/blockStoragePostStorageVolumesMap.js.map +1 -1
- package/dist/esm/funcs/blockStoragePostStorageVolumesUnmap.d.ts +17 -0
- package/dist/esm/funcs/blockStoragePostStorageVolumesUnmap.d.ts.map +1 -0
- package/dist/esm/funcs/blockStoragePostStorageVolumesUnmap.js +86 -0
- package/dist/esm/funcs/blockStoragePostStorageVolumesUnmap.js.map +1 -0
- package/dist/esm/funcs/firewallsGetAllFirewallAssignments.d.ts +1 -1
- package/dist/esm/funcs/firewallsGetAllFirewallAssignments.js +1 -1
- package/dist/esm/funcs/serversList.js +14 -0
- package/dist/esm/funcs/serversList.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/blockStoragePostStorageVolumesUnmap.d.ts +8 -0
- package/dist/esm/mcp-server/tools/blockStoragePostStorageVolumesUnmap.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/blockStoragePostStorageVolumesUnmap.js +28 -0
- package/dist/esm/mcp-server/tools/blockStoragePostStorageVolumesUnmap.js.map +1 -0
- package/dist/esm/mcp-server/tools/firewallsGetAllFirewallAssignments.js +1 -1
- package/dist/esm/mcp-server/tools/firewallsGetAllFirewallAssignments.js.map +1 -1
- package/dist/esm/models/operations/createfirewallassignment.d.ts +1 -1
- package/dist/esm/models/operations/getservers.d.ts +72 -2
- package/dist/esm/models/operations/getservers.d.ts.map +1 -1
- package/dist/esm/models/operations/getservers.js +56 -0
- package/dist/esm/models/operations/getservers.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/poststoragevolumesmap.d.ts +29 -29
- package/dist/esm/models/operations/poststoragevolumesmap.d.ts.map +1 -1
- package/dist/esm/models/operations/poststoragevolumesmap.js +29 -29
- package/dist/esm/models/operations/poststoragevolumesmap.js.map +1 -1
- package/dist/esm/models/operations/poststoragevolumesunmap.d.ts +48 -0
- package/dist/esm/models/operations/poststoragevolumesunmap.d.ts.map +1 -0
- package/dist/esm/models/operations/poststoragevolumesunmap.js +47 -0
- package/dist/esm/models/operations/poststoragevolumesunmap.js.map +1 -0
- package/dist/esm/models/serverregionresourcedata.d.ts +2 -0
- package/dist/esm/models/serverregionresourcedata.d.ts.map +1 -1
- package/dist/esm/models/serverregionresourcedata.js +4 -0
- package/dist/esm/models/serverregionresourcedata.js.map +1 -1
- package/dist/esm/models/volumedata.d.ts +1 -1
- package/dist/esm/sdk/blockstorage.d.ts +7 -0
- package/dist/esm/sdk/blockstorage.d.ts.map +1 -1
- package/dist/esm/sdk/blockstorage.js +10 -0
- package/dist/esm/sdk/blockstorage.js.map +1 -1
- package/dist/esm/sdk/firewalls.d.ts +1 -1
- package/dist/esm/sdk/firewalls.js +1 -1
- package/jsr.json +1 -1
- package/package.json +6 -6
- package/src/funcs/blockStoragePostStorageVolumesMap.ts +4 -2
- package/src/funcs/blockStoragePostStorageVolumesUnmap.ts +170 -0
- package/src/funcs/firewallsGetAllFirewallAssignments.ts +1 -1
- package/src/funcs/serversList.ts +14 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/blockStoragePostStorageVolumesUnmap.ts +39 -0
- package/src/mcp-server/tools/firewallsGetAllFirewallAssignments.ts +1 -1
- package/src/models/operations/createfirewallassignment.ts +1 -1
- package/src/models/operations/getservers.ts +128 -2
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/poststoragevolumesmap.ts +68 -68
- package/src/models/operations/poststoragevolumesunmap.ts +146 -0
- package/src/models/serverregionresourcedata.ts +6 -0
- package/src/models/volumedata.ts +1 -1
- package/src/sdk/blockstorage.ts +18 -0
- package/src/sdk/firewalls.ts +1 -1
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { LatitudeshCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { LatitudeshError } from "../models/errors/latitudesherror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Unmap volume from server
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Unmaps a high performance volume from the server it is currently mapped to.
|
|
33
|
+
*/
|
|
34
|
+
export function blockStoragePostStorageVolumesUnmap(
|
|
35
|
+
client: LatitudeshCore,
|
|
36
|
+
request: operations.PostStorageVolumesUnmapRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.PostStorageVolumesUnmapResponse,
|
|
41
|
+
| LatitudeshError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: LatitudeshCore,
|
|
60
|
+
request: operations.PostStorageVolumesUnmapRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.PostStorageVolumesUnmapResponse,
|
|
66
|
+
| LatitudeshError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) =>
|
|
81
|
+
operations.PostStorageVolumesUnmapRequest$outboundSchema.parse(value),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed.ok) {
|
|
85
|
+
return [parsed, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload = parsed.value;
|
|
88
|
+
const body = null;
|
|
89
|
+
|
|
90
|
+
const pathParams = {
|
|
91
|
+
id: encodeSimple("id", payload.id, {
|
|
92
|
+
explode: false,
|
|
93
|
+
charEncoding: "percent",
|
|
94
|
+
}),
|
|
95
|
+
};
|
|
96
|
+
const path = pathToFunc("/storage/volumes/{id}/unmap")(pathParams);
|
|
97
|
+
|
|
98
|
+
const headers = new Headers(compactMap({
|
|
99
|
+
Accept: "application/vnd.api+json",
|
|
100
|
+
}));
|
|
101
|
+
|
|
102
|
+
const secConfig = await extractSecurity(client._options.bearer);
|
|
103
|
+
const securityInput = secConfig == null ? {} : { bearer: secConfig };
|
|
104
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
105
|
+
|
|
106
|
+
const context = {
|
|
107
|
+
options: client._options,
|
|
108
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
109
|
+
operationID: "post-storage-volumes-unmap",
|
|
110
|
+
oAuth2Scopes: null,
|
|
111
|
+
|
|
112
|
+
resolvedSecurity: requestSecurity,
|
|
113
|
+
|
|
114
|
+
securitySource: client._options.bearer,
|
|
115
|
+
retryConfig: options?.retries
|
|
116
|
+
|| client._options.retryConfig
|
|
117
|
+
|| { strategy: "none" },
|
|
118
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "POST",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path,
|
|
126
|
+
headers: headers,
|
|
127
|
+
body: body,
|
|
128
|
+
userAgent: client._options.userAgent,
|
|
129
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
130
|
+
}, options);
|
|
131
|
+
if (!requestRes.ok) {
|
|
132
|
+
return [requestRes, { status: "invalid" }];
|
|
133
|
+
}
|
|
134
|
+
const req = requestRes.value;
|
|
135
|
+
|
|
136
|
+
const doResult = await client._do(req, {
|
|
137
|
+
context,
|
|
138
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
139
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
140
|
+
retryConfig: context.retryConfig,
|
|
141
|
+
retryCodes: context.retryCodes,
|
|
142
|
+
});
|
|
143
|
+
if (!doResult.ok) {
|
|
144
|
+
return [doResult, { status: "request-error", request: req }];
|
|
145
|
+
}
|
|
146
|
+
const response = doResult.value;
|
|
147
|
+
|
|
148
|
+
const [result] = await M.match<
|
|
149
|
+
operations.PostStorageVolumesUnmapResponse,
|
|
150
|
+
| LatitudeshError
|
|
151
|
+
| ResponseValidationError
|
|
152
|
+
| ConnectionError
|
|
153
|
+
| RequestAbortedError
|
|
154
|
+
| RequestTimeoutError
|
|
155
|
+
| InvalidRequestError
|
|
156
|
+
| UnexpectedClientError
|
|
157
|
+
| SDKValidationError
|
|
158
|
+
>(
|
|
159
|
+
M.json(202, operations.PostStorageVolumesUnmapResponse$inboundSchema, {
|
|
160
|
+
ctype: "application/vnd.api+json",
|
|
161
|
+
}),
|
|
162
|
+
M.fail("4XX"),
|
|
163
|
+
M.fail("5XX"),
|
|
164
|
+
)(response, req);
|
|
165
|
+
if (!result.ok) {
|
|
166
|
+
return [result, { status: "complete", request: req, response }];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return [result, { status: "complete", request: req, response }];
|
|
170
|
+
}
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
* List firewall assignments
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
|
-
* Returns a list of all servers and virtual machines assigned to
|
|
38
|
+
* Returns a list of all servers and virtual machines assigned to a firewall.
|
|
39
39
|
*/
|
|
40
40
|
export function firewallsGetAllFirewallAssignments(
|
|
41
41
|
client: LatitudeshCore,
|
package/src/funcs/serversList.ts
CHANGED
|
@@ -106,13 +106,27 @@ async function $do(
|
|
|
106
106
|
"filter[bgp_eligible]": payload?.["filter[bgp_eligible]"],
|
|
107
107
|
"filter[created_at_gte]": payload?.["filter[created_at_gte]"],
|
|
108
108
|
"filter[created_at_lte]": payload?.["filter[created_at_lte]"],
|
|
109
|
+
"filter[created_at]": payload?.["filter[created_at]"],
|
|
109
110
|
"filter[disk][eql]": payload?.["filter[disk][eql]"],
|
|
110
111
|
"filter[disk][gte]": payload?.["filter[disk][gte]"],
|
|
111
112
|
"filter[disk][lte]": payload?.["filter[disk][lte]"],
|
|
112
113
|
"filter[gpu]": payload?.["filter[gpu]"],
|
|
113
114
|
"filter[hostname]": payload?.["filter[hostname]"],
|
|
115
|
+
"filter[hostname][eql]": payload?.["filter[hostname][eql]"],
|
|
116
|
+
"filter[hostname][match]": payload?.["filter[hostname][match]"],
|
|
117
|
+
"filter[hostname][prefix]": payload?.["filter[hostname][prefix]"],
|
|
118
|
+
"filter[hostname][suffix]": payload?.["filter[hostname][suffix]"],
|
|
119
|
+
"filter[id]": payload?.["filter[id]"],
|
|
114
120
|
"filter[label]": payload?.["filter[label]"],
|
|
121
|
+
"filter[label][eql]": payload?.["filter[label][eql]"],
|
|
122
|
+
"filter[label][match]": payload?.["filter[label][match]"],
|
|
123
|
+
"filter[label][prefix]": payload?.["filter[label][prefix]"],
|
|
124
|
+
"filter[label][suffix]": payload?.["filter[label][suffix]"],
|
|
115
125
|
"filter[plan]": payload?.["filter[plan]"],
|
|
126
|
+
"filter[plan][eql]": payload?.["filter[plan][eql]"],
|
|
127
|
+
"filter[plan][match]": payload?.["filter[plan][match]"],
|
|
128
|
+
"filter[plan][prefix]": payload?.["filter[plan][prefix]"],
|
|
129
|
+
"filter[plan][suffix]": payload?.["filter[plan][suffix]"],
|
|
116
130
|
"filter[project]": payload?.["filter[project]"],
|
|
117
131
|
"filter[ram][eql]": payload?.["filter[ram][eql]"],
|
|
118
132
|
"filter[ram][gte]": payload?.["filter[ram][gte]"],
|
package/src/lib/config.ts
CHANGED
|
@@ -74,8 +74,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
74
74
|
export const SDK_METADATA = {
|
|
75
75
|
language: "typescript",
|
|
76
76
|
openapiDocVersion: "2023-06-01",
|
|
77
|
-
sdkVersion: "0.8.
|
|
78
|
-
genVersion: "2.
|
|
77
|
+
sdkVersion: "0.8.23",
|
|
78
|
+
genVersion: "2.935.1",
|
|
79
79
|
userAgent:
|
|
80
|
-
"speakeasy-sdk/typescript 0.8.
|
|
80
|
+
"speakeasy-sdk/typescript 0.8.23 2.935.1 2023-06-01 latitudesh-typescript-sdk",
|
|
81
81
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -29,6 +29,7 @@ import { tool$blockStorageGetStorageVolumes } from "./tools/blockStorageGetStora
|
|
|
29
29
|
import { tool$blockStoragePostStorageVolumes } from "./tools/blockStoragePostStorageVolumes.js";
|
|
30
30
|
import { tool$blockStoragePostStorageVolumesMap } from "./tools/blockStoragePostStorageVolumesMap.js";
|
|
31
31
|
import { tool$blockStoragePostStorageVolumesMount } from "./tools/blockStoragePostStorageVolumesMount.js";
|
|
32
|
+
import { tool$blockStoragePostStorageVolumesUnmap } from "./tools/blockStoragePostStorageVolumesUnmap.js";
|
|
32
33
|
import { tool$elasticIpsCreateElasticIp } from "./tools/elasticIpsCreateElasticIp.js";
|
|
33
34
|
import { tool$elasticIpsCreateElasticIpBgpSession } from "./tools/elasticIpsCreateElasticIpBgpSession.js";
|
|
34
35
|
import { tool$elasticIpsDeleteElasticIp } from "./tools/elasticIpsDeleteElasticIp.js";
|
|
@@ -199,7 +200,7 @@ export function createMCPServer(deps: {
|
|
|
199
200
|
}) {
|
|
200
201
|
const server = new McpServer({
|
|
201
202
|
name: "Latitudesh",
|
|
202
|
-
version: "0.8.
|
|
203
|
+
version: "0.8.23",
|
|
203
204
|
});
|
|
204
205
|
|
|
205
206
|
const client = new LatitudeshCore({
|
|
@@ -354,6 +355,7 @@ export function createMCPServer(deps: {
|
|
|
354
355
|
tool(tool$blockStorageDeleteStorageVolumes);
|
|
355
356
|
tool(tool$blockStoragePostStorageVolumesMount);
|
|
356
357
|
tool(tool$blockStoragePostStorageVolumesMap);
|
|
358
|
+
tool(tool$blockStoragePostStorageVolumesUnmap);
|
|
357
359
|
tool(tool$tagsList);
|
|
358
360
|
tool(tool$tagsCreate);
|
|
359
361
|
tool(tool$tagsUpdate);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { blockStoragePostStorageVolumesUnmap } from "../../funcs/blockStoragePostStorageVolumesUnmap.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.PostStorageVolumesUnmapRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$blockStoragePostStorageVolumesUnmap: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "block-storage-post-storage-volumes-unmap",
|
|
17
|
+
description: `Unmap volume from server
|
|
18
|
+
|
|
19
|
+
Unmaps a high performance volume from the server it is currently mapped to.`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await blockStoragePostStorageVolumesUnmap(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -16,7 +16,7 @@ export const tool$firewallsGetAllFirewallAssignments: ToolDefinition<
|
|
|
16
16
|
name: "firewalls-get-all-firewall-assignments",
|
|
17
17
|
description: `List firewall assignments
|
|
18
18
|
|
|
19
|
-
Returns a list of all servers and virtual machines assigned to
|
|
19
|
+
Returns a list of all servers and virtual machines assigned to a firewall.`,
|
|
20
20
|
args,
|
|
21
21
|
tool: async (client, args, ctx) => {
|
|
22
22
|
const [result, apiCall] = await firewallsGetAllFirewallAssignments(
|
|
@@ -18,7 +18,7 @@ export type CreateFirewallAssignmentType2 = ClosedEnum<
|
|
|
18
18
|
|
|
19
19
|
export type CreateFirewallAssignmentAttributes2 = {
|
|
20
20
|
/**
|
|
21
|
-
* The server ID to assign. Provide exactly one of server_id or virtual_machine_id.
|
|
21
|
+
* The server ID to assign. Provide exactly one of server_id or virtual_machine_id. A server can be assigned to at most one firewall.
|
|
22
22
|
*/
|
|
23
23
|
serverId?: string | undefined;
|
|
24
24
|
/**
|
|
@@ -10,6 +10,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
import * as models from "../index.js";
|
|
11
11
|
|
|
12
12
|
export type GetServersRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The server ID to filter by (exact match)
|
|
15
|
+
*/
|
|
16
|
+
filterId?: string | undefined;
|
|
13
17
|
/**
|
|
14
18
|
* The project ID or Slug to filter by
|
|
15
19
|
*/
|
|
@@ -23,17 +27,53 @@ export type GetServersRequest = {
|
|
|
23
27
|
*/
|
|
24
28
|
filterHostname?: string | undefined;
|
|
25
29
|
/**
|
|
26
|
-
* The
|
|
30
|
+
* The exact (case-sensitive) hostname of server to filter by
|
|
31
|
+
*/
|
|
32
|
+
filterHostnameEql?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Filter servers whose hostname starts with the provided value
|
|
35
|
+
*/
|
|
36
|
+
filterHostnamePrefix?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Filter servers whose hostname ends with the provided value
|
|
39
|
+
*/
|
|
40
|
+
filterHostnameSuffix?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Filter servers whose hostname contains the provided value
|
|
43
|
+
*/
|
|
44
|
+
filterHostnameMatch?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The created at greater than equal date to filter by. `created_at` is the date the server was added to the project
|
|
27
47
|
*/
|
|
28
48
|
filterCreatedAtGte?: string | undefined;
|
|
29
49
|
/**
|
|
30
|
-
* The created at less than equal date to filter by
|
|
50
|
+
* The created at less than equal date to filter by. `created_at` is the date the server was added to the project
|
|
31
51
|
*/
|
|
32
52
|
filterCreatedAtLte?: string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The created at date range to filter by, as two comma-separated ISO 8601 datetimes (both bounds required), e.g. `filter[created_at]=2026-01-01T00:00:00Z,2026-01-31T23:59:59Z`. `created_at` is the date the server was added to the project
|
|
55
|
+
*/
|
|
56
|
+
filterCreatedAt?: string | undefined;
|
|
33
57
|
/**
|
|
34
58
|
* The label of server to filter by
|
|
35
59
|
*/
|
|
36
60
|
filterLabel?: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* The exact (case-sensitive) label of server to filter by
|
|
63
|
+
*/
|
|
64
|
+
filterLabelEql?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Filter servers whose label starts with the provided value
|
|
67
|
+
*/
|
|
68
|
+
filterLabelPrefix?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Filter servers whose label ends with the provided value
|
|
71
|
+
*/
|
|
72
|
+
filterLabelSuffix?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Filter servers whose label contains the provided value
|
|
75
|
+
*/
|
|
76
|
+
filterLabelMatch?: string | undefined;
|
|
37
77
|
/**
|
|
38
78
|
* The status of server to filter by
|
|
39
79
|
*/
|
|
@@ -42,6 +82,22 @@ export type GetServersRequest = {
|
|
|
42
82
|
* The platform/plan name of the server to filter by
|
|
43
83
|
*/
|
|
44
84
|
filterPlan?: string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* The exact platform/plan name of the server to filter by (case-insensitive)
|
|
87
|
+
*/
|
|
88
|
+
filterPlanEql?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Filter servers whose platform/plan name starts with the provided value
|
|
91
|
+
*/
|
|
92
|
+
filterPlanPrefix?: string | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Filter servers whose platform/plan name ends with the provided value
|
|
95
|
+
*/
|
|
96
|
+
filterPlanSuffix?: string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Filter servers whose platform/plan name contains the provided value
|
|
99
|
+
*/
|
|
100
|
+
filterPlanMatch?: string | undefined;
|
|
45
101
|
/**
|
|
46
102
|
* Filter by the existence of an associated GPU
|
|
47
103
|
*/
|
|
@@ -110,14 +166,28 @@ export const GetServersRequest$inboundSchema: z.ZodType<
|
|
|
110
166
|
z.ZodTypeDef,
|
|
111
167
|
unknown
|
|
112
168
|
> = z.object({
|
|
169
|
+
"filter[id]": z.string().optional(),
|
|
113
170
|
"filter[project]": z.string().optional(),
|
|
114
171
|
"filter[region]": z.string().optional(),
|
|
115
172
|
"filter[hostname]": z.string().optional(),
|
|
173
|
+
"filter[hostname][eql]": z.string().optional(),
|
|
174
|
+
"filter[hostname][prefix]": z.string().optional(),
|
|
175
|
+
"filter[hostname][suffix]": z.string().optional(),
|
|
176
|
+
"filter[hostname][match]": z.string().optional(),
|
|
116
177
|
"filter[created_at_gte]": z.string().optional(),
|
|
117
178
|
"filter[created_at_lte]": z.string().optional(),
|
|
179
|
+
"filter[created_at]": z.string().optional(),
|
|
118
180
|
"filter[label]": z.string().optional(),
|
|
181
|
+
"filter[label][eql]": z.string().optional(),
|
|
182
|
+
"filter[label][prefix]": z.string().optional(),
|
|
183
|
+
"filter[label][suffix]": z.string().optional(),
|
|
184
|
+
"filter[label][match]": z.string().optional(),
|
|
119
185
|
"filter[status]": z.string().optional(),
|
|
120
186
|
"filter[plan]": z.string().optional(),
|
|
187
|
+
"filter[plan][eql]": z.string().optional(),
|
|
188
|
+
"filter[plan][prefix]": z.string().optional(),
|
|
189
|
+
"filter[plan][suffix]": z.string().optional(),
|
|
190
|
+
"filter[plan][match]": z.string().optional(),
|
|
121
191
|
"filter[gpu]": z.boolean().optional(),
|
|
122
192
|
"filter[ram][eql]": z.number().int().optional(),
|
|
123
193
|
"filter[ram][gte]": z.number().int().optional(),
|
|
@@ -134,14 +204,28 @@ export const GetServersRequest$inboundSchema: z.ZodType<
|
|
|
134
204
|
"stats[total]": z.string().optional(),
|
|
135
205
|
}).transform((v) => {
|
|
136
206
|
return remap$(v, {
|
|
207
|
+
"filter[id]": "filterId",
|
|
137
208
|
"filter[project]": "filterProject",
|
|
138
209
|
"filter[region]": "filterRegion",
|
|
139
210
|
"filter[hostname]": "filterHostname",
|
|
211
|
+
"filter[hostname][eql]": "filterHostnameEql",
|
|
212
|
+
"filter[hostname][prefix]": "filterHostnamePrefix",
|
|
213
|
+
"filter[hostname][suffix]": "filterHostnameSuffix",
|
|
214
|
+
"filter[hostname][match]": "filterHostnameMatch",
|
|
140
215
|
"filter[created_at_gte]": "filterCreatedAtGte",
|
|
141
216
|
"filter[created_at_lte]": "filterCreatedAtLte",
|
|
217
|
+
"filter[created_at]": "filterCreatedAt",
|
|
142
218
|
"filter[label]": "filterLabel",
|
|
219
|
+
"filter[label][eql]": "filterLabelEql",
|
|
220
|
+
"filter[label][prefix]": "filterLabelPrefix",
|
|
221
|
+
"filter[label][suffix]": "filterLabelSuffix",
|
|
222
|
+
"filter[label][match]": "filterLabelMatch",
|
|
143
223
|
"filter[status]": "filterStatus",
|
|
144
224
|
"filter[plan]": "filterPlan",
|
|
225
|
+
"filter[plan][eql]": "filterPlanEql",
|
|
226
|
+
"filter[plan][prefix]": "filterPlanPrefix",
|
|
227
|
+
"filter[plan][suffix]": "filterPlanSuffix",
|
|
228
|
+
"filter[plan][match]": "filterPlanMatch",
|
|
145
229
|
"filter[gpu]": "filterGpu",
|
|
146
230
|
"filter[ram][eql]": "filterRamEql",
|
|
147
231
|
"filter[ram][gte]": "filterRamGte",
|
|
@@ -159,14 +243,28 @@ export const GetServersRequest$inboundSchema: z.ZodType<
|
|
|
159
243
|
});
|
|
160
244
|
/** @internal */
|
|
161
245
|
export type GetServersRequest$Outbound = {
|
|
246
|
+
"filter[id]"?: string | undefined;
|
|
162
247
|
"filter[project]"?: string | undefined;
|
|
163
248
|
"filter[region]"?: string | undefined;
|
|
164
249
|
"filter[hostname]"?: string | undefined;
|
|
250
|
+
"filter[hostname][eql]"?: string | undefined;
|
|
251
|
+
"filter[hostname][prefix]"?: string | undefined;
|
|
252
|
+
"filter[hostname][suffix]"?: string | undefined;
|
|
253
|
+
"filter[hostname][match]"?: string | undefined;
|
|
165
254
|
"filter[created_at_gte]"?: string | undefined;
|
|
166
255
|
"filter[created_at_lte]"?: string | undefined;
|
|
256
|
+
"filter[created_at]"?: string | undefined;
|
|
167
257
|
"filter[label]"?: string | undefined;
|
|
258
|
+
"filter[label][eql]"?: string | undefined;
|
|
259
|
+
"filter[label][prefix]"?: string | undefined;
|
|
260
|
+
"filter[label][suffix]"?: string | undefined;
|
|
261
|
+
"filter[label][match]"?: string | undefined;
|
|
168
262
|
"filter[status]"?: string | undefined;
|
|
169
263
|
"filter[plan]"?: string | undefined;
|
|
264
|
+
"filter[plan][eql]"?: string | undefined;
|
|
265
|
+
"filter[plan][prefix]"?: string | undefined;
|
|
266
|
+
"filter[plan][suffix]"?: string | undefined;
|
|
267
|
+
"filter[plan][match]"?: string | undefined;
|
|
170
268
|
"filter[gpu]"?: boolean | undefined;
|
|
171
269
|
"filter[ram][eql]"?: number | undefined;
|
|
172
270
|
"filter[ram][gte]"?: number | undefined;
|
|
@@ -189,14 +287,28 @@ export const GetServersRequest$outboundSchema: z.ZodType<
|
|
|
189
287
|
z.ZodTypeDef,
|
|
190
288
|
GetServersRequest
|
|
191
289
|
> = z.object({
|
|
290
|
+
filterId: z.string().optional(),
|
|
192
291
|
filterProject: z.string().optional(),
|
|
193
292
|
filterRegion: z.string().optional(),
|
|
194
293
|
filterHostname: z.string().optional(),
|
|
294
|
+
filterHostnameEql: z.string().optional(),
|
|
295
|
+
filterHostnamePrefix: z.string().optional(),
|
|
296
|
+
filterHostnameSuffix: z.string().optional(),
|
|
297
|
+
filterHostnameMatch: z.string().optional(),
|
|
195
298
|
filterCreatedAtGte: z.string().optional(),
|
|
196
299
|
filterCreatedAtLte: z.string().optional(),
|
|
300
|
+
filterCreatedAt: z.string().optional(),
|
|
197
301
|
filterLabel: z.string().optional(),
|
|
302
|
+
filterLabelEql: z.string().optional(),
|
|
303
|
+
filterLabelPrefix: z.string().optional(),
|
|
304
|
+
filterLabelSuffix: z.string().optional(),
|
|
305
|
+
filterLabelMatch: z.string().optional(),
|
|
198
306
|
filterStatus: z.string().optional(),
|
|
199
307
|
filterPlan: z.string().optional(),
|
|
308
|
+
filterPlanEql: z.string().optional(),
|
|
309
|
+
filterPlanPrefix: z.string().optional(),
|
|
310
|
+
filterPlanSuffix: z.string().optional(),
|
|
311
|
+
filterPlanMatch: z.string().optional(),
|
|
200
312
|
filterGpu: z.boolean().optional(),
|
|
201
313
|
filterRamEql: z.number().int().optional(),
|
|
202
314
|
filterRamGte: z.number().int().optional(),
|
|
@@ -213,14 +325,28 @@ export const GetServersRequest$outboundSchema: z.ZodType<
|
|
|
213
325
|
statsTotal: z.string().optional(),
|
|
214
326
|
}).transform((v) => {
|
|
215
327
|
return remap$(v, {
|
|
328
|
+
filterId: "filter[id]",
|
|
216
329
|
filterProject: "filter[project]",
|
|
217
330
|
filterRegion: "filter[region]",
|
|
218
331
|
filterHostname: "filter[hostname]",
|
|
332
|
+
filterHostnameEql: "filter[hostname][eql]",
|
|
333
|
+
filterHostnamePrefix: "filter[hostname][prefix]",
|
|
334
|
+
filterHostnameSuffix: "filter[hostname][suffix]",
|
|
335
|
+
filterHostnameMatch: "filter[hostname][match]",
|
|
219
336
|
filterCreatedAtGte: "filter[created_at_gte]",
|
|
220
337
|
filterCreatedAtLte: "filter[created_at_lte]",
|
|
338
|
+
filterCreatedAt: "filter[created_at]",
|
|
221
339
|
filterLabel: "filter[label]",
|
|
340
|
+
filterLabelEql: "filter[label][eql]",
|
|
341
|
+
filterLabelPrefix: "filter[label][prefix]",
|
|
342
|
+
filterLabelSuffix: "filter[label][suffix]",
|
|
343
|
+
filterLabelMatch: "filter[label][match]",
|
|
222
344
|
filterStatus: "filter[status]",
|
|
223
345
|
filterPlan: "filter[plan]",
|
|
346
|
+
filterPlanEql: "filter[plan][eql]",
|
|
347
|
+
filterPlanPrefix: "filter[plan][prefix]",
|
|
348
|
+
filterPlanSuffix: "filter[plan][suffix]",
|
|
349
|
+
filterPlanMatch: "filter[plan][match]",
|
|
224
350
|
filterGpu: "filter[gpu]",
|
|
225
351
|
filterRamEql: "filter[ram][eql]",
|
|
226
352
|
filterRamGte: "filter[ram][gte]",
|
|
@@ -131,6 +131,7 @@ export * from "./poststoragefilesystems.js";
|
|
|
131
131
|
export * from "./poststoragevolumes.js";
|
|
132
132
|
export * from "./poststoragevolumesmap.js";
|
|
133
133
|
export * from "./poststoragevolumesmount.js";
|
|
134
|
+
export * from "./poststoragevolumesunmap.js";
|
|
134
135
|
export * from "./postteam.js";
|
|
135
136
|
export * from "./postteammembers.js";
|
|
136
137
|
export * from "./postuserdata.js";
|