/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { CustomFieldOptionV1, CustomFieldOptionV1$inboundSchema, CustomFieldOptionV1$Outbound, CustomFieldOptionV1$outboundSchema, } from "./customfieldoptionv1.js"; import { EmbeddedCatalogEntryV1, EmbeddedCatalogEntryV1$inboundSchema, EmbeddedCatalogEntryV1$Outbound, EmbeddedCatalogEntryV1$outboundSchema, } from "./embeddedcatalogentryv1.js"; export type CustomFieldValueV1 = { valueCatalogEntry?: EmbeddedCatalogEntryV1 | undefined; /** * If the custom field type is 'link', this will contain the value assigned. */ valueLink?: string | undefined; /** * If the custom field type is 'numeric', this will contain the value assigned. */ valueNumeric?: string | undefined; valueOption?: CustomFieldOptionV1 | undefined; /** * If the custom field type is 'text', this will contain the value assigned. */ valueText?: string | undefined; }; /** @internal */ export const CustomFieldValueV1$inboundSchema: z.ZodType< CustomFieldValueV1, z.ZodTypeDef, unknown > = z.object({ value_catalog_entry: EmbeddedCatalogEntryV1$inboundSchema.optional(), value_link: z.string().optional(), value_numeric: z.string().optional(), value_option: CustomFieldOptionV1$inboundSchema.optional(), value_text: z.string().optional(), }).transform((v) => { return remap$(v, { "value_catalog_entry": "valueCatalogEntry", "value_link": "valueLink", "value_numeric": "valueNumeric", "value_option": "valueOption", "value_text": "valueText", }); }); /** @internal */ export type CustomFieldValueV1$Outbound = { value_catalog_entry?: EmbeddedCatalogEntryV1$Outbound | undefined; value_link?: string | undefined; value_numeric?: string | undefined; value_option?: CustomFieldOptionV1$Outbound | undefined; value_text?: string | undefined; }; /** @internal */ export const CustomFieldValueV1$outboundSchema: z.ZodType< CustomFieldValueV1$Outbound, z.ZodTypeDef, CustomFieldValueV1 > = z.object({ valueCatalogEntry: EmbeddedCatalogEntryV1$outboundSchema.optional(), valueLink: z.string().optional(), valueNumeric: z.string().optional(), valueOption: CustomFieldOptionV1$outboundSchema.optional(), valueText: z.string().optional(), }).transform((v) => { return remap$(v, { valueCatalogEntry: "value_catalog_entry", valueLink: "value_link", valueNumeric: "value_numeric", valueOption: "value_option", valueText: "value_text", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomFieldValueV1$ { /** @deprecated use `CustomFieldValueV1$inboundSchema` instead. */ export const inboundSchema = CustomFieldValueV1$inboundSchema; /** @deprecated use `CustomFieldValueV1$outboundSchema` instead. */ export const outboundSchema = CustomFieldValueV1$outboundSchema; /** @deprecated use `CustomFieldValueV1$Outbound` instead. */ export type Outbound = CustomFieldValueV1$Outbound; }