latitudesh-typescript-sdk 0.8.6 → 0.8.7

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 (259) hide show
  1. package/README.md +12 -1
  2. package/bin/mcp-server.js +1386 -682
  3. package/bin/mcp-server.js.map +31 -16
  4. package/dist/commonjs/funcs/prefixesCreatePrefix.d.ts +18 -0
  5. package/dist/commonjs/funcs/prefixesCreatePrefix.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/prefixesCreatePrefix.js +123 -0
  7. package/dist/commonjs/funcs/prefixesCreatePrefix.js.map +1 -0
  8. package/dist/commonjs/funcs/prefixesDestroyPrefix.d.ts +18 -0
  9. package/dist/commonjs/funcs/prefixesDestroyPrefix.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/prefixesDestroyPrefix.js +127 -0
  11. package/dist/commonjs/funcs/prefixesDestroyPrefix.js.map +1 -0
  12. package/dist/commonjs/funcs/prefixesGetPrefix.d.ts +19 -0
  13. package/dist/commonjs/funcs/prefixesGetPrefix.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/prefixesGetPrefix.js +129 -0
  15. package/dist/commonjs/funcs/prefixesGetPrefix.js.map +1 -0
  16. package/dist/commonjs/funcs/prefixesGetPrefixes.d.ts +19 -0
  17. package/dist/commonjs/funcs/prefixesGetPrefixes.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/prefixesGetPrefixes.js +128 -0
  19. package/dist/commonjs/funcs/prefixesGetPrefixes.js.map +1 -0
  20. package/dist/commonjs/funcs/serversReinstall.js +1 -1
  21. package/dist/commonjs/funcs/serversReinstall.js.map +1 -1
  22. package/dist/commonjs/lib/config.d.ts +3 -3
  23. package/dist/commonjs/lib/config.js +3 -3
  24. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  25. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  26. package/dist/commonjs/mcp-server/server.js +9 -1
  27. package/dist/commonjs/mcp-server/server.js.map +1 -1
  28. package/dist/commonjs/mcp-server/tools/prefixesCreatePrefix.d.ts +8 -0
  29. package/dist/commonjs/mcp-server/tools/prefixesCreatePrefix.d.ts.map +1 -0
  30. package/dist/commonjs/mcp-server/tools/prefixesCreatePrefix.js +64 -0
  31. package/dist/commonjs/mcp-server/tools/prefixesCreatePrefix.js.map +1 -0
  32. package/dist/commonjs/mcp-server/tools/prefixesDestroyPrefix.d.ts +8 -0
  33. package/dist/commonjs/mcp-server/tools/prefixesDestroyPrefix.d.ts.map +1 -0
  34. package/dist/commonjs/mcp-server/tools/prefixesDestroyPrefix.js +63 -0
  35. package/dist/commonjs/mcp-server/tools/prefixesDestroyPrefix.js.map +1 -0
  36. package/dist/commonjs/mcp-server/tools/prefixesGetPrefix.d.ts +8 -0
  37. package/dist/commonjs/mcp-server/tools/prefixesGetPrefix.d.ts.map +1 -0
  38. package/dist/commonjs/mcp-server/tools/prefixesGetPrefix.js +64 -0
  39. package/dist/commonjs/mcp-server/tools/prefixesGetPrefix.js.map +1 -0
  40. package/dist/commonjs/mcp-server/tools/prefixesGetPrefixes.d.ts +8 -0
  41. package/dist/commonjs/mcp-server/tools/prefixesGetPrefixes.d.ts.map +1 -0
  42. package/dist/commonjs/mcp-server/tools/prefixesGetPrefixes.js +64 -0
  43. package/dist/commonjs/mcp-server/tools/prefixesGetPrefixes.js.map +1 -0
  44. package/dist/commonjs/models/createprefix.d.ts +83 -0
  45. package/dist/commonjs/models/createprefix.d.ts.map +1 -0
  46. package/dist/commonjs/models/createprefix.js +124 -0
  47. package/dist/commonjs/models/createprefix.js.map +1 -0
  48. package/dist/commonjs/models/index.d.ts +4 -0
  49. package/dist/commonjs/models/index.d.ts.map +1 -1
  50. package/dist/commonjs/models/index.js +4 -0
  51. package/dist/commonjs/models/index.js.map +1 -1
  52. package/dist/commonjs/models/objectstoragedata.d.ts +24 -10
  53. package/dist/commonjs/models/objectstoragedata.d.ts.map +1 -1
  54. package/dist/commonjs/models/objectstoragedata.js +27 -9
  55. package/dist/commonjs/models/objectstoragedata.js.map +1 -1
  56. package/dist/commonjs/models/operations/createserverreinstall.d.ts +5 -0
  57. package/dist/commonjs/models/operations/createserverreinstall.d.ts.map +1 -1
  58. package/dist/commonjs/models/operations/createserverreinstall.js +4 -0
  59. package/dist/commonjs/models/operations/createserverreinstall.js.map +1 -1
  60. package/dist/commonjs/models/operations/destroyprefix.d.ts +17 -0
  61. package/dist/commonjs/models/operations/destroyprefix.d.ts.map +1 -0
  62. package/dist/commonjs/models/operations/destroyprefix.js +58 -0
  63. package/dist/commonjs/models/operations/destroyprefix.js.map +1 -0
  64. package/dist/commonjs/models/operations/getprefix.d.ts +17 -0
  65. package/dist/commonjs/models/operations/getprefix.d.ts.map +1 -0
  66. package/dist/commonjs/models/operations/getprefix.js +58 -0
  67. package/dist/commonjs/models/operations/getprefix.js.map +1 -0
  68. package/dist/commonjs/models/operations/getprefixes.d.ts +19 -0
  69. package/dist/commonjs/models/operations/getprefixes.d.ts.map +1 -0
  70. package/dist/commonjs/models/operations/getprefixes.js +71 -0
  71. package/dist/commonjs/models/operations/getprefixes.js.map +1 -0
  72. package/dist/commonjs/models/operations/index.d.ts +3 -0
  73. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  74. package/dist/commonjs/models/operations/index.js +3 -0
  75. package/dist/commonjs/models/operations/index.js.map +1 -1
  76. package/dist/commonjs/models/prefix.d.ts +18 -0
  77. package/dist/commonjs/models/prefix.d.ts.map +1 -0
  78. package/dist/commonjs/models/prefix.js +60 -0
  79. package/dist/commonjs/models/prefix.js.map +1 -0
  80. package/dist/commonjs/models/prefixdata.d.ts +143 -0
  81. package/dist/commonjs/models/prefixdata.d.ts.map +1 -0
  82. package/dist/commonjs/models/prefixdata.js +190 -0
  83. package/dist/commonjs/models/prefixdata.js.map +1 -0
  84. package/dist/commonjs/models/prefixes.d.ts +29 -0
  85. package/dist/commonjs/models/prefixes.d.ts.map +1 -0
  86. package/dist/commonjs/models/prefixes.js +73 -0
  87. package/dist/commonjs/models/prefixes.js.map +1 -0
  88. package/dist/commonjs/models/team.d.ts +2 -0
  89. package/dist/commonjs/models/team.d.ts.map +1 -1
  90. package/dist/commonjs/models/team.js +2 -0
  91. package/dist/commonjs/models/team.js.map +1 -1
  92. package/dist/commonjs/models/teaminclude.d.ts +2 -0
  93. package/dist/commonjs/models/teaminclude.d.ts.map +1 -1
  94. package/dist/commonjs/models/teaminclude.js +2 -0
  95. package/dist/commonjs/models/teaminclude.js.map +1 -1
  96. package/dist/commonjs/models/userteam.d.ts +2 -0
  97. package/dist/commonjs/models/userteam.d.ts.map +1 -1
  98. package/dist/commonjs/models/userteam.js +2 -0
  99. package/dist/commonjs/models/userteam.js.map +1 -1
  100. package/dist/commonjs/models/userupdate.d.ts +4 -4
  101. package/dist/commonjs/models/userupdate.d.ts.map +1 -1
  102. package/dist/commonjs/models/userupdate.js +4 -4
  103. package/dist/commonjs/models/userupdate.js.map +1 -1
  104. package/dist/commonjs/models/virtualmachineplans.d.ts +8 -8
  105. package/dist/commonjs/models/virtualmachineplans.d.ts.map +1 -1
  106. package/dist/commonjs/models/virtualmachineplans.js +11 -12
  107. package/dist/commonjs/models/virtualmachineplans.js.map +1 -1
  108. package/dist/commonjs/sdk/prefixes.d.ts +34 -0
  109. package/dist/commonjs/sdk/prefixes.d.ts.map +1 -0
  110. package/dist/commonjs/sdk/prefixes.js +52 -0
  111. package/dist/commonjs/sdk/prefixes.js.map +1 -0
  112. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  113. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  114. package/dist/commonjs/sdk/sdk.js +4 -0
  115. package/dist/commonjs/sdk/sdk.js.map +1 -1
  116. package/dist/esm/funcs/prefixesCreatePrefix.d.ts +18 -0
  117. package/dist/esm/funcs/prefixesCreatePrefix.d.ts.map +1 -0
  118. package/dist/esm/funcs/prefixesCreatePrefix.js +87 -0
  119. package/dist/esm/funcs/prefixesCreatePrefix.js.map +1 -0
  120. package/dist/esm/funcs/prefixesDestroyPrefix.d.ts +18 -0
  121. package/dist/esm/funcs/prefixesDestroyPrefix.d.ts.map +1 -0
  122. package/dist/esm/funcs/prefixesDestroyPrefix.js +91 -0
  123. package/dist/esm/funcs/prefixesDestroyPrefix.js.map +1 -0
  124. package/dist/esm/funcs/prefixesGetPrefix.d.ts +19 -0
  125. package/dist/esm/funcs/prefixesGetPrefix.d.ts.map +1 -0
  126. package/dist/esm/funcs/prefixesGetPrefix.js +93 -0
  127. package/dist/esm/funcs/prefixesGetPrefix.js.map +1 -0
  128. package/dist/esm/funcs/prefixesGetPrefixes.d.ts +19 -0
  129. package/dist/esm/funcs/prefixesGetPrefixes.d.ts.map +1 -0
  130. package/dist/esm/funcs/prefixesGetPrefixes.js +92 -0
  131. package/dist/esm/funcs/prefixesGetPrefixes.js.map +1 -0
  132. package/dist/esm/funcs/serversReinstall.js +1 -1
  133. package/dist/esm/funcs/serversReinstall.js.map +1 -1
  134. package/dist/esm/lib/config.d.ts +3 -3
  135. package/dist/esm/lib/config.js +3 -3
  136. package/dist/esm/mcp-server/mcp-server.js +1 -1
  137. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  138. package/dist/esm/mcp-server/server.js +9 -1
  139. package/dist/esm/mcp-server/server.js.map +1 -1
  140. package/dist/esm/mcp-server/tools/prefixesCreatePrefix.d.ts +8 -0
  141. package/dist/esm/mcp-server/tools/prefixesCreatePrefix.d.ts.map +1 -0
  142. package/dist/esm/mcp-server/tools/prefixesCreatePrefix.js +28 -0
  143. package/dist/esm/mcp-server/tools/prefixesCreatePrefix.js.map +1 -0
  144. package/dist/esm/mcp-server/tools/prefixesDestroyPrefix.d.ts +8 -0
  145. package/dist/esm/mcp-server/tools/prefixesDestroyPrefix.d.ts.map +1 -0
  146. package/dist/esm/mcp-server/tools/prefixesDestroyPrefix.js +27 -0
  147. package/dist/esm/mcp-server/tools/prefixesDestroyPrefix.js.map +1 -0
  148. package/dist/esm/mcp-server/tools/prefixesGetPrefix.d.ts +8 -0
  149. package/dist/esm/mcp-server/tools/prefixesGetPrefix.d.ts.map +1 -0
  150. package/dist/esm/mcp-server/tools/prefixesGetPrefix.js +28 -0
  151. package/dist/esm/mcp-server/tools/prefixesGetPrefix.js.map +1 -0
  152. package/dist/esm/mcp-server/tools/prefixesGetPrefixes.d.ts +8 -0
  153. package/dist/esm/mcp-server/tools/prefixesGetPrefixes.d.ts.map +1 -0
  154. package/dist/esm/mcp-server/tools/prefixesGetPrefixes.js +28 -0
  155. package/dist/esm/mcp-server/tools/prefixesGetPrefixes.js.map +1 -0
  156. package/dist/esm/models/createprefix.d.ts +83 -0
  157. package/dist/esm/models/createprefix.d.ts.map +1 -0
  158. package/dist/esm/models/createprefix.js +82 -0
  159. package/dist/esm/models/createprefix.js.map +1 -0
  160. package/dist/esm/models/index.d.ts +4 -0
  161. package/dist/esm/models/index.d.ts.map +1 -1
  162. package/dist/esm/models/index.js +4 -0
  163. package/dist/esm/models/index.js.map +1 -1
  164. package/dist/esm/models/objectstoragedata.d.ts +24 -10
  165. package/dist/esm/models/objectstoragedata.d.ts.map +1 -1
  166. package/dist/esm/models/objectstoragedata.js +24 -8
  167. package/dist/esm/models/objectstoragedata.js.map +1 -1
  168. package/dist/esm/models/operations/createserverreinstall.d.ts +5 -0
  169. package/dist/esm/models/operations/createserverreinstall.d.ts.map +1 -1
  170. package/dist/esm/models/operations/createserverreinstall.js +4 -0
  171. package/dist/esm/models/operations/createserverreinstall.js.map +1 -1
  172. package/dist/esm/models/operations/destroyprefix.d.ts +17 -0
  173. package/dist/esm/models/operations/destroyprefix.d.ts.map +1 -0
  174. package/dist/esm/models/operations/destroyprefix.js +20 -0
  175. package/dist/esm/models/operations/destroyprefix.js.map +1 -0
  176. package/dist/esm/models/operations/getprefix.d.ts +17 -0
  177. package/dist/esm/models/operations/getprefix.d.ts.map +1 -0
  178. package/dist/esm/models/operations/getprefix.js +20 -0
  179. package/dist/esm/models/operations/getprefix.js.map +1 -0
  180. package/dist/esm/models/operations/getprefixes.d.ts +19 -0
  181. package/dist/esm/models/operations/getprefixes.d.ts.map +1 -0
  182. package/dist/esm/models/operations/getprefixes.js +33 -0
  183. package/dist/esm/models/operations/getprefixes.js.map +1 -0
  184. package/dist/esm/models/operations/index.d.ts +3 -0
  185. package/dist/esm/models/operations/index.d.ts.map +1 -1
  186. package/dist/esm/models/operations/index.js +3 -0
  187. package/dist/esm/models/operations/index.js.map +1 -1
  188. package/dist/esm/models/prefix.d.ts +18 -0
  189. package/dist/esm/models/prefix.d.ts.map +1 -0
  190. package/dist/esm/models/prefix.js +22 -0
  191. package/dist/esm/models/prefix.js.map +1 -0
  192. package/dist/esm/models/prefixdata.d.ts +143 -0
  193. package/dist/esm/models/prefixdata.d.ts.map +1 -0
  194. package/dist/esm/models/prefixdata.js +144 -0
  195. package/dist/esm/models/prefixdata.js.map +1 -0
  196. package/dist/esm/models/prefixes.d.ts +29 -0
  197. package/dist/esm/models/prefixes.d.ts.map +1 -0
  198. package/dist/esm/models/prefixes.js +33 -0
  199. package/dist/esm/models/prefixes.js.map +1 -0
  200. package/dist/esm/models/team.d.ts +2 -0
  201. package/dist/esm/models/team.d.ts.map +1 -1
  202. package/dist/esm/models/team.js +2 -0
  203. package/dist/esm/models/team.js.map +1 -1
  204. package/dist/esm/models/teaminclude.d.ts +2 -0
  205. package/dist/esm/models/teaminclude.d.ts.map +1 -1
  206. package/dist/esm/models/teaminclude.js +2 -0
  207. package/dist/esm/models/teaminclude.js.map +1 -1
  208. package/dist/esm/models/userteam.d.ts +2 -0
  209. package/dist/esm/models/userteam.d.ts.map +1 -1
  210. package/dist/esm/models/userteam.js +2 -0
  211. package/dist/esm/models/userteam.js.map +1 -1
  212. package/dist/esm/models/userupdate.d.ts +4 -4
  213. package/dist/esm/models/userupdate.d.ts.map +1 -1
  214. package/dist/esm/models/userupdate.js +4 -4
  215. package/dist/esm/models/userupdate.js.map +1 -1
  216. package/dist/esm/models/virtualmachineplans.d.ts +8 -8
  217. package/dist/esm/models/virtualmachineplans.d.ts.map +1 -1
  218. package/dist/esm/models/virtualmachineplans.js +8 -9
  219. package/dist/esm/models/virtualmachineplans.js.map +1 -1
  220. package/dist/esm/sdk/prefixes.d.ts +34 -0
  221. package/dist/esm/sdk/prefixes.d.ts.map +1 -0
  222. package/dist/esm/sdk/prefixes.js +48 -0
  223. package/dist/esm/sdk/prefixes.js.map +1 -0
  224. package/dist/esm/sdk/sdk.d.ts +3 -0
  225. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  226. package/dist/esm/sdk/sdk.js +4 -0
  227. package/dist/esm/sdk/sdk.js.map +1 -1
  228. package/jsr.json +1 -1
  229. package/package.json +1 -1
  230. package/src/funcs/prefixesCreatePrefix.ts +175 -0
  231. package/src/funcs/prefixesDestroyPrefix.ts +179 -0
  232. package/src/funcs/prefixesGetPrefix.ts +181 -0
  233. package/src/funcs/prefixesGetPrefixes.ts +182 -0
  234. package/src/funcs/serversReinstall.ts +1 -1
  235. package/src/lib/config.ts +3 -3
  236. package/src/mcp-server/mcp-server.ts +1 -1
  237. package/src/mcp-server/server.ts +9 -1
  238. package/src/mcp-server/tools/prefixesCreatePrefix.ts +37 -0
  239. package/src/mcp-server/tools/prefixesDestroyPrefix.ts +35 -0
  240. package/src/mcp-server/tools/prefixesGetPrefix.ts +37 -0
  241. package/src/mcp-server/tools/prefixesGetPrefixes.ts +37 -0
  242. package/src/models/createprefix.ts +200 -0
  243. package/src/models/index.ts +4 -0
  244. package/src/models/objectstoragedata.ts +70 -18
  245. package/src/models/operations/createserverreinstall.ts +9 -0
  246. package/src/models/operations/destroyprefix.ts +51 -0
  247. package/src/models/operations/getprefix.ts +51 -0
  248. package/src/models/operations/getprefixes.ts +66 -0
  249. package/src/models/operations/index.ts +3 -0
  250. package/src/models/prefix.ts +50 -0
  251. package/src/models/prefixdata.ts +354 -0
  252. package/src/models/prefixes.ts +88 -0
  253. package/src/models/team.ts +4 -0
  254. package/src/models/teaminclude.ts +4 -0
  255. package/src/models/userteam.ts +4 -0
  256. package/src/models/userupdate.ts +8 -8
  257. package/src/models/virtualmachineplans.ts +32 -22
  258. package/src/sdk/prefixes.ts +82 -0
  259. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { prefixesGetPrefix } from "../../funcs/prefixesGetPrefix.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.GetPrefixRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$prefixesGetPrefix: ToolDefinition<typeof args> = {
