/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: d1c64e0ea0fd */ 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 GetDocPermissionsResponse = { /** * A list of emails of users who have access to the document. If the document is visible to all Glean users, a list with only a single value of 'VISIBLE_TO_ALL'. */ allowedUserEmails?: Array | undefined; }; /** @internal */ export const GetDocPermissionsResponse$inboundSchema: z.ZodType< GetDocPermissionsResponse, z.ZodTypeDef, unknown > = z.object({ allowedUserEmails: z.array(z.string()).optional(), }); export function getDocPermissionsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetDocPermissionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDocPermissionsResponse' from JSON`, ); }