latitudesh-typescript-sdk 0.8.2 → 0.8.4
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/bin/mcp-server.js +838 -559
- package/bin/mcp-server.js.map +28 -27
- package/dist/commonjs/funcs/plansListStorage.d.ts +2 -1
- package/dist/commonjs/funcs/plansListStorage.d.ts.map +1 -1
- package/dist/commonjs/funcs/plansListStorage.js +18 -3
- package/dist/commonjs/funcs/plansListStorage.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.js +1 -1
- package/dist/commonjs/mcp-server/tools/plansListStorage.d.ts +6 -1
- package/dist/commonjs/mcp-server/tools/plansListStorage.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/plansListStorage.js +40 -2
- package/dist/commonjs/mcp-server/tools/plansListStorage.js.map +1 -1
- package/dist/commonjs/models/billingusage.d.ts +2 -2
- package/dist/commonjs/models/billingusage.d.ts.map +1 -1
- package/dist/commonjs/models/billingusage.js +2 -2
- package/dist/commonjs/models/billingusage.js.map +1 -1
- package/dist/commonjs/models/ipmisession.d.ts +5 -0
- package/dist/commonjs/models/ipmisession.d.ts.map +1 -1
- package/dist/commonjs/models/ipmisession.js +4 -0
- package/dist/commonjs/models/ipmisession.js.map +1 -1
- package/dist/commonjs/models/kubernetesclusterdata.d.ts +32 -28
- package/dist/commonjs/models/kubernetesclusterdata.d.ts.map +1 -1
- package/dist/commonjs/models/kubernetesclusterdata.js +20 -15
- package/dist/commonjs/models/kubernetesclusterdata.js.map +1 -1
- package/dist/commonjs/models/kubernetesclustersummarydata.d.ts +9 -7
- package/dist/commonjs/models/kubernetesclustersummarydata.d.ts.map +1 -1
- package/dist/commonjs/models/kubernetesclustersummarydata.js +6 -3
- package/dist/commonjs/models/kubernetesclustersummarydata.js.map +1 -1
- package/dist/commonjs/models/objectstoragedata.d.ts +5 -0
- package/dist/commonjs/models/objectstoragedata.d.ts.map +1 -1
- package/dist/commonjs/models/objectstoragedata.js +2 -0
- package/dist/commonjs/models/objectstoragedata.js.map +1 -1
- package/dist/commonjs/models/operatingsystemdata.d.ts +6 -0
- package/dist/commonjs/models/operatingsystemdata.d.ts.map +1 -1
- package/dist/commonjs/models/operatingsystemdata.js +6 -0
- package/dist/commonjs/models/operatingsystemdata.js.map +1 -1
- package/dist/commonjs/models/operations/getstorageplans.d.ts +25 -0
- package/dist/commonjs/models/operations/getstorageplans.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getstorageplans.js +71 -0
- package/dist/commonjs/models/operations/getstorageplans.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/patchuserprofile.d.ts +11 -0
- package/dist/commonjs/models/operations/patchuserprofile.d.ts.map +1 -1
- package/dist/commonjs/models/operations/patchuserprofile.js +15 -1
- package/dist/commonjs/models/operations/patchuserprofile.js.map +1 -1
- package/dist/commonjs/models/operations/updateproject.d.ts +4 -4
- package/dist/commonjs/models/operations/updateproject.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateproject.js +8 -8
- package/dist/commonjs/models/operations/updateproject.js.map +1 -1
- package/dist/commonjs/models/outofbandconnection.d.ts +8 -8
- package/dist/commonjs/models/outofbandconnection.d.ts.map +1 -1
- package/dist/commonjs/models/outofbandconnection.js +11 -12
- package/dist/commonjs/models/outofbandconnection.js.map +1 -1
- package/dist/commonjs/models/serverdata.d.ts +25 -2
- package/dist/commonjs/models/serverdata.d.ts.map +1 -1
- package/dist/commonjs/models/serverdata.js +29 -3
- package/dist/commonjs/models/serverdata.js.map +1 -1
- package/dist/commonjs/models/storageplandata.d.ts +70 -5
- package/dist/commonjs/models/storageplandata.d.ts.map +1 -1
- package/dist/commonjs/models/storageplandata.js +101 -5
- package/dist/commonjs/models/storageplandata.js.map +1 -1
- package/dist/commonjs/models/user.d.ts +15 -0
- package/dist/commonjs/models/user.d.ts.map +1 -1
- package/dist/commonjs/models/user.js +19 -1
- package/dist/commonjs/models/user.js.map +1 -1
- package/dist/commonjs/models/userteam.d.ts +53 -0
- package/dist/commonjs/models/userteam.d.ts.map +1 -1
- package/dist/commonjs/models/userteam.js +79 -1
- package/dist/commonjs/models/userteam.js.map +1 -1
- package/dist/commonjs/models/userupdate.d.ts +17 -2
- package/dist/commonjs/models/userupdate.d.ts.map +1 -1
- package/dist/commonjs/models/userupdate.js +20 -3
- package/dist/commonjs/models/userupdate.js.map +1 -1
- package/dist/commonjs/models/virtualmachineattributes.d.ts +32 -9
- package/dist/commonjs/models/virtualmachineattributes.d.ts.map +1 -1
- package/dist/commonjs/models/virtualmachineattributes.js +47 -9
- package/dist/commonjs/models/virtualmachineattributes.js.map +1 -1
- package/dist/commonjs/models/volumedata.d.ts +15 -0
- package/dist/commonjs/models/volumedata.d.ts.map +1 -1
- package/dist/commonjs/models/volumedata.js +10 -0
- package/dist/commonjs/models/volumedata.js.map +1 -1
- package/dist/commonjs/sdk/plans.d.ts +1 -1
- package/dist/commonjs/sdk/plans.d.ts.map +1 -1
- package/dist/commonjs/sdk/plans.js +2 -2
- package/dist/commonjs/sdk/plans.js.map +1 -1
- package/dist/esm/funcs/plansListStorage.d.ts +2 -1
- package/dist/esm/funcs/plansListStorage.d.ts.map +1 -1
- package/dist/esm/funcs/plansListStorage.js +18 -3
- package/dist/esm/funcs/plansListStorage.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.js +1 -1
- package/dist/esm/mcp-server/tools/plansListStorage.d.ts +6 -1
- package/dist/esm/mcp-server/tools/plansListStorage.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/plansListStorage.js +7 -2
- package/dist/esm/mcp-server/tools/plansListStorage.js.map +1 -1
- package/dist/esm/models/billingusage.d.ts +2 -2
- package/dist/esm/models/billingusage.d.ts.map +1 -1
- package/dist/esm/models/billingusage.js +2 -2
- package/dist/esm/models/billingusage.js.map +1 -1
- package/dist/esm/models/ipmisession.d.ts +5 -0
- package/dist/esm/models/ipmisession.d.ts.map +1 -1
- package/dist/esm/models/ipmisession.js +4 -0
- package/dist/esm/models/ipmisession.js.map +1 -1
- package/dist/esm/models/kubernetesclusterdata.d.ts +32 -28
- package/dist/esm/models/kubernetesclusterdata.d.ts.map +1 -1
- package/dist/esm/models/kubernetesclusterdata.js +20 -15
- package/dist/esm/models/kubernetesclusterdata.js.map +1 -1
- package/dist/esm/models/kubernetesclustersummarydata.d.ts +9 -7
- package/dist/esm/models/kubernetesclustersummarydata.d.ts.map +1 -1
- package/dist/esm/models/kubernetesclustersummarydata.js +6 -3
- package/dist/esm/models/kubernetesclustersummarydata.js.map +1 -1
- package/dist/esm/models/objectstoragedata.d.ts +5 -0
- package/dist/esm/models/objectstoragedata.d.ts.map +1 -1
- package/dist/esm/models/objectstoragedata.js +2 -0
- package/dist/esm/models/objectstoragedata.js.map +1 -1
- package/dist/esm/models/operatingsystemdata.d.ts +6 -0
- package/dist/esm/models/operatingsystemdata.d.ts.map +1 -1
- package/dist/esm/models/operatingsystemdata.js +6 -0
- package/dist/esm/models/operatingsystemdata.js.map +1 -1
- package/dist/esm/models/operations/getstorageplans.d.ts +25 -0
- package/dist/esm/models/operations/getstorageplans.d.ts.map +1 -0
- package/dist/esm/models/operations/getstorageplans.js +33 -0
- package/dist/esm/models/operations/getstorageplans.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/patchuserprofile.d.ts +11 -0
- package/dist/esm/models/operations/patchuserprofile.d.ts.map +1 -1
- package/dist/esm/models/operations/patchuserprofile.js +12 -0
- package/dist/esm/models/operations/patchuserprofile.js.map +1 -1
- package/dist/esm/models/operations/updateproject.d.ts +4 -4
- package/dist/esm/models/operations/updateproject.d.ts.map +1 -1
- package/dist/esm/models/operations/updateproject.js +8 -8
- package/dist/esm/models/operations/updateproject.js.map +1 -1
- package/dist/esm/models/outofbandconnection.d.ts +8 -8
- package/dist/esm/models/outofbandconnection.d.ts.map +1 -1
- package/dist/esm/models/outofbandconnection.js +8 -9
- package/dist/esm/models/outofbandconnection.js.map +1 -1
- package/dist/esm/models/serverdata.d.ts +25 -2
- package/dist/esm/models/serverdata.d.ts.map +1 -1
- package/dist/esm/models/serverdata.js +26 -2
- package/dist/esm/models/serverdata.js.map +1 -1
- package/dist/esm/models/storageplandata.d.ts +70 -5
- package/dist/esm/models/storageplandata.d.ts.map +1 -1
- package/dist/esm/models/storageplandata.js +94 -4
- package/dist/esm/models/storageplandata.js.map +1 -1
- package/dist/esm/models/user.d.ts +15 -0
- package/dist/esm/models/user.d.ts.map +1 -1
- package/dist/esm/models/user.js +18 -0
- package/dist/esm/models/user.js.map +1 -1
- package/dist/esm/models/userteam.d.ts +53 -0
- package/dist/esm/models/userteam.d.ts.map +1 -1
- package/dist/esm/models/userteam.js +76 -0
- package/dist/esm/models/userteam.js.map +1 -1
- package/dist/esm/models/userupdate.d.ts +17 -2
- package/dist/esm/models/userupdate.d.ts.map +1 -1
- package/dist/esm/models/userupdate.js +19 -2
- package/dist/esm/models/userupdate.js.map +1 -1
- package/dist/esm/models/virtualmachineattributes.d.ts +32 -9
- package/dist/esm/models/virtualmachineattributes.d.ts.map +1 -1
- package/dist/esm/models/virtualmachineattributes.js +44 -8
- package/dist/esm/models/virtualmachineattributes.js.map +1 -1
- package/dist/esm/models/volumedata.d.ts +15 -0
- package/dist/esm/models/volumedata.d.ts.map +1 -1
- package/dist/esm/models/volumedata.js +10 -0
- package/dist/esm/models/volumedata.js.map +1 -1
- package/dist/esm/sdk/plans.d.ts +1 -1
- package/dist/esm/sdk/plans.d.ts.map +1 -1
- package/dist/esm/sdk/plans.js +2 -2
- package/dist/esm/sdk/plans.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/plansListStorage.ts +25 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/plansListStorage.ts +9 -2
- package/src/models/billingusage.ts +4 -4
- package/src/models/ipmisession.ts +9 -0
- package/src/models/kubernetesclusterdata.ts +63 -44
- package/src/models/kubernetesclustersummarydata.ts +18 -11
- package/src/models/objectstoragedata.ts +7 -0
- package/src/models/operatingsystemdata.ts +12 -0
- package/src/models/operations/getstorageplans.ts +72 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/patchuserprofile.ts +39 -0
- package/src/models/operations/updateproject.ts +12 -16
- package/src/models/outofbandconnection.ts +28 -21
- package/src/models/serverdata.ts +63 -4
- package/src/models/storageplandata.ts +211 -10
- package/src/models/user.ts +29 -0
- package/src/models/userteam.ts +142 -0
- package/src/models/userupdate.ts +35 -4
- package/src/models/virtualmachineattributes.ts +98 -17
- package/src/models/volumedata.ts +25 -0
- package/src/sdk/plans.ts +2 -0
- package/tests/integration/projects.test.ts +3 -0
|
@@ -33,7 +33,7 @@ export type UpdateProjectAttributes2 = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export type UpdateProjectData2 = {
|
|
36
|
-
id
|
|
36
|
+
id: string;
|
|
37
37
|
type: UpdateProjectType2;
|
|
38
38
|
attributes?: UpdateProjectAttributes2 | undefined;
|
|
39
39
|
};
|
|
@@ -81,12 +81,10 @@ export const UpdateProjectAttributes2$inboundSchema: z.ZodType<
|
|
|
81
81
|
z.ZodTypeDef,
|
|
82
82
|
unknown
|
|
83
83
|
> = z.object({
|
|
84
|
-
name: z.string().
|
|
85
|
-
description: z.string().
|
|
86
|
-
"A brand new description for the virtual network",
|
|
87
|
-
),
|
|
84
|
+
name: z.string().optional(),
|
|
85
|
+
description: z.string().optional(),
|
|
88
86
|
environment: UpdateProjectEnvironment2$inboundSchema.optional(),
|
|
89
|
-
bandwidth_alert: z.boolean().
|
|
87
|
+
bandwidth_alert: z.boolean().optional(),
|
|
90
88
|
tags: z.array(z.string()).optional(),
|
|
91
89
|
}).transform((v) => {
|
|
92
90
|
return remap$(v, {
|
|
@@ -95,10 +93,10 @@ export const UpdateProjectAttributes2$inboundSchema: z.ZodType<
|
|
|
95
93
|
});
|
|
96
94
|
/** @internal */
|
|
97
95
|
export type UpdateProjectAttributes2$Outbound = {
|
|
98
|
-
name
|
|
99
|
-
description
|
|
96
|
+
name?: string | undefined;
|
|
97
|
+
description?: string | undefined;
|
|
100
98
|
environment?: string | undefined;
|
|
101
|
-
bandwidth_alert
|
|
99
|
+
bandwidth_alert?: boolean | undefined;
|
|
102
100
|
tags?: Array<string> | undefined;
|
|
103
101
|
};
|
|
104
102
|
|
|
@@ -108,12 +106,10 @@ export const UpdateProjectAttributes2$outboundSchema: z.ZodType<
|
|
|
108
106
|
z.ZodTypeDef,
|
|
109
107
|
UpdateProjectAttributes2
|
|
110
108
|
> = z.object({
|
|
111
|
-
name: z.string().
|
|
112
|
-
description: z.string().
|
|
113
|
-
"A brand new description for the virtual network",
|
|
114
|
-
),
|
|
109
|
+
name: z.string().optional(),
|
|
110
|
+
description: z.string().optional(),
|
|
115
111
|
environment: UpdateProjectEnvironment2$outboundSchema.optional(),
|
|
116
|
-
bandwidthAlert: z.boolean().
|
|
112
|
+
bandwidthAlert: z.boolean().optional(),
|
|
117
113
|
tags: z.array(z.string()).optional(),
|
|
118
114
|
}).transform((v) => {
|
|
119
115
|
return remap$(v, {
|
|
@@ -144,7 +140,7 @@ export const UpdateProjectData2$inboundSchema: z.ZodType<
|
|
|
144
140
|
z.ZodTypeDef,
|
|
145
141
|
unknown
|
|
146
142
|
> = z.object({
|
|
147
|
-
id: z.string()
|
|
143
|
+
id: z.string(),
|
|
148
144
|
type: UpdateProjectType2$inboundSchema,
|
|
149
145
|
attributes: z.lazy(() => UpdateProjectAttributes2$inboundSchema).optional(),
|
|
150
146
|
});
|
|
@@ -161,7 +157,7 @@ export const UpdateProjectData2$outboundSchema: z.ZodType<
|
|
|
161
157
|
z.ZodTypeDef,
|
|
162
158
|
UpdateProjectData2
|
|
163
159
|
> = z.object({
|
|
164
|
-
id: z.string()
|
|
160
|
+
id: z.string(),
|
|
165
161
|
type: UpdateProjectType2$outboundSchema,
|
|
166
162
|
attributes: z.lazy(() => UpdateProjectAttributes2$outboundSchema).optional(),
|
|
167
163
|
});
|
|
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
|
-
export type
|
|
11
|
+
export type OutOfBandConnectionSshKey = {
|
|
12
12
|
id?: string | undefined;
|
|
13
13
|
description?: string | undefined;
|
|
14
14
|
fingerprint?: string | undefined;
|
|
@@ -23,7 +23,7 @@ export type OutOfBandConnectionCredentials = {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export type OutOfBandConnectionAttributes = {
|
|
26
|
-
sshKey?:
|
|
26
|
+
sshKey?: OutOfBandConnectionSshKey | undefined;
|
|
27
27
|
createdAt?: string | undefined;
|
|
28
28
|
username?: string | undefined;
|
|
29
29
|
/**
|
|
@@ -47,40 +47,47 @@ export type OutOfBandConnection = {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
/** @internal */
|
|
50
|
-
export const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
export const OutOfBandConnectionSshKey$inboundSchema: z.ZodType<
|
|
51
|
+
OutOfBandConnectionSshKey,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
id: z.string().optional(),
|
|
56
|
+
description: z.string().optional(),
|
|
57
|
+
fingerprint: z.string().optional(),
|
|
58
|
+
});
|
|
56
59
|
/** @internal */
|
|
57
|
-
export type
|
|
60
|
+
export type OutOfBandConnectionSshKey$Outbound = {
|
|
58
61
|
id?: string | undefined;
|
|
59
62
|
description?: string | undefined;
|
|
60
63
|
fingerprint?: string | undefined;
|
|
61
64
|
};
|
|
62
65
|
|
|
63
66
|
/** @internal */
|
|
64
|
-
export const
|
|
65
|
-
|
|
67
|
+
export const OutOfBandConnectionSshKey$outboundSchema: z.ZodType<
|
|
68
|
+
OutOfBandConnectionSshKey$Outbound,
|
|
66
69
|
z.ZodTypeDef,
|
|
67
|
-
|
|
70
|
+
OutOfBandConnectionSshKey
|
|
68
71
|
> = z.object({
|
|
69
72
|
id: z.string().optional(),
|
|
70
73
|
description: z.string().optional(),
|
|
71
74
|
fingerprint: z.string().optional(),
|
|
72
75
|
});
|
|
73
76
|
|
|
74
|
-
export function
|
|
75
|
-
|
|
77
|
+
export function outOfBandConnectionSshKeyToJSON(
|
|
78
|
+
outOfBandConnectionSshKey: OutOfBandConnectionSshKey,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
OutOfBandConnectionSshKey$outboundSchema.parse(outOfBandConnectionSshKey),
|
|
82
|
+
);
|
|
76
83
|
}
|
|
77
|
-
export function
|
|
84
|
+
export function outOfBandConnectionSshKeyFromJSON(
|
|
78
85
|
jsonString: string,
|
|
79
|
-
): SafeParseResult<
|
|
86
|
+
): SafeParseResult<OutOfBandConnectionSshKey, SDKValidationError> {
|
|
80
87
|
return safeParse(
|
|
81
88
|
jsonString,
|
|
82
|
-
(x) =>
|
|
83
|
-
`Failed to parse '
|
|
89
|
+
(x) => OutOfBandConnectionSshKey$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'OutOfBandConnectionSshKey' from JSON`,
|
|
84
91
|
);
|
|
85
92
|
}
|
|
86
93
|
|
|
@@ -134,7 +141,7 @@ export const OutOfBandConnectionAttributes$inboundSchema: z.ZodType<
|
|
|
134
141
|
z.ZodTypeDef,
|
|
135
142
|
unknown
|
|
136
143
|
> = z.object({
|
|
137
|
-
ssh_key: z.lazy(() =>
|
|
144
|
+
ssh_key: z.lazy(() => OutOfBandConnectionSshKey$inboundSchema).optional(),
|
|
138
145
|
created_at: z.string().optional(),
|
|
139
146
|
username: z.string().optional(),
|
|
140
147
|
credentials: z.lazy(() => OutOfBandConnectionCredentials$inboundSchema)
|
|
@@ -153,7 +160,7 @@ export const OutOfBandConnectionAttributes$inboundSchema: z.ZodType<
|
|
|
153
160
|
});
|
|
154
161
|
/** @internal */
|
|
155
162
|
export type OutOfBandConnectionAttributes$Outbound = {
|
|
156
|
-
ssh_key?:
|
|
163
|
+
ssh_key?: OutOfBandConnectionSshKey$Outbound | undefined;
|
|
157
164
|
created_at?: string | undefined;
|
|
158
165
|
username?: string | undefined;
|
|
159
166
|
credentials?: OutOfBandConnectionCredentials$Outbound | undefined;
|
|
@@ -169,7 +176,7 @@ export const OutOfBandConnectionAttributes$outboundSchema: z.ZodType<
|
|
|
169
176
|
z.ZodTypeDef,
|
|
170
177
|
OutOfBandConnectionAttributes
|
|
171
178
|
> = z.object({
|
|
172
|
-
sshKey: z.lazy(() =>
|
|
179
|
+
sshKey: z.lazy(() => OutOfBandConnectionSshKey$outboundSchema).optional(),
|
|
173
180
|
createdAt: z.string().optional(),
|
|
174
181
|
username: z.string().optional(),
|
|
175
182
|
credentials: z.lazy(() => OutOfBandConnectionCredentials$outboundSchema)
|
package/src/models/serverdata.ts
CHANGED
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
TeamInclude$outboundSchema,
|
|
28
28
|
} from "./teaminclude.js";
|
|
29
29
|
|
|
30
|
+
export type ServerDataTag = {
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
description?: string | null | undefined;
|
|
34
|
+
color?: string | null | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
30
37
|
/**
|
|
31
38
|
* `on` - The server is powered ON
|
|
32
39
|
*
|
|
@@ -163,11 +170,13 @@ export type Interface = {
|
|
|
163
170
|
};
|
|
164
171
|
|
|
165
172
|
export type ServerDataAttributes = {
|
|
173
|
+
tags?: Array<ServerDataTag> | undefined;
|
|
166
174
|
hostname?: string | undefined;
|
|
167
175
|
/**
|
|
168
176
|
* The server label
|
|
169
177
|
*/
|
|
170
178
|
label?: string | undefined;
|
|
179
|
+
price?: number | null | undefined;
|
|
171
180
|
/**
|
|
172
181
|
* `on` - The server is powered ON
|
|
173
182
|
*
|
|
@@ -180,7 +189,7 @@ export type ServerDataAttributes = {
|
|
|
180
189
|
* `rescue_mode` - The server is in rescue mode
|
|
181
190
|
*/
|
|
182
191
|
status?: ServerDataStatus | undefined;
|
|
183
|
-
ipmiStatus?: IpmiStatus | undefined;
|
|
192
|
+
ipmiStatus?: IpmiStatus | null | undefined;
|
|
184
193
|
/**
|
|
185
194
|
* The server role (e.g. Bare Metal)
|
|
186
195
|
*/
|
|
@@ -207,6 +216,50 @@ export type ServerData = {
|
|
|
207
216
|
attributes?: ServerDataAttributes | undefined;
|
|
208
217
|
};
|
|
209
218
|
|
|
219
|
+
/** @internal */
|
|
220
|
+
export const ServerDataTag$inboundSchema: z.ZodType<
|
|
221
|
+
ServerDataTag,
|
|
222
|
+
z.ZodTypeDef,
|
|
223
|
+
unknown
|
|
224
|
+
> = z.object({
|
|
225
|
+
id: z.string().optional(),
|
|
226
|
+
name: z.string().optional(),
|
|
227
|
+
description: z.nullable(z.string()).optional(),
|
|
228
|
+
color: z.nullable(z.string()).optional(),
|
|
229
|
+
});
|
|
230
|
+
/** @internal */
|
|
231
|
+
export type ServerDataTag$Outbound = {
|
|
232
|
+
id?: string | undefined;
|
|
233
|
+
name?: string | undefined;
|
|
234
|
+
description?: string | null | undefined;
|
|
235
|
+
color?: string | null | undefined;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const ServerDataTag$outboundSchema: z.ZodType<
|
|
240
|
+
ServerDataTag$Outbound,
|
|
241
|
+
z.ZodTypeDef,
|
|
242
|
+
ServerDataTag
|
|
243
|
+
> = z.object({
|
|
244
|
+
id: z.string().optional(),
|
|
245
|
+
name: z.string().optional(),
|
|
246
|
+
description: z.nullable(z.string()).optional(),
|
|
247
|
+
color: z.nullable(z.string()).optional(),
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
export function serverDataTagToJSON(serverDataTag: ServerDataTag): string {
|
|
251
|
+
return JSON.stringify(ServerDataTag$outboundSchema.parse(serverDataTag));
|
|
252
|
+
}
|
|
253
|
+
export function serverDataTagFromJSON(
|
|
254
|
+
jsonString: string,
|
|
255
|
+
): SafeParseResult<ServerDataTag, SDKValidationError> {
|
|
256
|
+
return safeParse(
|
|
257
|
+
jsonString,
|
|
258
|
+
(x) => ServerDataTag$inboundSchema.parse(JSON.parse(x)),
|
|
259
|
+
`Failed to parse 'ServerDataTag' from JSON`,
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
210
263
|
/** @internal */
|
|
211
264
|
export const ServerDataStatus$inboundSchema: z.ZodNativeEnum<
|
|
212
265
|
typeof ServerDataStatus
|
|
@@ -534,10 +587,12 @@ export const ServerDataAttributes$inboundSchema: z.ZodType<
|
|
|
534
587
|
z.ZodTypeDef,
|
|
535
588
|
unknown
|
|
536
589
|
> = z.object({
|
|
590
|
+
tags: z.array(z.lazy(() => ServerDataTag$inboundSchema)).optional(),
|
|
537
591
|
hostname: z.string().optional(),
|
|
538
592
|
label: z.string().optional(),
|
|
593
|
+
price: z.nullable(z.number()).optional(),
|
|
539
594
|
status: ServerDataStatus$inboundSchema.optional(),
|
|
540
|
-
ipmi_status: IpmiStatus$inboundSchema.optional(),
|
|
595
|
+
ipmi_status: z.nullable(IpmiStatus$inboundSchema).optional(),
|
|
541
596
|
role: z.string().optional(),
|
|
542
597
|
site: z.string().optional(),
|
|
543
598
|
locked: z.boolean().optional(),
|
|
@@ -567,10 +622,12 @@ export const ServerDataAttributes$inboundSchema: z.ZodType<
|
|
|
567
622
|
});
|
|
568
623
|
/** @internal */
|
|
569
624
|
export type ServerDataAttributes$Outbound = {
|
|
625
|
+
tags?: Array<ServerDataTag$Outbound> | undefined;
|
|
570
626
|
hostname?: string | undefined;
|
|
571
627
|
label?: string | undefined;
|
|
628
|
+
price?: number | null | undefined;
|
|
572
629
|
status?: string | undefined;
|
|
573
|
-
ipmi_status?: string | undefined;
|
|
630
|
+
ipmi_status?: string | null | undefined;
|
|
574
631
|
role?: string | undefined;
|
|
575
632
|
site?: string | undefined;
|
|
576
633
|
locked?: boolean | undefined;
|
|
@@ -594,10 +651,12 @@ export const ServerDataAttributes$outboundSchema: z.ZodType<
|
|
|
594
651
|
z.ZodTypeDef,
|
|
595
652
|
ServerDataAttributes
|
|
596
653
|
> = z.object({
|
|
654
|
+
tags: z.array(z.lazy(() => ServerDataTag$outboundSchema)).optional(),
|
|
597
655
|
hostname: z.string().optional(),
|
|
598
656
|
label: z.string().optional(),
|
|
657
|
+
price: z.nullable(z.number()).optional(),
|
|
599
658
|
status: ServerDataStatus$outboundSchema.optional(),
|
|
600
|
-
ipmiStatus: IpmiStatus$outboundSchema.optional(),
|
|
659
|
+
ipmiStatus: z.nullable(IpmiStatus$outboundSchema).optional(),
|
|
601
660
|
role: z.string().optional(),
|
|
602
661
|
site: z.string().optional(),
|
|
603
662
|
locked: z.boolean().optional(),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../lib/schemas.js";
|
|
7
8
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
@@ -13,16 +14,46 @@ export const StoragePlanDataType = {
|
|
|
13
14
|
} as const;
|
|
14
15
|
export type StoragePlanDataType = ClosedEnum<typeof StoragePlanDataType>;
|
|
15
16
|
|
|
16
|
-
export
|
|
17
|
+
export const StoragePlanStorageType = {
|
|
18
|
+
Filesystem: "filesystem",
|
|
19
|
+
Object: "object",
|
|
20
|
+
} as const;
|
|
21
|
+
export type StoragePlanStorageType = ClosedEnum<typeof StoragePlanStorageType>;
|
|
22
|
+
|
|
23
|
+
export const StoragePlanStorageClass = {
|
|
24
|
+
Standard: "standard",
|
|
25
|
+
HighPerformance: "high_performance",
|
|
26
|
+
} as const;
|
|
27
|
+
export type StoragePlanStorageClass = ClosedEnum<
|
|
28
|
+
typeof StoragePlanStorageClass
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
export type StoragePlanDataUSD = {
|
|
17
32
|
month?: number | undefined;
|
|
18
33
|
};
|
|
19
34
|
|
|
20
|
-
export type
|
|
35
|
+
export type StoragePlanDataBRL = {
|
|
36
|
+
month?: number | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type StoragePlanDataPricing = {
|
|
40
|
+
usd?: StoragePlanDataUSD | undefined;
|
|
41
|
+
brl?: StoragePlanDataBRL | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type StoragePlanDataRegion = {
|
|
21
45
|
name?: string | undefined;
|
|
22
46
|
locations?: Array<string> | undefined;
|
|
23
47
|
pricing?: StoragePlanDataPricing | undefined;
|
|
24
48
|
};
|
|
25
49
|
|
|
50
|
+
export type StoragePlanDataAttributes = {
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
storagePlanStorageType?: StoragePlanStorageType | undefined;
|
|
53
|
+
storagePlanStorageClass?: StoragePlanStorageClass | null | undefined;
|
|
54
|
+
regions?: Array<StoragePlanDataRegion> | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
26
57
|
export type StoragePlanData = {
|
|
27
58
|
id?: string | undefined;
|
|
28
59
|
type?: StoragePlanDataType | undefined;
|
|
@@ -38,17 +69,120 @@ export const StoragePlanDataType$outboundSchema: z.ZodNativeEnum<
|
|
|
38
69
|
typeof StoragePlanDataType
|
|
39
70
|
> = StoragePlanDataType$inboundSchema;
|
|
40
71
|
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const StoragePlanStorageType$inboundSchema: z.ZodNativeEnum<
|
|
74
|
+
typeof StoragePlanStorageType
|
|
75
|
+
> = z.nativeEnum(StoragePlanStorageType);
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const StoragePlanStorageType$outboundSchema: z.ZodNativeEnum<
|
|
78
|
+
typeof StoragePlanStorageType
|
|
79
|
+
> = StoragePlanStorageType$inboundSchema;
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const StoragePlanStorageClass$inboundSchema: z.ZodNativeEnum<
|
|
83
|
+
typeof StoragePlanStorageClass
|
|
84
|
+
> = z.nativeEnum(StoragePlanStorageClass);
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const StoragePlanStorageClass$outboundSchema: z.ZodNativeEnum<
|
|
87
|
+
typeof StoragePlanStorageClass
|
|
88
|
+
> = StoragePlanStorageClass$inboundSchema;
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const StoragePlanDataUSD$inboundSchema: z.ZodType<
|
|
92
|
+
StoragePlanDataUSD,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
unknown
|
|
95
|
+
> = z.object({
|
|
96
|
+
month: z.number().optional(),
|
|
97
|
+
});
|
|
98
|
+
/** @internal */
|
|
99
|
+
export type StoragePlanDataUSD$Outbound = {
|
|
100
|
+
month?: number | undefined;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const StoragePlanDataUSD$outboundSchema: z.ZodType<
|
|
105
|
+
StoragePlanDataUSD$Outbound,
|
|
106
|
+
z.ZodTypeDef,
|
|
107
|
+
StoragePlanDataUSD
|
|
108
|
+
> = z.object({
|
|
109
|
+
month: z.number().optional(),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export function storagePlanDataUSDToJSON(
|
|
113
|
+
storagePlanDataUSD: StoragePlanDataUSD,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
StoragePlanDataUSD$outboundSchema.parse(storagePlanDataUSD),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
export function storagePlanDataUSDFromJSON(
|
|
120
|
+
jsonString: string,
|
|
121
|
+
): SafeParseResult<StoragePlanDataUSD, SDKValidationError> {
|
|
122
|
+
return safeParse(
|
|
123
|
+
jsonString,
|
|
124
|
+
(x) => StoragePlanDataUSD$inboundSchema.parse(JSON.parse(x)),
|
|
125
|
+
`Failed to parse 'StoragePlanDataUSD' from JSON`,
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const StoragePlanDataBRL$inboundSchema: z.ZodType<
|
|
131
|
+
StoragePlanDataBRL,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
unknown
|
|
134
|
+
> = z.object({
|
|
135
|
+
month: z.number().optional(),
|
|
136
|
+
});
|
|
137
|
+
/** @internal */
|
|
138
|
+
export type StoragePlanDataBRL$Outbound = {
|
|
139
|
+
month?: number | undefined;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
export const StoragePlanDataBRL$outboundSchema: z.ZodType<
|
|
144
|
+
StoragePlanDataBRL$Outbound,
|
|
145
|
+
z.ZodTypeDef,
|
|
146
|
+
StoragePlanDataBRL
|
|
147
|
+
> = z.object({
|
|
148
|
+
month: z.number().optional(),
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
export function storagePlanDataBRLToJSON(
|
|
152
|
+
storagePlanDataBRL: StoragePlanDataBRL,
|
|
153
|
+
): string {
|
|
154
|
+
return JSON.stringify(
|
|
155
|
+
StoragePlanDataBRL$outboundSchema.parse(storagePlanDataBRL),
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
export function storagePlanDataBRLFromJSON(
|
|
159
|
+
jsonString: string,
|
|
160
|
+
): SafeParseResult<StoragePlanDataBRL, SDKValidationError> {
|
|
161
|
+
return safeParse(
|
|
162
|
+
jsonString,
|
|
163
|
+
(x) => StoragePlanDataBRL$inboundSchema.parse(JSON.parse(x)),
|
|
164
|
+
`Failed to parse 'StoragePlanDataBRL' from JSON`,
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
41
168
|
/** @internal */
|
|
42
169
|
export const StoragePlanDataPricing$inboundSchema: z.ZodType<
|
|
43
170
|
StoragePlanDataPricing,
|
|
44
171
|
z.ZodTypeDef,
|
|
45
172
|
unknown
|
|
46
173
|
> = z.object({
|
|
47
|
-
|
|
174
|
+
USD: z.lazy(() => StoragePlanDataUSD$inboundSchema).optional(),
|
|
175
|
+
BRL: z.lazy(() => StoragePlanDataBRL$inboundSchema).optional(),
|
|
176
|
+
}).transform((v) => {
|
|
177
|
+
return remap$(v, {
|
|
178
|
+
"USD": "usd",
|
|
179
|
+
"BRL": "brl",
|
|
180
|
+
});
|
|
48
181
|
});
|
|
49
182
|
/** @internal */
|
|
50
183
|
export type StoragePlanDataPricing$Outbound = {
|
|
51
|
-
|
|
184
|
+
USD?: StoragePlanDataUSD$Outbound | undefined;
|
|
185
|
+
BRL?: StoragePlanDataBRL$Outbound | undefined;
|
|
52
186
|
};
|
|
53
187
|
|
|
54
188
|
/** @internal */
|
|
@@ -57,7 +191,13 @@ export const StoragePlanDataPricing$outboundSchema: z.ZodType<
|
|
|
57
191
|
z.ZodTypeDef,
|
|
58
192
|
StoragePlanDataPricing
|
|
59
193
|
> = z.object({
|
|
60
|
-
|
|
194
|
+
usd: z.lazy(() => StoragePlanDataUSD$outboundSchema).optional(),
|
|
195
|
+
brl: z.lazy(() => StoragePlanDataBRL$outboundSchema).optional(),
|
|
196
|
+
}).transform((v) => {
|
|
197
|
+
return remap$(v, {
|
|
198
|
+
usd: "USD",
|
|
199
|
+
brl: "BRL",
|
|
200
|
+
});
|
|
61
201
|
});
|
|
62
202
|
|
|
63
203
|
export function storagePlanDataPricingToJSON(
|
|
@@ -78,8 +218,8 @@ export function storagePlanDataPricingFromJSON(
|
|
|
78
218
|
}
|
|
79
219
|
|
|
80
220
|
/** @internal */
|
|
81
|
-
export const
|
|
82
|
-
|
|
221
|
+
export const StoragePlanDataRegion$inboundSchema: z.ZodType<
|
|
222
|
+
StoragePlanDataRegion,
|
|
83
223
|
z.ZodTypeDef,
|
|
84
224
|
unknown
|
|
85
225
|
> = z.object({
|
|
@@ -88,12 +228,65 @@ export const StoragePlanDataAttributes$inboundSchema: z.ZodType<
|
|
|
88
228
|
pricing: z.lazy(() => StoragePlanDataPricing$inboundSchema).optional(),
|
|
89
229
|
});
|
|
90
230
|
/** @internal */
|
|
91
|
-
export type
|
|
231
|
+
export type StoragePlanDataRegion$Outbound = {
|
|
92
232
|
name?: string | undefined;
|
|
93
233
|
locations?: Array<string> | undefined;
|
|
94
234
|
pricing?: StoragePlanDataPricing$Outbound | undefined;
|
|
95
235
|
};
|
|
96
236
|
|
|
237
|
+
/** @internal */
|
|
238
|
+
export const StoragePlanDataRegion$outboundSchema: z.ZodType<
|
|
239
|
+
StoragePlanDataRegion$Outbound,
|
|
240
|
+
z.ZodTypeDef,
|
|
241
|
+
StoragePlanDataRegion
|
|
242
|
+
> = z.object({
|
|
243
|
+
name: z.string().optional(),
|
|
244
|
+
locations: z.array(z.string()).optional(),
|
|
245
|
+
pricing: z.lazy(() => StoragePlanDataPricing$outboundSchema).optional(),
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
export function storagePlanDataRegionToJSON(
|
|
249
|
+
storagePlanDataRegion: StoragePlanDataRegion,
|
|
250
|
+
): string {
|
|
251
|
+
return JSON.stringify(
|
|
252
|
+
StoragePlanDataRegion$outboundSchema.parse(storagePlanDataRegion),
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
export function storagePlanDataRegionFromJSON(
|
|
256
|
+
jsonString: string,
|
|
257
|
+
): SafeParseResult<StoragePlanDataRegion, SDKValidationError> {
|
|
258
|
+
return safeParse(
|
|
259
|
+
jsonString,
|
|
260
|
+
(x) => StoragePlanDataRegion$inboundSchema.parse(JSON.parse(x)),
|
|
261
|
+
`Failed to parse 'StoragePlanDataRegion' from JSON`,
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** @internal */
|
|
266
|
+
export const StoragePlanDataAttributes$inboundSchema: z.ZodType<
|
|
267
|
+
StoragePlanDataAttributes,
|
|
268
|
+
z.ZodTypeDef,
|
|
269
|
+
unknown
|
|
270
|
+
> = z.object({
|
|
271
|
+
name: z.string().optional(),
|
|
272
|
+
storage_type: StoragePlanStorageType$inboundSchema.optional(),
|
|
273
|
+
storage_class: z.nullable(StoragePlanStorageClass$inboundSchema).optional(),
|
|
274
|
+
regions: z.array(z.lazy(() => StoragePlanDataRegion$inboundSchema))
|
|
275
|
+
.optional(),
|
|
276
|
+
}).transform((v) => {
|
|
277
|
+
return remap$(v, {
|
|
278
|
+
"storage_type": "storagePlanStorageType",
|
|
279
|
+
"storage_class": "storagePlanStorageClass",
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
/** @internal */
|
|
283
|
+
export type StoragePlanDataAttributes$Outbound = {
|
|
284
|
+
name?: string | undefined;
|
|
285
|
+
storage_type?: string | undefined;
|
|
286
|
+
storage_class?: string | null | undefined;
|
|
287
|
+
regions?: Array<StoragePlanDataRegion$Outbound> | undefined;
|
|
288
|
+
};
|
|
289
|
+
|
|
97
290
|
/** @internal */
|
|
98
291
|
export const StoragePlanDataAttributes$outboundSchema: z.ZodType<
|
|
99
292
|
StoragePlanDataAttributes$Outbound,
|
|
@@ -101,8 +294,16 @@ export const StoragePlanDataAttributes$outboundSchema: z.ZodType<
|
|
|
101
294
|
StoragePlanDataAttributes
|
|
102
295
|
> = z.object({
|
|
103
296
|
name: z.string().optional(),
|
|
104
|
-
|
|
105
|
-
|
|
297
|
+
storagePlanStorageType: StoragePlanStorageType$outboundSchema.optional(),
|
|
298
|
+
storagePlanStorageClass: z.nullable(StoragePlanStorageClass$outboundSchema)
|
|
299
|
+
.optional(),
|
|
300
|
+
regions: z.array(z.lazy(() => StoragePlanDataRegion$outboundSchema))
|
|
301
|
+
.optional(),
|
|
302
|
+
}).transform((v) => {
|
|
303
|
+
return remap$(v, {
|
|
304
|
+
storagePlanStorageType: "storage_type",
|
|
305
|
+
storagePlanStorageClass: "storage_class",
|
|
306
|
+
});
|
|
106
307
|
});
|
|
107
308
|
|
|
108
309
|
export function storagePlanDataAttributesToJSON(
|