/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. */ 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. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. */ export type Color = ClosedEnum; export type CreateTagRequestBody = { /** * The name of the tag to create. */ name?: string | undefined; /** * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown, gray. */ color?: Color | undefined; /** * The name of the tag to create. * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ tag?: string | undefined; }; /** @internal */ export const Color$outboundSchema: z.ZodNativeEnum = z.nativeEnum( Color, ); /** @internal */ export type CreateTagRequestBody$Outbound = { name?: string | undefined; color?: string | undefined; tag?: string | undefined; }; /** @internal */ export const CreateTagRequestBody$outboundSchema: z.ZodType< CreateTagRequestBody$Outbound, z.ZodTypeDef, CreateTagRequestBody > = z.object({ name: z.string().optional(), color: Color$outboundSchema.optional(), tag: z.string().optional(), }); export function createTagRequestBodyToJSON( createTagRequestBody: CreateTagRequestBody, ): string { return JSON.stringify( CreateTagRequestBody$outboundSchema.parse(createTagRequestBody), ); }