/* * 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 "./errors/sdk-validation-error.js"; import { IdNameEmail, IdNameEmail$inboundSchema } from "./id-name-email.js"; export type IdUserIdRole2 = { /** * Membership ID */ id: string; /** * User ID */ userId: string; /** * Member role (admin, editor, viewer) */ role: string; user: IdNameEmail; /** * ISO timestamp of when member was added */ createdAt: string; /** * ISO timestamp of last update */ updatedAt: string; }; /** @internal */ export const IdUserIdRole2$inboundSchema: z.ZodMiniType< IdUserIdRole2, unknown > = z.object({ id: types.string(), userId: types.string(), role: types.string(), user: IdNameEmail$inboundSchema, createdAt: types.string(), updatedAt: types.string(), }); export function idUserIdRole2FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IdUserIdRole2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IdUserIdRole2' from JSON`, ); }