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.
Files changed (205) hide show
  1. package/bin/mcp-server.js +838 -559
  2. package/bin/mcp-server.js.map +28 -27
  3. package/dist/commonjs/funcs/plansListStorage.d.ts +2 -1
  4. package/dist/commonjs/funcs/plansListStorage.d.ts.map +1 -1
  5. package/dist/commonjs/funcs/plansListStorage.js +18 -3
  6. package/dist/commonjs/funcs/plansListStorage.js.map +1 -1
  7. package/dist/commonjs/lib/config.d.ts +3 -3
  8. package/dist/commonjs/lib/config.js +3 -3
  9. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  10. package/dist/commonjs/mcp-server/server.js +1 -1
  11. package/dist/commonjs/mcp-server/tools/plansListStorage.d.ts +6 -1
  12. package/dist/commonjs/mcp-server/tools/plansListStorage.d.ts.map +1 -1
  13. package/dist/commonjs/mcp-server/tools/plansListStorage.js +40 -2
  14. package/dist/commonjs/mcp-server/tools/plansListStorage.js.map +1 -1
  15. package/dist/commonjs/models/billingusage.d.ts +2 -2
  16. package/dist/commonjs/models/billingusage.d.ts.map +1 -1
  17. package/dist/commonjs/models/billingusage.js +2 -2
  18. package/dist/commonjs/models/billingusage.js.map +1 -1
  19. package/dist/commonjs/models/ipmisession.d.ts +5 -0
  20. package/dist/commonjs/models/ipmisession.d.ts.map +1 -1
  21. package/dist/commonjs/models/ipmisession.js +4 -0
  22. package/dist/commonjs/models/ipmisession.js.map +1 -1
  23. package/dist/commonjs/models/kubernetesclusterdata.d.ts +32 -28
  24. package/dist/commonjs/models/kubernetesclusterdata.d.ts.map +1 -1
  25. package/dist/commonjs/models/kubernetesclusterdata.js +20 -15
  26. package/dist/commonjs/models/kubernetesclusterdata.js.map +1 -1
  27. package/dist/commonjs/models/kubernetesclustersummarydata.d.ts +9 -7
  28. package/dist/commonjs/models/kubernetesclustersummarydata.d.ts.map +1 -1
  29. package/dist/commonjs/models/kubernetesclustersummarydata.js +6 -3
  30. package/dist/commonjs/models/kubernetesclustersummarydata.js.map +1 -1
  31. package/dist/commonjs/models/objectstoragedata.d.ts +5 -0
  32. package/dist/commonjs/models/objectstoragedata.d.ts.map +1 -1
  33. package/dist/commonjs/models/objectstoragedata.js +2 -0
  34. package/dist/commonjs/models/objectstoragedata.js.map +1 -1
  35. package/dist/commonjs/models/operatingsystemdata.d.ts +6 -0
  36. package/dist/commonjs/models/operatingsystemdata.d.ts.map +1 -1
  37. package/dist/commonjs/models/operatingsystemdata.js +6 -0
  38. package/dist/commonjs/models/operatingsystemdata.js.map +1 -1
  39. package/dist/commonjs/models/operations/getstorageplans.d.ts +25 -0
  40. package/dist/commonjs/models/operations/getstorageplans.d.ts.map +1 -0
  41. package/dist/commonjs/models/operations/getstorageplans.js +71 -0
  42. package/dist/commonjs/models/operations/getstorageplans.js.map +1 -0
  43. package/dist/commonjs/models/operations/index.d.ts +1 -0
  44. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  45. package/dist/commonjs/models/operations/index.js +1 -0
  46. package/dist/commonjs/models/operations/index.js.map +1 -1
  47. package/dist/commonjs/models/operations/patchuserprofile.d.ts +11 -0
  48. package/dist/commonjs/models/operations/patchuserprofile.d.ts.map +1 -1
  49. package/dist/commonjs/models/operations/patchuserprofile.js +15 -1
  50. package/dist/commonjs/models/operations/patchuserprofile.js.map +1 -1
  51. package/dist/commonjs/models/operations/updateproject.d.ts +4 -4
  52. package/dist/commonjs/models/operations/updateproject.d.ts.map +1 -1
  53. package/dist/commonjs/models/operations/updateproject.js +8 -8
  54. package/dist/commonjs/models/operations/updateproject.js.map +1 -1
  55. package/dist/commonjs/models/outofbandconnection.d.ts +8 -8
  56. package/dist/commonjs/models/outofbandconnection.d.ts.map +1 -1
  57. package/dist/commonjs/models/outofbandconnection.js +11 -12
  58. package/dist/commonjs/models/outofbandconnection.js.map +1 -1
  59. package/dist/commonjs/models/serverdata.d.ts +25 -2
  60. package/dist/commonjs/models/serverdata.d.ts.map +1 -1
  61. package/dist/commonjs/models/serverdata.js +29 -3
  62. package/dist/commonjs/models/serverdata.js.map +1 -1
  63. package/dist/commonjs/models/storageplandata.d.ts +70 -5
  64. package/dist/commonjs/models/storageplandata.d.ts.map +1 -1
  65. package/dist/commonjs/models/storageplandata.js +101 -5
  66. package/dist/commonjs/models/storageplandata.js.map +1 -1
  67. package/dist/commonjs/models/user.d.ts +15 -0
  68. package/dist/commonjs/models/user.d.ts.map +1 -1
  69. package/dist/commonjs/models/user.js +19 -1
  70. package/dist/commonjs/models/user.js.map +1 -1
  71. package/dist/commonjs/models/userteam.d.ts +53 -0
  72. package/dist/commonjs/models/userteam.d.ts.map +1 -1
  73. package/dist/commonjs/models/userteam.js +79 -1
  74. package/dist/commonjs/models/userteam.js.map +1 -1
  75. package/dist/commonjs/models/userupdate.d.ts +17 -2
  76. package/dist/commonjs/models/userupdate.d.ts.map +1 -1
  77. package/dist/commonjs/models/userupdate.js +20 -3
  78. package/dist/commonjs/models/userupdate.js.map +1 -1
  79. package/dist/commonjs/models/virtualmachineattributes.d.ts +32 -9
  80. package/dist/commonjs/models/virtualmachineattributes.d.ts.map +1 -1
  81. package/dist/commonjs/models/virtualmachineattributes.js +47 -9
  82. package/dist/commonjs/models/virtualmachineattributes.js.map +1 -1
  83. package/dist/commonjs/models/volumedata.d.ts +15 -0
  84. package/dist/commonjs/models/volumedata.d.ts.map +1 -1
  85. package/dist/commonjs/models/volumedata.js +10 -0
  86. package/dist/commonjs/models/volumedata.js.map +1 -1
  87. package/dist/commonjs/sdk/plans.d.ts +1 -1
  88. package/dist/commonjs/sdk/plans.d.ts.map +1 -1
  89. package/dist/commonjs/sdk/plans.js +2 -2
  90. package/dist/commonjs/sdk/plans.js.map +1 -1
  91. package/dist/esm/funcs/plansListStorage.d.ts +2 -1
  92. package/dist/esm/funcs/plansListStorage.d.ts.map +1 -1
  93. package/dist/esm/funcs/plansListStorage.js +18 -3
  94. package/dist/esm/funcs/plansListStorage.js.map +1 -1
  95. package/dist/esm/lib/config.d.ts +3 -3
  96. package/dist/esm/lib/config.js +3 -3
  97. package/dist/esm/mcp-server/mcp-server.js +1 -1
  98. package/dist/esm/mcp-server/server.js +1 -1
  99. package/dist/esm/mcp-server/tools/plansListStorage.d.ts +6 -1
  100. package/dist/esm/mcp-server/tools/plansListStorage.d.ts.map +1 -1
  101. package/dist/esm/mcp-server/tools/plansListStorage.js +7 -2
  102. package/dist/esm/mcp-server/tools/plansListStorage.js.map +1 -1
  103. package/dist/esm/models/billingusage.d.ts +2 -2
  104. package/dist/esm/models/billingusage.d.ts.map +1 -1
  105. package/dist/esm/models/billingusage.js +2 -2
  106. package/dist/esm/models/billingusage.js.map +1 -1
  107. package/dist/esm/models/ipmisession.d.ts +5 -0
  108. package/dist/esm/models/ipmisession.d.ts.map +1 -1
  109. package/dist/esm/models/ipmisession.js +4 -0
  110. package/dist/esm/models/ipmisession.js.map +1 -1
  111. package/dist/esm/models/kubernetesclusterdata.d.ts +32 -28
  112. package/dist/esm/models/kubernetesclusterdata.d.ts.map +1 -1
  113. package/dist/esm/models/kubernetesclusterdata.js +20 -15
  114. package/dist/esm/models/kubernetesclusterdata.js.map +1 -1
  115. package/dist/esm/models/kubernetesclustersummarydata.d.ts +9 -7
  116. package/dist/esm/models/kubernetesclustersummarydata.d.ts.map +1 -1
  117. package/dist/esm/models/kubernetesclustersummarydata.js +6 -3
  118. package/dist/esm/models/kubernetesclustersummarydata.js.map +1 -1
  119. package/dist/esm/models/objectstoragedata.d.ts +5 -0
  120. package/dist/esm/models/objectstoragedata.d.ts.map +1 -1
  121. package/dist/esm/models/objectstoragedata.js +2 -0
  122. package/dist/esm/models/objectstoragedata.js.map +1 -1
  123. package/dist/esm/models/operatingsystemdata.d.ts +6 -0
  124. package/dist/esm/models/operatingsystemdata.d.ts.map +1 -1
  125. package/dist/esm/models/operatingsystemdata.js +6 -0
  126. package/dist/esm/models/operatingsystemdata.js.map +1 -1
  127. package/dist/esm/models/operations/getstorageplans.d.ts +25 -0
  128. package/dist/esm/models/operations/getstorageplans.d.ts.map +1 -0
  129. package/dist/esm/models/operations/getstorageplans.js +33 -0
  130. package/dist/esm/models/operations/getstorageplans.js.map +1 -0
  131. package/dist/esm/models/operations/index.d.ts +1 -0
  132. package/dist/esm/models/operations/index.d.ts.map +1 -1
  133. package/dist/esm/models/operations/index.js +1 -0
  134. package/dist/esm/models/operations/index.js.map +1 -1
  135. package/dist/esm/models/operations/patchuserprofile.d.ts +11 -0
  136. package/dist/esm/models/operations/patchuserprofile.d.ts.map +1 -1
  137. package/dist/esm/models/operations/patchuserprofile.js +12 -0
  138. package/dist/esm/models/operations/patchuserprofile.js.map +1 -1
  139. package/dist/esm/models/operations/updateproject.d.ts +4 -4
  140. package/dist/esm/models/operations/updateproject.d.ts.map +1 -1
  141. package/dist/esm/models/operations/updateproject.js +8 -8
  142. package/dist/esm/models/operations/updateproject.js.map +1 -1
  143. package/dist/esm/models/outofbandconnection.d.ts +8 -8
  144. package/dist/esm/models/outofbandconnection.d.ts.map +1 -1
  145. package/dist/esm/models/outofbandconnection.js +8 -9
  146. package/dist/esm/models/outofbandconnection.js.map +1 -1
  147. package/dist/esm/models/serverdata.d.ts +25 -2
  148. package/dist/esm/models/serverdata.d.ts.map +1 -1
  149. package/dist/esm/models/serverdata.js +26 -2
  150. package/dist/esm/models/serverdata.js.map +1 -1
  151. package/dist/esm/models/storageplandata.d.ts +70 -5
  152. package/dist/esm/models/storageplandata.d.ts.map +1 -1
  153. package/dist/esm/models/storageplandata.js +94 -4
  154. package/dist/esm/models/storageplandata.js.map +1 -1
  155. package/dist/esm/models/user.d.ts +15 -0
  156. package/dist/esm/models/user.d.ts.map +1 -1
  157. package/dist/esm/models/user.js +18 -0
  158. package/dist/esm/models/user.js.map +1 -1
  159. package/dist/esm/models/userteam.d.ts +53 -0
  160. package/dist/esm/models/userteam.d.ts.map +1 -1
  161. package/dist/esm/models/userteam.js +76 -0
  162. package/dist/esm/models/userteam.js.map +1 -1
  163. package/dist/esm/models/userupdate.d.ts +17 -2
  164. package/dist/esm/models/userupdate.d.ts.map +1 -1
  165. package/dist/esm/models/userupdate.js +19 -2
  166. package/dist/esm/models/userupdate.js.map +1 -1
  167. package/dist/esm/models/virtualmachineattributes.d.ts +32 -9
  168. package/dist/esm/models/virtualmachineattributes.d.ts.map +1 -1
  169. package/dist/esm/models/virtualmachineattributes.js +44 -8
  170. package/dist/esm/models/virtualmachineattributes.js.map +1 -1
  171. package/dist/esm/models/volumedata.d.ts +15 -0
  172. package/dist/esm/models/volumedata.d.ts.map +1 -1
  173. package/dist/esm/models/volumedata.js +10 -0
  174. package/dist/esm/models/volumedata.js.map +1 -1
  175. package/dist/esm/sdk/plans.d.ts +1 -1
  176. package/dist/esm/sdk/plans.d.ts.map +1 -1
  177. package/dist/esm/sdk/plans.js +2 -2
  178. package/dist/esm/sdk/plans.js.map +1 -1
  179. package/jsr.json +1 -1
  180. package/package.json +1 -1
  181. package/src/funcs/plansListStorage.ts +25 -0
  182. package/src/lib/config.ts +3 -3
  183. package/src/mcp-server/mcp-server.ts +1 -1
  184. package/src/mcp-server/server.ts +1 -1
  185. package/src/mcp-server/tools/plansListStorage.ts +9 -2
  186. package/src/models/billingusage.ts +4 -4
  187. package/src/models/ipmisession.ts +9 -0
  188. package/src/models/kubernetesclusterdata.ts +63 -44
  189. package/src/models/kubernetesclustersummarydata.ts +18 -11
  190. package/src/models/objectstoragedata.ts +7 -0
  191. package/src/models/operatingsystemdata.ts +12 -0
  192. package/src/models/operations/getstorageplans.ts +72 -0
  193. package/src/models/operations/index.ts +1 -0
  194. package/src/models/operations/patchuserprofile.ts +39 -0
  195. package/src/models/operations/updateproject.ts +12 -16
  196. package/src/models/outofbandconnection.ts +28 -21
  197. package/src/models/serverdata.ts +63 -4
  198. package/src/models/storageplandata.ts +211 -10
  199. package/src/models/user.ts +29 -0
  200. package/src/models/userteam.ts +142 -0
  201. package/src/models/userupdate.ts +35 -4
  202. package/src/models/virtualmachineattributes.ts +98 -17
  203. package/src/models/volumedata.ts +25 -0
  204. package/src/sdk/plans.ts +2 -0
  205. package/tests/integration/projects.test.ts +3 -0
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
+ import { ClosedEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
11
  import {
@@ -14,6 +15,11 @@ import {
14
15
  TeamInclude$outboundSchema,
15
16
  } from "./teaminclude.js";
16
17
 
18
+ export const UserType = {
19
+ Users: "users",
20
+ } as const;
21
+ export type UserType = ClosedEnum<typeof UserType>;
22
+
17
23
  export type UserRole = {
18
24
  id?: string | undefined;
19
25
  name?: string | undefined;
@@ -26,15 +32,25 @@ export type UserAttributes = {
26
32
  lastName?: string | undefined;
27
33
  email?: string | undefined;
28
34
  authenticationFactorId?: string | undefined;
35
+ createdAt?: string | undefined;
36
+ updatedAt?: string | undefined;
29
37
  role?: UserRole | undefined;
30
38
  teams?: Array<TeamInclude> | undefined;
31
39
  };
32
40
 
33
41
  export type User = {
34
42
  id?: string | undefined;
43
+ type?: UserType | undefined;
35
44
  attributes?: UserAttributes | undefined;
36
45
  };
37
46
 
47
+ /** @internal */
48
+ export const UserType$inboundSchema: z.ZodNativeEnum<typeof UserType> = z
49
+ .nativeEnum(UserType);
50
+ /** @internal */
51
+ export const UserType$outboundSchema: z.ZodNativeEnum<typeof UserType> =
52
+ UserType$inboundSchema;
53
+
38
54
  /** @internal */
39
55
  export const UserRole$inboundSchema: z.ZodType<
40
56
  UserRole,
@@ -101,6 +117,8 @@ export const UserAttributes$inboundSchema: z.ZodType<
101
117
  last_name: z.string().optional(),
102
118
  email: z.string().optional(),
103
119
  authentication_factor_id: z.string().optional(),
120
+ created_at: z.string().optional(),
121
+ updated_at: z.string().optional(),
104
122
  role: z.lazy(() => UserRole$inboundSchema).optional(),
105
123
  teams: z.array(TeamInclude$inboundSchema).optional(),
106
124
  }).transform((v) => {
@@ -108,6 +126,8 @@ export const UserAttributes$inboundSchema: z.ZodType<
108
126
  "first_name": "firstName",
109
127
  "last_name": "lastName",
110
128
  "authentication_factor_id": "authenticationFactorId",
129
+ "created_at": "createdAt",
130
+ "updated_at": "updatedAt",
111
131
  });
112
132
  });
