/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ResourceTypeEnum, ResourceTypeEnum$inboundSchema, } from "./resourcetypeenum.js"; export type FailedWorkflowDto = { /** * Type of the layout */ resourceType: ResourceTypeEnum; /** * Resource ID */ resourceId: string; /** * Resource name */ resourceName: string; /** * Error message */ error: string; /** * Error stack trace */ stack?: string | undefined; }; /** @internal */ export const FailedWorkflowDto$inboundSchema: z.ZodType< FailedWorkflowDto, z.ZodTypeDef, unknown > = z.object({ resourceType: ResourceTypeEnum$inboundSchema, resourceId: z.string(), resourceName: z.string(), error: z.string(), stack: z.string().optional(), }); export function failedWorkflowDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => FailedWorkflowDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FailedWorkflowDto' from JSON`, ); }