/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { UserType, UserType$outboundSchema } from "./user-type.js"; export type CreateUserRequest = { /** * Required when type is "user" */ email?: string | undefined; /** * Display name; optional for service accounts */ name?: string | undefined; /** * Required when type is "service_account" */ roles?: Array | undefined; type: UserType; }; /** @internal */ export type CreateUserRequest$Outbound = { email?: string | undefined; name?: string | undefined; roles?: Array | undefined; type: string; }; /** @internal */ export const CreateUserRequest$outboundSchema: z.ZodMiniType< CreateUserRequest$Outbound, CreateUserRequest > = z.object({ email: z.optional(z.string()), name: z.optional(z.string()), roles: z.optional(z.array(z.string())), type: UserType$outboundSchema, }); export function createUserRequestToJSON( createUserRequest: CreateUserRequest, ): string { return JSON.stringify( CreateUserRequest$outboundSchema.parse(createUserRequest), ); }