/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** * The access level of the folder within the workspace. */ export const AccessLevel = { Write: "write", Read: "read", } as const; /** * The access level of the folder within the workspace. */ export type AccessLevel = ClosedEnum; export type CreateFolderRequestBody = { /** * The name of the folder. */ name: string; /** * The description of the folder. */ description?: string | null | undefined; /** * The access level of the folder within the workspace. */ accessLevel?: AccessLevel | null | undefined; }; /** @internal */ export const AccessLevel$outboundSchema: z.ZodNativeEnum = z .nativeEnum(AccessLevel); /** @internal */ export type CreateFolderRequestBody$Outbound = { name: string; description?: string | null | undefined; accessLevel: string | null; }; /** @internal */ export const CreateFolderRequestBody$outboundSchema: z.ZodType< CreateFolderRequestBody$Outbound, z.ZodTypeDef, CreateFolderRequestBody > = z.object({ name: z.string(), description: z.nullable(z.string()).optional(), accessLevel: z.nullable(AccessLevel$outboundSchema).default(null), }); export function createFolderRequestBodyToJSON( createFolderRequestBody: CreateFolderRequestBody, ): string { return JSON.stringify( CreateFolderRequestBody$outboundSchema.parse(createFolderRequestBody), ); }