/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 27daf46fb798 */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type Workspace = { /** * Unique identifier for the workspace. */ id: string; /** * Workspace name. */ name: string; logoUrl?: string | null | undefined; createdAt: Date; }; /** @internal */ export const Workspace$inboundSchema: z.ZodType = z.object({ id: z.string(), name: z.string(), logoUrl: z.nullable(z.string()).optional(), createdAt: z.iso.datetime({ offset: true }).transform(v => new Date(v)), }); export function workspaceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Workspace$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Workspace' from JSON`, ); }