latitudesh-typescript-sdk 0.8.2 → 0.8.3

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 (115) hide show
  1. package/bin/mcp-server.js +709 -500
  2. package/bin/mcp-server.js.map +16 -15
  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 +2 -2
  8. package/dist/commonjs/lib/config.js +2 -2
  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/operations/getstorageplans.d.ts +25 -0
  16. package/dist/commonjs/models/operations/getstorageplans.d.ts.map +1 -0
  17. package/dist/commonjs/models/operations/getstorageplans.js +71 -0
  18. package/dist/commonjs/models/operations/getstorageplans.js.map +1 -0
  19. package/dist/commonjs/models/operations/index.d.ts +1 -0
  20. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  21. package/dist/commonjs/models/operations/index.js +1 -0
  22. package/dist/commonjs/models/operations/index.js.map +1 -1
  23. package/dist/commonjs/models/operations/updateproject.d.ts +4 -4
  24. package/dist/commonjs/models/operations/updateproject.d.ts.map +1 -1
  25. package/dist/commonjs/models/operations/updateproject.js +8 -8
  26. package/dist/commonjs/models/operations/updateproject.js.map +1 -1
  27. package/dist/commonjs/models/outofbandconnection.d.ts +8 -8
  28. package/dist/commonjs/models/outofbandconnection.d.ts.map +1 -1
  29. package/dist/commonjs/models/outofbandconnection.js +11 -12
  30. package/dist/commonjs/models/outofbandconnection.js.map +1 -1
  31. package/dist/commonjs/models/storageplandata.d.ts +70 -5
  32. package/dist/commonjs/models/storageplandata.d.ts.map +1 -1
  33. package/dist/commonjs/models/storageplandata.js +101 -5
  34. package/dist/commonjs/models/storageplandata.js.map +1 -1
  35. package/dist/commonjs/models/userteam.d.ts +53 -0
  36. package/dist/commonjs/models/userteam.d.ts.map +1 -1
  37. package/dist/commonjs/models/userteam.js +79 -1
  38. package/dist/commonjs/models/userteam.js.map +1 -1
  39. package/dist/commonjs/models/virtualmachineattributes.d.ts +32 -9
  40. package/dist/commonjs/models/virtualmachineattributes.d.ts.map +1 -1
  41. package/dist/commonjs/models/virtualmachineattributes.js +47 -9
  42. package/dist/commonjs/models/virtualmachineattributes.js.map +1 -1
  43. package/dist/commonjs/models/volumedata.d.ts +15 -0
  44. package/dist/commonjs/models/volumedata.d.ts.map +1 -1
  45. package/dist/commonjs/models/volumedata.js +10 -0
  46. package/dist/commonjs/models/volumedata.js.map +1 -1
  47. package/dist/commonjs/sdk/plans.d.ts +1 -1
  48. package/dist/commonjs/sdk/plans.d.ts.map +1 -1
  49. package/dist/commonjs/sdk/plans.js +2 -2
  50. package/dist/commonjs/sdk/plans.js.map +1 -1
  51. package/dist/esm/funcs/plansListStorage.d.ts +2 -1
  52. package/dist/esm/funcs/plansListStorage.d.ts.map +1 -1
  53. package/dist/esm/funcs/plansListStorage.js +18 -3
  54. package/dist/esm/funcs/plansListStorage.js.map +1 -1
  55. package/dist/esm/lib/config.d.ts +2 -2
  56. package/dist/esm/lib/config.js +2 -2
  57. package/dist/esm/mcp-server/mcp-server.js +1 -1
  58. package/dist/esm/mcp-server/server.js +1 -1
  59. package/dist/esm/mcp-server/tools/plansListStorage.d.ts +6 -1
  60. package/dist/esm/mcp-server/tools/plansListStorage.d.ts.map +1 -1
  61. package/dist/esm/mcp-server/tools/plansListStorage.js +7 -2
  62. package/dist/esm/mcp-server/tools/plansListStorage.js.map +1 -1
  63. package/dist/esm/models/operations/getstorageplans.d.ts +25 -0
  64. package/dist/esm/models/operations/getstorageplans.d.ts.map +1 -0
  65. package/dist/esm/models/operations/getstorageplans.js +33 -0
  66. package/dist/esm/models/operations/getstorageplans.js.map +1 -0
  67. package/dist/esm/models/operations/index.d.ts +1 -0
  68. package/dist/esm/models/operations/index.d.ts.map +1 -1
  69. package/dist/esm/models/operations/index.js +1 -0
  70. package/dist/esm/models/operations/index.js.map +1 -1
  71. package/dist/esm/models/operations/updateproject.d.ts +4 -4
  72. package/dist/esm/models/operations/updateproject.d.ts.map +1 -1
  73. package/dist/esm/models/operations/updateproject.js +8 -8
  74. package/dist/esm/models/operations/updateproject.js.map +1 -1
  75. package/dist/esm/models/outofbandconnection.d.ts +8 -8
  76. package/dist/esm/models/outofbandconnection.d.ts.map +1 -1
  77. package/dist/esm/models/outofbandconnection.js +8 -9
  78. package/dist/esm/models/outofbandconnection.js.map +1 -1
  79. package/dist/esm/models/storageplandata.d.ts +70 -5
  80. package/dist/esm/models/storageplandata.d.ts.map +1 -1
  81. package/dist/esm/models/storageplandata.js +94 -4
  82. package/dist/esm/models/storageplandata.js.map +1 -1
  83. package/dist/esm/models/userteam.d.ts +53 -0
  84. package/dist/esm/models/userteam.d.ts.map +1 -1
  85. package/dist/esm/models/userteam.js +76 -0
  86. package/dist/esm/models/userteam.js.map +1 -1
  87. package/dist/esm/models/virtualmachineattributes.d.ts +32 -9
  88. package/dist/esm/models/virtualmachineattributes.d.ts.map +1 -1
  89. package/dist/esm/models/virtualmachineattributes.js +44 -8
  90. package/dist/esm/models/virtualmachineattributes.js.map +1 -1
  91. package/dist/esm/models/volumedata.d.ts +15 -0
  92. package/dist/esm/models/volumedata.d.ts.map +1 -1
  93. package/dist/esm/models/volumedata.js +10 -0
  94. package/dist/esm/models/volumedata.js.map +1 -1
  95. package/dist/esm/sdk/plans.d.ts +1 -1
  96. package/dist/esm/sdk/plans.d.ts.map +1 -1
  97. package/dist/esm/sdk/plans.js +2 -2
  98. package/dist/esm/sdk/plans.js.map +1 -1
  99. package/jsr.json +1 -1
  100. package/package.json +1 -1
  101. package/src/funcs/plansListStorage.ts +25 -0
  102. package/src/lib/config.ts +2 -2
  103. package/src/mcp-server/mcp-server.ts +1 -1
  104. package/src/mcp-server/server.ts +1 -1
  105. package/src/mcp-server/tools/plansListStorage.ts +9 -2
  106. package/src/models/operations/getstorageplans.ts +72 -0
  107. package/src/models/operations/index.ts +1 -0
  108. package/src/models/operations/updateproject.ts +12 -16
  109. package/src/models/outofbandconnection.ts +28 -21
  110. package/src/models/storageplandata.ts +211 -10
  111. package/src/models/userteam.ts +142 -0
  112. package/src/models/virtualmachineattributes.ts +98 -17
  113. package/src/models/volumedata.ts +25 -0
  114. package/src/sdk/plans.ts +2 -0
  115. package/tests/integration/projects.test.ts +3 -0
