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