/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ccc3b5b149b8 */ 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 { DocumentPermissionsDefinition, DocumentPermissionsDefinition$inboundSchema, } from "./documentpermissionsdefinition.js"; import { DocumentStatusResponse, DocumentStatusResponse$inboundSchema, } from "./documentstatusresponse.js"; /** * Describes the response body of the /debug/{datasource}/document API call */ export type DebugDocumentResponse = { /** * Describes the document status response body */ status?: DocumentStatusResponse | undefined; /** * describes the access control details of the document */ uploadedPermissions?: DocumentPermissionsDefinition | undefined; }; /** @internal */ export const DebugDocumentResponse$inboundSchema: z.ZodType< DebugDocumentResponse, z.ZodTypeDef, unknown > = z.object({ status: DocumentStatusResponse$inboundSchema.optional(), uploadedPermissions: DocumentPermissionsDefinition$inboundSchema.optional(), }); export function debugDocumentResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DebugDocumentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DebugDocumentResponse' from JSON`, ); }