/* * 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 { VendorStatus, VendorStatus$inboundSchema } from "./vendorstatus.js"; export type VendorRelationshipSummary = { /** * The vendor's unique ID. */ id: string; /** * The vendor's display name. */ name: string; /** * The current state of a vendor: * * @remarks * - MANAGED: The vendor is actively managed. * - ARCHIVED: The vendor has been archived * - IN_PROCUREMENT: The vendor is in the procurement process */ status: VendorStatus; /** * The vendor's website URL, or null when none is set. */ websiteUrl: string | null; }; /** @internal */ export const VendorRelationshipSummary$inboundSchema: z.ZodType< VendorRelationshipSummary, z.ZodTypeDef, unknown > = z.object({ id: z.string(), name: z.string(), status: VendorStatus$inboundSchema, websiteUrl: z.nullable(z.string()), }); export function vendorRelationshipSummaryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VendorRelationshipSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VendorRelationshipSummary' from JSON`, ); }