113
133
  /** @internal */
@@ -116,6 +136,8 @@ export type UserAttributes$Outbound = {
116
136
  last_name?: string | undefined;
117
137
  email?: string | undefined;
118
138
  authentication_factor_id?: string | undefined;
139
+ created_at?: string | undefined;
140
+ updated_at?: string | undefined;
119
141
  role?: UserRole$Outbound | undefined;
120
142
  teams?: Array<TeamInclude$Outbound> | undefined;
121
143
  };
@@ -130,6 +152,8 @@ export const UserAttributes$outboundSchema: z.ZodType<
130
152
  lastName: z.string().optional(),
131
153
  email: z.string().optional(),
132
154
  authenticationFactorId: z.string().optional(),
155
+ createdAt: z.string().optional(),
156
+ updatedAt: z.string().optional(),
133
157
  role: z.lazy(() => UserRole$outboundSchema).optional(),
134
158
  teams: z.array(TeamInclude$outboundSchema).optional(),
135
159
  }).transform((v) => {
@@ -137,6 +161,8 @@ export const UserAttributes$outboundSchema: z.ZodType<
137
161
  firstName: "first_name",
138
162
  lastName: "last_name",
139
163
  authenticationFactorId: "authentication_factor_id",
164
+ createdAt: "created_at",
165
+ updatedAt: "updated_at",
140
166
  });
