/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 4813ff94f2aa */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UserWorkspace = { /** * The workspace's unique identifier. */ id: string; /** * The workspace's display name. */ name: string; /** * The identifier of the organization this workspace belongs to. */ organizationId: string; }; /** @internal */ export const UserWorkspace$inboundSchema: z.ZodType = z .object({ id: z.string(), name: z.string(), organization_id: z.string(), }).transform((v) => { return remap$(v, { "organization_id": "organizationId", }); }); export function userWorkspaceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UserWorkspace$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserWorkspace' from JSON`, ); }