@meetkai/mka1 0.51.38 → 0.53.0
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 +201 -15
- package/bin/mcp-server.js.map +19 -15
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/models/components/computeoffer.d.ts +4 -0
- package/dist/commonjs/models/components/computeoffer.d.ts.map +1 -1
- package/dist/commonjs/models/components/computeoffer.js +8 -0
- package/dist/commonjs/models/components/computeoffer.js.map +1 -1
- package/dist/commonjs/models/components/computeplacement.d.ts +1 -1
- package/dist/commonjs/models/components/computeplacementstrategy.d.ts +2 -2
- package/dist/commonjs/models/components/computeplacementstrategy.js +1 -1
- package/dist/commonjs/models/components/computequote.d.ts +17 -0
- package/dist/commonjs/models/components/computequote.d.ts.map +1 -1
- package/dist/commonjs/models/components/computequote.js +25 -1
- package/dist/commonjs/models/components/computequote.js.map +1 -1
- package/dist/commonjs/models/components/computequoterequest.d.ts +16 -0
- package/dist/commonjs/models/components/computequoterequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/computequoterequest.js +20 -1
- package/dist/commonjs/models/components/computequoterequest.js.map +1 -1
- package/dist/commonjs/models/components/computeservice.d.ts +3 -0
- package/dist/commonjs/models/components/computeservice.d.ts.map +1 -1
- package/dist/commonjs/models/components/computeservice.js +3 -0
- package/dist/commonjs/models/components/computeservice.js.map +1 -1
- package/dist/commonjs/models/components/computeserviceinput.d.ts +3 -0
- package/dist/commonjs/models/components/computeserviceinput.d.ts.map +1 -1
- package/dist/commonjs/models/components/computeserviceinput.js +3 -0
- package/dist/commonjs/models/components/computeserviceinput.js.map +1 -1
- package/dist/commonjs/models/components/computeusage.d.ts +17 -0
- package/dist/commonjs/models/components/computeusage.d.ts.map +1 -1
- package/dist/commonjs/models/components/computeusage.js +23 -1
- package/dist/commonjs/models/components/computeusage.js.map +1 -1
- package/dist/commonjs/models/components/computevolume.d.ts +42 -0
- package/dist/commonjs/models/components/computevolume.d.ts.map +1 -0
- package/dist/commonjs/models/components/computevolume.js +96 -0
- package/dist/commonjs/models/components/computevolume.js.map +1 -0
- package/dist/commonjs/models/components/computevolumedata.d.ts +35 -0
- package/dist/commonjs/models/components/computevolumedata.d.ts.map +1 -0
- package/dist/commonjs/models/components/computevolumedata.js +83 -0
- package/dist/commonjs/models/components/computevolumedata.js.map +1 -0
- package/dist/commonjs/models/components/computevolumedatainput.d.ts +33 -0
- package/dist/commonjs/models/components/computevolumedatainput.d.ts.map +1 -0
- package/dist/commonjs/models/components/computevolumedatainput.js +72 -0
- package/dist/commonjs/models/components/computevolumedatainput.js.map +1 -0
- package/dist/commonjs/models/components/computevolumeinput.d.ts +22 -0
- package/dist/commonjs/models/components/computevolumeinput.d.ts.map +1 -0
- package/dist/commonjs/models/components/computevolumeinput.js +74 -0
- package/dist/commonjs/models/components/computevolumeinput.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +4 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +4 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/mcp-server.js.map +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/models/components/computeoffer.d.ts +4 -0
- package/dist/esm/models/components/computeoffer.d.ts.map +1 -1
- package/dist/esm/models/components/computeoffer.js +8 -0
- package/dist/esm/models/components/computeoffer.js.map +1 -1
- package/dist/esm/models/components/computeplacement.d.ts +1 -1
- package/dist/esm/models/components/computeplacementstrategy.d.ts +2 -2
- package/dist/esm/models/components/computeplacementstrategy.js +1 -1
- package/dist/esm/models/components/computequote.d.ts +17 -0
- package/dist/esm/models/components/computequote.d.ts.map +1 -1
- package/dist/esm/models/components/computequote.js +22 -0
- package/dist/esm/models/components/computequote.js.map +1 -1
- package/dist/esm/models/components/computequoterequest.d.ts +16 -0
- package/dist/esm/models/components/computequoterequest.d.ts.map +1 -1
- package/dist/esm/models/components/computequoterequest.js +17 -0
- package/dist/esm/models/components/computequoterequest.js.map +1 -1
- package/dist/esm/models/components/computeservice.d.ts +3 -0
- package/dist/esm/models/components/computeservice.d.ts.map +1 -1
- package/dist/esm/models/components/computeservice.js +3 -0
- package/dist/esm/models/components/computeservice.js.map +1 -1
- package/dist/esm/models/components/computeserviceinput.d.ts +3 -0
- package/dist/esm/models/components/computeserviceinput.d.ts.map +1 -1
- package/dist/esm/models/components/computeserviceinput.js +3 -0
- package/dist/esm/models/components/computeserviceinput.js.map +1 -1
- package/dist/esm/models/components/computeusage.d.ts +17 -0
- package/dist/esm/models/components/computeusage.d.ts.map +1 -1
- package/dist/esm/models/components/computeusage.js +20 -0
- package/dist/esm/models/components/computeusage.js.map +1 -1
- package/dist/esm/models/components/computevolume.d.ts +42 -0
- package/dist/esm/models/components/computevolume.d.ts.map +1 -0
- package/dist/esm/models/components/computevolume.js +58 -0
- package/dist/esm/models/components/computevolume.js.map +1 -0
- package/dist/esm/models/components/computevolumedata.d.ts +35 -0
- package/dist/esm/models/components/computevolumedata.d.ts.map +1 -0
- package/dist/esm/models/components/computevolumedata.js +45 -0
- package/dist/esm/models/components/computevolumedata.js.map +1 -0
- package/dist/esm/models/components/computevolumedatainput.d.ts +33 -0
- package/dist/esm/models/components/computevolumedatainput.d.ts.map +1 -0
- package/dist/esm/models/components/computevolumedatainput.js +34 -0
- package/dist/esm/models/components/computevolumedatainput.js.map +1 -0
- package/dist/esm/models/components/computevolumeinput.d.ts +22 -0
- package/dist/esm/models/components/computevolumeinput.d.ts.map +1 -0
- package/dist/esm/models/components/computevolumeinput.js +36 -0
- package/dist/esm/models/components/computevolumeinput.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +4 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +4 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- 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/models/components/computeoffer.ts +12 -0
- package/src/models/components/computeplacement.ts +1 -1
- package/src/models/components/computeplacementstrategy.ts +2 -2
- package/src/models/components/computequote.ts +55 -0
- package/src/models/components/computequoterequest.ts +46 -0
- package/src/models/components/computeservice.ts +10 -0
- package/src/models/components/computeserviceinput.ts +10 -0
- package/src/models/components/computeusage.ts +53 -0
- package/src/models/components/computevolume.ts +108 -0
- package/src/models/components/computevolumedata.ts +92 -0
- package/src/models/components/computevolumedatainput.ts +81 -0
- package/src/models/components/computevolumeinput.ts +76 -0
- package/src/models/components/index.ts +4 -0
|
@@ -20,14 +20,62 @@ import {
|
|
|
20
20
|
ComputeProviderQuote$outboundSchema,
|
|
21
21
|
} from "./computeproviderquote.js";
|
|
22
22
|
|
|
23
|
+
export type PriceBreakdownUsdHr = {
|
|
24
|
+
compute: ComputePriceRange;
|
|
25
|
+
volume: ComputePriceRange;
|
|
26
|
+
};
|
|
27
|
+
|
|
23
28
|
export type ComputeQuote = {
|
|
24
29
|
available: boolean;
|
|
25
30
|
expiresAt: Date | null;
|
|
26
31
|
observedAt: Date;
|
|
32
|
+
priceBreakdownUsdHr?: PriceBreakdownUsdHr | undefined;
|
|
27
33
|
priceUsdHr: ComputePriceRange | null;
|
|
28
34
|
providers?: Array<ComputeProviderQuote> | undefined;
|
|
29
35
|
};
|
|
30
36
|
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const PriceBreakdownUsdHr$inboundSchema: z.ZodType<
|
|
39
|
+
PriceBreakdownUsdHr,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
compute: ComputePriceRange$inboundSchema,
|
|
44
|
+
volume: ComputePriceRange$inboundSchema,
|
|
45
|
+
});
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type PriceBreakdownUsdHr$Outbound = {
|
|
48
|
+
compute: ComputePriceRange$Outbound;
|
|
49
|
+
volume: ComputePriceRange$Outbound;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const PriceBreakdownUsdHr$outboundSchema: z.ZodType<
|
|
54
|
+
PriceBreakdownUsdHr$Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
PriceBreakdownUsdHr
|
|
57
|
+
> = z.object({
|
|
58
|
+
compute: ComputePriceRange$outboundSchema,
|
|
59
|
+
volume: ComputePriceRange$outboundSchema,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export function priceBreakdownUsdHrToJSON(
|
|
63
|
+
priceBreakdownUsdHr: PriceBreakdownUsdHr,
|
|
64
|
+
): string {
|
|
65
|
+
return JSON.stringify(
|
|
66
|
+
PriceBreakdownUsdHr$outboundSchema.parse(priceBreakdownUsdHr),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export function priceBreakdownUsdHrFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<PriceBreakdownUsdHr, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => PriceBreakdownUsdHr$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'PriceBreakdownUsdHr' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
31
79
|
/** @internal */
|
|
32
80
|
export const ComputeQuote$inboundSchema: z.ZodType<
|
|
33
81
|
ComputeQuote,
|
|
@@ -41,12 +89,15 @@ export const ComputeQuote$inboundSchema: z.ZodType<
|
|
|
41
89
|
observed_at: z.string().datetime({ offset: true }).transform(v =>
|
|
42
90
|
new Date(v)
|
|
43
91
|
),
|
|
92
|
+
price_breakdown_usd_hr: z.lazy(() => PriceBreakdownUsdHr$inboundSchema)
|
|
93
|
+
.optional(),
|
|
44
94
|
price_usd_hr: z.nullable(ComputePriceRange$inboundSchema),
|
|
45
95
|
providers: z.array(ComputeProviderQuote$inboundSchema).optional(),
|
|
46
96
|
}).transform((v) => {
|
|
47
97
|
return remap$(v, {
|
|
48
98
|
"expires_at": "expiresAt",
|
|
49
99
|
"observed_at": "observedAt",
|
|
100
|
+
"price_breakdown_usd_hr": "priceBreakdownUsdHr",
|
|
50
101
|
"price_usd_hr": "priceUsdHr",
|
|
51
102
|
});
|
|
52
103
|
});
|
|
@@ -55,6 +106,7 @@ export type ComputeQuote$Outbound = {
|
|
|
55
106
|
available: boolean;
|
|
56
107
|
expires_at: string | null;
|
|
57
108
|
observed_at: string;
|
|
109
|
+
price_breakdown_usd_hr?: PriceBreakdownUsdHr$Outbound | undefined;
|
|
58
110
|
price_usd_hr: ComputePriceRange$Outbound | null;
|
|
59
111
|
providers?: Array<ComputeProviderQuote$Outbound> | undefined;
|
|
60
112
|
};
|
|
@@ -68,12 +120,15 @@ export const ComputeQuote$outboundSchema: z.ZodType<
|
|
|
68
120
|
available: z.boolean(),
|
|
69
121
|
expiresAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
70
122
|
observedAt: z.date().transform(v => v.toISOString()),
|
|
123
|
+
priceBreakdownUsdHr: z.lazy(() => PriceBreakdownUsdHr$outboundSchema)
|
|
124
|
+
.optional(),
|
|
71
125
|
priceUsdHr: z.nullable(ComputePriceRange$outboundSchema),
|
|
72
126
|
providers: z.array(ComputeProviderQuote$outboundSchema).optional(),
|
|
73
127
|
}).transform((v) => {
|
|
74
128
|
return remap$(v, {
|
|
75
129
|
expiresAt: "expires_at",
|
|
76
130
|
observedAt: "observed_at",
|
|
131
|
+
priceBreakdownUsdHr: "price_breakdown_usd_hr",
|
|
77
132
|
priceUsdHr: "price_usd_hr",
|
|
78
133
|
});
|
|
79
134
|
});
|
|
@@ -30,6 +30,12 @@ import {
|
|
|
30
30
|
ComputeResourceType$inboundSchema,
|
|
31
31
|
ComputeResourceType$outboundSchema,
|
|
32
32
|
} from "./computeresourcetype.js";
|
|
33
|
+
import {
|
|
34
|
+
ComputeVolumeInput,
|
|
35
|
+
ComputeVolumeInput$inboundSchema,
|
|
36
|
+
ComputeVolumeInput$Outbound,
|
|
37
|
+
ComputeVolumeInput$outboundSchema,
|
|
38
|
+
} from "./computevolumeinput.js";
|
|
33
39
|
|
|
34
40
|
export type ComputeQuoteRequestAccess = {
|
|
35
41
|
ssh?: boolean | undefined;
|
|
@@ -40,12 +46,17 @@ export type ComputeQuoteRequestContainer = {
|
|
|
40
46
|
ports?: Array<ComputePort> | undefined;
|
|
41
47
|
};
|
|
42
48
|
|
|
49
|
+
export type Service = {
|
|
50
|
+
volume?: ComputeVolumeInput | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
43
53
|
export type ComputeQuoteRequest = {
|
|
44
54
|
access?: ComputeQuoteRequestAccess | undefined;
|
|
45
55
|
compute: ComputeRequest;
|
|
46
56
|
container: ComputeQuoteRequestContainer;
|
|
47
57
|
placement?: ComputePlacement | undefined;
|
|
48
58
|
resourceType: ComputeResourceType;
|
|
59
|
+
service?: Service | undefined;
|
|
49
60
|
};
|
|
50
61
|
|
|
51
62
|
/** @internal */
|
|
@@ -131,6 +142,38 @@ export function computeQuoteRequestContainerFromJSON(
|
|
|
131
142
|
);
|
|
132
143
|
}
|
|
133
144
|
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const Service$inboundSchema: z.ZodType<Service, z.ZodTypeDef, unknown> =
|
|
147
|
+
z.object({
|
|
148
|
+
volume: ComputeVolumeInput$inboundSchema.optional(),
|
|
149
|
+
});
|
|
150
|
+
/** @internal */
|
|
151
|
+
export type Service$Outbound = {
|
|
152
|
+
volume?: ComputeVolumeInput$Outbound | undefined;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const Service$outboundSchema: z.ZodType<
|
|
157
|
+
Service$Outbound,
|
|
158
|
+
z.ZodTypeDef,
|
|
159
|
+
Service
|
|
160
|
+
> = z.object({
|
|
161
|
+
volume: ComputeVolumeInput$outboundSchema.optional(),
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
export function serviceToJSON(service: Service): string {
|
|
165
|
+
return JSON.stringify(Service$outboundSchema.parse(service));
|
|
166
|
+
}
|
|
167
|
+
export function serviceFromJSON(
|
|
168
|
+
jsonString: string,
|
|
169
|
+
): SafeParseResult<Service, SDKValidationError> {
|
|
170
|
+
return safeParse(
|
|
171
|
+
jsonString,
|
|
172
|
+
(x) => Service$inboundSchema.parse(JSON.parse(x)),
|
|
173
|
+
`Failed to parse 'Service' from JSON`,
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
134
177
|
/** @internal */
|
|
135
178
|
export const ComputeQuoteRequest$inboundSchema: z.ZodType<
|
|
136
179
|
ComputeQuoteRequest,
|
|
@@ -142,6 +185,7 @@ export const ComputeQuoteRequest$inboundSchema: z.ZodType<
|
|
|
142
185
|
container: z.lazy(() => ComputeQuoteRequestContainer$inboundSchema),
|
|
143
186
|
placement: ComputePlacement$inboundSchema.optional(),
|
|
144
187
|
resource_type: ComputeResourceType$inboundSchema,
|
|
188
|
+
service: z.lazy(() => Service$inboundSchema).optional(),
|
|
145
189
|
}).transform((v) => {
|
|
146
190
|
return remap$(v, {
|
|
147
191
|
"resource_type": "resourceType",
|
|
@@ -154,6 +198,7 @@ export type ComputeQuoteRequest$Outbound = {
|
|
|
154
198
|
container: ComputeQuoteRequestContainer$Outbound;
|
|
155
199
|
placement?: ComputePlacement$Outbound | undefined;
|
|
156
200
|
resource_type: string;
|
|
201
|
+
service?: Service$Outbound | undefined;
|
|
157
202
|
};
|
|
158
203
|
|
|
159
204
|
/** @internal */
|
|
@@ -167,6 +212,7 @@ export const ComputeQuoteRequest$outboundSchema: z.ZodType<
|
|
|
167
212
|
container: z.lazy(() => ComputeQuoteRequestContainer$outboundSchema),
|
|
168
213
|
placement: ComputePlacement$outboundSchema.optional(),
|
|
169
214
|
resourceType: ComputeResourceType$outboundSchema,
|
|
215
|
+
service: z.lazy(() => Service$outboundSchema).optional(),
|
|
170
216
|
}).transform((v) => {
|
|
171
217
|
return remap$(v, {
|
|
172
218
|
resourceType: "resource_type",
|
|
@@ -48,6 +48,12 @@ import {
|
|
|
48
48
|
ComputeSSH$Outbound,
|
|
49
49
|
ComputeSSH$outboundSchema,
|
|
50
50
|
} from "./computessh.js";
|
|
51
|
+
import {
|
|
52
|
+
ComputeVolume,
|
|
53
|
+
ComputeVolume$inboundSchema,
|
|
54
|
+
ComputeVolume$Outbound,
|
|
55
|
+
ComputeVolume$outboundSchema,
|
|
56
|
+
} from "./computevolume.js";
|
|
51
57
|
|
|
52
58
|
export type ComputeService = {
|
|
53
59
|
accruedUsd: number;
|
|
@@ -70,6 +76,7 @@ export type ComputeService = {
|
|
|
70
76
|
state: ComputeResourceState;
|
|
71
77
|
terminalAt: Date | null;
|
|
72
78
|
ready: boolean;
|
|
79
|
+
volume?: ComputeVolume | undefined;
|
|
73
80
|
};
|
|
74
81
|
|
|
75
82
|
/** @internal */
|
|
@@ -101,6 +108,7 @@ export const ComputeService$inboundSchema: z.ZodType<
|
|
|
101
108
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
102
109
|
),
|
|
103
110
|
ready: z.boolean(),
|
|
111
|
+
volume: ComputeVolume$inboundSchema.optional(),
|
|
104
112
|
}).transform((v) => {
|
|
105
113
|
return remap$(v, {
|
|
106
114
|
"accrued_usd": "accruedUsd",
|
|
@@ -130,6 +138,7 @@ export type ComputeService$Outbound = {
|
|
|
130
138
|
state: string;
|
|
131
139
|
terminal_at: string | null;
|
|
132
140
|
ready: boolean;
|
|
141
|
+
volume?: ComputeVolume$Outbound | undefined;
|
|
133
142
|
};
|
|
134
143
|
|
|
135
144
|
/** @internal */
|
|
@@ -155,6 +164,7 @@ export const ComputeService$outboundSchema: z.ZodType<
|
|
|
155
164
|
state: ComputeResourceState$outboundSchema,
|
|
156
165
|
terminalAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
157
166
|
ready: z.boolean(),
|
|
167
|
+
volume: ComputeVolume$outboundSchema.optional(),
|
|
158
168
|
}).transform((v) => {
|
|
159
169
|
return remap$(v, {
|
|
160
170
|
accruedUsd: "accrued_usd",
|
|
@@ -12,9 +12,16 @@ import {
|
|
|
12
12
|
ComputeReadiness$Outbound,
|
|
13
13
|
ComputeReadiness$outboundSchema,
|
|
14
14
|
} from "./computereadiness.js";
|
|
15
|
+
import {
|
|
16
|
+
ComputeVolumeInput,
|
|
17
|
+
ComputeVolumeInput$inboundSchema,
|
|
18
|
+
ComputeVolumeInput$Outbound,
|
|
19
|
+
ComputeVolumeInput$outboundSchema,
|
|
20
|
+
} from "./computevolumeinput.js";
|
|
15
21
|
|
|
16
22
|
export type ComputeServiceInput = {
|
|
17
23
|
readiness?: ComputeReadiness | undefined;
|
|
24
|
+
volume?: ComputeVolumeInput | undefined;
|
|
18
25
|
};
|
|
19
26
|
|
|
20
27
|
/** @internal */
|
|
@@ -24,10 +31,12 @@ export const ComputeServiceInput$inboundSchema: z.ZodType<
|
|
|
24
31
|
unknown
|
|
25
32
|
> = z.object({
|
|
26
33
|
readiness: ComputeReadiness$inboundSchema.optional(),
|
|
34
|
+
volume: ComputeVolumeInput$inboundSchema.optional(),
|
|
27
35
|
});
|
|
28
36
|
/** @internal */
|
|
29
37
|
export type ComputeServiceInput$Outbound = {
|
|
30
38
|
readiness?: ComputeReadiness$Outbound | undefined;
|
|
39
|
+
volume?: ComputeVolumeInput$Outbound | undefined;
|
|
31
40
|
};
|
|
32
41
|
|
|
33
42
|
/** @internal */
|
|
@@ -37,6 +46,7 @@ export const ComputeServiceInput$outboundSchema: z.ZodType<
|
|
|
37
46
|
ComputeServiceInput
|
|
38
47
|
> = z.object({
|
|
39
48
|
readiness: ComputeReadiness$outboundSchema.optional(),
|
|
49
|
+
volume: ComputeVolumeInput$outboundSchema.optional(),
|
|
40
50
|
});
|
|
41
51
|
|
|
42
52
|
export function computeServiceInputToJSON(
|
|
@@ -13,9 +13,15 @@ import {
|
|
|
13
13
|
ComputeResourceType$outboundSchema,
|
|
14
14
|
} from "./computeresourcetype.js";
|
|
15
15
|
|
|
16
|
+
export type CostBreakdownUsd = {
|
|
17
|
+
compute: number;
|
|
18
|
+
volume: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
16
21
|
export type ComputeUsageData = {
|
|
17
22
|
accruedUsd: number;
|
|
18
23
|
billableSeconds: number;
|
|
24
|
+
costBreakdownUsd?: CostBreakdownUsd | undefined;
|
|
19
25
|
name: string;
|
|
20
26
|
resourceId: string;
|
|
21
27
|
resourceType: ComputeResourceType;
|
|
@@ -40,6 +46,48 @@ export type ComputeUsage = {
|
|
|
40
46
|
window: Window;
|
|
41
47
|
};
|
|
42
48
|
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const CostBreakdownUsd$inboundSchema: z.ZodType<
|
|
51
|
+
CostBreakdownUsd,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
compute: z.number(),
|
|
56
|
+
volume: z.number(),
|
|
57
|
+
});
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type CostBreakdownUsd$Outbound = {
|
|
60
|
+
compute: number;
|
|
61
|
+
volume: number;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const CostBreakdownUsd$outboundSchema: z.ZodType<
|
|
66
|
+
CostBreakdownUsd$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
CostBreakdownUsd
|
|
69
|
+
> = z.object({
|
|
70
|
+
compute: z.number(),
|
|
71
|
+
volume: z.number(),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export function costBreakdownUsdToJSON(
|
|
75
|
+
costBreakdownUsd: CostBreakdownUsd,
|
|
76
|
+
): string {
|
|
77
|
+
return JSON.stringify(
|
|
78
|
+
CostBreakdownUsd$outboundSchema.parse(costBreakdownUsd),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
export function costBreakdownUsdFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<CostBreakdownUsd, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => CostBreakdownUsd$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'CostBreakdownUsd' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
43
91
|
/** @internal */
|
|
44
92
|
export const ComputeUsageData$inboundSchema: z.ZodType<
|
|
45
93
|
ComputeUsageData,
|
|
@@ -48,6 +96,7 @@ export const ComputeUsageData$inboundSchema: z.ZodType<
|
|
|
48
96
|
> = z.object({
|
|
49
97
|
accrued_usd: z.number(),
|
|
50
98
|
billable_seconds: z.number().int(),
|
|
99
|
+
cost_breakdown_usd: z.lazy(() => CostBreakdownUsd$inboundSchema).optional(),
|
|
51
100
|
name: z.string(),
|
|
52
101
|
resource_id: z.string(),
|
|
53
102
|
resource_type: ComputeResourceType$inboundSchema,
|
|
@@ -55,6 +104,7 @@ export const ComputeUsageData$inboundSchema: z.ZodType<
|
|
|
55
104
|
return remap$(v, {
|
|
56
105
|
"accrued_usd": "accruedUsd",
|
|
57
106
|
"billable_seconds": "billableSeconds",
|
|
107
|
+
"cost_breakdown_usd": "costBreakdownUsd",
|
|
58
108
|
"resource_id": "resourceId",
|
|
59
109
|
"resource_type": "resourceType",
|
|
60
110
|
});
|
|
@@ -63,6 +113,7 @@ export const ComputeUsageData$inboundSchema: z.ZodType<
|
|
|
63
113
|
export type ComputeUsageData$Outbound = {
|
|
64
114
|
accrued_usd: number;
|
|
65
115
|
billable_seconds: number;
|
|
116
|
+
cost_breakdown_usd?: CostBreakdownUsd$Outbound | undefined;
|
|
66
117
|
name: string;
|
|
67
118
|
resource_id: string;
|
|
68
119
|
resource_type: string;
|
|
@@ -76,6 +127,7 @@ export const ComputeUsageData$outboundSchema: z.ZodType<
|
|
|
76
127
|
> = z.object({
|
|
77
128
|
accruedUsd: z.number(),
|
|
78
129
|
billableSeconds: z.number().int(),
|
|
130
|
+
costBreakdownUsd: z.lazy(() => CostBreakdownUsd$outboundSchema).optional(),
|
|
79
131
|
name: z.string(),
|
|
80
132
|
resourceId: z.string(),
|
|
81
133
|
resourceType: ComputeResourceType$outboundSchema,
|
|
@@ -83,6 +135,7 @@ export const ComputeUsageData$outboundSchema: z.ZodType<
|
|
|
83
135
|
return remap$(v, {
|
|
84
136
|
accruedUsd: "accrued_usd",
|
|
85
137
|
billableSeconds: "billable_seconds",
|
|
138
|
+
costBreakdownUsd: "cost_breakdown_usd",
|
|
86
139
|
resourceId: "resource_id",
|
|
87
140
|
resourceType: "resource_type",
|
|
88
141
|
});
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
import {
|
|
12
|
+
ComputeVolumeData,
|
|
13
|
+
ComputeVolumeData$inboundSchema,
|
|
14
|
+
ComputeVolumeData$Outbound,
|
|
15
|
+
ComputeVolumeData$outboundSchema,
|
|
16
|
+
} from "./computevolumedata.js";
|
|
17
|
+
|
|
18
|
+
export const ComputeVolumeStatus = {
|
|
19
|
+
Provisioning: "provisioning",
|
|
20
|
+
Loading: "loading",
|
|
21
|
+
Ready: "ready",
|
|
22
|
+
Deleting: "deleting",
|
|
23
|
+
Deleted: "deleted",
|
|
24
|
+
Failed: "failed",
|
|
25
|
+
} as const;
|
|
26
|
+
export type ComputeVolumeStatus = ClosedEnum<typeof ComputeVolumeStatus>;
|
|
27
|
+
|
|
28
|
+
export type ComputeVolume = {
|
|
29
|
+
accruedCostUsd: number;
|
|
30
|
+
data: Array<ComputeVolumeData>;
|
|
31
|
+
mountPath: string;
|
|
32
|
+
priceUsdHr: number;
|
|
33
|
+
sizeGb: number;
|
|
34
|
+
status: ComputeVolumeStatus;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ComputeVolumeStatus$inboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof ComputeVolumeStatus
|
|
40
|
+
> = z.nativeEnum(ComputeVolumeStatus);
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const ComputeVolumeStatus$outboundSchema: z.ZodNativeEnum<
|
|
43
|
+
typeof ComputeVolumeStatus
|
|
44
|
+
> = ComputeVolumeStatus$inboundSchema;
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const ComputeVolume$inboundSchema: z.ZodType<
|
|
48
|
+
ComputeVolume,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
accrued_cost_usd: z.number(),
|
|
53
|
+
data: z.array(ComputeVolumeData$inboundSchema),
|
|
54
|
+
mount_path: z.string(),
|
|
55
|
+
price_usd_hr: z.number(),
|
|
56
|
+
size_gb: z.number().int(),
|
|
57
|
+
status: ComputeVolumeStatus$inboundSchema,
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
"accrued_cost_usd": "accruedCostUsd",
|
|
61
|
+
"mount_path": "mountPath",
|
|
62
|
+
"price_usd_hr": "priceUsdHr",
|
|
63
|
+
"size_gb": "sizeGb",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
/** @internal */
|
|
67
|
+
export type ComputeVolume$Outbound = {
|
|
68
|
+
accrued_cost_usd: number;
|
|
69
|
+
data: Array<ComputeVolumeData$Outbound>;
|
|
70
|
+
mount_path: string;
|
|
71
|
+
price_usd_hr: number;
|
|
72
|
+
size_gb: number;
|
|
73
|
+
status: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const ComputeVolume$outboundSchema: z.ZodType<
|
|
78
|
+
ComputeVolume$Outbound,
|
|
79
|
+
z.ZodTypeDef,
|
|
80
|
+
ComputeVolume
|
|
81
|
+
> = z.object({
|
|
82
|
+
accruedCostUsd: z.number(),
|
|
83
|
+
data: z.array(ComputeVolumeData$outboundSchema),
|
|
84
|
+
mountPath: z.string(),
|
|
85
|
+
priceUsdHr: z.number(),
|
|
86
|
+
sizeGb: z.number().int(),
|
|
87
|
+
status: ComputeVolumeStatus$outboundSchema,
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
accruedCostUsd: "accrued_cost_usd",
|
|
91
|
+
mountPath: "mount_path",
|
|
92
|
+
priceUsdHr: "price_usd_hr",
|
|
93
|
+
sizeGb: "size_gb",
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export function computeVolumeToJSON(computeVolume: ComputeVolume): string {
|
|
98
|
+
return JSON.stringify(ComputeVolume$outboundSchema.parse(computeVolume));
|
|
99
|
+
}
|
|
100
|
+
export function computeVolumeFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<ComputeVolume, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => ComputeVolume$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'ComputeVolume' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 ComputeVolumeDataType = {
|
|
13
|
+
Huggingface: "huggingface",
|
|
14
|
+
Git: "git",
|
|
15
|
+
} as const;
|
|
16
|
+
export type ComputeVolumeDataType = ClosedEnum<typeof ComputeVolumeDataType>;
|
|
17
|
+
|
|
18
|
+
export type ComputeVolumeData = {
|
|
19
|
+
path: string;
|
|
20
|
+
resolvedRevision: string | null;
|
|
21
|
+
revision: string | null;
|
|
22
|
+
type: ComputeVolumeDataType;
|
|
23
|
+
url: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const ComputeVolumeDataType$inboundSchema: z.ZodNativeEnum<
|
|
28
|
+
typeof ComputeVolumeDataType
|
|
29
|
+
> = z.nativeEnum(ComputeVolumeDataType);
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ComputeVolumeDataType$outboundSchema: z.ZodNativeEnum<
|
|
32
|
+
typeof ComputeVolumeDataType
|
|
33
|
+
> = ComputeVolumeDataType$inboundSchema;
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const ComputeVolumeData$inboundSchema: z.ZodType<
|
|
37
|
+
ComputeVolumeData,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.object({
|
|
41
|
+
path: z.string(),
|
|
42
|
+
resolved_revision: z.nullable(z.string()),
|
|
43
|
+
revision: z.nullable(z.string()),
|
|
44
|
+
type: ComputeVolumeDataType$inboundSchema,
|
|
45
|
+
url: z.string(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"resolved_revision": "resolvedRevision",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type ComputeVolumeData$Outbound = {
|
|
53
|
+
path: string;
|
|
54
|
+
resolved_revision: string | null;
|
|
55
|
+
revision: string | null;
|
|
56
|
+
type: string;
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const ComputeVolumeData$outboundSchema: z.ZodType<
|
|
62
|
+
ComputeVolumeData$Outbound,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
ComputeVolumeData
|
|
65
|
+
> = z.object({
|
|
66
|
+
path: z.string(),
|
|
67
|
+
resolvedRevision: z.nullable(z.string()),
|
|
68
|
+
revision: z.nullable(z.string()),
|
|
69
|
+
type: ComputeVolumeDataType$outboundSchema,
|
|
70
|
+
url: z.string(),
|
|
71
|
+
}).transform((v) => {
|
|
72
|
+
return remap$(v, {
|
|
73
|
+
resolvedRevision: "resolved_revision",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export function computeVolumeDataToJSON(
|
|
78
|
+
computeVolumeData: ComputeVolumeData,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
ComputeVolumeData$outboundSchema.parse(computeVolumeData),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
export function computeVolumeDataFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<ComputeVolumeData, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => ComputeVolumeData$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'ComputeVolumeData' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const ComputeVolumeDataInputType = {
|
|
12
|
+
Huggingface: "huggingface",
|
|
13
|
+
Git: "git",
|
|
14
|
+
} as const;
|
|
15
|
+
export type ComputeVolumeDataInputType = ClosedEnum<
|
|
16
|
+
typeof ComputeVolumeDataInputType
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export type ComputeVolumeDataInput = {
|
|
20
|
+
path: string;
|
|
21
|
+
revision?: string | undefined;
|
|
22
|
+
type: ComputeVolumeDataInputType;
|
|
23
|
+
url: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const ComputeVolumeDataInputType$inboundSchema: z.ZodNativeEnum<
|
|
28
|
+
typeof ComputeVolumeDataInputType
|
|
29
|
+
> = z.nativeEnum(ComputeVolumeDataInputType);
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ComputeVolumeDataInputType$outboundSchema: z.ZodNativeEnum<
|
|
32
|
+
typeof ComputeVolumeDataInputType
|
|
33
|
+
> = ComputeVolumeDataInputType$inboundSchema;
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const ComputeVolumeDataInput$inboundSchema: z.ZodType<
|
|
37
|
+
ComputeVolumeDataInput,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.object({
|
|
41
|
+
path: z.string(),
|
|
42
|
+
revision: z.string().optional(),
|
|
43
|
+
type: ComputeVolumeDataInputType$inboundSchema,
|
|
44
|
+
url: z.string(),
|
|
45
|
+
});
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type ComputeVolumeDataInput$Outbound = {
|
|
48
|
+
path: string;
|
|
49
|
+
revision?: string | undefined;
|
|
50
|
+
type: string;
|
|
51
|
+
url: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const ComputeVolumeDataInput$outboundSchema: z.ZodType<
|
|
56
|
+
ComputeVolumeDataInput$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
ComputeVolumeDataInput
|
|
59
|
+
> = z.object({
|
|
60
|
+
path: z.string(),
|
|
61
|
+
revision: z.string().optional(),
|
|
62
|
+
type: ComputeVolumeDataInputType$outboundSchema,
|
|
63
|
+
url: z.string(),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export function computeVolumeDataInputToJSON(
|
|
67
|
+
computeVolumeDataInput: ComputeVolumeDataInput,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
ComputeVolumeDataInput$outboundSchema.parse(computeVolumeDataInput),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
export function computeVolumeDataInputFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<ComputeVolumeDataInput, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => ComputeVolumeDataInput$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'ComputeVolumeDataInput' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|