/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 440cffc293e3 */ 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"; /** * Describes the response body of the /checkdocumentaccess API call */ export type CheckDocumentAccessResponse = { /** * If true, user has access to document for search */ hasAccess?: boolean | undefined; }; /** @internal */ export const CheckDocumentAccessResponse$inboundSchema: z.ZodType< CheckDocumentAccessResponse, z.ZodTypeDef, unknown > = z.object({ hasAccess: z.boolean().optional(), }); export function checkDocumentAccessResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CheckDocumentAccessResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CheckDocumentAccessResponse' from JSON`, ); }