/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: cdbfae10ac5f */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; export type CreatePromptVersionRequest = { /** * Versioned prompt content. */ definition: components.PromptDefinition; /** * Notes for this version. */ notes?: string | null | undefined; /** * Aliases pointing to this version. */ aliases?: Array | undefined; }; export type PromptsCreateVersionRequest = { promptId: string; requestBody: CreatePromptVersionRequest; }; /** @internal */ export type CreatePromptVersionRequest$Outbound = { definition: components.PromptDefinition$Outbound; notes?: string | null | undefined; aliases?: Array | undefined; }; /** @internal */ export const CreatePromptVersionRequest$outboundSchema: z.ZodType< CreatePromptVersionRequest$Outbound, CreatePromptVersionRequest > = z.object({ definition: components.PromptDefinition$outboundSchema, notes: z.nullable(z.string()).optional(), aliases: z.array(z.string()).optional(), }); export function createPromptVersionRequestToJSON( createPromptVersionRequest: CreatePromptVersionRequest, ): string { return JSON.stringify( CreatePromptVersionRequest$outboundSchema.parse(createPromptVersionRequest), ); } /** @internal */ export type PromptsCreateVersionRequest$Outbound = { prompt_id: string; RequestBody: CreatePromptVersionRequest$Outbound; }; /** @internal */ export const PromptsCreateVersionRequest$outboundSchema: z.ZodType< PromptsCreateVersionRequest$Outbound, PromptsCreateVersionRequest > = z.object({ promptId: z.string(), requestBody: z.lazy(() => CreatePromptVersionRequest$outboundSchema), }).transform((v) => { return remap$(v, { promptId: "prompt_id", requestBody: "RequestBody", }); }); export function promptsCreateVersionRequestToJSON( promptsCreateVersionRequest: PromptsCreateVersionRequest, ): string { return JSON.stringify( PromptsCreateVersionRequest$outboundSchema.parse( promptsCreateVersionRequest, ), ); }