141
167
  });
142
168
 
@@ -157,11 +183,13 @@ export function userAttributesFromJSON(
157
183
  export const User$inboundSchema: z.ZodType<User, z.ZodTypeDef, unknown> = z
158
184
  .object({
159
185
  id: z.string().optional(),
186
+ type: UserType$inboundSchema.optional(),
160
187
  attributes: z.lazy(() => UserAttributes$inboundSchema).optional(),
161
188
  });
162
189
  /** @internal */
163
190
  export type User$Outbound = {
164
191
  id?: string | undefined;
192
+ type?: string | undefined;
165
193
  attributes?: UserAttributes$Outbound | undefined;
166
194
  };
167
195
 
@@ -169,6 +197,7 @@ export type User$Outbound = {
169
197
  export const User$outboundSchema: z.ZodType<User$Outbound, z.ZodTypeDef, User> =
170
198
  z.object({
171
199
  id: z.string().optional(),
200
+ type: UserType$outboundSchema.optional(),
172
201
  attributes: z.lazy(() => UserAttributes$outboundSchema).optional(),
173
202
  });
174
203
 
@@ -5,8 +5,15 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
+ import { ClosedEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
11
+ import {
12
+ ProjectInclude,
13
+ ProjectInclude$inboundSchema,
14
+ ProjectInclude$Outbound,
15
+ ProjectInclude$outboundSchema,
16
+ } from "./projectinclude.js";
10
17
  import {
11
18
  UserInclude,
12
19
  UserInclude$inboundSchema,
@@ -14,11 +21,28 @@ import {
14
21
  UserInclude$outboundSchema,
15
22
  } from "./userinclude.js";
16
23
 
24
+ export const UserTeamType = {
25
+ Teams: "teams",
26
+ } as const;
27
+ export type UserTeamType = ClosedEnum<typeof UserTeamType>;
28
+
17
29
  export type UserTeamBilling = {
18
30
  id?: string | undefined;
19
31
  customerBillingId?: string | undefined;
20
32
  };
21
33
 
34
+ export type UserTeamLimits = {
35
+ bareMetal?: number | null | undefined;
36
+ bareMetalGpu?: number | null | undefined;
37
+ virtualMachine?: number | null | undefined;
38
+ virtualMachineGpu?: number | null | undefined;
39
+ elasticIp?: number | null | undefined;
40
+ virtualNetwork?: number | null | undefined;
41
+ database?: number | null | undefined;
42
+ filesystem?: number | null | undefined;
43
+ blockStorage?: number | null | undefined;
44
+ };
45
+
22
46
  export type UserTeamAttributes = {
23
47
  name?: string | undefined;
24
48
  slug?: string | undefined;
@@ -27,15 +51,29 @@ export type UserTeamAttributes = {
27
51
  currency?: string | undefined;
28
52
  createdAt?: string | undefined;
29
53
  updatedAt?: string | undefined;
54
+ status?: string | null | undefined;
55
+ enforceMfa?: boolean | undefined;
56
+ users?: Array<UserInclude> | undefined;
57
+ projects?: Array<ProjectInclude> | undefined;
30
58
  owner?: UserInclude | undefined;
31
59
  billing?: UserTeamBilling | undefined;
60
+ featureFlags?: Array<string> | undefined;
61
+ limits?: UserTeamLimits | undefined;
32
62
  };
33
63
 
34
64
  export type UserTeam = {
35
65
  id?: string | undefined;
66
+ type?: UserTeamType | undefined;
36
67
  attributes?: UserTeamAttributes | undefined;
37
68
  };
38
69
 
70
+ /** @internal */
71
+ export const UserTeamType$inboundSchema: z.ZodNativeEnum<typeof UserTeamType> =
72
+ z.nativeEnum(UserTeamType);
73
+ /** @internal */
74
+ export const UserTeamType$outboundSchema: z.ZodNativeEnum<typeof UserTeamType> =
75
+ UserTeamType$inboundSchema;
76
+
39
77
  /** @internal */
40
78
  export const UserTeamBilling$inboundSchema: z.ZodType<
41
79
  UserTeamBilling,
@@ -84,6 +122,85 @@ export function userTeamBillingFromJSON(
84
122
  );
85
123
  }
86
124
 
125
+ /** @internal */
126
+ export const UserTeamLimits$inboundSchema: z.ZodType<
127
+ UserTeamLimits,
128
+ z.ZodTypeDef,
129
+ unknown
130
+ > = z.object({
131
+ bare_metal: z.nullable(z.number().int()).optional(),
132
+ bare_metal_gpu: z.nullable(z.number().int()).optional(),
133
+ virtual_machine: z.nullable(z.number().int()).optional(),
134
+ virtual_machine_gpu: z.nullable(z.number().int()).optional(),
135
+ elastic_ip: z.nullable(z.number().int()).optional(),
136
+ virtual_network: z.nullable(z.number().int()).optional(),
137
+ database: z.nullable(z.number().int()).optional(),
138
+ filesystem: z.nullable(z.number().int()).optional(),
139
+ block_storage: z.nullable(z.number().int()).optional(),
140
+ }).transform((v) => {
141
+ return remap$(v, {
142
+ "bare_metal": "bareMetal",
143
+ "bare_metal_gpu": "bareMetalGpu",
144
+ "virtual_machine": "virtualMachine",
145
+ "virtual_machine_gpu": "virtualMachineGpu",
146
+ "elastic_ip": "elasticIp",
147
+ "virtual_network": "virtualNetwork",
148
+ "block_storage": "blockStorage",
149
+ });
150
+ });
151
+ /** @internal */
152
+ export type UserTeamLimits$Outbound = {
153
+ bare_metal?: number | null | undefined;
154
+ bare_metal_gpu?: number | null | undefined;
155
+ virtual_machine?: number | null | undefined;
156
+ virtual_machine_gpu?: number | null | undefined;
157
+ elastic_ip?: number | null | undefined;
158
+ virtual_network?: number | null | undefined;
159
+ database?: number | null | undefined;
160
+ filesystem?: number | null | undefined;
161
+ block_storage?: number | null | undefined;
162
+ };
163
+
164
+ /** @internal */
165
+ export const UserTeamLimits$outboundSchema: z.ZodType<
166
+ UserTeamLimits$Outbound,
167
+ z.ZodTypeDef,
168
+ UserTeamLimits
169
+ > = z.object({
170
+ bareMetal: z.nullable(z.number().int()).optional(),
171
+ bareMetalGpu: z.nullable(z.number().int()).optional(),
172
+ virtualMachine: z.nullable(z.number().int()).optional(),
173
+ virtualMachineGpu: z.nullable(z.number().int()).optional(),
174
+ elasticIp: z.nullable(z.number().int()).optional(),
175
+ virtualNetwork: z.nullable(z.number().int()).optional(),
176
+ database: z.nullable(z.number().int()).optional(),
177
+ filesystem: z.nullable(z.number().int()).optional(),
178
+ blockStorage: z.nullable(z.number().int()).optional(),
179
+ }).transform((v) => {
180
+ return remap$(v, {
181
+ bareMetal: "bare_metal",
182
+ bareMetalGpu: "bare_metal_gpu",
183
+ virtualMachine: "virtual_machine",
184
+ virtualMachineGpu: "virtual_machine_gpu",
185
+ elasticIp: "elastic_ip",
186
+ virtualNetwork: "virtual_network",
187
+ blockStorage: "block_storage",
188
+ });
189
+ });
190
+
191
+ export function userTeamLimitsToJSON(userTeamLimits: UserTeamLimits): string {
192
+ return JSON.stringify(UserTeamLimits$outboundSchema.parse(userTeamLimits));
193
+ }
194
+ export function userTeamLimitsFromJSON(
195
+ jsonString: string,
196
+ ): SafeParseResult<UserTeamLimits, SDKValidationError> {
197
+ return safeParse(
198
+ jsonString,
199
+ (x) => UserTeamLimits$inboundSchema.parse(JSON.parse(x)),
200
+ `Failed to parse 'UserTeamLimits' from JSON`,
201
+ );
202
+ }
203
+
87
204
  /** @internal */
88
205
  export const UserTeamAttributes$inboundSchema: z.ZodType<
89
206
  UserTeamAttributes,
@@ -97,12 +214,20 @@ export const UserTeamAttributes$inboundSchema: z.ZodType<
97
214
  currency: z.string().optional(),
98
215
  created_at: z.string().optional(),
99
216
  updated_at: z.string().optional(),
217
+ status: z.nullable(z.string()).optional(),
218
+ enforce_mfa: z.boolean().optional(),
219
+ users: z.array(UserInclude$inboundSchema).optional(),
220
+ projects: z.array(ProjectInclude$inboundSchema).optional(),
100
221
  owner: UserInclude$inboundSchema.optional(),
101
222
  billing: z.lazy(() => UserTeamBilling$inboundSchema).optional(),
223
+ feature_flags: z.array(z.string()).optional(),
224
+ limits: z.lazy(() => UserTeamLimits$inboundSchema).optional(),
102
225
  }).transform((v) => {
103
226
  return remap$(v, {
104
227
  "created_at": "createdAt",
105
228
  "updated_at": "updatedAt",
229
+ "enforce_mfa": "enforceMfa",
230
+ "feature_flags": "featureFlags",
106
231
  });
107
232
  });
108
233
  /** @internal */
@@ -114,8 +239,14 @@ export type UserTeamAttributes$Outbound = {
114
239
  currency?: string | undefined;
115
240
  created_at?: string | undefined;
116
241
  updated_at?: string | undefined;
242
+ status?: string | null | undefined;
243
+ enforce_mfa?: boolean | undefined;
244
+ users?: Array<UserInclude$Outbound> | undefined;
245
+ projects?: Array<ProjectInclude$Outbound> | undefined;
117
246
  owner?: UserInclude$Outbound | undefined;
118
247
  billing?: UserTeamBilling$Outbound | undefined;
248
+ feature_flags?: Array<string> | undefined;
249
+ limits?: UserTeamLimits$Outbound | undefined;
119
250
  };
120
251
 
121
252
  /** @internal */
@@ -131,12 +262,20 @@ export const UserTeamAttributes$outboundSchema: z.ZodType<
131
262
  currency: z.string().optional(),
132
263
  createdAt: z.string().optional(),
133
264
  updatedAt: z.string().optional(),
265
+ status: z.nullable(z.string()).optional(),
266
+ enforceMfa: z.boolean().optional(),
267
+ users: z.array(UserInclude$outboundSchema).optional(),
268
+ projects: z.array(ProjectInclude$outboundSchema).optional(),
134
269
  owner: UserInclude$outboundSchema.optional(),
135
270
  billing: z.lazy(() => UserTeamBilling$outboundSchema).optional(),
271
+ featureFlags: z.array(z.string()).optional(),
272
+ limits: z.lazy(() => UserTeamLimits$outboundSchema).optional(),
136
273
  }).transform((v) => {
137
274
  return remap$(v, {
138
275
  createdAt: "created_at",
139
276
  updatedAt: "updated_at",
277
+ enforceMfa: "enforce_mfa",
278
+ featureFlags: "feature_flags",
140
279
  });
141
280
  });
