/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The color of the tag. */ export const Color = { Red: "red", Yellow: "yellow", Green: "green", Blue: "blue", Purple: "purple", Brown: "brown", Gray: "gray", Pink: "pink", } as const; /** * The color of the tag. */ export type Color = ClosedEnum; export type LinkTagSchemaOutput = { /** * The unique ID of the tag. */ id: string; /** * The name of the tag. */ name: string; /** * The color of the tag. */ color: Color; }; /** @internal */ export const Color$inboundSchema: z.ZodNativeEnum = z.nativeEnum( Color, ); /** @internal */ export const LinkTagSchemaOutput$inboundSchema: z.ZodType< LinkTagSchemaOutput, z.ZodTypeDef, unknown > = z.object({ id: z.string(), name: z.string(), color: Color$inboundSchema, }); export function linkTagSchemaOutputFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LinkTagSchemaOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LinkTagSchemaOutput' from JSON`, ); }