/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; 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 UpdateTagColor = { 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 UpdateTagColor = ClosedEnum; export type UpdateTagRequestBody = { /** * 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?: UpdateTagColor | 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; }; export type UpdateTagRequest = { /** * The ID of the tag to update. */ id: string; requestBody?: UpdateTagRequestBody | undefined; }; /** @internal */ export const UpdateTagColor$outboundSchema: z.ZodNativeEnum< typeof UpdateTagColor > = z.nativeEnum(UpdateTagColor); /** @internal */ export type UpdateTagRequestBody$Outbound = { name?: string | undefined; color?: string | undefined; tag?: string | undefined; }; /** @internal */ export const UpdateTagRequestBody$outboundSchema: z.ZodType< UpdateTagRequestBody$Outbound, z.ZodTypeDef, UpdateTagRequestBody > = z.object({ name: z.string().optional(), color: UpdateTagColor$outboundSchema.optional(), tag: z.string().optional(), }); export function updateTagRequestBodyToJSON( updateTagRequestBody: UpdateTagRequestBody, ): string { return JSON.stringify( UpdateTagRequestBody$outboundSchema.parse(updateTagRequestBody), ); } /** @internal */ export type UpdateTagRequest$Outbound = { id: string; RequestBody?: UpdateTagRequestBody$Outbound | undefined; }; /** @internal */ export const UpdateTagRequest$outboundSchema: z.ZodType< UpdateTagRequest$Outbound, z.ZodTypeDef, UpdateTagRequest > = z.object({ id: z.string(), requestBody: z.lazy(() => UpdateTagRequestBody$outboundSchema).optional(), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function updateTagRequestToJSON( updateTagRequest: UpdateTagRequest, ): string { return JSON.stringify( UpdateTagRequest$outboundSchema.parse(updateTagRequest), ); }