142
281
 
@@ -164,11 +303,13 @@ export const UserTeam$inboundSchema: z.ZodType<
164
303
  unknown
165
304
  > = z.object({
166
305
  id: z.string().optional(),
306
+ type: UserTeamType$inboundSchema.optional(),
167
307
  attributes: z.lazy(() => UserTeamAttributes$inboundSchema).optional(),
168
308
  });
169
309
  /** @internal */
170
310
  export type UserTeam$Outbound = {
171
311
  id?: string | undefined;
312
+ type?: string | undefined;
172
313
  attributes?: UserTeamAttributes$Outbound | undefined;
173
314
  };
174
315
 
@@ -179,6 +320,7 @@ export const UserTeam$outboundSchema: z.ZodType<
179
320
  UserTeam
180
321
  > = z.object({
181
322
  id: z.string().optional(),
323
+ type: UserTeamType$outboundSchema.optional(),
182
324
  attributes: z.lazy(() => UserTeamAttributes$outboundSchema).optional(),
183
325
  });
184
326
 
@@ -5,22 +5,40 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
+ import { ClosedEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
11
 
12
+ export const UserUpdateType = {
13
+ Users: "users",
14
+ } as const;
15
+ export type UserUpdateType = ClosedEnum<typeof UserUpdateType>;
16
+
11
17
  export type UserUpdateAttributes = {
12
18
  firstName?: string | undefined;
13
19
  lastName?: string | undefined;
14
20
  email?: string | undefined;
15
21
  authenticationFactorId?: string | null | undefined;
16
- role?: string | undefined;
22
+ role?: string | null | undefined;
23
+ createdAt?: string | undefined;
24
+ updatedAt?: string | undefined;
17
25
  };
18
26
 
19
27
  export type UserUpdate = {
20
28
  id?: string | undefined;
29
+ type?: UserUpdateType | undefined;
21
30
  attributes?: UserUpdateAttributes | undefined;
22
31
  };
23
32
 
33
+ /** @internal */
34
+ export const UserUpdateType$inboundSchema: z.ZodNativeEnum<
35
+ typeof UserUpdateType
36
+ > = z.nativeEnum(UserUpdateType);
37
+ /** @internal */
38
+ export const UserUpdateType$outboundSchema: z.ZodNativeEnum<
39
+ typeof UserUpdateType
40
+ > = UserUpdateType$inboundSchema;
41
+
24
42
  /** @internal */
25
43
  export const UserUpdateAttributes$inboundSchema: z.ZodType<
26
44
  UserUpdateAttributes,
@@ -31,12 +49,16 @@ export const UserUpdateAttributes$inboundSchema: z.ZodType<
31
49
  last_name: z.string().optional(),
32
50
  email: z.string().optional(),
33
51
  authentication_factor_id: z.nullable(z.string()).optional(),
34
- role: z.string().optional(),
52
+ role: z.nullable(z.string()).optional(),
53
+ created_at: z.string().optional(),
54
+ updated_at: z.string().optional(),
35
55
  }).transform((v) => {
36
56
  return remap$(v, {
37
57
  "first_name": "firstName",
38
58
  "last_name": "lastName",
39
59
  "authentication_factor_id": "authenticationFactorId",
60
+ "created_at": "createdAt",
61
+ "updated_at": "updatedAt",
40
62
  });
41
63
  });
