/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a4952c46381f */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; export type PromoteReleaseGlobals = { /** * Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client. */ workspace?: string | undefined; }; export type PromoteReleaseRequestBody = { /** * Unique identifier for the release. */ releaseId: string; /** * Unique identifier for the release. */ expectedReleaseId?: string | null | undefined; }; export type PromoteReleaseRequest = { name: string; /** * Filter by project ID or name. */ project: string; requestBody?: PromoteReleaseRequestBody | undefined; }; /** @internal */ export type PromoteReleaseRequestBody$Outbound = { releaseId: string; expectedReleaseId?: string | null | undefined; }; /** @internal */ export const PromoteReleaseRequestBody$outboundSchema: z.ZodType< PromoteReleaseRequestBody$Outbound, PromoteReleaseRequestBody > = z.object({ releaseId: z.string(), expectedReleaseId: z.nullable(z.string()).optional(), }); export function promoteReleaseRequestBodyToJSON( promoteReleaseRequestBody: PromoteReleaseRequestBody, ): string { return JSON.stringify( PromoteReleaseRequestBody$outboundSchema.parse(promoteReleaseRequestBody), ); } /** @internal */ export type PromoteReleaseRequest$Outbound = { name: string; project: string; RequestBody?: PromoteReleaseRequestBody$Outbound | undefined; }; /** @internal */ export const PromoteReleaseRequest$outboundSchema: z.ZodType< PromoteReleaseRequest$Outbound, PromoteReleaseRequest > = z.object({ name: z.string(), project: z.string(), requestBody: z.lazy(() => PromoteReleaseRequestBody$outboundSchema) .optional(), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function promoteReleaseRequestToJSON( promoteReleaseRequest: PromoteReleaseRequest, ): string { return JSON.stringify( PromoteReleaseRequest$outboundSchema.parse(promoteReleaseRequest), ); }