/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 1238442cfbfd */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ChatMetadataResult, ChatMetadataResult$inboundSchema, } from "./chatmetadataresult.js"; export type ListChatsResponse = { chatResults?: Array | undefined; /** * An opaque cursor for fetching the next page of results. If empty, there are no more results. */ cursor?: string | undefined; }; /** @internal */ export const ListChatsResponse$inboundSchema: z.ZodType< ListChatsResponse, z.ZodTypeDef, unknown > = z.object({ chatResults: z.array(ChatMetadataResult$inboundSchema).optional(), cursor: z.string().optional(), }); export function listChatsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListChatsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListChatsResponse' from JSON`, ); }