latitudesh-typescript-sdk 0.3.5 → 0.3.6
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 +979 -684
- package/bin/mcp-server.js.map +15 -10
- package/dist/commonjs/funcs/kubernetesClustersUpdateKubernetesCluster.d.ts +29 -0
- package/dist/commonjs/funcs/kubernetesClustersUpdateKubernetesCluster.d.ts.map +1 -0
- package/dist/commonjs/funcs/kubernetesClustersUpdateKubernetesCluster.js +140 -0
- package/dist/commonjs/funcs/kubernetesClustersUpdateKubernetesCluster.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +19 -8
- package/dist/commonjs/lib/security.js.map +1 -1
- 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/kubernetesClustersUpdateKubernetesCluster.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/kubernetesClustersUpdateKubernetesCluster.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/kubernetesClustersUpdateKubernetesCluster.js +75 -0
- package/dist/commonjs/mcp-server/tools/kubernetesClustersUpdateKubernetesCluster.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +2 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/kubernetesclusterdata.d.ts +43 -0
- package/dist/commonjs/models/kubernetesclusterdata.d.ts.map +1 -1
- package/dist/commonjs/models/kubernetesclusterdata.js +34 -1
- package/dist/commonjs/models/kubernetesclusterdata.js.map +1 -1
- package/dist/commonjs/models/kubernetesclusterupdateresponse.d.ts +92 -0
- package/dist/commonjs/models/kubernetesclusterupdateresponse.d.ts.map +1 -0
- package/dist/commonjs/models/kubernetesclusterupdateresponse.js +131 -0
- package/dist/commonjs/models/kubernetesclusterupdateresponse.js.map +1 -0
- 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/updatekubernetescluster.d.ts +23 -0
- package/dist/commonjs/models/operations/updatekubernetescluster.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatekubernetescluster.js +72 -0
- package/dist/commonjs/models/operations/updatekubernetescluster.js.map +1 -0
- package/dist/commonjs/models/updatekubernetescluster.d.ts +73 -0
- package/dist/commonjs/models/updatekubernetescluster.d.ts.map +1 -0
- package/dist/commonjs/models/updatekubernetescluster.js +116 -0
- package/dist/commonjs/models/updatekubernetescluster.js.map +1 -0
- package/dist/commonjs/sdk/kubernetesclusters.d.ts +17 -0
- package/dist/commonjs/sdk/kubernetesclusters.d.ts.map +1 -1
- package/dist/commonjs/sdk/kubernetesclusters.js +20 -0
- package/dist/commonjs/sdk/kubernetesclusters.js.map +1 -1
- package/dist/esm/funcs/kubernetesClustersUpdateKubernetesCluster.d.ts +29 -0
- package/dist/esm/funcs/kubernetesClustersUpdateKubernetesCluster.d.ts.map +1 -0
- package/dist/esm/funcs/kubernetesClustersUpdateKubernetesCluster.js +104 -0
- package/dist/esm/funcs/kubernetesClustersUpdateKubernetesCluster.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/security.d.ts +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +19 -8
- package/dist/esm/lib/security.js.map +1 -1
- 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/kubernetesClustersUpdateKubernetesCluster.d.ts +8 -0
- package/dist/esm/mcp-server/tools/kubernetesClustersUpdateKubernetesCluster.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/kubernetesClustersUpdateKubernetesCluster.js +39 -0
- package/dist/esm/mcp-server/tools/kubernetesClustersUpdateKubernetesCluster.js.map +1 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/kubernetesclusterdata.d.ts +43 -0
- package/dist/esm/models/kubernetesclusterdata.d.ts.map +1 -1
- package/dist/esm/models/kubernetesclusterdata.js +33 -0
- package/dist/esm/models/kubernetesclusterdata.js.map +1 -1
- package/dist/esm/models/kubernetesclusterupdateresponse.d.ts +92 -0
- package/dist/esm/models/kubernetesclusterupdateresponse.d.ts.map +1 -0
- package/dist/esm/models/kubernetesclusterupdateresponse.js +89 -0
- package/dist/esm/models/kubernetesclusterupdateresponse.js.map +1 -0
- 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/updatekubernetescluster.d.ts +23 -0
- package/dist/esm/models/operations/updatekubernetescluster.d.ts.map +1 -0
- package/dist/esm/models/operations/updatekubernetescluster.js +34 -0
- package/dist/esm/models/operations/updatekubernetescluster.js.map +1 -0
- package/dist/esm/models/updatekubernetescluster.d.ts +73 -0
- package/dist/esm/models/updatekubernetescluster.d.ts.map +1 -0
- package/dist/esm/models/updatekubernetescluster.js +74 -0
- package/dist/esm/models/updatekubernetescluster.js.map +1 -0
- package/dist/esm/sdk/kubernetesclusters.d.ts +17 -0
- package/dist/esm/sdk/kubernetesclusters.d.ts.map +1 -1
- package/dist/esm/sdk/kubernetesclusters.js +20 -0
- package/dist/esm/sdk/kubernetesclusters.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/kubernetesClustersUpdateKubernetesCluster.ts +199 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +14 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/kubernetesClustersUpdateKubernetesCluster.ts +50 -0
- package/src/models/index.ts +2 -0
- package/src/models/kubernetesclusterdata.ts +61 -0
- package/src/models/kubernetesclusterupdateresponse.ts +245 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/updatekubernetescluster.ts +72 -0
- package/src/models/updatekubernetescluster.ts +198 -0
- package/src/sdk/kubernetesclusters.ts +28 -0
package/src/mcp-server/server.ts
CHANGED
|
@@ -41,6 +41,7 @@ import { tool$kubernetesClustersDeleteKubernetesCluster } from "./tools/kubernet
|
|
|
41
41
|
import { tool$kubernetesClustersGetKubernetesCluster } from "./tools/kubernetesClustersGetKubernetesCluster.js";
|
|
42
42
|
import { tool$kubernetesClustersGetKubernetesClusterKubeconfig } from "./tools/kubernetesClustersGetKubernetesClusterKubeconfig.js";
|
|
43
43
|
import { tool$kubernetesClustersListKubernetesClusters } from "./tools/kubernetesClustersListKubernetesClusters.js";
|
|
44
|
+
import { tool$kubernetesClustersUpdateKubernetesCluster } from "./tools/kubernetesClustersUpdateKubernetesCluster.js";
|
|
44
45
|
import { tool$operatingSystemsListPlans } from "./tools/operatingSystemsListPlans.js";
|
|
45
46
|
import { tool$plansGet } from "./tools/plansGet.js";
|
|
46
47
|
import { tool$plansGetBandwidth } from "./tools/plansGetBandwidth.js";
|
|
@@ -152,7 +153,7 @@ export function createMCPServer(deps: {
|
|
|
152
153
|
}) {
|
|
153
154
|
const server = new McpServer({
|
|
154
155
|
name: "Latitudesh",
|
|
155
|
-
version: "0.3.
|
|
156
|
+
version: "0.3.6",
|
|
156
157
|
});
|
|
157
158
|
|
|
158
159
|
const client = new LatitudeshCore({
|
|
@@ -215,6 +216,7 @@ export function createMCPServer(deps: {
|
|
|
215
216
|
tool(tool$kubernetesClustersCreateKubernetesCluster);
|
|
216
217
|
tool(tool$kubernetesClustersGetKubernetesCluster);
|
|
217
218
|
tool(tool$kubernetesClustersDeleteKubernetesCluster);
|
|
219
|
+
tool(tool$kubernetesClustersUpdateKubernetesCluster);
|
|
218
220
|
tool(tool$kubernetesClustersGetKubernetesClusterKubeconfig);
|
|
219
221
|
tool(tool$plansList);
|
|
220
222
|
tool(tool$plansGet);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { kubernetesClustersUpdateKubernetesCluster } from "../../funcs/kubernetesClustersUpdateKubernetesCluster.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.UpdateKubernetesClusterRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$kubernetesClustersUpdateKubernetesCluster: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "kubernetes-clusters-update-kubernetes-cluster",
|
|
17
|
+
description: `Scale Kubernetes Cluster
|
|
18
|
+
|
|
19
|
+
Scales the worker nodes or control plane nodes of a Kubernetes cluster. The cluster must be in \`Provisioned\` phase to accept updates.
|
|
20
|
+
|
|
21
|
+
Exactly one of \`worker_count\` or \`control_plane_count\` must be provided per request. You cannot scale workers and control plane nodes in the same request.
|
|
22
|
+
|
|
23
|
+
When scaling up, the API validates that sufficient server stock is available for the requested delta (e.g., scaling from 2 to 5 workers checks for 3 available servers).
|
|
24
|
+
|
|
25
|
+
When scaling from 0 workers, you must provide a \`worker_plan\` since there is no existing configuration to inherit the plan from.
|
|
26
|
+
|
|
27
|
+
Control plane scaling has a minimum of 1 node. You cannot scale control plane nodes to zero.
|
|
28
|
+
|
|
29
|
+
Returns 202 Accepted when a scaling operation is triggered. Poll the GET endpoint to monitor progress. Returns 200 OK if the requested count matches the current count (no-op).
|
|
30
|
+
`,
|
|
31
|
+
args,
|
|
32
|
+
tool: async (client, args, ctx) => {
|
|
33
|
+
const [result, apiCall] = await kubernetesClustersUpdateKubernetesCluster(
|
|
34
|
+
client,
|
|
35
|
+
args.request,
|
|
36
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
37
|
+
).$inspect();
|
|
38
|
+
|
|
39
|
+
if (!result.ok) {
|
|
40
|
+
return {
|
|
41
|
+
content: [{ type: "text", text: result.error.message }],
|
|
42
|
+
isError: true,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const value = result.value;
|
|
47
|
+
|
|
48
|
+
return formatResult(value, apiCall);
|
|
49
|
+
},
|
|
50
|
+
};
|
package/src/models/index.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from "./kubernetesclusterdata.js";
|
|
|
37
37
|
export * from "./kubernetesclusterkubeconfig.js";
|
|
38
38
|
export * from "./kubernetesclusters.js";
|
|
39
39
|
export * from "./kubernetesclustersummarydata.js";
|
|
40
|
+
export * from "./kubernetesclusterupdateresponse.js";
|
|
40
41
|
export * from "./membership.js";
|
|
41
42
|
export * from "./objectstoragedata.js";
|
|
42
43
|
export * from "./objectstorages.js";
|
|
@@ -73,6 +74,7 @@ export * from "./traffic.js";
|
|
|
73
74
|
export * from "./trafficquota.js";
|
|
74
75
|
export * from "./updateapikey.js";
|
|
75
76
|
export * from "./updateelasticip.js";
|
|
77
|
+
export * from "./updatekubernetescluster.js";
|
|
76
78
|
export * from "./user.js";
|
|
77
79
|
export * from "./userdata.js";
|
|
78
80
|
export * from "./userdataobject.js";
|
|
@@ -44,6 +44,33 @@ export type Workers = {
|
|
|
44
44
|
availableReplicas?: number | undefined;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Current status of worker nodes. 'idle' when 0 workers, 'ready' when all workers are ready, 'scaling' when workers are being provisioned/removed, 'error' when a worker has failed.
|
|
49
|
+
*/
|
|
50
|
+
export const WorkerStatus = {
|
|
51
|
+
Idle: "idle",
|
|
52
|
+
Ready: "ready",
|
|
53
|
+
Scaling: "scaling",
|
|
54
|
+
Error: "error",
|
|
55
|
+
} as const;
|
|
56
|
+
/**
|
|
57
|
+
* Current status of worker nodes. 'idle' when 0 workers, 'ready' when all workers are ready, 'scaling' when workers are being provisioned/removed, 'error' when a worker has failed.
|
|
58
|
+
*/
|
|
59
|
+
export type WorkerStatus = ClosedEnum<typeof WorkerStatus>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Current status of control plane nodes. 'ready' when control plane is operational, 'scaling' when nodes are being provisioned/removed, 'error' when a control plane node has failed.
|
|
63
|
+
*/
|
|
64
|
+
export const ControlPlaneStatus = {
|
|
65
|
+
Ready: "ready",
|
|
66
|
+
Scaling: "scaling",
|
|
67
|
+
Error: "error",
|
|
68
|
+
} as const;
|
|
69
|
+
/**
|
|
70
|
+
* Current status of control plane nodes. 'ready' when control plane is operational, 'scaling' when nodes are being provisioned/removed, 'error' when a control plane node has failed.
|
|
71
|
+
*/
|
|
72
|
+
export type ControlPlaneStatus = ClosedEnum<typeof ControlPlaneStatus>;
|
|
73
|
+
|
|
47
74
|
/**
|
|
48
75
|
* Step identifier
|
|
49
76
|
*/
|
|
@@ -231,6 +258,14 @@ export type KubernetesClusterDataAttributes = {
|
|
|
231
258
|
* Worker nodes status information
|
|
232
259
|
*/
|
|
233
260
|
workers?: Workers | null | undefined;
|
|
261
|
+
/**
|
|
262
|
+
* Current status of worker nodes. 'idle' when 0 workers, 'ready' when all workers are ready, 'scaling' when workers are being provisioned/removed, 'error' when a worker has failed.
|
|
263
|
+
*/
|
|
264
|
+
workerStatus?: WorkerStatus | null | undefined;
|
|
265
|
+
/**
|
|
266
|
+
* Current status of control plane nodes. 'ready' when control plane is operational, 'scaling' when nodes are being provisioned/removed, 'error' when a control plane node has failed.
|
|
267
|
+
*/
|
|
268
|
+
controlPlaneStatus?: ControlPlaneStatus | undefined;
|
|
234
269
|
/**
|
|
235
270
|
* Whether the underlying infrastructure is ready
|
|
236
271
|
*/
|
|
@@ -384,6 +419,22 @@ export function workersFromJSON(
|
|
|
384
419
|
);
|
|
385
420
|
}
|
|
386
421
|
|
|
422
|
+
/** @internal */
|
|
423
|
+
export const WorkerStatus$inboundSchema: z.ZodNativeEnum<typeof WorkerStatus> =
|
|
424
|
+
z.nativeEnum(WorkerStatus);
|
|
425
|
+
/** @internal */
|
|
426
|
+
export const WorkerStatus$outboundSchema: z.ZodNativeEnum<typeof WorkerStatus> =
|
|
427
|
+
WorkerStatus$inboundSchema;
|
|
428
|
+
|
|
429
|
+
/** @internal */
|
|
430
|
+
export const ControlPlaneStatus$inboundSchema: z.ZodNativeEnum<
|
|
431
|
+
typeof ControlPlaneStatus
|
|
432
|
+
> = z.nativeEnum(ControlPlaneStatus);
|
|
433
|
+
/** @internal */
|
|
434
|
+
export const ControlPlaneStatus$outboundSchema: z.ZodNativeEnum<
|
|
435
|
+
typeof ControlPlaneStatus
|
|
436
|
+
> = ControlPlaneStatus$inboundSchema;
|
|
437
|
+
|
|
387
438
|
/** @internal */
|
|
388
439
|
export const KubernetesClusterDataName$inboundSchema: z.ZodNativeEnum<
|
|
389
440
|
typeof KubernetesClusterDataName
|
|
@@ -595,6 +646,8 @@ export const KubernetesClusterDataAttributes$inboundSchema: z.ZodType<
|
|
|
595
646
|
control_plane: z.nullable(z.lazy(() => ControlPlane$inboundSchema))
|
|
596
647
|
.optional(),
|
|
597
648
|
workers: z.nullable(z.lazy(() => Workers$inboundSchema)).optional(),
|
|
649
|
+
worker_status: z.nullable(WorkerStatus$inboundSchema).optional(),
|
|
650
|
+
control_plane_status: ControlPlaneStatus$inboundSchema.optional(),
|
|
598
651
|
infrastructure_ready: z.boolean().optional(),
|
|
599
652
|
control_plane_ready: z.boolean().optional(),
|
|
600
653
|
message: z.string().optional(),
|
|
@@ -618,6 +671,8 @@ export const KubernetesClusterDataAttributes$inboundSchema: z.ZodType<
|
|
|
618
671
|
"control_plane_count": "controlPlaneCount",
|
|
619
672
|
"worker_count": "workerCount",
|
|
620
673
|
"control_plane": "controlPlane",
|
|
674
|
+
"worker_status": "workerStatus",
|
|
675
|
+
"control_plane_status": "controlPlaneStatus",
|
|
621
676
|
"infrastructure_ready": "infrastructureReady",
|
|
622
677
|
"control_plane_ready": "controlPlaneReady",
|
|
623
678
|
"last_status_change": "lastStatusChange",
|
|
@@ -642,6 +697,8 @@ export type KubernetesClusterDataAttributes$Outbound = {
|
|
|
642
697
|
worker_count?: number | undefined;
|
|
643
698
|
control_plane?: ControlPlane$Outbound | null | undefined;
|
|
644
699
|
workers?: Workers$Outbound | null | undefined;
|
|
700
|
+
worker_status?: string | null | undefined;
|
|
701
|
+
control_plane_status?: string | undefined;
|
|
645
702
|
infrastructure_ready?: boolean | undefined;
|
|
646
703
|
control_plane_ready?: boolean | undefined;
|
|
647
704
|
message?: string | undefined;
|
|
@@ -675,6 +732,8 @@ export const KubernetesClusterDataAttributes$outboundSchema: z.ZodType<
|
|
|
675
732
|
controlPlane: z.nullable(z.lazy(() => ControlPlane$outboundSchema))
|
|
676
733
|
.optional(),
|
|
677
734
|
workers: z.nullable(z.lazy(() => Workers$outboundSchema)).optional(),
|
|
735
|
+
workerStatus: z.nullable(WorkerStatus$outboundSchema).optional(),
|
|
736
|
+
controlPlaneStatus: ControlPlaneStatus$outboundSchema.optional(),
|
|
678
737
|
infrastructureReady: z.boolean().optional(),
|
|
679
738
|
controlPlaneReady: z.boolean().optional(),
|
|
680
739
|
message: z.string().optional(),
|
|
@@ -697,6 +756,8 @@ export const KubernetesClusterDataAttributes$outboundSchema: z.ZodType<
|
|
|
697
756
|
controlPlaneCount: "control_plane_count",
|
|
698
757
|
workerCount: "worker_count",
|
|
699
758
|
controlPlane: "control_plane",
|
|
759
|
+
workerStatus: "worker_status",
|
|
760
|
+
controlPlaneStatus: "control_plane_status",
|
|
700
761
|
infrastructureReady: "infrastructure_ready",
|
|
701
762
|
controlPlaneReady: "control_plane_ready",
|
|
702
763
|
lastStatusChange: "last_status_change",
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const KubernetesClusterUpdateResponseType = {
|
|
13
|
+
KubernetesClusters: "kubernetes_clusters",
|
|
14
|
+
} as const;
|
|
15
|
+
export type KubernetesClusterUpdateResponseType = ClosedEnum<
|
|
16
|
+
typeof KubernetesClusterUpdateResponseType
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The update status. 'scaling' indicates nodes are being added or removed. 'unchanged' indicates the requested count matches the current count.
|
|
21
|
+
*/
|
|
22
|
+
export const KubernetesClusterUpdateResponseStatus = {
|
|
23
|
+
Scaling: "scaling",
|
|
24
|
+
Unchanged: "unchanged",
|
|
25
|
+
} as const;
|
|
26
|
+
/**
|
|
27
|
+
* The update status. 'scaling' indicates nodes are being added or removed. 'unchanged' indicates the requested count matches the current count.
|
|
28
|
+
*/
|
|
29
|
+
export type KubernetesClusterUpdateResponseStatus = ClosedEnum<
|
|
30
|
+
typeof KubernetesClusterUpdateResponseStatus
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
export type KubernetesClusterUpdateResponseAttributes = {
|
|
34
|
+
/**
|
|
35
|
+
* The cluster name
|
|
36
|
+
*/
|
|
37
|
+
name?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The update status. 'scaling' indicates nodes are being added or removed. 'unchanged' indicates the requested count matches the current count.
|
|
40
|
+
*/
|
|
41
|
+
status?: KubernetesClusterUpdateResponseStatus | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The requested number of worker nodes. Present when scaling workers.
|
|
44
|
+
*/
|
|
45
|
+
workerCount?: number | null | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The requested number of control plane nodes. Present when scaling control plane.
|
|
48
|
+
*/
|
|
49
|
+
controlPlaneCount?: number | null | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type KubernetesClusterUpdateResponseData = {
|
|
53
|
+
type?: KubernetesClusterUpdateResponseType | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* The cluster ID (format: kc_<hash>)
|
|
56
|
+
*/
|
|
57
|
+
id?: string | undefined;
|
|
58
|
+
attributes?: KubernetesClusterUpdateResponseAttributes | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type KubernetesClusterUpdateResponse = {
|
|
62
|
+
data?: KubernetesClusterUpdateResponseData | undefined;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const KubernetesClusterUpdateResponseType$inboundSchema: z.ZodNativeEnum<
|
|
67
|
+
typeof KubernetesClusterUpdateResponseType
|
|
68
|
+
> = z.nativeEnum(KubernetesClusterUpdateResponseType);
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const KubernetesClusterUpdateResponseType$outboundSchema:
|
|
71
|
+
z.ZodNativeEnum<typeof KubernetesClusterUpdateResponseType> =
|
|
72
|
+
KubernetesClusterUpdateResponseType$inboundSchema;
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const KubernetesClusterUpdateResponseStatus$inboundSchema:
|
|
76
|
+
z.ZodNativeEnum<typeof KubernetesClusterUpdateResponseStatus> = z.nativeEnum(
|
|
77
|
+
KubernetesClusterUpdateResponseStatus,
|
|
78
|
+
);
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const KubernetesClusterUpdateResponseStatus$outboundSchema:
|
|
81
|
+
z.ZodNativeEnum<typeof KubernetesClusterUpdateResponseStatus> =
|
|
82
|
+
KubernetesClusterUpdateResponseStatus$inboundSchema;
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const KubernetesClusterUpdateResponseAttributes$inboundSchema: z.ZodType<
|
|
86
|
+
KubernetesClusterUpdateResponseAttributes,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
unknown
|
|
89
|
+
> = z.object({
|
|
90
|
+
name: z.string().optional(),
|
|
91
|
+
status: KubernetesClusterUpdateResponseStatus$inboundSchema.optional(),
|
|
92
|
+
worker_count: z.nullable(z.number().int()).optional(),
|
|
93
|
+
control_plane_count: z.nullable(z.number().int()).optional(),
|
|
94
|
+
}).transform((v) => {
|
|
95
|
+
return remap$(v, {
|
|
96
|
+
"worker_count": "workerCount",
|
|
97
|
+
"control_plane_count": "controlPlaneCount",
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
/** @internal */
|
|
101
|
+
export type KubernetesClusterUpdateResponseAttributes$Outbound = {
|
|
102
|
+
name?: string | undefined;
|
|
103
|
+
status?: string | undefined;
|
|
104
|
+
worker_count?: number | null | undefined;
|
|
105
|
+
control_plane_count?: number | null | undefined;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const KubernetesClusterUpdateResponseAttributes$outboundSchema:
|
|
110
|
+
z.ZodType<
|
|
111
|
+
KubernetesClusterUpdateResponseAttributes$Outbound,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
KubernetesClusterUpdateResponseAttributes
|
|
114
|
+
> = z.object({
|
|
115
|
+
name: z.string().optional(),
|
|
116
|
+
status: KubernetesClusterUpdateResponseStatus$outboundSchema.optional(),
|
|
117
|
+
workerCount: z.nullable(z.number().int()).optional(),
|
|
118
|
+
controlPlaneCount: z.nullable(z.number().int()).optional(),
|
|
119
|
+
}).transform((v) => {
|
|
120
|
+
return remap$(v, {
|
|
121
|
+
workerCount: "worker_count",
|
|
122
|
+
controlPlaneCount: "control_plane_count",
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export function kubernetesClusterUpdateResponseAttributesToJSON(
|
|
127
|
+
kubernetesClusterUpdateResponseAttributes:
|
|
128
|
+
KubernetesClusterUpdateResponseAttributes,
|
|
129
|
+
): string {
|
|
130
|
+
return JSON.stringify(
|
|
131
|
+
KubernetesClusterUpdateResponseAttributes$outboundSchema.parse(
|
|
132
|
+
kubernetesClusterUpdateResponseAttributes,
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
export function kubernetesClusterUpdateResponseAttributesFromJSON(
|
|
137
|
+
jsonString: string,
|
|
138
|
+
): SafeParseResult<
|
|
139
|
+
KubernetesClusterUpdateResponseAttributes,
|
|
140
|
+
SDKValidationError
|
|
141
|
+
> {
|
|
142
|
+
return safeParse(
|
|
143
|
+
jsonString,
|
|
144
|
+
(x) =>
|
|
145
|
+
KubernetesClusterUpdateResponseAttributes$inboundSchema.parse(
|
|
146
|
+
JSON.parse(x),
|
|
147
|
+
),
|
|
148
|
+
`Failed to parse 'KubernetesClusterUpdateResponseAttributes' from JSON`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const KubernetesClusterUpdateResponseData$inboundSchema: z.ZodType<
|
|
154
|
+
KubernetesClusterUpdateResponseData,
|
|
155
|
+
z.ZodTypeDef,
|
|
156
|
+
unknown
|
|
157
|
+
> = z.object({
|
|
158
|
+
type: KubernetesClusterUpdateResponseType$inboundSchema.optional(),
|
|
159
|
+
id: z.string().optional(),
|
|
160
|
+
attributes: z.lazy(() =>
|
|
161
|
+
KubernetesClusterUpdateResponseAttributes$inboundSchema
|
|
162
|
+
).optional(),
|
|
163
|
+
});
|
|
164
|
+
/** @internal */
|
|
165
|
+
export type KubernetesClusterUpdateResponseData$Outbound = {
|
|
166
|
+
type?: string | undefined;
|
|
167
|
+
id?: string | undefined;
|
|
168
|
+
attributes?: KubernetesClusterUpdateResponseAttributes$Outbound | undefined;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export const KubernetesClusterUpdateResponseData$outboundSchema: z.ZodType<
|
|
173
|
+
KubernetesClusterUpdateResponseData$Outbound,
|
|
174
|
+
z.ZodTypeDef,
|
|
175
|
+
KubernetesClusterUpdateResponseData
|
|
176
|
+
> = z.object({
|
|
177
|
+
type: KubernetesClusterUpdateResponseType$outboundSchema.optional(),
|
|
178
|
+
id: z.string().optional(),
|
|
179
|
+
attributes: z.lazy(() =>
|
|
180
|
+
KubernetesClusterUpdateResponseAttributes$outboundSchema
|
|
181
|
+
).optional(),
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
export function kubernetesClusterUpdateResponseDataToJSON(
|
|
185
|
+
kubernetesClusterUpdateResponseData: KubernetesClusterUpdateResponseData,
|
|
186
|
+
): string {
|
|
187
|
+
return JSON.stringify(
|
|
188
|
+
KubernetesClusterUpdateResponseData$outboundSchema.parse(
|
|
189
|
+
kubernetesClusterUpdateResponseData,
|
|
190
|
+
),
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
export function kubernetesClusterUpdateResponseDataFromJSON(
|
|
194
|
+
jsonString: string,
|
|
195
|
+
): SafeParseResult<KubernetesClusterUpdateResponseData, SDKValidationError> {
|
|
196
|
+
return safeParse(
|
|
197
|
+
jsonString,
|
|
198
|
+
(x) =>
|
|
199
|
+
KubernetesClusterUpdateResponseData$inboundSchema.parse(JSON.parse(x)),
|
|
200
|
+
`Failed to parse 'KubernetesClusterUpdateResponseData' from JSON`,
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** @internal */
|
|
205
|
+
export const KubernetesClusterUpdateResponse$inboundSchema: z.ZodType<
|
|
206
|
+
KubernetesClusterUpdateResponse,
|
|
207
|
+
z.ZodTypeDef,
|
|
208
|
+
unknown
|
|
209
|
+
> = z.object({
|
|
210
|
+
data: z.lazy(() => KubernetesClusterUpdateResponseData$inboundSchema)
|
|
211
|
+
.optional(),
|
|
212
|
+
});
|
|
213
|
+
/** @internal */
|
|
214
|
+
export type KubernetesClusterUpdateResponse$Outbound = {
|
|
215
|
+
data?: KubernetesClusterUpdateResponseData$Outbound | undefined;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/** @internal */
|
|
219
|
+
export const KubernetesClusterUpdateResponse$outboundSchema: z.ZodType<
|
|
220
|
+
KubernetesClusterUpdateResponse$Outbound,
|
|
221
|
+
z.ZodTypeDef,
|
|
222
|
+
KubernetesClusterUpdateResponse
|
|
223
|
+
> = z.object({
|
|
224
|
+
data: z.lazy(() => KubernetesClusterUpdateResponseData$outboundSchema)
|
|
225
|
+
.optional(),
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
export function kubernetesClusterUpdateResponseToJSON(
|
|
229
|
+
kubernetesClusterUpdateResponse: KubernetesClusterUpdateResponse,
|
|
230
|
+
): string {
|
|
231
|
+
return JSON.stringify(
|
|
232
|
+
KubernetesClusterUpdateResponse$outboundSchema.parse(
|
|
233
|
+
kubernetesClusterUpdateResponse,
|
|
234
|
+
),
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
export function kubernetesClusterUpdateResponseFromJSON(
|
|
238
|
+
jsonString: string,
|
|
239
|
+
): SafeParseResult<KubernetesClusterUpdateResponse, SDKValidationError> {
|
|
240
|
+
return safeParse(
|
|
241
|
+
jsonString,
|
|
242
|
+
(x) => KubernetesClusterUpdateResponse$inboundSchema.parse(JSON.parse(x)),
|
|
243
|
+
`Failed to parse 'KubernetesClusterUpdateResponse' from JSON`,
|
|
244
|
+
);
|
|
245
|
+
}
|
|
@@ -114,6 +114,7 @@ export * from "./showvirtualmachine.js";
|
|
|
114
114
|
export * from "./updateapikey.js";
|
|
115
115
|
export * from "./updateelasticip.js";
|
|
116
116
|
export * from "./updatefirewall.js";
|
|
117
|
+
export * from "./updatekubernetescluster.js";
|
|
117
118
|
export * from "./updateplansbandwidth.js";
|
|
118
119
|
export * from "./updateproject.js";
|
|
119
120
|
export * from "./updateserver.js";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import * as models from "../index.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateKubernetesClusterRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The cluster ID (format: kc_<hash>) or cluster name. Both formats are accepted for backward compatibility.
|
|
15
|
+
*/
|
|
16
|
+
kubernetesClusterId: string;
|
|
17
|
+
updateKubernetesCluster: models.UpdateKubernetesCluster;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const UpdateKubernetesClusterRequest$inboundSchema: z.ZodType<
|
|
22
|
+
UpdateKubernetesClusterRequest,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
kubernetes_cluster_id: z.string(),
|
|
27
|
+
update_kubernetes_cluster: models.UpdateKubernetesCluster$inboundSchema,
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"kubernetes_cluster_id": "kubernetesClusterId",
|
|
31
|
+
"update_kubernetes_cluster": "updateKubernetesCluster",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type UpdateKubernetesClusterRequest$Outbound = {
|
|
36
|
+
kubernetes_cluster_id: string;
|
|
37
|
+
update_kubernetes_cluster: models.UpdateKubernetesCluster$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const UpdateKubernetesClusterRequest$outboundSchema: z.ZodType<
|
|
42
|
+
UpdateKubernetesClusterRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
UpdateKubernetesClusterRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
kubernetesClusterId: z.string(),
|
|
47
|
+
updateKubernetesCluster: models.UpdateKubernetesCluster$outboundSchema,
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
kubernetesClusterId: "kubernetes_cluster_id",
|
|
51
|
+
updateKubernetesCluster: "update_kubernetes_cluster",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function updateKubernetesClusterRequestToJSON(
|
|
56
|
+
updateKubernetesClusterRequest: UpdateKubernetesClusterRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
UpdateKubernetesClusterRequest$outboundSchema.parse(
|
|
60
|
+
updateKubernetesClusterRequest,
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export function updateKubernetesClusterRequestFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<UpdateKubernetesClusterRequest, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => UpdateKubernetesClusterRequest$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'UpdateKubernetesClusterRequest' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|