/* * 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"; export type ScreenshotAction = { type: "screenshot"; }; /** @internal */ export const ScreenshotAction$inboundSchema: z.ZodType< ScreenshotAction, z.ZodTypeDef, unknown > = z.object({ type: z.literal("screenshot"), }); /** @internal */ export type ScreenshotAction$Outbound = { type: "screenshot"; }; /** @internal */ export const ScreenshotAction$outboundSchema: z.ZodType< ScreenshotAction$Outbound, z.ZodTypeDef, ScreenshotAction > = z.object({ type: z.literal("screenshot"), }); export function screenshotActionToJSON( screenshotAction: ScreenshotAction, ): string { return JSON.stringify( ScreenshotAction$outboundSchema.parse(screenshotAction), ); } export function screenshotActionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ScreenshotAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScreenshotAction' from JSON`, ); }