42
64
  /** @internal */
@@ -45,7 +67,9 @@ export type UserUpdateAttributes$Outbound = {
45
67
  last_name?: string | undefined;
46
68
  email?: string | undefined;
47
69
  authentication_factor_id?: string | null | undefined;
48
- role?: string | undefined;
70
+ role?: string | null | undefined;
71
+ created_at?: string | undefined;
72
+ updated_at?: string | undefined;
49
73
  };
50
74
 
51
75
  /** @internal */
@@ -58,12 +82,16 @@ export const UserUpdateAttributes$outboundSchema: z.ZodType<
58
82
  lastName: z.string().optional(),
59
83
  email: z.string().optional(),
60
84
  authenticationFactorId: z.nullable(z.string()).optional(),
61
- role: z.string().optional(),
85
+ role: z.nullable(z.string()).optional(),
86
+ createdAt: z.string().optional(),
87
+ updatedAt: z.string().optional(),
62
88
  }).transform((v) => {
63
89
  return remap$(v, {
64
90
  firstName: "first_name",
65
91
  lastName: "last_name",
66
92
  authenticationFactorId: "authentication_factor_id",
93
+ createdAt: "created_at",
94
+ updatedAt: "updated_at",
67
95
  });
68
96
  });
69
97
 
@@ -91,11 +119,13 @@ export const UserUpdate$inboundSchema: z.ZodType<
91
119
  unknown
