/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; /** * The access level of the folder within the workspace. */ export const UpdateFolderAccessLevel = { Write: "write", Read: "read", } as const; /** * The access level of the folder within the workspace. */ export type UpdateFolderAccessLevel = ClosedEnum< typeof UpdateFolderAccessLevel >; export type UpdateFolderRequestBody = { /** * The name of the folder. */ name?: string | undefined; /** * The description of the folder. */ description?: string | null | undefined; /** * The access level of the folder within the workspace. */ accessLevel?: UpdateFolderAccessLevel | null | undefined; }; export type UpdateFolderRequest = { /** * The ID of the folder to update. */ id: string; requestBody?: UpdateFolderRequestBody | undefined; }; /** @internal */ export const UpdateFolderAccessLevel$outboundSchema: z.ZodNativeEnum< typeof UpdateFolderAccessLevel > = z.nativeEnum(UpdateFolderAccessLevel); /** @internal */ export type UpdateFolderRequestBody$Outbound = { name?: string | undefined; description?: string | null | undefined; accessLevel: string | null; }; /** @internal */ export const UpdateFolderRequestBody$outboundSchema: z.ZodType< UpdateFolderRequestBody$Outbound, z.ZodTypeDef, UpdateFolderRequestBody > = z.object({ name: z.string().optional(), description: z.nullable(z.string()).optional(), accessLevel: z.nullable(UpdateFolderAccessLevel$outboundSchema).default(null), }); export function updateFolderRequestBodyToJSON( updateFolderRequestBody: UpdateFolderRequestBody, ): string { return JSON.stringify( UpdateFolderRequestBody$outboundSchema.parse(updateFolderRequestBody), ); } /** @internal */ export type UpdateFolderRequest$Outbound = { id: string; RequestBody?: UpdateFolderRequestBody$Outbound | undefined; }; /** @internal */ export const UpdateFolderRequest$outboundSchema: z.ZodType< UpdateFolderRequest$Outbound, z.ZodTypeDef, UpdateFolderRequest > = z.object({ id: z.string(), requestBody: z.lazy(() => UpdateFolderRequestBody$outboundSchema).optional(), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function updateFolderRequestToJSON( updateFolderRequest: UpdateFolderRequest, ): string { return JSON.stringify( UpdateFolderRequest$outboundSchema.parse(updateFolderRequest), ); }