/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type BrandColor = { /** * A CSS hex color representing an accent color. */ accent: string; }; /** @internal */ export const BrandColor$inboundSchema: z.ZodType< BrandColor, z.ZodTypeDef, unknown > = z.object({ accent: z.string(), }); /** @internal */ export type BrandColor$Outbound = { accent: string; }; /** @internal */ export const BrandColor$outboundSchema: z.ZodType< BrandColor$Outbound, z.ZodTypeDef, BrandColor > = z.object({ accent: z.string(), }); export function brandColorToJSON(brandColor: BrandColor): string { return JSON.stringify(BrandColor$outboundSchema.parse(brandColor)); } export function brandColorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BrandColor$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BrandColor' from JSON`, ); }