/* * 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"; /** * A single record representing the originating_fdid and originating_cat_reporter_crd */ export type CatReporterInformationCreate = { /** * The prior CAT reporter's 7 digit CRD number; Must be provided with an `ORIGINATING_FDID` */ originatingCatReporterCrd: string; /** * The previous FDID associated with the account; Must be unique and provided with an `ORIGINATING_CAT_REPORTER_CRD` */ originatingFdid: string; }; /** @internal */ export const CatReporterInformationCreate$inboundSchema: z.ZodType< CatReporterInformationCreate, z.ZodTypeDef, unknown > = z.object({ originating_cat_reporter_crd: z.string(), originating_fdid: z.string(), }).transform((v) => { return remap$(v, { "originating_cat_reporter_crd": "originatingCatReporterCrd", "originating_fdid": "originatingFdid", }); }); /** @internal */ export type CatReporterInformationCreate$Outbound = { originating_cat_reporter_crd: string; originating_fdid: string; }; /** @internal */ export const CatReporterInformationCreate$outboundSchema: z.ZodType< CatReporterInformationCreate$Outbound, z.ZodTypeDef, CatReporterInformationCreate > = z.object({ originatingCatReporterCrd: z.string(), originatingFdid: z.string(), }).transform((v) => { return remap$(v, { originatingCatReporterCrd: "originating_cat_reporter_crd", originatingFdid: "originating_fdid", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CatReporterInformationCreate$ { /** @deprecated use `CatReporterInformationCreate$inboundSchema` instead. */ export const inboundSchema = CatReporterInformationCreate$inboundSchema; /** @deprecated use `CatReporterInformationCreate$outboundSchema` instead. */ export const outboundSchema = CatReporterInformationCreate$outboundSchema; /** @deprecated use `CatReporterInformationCreate$Outbound` instead. */ export type Outbound = CatReporterInformationCreate$Outbound; } export function catReporterInformationCreateToJSON( catReporterInformationCreate: CatReporterInformationCreate, ): string { return JSON.stringify( CatReporterInformationCreate$outboundSchema.parse( catReporterInformationCreate, ), ); } export function catReporterInformationCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CatReporterInformationCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CatReporterInformationCreate' from JSON`, ); }