92
120
  > = z.object({
93
121
  id: z.string().optional(),
122
+ type: UserUpdateType$inboundSchema.optional(),
94
123
  attributes: z.lazy(() => UserUpdateAttributes$inboundSchema).optional(),
95
124
  });
96
125
  /** @internal */
97
126
  export type UserUpdate$Outbound = {
98
127
  id?: string | undefined;
128
+ type?: string | undefined;
99
129
  attributes?: UserUpdateAttributes$Outbound | undefined;
100
130
  };
101
131
 
@@ -106,6 +136,7 @@ export const UserUpdate$outboundSchema: z.ZodType<
106
136
  UserUpdate
107
137
  > = z.object({
108
138
  id: z.string().optional(),
139
+ type: UserUpdateType$outboundSchema.optional(),
109
140
  attributes: z.lazy(() => UserUpdateAttributes$outboundSchema).optional(),
110
141
  });
111
142
 
@@ -98,17 +98,26 @@ export type VirtualMachineAttributesOperatingSystem = {
98
98
  distro?: VirtualMachineAttributesDistro | undefined;
99
99
  };
100
100
 
101
+ export type VirtualMachineAttributesSshKey = {
102
+ id?: string | undefined;
103
+ name?: string | undefined;
104
+ fingerprint?: string | undefined;
105
+ publicKey?: string | undefined;
106
+ createdAt?: string | undefined;
107
+ updatedAt?: string | undefined;
108
+ };
109
+
101
110
  /**
102
111
  * SSH credentials for connecting to the virtual machine. Only available when the VM is running. Opt-in extra field: request via `extra_fields[virtual_machines]=credentials`.
103
112
  */
