/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type StrategyTrajectoryHorizonResponse = { id: string; createdAt: string | null; updatedAt: string | null; model: string | null; horizon: number | null; trajectoryId: string | null; }; /** @internal */ export const StrategyTrajectoryHorizonResponse$inboundSchema: z.ZodType< StrategyTrajectoryHorizonResponse, z.ZodTypeDef, unknown > = z.object({ id: z.string(), created_at: z.nullable(z.string()), updated_at: z.nullable(z.string()), model: z.nullable(z.string()), horizon: z.nullable(z.number().int()), trajectory_id: z.nullable(z.string()), }).transform((v) => { return remap$(v, { "created_at": "createdAt", "updated_at": "updatedAt", "trajectory_id": "trajectoryId", }); }); /** @internal */ export type StrategyTrajectoryHorizonResponse$Outbound = { id: string; created_at: string | null; updated_at: string | null; model: string | null; horizon: number | null; trajectory_id: string | null; }; /** @internal */ export const StrategyTrajectoryHorizonResponse$outboundSchema: z.ZodType< StrategyTrajectoryHorizonResponse$Outbound, z.ZodTypeDef, StrategyTrajectoryHorizonResponse > = z.object({ id: z.string(), createdAt: z.nullable(z.string()), updatedAt: z.nullable(z.string()), model: z.nullable(z.string()), horizon: z.nullable(z.number().int()), trajectoryId: z.nullable(z.string()), }).transform((v) => { return remap$(v, { createdAt: "created_at", updatedAt: "updated_at", trajectoryId: "trajectory_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StrategyTrajectoryHorizonResponse$ { /** @deprecated use `StrategyTrajectoryHorizonResponse$inboundSchema` instead. */ export const inboundSchema = StrategyTrajectoryHorizonResponse$inboundSchema; /** @deprecated use `StrategyTrajectoryHorizonResponse$outboundSchema` instead. */ export const outboundSchema = StrategyTrajectoryHorizonResponse$outboundSchema; /** @deprecated use `StrategyTrajectoryHorizonResponse$Outbound` instead. */ export type Outbound = StrategyTrajectoryHorizonResponse$Outbound; } export function strategyTrajectoryHorizonResponseToJSON( strategyTrajectoryHorizonResponse: StrategyTrajectoryHorizonResponse, ): string { return JSON.stringify( StrategyTrajectoryHorizonResponse$outboundSchema.parse( strategyTrajectoryHorizonResponse, ), ); } export function strategyTrajectoryHorizonResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => StrategyTrajectoryHorizonResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StrategyTrajectoryHorizonResponse' from JSON`, ); }