import * as z from "zod/mini"; /** Persisted identity cannot be claimed by a client-supplied definition. */ export const INLINE_FLOW_PERSISTED_IDENTITY_FIELDS = [ "id", "organizationId", "versionId", "versionNumber", ] as const; /** @internal */ export const inlineFlowThemeSchema = z.strictObject({ css: z.optional(z.string()), themeRuntimeArtifactId: z.optional( z.string().check(z.trim(), z.minLength(1)), ), themeVersionId: z.optional(z.string().check(z.trim(), z.minLength(1))), }); /** @internal */ export const inlineFlowSchema = z.strictObject({ definition: z.unknown().check( z.check((ctx) => { if (ctx.value !== undefined) { return; } ctx.issues.push({ code: "custom", input: ctx.value, message: "Inline flow definition is required.", continue: false, }); }), ), theme: z.optional(inlineFlowThemeSchema), }); /** @internal */ export type InlineFlowTheme = z.output; /** @internal */ export type InlineFlow = z.output;