/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 847b9498791b */ import * as z from "zod/v3"; /** * Either a string or HypertextField. When OpenAPI Generator supports oneOf, we can semantically enforce this in the docs. */ export type Value = {}; /** * Additional information about the employee or team. */ export type AdditionalFieldDefinition = { /** * Key to reference this field, e.g. "languages". Note that the key should be all lowercase alphabetic characters with no numbers, spaces, hyphens or underscores. */ key?: string | undefined; /** * List of type string or HypertextField. * * @remarks * * HypertextField is defined as * ``` * { * anchor: string, // Anchor text for the hypertext field. * hyperlink: string, // URL for the hypertext field. * } * ``` * Example: ```{"anchor":"Glean","hyperlink":"https://glean.com"}``` * * When OpenAPI Generator supports oneOf, we will semantically enforce this in the docs. * * **Note**: If using the Python SDK to pass in a list of strings, the value may need to be a list of dictionaries. In that case, the key in that dictionary will be ignored. * Example: ```"languages": [{"lang":"English","lang":"Spanish",...}]```. In this case, the key "lang" will be ignored and can even be passed in as an empty string. */ value?: Array | undefined; }; /** @internal */ export type Value$Outbound = {}; /** @internal */ export const Value$outboundSchema: z.ZodType< Value$Outbound, z.ZodTypeDef, Value > = z.object({}); export function valueToJSON(value: Value): string { return JSON.stringify(Value$outboundSchema.parse(value)); } /** @internal */ export type AdditionalFieldDefinition$Outbound = { key?: string | undefined; value?: Array | undefined; }; /** @internal */ export const AdditionalFieldDefinition$outboundSchema: z.ZodType< AdditionalFieldDefinition$Outbound, z.ZodTypeDef, AdditionalFieldDefinition > = z.object({ key: z.string().optional(), value: z.array(z.lazy(() => Value$outboundSchema)).optional(), }); export function additionalFieldDefinitionToJSON( additionalFieldDefinition: AdditionalFieldDefinition, ): string { return JSON.stringify( AdditionalFieldDefinition$outboundSchema.parse(additionalFieldDefinition), ); }