104
113
  export type VirtualMachineAttributesCredentials = {
105
114
  /**
106
- * The SSH username for the VM, determined by the operating system (e.g., ubuntu, centos, ec2-user). Defaults to ubuntu if not specified by the OS.
115
+ * The SSH username for the VM, determined by the operating system (e.g., ubuntu, centos, ec2-user). Defaults to ubuntu if not specified by the OS. Returns null when the VM is not running.
107
116
  */
108
- username?: string | undefined;
109
- host?: string | undefined;
110
- password?: string | undefined;
111
- sshKeys?: Array<string> | undefined;
117
+ username?: string | null | undefined;
118
+ host?: string | null | undefined;
119
+ password?: string | null | undefined;
120
+ sshKeys?: Array<VirtualMachineAttributesSshKey> | null | undefined;
112
121
  };
113
122
 
114
123
  export type VirtualMachineAttributesPlan = {
@@ -352,16 +361,86 @@ export function virtualMachineAttributesOperatingSystemFromJSON(
352
361
  );
353
362
  }
354
363
 
364
+ /** @internal */
365
+ export const VirtualMachineAttributesSshKey$inboundSchema: z.ZodType<
366
+ VirtualMachineAttributesSshKey,
367
+ z.ZodTypeDef,
368
+ unknown
369
+ > = z.object({
370
+ id: z.string().optional(),
371
+ name: z.string().optional(),
372
+ fingerprint: z.string().optional(),
373
+ public_key: z.string().optional(),
374
+ created_at: z.string().optional(),
375
+ updated_at: z.string().optional(),
376
+ }).transform((v) => {
377
+ return remap$(v, {
378
+ "public_key": "publicKey",
379
+ "created_at": "createdAt",
380
+ "updated_at": "updatedAt",
381
+ });
382
+ });
383
+ /** @internal */
384
+ export type VirtualMachineAttributesSshKey$Outbound = {
385
+ id?: string | undefined;
386
+ name?: string | undefined;
387
+ fingerprint?: string | undefined;
388
+ public_key?: string | undefined;
389
+ created_at?: string | undefined;
390
+ updated_at?: string | undefined;
391
+ };
392
+
393
+ /** @internal */
394
+ export const VirtualMachineAttributesSshKey$outboundSchema: z.ZodType<
395
+ VirtualMachineAttributesSshKey$Outbound,
396
+ z.ZodTypeDef,
397
+ VirtualMachineAttributesSshKey
398
+ > = z.object({
399
+ id: z.string().optional(),
400
+ name: z.string().optional(),
401
+ fingerprint: z.string().optional(),
402
+ publicKey: z.string().optional(),
403
+ createdAt: z.string().optional(),
404
+ updatedAt: z.string().optional(),
405
+ }).transform((v) => {
406
+ return remap$(v, {
407
+ publicKey: "public_key",
408
+ createdAt: "created_at",
409
+ updatedAt: "updated_at",
410
+ });
411
+ });
412
+
413
+ export function virtualMachineAttributesSshKeyToJSON(
414
+ virtualMachineAttributesSshKey: VirtualMachineAttributesSshKey,
415
+ ): string {
416
+ return JSON.stringify(
417
+ VirtualMachineAttributesSshKey$outboundSchema.parse(
418
+ virtualMachineAttributesSshKey,
419
+ ),
420
+ );
421
+ }
422
+ export function virtualMachineAttributesSshKeyFromJSON(
423
+ jsonString: string,
424
+ ): SafeParseResult<VirtualMachineAttributesSshKey, SDKValidationError> {
425
+ return safeParse(
426
+ jsonString,
427
+ (x) => VirtualMachineAttributesSshKey$inboundSchema.parse(JSON.parse(x)),
428
+ `Failed to parse 'VirtualMachineAttributesSshKey' from JSON`,
429
+ );
430
+ }
431
+
355
432
  /** @internal */
356
433
  export const VirtualMachineAttributesCredentials$inboundSchema: z.ZodType<
357
434
  VirtualMachineAttributesCredentials,
358
435
  z.ZodTypeDef,
359
436
  unknown
