/* * 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"; import { BrandColors, BrandColors$inboundSchema, BrandColors$Outbound, BrandColors$outboundSchema, } from "./brandcolors.js"; export type BrandProperties = { /** * Brand colors for light and dark modes. */ colors: BrandColors; }; /** @internal */ export const BrandProperties$inboundSchema: z.ZodType< BrandProperties, z.ZodTypeDef, unknown > = z.object({ colors: BrandColors$inboundSchema, }); /** @internal */ export type BrandProperties$Outbound = { colors: BrandColors$Outbound; }; /** @internal */ export const BrandProperties$outboundSchema: z.ZodType< BrandProperties$Outbound, z.ZodTypeDef, BrandProperties > = z.object({ colors: BrandColors$outboundSchema, }); export function brandPropertiesToJSON( brandProperties: BrandProperties, ): string { return JSON.stringify(BrandProperties$outboundSchema.parse(brandProperties)); } export function brandPropertiesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BrandProperties$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BrandProperties' from JSON`, ); }