/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 2e32938b076f */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { DeploymentUpdateOperationStatus, DeploymentUpdateOperationStatus$inboundSchema, } from "./deploymentupdateoperationstatus.js"; import { DeploymentUpdateReason, DeploymentUpdateReason$inboundSchema, } from "./deploymentupdatereason.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type DeploymentUpdateOperationSummary = { /** * Unique identifier for the deployment update operation. */ id: string; status: DeploymentUpdateOperationStatus; reasons: Array; /** * Unique identifier for the release. */ targetReleaseId: string; changedKeys: Array; /** * Action needed before this update can execute; the current release remains installed. */ actionRequired?: string | null | undefined; requestedAt: Date; startedAt?: Date | null | undefined; completedAt?: Date | null | undefined; }; /** @internal */ export const DeploymentUpdateOperationSummary$inboundSchema: z.ZodType< DeploymentUpdateOperationSummary, unknown > = z.object({ id: z.string(), status: DeploymentUpdateOperationStatus$inboundSchema, reasons: z.array(DeploymentUpdateReason$inboundSchema), targetReleaseId: z.string(), changedKeys: z.array(z.string()), actionRequired: z.nullable(z.string()).optional(), requestedAt: z.iso.datetime({ offset: true }).transform(v => new Date(v)), startedAt: z.nullable( z.iso.datetime({ offset: true }).transform(v => new Date(v)), ).optional(), completedAt: z.nullable( z.iso.datetime({ offset: true }).transform(v => new Date(v)), ).optional(), }); export function deploymentUpdateOperationSummaryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentUpdateOperationSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentUpdateOperationSummary' from JSON`, ); }