/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 0ea82506c4fd */ 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 { Collection, Collection$inboundSchema } from "./collection.js"; export type ListCollectionsResponse = { /** * List of all Collections, no Collection items are fetched. */ collections: Array; }; /** @internal */ export const ListCollectionsResponse$inboundSchema: z.ZodType< ListCollectionsResponse, z.ZodTypeDef, unknown > = z.object({ collections: z.array(Collection$inboundSchema), }); export function listCollectionsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListCollectionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListCollectionsResponse' from JSON`, ); }