latitudesh-typescript-sdk 0.7.5 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +248 -90
- package/bin/mcp-server.js.map +21 -19
- package/dist/commonjs/funcs/virtualMachinesList.d.ts +4 -2
- package/dist/commonjs/funcs/virtualMachinesList.d.ts.map +1 -1
- package/dist/commonjs/funcs/virtualMachinesList.js +40 -7
- package/dist/commonjs/funcs/virtualMachinesList.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/virtualMachinesList.js +1 -1
- package/dist/commonjs/mcp-server/tools/virtualMachinesList.js.map +1 -1
- package/dist/commonjs/models/billingusage.d.ts +74 -8
- package/dist/commonjs/models/billingusage.d.ts.map +1 -1
- package/dist/commonjs/models/billingusage.js +83 -9
- package/dist/commonjs/models/billingusage.js.map +1 -1
- package/dist/commonjs/models/eventdata.d.ts +16 -16
- package/dist/commonjs/models/eventdata.d.ts.map +1 -1
- package/dist/commonjs/models/eventdata.js +16 -16
- package/dist/commonjs/models/eventdata.js.map +1 -1
- package/dist/commonjs/models/operations/createserver.d.ts +7 -7
- package/dist/commonjs/models/operations/createserver.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createserver.js +5 -4
- package/dist/commonjs/models/operations/createserver.js.map +1 -1
- package/dist/commonjs/models/operations/createvirtualnetwork.d.ts +7 -7
- package/dist/commonjs/models/operations/createvirtualnetwork.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createvirtualnetwork.js +4 -3
- package/dist/commonjs/models/operations/createvirtualnetwork.js.map +1 -1
- package/dist/commonjs/models/operations/getvpnsessions.d.ts +4 -4
- package/dist/commonjs/models/operations/getvpnsessions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getvpnsessions.js +3 -2
- package/dist/commonjs/models/operations/getvpnsessions.js.map +1 -1
- package/dist/commonjs/models/operations/indexvirtualmachine.d.ts +29 -0
- package/dist/commonjs/models/operations/indexvirtualmachine.d.ts.map +1 -1
- package/dist/commonjs/models/operations/indexvirtualmachine.js +38 -1
- package/dist/commonjs/models/operations/indexvirtualmachine.js.map +1 -1
- package/dist/commonjs/models/operations/postvpnsession.d.ts +4 -4
- package/dist/commonjs/models/operations/postvpnsession.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postvpnsession.js +3 -2
- package/dist/commonjs/models/operations/postvpnsession.js.map +1 -1
- package/dist/commonjs/models/project.d.ts +57 -13
- package/dist/commonjs/models/project.d.ts.map +1 -1
- package/dist/commonjs/models/project.js +48 -11
- package/dist/commonjs/models/project.js.map +1 -1
- package/dist/commonjs/models/projectinclude.d.ts +6 -0
- package/dist/commonjs/models/projectinclude.d.ts.map +1 -1
- package/dist/commonjs/models/projectinclude.js +8 -0
- package/dist/commonjs/models/projectinclude.js.map +1 -1
- package/dist/commonjs/models/virtualmachineattributes.d.ts +14 -14
- package/dist/commonjs/models/virtualmachineattributes.d.ts.map +1 -1
- package/dist/commonjs/models/virtualmachineattributes.js +7 -15
- package/dist/commonjs/models/virtualmachineattributes.js.map +1 -1
- package/dist/commonjs/models/virtualmachines.d.ts +3 -11
- package/dist/commonjs/models/virtualmachines.d.ts.map +1 -1
- package/dist/commonjs/models/virtualmachines.js +4 -15
- package/dist/commonjs/models/virtualmachines.js.map +1 -1
- package/dist/commonjs/sdk/virtualmachines.d.ts +4 -1
- package/dist/commonjs/sdk/virtualmachines.d.ts.map +1 -1
- package/dist/commonjs/sdk/virtualmachines.js +2 -1
- package/dist/commonjs/sdk/virtualmachines.js.map +1 -1
- package/dist/esm/funcs/virtualMachinesList.d.ts +4 -2
- package/dist/esm/funcs/virtualMachinesList.d.ts.map +1 -1
- package/dist/esm/funcs/virtualMachinesList.js +40 -7
- package/dist/esm/funcs/virtualMachinesList.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/virtualMachinesList.js +1 -1
- package/dist/esm/mcp-server/tools/virtualMachinesList.js.map +1 -1
- package/dist/esm/models/billingusage.d.ts +74 -8
- package/dist/esm/models/billingusage.d.ts.map +1 -1
- package/dist/esm/models/billingusage.js +76 -8
- package/dist/esm/models/billingusage.js.map +1 -1
- package/dist/esm/models/eventdata.d.ts +16 -16
- package/dist/esm/models/eventdata.d.ts.map +1 -1
- package/dist/esm/models/eventdata.js +16 -16
- package/dist/esm/models/eventdata.js.map +1 -1
- package/dist/esm/models/operations/createserver.d.ts +7 -7
- package/dist/esm/models/operations/createserver.d.ts.map +1 -1
- package/dist/esm/models/operations/createserver.js +5 -4
- package/dist/esm/models/operations/createserver.js.map +1 -1
- package/dist/esm/models/operations/createvirtualnetwork.d.ts +7 -7
- package/dist/esm/models/operations/createvirtualnetwork.d.ts.map +1 -1
- package/dist/esm/models/operations/createvirtualnetwork.js +4 -3
- package/dist/esm/models/operations/createvirtualnetwork.js.map +1 -1
- package/dist/esm/models/operations/getvpnsessions.d.ts +4 -4
- package/dist/esm/models/operations/getvpnsessions.d.ts.map +1 -1
- package/dist/esm/models/operations/getvpnsessions.js +3 -2
- package/dist/esm/models/operations/getvpnsessions.js.map +1 -1
- package/dist/esm/models/operations/indexvirtualmachine.d.ts +29 -0
- package/dist/esm/models/operations/indexvirtualmachine.d.ts.map +1 -1
- package/dist/esm/models/operations/indexvirtualmachine.js +35 -0
- package/dist/esm/models/operations/indexvirtualmachine.js.map +1 -1
- package/dist/esm/models/operations/postvpnsession.d.ts +4 -4
- package/dist/esm/models/operations/postvpnsession.d.ts.map +1 -1
- package/dist/esm/models/operations/postvpnsession.js +3 -2
- package/dist/esm/models/operations/postvpnsession.js.map +1 -1
- package/dist/esm/models/project.d.ts +57 -13
- package/dist/esm/models/project.d.ts.map +1 -1
- package/dist/esm/models/project.js +45 -10
- package/dist/esm/models/project.js.map +1 -1
- package/dist/esm/models/projectinclude.d.ts +6 -0
- package/dist/esm/models/projectinclude.d.ts.map +1 -1
- package/dist/esm/models/projectinclude.js +8 -0
- package/dist/esm/models/projectinclude.js.map +1 -1
- package/dist/esm/models/virtualmachineattributes.d.ts +14 -14
- package/dist/esm/models/virtualmachineattributes.d.ts.map +1 -1
- package/dist/esm/models/virtualmachineattributes.js +6 -14
- package/dist/esm/models/virtualmachineattributes.js.map +1 -1
- package/dist/esm/models/virtualmachines.d.ts +3 -11
- package/dist/esm/models/virtualmachines.d.ts.map +1 -1
- package/dist/esm/models/virtualmachines.js +3 -12
- package/dist/esm/models/virtualmachines.js.map +1 -1
- package/dist/esm/sdk/virtualmachines.d.ts +4 -1
- package/dist/esm/sdk/virtualmachines.d.ts.map +1 -1
- package/dist/esm/sdk/virtualmachines.js +2 -1
- package/dist/esm/sdk/virtualmachines.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/virtualMachinesList.ts +102 -31
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/virtualMachinesList.ts +1 -1
- package/src/models/billingusage.ts +189 -16
- package/src/models/eventdata.ts +32 -32
- package/src/models/operations/createserver.ts +18 -14
- package/src/models/operations/createvirtualnetwork.ts +16 -11
- package/src/models/operations/getvpnsessions.ts +13 -8
- package/src/models/operations/indexvirtualmachine.ts +81 -0
- package/src/models/operations/postvpnsession.ts +13 -8
- package/src/models/project.ts +128 -23
- package/src/models/projectinclude.ts +14 -0
- package/src/models/virtualmachineattributes.ts +20 -24
- package/src/models/virtualmachines.ts +10 -39
- package/src/sdk/virtualmachines.ts +5 -2
- package/tests/integration/helpers/mock-data.ts +6 -2
- package/tests/integration/projects.test.ts +3 -1
|
@@ -9,6 +9,8 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
export type BillingUsageMeta = {};
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* The project in which the returned usage belongs to
|
|
14
16
|
*/
|
|
@@ -57,6 +59,7 @@ export const BillingUsageUnit = {
|
|
|
57
59
|
Quantity: "quantity",
|
|
58
60
|
Hour: "hour",
|
|
59
61
|
Minute: "minute",
|
|
62
|
+
Gb: "GB",
|
|
60
63
|
} as const;
|
|
61
64
|
export type BillingUsageUnit = ClosedEnum<typeof BillingUsageUnit>;
|
|
62
65
|
|
|
@@ -66,13 +69,28 @@ export const UsageType = {
|
|
|
66
69
|
} as const;
|
|
67
70
|
export type UsageType = ClosedEnum<typeof UsageType>;
|
|
68
71
|
|
|
69
|
-
export type
|
|
70
|
-
id?: string |
|
|
71
|
-
hostname?: string |
|
|
72
|
-
plan?: string |
|
|
72
|
+
export type BillingUsageServer = {
|
|
73
|
+
id?: string | undefined;
|
|
74
|
+
hostname?: string | undefined;
|
|
75
|
+
plan?: string | undefined;
|
|
73
76
|
tags?: Array<string> | undefined;
|
|
74
77
|
};
|
|
75
78
|
|
|
79
|
+
export type Bucket = {
|
|
80
|
+
id?: string | undefined;
|
|
81
|
+
name?: string | undefined;
|
|
82
|
+
location?: string | null | undefined;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export type Metadata = {
|
|
86
|
+
servers?: Array<BillingUsageServer> | undefined;
|
|
87
|
+
bucket?: Bucket | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* For products priced per divided unit (e.g. $0.01 per 1000 API calls), the divisor applied to the quantity before pricing. Omitted for products that are not priced by divided units.
|
|
90
|
+
*/
|
|
91
|
+
billingUnitDivisor?: number | null | undefined;
|
|
92
|
+
};
|
|
93
|
+
|
|
76
94
|
export type Product = {
|
|
77
95
|
id?: string | undefined;
|
|
78
96
|
resource?: string | undefined;
|
|
@@ -85,12 +103,20 @@ export type Product = {
|
|
|
85
103
|
start?: Date | undefined;
|
|
86
104
|
end?: Date | null | undefined;
|
|
87
105
|
unit?: BillingUsageUnit | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* The unit amount of the product in cents
|
|
108
|
+
*/
|
|
109
|
+
unitAmount?: number | undefined;
|
|
88
110
|
/**
|
|
89
111
|
* The unit price of the product in cents
|
|
90
112
|
*/
|
|
91
113
|
unitPrice?: number | undefined;
|
|
92
114
|
usageType?: UsageType | undefined;
|
|
93
115
|
quantity?: number | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* The total usage amount of the product in cents
|
|
118
|
+
*/
|
|
119
|
+
amount?: number | undefined;
|
|
94
120
|
/**
|
|
95
121
|
* The total usage price of the product in cents
|
|
96
122
|
*/
|
|
@@ -111,6 +137,10 @@ export type BillingUsageAttributes = {
|
|
|
111
137
|
* The available credit balance in cents
|
|
112
138
|
*/
|
|
113
139
|
availableCreditBalance?: number | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* The total usage amount in cents
|
|
142
|
+
*/
|
|
143
|
+
amount?: number | undefined;
|
|
114
144
|
/**
|
|
115
145
|
* The total usage price in cents
|
|
116
146
|
*/
|
|
@@ -124,13 +154,48 @@ export type BillingUsageAttributes = {
|
|
|
124
154
|
|
|
125
155
|
export type BillingUsageData = {
|
|
126
156
|
id?: string | undefined;
|
|
157
|
+
type?: string | undefined;
|
|
127
158
|
attributes?: BillingUsageAttributes | undefined;
|
|
128
159
|
};
|
|
129
160
|
|
|
130
161
|
export type BillingUsage = {
|
|
162
|
+
meta?: BillingUsageMeta | undefined;
|
|
131
163
|
data?: BillingUsageData | undefined;
|
|
132
164
|
};
|
|
133
165
|
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const BillingUsageMeta$inboundSchema: z.ZodType<
|
|
168
|
+
BillingUsageMeta,
|
|
169
|
+
z.ZodTypeDef,
|
|
170
|
+
unknown
|
|
171
|
+
> = z.object({});
|
|
172
|
+
/** @internal */
|
|
173
|
+
export type BillingUsageMeta$Outbound = {};
|
|
174
|
+
|
|
175
|
+
/** @internal */
|
|
176
|
+
export const BillingUsageMeta$outboundSchema: z.ZodType<
|
|
177
|
+
BillingUsageMeta$Outbound,
|
|
178
|
+
z.ZodTypeDef,
|
|
179
|
+
BillingUsageMeta
|
|
180
|
+
> = z.object({});
|
|
181
|
+
|
|
182
|
+
export function billingUsageMetaToJSON(
|
|
183
|
+
billingUsageMeta: BillingUsageMeta,
|
|
184
|
+
): string {
|
|
185
|
+
return JSON.stringify(
|
|
186
|
+
BillingUsageMeta$outboundSchema.parse(billingUsageMeta),
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
export function billingUsageMetaFromJSON(
|
|
190
|
+
jsonString: string,
|
|
191
|
+
): SafeParseResult<BillingUsageMeta, SDKValidationError> {
|
|
192
|
+
return safeParse(
|
|
193
|
+
jsonString,
|
|
194
|
+
(x) => BillingUsageMeta$inboundSchema.parse(JSON.parse(x)),
|
|
195
|
+
`Failed to parse 'BillingUsageMeta' from JSON`,
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
134
199
|
/** @internal */
|
|
135
200
|
export const BillingUsageProject$inboundSchema: z.ZodType<
|
|
136
201
|
BillingUsageProject,
|
|
@@ -279,23 +344,111 @@ export const UsageType$inboundSchema: z.ZodNativeEnum<typeof UsageType> = z
|
|
|
279
344
|
export const UsageType$outboundSchema: z.ZodNativeEnum<typeof UsageType> =
|
|
280
345
|
UsageType$inboundSchema;
|
|
281
346
|
|
|
347
|
+
/** @internal */
|
|
348
|
+
export const BillingUsageServer$inboundSchema: z.ZodType<
|
|
349
|
+
BillingUsageServer,
|
|
350
|
+
z.ZodTypeDef,
|
|
351
|
+
unknown
|
|
352
|
+
> = z.object({
|
|
353
|
+
id: z.string().optional(),
|
|
354
|
+
hostname: z.string().optional(),
|
|
355
|
+
plan: z.string().optional(),
|
|
356
|
+
tags: z.array(z.string()).optional(),
|
|
357
|
+
});
|
|
358
|
+
/** @internal */
|
|
359
|
+
export type BillingUsageServer$Outbound = {
|
|
360
|
+
id?: string | undefined;
|
|
361
|
+
hostname?: string | undefined;
|
|
362
|
+
plan?: string | undefined;
|
|
363
|
+
tags?: Array<string> | undefined;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
/** @internal */
|
|
367
|
+
export const BillingUsageServer$outboundSchema: z.ZodType<
|
|
368
|
+
BillingUsageServer$Outbound,
|
|
369
|
+
z.ZodTypeDef,
|
|
370
|
+
BillingUsageServer
|
|
371
|
+
> = z.object({
|
|
372
|
+
id: z.string().optional(),
|
|
373
|
+
hostname: z.string().optional(),
|
|
374
|
+
plan: z.string().optional(),
|
|
375
|
+
tags: z.array(z.string()).optional(),
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
export function billingUsageServerToJSON(
|
|
379
|
+
billingUsageServer: BillingUsageServer,
|
|
380
|
+
): string {
|
|
381
|
+
return JSON.stringify(
|
|
382
|
+
BillingUsageServer$outboundSchema.parse(billingUsageServer),
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
export function billingUsageServerFromJSON(
|
|
386
|
+
jsonString: string,
|
|
387
|
+
): SafeParseResult<BillingUsageServer, SDKValidationError> {
|
|
388
|
+
return safeParse(
|
|
389
|
+
jsonString,
|
|
390
|
+
(x) => BillingUsageServer$inboundSchema.parse(JSON.parse(x)),
|
|
391
|
+
`Failed to parse 'BillingUsageServer' from JSON`,
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/** @internal */
|
|
396
|
+
export const Bucket$inboundSchema: z.ZodType<Bucket, z.ZodTypeDef, unknown> = z
|
|
397
|
+
.object({
|
|
398
|
+
id: z.string().optional(),
|
|
399
|
+
name: z.string().optional(),
|
|
400
|
+
location: z.nullable(z.string()).optional(),
|
|
401
|
+
});
|
|
402
|
+
/** @internal */
|
|
403
|
+
export type Bucket$Outbound = {
|
|
404
|
+
id?: string | undefined;
|
|
405
|
+
name?: string | undefined;
|
|
406
|
+
location?: string | null | undefined;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
/** @internal */
|
|
410
|
+
export const Bucket$outboundSchema: z.ZodType<
|
|
411
|
+
Bucket$Outbound,
|
|
412
|
+
z.ZodTypeDef,
|
|
413
|
+
Bucket
|
|
414
|
+
> = z.object({
|
|
415
|
+
id: z.string().optional(),
|
|
416
|
+
name: z.string().optional(),
|
|
417
|
+
location: z.nullable(z.string()).optional(),
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
export function bucketToJSON(bucket: Bucket): string {
|
|
421
|
+
return JSON.stringify(Bucket$outboundSchema.parse(bucket));
|
|
422
|
+
}
|
|
423
|
+
export function bucketFromJSON(
|
|
424
|
+
jsonString: string,
|
|
425
|
+
): SafeParseResult<Bucket, SDKValidationError> {
|
|
426
|
+
return safeParse(
|
|
427
|
+
jsonString,
|
|
428
|
+
(x) => Bucket$inboundSchema.parse(JSON.parse(x)),
|
|
429
|
+
`Failed to parse 'Bucket' from JSON`,
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
|
|
282
433
|
/** @internal */
|
|
283
434
|
export const Metadata$inboundSchema: z.ZodType<
|
|
284
435
|
Metadata,
|
|
285
436
|
z.ZodTypeDef,
|
|
286
437
|
unknown
|
|
287
438
|
> = z.object({
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
439
|
+
servers: z.array(z.lazy(() => BillingUsageServer$inboundSchema)).optional(),
|
|
440
|
+
bucket: z.lazy(() => Bucket$inboundSchema).optional(),
|
|
441
|
+
billing_unit_divisor: z.nullable(z.number().int()).optional(),
|
|
442
|
+
}).transform((v) => {
|
|
443
|
+
return remap$(v, {
|
|
444
|
+
"billing_unit_divisor": "billingUnitDivisor",
|
|
445
|
+
});
|
|
292
446
|
});
|
|
293
447
|
/** @internal */
|
|
294
448
|
export type Metadata$Outbound = {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
tags?: Array<string> | undefined;
|
|
449
|
+
servers?: Array<BillingUsageServer$Outbound> | undefined;
|
|
450
|
+
bucket?: Bucket$Outbound | undefined;
|
|
451
|
+
billing_unit_divisor?: number | null | undefined;
|
|
299
452
|
};
|
|
300
453
|
|
|
301
454
|
/** @internal */
|
|
@@ -304,10 +457,13 @@ export const Metadata$outboundSchema: z.ZodType<
|
|
|
304
457
|
z.ZodTypeDef,
|
|
305
458
|
Metadata
|
|
306
459
|
> = z.object({
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
460
|
+
servers: z.array(z.lazy(() => BillingUsageServer$outboundSchema)).optional(),
|
|
461
|
+
bucket: z.lazy(() => Bucket$outboundSchema).optional(),
|
|
462
|
+
billingUnitDivisor: z.nullable(z.number().int()).optional(),
|
|
463
|
+
}).transform((v) => {
|
|
464
|
+
return remap$(v, {
|
|
465
|
+
billingUnitDivisor: "billing_unit_divisor",
|
|
466
|
+
});
|
|
311
467
|
});
|
|
312
468
|
|
|
313
469
|
export function metadataToJSON(metadata: Metadata): string {
|
|
@@ -340,14 +496,17 @@ export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
|
340
496
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
341
497
|
).optional(),
|
|
342
498
|
unit: BillingUsageUnit$inboundSchema.optional(),
|
|
499
|
+
unit_amount: z.number().optional(),
|
|
343
500
|
unit_price: z.number().optional(),
|
|
344
501
|
usage_type: UsageType$inboundSchema.optional(),
|
|
345
502
|
quantity: z.number().optional(),
|
|
503
|
+
amount: z.number().optional(),
|
|
346
504
|
price: z.number().optional(),
|
|
347
505
|
metadata: z.lazy(() => Metadata$inboundSchema).optional(),
|
|
348
506
|
}).transform((v) => {
|
|
349
507
|
return remap$(v, {
|
|
350
508
|
"amount_without_discount": "amountWithoutDiscount",
|
|
509
|
+
"unit_amount": "unitAmount",
|
|
351
510
|
"unit_price": "unitPrice",
|
|
352
511
|
"usage_type": "usageType",
|
|
353
512
|
});
|
|
@@ -365,9 +524,11 @@ export type Product$Outbound = {
|
|
|
365
524
|
start?: string | undefined;
|
|
366
525
|
end?: string | null | undefined;
|
|
367
526
|
unit?: string | undefined;
|
|
527
|
+
unit_amount?: number | undefined;
|
|
368
528
|
unit_price?: number | undefined;
|
|
369
529
|
usage_type?: string | undefined;
|
|
370
530
|
quantity?: number | undefined;
|
|
531
|
+
amount?: number | undefined;
|
|
371
532
|
price?: number | undefined;
|
|
372
533
|
metadata?: Metadata$Outbound | undefined;
|
|
373
534
|
};
|
|
@@ -389,14 +550,17 @@ export const Product$outboundSchema: z.ZodType<
|
|
|
389
550
|
start: z.date().transform(v => v.toISOString()).optional(),
|
|
390
551
|
end: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
391
552
|
unit: BillingUsageUnit$outboundSchema.optional(),
|
|
553
|
+
unitAmount: z.number().optional(),
|
|
392
554
|
unitPrice: z.number().optional(),
|
|
393
555
|
usageType: UsageType$outboundSchema.optional(),
|
|
394
556
|
quantity: z.number().optional(),
|
|
557
|
+
amount: z.number().optional(),
|
|
395
558
|
price: z.number().optional(),
|
|
396
559
|
metadata: z.lazy(() => Metadata$outboundSchema).optional(),
|
|
397
560
|
}).transform((v) => {
|
|
398
561
|
return remap$(v, {
|
|
399
562
|
amountWithoutDiscount: "amount_without_discount",
|
|
563
|
+
unitAmount: "unit_amount",
|
|
400
564
|
unitPrice: "unit_price",
|
|
401
565
|
usageType: "usage_type",
|
|
402
566
|
});
|
|
@@ -424,6 +588,7 @@ export const BillingUsageAttributes$inboundSchema: z.ZodType<
|
|
|
424
588
|
project: z.lazy(() => BillingUsageProject$inboundSchema).optional(),
|
|
425
589
|
period: z.lazy(() => Period$inboundSchema).optional(),
|
|
426
590
|
available_credit_balance: z.number().int().optional(),
|
|
591
|
+
amount: z.number().optional(),
|
|
427
592
|
price: z.number().optional(),
|
|
428
593
|
threshold: z.nullable(z.number()).optional(),
|
|
429
594
|
products: z.array(z.lazy(() => Product$inboundSchema)).optional(),
|
|
@@ -437,6 +602,7 @@ export type BillingUsageAttributes$Outbound = {
|
|
|
437
602
|
project?: BillingUsageProject$Outbound | undefined;
|
|
438
603
|
period?: Period$Outbound | undefined;
|
|
439
604
|
available_credit_balance?: number | undefined;
|
|
605
|
+
amount?: number | undefined;
|
|
440
606
|
price?: number | undefined;
|
|
441
607
|
threshold?: number | null | undefined;
|
|
442
608
|
products?: Array<Product$Outbound> | undefined;
|
|
@@ -451,6 +617,7 @@ export const BillingUsageAttributes$outboundSchema: z.ZodType<
|
|
|
451
617
|
project: z.lazy(() => BillingUsageProject$outboundSchema).optional(),
|
|
452
618
|
period: z.lazy(() => Period$outboundSchema).optional(),
|
|
453
619
|
availableCreditBalance: z.number().int().optional(),
|
|
620
|
+
amount: z.number().optional(),
|
|
454
621
|
price: z.number().optional(),
|
|
455
622
|
threshold: z.nullable(z.number()).optional(),
|
|
456
623
|
products: z.array(z.lazy(() => Product$outboundSchema)).optional(),
|
|
@@ -484,11 +651,13 @@ export const BillingUsageData$inboundSchema: z.ZodType<
|
|
|
484
651
|
unknown
|
|
485
652
|
> = z.object({
|
|
486
653
|
id: z.string().optional(),
|
|
654
|
+
type: z.string().optional(),
|
|
487
655
|
attributes: z.lazy(() => BillingUsageAttributes$inboundSchema).optional(),
|
|
488
656
|
});
|
|
489
657
|
/** @internal */
|
|
490
658
|
export type BillingUsageData$Outbound = {
|
|
491
659
|
id?: string | undefined;
|
|
660
|
+
type?: string | undefined;
|
|
492
661
|
attributes?: BillingUsageAttributes$Outbound | undefined;
|
|
493
662
|
};
|
|
494
663
|
|
|
@@ -499,6 +668,7 @@ export const BillingUsageData$outboundSchema: z.ZodType<
|
|
|
499
668
|
BillingUsageData
|
|
500
669
|
> = z.object({
|
|
501
670
|
id: z.string().optional(),
|
|
671
|
+
type: z.string().optional(),
|
|
502
672
|
attributes: z.lazy(() => BillingUsageAttributes$outboundSchema).optional(),
|
|
503
673
|
});
|
|
504
674
|
|
|
@@ -525,10 +695,12 @@ export const BillingUsage$inboundSchema: z.ZodType<
|
|
|
525
695
|
z.ZodTypeDef,
|
|
526
696
|
unknown
|
|
527
697
|
> = z.object({
|
|
698
|
+
meta: z.lazy(() => BillingUsageMeta$inboundSchema).optional(),
|
|
528
699
|
data: z.lazy(() => BillingUsageData$inboundSchema).optional(),
|
|
529
700
|
});
|
|
530
701
|
/** @internal */
|
|
531
702
|
export type BillingUsage$Outbound = {
|
|
703
|
+
meta?: BillingUsageMeta$Outbound | undefined;
|
|
532
704
|
data?: BillingUsageData$Outbound | undefined;
|
|
533
705
|
};
|
|
534
706
|
|
|
@@ -538,6 +710,7 @@ export const BillingUsage$outboundSchema: z.ZodType<
|
|
|
538
710
|
z.ZodTypeDef,
|
|
539
711
|
BillingUsage
|
|
540
712
|
> = z.object({
|
|
713
|
+
meta: z.lazy(() => BillingUsageMeta$outboundSchema).optional(),
|
|
541
714
|
data: z.lazy(() => BillingUsageData$outboundSchema).optional(),
|
|
542
715
|
});
|
|
543
716
|
|
package/src/models/eventdata.ts
CHANGED
|
@@ -15,20 +15,20 @@ export const EventDataType = {
|
|
|
15
15
|
export type EventDataType = ClosedEnum<typeof EventDataType>;
|
|
16
16
|
|
|
17
17
|
export type Author = {
|
|
18
|
-
id?: string | undefined;
|
|
19
|
-
name?: string | undefined;
|
|
20
|
-
email?: string | undefined;
|
|
18
|
+
id?: string | null | undefined;
|
|
19
|
+
name?: string | null | undefined;
|
|
20
|
+
email?: string | null | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export type EventDataProject = {
|
|
24
|
-
id?: string | undefined;
|
|
25
|
-
name?: string | undefined;
|
|
26
|
-
slug?: string | undefined;
|
|
24
|
+
id?: string | null | undefined;
|
|
25
|
+
name?: string | null | undefined;
|
|
26
|
+
slug?: string | null | undefined;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export type EventDataTeam = {
|
|
30
|
-
id?: string | undefined;
|
|
31
|
-
name?: string | undefined;
|
|
30
|
+
id?: string | null | undefined;
|
|
31
|
+
name?: string | null | undefined;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export type Target = {
|
|
@@ -72,15 +72,15 @@ export const EventDataType$outboundSchema: z.ZodNativeEnum<
|
|
|
72
72
|
/** @internal */
|
|
73
73
|
export const Author$inboundSchema: z.ZodType<Author, z.ZodTypeDef, unknown> = z
|
|
74
74
|
.object({
|
|
75
|
-
id: z.string().optional(),
|
|
76
|
-
name: z.string().optional(),
|
|
77
|
-
email: z.string().optional(),
|
|
75
|
+
id: z.nullable(z.string()).optional(),
|
|
76
|
+
name: z.nullable(z.string()).optional(),
|
|
77
|
+
email: z.nullable(z.string()).optional(),
|
|
78
78
|
});
|
|
79
79
|
/** @internal */
|
|
80
80
|
export type Author$Outbound = {
|
|
81
|
-
id?: string | undefined;
|
|
82
|
-
name?: string | undefined;
|
|
83
|
-
email?: string | undefined;
|
|
81
|
+
id?: string | null | undefined;
|
|
82
|
+
name?: string | null | undefined;
|
|
83
|
+
email?: string | null | undefined;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
/** @internal */
|
|
@@ -89,9 +89,9 @@ export const Author$outboundSchema: z.ZodType<
|
|
|
89
89
|
z.ZodTypeDef,
|
|
90
90
|
Author
|
|
91
91
|
> = z.object({
|
|
92
|
-
id: z.string().optional(),
|
|
93
|
-
name: z.string().optional(),
|
|
94
|
-
email: z.string().optional(),
|
|
92
|
+
id: z.nullable(z.string()).optional(),
|
|
93
|
+
name: z.nullable(z.string()).optional(),
|
|
94
|
+
email: z.nullable(z.string()).optional(),
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
export function authorToJSON(author: Author): string {
|
|
@@ -113,15 +113,15 @@ export const EventDataProject$inboundSchema: z.ZodType<
|
|
|
113
113
|
z.ZodTypeDef,
|
|
114
114
|
unknown
|
|
115
115
|
> = z.object({
|
|
116
|
-
id: z.string().optional(),
|
|
117
|
-
name: z.string().optional(),
|
|
118
|
-
slug: z.string().optional(),
|
|
116
|
+
id: z.nullable(z.string()).optional(),
|
|
117
|
+
name: z.nullable(z.string()).optional(),
|
|
118
|
+
slug: z.nullable(z.string()).optional(),
|
|
119
119
|
});
|
|
120
120
|
/** @internal */
|
|
121
121
|
export type EventDataProject$Outbound = {
|
|
122
|
-
id?: string | undefined;
|
|
123
|
-
name?: string | undefined;
|
|
124
|
-
slug?: string | undefined;
|
|
122
|
+
id?: string | null | undefined;
|
|
123
|
+
name?: string | null | undefined;
|
|
124
|
+
slug?: string | null | undefined;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
/** @internal */
|
|
@@ -130,9 +130,9 @@ export const EventDataProject$outboundSchema: z.ZodType<
|
|
|
130
130
|
z.ZodTypeDef,
|
|
131
131
|
EventDataProject
|
|
132
132
|
> = z.object({
|
|
133
|
-
id: z.string().optional(),
|
|
134
|
-
name: z.string().optional(),
|
|
135
|
-
slug: z.string().optional(),
|
|
133
|
+
id: z.nullable(z.string()).optional(),
|
|
134
|
+
name: z.nullable(z.string()).optional(),
|
|
135
|
+
slug: z.nullable(z.string()).optional(),
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
export function eventDataProjectToJSON(
|
|
@@ -158,13 +158,13 @@ export const EventDataTeam$inboundSchema: z.ZodType<
|
|
|
158
158
|
z.ZodTypeDef,
|
|
159
159
|
unknown
|
|
160
160
|
> = z.object({
|
|
161
|
-
id: z.string().optional(),
|
|
162
|
-
name: z.string().optional(),
|
|
161
|
+
id: z.nullable(z.string()).optional(),
|
|
162
|
+
name: z.nullable(z.string()).optional(),
|
|
163
163
|
});
|
|
164
164
|
/** @internal */
|
|
165
165
|
export type EventDataTeam$Outbound = {
|
|
166
|
-
id?: string | undefined;
|
|
167
|
-
name?: string | undefined;
|
|
166
|
+
id?: string | null | undefined;
|
|
167
|
+
name?: string | null | undefined;
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
/** @internal */
|
|
@@ -173,8 +173,8 @@ export const EventDataTeam$outboundSchema: z.ZodType<
|
|
|
173
173
|
z.ZodTypeDef,
|
|
174
174
|
EventDataTeam
|
|
175
175
|
> = z.object({
|
|
176
|
-
id: z.string().optional(),
|
|
177
|
-
name: z.string().optional(),
|
|
176
|
+
id: z.nullable(z.string()).optional(),
|
|
177
|
+
name: z.nullable(z.string()).optional(),
|
|
178
178
|
});
|
|
179
179
|
|
|
180
180
|
export function eventDataTeamToJSON(eventDataTeam: EventDataTeam): string {
|
|
@@ -5,7 +5,8 @@
|
|
|
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
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
9
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
12
|
|
|
@@ -41,7 +42,7 @@ export const Plan2 = {
|
|
|
41
42
|
/**
|
|
42
43
|
* The plan slug to choose server from, defining the specs the server will have
|
|
43
44
|
*/
|
|
44
|
-
export type Plan2 =
|
|
45
|
+
export type Plan2 = OpenEnum<typeof Plan2>;
|
|
45
46
|
|
|
46
47
|
/**
|
|
47
48
|
* The site slug to deploy the server
|
|
@@ -69,7 +70,7 @@ export const CreateServerSite2 = {
|
|
|
69
70
|
/**
|
|
70
71
|
* The site slug to deploy the server
|
|
71
72
|
*/
|
|
72
|
-
export type CreateServerSite2 =
|
|
73
|
+
export type CreateServerSite2 = OpenEnum<typeof CreateServerSite2>;
|
|
73
74
|
|
|
74
75
|
/**
|
|
75
76
|
* The operating system slug for the new server
|
|
@@ -215,21 +216,24 @@ export const CreateServerType2$outboundSchema: z.ZodNativeEnum<
|
|
|
215
216
|
> = CreateServerType2$inboundSchema;
|
|
216
217
|
|
|
217
218
|
/** @internal */
|
|
218
|
-
export const Plan2$inboundSchema: z.
|
|
219
|
-
Plan2
|
|
220
|
-
);
|
|
219
|
+
export const Plan2$inboundSchema: z.ZodType<Plan2, z.ZodTypeDef, unknown> =
|
|
220
|
+
openEnums.inboundSchema(Plan2);
|
|
221
221
|
/** @internal */
|
|
222
|
-
export const Plan2$outboundSchema: z.
|
|
223
|
-
Plan2
|
|
222
|
+
export const Plan2$outboundSchema: z.ZodType<string, z.ZodTypeDef, Plan2> =
|
|
223
|
+
openEnums.outboundSchema(Plan2);
|
|
224
224
|
|
|
225
225
|
/** @internal */
|
|
226
|
-
export const CreateServerSite2$inboundSchema: z.
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
export const CreateServerSite2$inboundSchema: z.ZodType<
|
|
227
|
+
CreateServerSite2,
|
|
228
|
+
z.ZodTypeDef,
|
|
229
|
+
unknown
|
|
230
|
+
> = openEnums.inboundSchema(CreateServerSite2);
|
|
229
231
|
/** @internal */
|
|
230
|
-
export const CreateServerSite2$outboundSchema: z.
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
export const CreateServerSite2$outboundSchema: z.ZodType<
|
|
233
|
+
string,
|
|
234
|
+
z.ZodTypeDef,
|
|
235
|
+
CreateServerSite2
|
|
236
|
+
> = openEnums.outboundSchema(CreateServerSite2);
|
|
233
237
|
|
|
234
238
|
/** @internal */
|
|
235
239
|
export const CreateServerOperatingSystem2$inboundSchema: z.ZodNativeEnum<
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
|
|
@@ -16,7 +17,7 @@ export type CreateVirtualNetworkType2 = ClosedEnum<
|
|
|
16
17
|
>;
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
|
-
* Site
|
|
20
|
+
* Site slug
|
|
20
21
|
*/
|
|
21
22
|
export const CreateVirtualNetworkSite2 = {
|
|
22
23
|
Ash: "ASH",
|
|
@@ -39,16 +40,16 @@ export const CreateVirtualNetworkSite2 = {
|
|
|
39
40
|
Tyo2: "TYO2",
|
|
40
41
|
} as const;
|
|
41
42
|
/**
|
|
42
|
-
* Site
|
|
43
|
+
* Site slug
|
|
43
44
|
*/
|
|
44
|
-
export type CreateVirtualNetworkSite2 =
|
|
45
|
+
export type CreateVirtualNetworkSite2 = OpenEnum<
|
|
45
46
|
typeof CreateVirtualNetworkSite2
|
|
46
47
|
>;
|
|
47
48
|
|
|
48
49
|
export type CreateVirtualNetworkAttributes2 = {
|
|
49
50
|
description: string;
|
|
50
51
|
/**
|
|
51
|
-
* Site
|
|
52
|
+
* Site slug
|
|
52
53
|
*/
|
|
53
54
|
site?: CreateVirtualNetworkSite2 | undefined;
|
|
54
55
|
/**
|
|
@@ -76,13 +77,17 @@ export const CreateVirtualNetworkType2$outboundSchema: z.ZodNativeEnum<
|
|
|
76
77
|
> = CreateVirtualNetworkType2$inboundSchema;
|
|
77
78
|
|
|
78
79
|
/** @internal */
|
|
79
|
-
export const CreateVirtualNetworkSite2$inboundSchema: z.
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
export const CreateVirtualNetworkSite2$inboundSchema: z.ZodType<
|
|
81
|
+
CreateVirtualNetworkSite2,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
unknown
|
|
84
|
+
> = openEnums.inboundSchema(CreateVirtualNetworkSite2);
|
|
82
85
|
/** @internal */
|
|
83
|
-
export const CreateVirtualNetworkSite2$outboundSchema: z.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
export const CreateVirtualNetworkSite2$outboundSchema: z.ZodType<
|
|
87
|
+
string,
|
|
88
|
+
z.ZodTypeDef,
|
|
89
|
+
CreateVirtualNetworkSite2
|
|
90
|
+
> = openEnums.outboundSchema(CreateVirtualNetworkSite2);
|
|
86
91
|
|
|
87
92
|
/** @internal */
|
|
88
93
|
export const CreateVirtualNetworkAttributes2$inboundSchema: z.ZodType<
|
|
@@ -5,7 +5,8 @@
|
|
|
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
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
12
|
import * as models from "../index.js";
|
|
@@ -30,7 +31,7 @@ export const FilterLocation = {
|
|
|
30
31
|
Tyo: "TYO",
|
|
31
32
|
Tyo2: "TYO2",
|
|
32
33
|
} as const;
|
|
33
|
-
export type FilterLocation =
|
|
34
|
+
export type FilterLocation = OpenEnum<typeof FilterLocation>;
|
|
34
35
|
|
|
35
36
|
export type GetVpnSessionsRequest = {
|
|
36
37
|
filterLocation?: FilterLocation | undefined;
|
|
@@ -47,13 +48,17 @@ export type GetVpnSessionsResponse = {
|
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
/** @internal */
|
|
50
|
-
export const FilterLocation$inboundSchema: z.
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
export const FilterLocation$inboundSchema: z.ZodType<
|
|
52
|
+
FilterLocation,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
unknown
|
|
55
|
+
> = openEnums.inboundSchema(FilterLocation);
|
|
53
56
|
/** @internal */
|
|
54
|
-
export const FilterLocation$outboundSchema: z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
export const FilterLocation$outboundSchema: z.ZodType<
|
|
58
|
+
string,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
FilterLocation
|
|
61
|
+
> = openEnums.outboundSchema(FilterLocation);
|
|
57
62
|
|
|
58
63
|
/** @internal */
|
|
59
64
|
export const GetVpnSessionsRequest$inboundSchema: z.ZodType<
|