/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type WakeAgentRunRequest = { agentId: string; runId: string; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; wakeAgentRunRequest: components.WakeAgentRunRequest; }; /** @internal */ export const WakeAgentRunRequest$inboundSchema: z.ZodType< WakeAgentRunRequest, z.ZodTypeDef, unknown > = z.object({ agent_id: z.string(), run_id: z.string(), "X-On-Behalf-Of": z.string().optional(), WakeAgentRunRequest: components.WakeAgentRunRequest$inboundSchema, }).transform((v) => { return remap$(v, { "agent_id": "agentId", "run_id": "runId", "X-On-Behalf-Of": "xOnBehalfOf", "WakeAgentRunRequest": "wakeAgentRunRequest", }); }); /** @internal */ export type WakeAgentRunRequest$Outbound = { agent_id: string; run_id: string; "X-On-Behalf-Of"?: string | undefined; WakeAgentRunRequest: components.WakeAgentRunRequest$Outbound; }; /** @internal */ export const WakeAgentRunRequest$outboundSchema: z.ZodType< WakeAgentRunRequest$Outbound, z.ZodTypeDef, WakeAgentRunRequest > = z.object({ agentId: z.string(), runId: z.string(), xOnBehalfOf: z.string().optional(), wakeAgentRunRequest: components.WakeAgentRunRequest$outboundSchema, }).transform((v) => { return remap$(v, { agentId: "agent_id", runId: "run_id", xOnBehalfOf: "X-On-Behalf-Of", wakeAgentRunRequest: "WakeAgentRunRequest", }); }); export function wakeAgentRunRequestToJSON( wakeAgentRunRequest: WakeAgentRunRequest, ): string { return JSON.stringify( WakeAgentRunRequest$outboundSchema.parse(wakeAgentRunRequest), ); } export function wakeAgentRunRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WakeAgentRunRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WakeAgentRunRequest' from JSON`, ); }