/* * 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 CreateTypeRequestBodyCategories = { Customer: "customer", IssueTracker: "issue-tracker", ProductFeature: "product-feature", Service: "service", OnCall: "on-call", Team: "team", User: "user", } as const; export type CreateTypeRequestBodyCategories = ClosedEnum< typeof CreateTypeRequestBodyCategories >; /** * Sets the display color of this type in the dashboard */ export const CreateTypeRequestBodyColor = { 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 CreateTypeRequestBodyColor = ClosedEnum< typeof CreateTypeRequestBodyColor >; /** * Sets the display icon of this type in the dashboard */ export const CreateTypeRequestBodyIcon = { 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 CreateTypeRequestBodyIcon = ClosedEnum< typeof CreateTypeRequestBodyIcon >; export type CreateTypeRequestBody = { /** * 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?: CreateTypeRequestBodyColor | undefined; /** * Human readble description of this type */ description: string; /** * Sets the display icon of this type in the dashboard */ icon?: CreateTypeRequestBodyIcon | 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; /** * The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom["SomeName "] */ typeName?: string | undefined; }; /** @internal */ export const CreateTypeRequestBodyCategories$inboundSchema: z.ZodNativeEnum< typeof CreateTypeRequestBodyCategories > = z.nativeEnum(CreateTypeRequestBodyCategories); /** @internal */ export const CreateTypeRequestBodyCategories$outboundSchema: z.ZodNativeEnum< typeof CreateTypeRequestBodyCategories > = CreateTypeRequestBodyCategories$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTypeRequestBodyCategories$ { /** @deprecated use `CreateTypeRequestBodyCategories$inboundSchema` instead. */ export const inboundSchema = CreateTypeRequestBodyCategories$inboundSchema; /** @deprecated use `CreateTypeRequestBodyCategories$outboundSchema` instead. */ export const outboundSchema = CreateTypeRequestBodyCategories$outboundSchema; } /** @internal */ export const CreateTypeRequestBodyColor$inboundSchema: z.ZodNativeEnum< typeof CreateTypeRequestBodyColor > = z.nativeEnum(CreateTypeRequestBodyColor); /** @internal */ export const CreateTypeRequestBodyColor$outboundSchema: z.ZodNativeEnum< typeof CreateTypeRequestBodyColor > = CreateTypeRequestBodyColor$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTypeRequestBodyColor$ { /** @deprecated use `CreateTypeRequestBodyColor$inboundSchema` instead. */ export const inboundSchema = CreateTypeRequestBodyColor$inboundSchema; /** @deprecated use `CreateTypeRequestBodyColor$outboundSchema` instead. */ export const outboundSchema = CreateTypeRequestBodyColor$outboundSchema; } /** @internal */ export const CreateTypeRequestBodyIcon$inboundSchema: z.ZodNativeEnum< typeof CreateTypeRequestBodyIcon > = z.nativeEnum(CreateTypeRequestBodyIcon); /** @internal */ export const CreateTypeRequestBodyIcon$outboundSchema: z.ZodNativeEnum< typeof CreateTypeRequestBodyIcon > = CreateTypeRequestBodyIcon$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTypeRequestBodyIcon$ { /** @deprecated use `CreateTypeRequestBodyIcon$inboundSchema` instead. */ export const inboundSchema = CreateTypeRequestBodyIcon$inboundSchema; /** @deprecated use `CreateTypeRequestBodyIcon$outboundSchema` instead. */ export const outboundSchema = CreateTypeRequestBodyIcon$outboundSchema; } /** @internal */ export const CreateTypeRequestBody$inboundSchema: z.ZodType< CreateTypeRequestBody, z.ZodTypeDef, unknown > = z.object({ annotations: z.record(z.string()).optional(), categories: z.array(CreateTypeRequestBodyCategories$inboundSchema).optional(), color: CreateTypeRequestBodyColor$inboundSchema.optional(), description: z.string(), icon: CreateTypeRequestBodyIcon$inboundSchema.optional(), name: z.string(), ranked: z.boolean().optional(), source_repo_url: z.string().optional(), type_name: z.string().optional(), }).transform((v) => { return remap$(v, { "source_repo_url": "sourceRepoUrl", "type_name": "typeName", }); }); /** @internal */ export type CreateTypeRequestBody$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; type_name?: string | undefined; }; /** @internal */ export const CreateTypeRequestBody$outboundSchema: z.ZodType< CreateTypeRequestBody$Outbound, z.ZodTypeDef, CreateTypeRequestBody > = z.object({ annotations: z.record(z.string()).optional(), categories: z.array(CreateTypeRequestBodyCategories$outboundSchema) .optional(), color: CreateTypeRequestBodyColor$outboundSchema.optional(), description: z.string(), icon: CreateTypeRequestBodyIcon$outboundSchema.optional(), name: z.string(), ranked: z.boolean().optional(), sourceRepoUrl: z.string().optional(), typeName: z.string().optional(), }).transform((v) => { return remap$(v, { sourceRepoUrl: "source_repo_url", typeName: "type_name", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTypeRequestBody$ { /** @deprecated use `CreateTypeRequestBody$inboundSchema` instead. */ export const inboundSchema = CreateTypeRequestBody$inboundSchema; /** @deprecated use `CreateTypeRequestBody$outboundSchema` instead. */ export const outboundSchema = CreateTypeRequestBody$outboundSchema; /** @deprecated use `CreateTypeRequestBody$Outbound` instead. */ export type Outbound = CreateTypeRequestBody$Outbound; }