/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; export type PatchWorkflowDto = { /** * Activate or deactivate the workflow */ active?: boolean | undefined; /** * New name for the workflow */ name?: string | undefined; /** * Updated description of the workflow */ description?: string | undefined; /** * Tags associated with the workflow */ tags?: Array | undefined; /** * The payload JSON Schema for the workflow */ payloadSchema?: { [k: string]: any } | null | undefined; /** * Enable or disable payload schema validation */ validatePayload?: boolean | undefined; /** * Enable or disable translations for this workflow */ isTranslationEnabled?: boolean | undefined; }; /** @internal */ export type PatchWorkflowDto$Outbound = { active?: boolean | undefined; name?: string | undefined; description?: string | undefined; tags?: Array | undefined; payloadSchema?: { [k: string]: any } | null | undefined; validatePayload?: boolean | undefined; isTranslationEnabled?: boolean | undefined; }; /** @internal */ export const PatchWorkflowDto$outboundSchema: z.ZodType< PatchWorkflowDto$Outbound, z.ZodTypeDef, PatchWorkflowDto > = z.object({ active: z.boolean().optional(), name: z.string().optional(), description: z.string().optional(), tags: z.array(z.string()).optional(), payloadSchema: z.nullable(z.record(z.any())).optional(), validatePayload: z.boolean().optional(), isTranslationEnabled: z.boolean().optional(), }); export function patchWorkflowDtoToJSON( patchWorkflowDto: PatchWorkflowDto, ): string { return JSON.stringify( PatchWorkflowDto$outboundSchema.parse(patchWorkflowDto), ); }