/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { ClosedEnum } from "../types/enums.js";
export const IncidentsRetrospectiveFieldEntityType = {
Text: "text",
SingleSelect: "single_select",
MultiSelect: "multi_select",
Numeric: "numeric",
Datetime: "datetime",
DynamicInputGroup: "dynamic_input_group",
Markdown: "markdown",
MarkdownText: "markdown_text",
} as const;
export type IncidentsRetrospectiveFieldEntityType = ClosedEnum<
typeof IncidentsRetrospectiveFieldEntityType
>;
export const IncidentsRetrospectiveFieldEntityType$zodSchema = z.enum([
"text",
"single_select",
"multi_select",
"numeric",
"datetime",
"dynamic_input_group",
"markdown",
"markdown_text",
]);
export type Value = number | string | Array<{ [k: string]: any }>;
export const Value$zodSchema: z.ZodType<Value> = z.union([
z.int(),
z.string(),
z.array(z.record(z.string(), z.any())),
]);
export type Schema = {};
export const Schema$zodSchema: z.ZodType<Schema> = z.object({});
/**
* Incidents_RetrospectiveFieldEntity model
*/
export type IncidentsRetrospectiveFieldEntity = {
id?: string | null | undefined;
label?: string | null | undefined;
type?: IncidentsRetrospectiveFieldEntityType | null | undefined;
help_text?: string | null | undefined;
permissible_values?: Array<string> | null | undefined;
is_required?: boolean | null | undefined;
value?: number | string | Array<{ [k: string]: any }> | null | undefined;
schema?: Array<Schema> | null | undefined;
required_at_milestone_id?: string | null | undefined;
};
export const IncidentsRetrospectiveFieldEntity$zodSchema: z.ZodType<
IncidentsRetrospectiveFieldEntity
> = z.object({
help_text: z.string().nullable().optional(),
id: z.string().nullable().optional(),
is_required: z.boolean().nullable().optional(),
label: z.string().nullable().optional(),
permissible_values: z.array(z.string()).nullable().optional(),
required_at_milestone_id: z.string().nullable().optional(),
schema: z.array(z.lazy(() => Schema$zodSchema)).nullable().optional(),
type: IncidentsRetrospectiveFieldEntityType$zodSchema.nullable().optional(),
value: z.union([
z.int(),
z.string(),
z.array(z.record(z.string(), z.any())),
]).nullable().optional(),
}).describe("Incidents_RetrospectiveFieldEntity model");