@meetkai/mka1 0.51.13 → 0.51.14
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/README.md +233 -227
- package/bin/mcp-server.js +528 -259
- package/bin/mcp-server.js.map +17 -9
- package/dist/commonjs/funcs/servingEligibilityPreview.d.ts +19 -0
- package/dist/commonjs/funcs/servingEligibilityPreview.d.ts.map +1 -0
- package/dist/commonjs/funcs/servingEligibilityPreview.js +133 -0
- package/dist/commonjs/funcs/servingEligibilityPreview.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/servingEligibilityPreview.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/servingEligibilityPreview.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingEligibilityPreview.js +64 -0
- package/dist/commonjs/mcp-server/tools/servingEligibilityPreview.js.map +1 -0
- package/dist/commonjs/models/components/acceleratorpriceband.d.ts +22 -0
- package/dist/commonjs/models/components/acceleratorpriceband.d.ts.map +1 -0
- package/dist/commonjs/models/components/acceleratorpriceband.js +60 -0
- package/dist/commonjs/models/components/acceleratorpriceband.js.map +1 -0
- package/dist/commonjs/models/components/acceleratortype.d.ts +22 -0
- package/dist/commonjs/models/components/acceleratortype.d.ts.map +1 -1
- package/dist/commonjs/models/components/acceleratortype.js +14 -0
- package/dist/commonjs/models/components/acceleratortype.js.map +1 -1
- package/dist/commonjs/models/components/acquirability.d.ts +20 -0
- package/dist/commonjs/models/components/acquirability.d.ts.map +1 -0
- package/dist/commonjs/models/components/acquirability.js +54 -0
- package/dist/commonjs/models/components/acquirability.js.map +1 -0
- package/dist/commonjs/models/components/eligibilitypreview.d.ts +73 -0
- package/dist/commonjs/models/components/eligibilitypreview.d.ts.map +1 -0
- package/dist/commonjs/models/components/eligibilitypreview.js +99 -0
- package/dist/commonjs/models/components/eligibilitypreview.js.map +1 -0
- package/dist/commonjs/models/components/eligibilitypriceband.d.ts +24 -0
- package/dist/commonjs/models/components/eligibilitypriceband.d.ts.map +1 -0
- package/dist/commonjs/models/components/eligibilitypriceband.js +62 -0
- package/dist/commonjs/models/components/eligibilitypriceband.js.map +1 -0
- package/dist/commonjs/models/components/eligibilityrequest.d.ts +28 -0
- package/dist/commonjs/models/components/eligibilityrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/eligibilityrequest.js +59 -0
- package/dist/commonjs/models/components/eligibilityrequest.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +5 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +5 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/previeweligibility.d.ts +23 -0
- package/dist/commonjs/models/operations/previeweligibility.d.ts.map +1 -0
- package/dist/commonjs/models/operations/previeweligibility.js +72 -0
- package/dist/commonjs/models/operations/previeweligibility.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/servingEligibilityPreview.d.ts +30 -0
- package/dist/commonjs/react-query/servingEligibilityPreview.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingEligibilityPreview.js +47 -0
- package/dist/commonjs/react-query/servingEligibilityPreview.js.map +1 -0
- package/dist/commonjs/sdk/eligibility.d.ts +13 -0
- package/dist/commonjs/sdk/eligibility.d.ts.map +1 -0
- package/dist/commonjs/sdk/eligibility.js +22 -0
- package/dist/commonjs/sdk/eligibility.js.map +1 -0
- package/dist/commonjs/sdk/serving.d.ts +3 -0
- package/dist/commonjs/sdk/serving.d.ts.map +1 -1
- package/dist/commonjs/sdk/serving.js +4 -0
- package/dist/commonjs/sdk/serving.js.map +1 -1
- package/dist/esm/funcs/servingEligibilityPreview.d.ts +19 -0
- package/dist/esm/funcs/servingEligibilityPreview.d.ts.map +1 -0
- package/dist/esm/funcs/servingEligibilityPreview.js +97 -0
- package/dist/esm/funcs/servingEligibilityPreview.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/servingEligibilityPreview.d.ts +8 -0
- package/dist/esm/mcp-server/tools/servingEligibilityPreview.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/servingEligibilityPreview.js +28 -0
- package/dist/esm/mcp-server/tools/servingEligibilityPreview.js.map +1 -0
- package/dist/esm/models/components/acceleratorpriceband.d.ts +22 -0
- package/dist/esm/models/components/acceleratorpriceband.d.ts.map +1 -0
- package/dist/esm/models/components/acceleratorpriceband.js +22 -0
- package/dist/esm/models/components/acceleratorpriceband.js.map +1 -0
- package/dist/esm/models/components/acceleratortype.d.ts +22 -0
- package/dist/esm/models/components/acceleratortype.d.ts.map +1 -1
- package/dist/esm/models/components/acceleratortype.js +14 -0
- package/dist/esm/models/components/acceleratortype.js.map +1 -1
- package/dist/esm/models/components/acquirability.d.ts +20 -0
- package/dist/esm/models/components/acquirability.d.ts.map +1 -0
- package/dist/esm/models/components/acquirability.js +18 -0
- package/dist/esm/models/components/acquirability.js.map +1 -0
- package/dist/esm/models/components/eligibilitypreview.d.ts +73 -0
- package/dist/esm/models/components/eligibilitypreview.d.ts.map +1 -0
- package/dist/esm/models/components/eligibilitypreview.js +61 -0
- package/dist/esm/models/components/eligibilitypreview.js.map +1 -0
- package/dist/esm/models/components/eligibilitypriceband.d.ts +24 -0
- package/dist/esm/models/components/eligibilitypriceband.d.ts.map +1 -0
- package/dist/esm/models/components/eligibilitypriceband.js +24 -0
- package/dist/esm/models/components/eligibilitypriceband.js.map +1 -0
- package/dist/esm/models/components/eligibilityrequest.d.ts +28 -0
- package/dist/esm/models/components/eligibilityrequest.d.ts.map +1 -0
- package/dist/esm/models/components/eligibilityrequest.js +21 -0
- package/dist/esm/models/components/eligibilityrequest.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +5 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +5 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/previeweligibility.d.ts +23 -0
- package/dist/esm/models/operations/previeweligibility.d.ts.map +1 -0
- package/dist/esm/models/operations/previeweligibility.js +34 -0
- package/dist/esm/models/operations/previeweligibility.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/servingEligibilityPreview.d.ts +30 -0
- package/dist/esm/react-query/servingEligibilityPreview.d.ts.map +1 -0
- package/dist/esm/react-query/servingEligibilityPreview.js +42 -0
- package/dist/esm/react-query/servingEligibilityPreview.js.map +1 -0
- package/dist/esm/sdk/eligibility.d.ts +13 -0
- package/dist/esm/sdk/eligibility.d.ts.map +1 -0
- package/dist/esm/sdk/eligibility.js +18 -0
- package/dist/esm/sdk/eligibility.js.map +1 -0
- package/dist/esm/sdk/serving.d.ts +3 -0
- package/dist/esm/sdk/serving.d.ts.map +1 -1
- package/dist/esm/sdk/serving.js +4 -0
- package/dist/esm/sdk/serving.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/servingEligibilityPreview.ts +193 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/servingEligibilityPreview.ts +37 -0
- package/src/models/components/acceleratorpriceband.ts +58 -0
- package/src/models/components/acceleratortype.ts +43 -0
- package/src/models/components/acquirability.ts +29 -0
- package/src/models/components/eligibilitypreview.ts +145 -0
- package/src/models/components/eligibilitypriceband.ts +62 -0
- package/src/models/components/eligibilityrequest.ts +67 -0
- package/src/models/components/index.ts +5 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/previeweligibility.ts +70 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/servingEligibilityPreview.ts +113 -0
- package/src/sdk/eligibility.ts +28 -0
- package/src/sdk/serving.ts +6 -0
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
Acquirability,
|
|
13
|
+
Acquirability$inboundSchema,
|
|
14
|
+
Acquirability$outboundSchema,
|
|
15
|
+
} from "./acquirability.js";
|
|
16
|
+
import {
|
|
17
|
+
EligibilityPriceBand,
|
|
18
|
+
EligibilityPriceBand$inboundSchema,
|
|
19
|
+
EligibilityPriceBand$Outbound,
|
|
20
|
+
EligibilityPriceBand$outboundSchema,
|
|
21
|
+
} from "./eligibilitypriceband.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Coarse expected-start band for the request as the market looks now.
|
|
25
|
+
*/
|
|
26
|
+
export const EstStart = {
|
|
27
|
+
Immediate: "immediate",
|
|
28
|
+
Minutes: "minutes",
|
|
29
|
+
Queued: "queued",
|
|
30
|
+
Unknown: "unknown",
|
|
31
|
+
} as const;
|
|
32
|
+
/**
|
|
33
|
+
* Coarse expected-start band for the request as the market looks now.
|
|
34
|
+
*/
|
|
35
|
+
export type EstStart = ClosedEnum<typeof EstStart>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Provider-anonymous capacity preview: counts, price bands, and advice only. Configurations, providers, regions, and SKUs are never enumerated.
|
|
39
|
+
*/
|
|
40
|
+
export type EligibilityPreview = {
|
|
41
|
+
/**
|
|
42
|
+
* Banded estimate of how reliably matching capacity can be acquired, computed from availability history. "unknown" means no history, never a guess.
|
|
43
|
+
*/
|
|
44
|
+
acquirability: Acquirability;
|
|
45
|
+
/**
|
|
46
|
+
* Matching configurations that could start immediately.
|
|
47
|
+
*/
|
|
48
|
+
acquirableNow: number;
|
|
49
|
+
/**
|
|
50
|
+
* Machine-generated, provider-anonymous guidance.
|
|
51
|
+
*/
|
|
52
|
+
advice: Array<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Whether any known configuration matches the request.
|
|
55
|
+
*/
|
|
56
|
+
eligible: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Coarse expected-start band for the request as the market looks now.
|
|
59
|
+
*/
|
|
60
|
+
estStart: EstStart;
|
|
61
|
+
/**
|
|
62
|
+
* USD-per-hour price band across the configurations matching an eligibility request.
|
|
63
|
+
*/
|
|
64
|
+
priceUsdHr?: EligibilityPriceBand | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Known matching configurations currently out of stock.
|
|
67
|
+
*/
|
|
68
|
+
watchable: number;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const EstStart$inboundSchema: z.ZodNativeEnum<typeof EstStart> = z
|
|
73
|
+
.nativeEnum(EstStart);
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const EstStart$outboundSchema: z.ZodNativeEnum<typeof EstStart> =
|
|
76
|
+
EstStart$inboundSchema;
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const EligibilityPreview$inboundSchema: z.ZodType<
|
|
80
|
+
EligibilityPreview,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
unknown
|
|
83
|
+
> = z.object({
|
|
84
|
+
acquirability: Acquirability$inboundSchema,
|
|
85
|
+
acquirable_now: z.number().int(),
|
|
86
|
+
advice: z.array(z.string()),
|
|
87
|
+
eligible: z.boolean(),
|
|
88
|
+
est_start: EstStart$inboundSchema,
|
|
89
|
+
price_usd_hr: EligibilityPriceBand$inboundSchema.optional(),
|
|
90
|
+
watchable: z.number().int(),
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return remap$(v, {
|
|
93
|
+
"acquirable_now": "acquirableNow",
|
|
94
|
+
"est_start": "estStart",
|
|
95
|
+
"price_usd_hr": "priceUsdHr",
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
/** @internal */
|
|
99
|
+
export type EligibilityPreview$Outbound = {
|
|
100
|
+
acquirability: string;
|
|
101
|
+
acquirable_now: number;
|
|
102
|
+
advice: Array<string>;
|
|
103
|
+
eligible: boolean;
|
|
104
|
+
est_start: string;
|
|
105
|
+
price_usd_hr?: EligibilityPriceBand$Outbound | undefined;
|
|
106
|
+
watchable: number;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const EligibilityPreview$outboundSchema: z.ZodType<
|
|
111
|
+
EligibilityPreview$Outbound,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
EligibilityPreview
|
|
114
|
+
> = z.object({
|
|
115
|
+
acquirability: Acquirability$outboundSchema,
|
|
116
|
+
acquirableNow: z.number().int(),
|
|
117
|
+
advice: z.array(z.string()),
|
|
118
|
+
eligible: z.boolean(),
|
|
119
|
+
estStart: EstStart$outboundSchema,
|
|
120
|
+
priceUsdHr: EligibilityPriceBand$outboundSchema.optional(),
|
|
121
|
+
watchable: z.number().int(),
|
|
122
|
+
}).transform((v) => {
|
|
123
|
+
return remap$(v, {
|
|
124
|
+
acquirableNow: "acquirable_now",
|
|
125
|
+
estStart: "est_start",
|
|
126
|
+
priceUsdHr: "price_usd_hr",
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
export function eligibilityPreviewToJSON(
|
|
131
|
+
eligibilityPreview: EligibilityPreview,
|
|
132
|
+
): string {
|
|
133
|
+
return JSON.stringify(
|
|
134
|
+
EligibilityPreview$outboundSchema.parse(eligibilityPreview),
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
export function eligibilityPreviewFromJSON(
|
|
138
|
+
jsonString: string,
|
|
139
|
+
): SafeParseResult<EligibilityPreview, SDKValidationError> {
|
|
140
|
+
return safeParse(
|
|
141
|
+
jsonString,
|
|
142
|
+
(x) => EligibilityPreview$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
+
`Failed to parse 'EligibilityPreview' from JSON`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* USD-per-hour price band across the configurations matching an eligibility request.
|
|
12
|
+
*/
|
|
13
|
+
export type EligibilityPriceBand = {
|
|
14
|
+
max: number;
|
|
15
|
+
min: number;
|
|
16
|
+
p50: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const EligibilityPriceBand$inboundSchema: z.ZodType<
|
|
21
|
+
EligibilityPriceBand,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
max: z.number(),
|
|
26
|
+
min: z.number(),
|
|
27
|
+
p50: z.number(),
|
|
28
|
+
});
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type EligibilityPriceBand$Outbound = {
|
|
31
|
+
max: number;
|
|
32
|
+
min: number;
|
|
33
|
+
p50: number;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const EligibilityPriceBand$outboundSchema: z.ZodType<
|
|
38
|
+
EligibilityPriceBand$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
EligibilityPriceBand
|
|
41
|
+
> = z.object({
|
|
42
|
+
max: z.number(),
|
|
43
|
+
min: z.number(),
|
|
44
|
+
p50: z.number(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function eligibilityPriceBandToJSON(
|
|
48
|
+
eligibilityPriceBand: EligibilityPriceBand,
|
|
49
|
+
): string {
|
|
50
|
+
return JSON.stringify(
|
|
51
|
+
EligibilityPriceBand$outboundSchema.parse(eligibilityPriceBand),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
export function eligibilityPriceBandFromJSON(
|
|
55
|
+
jsonString: string,
|
|
56
|
+
): SafeParseResult<EligibilityPriceBand, SDKValidationError> {
|
|
57
|
+
return safeParse(
|
|
58
|
+
jsonString,
|
|
59
|
+
(x) => EligibilityPriceBand$inboundSchema.parse(JSON.parse(x)),
|
|
60
|
+
`Failed to parse 'EligibilityPriceBand' from JSON`,
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
AcceleratorSpec,
|
|
11
|
+
AcceleratorSpec$inboundSchema,
|
|
12
|
+
AcceleratorSpec$Outbound,
|
|
13
|
+
AcceleratorSpec$outboundSchema,
|
|
14
|
+
} from "./acceleratorspec.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Pre-submission eligibility preview request. Mirrors the job form's accelerator block: type, count, and optional ordered fallback types.
|
|
18
|
+
*/
|
|
19
|
+
export type EligibilityRequest = {
|
|
20
|
+
/**
|
|
21
|
+
* A hardware accelerator request — GPU, NPU, TPU, or similar.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
*
|
|
25
|
+
* Request an accelerator by type and count, with optional fallback types.
|
|
26
|
+
*/
|
|
27
|
+
accelerator: AcceleratorSpec;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const EligibilityRequest$inboundSchema: z.ZodType<
|
|
32
|
+
EligibilityRequest,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
accelerator: AcceleratorSpec$inboundSchema,
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type EligibilityRequest$Outbound = {
|
|
40
|
+
accelerator: AcceleratorSpec$Outbound;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const EligibilityRequest$outboundSchema: z.ZodType<
|
|
45
|
+
EligibilityRequest$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
EligibilityRequest
|
|
48
|
+
> = z.object({
|
|
49
|
+
accelerator: AcceleratorSpec$outboundSchema,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export function eligibilityRequestToJSON(
|
|
53
|
+
eligibilityRequest: EligibilityRequest,
|
|
54
|
+
): string {
|
|
55
|
+
return JSON.stringify(
|
|
56
|
+
EligibilityRequest$outboundSchema.parse(eligibilityRequest),
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export function eligibilityRequestFromJSON(
|
|
60
|
+
jsonString: string,
|
|
61
|
+
): SafeParseResult<EligibilityRequest, SDKValidationError> {
|
|
62
|
+
return safeParse(
|
|
63
|
+
jsonString,
|
|
64
|
+
(x) => EligibilityRequest$inboundSchema.parse(JSON.parse(x)),
|
|
65
|
+
`Failed to parse 'EligibilityRequest' from JSON`,
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./acceleratorpriceband.js";
|
|
5
6
|
export * from "./acceleratorspec.js";
|
|
6
7
|
export * from "./acceleratortype.js";
|
|
7
8
|
export * from "./accessentry.js";
|
|
@@ -9,6 +10,7 @@ export * from "./accesslistresponse.js";
|
|
|
9
10
|
export * from "./accessmutationrequest.js";
|
|
10
11
|
export * from "./accessmutationresponse.js";
|
|
11
12
|
export * from "./acknowledgedsafetycheck.js";
|
|
13
|
+
export * from "./acquirability.js";
|
|
12
14
|
export * from "./activateregistryentryrequest.js";
|
|
13
15
|
export * from "./addcatalogmodelrequest.js";
|
|
14
16
|
export * from "./agent.js";
|
|
@@ -149,6 +151,9 @@ export * from "./dpohyperparameters.js";
|
|
|
149
151
|
export * from "./dragaction.js";
|
|
150
152
|
export * from "./effectivepricerow.js";
|
|
151
153
|
export * from "./effectivepricesresponse.js";
|
|
154
|
+
export * from "./eligibilitypreview.js";
|
|
155
|
+
export * from "./eligibilitypriceband.js";
|
|
156
|
+
export * from "./eligibilityrequest.js";
|
|
152
157
|
export * from "./embeddingmodel.js";
|
|
153
158
|
export * from "./embeddingmodellimits.js";
|
|
154
159
|
export * from "./embeddingmodellistresponse.js";
|
|
@@ -260,6 +260,7 @@ export * from "./llmrevoke.js";
|
|
|
260
260
|
export * from "./modifyvectorstore.js";
|
|
261
261
|
export * from "./pauseagentschedule.js";
|
|
262
262
|
export * from "./pausefinetuningjob.js";
|
|
263
|
+
export * from "./previeweligibility.js";
|
|
263
264
|
export * from "./proxybrowserportrequest.js";
|
|
264
265
|
export * from "./putorgautomodel.js";
|
|
265
266
|
export * from "./regeneratescopedapikey.js";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type PreviewEligibilityRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Optional external end-user identifier forwarded by the API gateway.
|
|
15
|
+
*/
|
|
16
|
+
xOnBehalfOf?: string | undefined;
|
|
17
|
+
eligibilityRequest: components.EligibilityRequest;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const PreviewEligibilityRequest$inboundSchema: z.ZodType<
|
|
22
|
+
PreviewEligibilityRequest,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
"X-On-Behalf-Of": z.string().optional(),
|
|
27
|
+
EligibilityRequest: components.EligibilityRequest$inboundSchema,
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
31
|
+
"EligibilityRequest": "eligibilityRequest",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type PreviewEligibilityRequest$Outbound = {
|
|
36
|
+
"X-On-Behalf-Of"?: string | undefined;
|
|
37
|
+
EligibilityRequest: components.EligibilityRequest$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const PreviewEligibilityRequest$outboundSchema: z.ZodType<
|
|
42
|
+
PreviewEligibilityRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
PreviewEligibilityRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
xOnBehalfOf: z.string().optional(),
|
|
47
|
+
eligibilityRequest: components.EligibilityRequest$outboundSchema,
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
xOnBehalfOf: "X-On-Behalf-Of",
|
|
51
|
+
eligibilityRequest: "EligibilityRequest",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function previewEligibilityRequestToJSON(
|
|
56
|
+
previewEligibilityRequest: PreviewEligibilityRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
PreviewEligibilityRequest$outboundSchema.parse(previewEligibilityRequest),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export function previewEligibilityRequestFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<PreviewEligibilityRequest, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => PreviewEligibilityRequest$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'PreviewEligibilityRequest' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -307,6 +307,7 @@ export * from "./servingDeploymentsRegister.js";
|
|
|
307
307
|
export * from "./servingDeploymentsRollback.js";
|
|
308
308
|
export * from "./servingDeploymentsUpdate.js";
|
|
309
309
|
export * from "./servingDeploymentsUpdateScaling.js";
|
|
310
|
+
export * from "./servingEligibilityPreview.js";
|
|
310
311
|
export * from "./servingFinetuneJobsCancel.js";
|
|
311
312
|
export * from "./servingFinetuneJobsCreate.js";
|
|
312
313
|
export * from "./servingFinetuneJobsGet.js";
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { servingEligibilityPreview } from "../funcs/servingEligibilityPreview.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
28
|
+
import { useSDKContext } from "./_context.js";
|
|
29
|
+
import { MutationHookOptions } from "./_types.js";
|
|
30
|
+
|
|
31
|
+
export type ServingEligibilityPreviewMutationVariables = {
|
|
32
|
+
request: operations.PreviewEligibilityRequest;
|
|
33
|
+
options?: RequestOptions;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type ServingEligibilityPreviewMutationData =
|
|
37
|
+
components.EligibilityPreview;
|
|
38
|
+
|
|
39
|
+
export type ServingEligibilityPreviewMutationError =
|
|
40
|
+
| errors.ServingError
|
|
41
|
+
| errors.ServingHTTPValidationError
|
|
42
|
+
| SDKError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Preview accelerator eligibility
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* Preview, before submitting a job or deployment, how much matching capacity the cluster can currently acquire and how likely it is to start. The response is provider-anonymous: counts, price bands, and advice only. This is an advisory read; it reserves nothing.
|
|
56
|
+
*/
|
|
57
|
+
export function useServingEligibilityPreviewMutation(
|
|
58
|
+
options?: MutationHookOptions<
|
|
59
|
+
ServingEligibilityPreviewMutationData,
|
|
60
|
+
ServingEligibilityPreviewMutationError,
|
|
61
|
+
ServingEligibilityPreviewMutationVariables
|
|
62
|
+
>,
|
|
63
|
+
): UseMutationResult<
|
|
64
|
+
ServingEligibilityPreviewMutationData,
|
|
65
|
+
ServingEligibilityPreviewMutationError,
|
|
66
|
+
ServingEligibilityPreviewMutationVariables
|
|
67
|
+
> {
|
|
68
|
+
const client = useSDKContext();
|
|
69
|
+
return useMutation({
|
|
70
|
+
...buildServingEligibilityPreviewMutation(client, options),
|
|
71
|
+
...options,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function mutationKeyServingEligibilityPreview(): MutationKey {
|
|
76
|
+
return ["@meetkai/mka1", "eligibility", "preview"];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function buildServingEligibilityPreviewMutation(
|
|
80
|
+
client$: SDKCore,
|
|
81
|
+
hookOptions?: RequestOptions,
|
|
82
|
+
): {
|
|
83
|
+
mutationKey: MutationKey;
|
|
84
|
+
mutationFn: (
|
|
85
|
+
variables: ServingEligibilityPreviewMutationVariables,
|
|
86
|
+
) => Promise<ServingEligibilityPreviewMutationData>;
|
|
87
|
+
} {
|
|
88
|
+
return {
|
|
89
|
+
mutationKey: mutationKeyServingEligibilityPreview(),
|
|
90
|
+
mutationFn: function servingEligibilityPreviewMutationFn({
|
|
91
|
+
request,
|
|
92
|
+
options,
|
|
93
|
+
}): Promise<ServingEligibilityPreviewMutationData> {
|
|
94
|
+
const mergedOptions = {
|
|
95
|
+
...hookOptions,
|
|
96
|
+
...options,
|
|
97
|
+
fetchOptions: {
|
|
98
|
+
...hookOptions?.fetchOptions,
|
|
99
|
+
...options?.fetchOptions,
|
|
100
|
+
signal: combineSignals(
|
|
101
|
+
hookOptions?.fetchOptions?.signal,
|
|
102
|
+
options?.fetchOptions?.signal,
|
|
103
|
+
),
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
return unwrapAsync(servingEligibilityPreview(
|
|
107
|
+
client$,
|
|
108
|
+
request,
|
|
109
|
+
mergedOptions,
|
|
110
|
+
));
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { servingEligibilityPreview } from "../funcs/servingEligibilityPreview.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as components from "../models/components/index.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class Eligibility extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Preview accelerator eligibility
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Preview, before submitting a job or deployment, how much matching capacity the cluster can currently acquire and how likely it is to start. The response is provider-anonymous: counts, price bands, and advice only. This is an advisory read; it reserves nothing.
|
|
17
|
+
*/
|
|
18
|
+
async preview(
|
|
19
|
+
request: operations.PreviewEligibilityRequest,
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): Promise<components.EligibilityPreview> {
|
|
22
|
+
return unwrapAsync(servingEligibilityPreview(
|
|
23
|
+
this,
|
|
24
|
+
request,
|
|
25
|
+
options,
|
|
26
|
+
));
|
|
27
|
+
}
|
|
28
|
+
}
|
package/src/sdk/serving.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { ClientSDK } from "../lib/sdks.js";
|
|
6
6
|
import { Accelerators } from "./accelerators.js";
|
|
7
7
|
import { Deployments } from "./deployments.js";
|
|
8
|
+
import { Eligibility } from "./eligibility.js";
|
|
8
9
|
import { FinetuneJobs } from "./finetunejobs.js";
|
|
9
10
|
import { Recipes } from "./recipes.js";
|
|
10
11
|
import { SDKImages } from "./sdkimages.js";
|
|
@@ -25,6 +26,11 @@ export class Serving extends ClientSDK {
|
|
|
25
26
|
return (this._deployments ??= new Deployments(this._options));
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
private _eligibility?: Eligibility;
|
|
30
|
+
get eligibility(): Eligibility {
|
|
31
|
+
return (this._eligibility ??= new Eligibility(this._options));
|
|
32
|
+
}
|
|
33
|
+
|
|
28
34
|
private _finetuneJobs?: FinetuneJobs;
|
|
29
35
|
get finetuneJobs(): FinetuneJobs {
|
|
30
36
|
return (this._finetuneJobs ??= new FinetuneJobs(this._options));
|