/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a73e79d295f9 */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { DeploymentConfig, DeploymentConfig$inboundSchema, } from "./deploymentconfig.js"; import { DeploymentSetupMethod, DeploymentSetupMethod$inboundSchema, } from "./deploymentsetupmethod.js"; import { DeploymentState, DeploymentState$inboundSchema, } from "./deploymentstate.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type SyncAcquireResponseDeployment = { /** * ID of the deployment */ deploymentId: string; /** * Project ID the deployment belongs to */ projectId: string; /** * Deployment group ID the deployment belongs to */ deploymentGroupId: string; setupMethod?: DeploymentSetupMethod | undefined; /** * Immutable target claimed for this execution, or null for observation-only work. */ operationId: string | null; /** * Execution attempt claimed by this manager session, or null for observation-only work. */ attemptId: string | null; /** * Current deployment state (includes releases) */ current: DeploymentState; /** * Deployment configuration */ config: DeploymentConfig; }; /** @internal */ export const SyncAcquireResponseDeployment$inboundSchema: z.ZodType< SyncAcquireResponseDeployment, unknown > = z.object({ deploymentId: z.string(), projectId: z.string(), deploymentGroupId: z.string(), setupMethod: DeploymentSetupMethod$inboundSchema.optional(), operationId: z.nullable(z.string()), attemptId: z.nullable(z.string()), current: DeploymentState$inboundSchema, config: DeploymentConfig$inboundSchema, }); export function syncAcquireResponseDeploymentFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SyncAcquireResponseDeployment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SyncAcquireResponseDeployment' from JSON`, ); }