/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CustomerLinksEntity = { /** * Customer portal link. */ customerPortalLink: string; }; /** @internal */ export const CustomerLinksEntity$inboundSchema: z.ZodType< CustomerLinksEntity, z.ZodTypeDef, unknown > = z.object({ customer_portal_link: z.string(), }).transform((v) => { return remap$(v, { "customer_portal_link": "customerPortalLink", }); }); /** @internal */ export type CustomerLinksEntity$Outbound = { customer_portal_link: string; }; /** @internal */ export const CustomerLinksEntity$outboundSchema: z.ZodType< CustomerLinksEntity$Outbound, z.ZodTypeDef, CustomerLinksEntity > = z.object({ customerPortalLink: z.string(), }).transform((v) => { return remap$(v, { customerPortalLink: "customer_portal_link", }); }); export function customerLinksEntityToJSON( customerLinksEntity: CustomerLinksEntity, ): string { return JSON.stringify( CustomerLinksEntity$outboundSchema.parse(customerLinksEntity), ); } export function customerLinksEntityFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CustomerLinksEntity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomerLinksEntity' from JSON`, ); }