360
437
  > = z.object({
361
- username: z.string().optional(),
362
- host: z.string().optional(),
363
- password: z.string().optional(),
364
- ssh_keys: z.array(z.string()).optional(),
438
+ username: z.nullable(z.string()).optional(),
439
+ host: z.nullable(z.string()).optional(),
440
+ password: z.nullable(z.string()).optional(),
441
+ ssh_keys: z.nullable(
442
+ z.array(z.lazy(() => VirtualMachineAttributesSshKey$inboundSchema)),
443
+ ).optional(),
365
444
  }).transform((v) => {
366
445
  return remap$(v, {
367
446
  "ssh_keys": "sshKeys",
@@ -369,10 +448,10 @@ export const VirtualMachineAttributesCredentials$inboundSchema: z.ZodType<
369
448
  });
370
449
  /** @internal */
371
450
  export type VirtualMachineAttributesCredentials$Outbound = {
372
- username?: string | undefined;
373
- host?: string | undefined;
374
- password?: string | undefined;
375
- ssh_keys?: Array<string> | undefined;
451
+ username?: string | null | undefined;
452
+ host?: string | null | undefined;
453
+ password?: string | null | undefined;
454
+ ssh_keys?: Array<VirtualMachineAttributesSshKey$Outbound> | null | undefined;
376
455
  };
377
456
 
378
457
  /** @internal */
@@ -381,10 +460,12 @@ export const VirtualMachineAttributesCredentials$outboundSchema: z.ZodType<
381
460
  z.ZodTypeDef,
382
461
  VirtualMachineAttributesCredentials
383
462
  > = z.object({
384
- username: z.string().optional(),
385
- host: z.string().optional(),
386
- password: z.string().optional(),
387
- sshKeys: z.array(z.string()).optional(),
463
+ username: z.nullable(z.string()).optional(),
464
+ host: z.nullable(z.string()).optional(),
465
+ password: z.nullable(z.string()).optional(),
466
+ sshKeys: z.nullable(
467
+ z.array(z.lazy(() => VirtualMachineAttributesSshKey$outboundSchema)),
468
+ ).optional(),
388
469
  }).transform((v) => {
389
470
  return remap$(v, {
390
471
  sshKeys: "ssh_keys",
@@ -37,6 +37,18 @@ export type VolumeDataAttributes = {
37
37
  namespaceId?: string | null | undefined;
38
38
  connectorId?: string | null | undefined;
39
39
  initiators?: Array<Initiator> | null | undefined;
40
+ /**
41
+ * Cephx keyring secret used to connect to the volume. Returned only for dashboard-origin requests; null until the volume is provisioned.
42
+ */
43
+ keyring?: string | null | undefined;
44
+ /**
45
+ * Ceph cluster user used to connect to the volume. Returned only for dashboard-origin requests; null until the volume is provisioned.
46
+ */
47
+ clusterUser?: string | null | undefined;
48
+ /**
49
+ * Path of the volume inside the cluster. Returned only for dashboard-origin requests; null until the volume is provisioned.
50
+ */
51
+ volumePath?: string | null | undefined;
40
52
  project?: ProjectInclude | undefined;
41
53
  team?: TeamInclude | undefined;
42
54
  };
@@ -106,6 +118,9 @@ export const VolumeDataAttributes$inboundSchema: z.ZodType<
106
118
  connector_id: z.nullable(z.string()).optional(),
107
119
  initiators: z.nullable(z.array(z.lazy(() => Initiator$inboundSchema)))
108
120
  .optional(),
121
+ keyring: z.nullable(z.string()).optional(),
122
+ cluster_user: z.nullable(z.string()).optional(),
123
+ volume_path: z.nullable(z.string()).optional(),
109
124
  project: ProjectInclude$inboundSchema.optional(),
110
125
  team: TeamInclude$inboundSchema.optional(),
111
126
  }).transform((v) => {
@@ -114,6 +129,8 @@ export const VolumeDataAttributes$inboundSchema: z.ZodType<
114
129
  "created_at": "createdAt",
115
130
  "namespace_id": "namespaceId",
116
131
  "connector_id": "connectorId",
132
+ "cluster_user": "clusterUser",
133
+ "volume_path": "volumePath",
117
134
  });
118
135
  });
119
136
  /** @internal */
@@ -124,6 +141,9 @@ export type VolumeDataAttributes$Outbound = {
124
141
  namespace_id?: string | null | undefined;
125
142
  connector_id?: string | null | undefined;
126
143
  initiators?: Array<Initiator$Outbound> | null | undefined;
144
+ keyring?: string | null | undefined;
145
+ cluster_user?: string | null | undefined;
146
+ volume_path?: string | null | undefined;
127
147
  project?: ProjectInclude$Outbound | undefined;
128
148
  team?: TeamInclude$Outbound | undefined;
129
149
  };
@@ -141,6 +161,9 @@ export const VolumeDataAttributes$outboundSchema: z.ZodType<
141
161
  connectorId: z.nullable(z.string()).optional(),
142
162
  initiators: z.nullable(z.array(z.lazy(() => Initiator$outboundSchema)))
143
163
  .optional(),
164
+ keyring: z.nullable(z.string()).optional(),
165
+ clusterUser: z.nullable(z.string()).optional(),
166
+ volumePath: z.nullable(z.string()).optional(),
144
167
  project: ProjectInclude$outboundSchema.optional(),
145
168
  team: TeamInclude$outboundSchema.optional(),
146
169
  }).transform((v) => {
@@ -149,6 +172,8 @@ export const VolumeDataAttributes$outboundSchema: z.ZodType<
149
172
  createdAt: "created_at",
150
173
  namespaceId: "namespace_id",
151
174
  connectorId: "connector_id",
175
+ clusterUser: "cluster_user",
176
+ volumePath: "volume_path",
152
177
  });
153
178
  });
154
179
 
package/src/sdk/plans.ts CHANGED
@@ -92,10 +92,12 @@ export class Plans extends ClientSDK {
92
92
  * List storage plans
93
93
  */
94
94
  async listStorage(
95
+ request?: operations.GetStoragePlansRequest | undefined,
95
96
  options?: RequestOptions,
96
97
  ): Promise<models.StoragePlans> {
97
98
  return unwrapAsync(plansListStorage(
98
99
  this,
100
+ request,
99
101
  options,
100
102
  ));
101
103
  }