/* * 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 { GetChannelEndpointResponseDto, GetChannelEndpointResponseDto$inboundSchema, } from "./getchannelendpointresponsedto.js"; export type ListChannelEndpointsResponseDto = { /** * List of returned Channel Endpoints */ 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 ListChannelEndpointsResponseDto$inboundSchema: z.ZodType< ListChannelEndpointsResponseDto, z.ZodTypeDef, unknown > = z.object({ data: z.array(GetChannelEndpointResponseDto$inboundSchema), next: z.nullable(z.string()), previous: z.nullable(z.string()), totalCount: z.number(), totalCountCapped: z.boolean(), }); export function listChannelEndpointsResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListChannelEndpointsResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListChannelEndpointsResponseDto' from JSON`, ); }