/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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 { GetChannelConnectionResponseDto, GetChannelConnectionResponseDto$inboundSchema, } from "./getchannelconnectionresponsedto.js"; export type ListChannelConnectionsResponseDto = { /** * List of returned Channel Connections */ data: Array; /** * The cursor for the next page of results, or null if there are no more pages. */ next: string | null; /** * The cursor for the previous page of results, or null if this is the first page. */ previous: string | null; /** * The total count of items (up to 50,000) */ totalCount: number; /** * Whether there are more than 50,000 results available */ totalCountCapped: boolean; }; /** @internal */ export const ListChannelConnectionsResponseDto$inboundSchema: z.ZodType< ListChannelConnectionsResponseDto, z.ZodTypeDef, unknown > = z.object({ data: z.array(GetChannelConnectionResponseDto$inboundSchema), next: z.nullable(z.string()), previous: z.nullable(z.string()), totalCount: z.number(), totalCountCapped: z.boolean(), }); export function listChannelConnectionsResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListChannelConnectionsResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListChannelConnectionsResponseDto' from JSON`, ); }