14
+ name: "prefixes-get-prefix",
15
+ description: `Retrieve a network
16
+
17
+ Retrieve a customer network`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await prefixesGetPrefix(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { prefixesGetPrefixes } from "../../funcs/prefixesGetPrefixes.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.GetPrefixesRequest$inboundSchema.optional(),
11
+ };
12
+
13
+ export const tool$prefixesGetPrefixes: ToolDefinition<typeof args> = {
14
+ name: "prefixes-get-prefixes",
15
+ description: `List networks
16
+
17
+ List the customer networks owned by the team`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await prefixesGetPrefixes(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -0,0 +1,200 @@
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 CreatePrefixType = {
13
+ Prefixes: "prefixes",
14
+ } as const;
15
+ export type CreatePrefixType = ClosedEnum<typeof CreatePrefixType>;
16
+
17
+ /**
18
+ * IPv4 prefix length. Determines how many servers the network can host.
19
+ */
20
+ export const CreatePrefixSize = {
21
+ TwentySix: 26,
22
+ TwentySeven: 27,
23
+ TwentyEight: 28,
24
+ } as const;
25
+ /**
26
+ * IPv4 prefix length. Determines how many servers the network can host.
27
+ */
28
+ export type CreatePrefixSize = ClosedEnum<typeof CreatePrefixSize>;
29
+
30
+ export type CreatePrefixAttributes = {
31
+ /**
32
+ * The project to create the network in
33
+ */
34
+ projectId: string;
35
+ /**
36
+ * The site slug the network is bound to
37
+ */
38
+ site: string;
39
+ /**
40
+ * IPv4 prefix length. Determines how many servers the network can host.
41
+ */
42
+ size: CreatePrefixSize;
43
+ };
44
+
45
+ export type CreatePrefixData = {
46
+ type: CreatePrefixType;
47
+ attributes?: CreatePrefixAttributes | undefined;
48
+ };
49
+
50
+ export type CreatePrefix = {
51
+ data: CreatePrefixData;
52
+ };
53
+
54
+ /** @internal */
55
+ export const CreatePrefixType$inboundSchema: z.ZodNativeEnum<
56
+ typeof CreatePrefixType
57
+ > = z.nativeEnum(CreatePrefixType);
58
+ /** @internal */
59
+ export const CreatePrefixType$outboundSchema: z.ZodNativeEnum<
60
+ typeof CreatePrefixType
61
+ > = CreatePrefixType$inboundSchema;
62
+
63
+ /** @internal */
64
+ export const CreatePrefixSize$inboundSchema: z.ZodNativeEnum<
65
+ typeof CreatePrefixSize
66
+ > = z.nativeEnum(CreatePrefixSize);
67
+ /** @internal */
68
+ export const CreatePrefixSize$outboundSchema: z.ZodNativeEnum<
69
+ typeof CreatePrefixSize
70
+ > = CreatePrefixSize$inboundSchema;
71
+
72
+ /** @internal */
73
+ export const CreatePrefixAttributes$inboundSchema: z.ZodType<
74
+ CreatePrefixAttributes,
75
+ z.ZodTypeDef,
76
+ unknown
77
+ > = z.object({
78
+ project_id: z.string(),
79
+ site: z.string(),
80
+ size: CreatePrefixSize$inboundSchema,
81
+ }).transform((v) => {
82
+ return remap$(v, {
83
+ "project_id": "projectId",
84
+ });
85
+ });
86
+ /** @internal */
87
+ export type CreatePrefixAttributes$Outbound = {
88
+ project_id: string;
89
+ site: string;
90
+ size: number;
91
+ };
92
+
93
+ /** @internal */
94
+ export const CreatePrefixAttributes$outboundSchema: z.ZodType<
95
+ CreatePrefixAttributes$Outbound,
96
+ z.ZodTypeDef,
97
+ CreatePrefixAttributes
98
+ > = z.object({
99
+ projectId: z.string(),
100
+ site: z.string(),
101
+ size: CreatePrefixSize$outboundSchema,
102
+ }).transform((v) => {
103
+ return remap$(v, {
104
+ projectId: "project_id",
105
+ });
106
+ });
107
+
108
+ export function createPrefixAttributesToJSON(
109
+ createPrefixAttributes: CreatePrefixAttributes,
110
+ ): string {
111
+ return JSON.stringify(
112
+ CreatePrefixAttributes$outboundSchema.parse(createPrefixAttributes),
113
+ );
114
+ }
115
+ export function createPrefixAttributesFromJSON(
116
+ jsonString: string,
117
+ ): SafeParseResult<CreatePrefixAttributes, SDKValidationError> {
118
+ return safeParse(
119
+ jsonString,
120
+ (x) => CreatePrefixAttributes$inboundSchema.parse(JSON.parse(x)),
121
+ `Failed to parse 'CreatePrefixAttributes' from JSON`,
122
+ );
123
+ }
124
+
125
+ /** @internal */
126
+ export const CreatePrefixData$inboundSchema: z.ZodType<
127
+ CreatePrefixData,
128
+ z.ZodTypeDef,
129
+ unknown
130
+ > = z.object({
131
+ type: CreatePrefixType$inboundSchema,
132
+ attributes: z.lazy(() => CreatePrefixAttributes$inboundSchema).optional(),
133
+ });
134
+ /** @internal */
135
+ export type CreatePrefixData$Outbound = {
136
+ type: string;
137
+ attributes?: CreatePrefixAttributes$Outbound | undefined;
138
+ };
139
+
140
+ /** @internal */
141
+ export const CreatePrefixData$outboundSchema: z.ZodType<
142
+ CreatePrefixData$Outbound,
143
+ z.ZodTypeDef,
144
+ CreatePrefixData
145
+ > = z.object({
146
+ type: CreatePrefixType$outboundSchema,
147
+ attributes: z.lazy(() => CreatePrefixAttributes$outboundSchema).optional(),
148
+ });
149
+
150
+ export function createPrefixDataToJSON(
151
+ createPrefixData: CreatePrefixData,
152
+ ): string {
153
+ return JSON.stringify(
154
+ CreatePrefixData$outboundSchema.parse(createPrefixData),
155
+ );
156
+ }
157
+ export function createPrefixDataFromJSON(
158
+ jsonString: string,
159
+ ): SafeParseResult<CreatePrefixData, SDKValidationError> {
160
+ return safeParse(
161
+ jsonString,
162
+ (x) => CreatePrefixData$inboundSchema.parse(JSON.parse(x)),
163
+ `Failed to parse 'CreatePrefixData' from JSON`,
164
+ );
165
+ }
166
+
167
+ /** @internal */
168
+ export const CreatePrefix$inboundSchema: z.ZodType<
169
+ CreatePrefix,
170
+ z.ZodTypeDef,
171
+ unknown
172
+ > = z.object({
173
+ data: z.lazy(() => CreatePrefixData$inboundSchema),
174
+ });
175
+ /** @internal */
176
+ export type CreatePrefix$Outbound = {
177
+ data: CreatePrefixData$Outbound;
178
+ };
179
+
180
+ /** @internal */
181
+ export const CreatePrefix$outboundSchema: z.ZodType<
182
+ CreatePrefix$Outbound,
183
+ z.ZodTypeDef,
184
+ CreatePrefix
185
+ > = z.object({
186
+ data: z.lazy(() => CreatePrefixData$outboundSchema),
187
+ });
188
+
189
+ export function createPrefixToJSON(createPrefix: CreatePrefix): string {
190
+ return JSON.stringify(CreatePrefix$outboundSchema.parse(createPrefix));
191
+ }
192
+ export function createPrefixFromJSON(
193
+ jsonString: string,
194
+ ): SafeParseResult<CreatePrefix, SDKValidationError> {
195
+ return safeParse(
196
+ jsonString,
197
+ (x) => CreatePrefix$inboundSchema.parse(JSON.parse(x)),
198
+ `Failed to parse 'CreatePrefix' from JSON`,
199
+ );
200
+ }
@@ -19,6 +19,7 @@ export * from "./createapikey.js";
19
19
  export * from "./createbgpsession.js";
20
20
  export * from "./createelasticip.js";
21
21
  export * from "./createkubernetescluster.js";
22
+ export * from "./createprefix.js";
22
23
  export * from "./customtag.js";
23
24
  export * from "./customtagdata.js";
24
25
  export * from "./customtags.js";
@@ -60,6 +61,9 @@ export * from "./outofbandconnection.js";
60
61
  export * from "./paginationmeta.js";
61
62
  export * from "./plan.js";
62
63
  export * from "./plandata.js";
64
+ export * from "./prefix.js";
65
+ export * from "./prefixdata.js";
66
+ export * from "./prefixes.js";
63
67
  export * from "./project.js";
64
68
  export * from "./projectinclude.js";
65
69
  export * from "./projects.js";
@@ -69,6 +69,16 @@ export type ObjectStorageDataRegion = {
69
69
  country?: string | null | undefined;
70
70
  };
71
71
 
72
+ /**
73
+ * S3 access credentials. Only included when `extra_fields[object_storages]=credentials` is requested and the requesting user is the bucket's creator.
74
+ */
75
+ export type ObjectStorageDataCredentials = {
76
+ /**
77
+ * S3 access key for authentication
78
+ */
79
+ accessKey?: string | undefined;
80
+ };
81
+
72
82
  export type ObjectStorageDataAttributes = {
73
83
  /**
74
84
  * Display name of the object storage
@@ -94,14 +104,6 @@ export type ObjectStorageDataAttributes = {
94
104
  * S3-compatible endpoint URL for accessing the bucket
95
105
  */
96
106
  endpoint?: string | undefined;
97
- /**
98
- * S3 access key for authentication
99
- */
100
- accessKey?: string | null | undefined;
101
- /**
102
- * S3 secret key for authentication
103
- */
104
- secretKey?: string | null | undefined;
105
107
  /**
106
108
  * Whether bucket versioning is enabled
107
109
  */
@@ -126,6 +128,10 @@ export type ObjectStorageDataAttributes = {
126
128
  * Region information where the object storage is located
127
129
  */
128
130
  region?: ObjectStorageDataRegion | null | undefined;
131
+ /**
132
+ * S3 access credentials. Only included when `extra_fields[object_storages]=credentials` is requested and the requesting user is the bucket's creator.
133
+ */
134
+ credentials?: ObjectStorageDataCredentials | null | undefined;
129
135
  project?: ProjectInclude | undefined;
130
136
  team?: TeamInclude | undefined;
131
137
  };
@@ -209,6 +215,55 @@ export function objectStorageDataRegionFromJSON(
209
215
  );
210
216
  }
211
217
 
218
+ /** @internal */
219
+ export const ObjectStorageDataCredentials$inboundSchema: z.ZodType<
220
+ ObjectStorageDataCredentials,
221
+ z.ZodTypeDef,
222
+ unknown
223
+ > = z.object({
224
+ access_key: z.string().optional(),
225
+ }).transform((v) => {
226
+ return remap$(v, {
227
+ "access_key": "accessKey",
228
+ });
229
+ });
230
+ /** @internal */
231
+ export type ObjectStorageDataCredentials$Outbound = {
232
+ access_key?: string | undefined;
233
+ };
234
+
235
+ /** @internal */
236
+ export const ObjectStorageDataCredentials$outboundSchema: z.ZodType<
237
+ ObjectStorageDataCredentials$Outbound,
238
+ z.ZodTypeDef,
239
+ ObjectStorageDataCredentials
240
+ > = z.object({
241
+ accessKey: z.string().optional(),
242
+ }).transform((v) => {
243
+ return remap$(v, {
244
+ accessKey: "access_key",
245
+ });
246
+ });
247
+
248
+ export function objectStorageDataCredentialsToJSON(
249
+ objectStorageDataCredentials: ObjectStorageDataCredentials,
250
+ ): string {
251
+ return JSON.stringify(
252
+ ObjectStorageDataCredentials$outboundSchema.parse(
253
+ objectStorageDataCredentials,
254
+ ),
255
+ );
256
+ }
257
+ export function objectStorageDataCredentialsFromJSON(
258
+ jsonString: string,
259
+ ): SafeParseResult<ObjectStorageDataCredentials, SDKValidationError> {
260
+ return safeParse(
261
+ jsonString,
262
+ (x) => ObjectStorageDataCredentials$inboundSchema.parse(JSON.parse(x)),
263
+ `Failed to parse 'ObjectStorageDataCredentials' from JSON`,
264
+ );
265
+ }
266
+
212
267
  /** @internal */
213
268
  export const ObjectStorageDataAttributes$inboundSchema: z.ZodType<
214
269
  ObjectStorageDataAttributes,
@@ -223,8 +278,6 @@ export const ObjectStorageDataAttributes$inboundSchema: z.ZodType<
223
278
  ).optional(),
224
279
  bucket_name: z.string().optional(),
225
280
  endpoint: z.string().optional(),
226
- access_key: z.nullable(z.string()).optional(),
227
- secret_key: z.nullable(z.string()).optional(),
228
281
  versioning: z.nullable(z.boolean()).optional(),
229
282
  locking: z.nullable(z.boolean()).optional(),
230
283
  retention_mode: z.nullable(RetentionMode$inboundSchema).optional(),
@@ -232,6 +285,9 @@ export const ObjectStorageDataAttributes$inboundSchema: z.ZodType<
232
285
  source: z.string().optional(),
233
286
  region: z.nullable(z.lazy(() => ObjectStorageDataRegion$inboundSchema))
234
287
  .optional(),
288
+ credentials: z.nullable(
289
+ z.lazy(() => ObjectStorageDataCredentials$inboundSchema),
290
+ ).optional(),
235
291
  project: ProjectInclude$inboundSchema.optional(),
236
292
  team: TeamInclude$inboundSchema.optional(),
237
293
  }).transform((v) => {
@@ -240,8 +296,6 @@ export const ObjectStorageDataAttributes$inboundSchema: z.ZodType<
240
296
  "storage_class": "storageClass",
241
297
  "created_at": "createdAt",
242
298
  "bucket_name": "bucketName",
243
- "access_key": "accessKey",
244
- "secret_key": "secretKey",
245
299
  "retention_mode": "retentionMode",
246
300
  "retention_period": "retentionPeriod",
247
301
  });
