/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 264e300b31ca */ 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 { Shortcut, Shortcut$inboundSchema } from "./shortcut.js"; import { ShortcutError, ShortcutError$inboundSchema } from "./shortcuterror.js"; export type UpdateShortcutResponse = { shortcut?: Shortcut | undefined; error?: ShortcutError | undefined; }; /** @internal */ export const UpdateShortcutResponse$inboundSchema: z.ZodType< UpdateShortcutResponse, z.ZodTypeDef, unknown > = z.object({ shortcut: Shortcut$inboundSchema.optional(), error: ShortcutError$inboundSchema.optional(), }); export function updateShortcutResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UpdateShortcutResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateShortcutResponse' from JSON`, ); }