/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 910d2eba3240
 */

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 { Workflow, Workflow$inboundSchema } from "./workflow.js";

export type WorkflowArchiveResponse = {
  workflow: Workflow;
};

/** @internal */
export const WorkflowArchiveResponse$inboundSchema: z.ZodType<
  WorkflowArchiveResponse,
  unknown
> = z.object({
  workflow: Workflow$inboundSchema,
});

export function workflowArchiveResponseFromJSON(
  jsonString: string,
): SafeParseResult<WorkflowArchiveResponse, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => WorkflowArchiveResponse$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'WorkflowArchiveResponse' from JSON`,
  );
}
