/* * 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"; import { SyncActionEnum, SyncActionEnum$inboundSchema, } from "./syncactionenum.js"; export type SyncedWorkflowDto = { /** * Type of the layout */ resourceType: ResourceTypeEnum; /** * Resource ID */ resourceId: string; /** * Resource name */ resourceName: string; /** * Sync action performed */ action: SyncActionEnum; }; /** @internal */ export const SyncedWorkflowDto$inboundSchema: z.ZodType< SyncedWorkflowDto, z.ZodTypeDef, unknown > = z.object({ resourceType: ResourceTypeEnum$inboundSchema, resourceId: z.string(), resourceName: z.string(), action: SyncActionEnum$inboundSchema, }); export function syncedWorkflowDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SyncedWorkflowDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SyncedWorkflowDto' from JSON`, ); }