/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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"; /** * The permissions granted by a role. */ export type PermissionSet = { /** * The scopes granted by this role. */ allow: Array; }; /** @internal */ export const PermissionSet$inboundSchema: z.ZodType< PermissionSet, z.ZodTypeDef, unknown > = z.object({ allow: z.array(z.string()), }); export function permissionSetFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PermissionSet$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PermissionSet' from JSON`, ); }