@@ -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 SshKey = {
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?: SshKey | undefined;
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 SshKey$inboundSchema: z.ZodType<SshKey, z.ZodTypeDef, unknown> = z
51
- .object({
52
- id: z.string().optional(),
53
- description: z.string().optional(),
54
- fingerprint: z.string().optional(),
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 SshKey$Outbound = {
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 SshKey$outboundSchema: z.ZodType<
65
- SshKey$Outbound,
67
+ export const OutOfBandConnectionSshKey$outboundSchema: z.ZodType<
68
+ OutOfBandConnectionSshKey$Outbound,
66
69
  z.ZodTypeDef,
67
- SshKey
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 sshKeyToJSON(sshKey: SshKey): string {
75
- return JSON.stringify(SshKey$outboundSchema.parse(sshKey));
77
+ export function outOfBandConnectionSshKeyToJSON(
78
+ outOfBandConnectionSshKey: OutOfBandConnectionSshKey,
79
+ ): string {
80
+ return JSON.stringify(
81
+ OutOfBandConnectionSshKey$outboundSchema.parse(outOfBandConnectionSshKey),
82
+ );
76
83
  }
77
- export function sshKeyFromJSON(
84
+ export function outOfBandConnectionSshKeyFromJSON(
78
85
  jsonString: string,
79
- ): SafeParseResult<SshKey, SDKValidationError> {
86
+ ): SafeParseResult<OutOfBandConnectionSshKey, SDKValidationError> {
80
87
  return safeParse(
81
88
  jsonString,
82
- (x) => SshKey$inboundSchema.parse(JSON.parse(x)),
83
- `Failed to parse 'SshKey' from JSON`,
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(() => SshKey$inboundSchema).optional(),
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?: SshKey$Outbound | undefined;
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(() => SshKey$outboundSchema).optional(),
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)
@@ -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 type StoragePlanDataPricing = {
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 StoragePlanDataAttributes = {
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
- month: z.number().optional(),
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
- month?: number | undefined;
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
- month: z.number().optional(),
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 StoragePlanDataAttributes$inboundSchema: z.ZodType<
82
- StoragePlanDataAttributes,
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 StoragePlanDataAttributes$Outbound = {
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
- locations: z.array(z.string()).optional(),
105
- pricing: z.lazy(() => StoragePlanDataPricing$outboundSchema).optional(),
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(
@@ -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