@@ -254,14 +308,13 @@ export type ObjectStorageDataAttributes$Outbound = {
254
308
  created_at?: string | null | undefined;
255
309
  bucket_name?: string | undefined;
256
310
  endpoint?: string | undefined;
257
- access_key?: string | null | undefined;
258
- secret_key?: string | null | undefined;
259
311
  versioning?: boolean | null | undefined;
260
312
  locking?: boolean | null | undefined;
261
313
  retention_mode?: string | null | undefined;
262
314
  retention_period?: number | null | undefined;
263
315
  source?: string | undefined;
264
316
  region?: ObjectStorageDataRegion$Outbound | null | undefined;
317
+ credentials?: ObjectStorageDataCredentials$Outbound | null | undefined;
265
318
  project?: ProjectInclude$Outbound | undefined;
266
319
  team?: TeamInclude$Outbound | undefined;
267
320
  };
@@ -278,8 +331,6 @@ export const ObjectStorageDataAttributes$outboundSchema: z.ZodType<
278
331
  createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
279
332
  bucketName: z.string().optional(),
280
333
  endpoint: z.string().optional(),
281
- accessKey: z.nullable(z.string()).optional(),
282
- secretKey: z.nullable(z.string()).optional(),
283
334
  versioning: z.nullable(z.boolean()).optional(),
