/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; export const UpdateTypeRequestBodyCategories = { Customer: "customer", IssueTracker: "issue-tracker", ProductFeature: "product-feature", Service: "service", OnCall: "on-call", Team: "team", User: "user", } as const; export type UpdateTypeRequestBodyCategories = ClosedEnum< typeof UpdateTypeRequestBodyCategories >; /** * Sets the display color of this type in the dashboard */ export const UpdateTypeRequestBodyColor = { Yellow: "yellow", Green: "green", Blue: "blue", Violet: "violet", Pink: "pink", Cyan: "cyan", Orange: "orange", } as const; /** * Sets the display color of this type in the dashboard */ export type UpdateTypeRequestBodyColor = ClosedEnum< typeof UpdateTypeRequestBodyColor >; /** * Sets the display icon of this type in the dashboard */ export const UpdateTypeRequestBodyIcon = { Alert: "alert", Bolt: "bolt", Box: "box", Briefcase: "briefcase", Browser: "browser", Bulb: "bulb", Calendar: "calendar", Clock: "clock", Cog: "cog", Components: "components", Database: "database", Doc: "doc", Email: "email", EscalationPath: "escalation-path", Files: "files", Flag: "flag", Folder: "folder", Globe: "globe", Money: "money", Server: "server", Severity: "severity", StatusPage: "status-page", Store: "store", Star: "star", Tag: "tag", User: "user", Users: "users", } as const; /** * Sets the display icon of this type in the dashboard */ export type UpdateTypeRequestBodyIcon = ClosedEnum< typeof UpdateTypeRequestBodyIcon >; export type UpdateTypeRequestBody = { /** * Annotations that can track metadata about this type */ annotations?: { [k: string]: string } | undefined; /** * What categories is this type considered part of */ categories?: Array | undefined; /** * Sets the display color of this type in the dashboard */ color?: UpdateTypeRequestBodyColor | undefined; /** * Human readble description of this type */ description: string; /** * Sets the display icon of this type in the dashboard */ icon?: UpdateTypeRequestBodyIcon | undefined; /** * Name is the human readable name of this type */ name: string; /** * If this type should be ranked */ ranked?: boolean | undefined; /** * The url of the external repository where this type is managed */ sourceRepoUrl?: string | undefined; }; /** @internal */ export const UpdateTypeRequestBodyCategories$inboundSchema: z.ZodNativeEnum< typeof UpdateTypeRequestBodyCategories > = z.nativeEnum(UpdateTypeRequestBodyCategories); /** @internal */ export const UpdateTypeRequestBodyCategories$outboundSchema: z.ZodNativeEnum< typeof UpdateTypeRequestBodyCategories > = UpdateTypeRequestBodyCategories$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTypeRequestBodyCategories$ { /** @deprecated use `UpdateTypeRequestBodyCategories$inboundSchema` instead. */ export const inboundSchema = UpdateTypeRequestBodyCategories$inboundSchema; /** @deprecated use `UpdateTypeRequestBodyCategories$outboundSchema` instead. */ export const outboundSchema = UpdateTypeRequestBodyCategories$outboundSchema; } /** @internal */ export const UpdateTypeRequestBodyColor$inboundSchema: z.ZodNativeEnum< typeof UpdateTypeRequestBodyColor > = z.nativeEnum(UpdateTypeRequestBodyColor); /** @internal */ export const UpdateTypeRequestBodyColor$outboundSchema: z.ZodNativeEnum< typeof UpdateTypeRequestBodyColor > = UpdateTypeRequestBodyColor$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTypeRequestBodyColor$ { /** @deprecated use `UpdateTypeRequestBodyColor$inboundSchema` instead. */ export const inboundSchema = UpdateTypeRequestBodyColor$inboundSchema; /** @deprecated use `UpdateTypeRequestBodyColor$outboundSchema` instead. */ export const outboundSchema = UpdateTypeRequestBodyColor$outboundSchema; } /** @internal */ export const UpdateTypeRequestBodyIcon$inboundSchema: z.ZodNativeEnum< typeof UpdateTypeRequestBodyIcon > = z.nativeEnum(UpdateTypeRequestBodyIcon); /** @internal */ export const UpdateTypeRequestBodyIcon$outboundSchema: z.ZodNativeEnum< typeof UpdateTypeRequestBodyIcon > = UpdateTypeRequestBodyIcon$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTypeRequestBodyIcon$ { /** @deprecated use `UpdateTypeRequestBodyIcon$inboundSchema` instead. */ export const inboundSchema = UpdateTypeRequestBodyIcon$inboundSchema; /** @deprecated use `UpdateTypeRequestBodyIcon$outboundSchema` instead. */ export const outboundSchema = UpdateTypeRequestBodyIcon$outboundSchema; } /** @internal */ export const UpdateTypeRequestBody$inboundSchema: z.ZodType< UpdateTypeRequestBody, z.ZodTypeDef, unknown > = z.object({ annotations: z.record(z.string()).optional(), categories: z.array(UpdateTypeRequestBodyCategories$inboundSchema).optional(), color: UpdateTypeRequestBodyColor$inboundSchema.optional(), description: z.string(), icon: UpdateTypeRequestBodyIcon$inboundSchema.optional(), name: z.string(), ranked: z.boolean().optional(), source_repo_url: z.string().optional(), }).transform((v) => { return remap$(v, { "source_repo_url": "sourceRepoUrl", }); }); /** @internal */ export type UpdateTypeRequestBody$Outbound = { annotations?: { [k: string]: string } | undefined; categories?: Array | undefined; color?: string | undefined; description: string; icon?: string | undefined; name: string; ranked?: boolean | undefined; source_repo_url?: string | undefined; }; /** @internal */ export const UpdateTypeRequestBody$outboundSchema: z.ZodType< UpdateTypeRequestBody$Outbound, z.ZodTypeDef, UpdateTypeRequestBody > = z.object({ annotations: z.record(z.string()).optional(), categories: z.array(UpdateTypeRequestBodyCategories$outboundSchema) .optional(), color: UpdateTypeRequestBodyColor$outboundSchema.optional(), description: z.string(), icon: UpdateTypeRequestBodyIcon$outboundSchema.optional(), name: z.string(), ranked: z.boolean().optional(), sourceRepoUrl: z.string().optional(), }).transform((v) => { return remap$(v, { sourceRepoUrl: "source_repo_url", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTypeRequestBody$ { /** @deprecated use `UpdateTypeRequestBody$inboundSchema` instead. */ export const inboundSchema = UpdateTypeRequestBody$inboundSchema; /** @deprecated use `UpdateTypeRequestBody$outboundSchema` instead. */ export const outboundSchema = UpdateTypeRequestBody$outboundSchema; /** @deprecated use `UpdateTypeRequestBody$Outbound` instead. */ export type Outbound = UpdateTypeRequestBody$Outbound; }