/* * 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 { NotificationFeedItemDto, NotificationFeedItemDto$inboundSchema, } from "./notificationfeeditemdto.js"; export type FeedResponseDto = { /** * Total number of notifications available. */ totalCount?: number | undefined; /** * Indicates if there are more notifications to load. */ hasMore: boolean; /** * Array of notifications returned in the response. */ data: Array; /** * The number of notifications returned in this response. */ pageSize: number; /** * The current page number of the notifications. */ page: number; }; /** @internal */ export const FeedResponseDto$inboundSchema: z.ZodType< FeedResponseDto, z.ZodTypeDef, unknown > = z.object({ totalCount: z.number().optional(), hasMore: z.boolean(), data: z.array(NotificationFeedItemDto$inboundSchema), pageSize: z.number(), page: z.number(), }); export function feedResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => FeedResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FeedResponseDto' from JSON`, ); }