/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: db355bdaba0f */ 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"; import { UserWorkspace, UserWorkspace$inboundSchema } from "./userworkspace.js"; export type ListWorkspacesResponse = { /** * The workspaces the authenticated user is a member of, each tagged with the organization it belongs to. */ workspaces: Array; }; /** @internal */ export const ListWorkspacesResponse$inboundSchema: z.ZodType< ListWorkspacesResponse, unknown > = z.object({ workspaces: z.array(UserWorkspace$inboundSchema), }); export function listWorkspacesResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListWorkspacesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListWorkspacesResponse' from JSON`, ); }