284
335
  locking: z.nullable(z.boolean()).optional(),
285
336
  retentionMode: z.nullable(RetentionMode$outboundSchema).optional(),
@@ -287,6 +338,9 @@ export const ObjectStorageDataAttributes$outboundSchema: z.ZodType<
287
338
  source: z.string().optional(),
288
339
  region: z.nullable(z.lazy(() => ObjectStorageDataRegion$outboundSchema))
289
340
  .optional(),
341
+ credentials: z.nullable(
342
+ z.lazy(() => ObjectStorageDataCredentials$outboundSchema),
343
+ ).optional(),
290
344
  project: ProjectInclude$outboundSchema.optional(),
291
345
  team: TeamInclude$outboundSchema.optional(),
292
346
  }).transform((v) => {
@@ -295,8 +349,6 @@ export const ObjectStorageDataAttributes$outboundSchema: z.ZodType<
295
349
  storageClass: "storage_class",
296
350
  createdAt: "created_at",
297
351
  bucketName: "bucket_name",
298
- accessKey: "access_key",
299
- secretKey: "secret_key",
300
352
  retentionMode: "retention_mode",
301
353
  retentionPeriod: "retention_period",
302
354
  });
@@ -120,6 +120,10 @@ export type CreateServerReinstallAttributes2 = {
120
120
  * Keep network boot enabled so the server iPXE-boots on every reboot instead of booting from disk. Only supported with the 'ipxe' operating system.
121
121
  */
122
122
  persistentNetboot?: boolean | undefined;
123
+ /**
124
+ * ID of a customer prefix to bond this server to during the reinstall. The prefix must belong to the same project and be in the same location as the server, and must have at least one free IP address. Applies to this reinstall only; omit it to leave any existing bond unchanged.
125
+ */
126
+ prefixId?: string | null | undefined;
123
127
  };
