/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ed7d2301ab09 */ import * as z from "zod/v4"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as models from "../index.js"; export type RedeployDeploymentGlobals = { /** * 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 RedeployDeploymentRequest = { /** * Unique identifier for the deployment. */ id: string; }; /** * Deployment redeployment triggered successfully. */ export type RedeployDeploymentResponse = { message: string; operation: models.DeploymentUpdateOperationSummary | null; }; /** @internal */ export type RedeployDeploymentRequest$Outbound = { id: string; }; /** @internal */ export const RedeployDeploymentRequest$outboundSchema: z.ZodType< RedeployDeploymentRequest$Outbound, RedeployDeploymentRequest > = z.object({ id: z.string(), }); export function redeployDeploymentRequestToJSON( redeployDeploymentRequest: RedeployDeploymentRequest, ): string { return JSON.stringify( RedeployDeploymentRequest$outboundSchema.parse(redeployDeploymentRequest), ); } /** @internal */ export const RedeployDeploymentResponse$inboundSchema: z.ZodType< RedeployDeploymentResponse, unknown > = z.object({ message: z.string(), operation: z.nullable(models.DeploymentUpdateOperationSummary$inboundSchema), }); export function redeployDeploymentResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RedeployDeploymentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RedeployDeploymentResponse' from JSON`, ); }