@meetkai/mka1 0.51.39 → 0.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +243 -92
- package/bin/mcp-server.js.map +29 -26
- 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/agent.d.ts +5 -3
- package/dist/commonjs/models/components/agent.d.ts.map +1 -1
- package/dist/commonjs/models/components/agent.js +2 -3
- package/dist/commonjs/models/components/agent.js.map +1 -1
- package/dist/commonjs/models/components/agentconnector.d.ts +7 -5
- package/dist/commonjs/models/components/agentconnector.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentconnector.js +4 -5
- package/dist/commonjs/models/components/agentconnector.js.map +1 -1
- package/dist/commonjs/models/components/agentrun.d.ts +11 -9
- package/dist/commonjs/models/components/agentrun.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentrun.js +8 -9
- package/dist/commonjs/models/components/agentrun.js.map +1 -1
- package/dist/commonjs/models/components/agentschedule.d.ts +7 -5
- package/dist/commonjs/models/components/agentschedule.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentschedule.js +4 -5
- package/dist/commonjs/models/components/agentschedule.js.map +1 -1
- package/dist/commonjs/models/components/agentversion.d.ts +5 -3
- package/dist/commonjs/models/components/agentversion.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentversion.js +2 -3
- package/dist/commonjs/models/components/agentversion.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/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/{jsonvalue.js → computevolumeinput.js} +30 -24
- package/dist/commonjs/models/components/computevolumeinput.js.map +1 -0
- package/dist/commonjs/models/components/createagentrequest.d.ts +5 -3
- package/dist/commonjs/models/components/createagentrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createagentrequest.js +2 -3
- package/dist/commonjs/models/components/createagentrequest.js.map +1 -1
- package/dist/commonjs/models/components/createagentrunrequest.d.ts +5 -3
- package/dist/commonjs/models/components/createagentrunrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createagentrunrequest.js +2 -3
- package/dist/commonjs/models/components/createagentrunrequest.js.map +1 -1
- package/dist/commonjs/models/components/createagentschedulerequest.d.ts +5 -3
- package/dist/commonjs/models/components/createagentschedulerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createagentschedulerequest.js +2 -3
- package/dist/commonjs/models/components/createagentschedulerequest.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +4 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +4 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/tooldefinition.d.ts +16 -11
- package/dist/commonjs/models/components/tooldefinition.d.ts.map +1 -1
- package/dist/commonjs/models/components/tooldefinition.js +10 -11
- package/dist/commonjs/models/components/tooldefinition.js.map +1 -1
- package/dist/commonjs/models/components/updateagentrequest.d.ts +5 -3
- package/dist/commonjs/models/components/updateagentrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/updateagentrequest.js +2 -3
- package/dist/commonjs/models/components/updateagentrequest.js.map +1 -1
- package/dist/commonjs/models/components/updateagentschedulerequest.d.ts +2 -3
- package/dist/commonjs/models/components/updateagentschedulerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/updateagentschedulerequest.js +2 -3
- package/dist/commonjs/models/components/updateagentschedulerequest.js.map +1 -1
- package/dist/commonjs/models/errors/errorenvelope.d.ts +2 -3
- package/dist/commonjs/models/errors/errorenvelope.d.ts.map +1 -1
- package/dist/commonjs/models/errors/errorenvelope.js +2 -3
- package/dist/commonjs/models/errors/errorenvelope.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/agent.d.ts +5 -3
- package/dist/esm/models/components/agent.d.ts.map +1 -1
- package/dist/esm/models/components/agent.js +2 -3
- package/dist/esm/models/components/agent.js.map +1 -1
- package/dist/esm/models/components/agentconnector.d.ts +7 -5
- package/dist/esm/models/components/agentconnector.d.ts.map +1 -1
- package/dist/esm/models/components/agentconnector.js +4 -5
- package/dist/esm/models/components/agentconnector.js.map +1 -1
- package/dist/esm/models/components/agentrun.d.ts +11 -9
- package/dist/esm/models/components/agentrun.d.ts.map +1 -1
- package/dist/esm/models/components/agentrun.js +8 -9
- package/dist/esm/models/components/agentrun.js.map +1 -1
- package/dist/esm/models/components/agentschedule.d.ts +7 -5
- package/dist/esm/models/components/agentschedule.d.ts.map +1 -1
- package/dist/esm/models/components/agentschedule.js +4 -5
- package/dist/esm/models/components/agentschedule.js.map +1 -1
- package/dist/esm/models/components/agentversion.d.ts +5 -3
- package/dist/esm/models/components/agentversion.d.ts.map +1 -1
- package/dist/esm/models/components/agentversion.js +2 -3
- package/dist/esm/models/components/agentversion.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/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/createagentrequest.d.ts +5 -3
- package/dist/esm/models/components/createagentrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createagentrequest.js +2 -3
- package/dist/esm/models/components/createagentrequest.js.map +1 -1
- package/dist/esm/models/components/createagentrunrequest.d.ts +5 -3
- package/dist/esm/models/components/createagentrunrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createagentrunrequest.js +2 -3
- package/dist/esm/models/components/createagentrunrequest.js.map +1 -1
- package/dist/esm/models/components/createagentschedulerequest.d.ts +5 -3
- package/dist/esm/models/components/createagentschedulerequest.d.ts.map +1 -1
- package/dist/esm/models/components/createagentschedulerequest.js +2 -3
- package/dist/esm/models/components/createagentschedulerequest.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +4 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +4 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/tooldefinition.d.ts +16 -11
- package/dist/esm/models/components/tooldefinition.d.ts.map +1 -1
- package/dist/esm/models/components/tooldefinition.js +10 -11
- package/dist/esm/models/components/tooldefinition.js.map +1 -1
- package/dist/esm/models/components/updateagentrequest.d.ts +5 -3
- package/dist/esm/models/components/updateagentrequest.d.ts.map +1 -1
- package/dist/esm/models/components/updateagentrequest.js +2 -3
- package/dist/esm/models/components/updateagentrequest.js.map +1 -1
- package/dist/esm/models/components/updateagentschedulerequest.d.ts +2 -3
- package/dist/esm/models/components/updateagentschedulerequest.d.ts.map +1 -1
- package/dist/esm/models/components/updateagentschedulerequest.js +2 -3
- package/dist/esm/models/components/updateagentschedulerequest.js.map +1 -1
- package/dist/esm/models/errors/errorenvelope.d.ts +2 -3
- package/dist/esm/models/errors/errorenvelope.d.ts.map +1 -1
- package/dist/esm/models/errors/errorenvelope.js +2 -3
- package/dist/esm/models/errors/errorenvelope.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/agent.ts +7 -10
- package/src/models/components/agentconnector.ts +11 -14
- package/src/models/components/agentrun.ts +19 -22
- package/src/models/components/agentschedule.ts +11 -14
- package/src/models/components/agentversion.ts +7 -10
- package/src/models/components/computeoffer.ts +12 -0
- 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/createagentrequest.ts +7 -10
- package/src/models/components/createagentrunrequest.ts +7 -10
- package/src/models/components/createagentschedulerequest.ts +7 -10
- package/src/models/components/index.ts +4 -1
- package/src/models/components/tooldefinition.ts +26 -26
- package/src/models/components/updateagentrequest.ts +7 -10
- package/src/models/components/updateagentschedulerequest.ts +4 -10
- package/src/models/errors/errorenvelope.ts +4 -5
- package/dist/commonjs/models/components/jsonvalue.d.ts +0 -17
- package/dist/commonjs/models/components/jsonvalue.d.ts.map +0 -1
- package/dist/commonjs/models/components/jsonvalue.js.map +0 -1
- package/dist/esm/models/components/jsonvalue.d.ts +0 -17
- package/dist/esm/models/components/jsonvalue.d.ts.map +0 -1
- package/dist/esm/models/components/jsonvalue.js +0 -30
- package/dist/esm/models/components/jsonvalue.js.map +0 -1
- package/src/models/components/jsonvalue.ts +0 -65
|
@@ -8,12 +8,6 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
import {
|
|
12
|
-
JsonValue,
|
|
13
|
-
JsonValue$inboundSchema,
|
|
14
|
-
JsonValue$Outbound,
|
|
15
|
-
JsonValue$outboundSchema,
|
|
16
|
-
} from "./jsonvalue.js";
|
|
17
11
|
|
|
18
12
|
export const AgentRunObject = {
|
|
19
13
|
AgentRun: "agent.run",
|
|
@@ -37,13 +31,16 @@ export type AgentRun = {
|
|
|
37
31
|
*/
|
|
38
32
|
agentVersion: number | null;
|
|
39
33
|
status: AgentRunStatus;
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Arbitrary JSON value.
|
|
36
|
+
*/
|
|
37
|
+
input?: any | undefined;
|
|
38
|
+
conversation?: any | null | undefined;
|
|
42
39
|
previousResponseId: string | null;
|
|
43
40
|
metadata: { [k: string]: string } | null;
|
|
44
41
|
gatewayResponseId: string | null;
|
|
45
|
-
gatewayResponse
|
|
46
|
-
error
|
|
42
|
+
gatewayResponse?: any | null | undefined;
|
|
43
|
+
error?: any | null | undefined;
|
|
47
44
|
createdAt: Date;
|
|
48
45
|
completedAt: Date | null;
|
|
49
46
|
};
|
|
@@ -77,13 +74,13 @@ export const AgentRun$inboundSchema: z.ZodType<
|
|
|
77
74
|
agent_id: z.string(),
|
|
78
75
|
agent_version: z.nullable(z.number().int()),
|
|
79
76
|
status: AgentRunStatus$inboundSchema,
|
|
80
|
-
input: z.
|
|
81
|
-
conversation: z.nullable(
|
|
77
|
+
input: z.any().optional(),
|
|
78
|
+
conversation: z.nullable(z.any()).optional(),
|
|
82
79
|
previous_response_id: z.nullable(z.string()),
|
|
83
80
|
metadata: z.nullable(z.record(z.string())),
|
|
84
81
|
gateway_response_id: z.nullable(z.string()),
|
|
85
|
-
gateway_response: z.nullable(
|
|
86
|
-
error: z.nullable(
|
|
82
|
+
gateway_response: z.nullable(z.any()).optional(),
|
|
83
|
+
error: z.nullable(z.any()).optional(),
|
|
87
84
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
88
85
|
completed_at: z.nullable(
|
|
89
86
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -106,13 +103,13 @@ export type AgentRun$Outbound = {
|
|
|
106
103
|
agent_id: string;
|
|
107
104
|
agent_version: number | null;
|
|
108
105
|
status: string;
|
|
109
|
-
input
|
|
110
|
-
conversation
|
|
106
|
+
input?: any | undefined;
|
|
107
|
+
conversation?: any | null | undefined;
|
|
111
108
|
previous_response_id: string | null;
|
|
112
109
|
metadata: { [k: string]: string } | null;
|
|
113
110
|
gateway_response_id: string | null;
|
|
114
|
-
gateway_response
|
|
115
|
-
error
|
|
111
|
+
gateway_response?: any | null | undefined;
|
|
112
|
+
error?: any | null | undefined;
|
|
116
113
|
created_at: string;
|
|
117
114
|
completed_at: string | null;
|
|
118
115
|
};
|
|
@@ -128,13 +125,13 @@ export const AgentRun$outboundSchema: z.ZodType<
|
|
|
128
125
|
agentId: z.string(),
|
|
129
126
|
agentVersion: z.nullable(z.number().int()),
|
|
130
127
|
status: AgentRunStatus$outboundSchema,
|
|
131
|
-
input: z.
|
|
132
|
-
conversation: z.nullable(
|
|
128
|
+
input: z.any().optional(),
|
|
129
|
+
conversation: z.nullable(z.any()).optional(),
|
|
133
130
|
previousResponseId: z.nullable(z.string()),
|
|
134
131
|
metadata: z.nullable(z.record(z.string())),
|
|
135
132
|
gatewayResponseId: z.nullable(z.string()),
|
|
136
|
-
gatewayResponse: z.nullable(
|
|
137
|
-
error: z.nullable(
|
|
133
|
+
gatewayResponse: z.nullable(z.any()).optional(),
|
|
134
|
+
error: z.nullable(z.any()).optional(),
|
|
138
135
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
139
136
|
completedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
140
137
|
}).transform((v) => {
|
|
@@ -20,12 +20,6 @@ import {
|
|
|
20
20
|
AgentScheduleSpec$Outbound,
|
|
21
21
|
AgentScheduleSpec$outboundSchema,
|
|
22
22
|
} from "./agentschedulespec.js";
|
|
23
|
-
import {
|
|
24
|
-
JsonValue,
|
|
25
|
-
JsonValue$inboundSchema,
|
|
26
|
-
JsonValue$Outbound,
|
|
27
|
-
JsonValue$outboundSchema,
|
|
28
|
-
} from "./jsonvalue.js";
|
|
29
23
|
|
|
30
24
|
export const AgentScheduleObject = {
|
|
31
25
|
AgentSchedule: "agent.schedule",
|
|
@@ -47,8 +41,11 @@ export type AgentSchedule = {
|
|
|
47
41
|
name: string | null;
|
|
48
42
|
status: AgentScheduleStatus;
|
|
49
43
|
schedule: AgentScheduleSpec;
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Arbitrary JSON value.
|
|
46
|
+
*/
|
|
47
|
+
input?: any | undefined;
|
|
48
|
+
conversation?: any | null | undefined;
|
|
52
49
|
previousResponseId: string | null;
|
|
53
50
|
contextManagement: Array<AgentCompactionContextManagement> | null;
|
|
54
51
|
metadata: { [k: string]: string } | null;
|
|
@@ -91,8 +88,8 @@ export const AgentSchedule$inboundSchema: z.ZodType<
|
|
|
91
88
|
name: z.nullable(z.string()),
|
|
92
89
|
status: AgentScheduleStatus$inboundSchema,
|
|
93
90
|
schedule: AgentScheduleSpec$inboundSchema,
|
|
94
|
-
input: z.
|
|
95
|
-
conversation: z.nullable(
|
|
91
|
+
input: z.any().optional(),
|
|
92
|
+
conversation: z.nullable(z.any()).optional(),
|
|
96
93
|
previous_response_id: z.nullable(z.string()),
|
|
97
94
|
context_management: z.nullable(
|
|
98
95
|
z.array(AgentCompactionContextManagement$inboundSchema),
|
|
@@ -131,8 +128,8 @@ export type AgentSchedule$Outbound = {
|
|
|
131
128
|
name: string | null;
|
|
132
129
|
status: string;
|
|
133
130
|
schedule: AgentScheduleSpec$Outbound;
|
|
134
|
-
input
|
|
135
|
-
conversation
|
|
131
|
+
input?: any | undefined;
|
|
132
|
+
conversation?: any | null | undefined;
|
|
136
133
|
previous_response_id: string | null;
|
|
137
134
|
context_management: Array<AgentCompactionContextManagement$Outbound> | null;
|
|
138
135
|
metadata: { [k: string]: string } | null;
|
|
@@ -157,8 +154,8 @@ export const AgentSchedule$outboundSchema: z.ZodType<
|
|
|
157
154
|
name: z.nullable(z.string()),
|
|
158
155
|
status: AgentScheduleStatus$outboundSchema,
|
|
159
156
|
schedule: AgentScheduleSpec$outboundSchema,
|
|
160
|
-
input: z.
|
|
161
|
-
conversation: z.nullable(
|
|
157
|
+
input: z.any().optional(),
|
|
158
|
+
conversation: z.nullable(z.any()).optional(),
|
|
162
159
|
previousResponseId: z.nullable(z.string()),
|
|
163
160
|
contextManagement: z.nullable(
|
|
164
161
|
z.array(AgentCompactionContextManagement$outboundSchema),
|
|
@@ -20,12 +20,6 @@ import {
|
|
|
20
20
|
AgentTextConfiguration$Outbound,
|
|
21
21
|
AgentTextConfiguration$outboundSchema,
|
|
22
22
|
} from "./agenttextconfiguration.js";
|
|
23
|
-
import {
|
|
24
|
-
JsonValue,
|
|
25
|
-
JsonValue$inboundSchema,
|
|
26
|
-
JsonValue$Outbound,
|
|
27
|
-
JsonValue$outboundSchema,
|
|
28
|
-
} from "./jsonvalue.js";
|
|
29
23
|
import {
|
|
30
24
|
ToolDefinition,
|
|
31
25
|
ToolDefinition$inboundSchema,
|
|
@@ -56,7 +50,10 @@ export type AgentVersion = {
|
|
|
56
50
|
model: string;
|
|
57
51
|
instructions: string | null;
|
|
58
52
|
tools: Array<ToolDefinition>;
|
|
59
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Arbitrary JSON value.
|
|
55
|
+
*/
|
|
56
|
+
toolChoice?: any | undefined;
|
|
60
57
|
parallelToolCalls: boolean;
|
|
61
58
|
maxToolCalls: number | null;
|
|
62
59
|
text: AgentTextConfiguration | null;
|
|
@@ -91,7 +88,7 @@ export const AgentVersion$inboundSchema: z.ZodType<
|
|
|
91
88
|
model: z.string(),
|
|
92
89
|
instructions: z.nullable(z.string()),
|
|
93
90
|
tools: z.array(ToolDefinition$inboundSchema),
|
|
94
|
-
tool_choice: z.
|
|
91
|
+
tool_choice: z.any().optional(),
|
|
95
92
|
parallel_tool_calls: z.boolean(),
|
|
96
93
|
max_tool_calls: z.nullable(z.number().int()),
|
|
97
94
|
text: z.nullable(AgentTextConfiguration$inboundSchema),
|
|
@@ -122,7 +119,7 @@ export type AgentVersion$Outbound = {
|
|
|
122
119
|
model: string;
|
|
123
120
|
instructions: string | null;
|
|
124
121
|
tools: Array<ToolDefinition$Outbound>;
|
|
125
|
-
tool_choice
|
|
122
|
+
tool_choice?: any | undefined;
|
|
126
123
|
parallel_tool_calls: boolean;
|
|
127
124
|
max_tool_calls: number | null;
|
|
128
125
|
text: AgentTextConfiguration$Outbound | null;
|
|
@@ -148,7 +145,7 @@ export const AgentVersion$outboundSchema: z.ZodType<
|
|
|
148
145
|
model: z.string(),
|
|
149
146
|
instructions: z.nullable(z.string()),
|
|
150
147
|
tools: z.array(ToolDefinition$outboundSchema),
|
|
151
|
-
toolChoice: z.
|
|
148
|
+
toolChoice: z.any().optional(),
|
|
152
149
|
parallelToolCalls: z.boolean(),
|
|
153
150
|
maxToolCalls: z.nullable(z.number().int()),
|
|
154
151
|
text: z.nullable(AgentTextConfiguration$outboundSchema),
|
|
@@ -11,6 +11,8 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
export type ComputeOfferCapabilities = {
|
|
12
12
|
customImage: boolean;
|
|
13
13
|
httpPorts: boolean;
|
|
14
|
+
persistentVolume: boolean;
|
|
15
|
+
sharedVolume: boolean;
|
|
14
16
|
ssh: boolean;
|
|
15
17
|
tcpPorts: boolean;
|
|
16
18
|
};
|
|
@@ -53,12 +55,16 @@ export const ComputeOfferCapabilities$inboundSchema: z.ZodType<
|
|
|
53
55
|
> = z.object({
|
|
54
56
|
custom_image: z.boolean(),
|
|
55
57
|
http_ports: z.boolean(),
|
|
58
|
+
persistent_volume: z.boolean(),
|
|
59
|
+
shared_volume: z.boolean(),
|
|
56
60
|
ssh: z.boolean(),
|
|
57
61
|
tcp_ports: z.boolean(),
|
|
58
62
|
}).transform((v) => {
|
|
59
63
|
return remap$(v, {
|
|
60
64
|
"custom_image": "customImage",
|
|
61
65
|
"http_ports": "httpPorts",
|
|
66
|
+
"persistent_volume": "persistentVolume",
|
|
67
|
+
"shared_volume": "sharedVolume",
|
|
62
68
|
"tcp_ports": "tcpPorts",
|
|
63
69
|
});
|
|
64
70
|
});
|
|
@@ -66,6 +72,8 @@ export const ComputeOfferCapabilities$inboundSchema: z.ZodType<
|
|
|
66
72
|
export type ComputeOfferCapabilities$Outbound = {
|
|
67
73
|
custom_image: boolean;
|
|
68
74
|
http_ports: boolean;
|
|
75
|
+
persistent_volume: boolean;
|
|
76
|
+
shared_volume: boolean;
|
|
69
77
|
ssh: boolean;
|
|
70
78
|
tcp_ports: boolean;
|
|
71
79
|
};
|
|
@@ -78,12 +86,16 @@ export const ComputeOfferCapabilities$outboundSchema: z.ZodType<
|
|
|
78
86
|
> = z.object({
|
|
79
87
|
customImage: z.boolean(),
|
|
80
88
|
httpPorts: z.boolean(),
|
|
89
|
+
persistentVolume: z.boolean(),
|
|
90
|
+
sharedVolume: z.boolean(),
|
|
81
91
|
ssh: z.boolean(),
|
|
82
92
|
tcpPorts: z.boolean(),
|
|
83
93
|
}).transform((v) => {
|
|
84
94
|
return remap$(v, {
|
|
85
95
|
customImage: "custom_image",
|
|
86
96
|
httpPorts: "http_ports",
|
|
97
|
+
persistentVolume: "persistent_volume",
|
|
98
|
+
sharedVolume: "shared_volume",
|
|
87
99
|
tcpPorts: "tcp_ports",
|
|
88
100
|
});
|
|
89
101
|
});
|
|
@@ -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
|
});
|