124
128
 
125
129
  export type CreateServerReinstallData2 = {
@@ -275,6 +279,7 @@ export const CreateServerReinstallAttributes2$inboundSchema: z.ZodType<
275
279
  ).optional(),
276
280
  ipxe: z.nullable(z.string()).optional(),
277
281
  persistent_netboot: z.boolean().optional(),
282
+ prefix_id: z.nullable(z.string()).optional(),
278
283
  }).transform((v) => {
279
284
  return remap$(v, {
280
285
  "operating_system": "operatingSystem",
@@ -282,6 +287,7 @@ export const CreateServerReinstallAttributes2$inboundSchema: z.ZodType<
282
287
  "user_data": "userData",
283
288
  "disk_layout": "diskLayout",
284
289
  "persistent_netboot": "persistentNetboot",
290
+ "prefix_id": "prefixId",
285
291
  });
286
292
  });
287
293
  /** @internal */
@@ -297,6 +303,7 @@ export type CreateServerReinstallAttributes2$Outbound = {
297
303
  | undefined;
298
304
  ipxe?: string | null | undefined;
299
305
  persistent_netboot?: boolean | undefined;
306
+ prefix_id?: string | null | undefined;
300
307
  };
301
308
 
302
309
  /** @internal */
@@ -316,6 +323,7 @@ export const CreateServerReinstallAttributes2$outboundSchema: z.ZodType<
316
323
  ).optional(),
