/* * 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"; /** * Description detail used for Dow Jones Profile details */ export type DescriptionDetail = { /** * Dow Jones persons description */ descriptionOne?: string | undefined; /** * Dow Jones persons description */ descriptionThree?: string | undefined; /** * Dow Jones persons description */ descriptionTwo?: string | undefined; }; /** @internal */ export const DescriptionDetail$inboundSchema: z.ZodType< DescriptionDetail, z.ZodTypeDef, unknown > = z.object({ description_one: z.string().optional(), description_three: z.string().optional(), description_two: z.string().optional(), }).transform((v) => { return remap$(v, { "description_one": "descriptionOne", "description_three": "descriptionThree", "description_two": "descriptionTwo", }); }); /** @internal */ export type DescriptionDetail$Outbound = { description_one?: string | undefined; description_three?: string | undefined; description_two?: string | undefined; }; /** @internal */ export const DescriptionDetail$outboundSchema: z.ZodType< DescriptionDetail$Outbound, z.ZodTypeDef, DescriptionDetail > = z.object({ descriptionOne: z.string().optional(), descriptionThree: z.string().optional(), descriptionTwo: z.string().optional(), }).transform((v) => { return remap$(v, { descriptionOne: "description_one", descriptionThree: "description_three", descriptionTwo: "description_two", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DescriptionDetail$ { /** @deprecated use `DescriptionDetail$inboundSchema` instead. */ export const inboundSchema = DescriptionDetail$inboundSchema; /** @deprecated use `DescriptionDetail$outboundSchema` instead. */ export const outboundSchema = DescriptionDetail$outboundSchema; /** @deprecated use `DescriptionDetail$Outbound` instead. */ export type Outbound = DescriptionDetail$Outbound; } export function descriptionDetailToJSON( descriptionDetail: DescriptionDetail, ): string { return JSON.stringify( DescriptionDetail$outboundSchema.parse(descriptionDetail), ); } export function descriptionDetailFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DescriptionDetail$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DescriptionDetail' from JSON`, ); }