/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "./sdk-validation-error.js"; import { TenantResponse, TenantResponse$inboundSchema, } from "./tenant-response.js"; import { UserType, UserType$inboundSchema } from "./user-type.js"; export type UpdateUserRolesResponse = { /** * Empty for service accounts */ email?: string | undefined; id?: string | undefined; metadata?: { [k: string]: string } | undefined; name?: string | undefined; roles?: Array | undefined; tenant?: TenantResponse | undefined; type?: UserType | undefined; }; /** @internal */ export const UpdateUserRolesResponse$inboundSchema: z.ZodMiniType< UpdateUserRolesResponse, unknown > = z.object({ email: types.optional(types.string()), id: types.optional(types.string()), metadata: types.optional(z.record(z.string(), types.string())), name: types.optional(types.string()), roles: types.optional(z.array(types.string())), tenant: types.optional(TenantResponse$inboundSchema), type: types.optional(UserType$inboundSchema), }); export function updateUserRolesResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UpdateUserRolesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateUserRolesResponse' from JSON`, ); }