317
324
  ipxe: z.nullable(z.string()).optional(),
318
325
  persistentNetboot: z.boolean().optional(),
326
+ prefixId: z.nullable(z.string()).optional(),
319
327
  }).transform((v) => {
320
328
  return remap$(v, {
321
329
  operatingSystem: "operating_system",
@@ -323,6 +331,7 @@ export const CreateServerReinstallAttributes2$outboundSchema: z.ZodType<
323
331
  userData: "user_data",
324
332
  diskLayout: "disk_layout",
325
333
  persistentNetboot: "persistent_netboot",
334
+ prefixId: "prefix_id",
326
335
  });
327
336
  });
328
337
 
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type DestroyPrefixRequest = {
11
+ id: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export const DestroyPrefixRequest$inboundSchema: z.ZodType<
16
+ DestroyPrefixRequest,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ id: z.string(),
21
+ });
22
+ /** @internal */
23
+ export type DestroyPrefixRequest$Outbound = {
24
+ id: string;
25
+ };
26
+
27
+ /** @internal */
28
+ export const DestroyPrefixRequest$outboundSchema: z.ZodType<
29
+ DestroyPrefixRequest$Outbound,
30
+ z.ZodTypeDef,
31
+ DestroyPrefixRequest
32
+ > = z.object({
33
+ id: z.string(),
34
+ });
35
+
36
+ export function destroyPrefixRequestToJSON(
37
+ destroyPrefixRequest: DestroyPrefixRequest,
38
+ ): string {
39
+ return JSON.stringify(
40
+ DestroyPrefixRequest$outboundSchema.parse(destroyPrefixRequest),
41
+ );
42
+ }
43
+ export function destroyPrefixRequestFromJSON(
44
+ jsonString: string,
45
+ ): SafeParseResult<DestroyPrefixRequest, SDKValidationError> {
46
+ return safeParse(
47
+ jsonString,
48
+ (x) => DestroyPrefixRequest$inboundSchema.parse(JSON.parse(x)),
49
+ `Failed to parse 'DestroyPrefixRequest' from JSON`,
50
+ );
51
+ }
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type GetPrefixRequest = {
11
+ id: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export const GetPrefixRequest$inboundSchema: z.ZodType<
16
+ GetPrefixRequest,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ id: z.string(),
21
+ });
22
+ /** @internal */
23
+ export type GetPrefixRequest$Outbound = {
24
+ id: string;
25
+ };
26
+
27
+ /** @internal */
28
+ export const GetPrefixRequest$outboundSchema: z.ZodType<
29
+ GetPrefixRequest$Outbound,
30
+ z.ZodTypeDef,
31
+ GetPrefixRequest
32
+ > = z.object({
33
+ id: z.string(),
34
+ });
35
+
36
+ export function getPrefixRequestToJSON(
37
+ getPrefixRequest: GetPrefixRequest,
38
+ ): string {
39
+ return JSON.stringify(
40
+ GetPrefixRequest$outboundSchema.parse(getPrefixRequest),
41
+ );
42
+ }
43
+ export function getPrefixRequestFromJSON(
44
+ jsonString: string,
45
+ ): SafeParseResult<GetPrefixRequest, SDKValidationError> {
46
+ return safeParse(
47
+ jsonString,
48
+ (x) => GetPrefixRequest$inboundSchema.parse(JSON.parse(x)),
49
+ `Failed to parse 'GetPrefixRequest' from JSON`,
50
+ );
51
+ }
@@ -0,0 +1,66 @@
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
+
11
+ export type GetPrefixesRequest = {
12
+ filterProject?: string | undefined;
13
+ filterSite?: string | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export const GetPrefixesRequest$inboundSchema: z.ZodType<
18
+ GetPrefixesRequest,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ "filter[project]": z.string().optional(),
23
+ "filter[site]": z.string().optional(),
24
+ }).transform((v) => {
25
+ return remap$(v, {
26
+ "filter[project]": "filterProject",
27
+ "filter[site]": "filterSite",
28
+ });
29
+ });
30
+ /** @internal */
31
+ export type GetPrefixesRequest$Outbound = {
32
+ "filter[project]"?: string | undefined;
33
+ "filter[site]"?: string | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const GetPrefixesRequest$outboundSchema: z.ZodType<
38
+ GetPrefixesRequest$Outbound,
39
+ z.ZodTypeDef,
40
+ GetPrefixesRequest
41
+ > = z.object({
42
+ filterProject: z.string().optional(),
43
+ filterSite: z.string().optional(),
44
+ }).transform((v) => {
45
+ return remap$(v, {
46
+ filterProject: "filter[project]",
47
+ filterSite: "filter[site]",
48
+ });
49
+ });
50
+
51
+ export function getPrefixesRequestToJSON(
52
+ getPrefixesRequest: GetPrefixesRequest,
53
+ ): string {
54
+ return JSON.stringify(
55
+ GetPrefixesRequest$outboundSchema.parse(getPrefixesRequest),
56
+ );
57
+ }
58
+ export function getPrefixesRequestFromJSON(
59
+ jsonString: string,
60
+ ): SafeParseResult<GetPrefixesRequest, SDKValidationError> {
61
+ return safeParse(
62
+ jsonString,
63
+ (x) => GetPrefixesRequest$inboundSchema.parse(JSON.parse(x)),
64
+ `Failed to parse 'GetPrefixesRequest' from JSON`,
65
+ );
66
+ }
@@ -38,6 +38,7 @@ export * from "./deletevirtualmachinebackup.js";
38
38
  export * from "./deletevirtualnetworksassignments.js";
39
39
  export * from "./deletevpnsession.js";
40
40
  export * from "./destroybaseline.js";
41
+ export * from "./destroyprefix.js";
41
42
  export * from "./destroyserver.js";
42
43
  export * from "./destroytag.js";
43
44
  export * from "./destroyteammember.js";
@@ -60,6 +61,8 @@ export * from "./getkubernetesclusterkubeconfig.js";
60
61
  export * from "./getplan.js";
61
62
  export * from "./getplans.js";
62
63
  export * from "./getplansoperatingsystem.js";
64
+ export * from "./getprefix.js";
65
+ export * from "./getprefixes.js";
63
66
  export * from "./getprojects.js";
64
67
  export * from "./getprojectsshkey.js";
65
68
  export * from "./getprojectsshkeys.js";