/* * 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"; /** * Negative News detail. */ export type NegativeNewsUpdate = { /** * Indicates whether there is negative news against related parties */ negativeNewsAgainstRelatedParties?: boolean | undefined; /** * Description of the negative news against related parties */ negativeNewsAgainstRelatedPartiesDescription?: string | undefined; }; /** @internal */ export const NegativeNewsUpdate$inboundSchema: z.ZodType< NegativeNewsUpdate, z.ZodTypeDef, unknown > = z.object({ negative_news_against_related_parties: z.boolean().optional(), negative_news_against_related_parties_description: z.string().optional(), }).transform((v) => { return remap$(v, { "negative_news_against_related_parties": "negativeNewsAgainstRelatedParties", "negative_news_against_related_parties_description": "negativeNewsAgainstRelatedPartiesDescription", }); }); /** @internal */ export type NegativeNewsUpdate$Outbound = { negative_news_against_related_parties?: boolean | undefined; negative_news_against_related_parties_description?: string | undefined; }; /** @internal */ export const NegativeNewsUpdate$outboundSchema: z.ZodType< NegativeNewsUpdate$Outbound, z.ZodTypeDef, NegativeNewsUpdate > = z.object({ negativeNewsAgainstRelatedParties: z.boolean().optional(), negativeNewsAgainstRelatedPartiesDescription: z.string().optional(), }).transform((v) => { return remap$(v, { negativeNewsAgainstRelatedParties: "negative_news_against_related_parties", negativeNewsAgainstRelatedPartiesDescription: "negative_news_against_related_parties_description", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NegativeNewsUpdate$ { /** @deprecated use `NegativeNewsUpdate$inboundSchema` instead. */ export const inboundSchema = NegativeNewsUpdate$inboundSchema; /** @deprecated use `NegativeNewsUpdate$outboundSchema` instead. */ export const outboundSchema = NegativeNewsUpdate$outboundSchema; /** @deprecated use `NegativeNewsUpdate$Outbound` instead. */ export type Outbound = NegativeNewsUpdate$Outbound; } export function negativeNewsUpdateToJSON( negativeNewsUpdate: NegativeNewsUpdate, ): string { return JSON.stringify( NegativeNewsUpdate$outboundSchema.parse(negativeNewsUpdate), ); } export function negativeNewsUpdateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => NegativeNewsUpdate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NegativeNewsUpdate' from JSON`, ); }