@meetkai/mka1 0.51.15 → 0.51.16
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 +230 -227
- package/bin/mcp-server.js +303 -116
- package/bin/mcp-server.js.map +19 -16
- package/dist/commonjs/funcs/servingFinetuneJobsCreate.js +1 -1
- package/dist/commonjs/funcs/servingFinetuneJobsCreate.js.map +1 -1
- package/dist/commonjs/funcs/servingSecretsGet.d.ts +19 -0
- package/dist/commonjs/funcs/servingSecretsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/servingSecretsGet.js +136 -0
- package/dist/commonjs/funcs/servingSecretsGet.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/servingSecretsGet.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/servingSecretsGet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingSecretsGet.js +64 -0
- package/dist/commonjs/mcp-server/tools/servingSecretsGet.js.map +1 -0
- package/dist/commonjs/models/components/deploymentcreate.d.ts +3 -0
- package/dist/commonjs/models/components/deploymentcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/deploymentcreate.js.map +1 -1
- package/dist/commonjs/models/components/finetunejobcreate.d.ts +3 -0
- package/dist/commonjs/models/components/finetunejobcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/finetunejobcreate.js.map +1 -1
- package/dist/commonjs/models/components/metrics.d.ts +3 -5
- package/dist/commonjs/models/components/metrics.d.ts.map +1 -1
- package/dist/commonjs/models/components/metrics.js +4 -8
- package/dist/commonjs/models/components/metrics.js.map +1 -1
- package/dist/commonjs/models/components/model.d.ts +5 -0
- package/dist/commonjs/models/components/model.d.ts.map +1 -1
- package/dist/commonjs/models/components/model.js +4 -0
- package/dist/commonjs/models/components/model.js.map +1 -1
- package/dist/commonjs/models/components/secret.d.ts +15 -0
- package/dist/commonjs/models/components/secret.d.ts.map +1 -1
- package/dist/commonjs/models/components/secret.js +14 -1
- package/dist/commonjs/models/components/secret.js.map +1 -1
- package/dist/commonjs/models/components/secretcreate.d.ts +15 -0
- package/dist/commonjs/models/components/secretcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/secretcreate.js +20 -1
- package/dist/commonjs/models/components/secretcreate.js.map +1 -1
- package/dist/commonjs/models/components/spendsummary.d.ts +3 -3
- package/dist/commonjs/models/components/spendsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/spendsummary.js +2 -2
- package/dist/commonjs/models/components/spendsummary.js.map +1 -1
- package/dist/commonjs/models/components/volume.d.ts +26 -0
- package/dist/commonjs/models/components/volume.d.ts.map +1 -1
- package/dist/commonjs/models/components/volume.js +18 -1
- package/dist/commonjs/models/components/volume.js.map +1 -1
- package/dist/commonjs/models/operations/getsecret.d.ts +22 -0
- package/dist/commonjs/models/operations/getsecret.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getsecret.js +71 -0
- package/dist/commonjs/models/operations/getsecret.js.map +1 -0
- 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/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/servingSecretsGet.core.d.ts +15 -0
- package/dist/commonjs/react-query/servingSecretsGet.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingSecretsGet.core.js +36 -0
- package/dist/commonjs/react-query/servingSecretsGet.core.js.map +1 -0
- package/dist/commonjs/react-query/servingSecretsGet.d.ts +39 -0
- package/dist/commonjs/react-query/servingSecretsGet.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingSecretsGet.js +60 -0
- package/dist/commonjs/react-query/servingSecretsGet.js.map +1 -0
- package/dist/commonjs/sdk/secrets.d.ts +7 -0
- package/dist/commonjs/sdk/secrets.d.ts.map +1 -1
- package/dist/commonjs/sdk/secrets.js +10 -0
- package/dist/commonjs/sdk/secrets.js.map +1 -1
- package/dist/esm/funcs/servingFinetuneJobsCreate.js +1 -1
- package/dist/esm/funcs/servingFinetuneJobsCreate.js.map +1 -1
- package/dist/esm/funcs/servingSecretsGet.d.ts +19 -0
- package/dist/esm/funcs/servingSecretsGet.d.ts.map +1 -0
- package/dist/esm/funcs/servingSecretsGet.js +100 -0
- package/dist/esm/funcs/servingSecretsGet.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/servingSecretsGet.d.ts +8 -0
- package/dist/esm/mcp-server/tools/servingSecretsGet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/servingSecretsGet.js +28 -0
- package/dist/esm/mcp-server/tools/servingSecretsGet.js.map +1 -0
- package/dist/esm/models/components/deploymentcreate.d.ts +3 -0
- package/dist/esm/models/components/deploymentcreate.d.ts.map +1 -1
- package/dist/esm/models/components/deploymentcreate.js.map +1 -1
- package/dist/esm/models/components/finetunejobcreate.d.ts +3 -0
- package/dist/esm/models/components/finetunejobcreate.d.ts.map +1 -1
- package/dist/esm/models/components/finetunejobcreate.js.map +1 -1
- package/dist/esm/models/components/metrics.d.ts +3 -5
- package/dist/esm/models/components/metrics.d.ts.map +1 -1
- package/dist/esm/models/components/metrics.js +4 -8
- package/dist/esm/models/components/metrics.js.map +1 -1
- package/dist/esm/models/components/model.d.ts +5 -0
- package/dist/esm/models/components/model.d.ts.map +1 -1
- package/dist/esm/models/components/model.js +4 -0
- package/dist/esm/models/components/model.js.map +1 -1
- package/dist/esm/models/components/secret.d.ts +15 -0
- package/dist/esm/models/components/secret.d.ts.map +1 -1
- package/dist/esm/models/components/secret.js +13 -0
- package/dist/esm/models/components/secret.js.map +1 -1
- package/dist/esm/models/components/secretcreate.d.ts +15 -0
- package/dist/esm/models/components/secretcreate.d.ts.map +1 -1
- package/dist/esm/models/components/secretcreate.js +19 -0
- package/dist/esm/models/components/secretcreate.js.map +1 -1
- package/dist/esm/models/components/spendsummary.d.ts +3 -3
- package/dist/esm/models/components/spendsummary.d.ts.map +1 -1
- package/dist/esm/models/components/spendsummary.js +2 -2
- package/dist/esm/models/components/spendsummary.js.map +1 -1
- package/dist/esm/models/components/volume.d.ts +26 -0
- package/dist/esm/models/components/volume.d.ts.map +1 -1
- package/dist/esm/models/components/volume.js +17 -0
- package/dist/esm/models/components/volume.js.map +1 -1
- package/dist/esm/models/operations/getsecret.d.ts +22 -0
- package/dist/esm/models/operations/getsecret.d.ts.map +1 -0
- package/dist/esm/models/operations/getsecret.js +33 -0
- package/dist/esm/models/operations/getsecret.js.map +1 -0
- 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/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/servingSecretsGet.core.d.ts +15 -0
- package/dist/esm/react-query/servingSecretsGet.core.d.ts.map +1 -0
- package/dist/esm/react-query/servingSecretsGet.core.js +31 -0
- package/dist/esm/react-query/servingSecretsGet.core.js.map +1 -0
- package/dist/esm/react-query/servingSecretsGet.d.ts +39 -0
- package/dist/esm/react-query/servingSecretsGet.d.ts.map +1 -0
- package/dist/esm/react-query/servingSecretsGet.js +50 -0
- package/dist/esm/react-query/servingSecretsGet.js.map +1 -0
- package/dist/esm/sdk/secrets.d.ts +7 -0
- package/dist/esm/sdk/secrets.d.ts.map +1 -1
- package/dist/esm/sdk/secrets.js +10 -0
- package/dist/esm/sdk/secrets.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/servingFinetuneJobsCreate.ts +1 -1
- package/src/funcs/servingSecretsGet.ts +196 -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/servingSecretsGet.ts +37 -0
- package/src/models/components/deploymentcreate.ts +3 -0
- package/src/models/components/finetunejobcreate.ts +3 -0
- package/src/models/components/metrics.ts +7 -13
- package/src/models/components/model.ts +9 -0
- package/src/models/components/secret.ts +23 -0
- package/src/models/components/secretcreate.ts +32 -0
- package/src/models/components/spendsummary.ts +5 -5
- package/src/models/components/volume.ts +36 -0
- package/src/models/operations/getsecret.ts +69 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/servingSecretsGet.core.ts +76 -0
- package/src/react-query/servingSecretsGet.ts +141 -0
- package/src/sdk/secrets.ts +18 -0
|
@@ -23,5 +23,12 @@ export declare class Secrets extends ClientSDK {
|
|
|
23
23
|
* Delete a secret.
|
|
24
24
|
*/
|
|
25
25
|
delete(request: operations.DeleteSecretRequest, options?: RequestOptions): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Get a secret
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Retrieve secret metadata: key names and allowed use. Values are never returned.
|
|
31
|
+
*/
|
|
32
|
+
get(request: operations.GetSecretRequest, options?: RequestOptions): Promise<components.Secret>;
|
|
26
33
|
}
|
|
27
34
|
//# sourceMappingURL=secrets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../../src/sdk/secrets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../../src/sdk/secrets.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;IAQjC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;IAQ7B;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;OAKG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,gBAAgB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;CAO9B"}
|
package/dist/esm/sdk/secrets.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { servingSecretsCreate } from "../funcs/servingSecretsCreate.js";
|
|
5
5
|
import { servingSecretsDelete } from "../funcs/servingSecretsDelete.js";
|
|
6
|
+
import { servingSecretsGet } from "../funcs/servingSecretsGet.js";
|
|
6
7
|
import { servingSecretsList } from "../funcs/servingSecretsList.js";
|
|
7
8
|
import { ClientSDK } from "../lib/sdks.js";
|
|
8
9
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -34,5 +35,14 @@ export class Secrets extends ClientSDK {
|
|
|
34
35
|
async delete(request, options) {
|
|
35
36
|
return unwrapAsync(servingSecretsDelete(this, request, options));
|
|
36
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Get a secret
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Retrieve secret metadata: key names and allowed use. Values are never returned.
|
|
43
|
+
*/
|
|
44
|
+
async get(request, options) {
|
|
45
|
+
return unwrapAsync(servingSecretsGet(this, request, options));
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
//# sourceMappingURL=secrets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../../src/sdk/secrets.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,oBAAoB,CACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,oBAAoB,CACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../../src/sdk/secrets.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAkB,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,OAAQ,SAAQ,SAAS;IACpC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,oBAAoB,CACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,oBAAoB,CACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAoC,EACpC,OAAwB;QAExB,OAAO,WAAW,CAAC,iBAAiB,CAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -178,7 +178,7 @@ async function $do(
|
|
|
178
178
|
| SDKValidationError
|
|
179
179
|
>(
|
|
180
180
|
M.json(201, components.FinetuneJob$inboundSchema),
|
|
181
|
-
M.jsonErr(403, errors.ServingError$inboundSchema),
|
|
181
|
+
M.jsonErr([403, 409], errors.ServingError$inboundSchema),
|
|
182
182
|
M.jsonErr(422, errors.ServingHTTPValidationError$inboundSchema),
|
|
183
183
|
M.fail([401, "4XX"]),
|
|
184
184
|
M.fail("5XX"),
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.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 { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Get a secret
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Retrieve secret metadata: key names and allowed use. Values are never returned.
|
|
35
|
+
*/
|
|
36
|
+
export function servingSecretsGet(
|
|
37
|
+
client: SDKCore,
|
|
38
|
+
request: operations.GetSecretRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
components.Secret,
|
|
43
|
+
| errors.ServingError
|
|
44
|
+
| errors.ServingHTTPValidationError
|
|
45
|
+
| SDKError
|
|
46
|
+
| ResponseValidationError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| UnexpectedClientError
|
|
52
|
+
| SDKValidationError
|
|
53
|
+
>
|
|
54
|
+
> {
|
|
55
|
+
return new APIPromise($do(
|
|
56
|
+
client,
|
|
57
|
+
request,
|
|
58
|
+
options,
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function $do(
|
|
63
|
+
client: SDKCore,
|
|
64
|
+
request: operations.GetSecretRequest,
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): Promise<
|
|
67
|
+
[
|
|
68
|
+
Result<
|
|
69
|
+
components.Secret,
|
|
70
|
+
| errors.ServingError
|
|
71
|
+
| errors.ServingHTTPValidationError
|
|
72
|
+
| SDKError
|
|
73
|
+
| ResponseValidationError
|
|
74
|
+
| ConnectionError
|
|
75
|
+
| RequestAbortedError
|
|
76
|
+
| RequestTimeoutError
|
|
77
|
+
| InvalidRequestError
|
|
78
|
+
| UnexpectedClientError
|
|
79
|
+
| SDKValidationError
|
|
80
|
+
>,
|
|
81
|
+
APICall,
|
|
82
|
+
]
|
|
83
|
+
> {
|
|
84
|
+
const parsed = safeParse(
|
|
85
|
+
request,
|
|
86
|
+
(value) => operations.GetSecretRequest$outboundSchema.parse(value),
|
|
87
|
+
"Input validation failed",
|
|
88
|
+
);
|
|
89
|
+
if (!parsed.ok) {
|
|
90
|
+
return [parsed, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const payload = parsed.value;
|
|
93
|
+
const body = null;
|
|
94
|
+
|
|
95
|
+
const pathParams = {
|
|
96
|
+
secret_id: encodeSimple("secret_id", payload.secret_id, {
|
|
97
|
+
explode: false,
|
|
98
|
+
charEncoding: "percent",
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
const path = pathToFunc("/api/v1/serving/secrets/{secret_id}")(pathParams);
|
|
102
|
+
|
|
103
|
+
const headers = new Headers(compactMap({
|
|
104
|
+
Accept: "application/json",
|
|
105
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
106
|
+
"X-On-Behalf-Of",
|
|
107
|
+
payload["X-On-Behalf-Of"],
|
|
108
|
+
{ explode: false, charEncoding: "none" },
|
|
109
|
+
),
|
|
110
|
+
}));
|
|
111
|
+
|
|
112
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
113
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
114
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
115
|
+
|
|
116
|
+
const context = {
|
|
117
|
+
options: client._options,
|
|
118
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
119
|
+
operationID: "getSecret",
|
|
120
|
+
oAuth2Scopes: null,
|
|
121
|
+
|
|
122
|
+
resolvedSecurity: requestSecurity,
|
|
123
|
+
|
|
124
|
+
securitySource: client._options.bearerAuth,
|
|
125
|
+
retryConfig: options?.retries
|
|
126
|
+
|| client._options.retryConfig
|
|
127
|
+
|| {
|
|
128
|
+
strategy: "backoff",
|
|
129
|
+
backoff: {
|
|
130
|
+
initialInterval: 500,
|
|
131
|
+
maxInterval: 5000,
|
|
132
|
+
exponent: 1.5,
|
|
133
|
+
maxElapsedTime: 15000,
|
|
134
|
+
},
|
|
135
|
+
retryConnectionErrors: true,
|
|
136
|
+
}
|
|
137
|
+
|| { strategy: "none" },
|
|
138
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const requestRes = client._createRequest(context, {
|
|
142
|
+
security: requestSecurity,
|
|
143
|
+
method: "GET",
|
|
144
|
+
baseURL: options?.serverURL,
|
|
145
|
+
path: path,
|
|
146
|
+
headers: headers,
|
|
147
|
+
body: body,
|
|
148
|
+
userAgent: client._options.userAgent,
|
|
149
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
150
|
+
}, options);
|
|
151
|
+
if (!requestRes.ok) {
|
|
152
|
+
return [requestRes, { status: "invalid" }];
|
|
153
|
+
}
|
|
154
|
+
const req = requestRes.value;
|
|
155
|
+
|
|
156
|
+
const doResult = await client._do(req, {
|
|
157
|
+
context,
|
|
158
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
159
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
160
|
+
retryConfig: context.retryConfig,
|
|
161
|
+
retryCodes: context.retryCodes,
|
|
162
|
+
});
|
|
163
|
+
if (!doResult.ok) {
|
|
164
|
+
return [doResult, { status: "request-error", request: req }];
|
|
165
|
+
}
|
|
166
|
+
const response = doResult.value;
|
|
167
|
+
|
|
168
|
+
const responseFields = {
|
|
169
|
+
HttpMeta: { Response: response, Request: req },
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const [result] = await M.match<
|
|
173
|
+
components.Secret,
|
|
174
|
+
| errors.ServingError
|
|
175
|
+
| errors.ServingHTTPValidationError
|
|
176
|
+
| SDKError
|
|
177
|
+
| ResponseValidationError
|
|
178
|
+
| ConnectionError
|
|
179
|
+
| RequestAbortedError
|
|
180
|
+
| RequestTimeoutError
|
|
181
|
+
| InvalidRequestError
|
|
182
|
+
| UnexpectedClientError
|
|
183
|
+
| SDKValidationError
|
|
184
|
+
>(
|
|
185
|
+
M.json(200, components.Secret$inboundSchema),
|
|
186
|
+
M.jsonErr([403, 404], errors.ServingError$inboundSchema),
|
|
187
|
+
M.jsonErr(422, errors.ServingHTTPValidationError$inboundSchema),
|
|
188
|
+
M.fail([401, "4XX"]),
|
|
189
|
+
M.fail("5XX"),
|
|
190
|
+
)(response, req, { extraFields: responseFields });
|
|
191
|
+
if (!result.ok) {
|
|
192
|
+
return [result, { status: "complete", request: req, response }];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return [result, { status: "complete", request: req, response }];
|
|
196
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.1.0",
|
|
68
|
-
sdkVersion: "0.51.
|
|
68
|
+
sdkVersion: "0.51.16",
|
|
69
69
|
genVersion: "2.918.4",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.51.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.51.16 2.918.4 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -338,6 +338,7 @@ import { tool$servingRecipesRegister } from "./tools/servingRecipesRegister.js";
|
|
|
338
338
|
import { tool$servingRecipesSetEnabled } from "./tools/servingRecipesSetEnabled.js";
|
|
339
339
|
import { tool$servingSecretsCreate } from "./tools/servingSecretsCreate.js";
|
|
340
340
|
import { tool$servingSecretsDelete } from "./tools/servingSecretsDelete.js";
|
|
341
|
+
import { tool$servingSecretsGet } from "./tools/servingSecretsGet.js";
|
|
341
342
|
import { tool$servingSecretsList } from "./tools/servingSecretsList.js";
|
|
342
343
|
import { tool$servingSpendGet } from "./tools/servingSpendGet.js";
|
|
343
344
|
import { tool$servingTenantsDeleteOrganization } from "./tools/servingTenantsDeleteOrganization.js";
|
|
@@ -362,7 +363,7 @@ export function createMCPServer(deps: {
|
|
|
362
363
|
}) {
|
|
363
364
|
const server = new McpServer({
|
|
364
365
|
name: "SDK",
|
|
365
|
-
version: "0.51.
|
|
366
|
+
version: "0.51.16",
|
|
366
367
|
});
|
|
367
368
|
|
|
368
369
|
const client = new SDKCore({
|
|
@@ -720,6 +721,7 @@ export function createMCPServer(deps: {
|
|
|
720
721
|
tool(tool$servingSecretsList);
|
|
721
722
|
tool(tool$servingSecretsCreate);
|
|
722
723
|
tool(tool$servingSecretsDelete);
|
|
724
|
+
tool(tool$servingSecretsGet);
|
|
723
725
|
tool(tool$servingSpendGet);
|
|
724
726
|
tool(tool$servingTenantsList);
|
|
725
727
|
tool(tool$servingTenantsGet);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { servingSecretsGet } from "../../funcs/servingSecretsGet.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetSecretRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$servingSecretsGet: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "serving-secrets-get",
|
|
15
|
+
description: `Get a secret
|
|
16
|
+
|
|
17
|
+
Retrieve secret metadata: key names and allowed use. Values are never returned.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await servingSecretsGet(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -95,6 +95,9 @@ export type DeploymentCreate = {
|
|
|
95
95
|
* Create-time scaling. Omitted min_containers defaults to one; explicit zero is preserved.
|
|
96
96
|
*/
|
|
97
97
|
scaling?: DeploymentScalingCreate | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Each referenced secret must include "serving" in its allowed_use.
|
|
100
|
+
*/
|
|
98
101
|
secrets?: Array<string> | undefined;
|
|
99
102
|
/**
|
|
100
103
|
* How a config change or rollback is rolled out.
|
|
@@ -12,11 +12,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
* Live serving metrics for a deployment.
|
|
13
13
|
*/
|
|
14
14
|
export type Metrics = {
|
|
15
|
-
acceleratorMemoryUsedMb: number;
|
|
16
15
|
/**
|
|
17
|
-
* 0.0–1.0 across replicas
|
|
16
|
+
* 0.0–1.0 serving-engine KV-cache usage averaged across Ready replicas
|
|
18
17
|
*/
|
|
19
|
-
|
|
18
|
+
kvCacheUtilization: number;
|
|
20
19
|
/**
|
|
21
20
|
* Requests waiting for a free replica
|
|
22
21
|
*/
|
|
@@ -28,23 +27,20 @@ export type Metrics = {
|
|
|
28
27
|
/** @internal */
|
|
29
28
|
export const Metrics$inboundSchema: z.ZodType<Metrics, z.ZodTypeDef, unknown> =
|
|
30
29
|
z.object({
|
|
31
|
-
|
|
32
|
-
accelerator_utilization: z.number(),
|
|
30
|
+
kv_cache_utilization: z.number(),
|
|
33
31
|
queue_backlog: z.number().int(),
|
|
34
32
|
replicas: z.number().int(),
|
|
35
33
|
requests_per_second: z.number(),
|
|
36
34
|
}).transform((v) => {
|
|
37
35
|
return remap$(v, {
|
|
38
|
-
"
|
|
39
|
-
"accelerator_utilization": "acceleratorUtilization",
|
|
36
|
+
"kv_cache_utilization": "kvCacheUtilization",
|
|
40
37
|
"queue_backlog": "queueBacklog",
|
|
41
38
|
"requests_per_second": "requestsPerSecond",
|
|
42
39
|
});
|
|
43
40
|
});
|
|
44
41
|
/** @internal */
|
|
45
42
|
export type Metrics$Outbound = {
|
|
46
|
-
|
|
47
|
-
accelerator_utilization: number;
|
|
43
|
+
kv_cache_utilization: number;
|
|
48
44
|
queue_backlog: number;
|
|
49
45
|
replicas: number;
|
|
50
46
|
requests_per_second: number;
|
|
@@ -56,15 +52,13 @@ export const Metrics$outboundSchema: z.ZodType<
|
|
|
56
52
|
z.ZodTypeDef,
|
|
57
53
|
Metrics
|
|
58
54
|
> = z.object({
|
|
59
|
-
|
|
60
|
-
acceleratorUtilization: z.number(),
|
|
55
|
+
kvCacheUtilization: z.number(),
|
|
61
56
|
queueBacklog: z.number().int(),
|
|
62
57
|
replicas: z.number().int(),
|
|
63
58
|
requestsPerSecond: z.number(),
|
|
64
59
|
}).transform((v) => {
|
|
65
60
|
return remap$(v, {
|
|
66
|
-
|
|
67
|
-
acceleratorUtilization: "accelerator_utilization",
|
|
61
|
+
kvCacheUtilization: "kv_cache_utilization",
|
|
68
62
|
queueBacklog: "queue_backlog",
|
|
69
63
|
requestsPerSecond: "requests_per_second",
|
|
70
64
|
});
|
|
@@ -13,6 +13,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export type Model = {
|
|
15
15
|
createdAt: Date;
|
|
16
|
+
/**
|
|
17
|
+
* Managed runtime recipes that can serve this model one-click; empty means the model is not deployable via a managed runtime (preflight signal, not a create-time error)
|
|
18
|
+
*/
|
|
19
|
+
deployableRuntimes: Array<string>;
|
|
16
20
|
id: string;
|
|
17
21
|
name: string;
|
|
18
22
|
revision?: string | null | undefined;
|
|
@@ -25,6 +29,7 @@ export const Model$inboundSchema: z.ZodType<Model, z.ZodTypeDef, unknown> = z
|
|
|
25
29
|
created_at: z.string().datetime({ offset: true }).transform(v =>
|
|
26
30
|
new Date(v)
|
|
27
31
|
),
|
|
32
|
+
deployable_runtimes: z.array(z.string()),
|
|
28
33
|
id: z.string(),
|
|
29
34
|
name: z.string(),
|
|
30
35
|
revision: z.nullable(z.string()).optional(),
|
|
@@ -32,11 +37,13 @@ export const Model$inboundSchema: z.ZodType<Model, z.ZodTypeDef, unknown> = z
|
|
|
32
37
|
}).transform((v) => {
|
|
33
38
|
return remap$(v, {
|
|
34
39
|
"created_at": "createdAt",
|
|
40
|
+
"deployable_runtimes": "deployableRuntimes",
|
|
35
41
|
});
|
|
36
42
|
});
|
|
37
43
|
/** @internal */
|
|
38
44
|
export type Model$Outbound = {
|
|
39
45
|
created_at: string;
|
|
46
|
+
deployable_runtimes: Array<string>;
|
|
40
47
|
id: string;
|
|
41
48
|
name: string;
|
|
42
49
|
revision?: string | null | undefined;
|
|
@@ -50,6 +57,7 @@ export const Model$outboundSchema: z.ZodType<
|
|
|
50
57
|
Model
|
|
51
58
|
> = z.object({
|
|
52
59
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
60
|
+
deployableRuntimes: z.array(z.string()),
|
|
53
61
|
id: z.string(),
|
|
54
62
|
name: z.string(),
|
|
55
63
|
revision: z.nullable(z.string()).optional(),
|
|
@@ -57,6 +65,7 @@ export const Model$outboundSchema: z.ZodType<
|
|
|
57
65
|
}).transform((v) => {
|
|
58
66
|
return remap$(v, {
|
|
59
67
|
createdAt: "created_at",
|
|
68
|
+
deployableRuntimes: "deployable_runtimes",
|
|
60
69
|
});
|
|
61
70
|
});
|
|
62
71
|
|
|
@@ -5,13 +5,24 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
|
|
12
|
+
export const AllowedUse = {
|
|
13
|
+
Finetune: "finetune",
|
|
14
|
+
Serving: "serving",
|
|
15
|
+
} as const;
|
|
16
|
+
export type AllowedUse = ClosedEnum<typeof AllowedUse>;
|
|
17
|
+
|
|
11
18
|
/**
|
|
12
19
|
* A secret. Only key names are ever returned, never values.
|
|
13
20
|
*/
|
|
14
21
|
export type Secret = {
|
|
22
|
+
/**
|
|
23
|
+
* Products that may resolve this secret into a workload environment
|
|
24
|
+
*/
|
|
25
|
+
allowedUse: Array<AllowedUse>;
|
|
15
26
|
createdAt: Date;
|
|
16
27
|
id: string;
|
|
17
28
|
/**
|
|
@@ -21,9 +32,17 @@ export type Secret = {
|
|
|
21
32
|
name: string;
|
|
22
33
|
};
|
|
23
34
|
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const AllowedUse$inboundSchema: z.ZodNativeEnum<typeof AllowedUse> = z
|
|
37
|
+
.nativeEnum(AllowedUse);
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const AllowedUse$outboundSchema: z.ZodNativeEnum<typeof AllowedUse> =
|
|
40
|
+
AllowedUse$inboundSchema;
|
|
41
|
+
|
|
24
42
|
/** @internal */
|
|
25
43
|
export const Secret$inboundSchema: z.ZodType<Secret, z.ZodTypeDef, unknown> = z
|
|
26
44
|
.object({
|
|
45
|
+
allowed_use: z.array(AllowedUse$inboundSchema),
|
|
27
46
|
created_at: z.string().datetime({ offset: true }).transform(v =>
|
|
28
47
|
new Date(v)
|
|
29
48
|
),
|
|
@@ -32,11 +51,13 @@ export const Secret$inboundSchema: z.ZodType<Secret, z.ZodTypeDef, unknown> = z
|
|
|
32
51
|
name: z.string(),
|
|
33
52
|
}).transform((v) => {
|
|
34
53
|
return remap$(v, {
|
|
54
|
+
"allowed_use": "allowedUse",
|
|
35
55
|
"created_at": "createdAt",
|
|
36
56
|
});
|
|
37
57
|
});
|
|
38
58
|
/** @internal */
|
|
39
59
|
export type Secret$Outbound = {
|
|
60
|
+
allowed_use: Array<string>;
|
|
40
61
|
created_at: string;
|
|
41
62
|
id: string;
|
|
42
63
|
keys: Array<string>;
|
|
@@ -49,12 +70,14 @@ export const Secret$outboundSchema: z.ZodType<
|
|
|
49
70
|
z.ZodTypeDef,
|
|
50
71
|
Secret
|
|
51
72
|
> = z.object({
|
|
73
|
+
allowedUse: z.array(AllowedUse$outboundSchema),
|
|
52
74
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
53
75
|
id: z.string(),
|
|
54
76
|
keys: z.array(z.string()),
|
|
55
77
|
name: z.string(),
|
|
56
78
|
}).transform((v) => {
|
|
57
79
|
return remap$(v, {
|
|
80
|
+
allowedUse: "allowed_use",
|
|
58
81
|
createdAt: "created_at",
|
|
59
82
|
});
|
|
60
83
|
});
|
|
@@ -3,14 +3,26 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
11
|
|
|
12
|
+
export const SecretCreateAllowedUse = {
|
|
13
|
+
Finetune: "finetune",
|
|
14
|
+
Serving: "serving",
|
|
15
|
+
} as const;
|
|
16
|
+
export type SecretCreateAllowedUse = ClosedEnum<typeof SecretCreateAllowedUse>;
|
|
17
|
+
|
|
10
18
|
/**
|
|
11
19
|
* Create a secret. Values are write-only and never returned.
|
|
12
20
|
*/
|
|
13
21
|
export type SecretCreate = {
|
|
22
|
+
/**
|
|
23
|
+
* Products that may resolve this secret into a workload environment. Defaults to both when omitted.
|
|
24
|
+
*/
|
|
25
|
+
allowedUse?: Array<SecretCreateAllowedUse> | undefined;
|
|
14
26
|
/**
|
|
15
27
|
* Key/value pairs injected as env vars
|
|
16
28
|
*/
|
|
@@ -18,17 +30,32 @@ export type SecretCreate = {
|
|
|
18
30
|
name: string;
|
|
19
31
|
};
|
|
20
32
|
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const SecretCreateAllowedUse$inboundSchema: z.ZodNativeEnum<
|
|
35
|
+
typeof SecretCreateAllowedUse
|
|
36
|
+
> = z.nativeEnum(SecretCreateAllowedUse);
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const SecretCreateAllowedUse$outboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof SecretCreateAllowedUse
|
|
40
|
+
> = SecretCreateAllowedUse$inboundSchema;
|
|
41
|
+
|
|
21
42
|
/** @internal */
|
|
22
43
|
export const SecretCreate$inboundSchema: z.ZodType<
|
|
23
44
|
SecretCreate,
|
|
24
45
|
z.ZodTypeDef,
|
|
25
46
|
unknown
|
|
26
47
|
> = z.object({
|
|
48
|
+
allowed_use: z.array(SecretCreateAllowedUse$inboundSchema).optional(),
|
|
27
49
|
data: z.record(z.string()),
|
|
28
50
|
name: z.string(),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
"allowed_use": "allowedUse",
|
|
54
|
+
});
|
|
29
55
|
});
|
|
30
56
|
/** @internal */
|
|
31
57
|
export type SecretCreate$Outbound = {
|
|
58
|
+
allowed_use?: Array<string> | undefined;
|
|
32
59
|
data: { [k: string]: string };
|
|
33
60
|
name: string;
|
|
34
61
|
};
|
|
@@ -39,8 +66,13 @@ export const SecretCreate$outboundSchema: z.ZodType<
|
|
|
39
66
|
z.ZodTypeDef,
|
|
40
67
|
SecretCreate
|
|
41
68
|
> = z.object({
|
|
69
|
+
allowedUse: z.array(SecretCreateAllowedUse$outboundSchema).optional(),
|
|
42
70
|
data: z.record(z.string()),
|
|
43
71
|
name: z.string(),
|
|
72
|
+
}).transform((v) => {
|
|
73
|
+
return remap$(v, {
|
|
74
|
+
allowedUse: "allowed_use",
|
|
75
|
+
});
|
|
44
76
|
});
|
|
45
77
|
|
|
46
78
|
export function secretCreateToJSON(secretCreate: SecretCreate): string {
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
} from "./spendwindow.js";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Aggregate spend computed as price × runtime overlap with the window; derived on read, never stored.
|
|
24
|
+
* Aggregate spend computed as price × runtime overlap with the window; derived on read, never stored. The deployments group is present only on clusters where the deployments product is available; fine-tune-only clusters return the finetune group alone.
|
|
25
25
|
*/
|
|
26
26
|
export type SpendSummary = {
|
|
27
27
|
/**
|
|
28
28
|
* Aggregate spend for one resource class.
|
|
29
29
|
*/
|
|
30
|
-
deployments
|
|
30
|
+
deployments?: SpendGroup | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* Aggregate spend for one resource class.
|
|
33
33
|
*/
|
|
@@ -48,7 +48,7 @@ export const SpendSummary$inboundSchema: z.ZodType<
|
|
|
48
48
|
z.ZodTypeDef,
|
|
49
49
|
unknown
|
|
50
50
|
> = z.object({
|
|
51
|
-
deployments: SpendGroup$inboundSchema,
|
|
51
|
+
deployments: SpendGroup$inboundSchema.optional(),
|
|
52
52
|
finetune: SpendGroup$inboundSchema,
|
|
53
53
|
total_usd: z.number(),
|
|
54
54
|
window: SpendWindow$inboundSchema,
|
|
@@ -59,7 +59,7 @@ export const SpendSummary$inboundSchema: z.ZodType<
|
|
|
59
59
|
});
|
|
60
60
|
/** @internal */
|
|
61
61
|
export type SpendSummary$Outbound = {
|
|
62
|
-
deployments
|
|
62
|
+
deployments?: SpendGroup$Outbound | undefined;
|
|
63
63
|
finetune: SpendGroup$Outbound;
|
|
64
64
|
total_usd: number;
|
|
65
65
|
window: SpendWindow$Outbound;
|
|
@@ -71,7 +71,7 @@ export const SpendSummary$outboundSchema: z.ZodType<
|
|
|
71
71
|
z.ZodTypeDef,
|
|
72
72
|
SpendSummary
|
|
73
73
|
> = z.object({
|
|
74
|
-
deployments: SpendGroup$outboundSchema,
|
|
74
|
+
deployments: SpendGroup$outboundSchema.optional(),
|
|
75
75
|
finetune: SpendGroup$outboundSchema,
|
|
76
76
|
totalUsd: z.number(),
|
|
77
77
|
window: SpendWindow$outboundSchema,
|