/* * 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"; import { CustomFieldOptionV1, CustomFieldOptionV1$inboundSchema, CustomFieldOptionV1$Outbound, CustomFieldOptionV1$outboundSchema, } from "./customfieldoptionv1.js"; /** * Type of custom field */ export const CustomFieldTypeInfoV1FieldType = { SingleSelect: "single_select", MultiSelect: "multi_select", Text: "text", Link: "link", Numeric: "numeric", } as const; /** * Type of custom field */ export type CustomFieldTypeInfoV1FieldType = ClosedEnum< typeof CustomFieldTypeInfoV1FieldType >; export type CustomFieldTypeInfoV1 = { /** * Description of the custom field */ description: string; /** * Type of custom field */ fieldType: CustomFieldTypeInfoV1FieldType; /** * Unique identifier for the custom field */ id: string; /** * Human readable name for the custom field */ name: string; /** * What options are available for this custom field, if this field has options */ options: Array; }; /** @internal */ export const CustomFieldTypeInfoV1FieldType$inboundSchema: z.ZodNativeEnum< typeof CustomFieldTypeInfoV1FieldType > = z.nativeEnum(CustomFieldTypeInfoV1FieldType); /** @internal */ export const CustomFieldTypeInfoV1FieldType$outboundSchema: z.ZodNativeEnum< typeof CustomFieldTypeInfoV1FieldType > = CustomFieldTypeInfoV1FieldType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomFieldTypeInfoV1FieldType$ { /** @deprecated use `CustomFieldTypeInfoV1FieldType$inboundSchema` instead. */ export const inboundSchema = CustomFieldTypeInfoV1FieldType$inboundSchema; /** @deprecated use `CustomFieldTypeInfoV1FieldType$outboundSchema` instead. */ export const outboundSchema = CustomFieldTypeInfoV1FieldType$outboundSchema; } /** @internal */ export const CustomFieldTypeInfoV1$inboundSchema: z.ZodType< CustomFieldTypeInfoV1, z.ZodTypeDef, unknown > = z.object({ description: z.string(), field_type: CustomFieldTypeInfoV1FieldType$inboundSchema, id: z.string(), name: z.string(), options: z.array(CustomFieldOptionV1$inboundSchema), }).transform((v) => { return remap$(v, { "field_type": "fieldType", }); }); /** @internal */ export type CustomFieldTypeInfoV1$Outbound = { description: string; field_type: string; id: string; name: string; options: Array; }; /** @internal */ export const CustomFieldTypeInfoV1$outboundSchema: z.ZodType< CustomFieldTypeInfoV1$Outbound, z.ZodTypeDef, CustomFieldTypeInfoV1 > = z.object({ description: z.string(), fieldType: CustomFieldTypeInfoV1FieldType$outboundSchema, id: z.string(), name: z.string(), options: z.array(CustomFieldOptionV1$outboundSchema), }).transform((v) => { return remap$(v, { fieldType: "field_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomFieldTypeInfoV1$ { /** @deprecated use `CustomFieldTypeInfoV1$inboundSchema` instead. */ export const inboundSchema = CustomFieldTypeInfoV1$inboundSchema; /** @deprecated use `CustomFieldTypeInfoV1$outboundSchema` instead. */ export const outboundSchema = CustomFieldTypeInfoV1$outboundSchema; /** @deprecated use `CustomFieldTypeInfoV1$Outbound` instead. */ export type Outbound = CustomFieldTypeInfoV1$Outbound; }