/* * 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 { InboxNotificationDto, InboxNotificationDto$inboundSchema, } from "./inboxnotificationdto.js"; /** * The filter applied to the notifications */ export type Filter = {}; export type GetSubscriberNotificationsResponseDto = { /** * Array of notifications */ data: Array; /** * Indicates if there are more notifications available */ hasMore: boolean; /** * The filter applied to the notifications */ filter: Filter; }; /** @internal */ export const Filter$inboundSchema: z.ZodType = z .object({}); export function filterFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Filter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Filter' from JSON`, ); } /** @internal */ export const GetSubscriberNotificationsResponseDto$inboundSchema: z.ZodType< GetSubscriberNotificationsResponseDto, z.ZodTypeDef, unknown > = z.object({ data: z.array(InboxNotificationDto$inboundSchema), hasMore: z.boolean(), filter: z.lazy(() => Filter$inboundSchema), }); export function getSubscriberNotificationsResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetSubscriberNotificationsResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSubscriberNotificationsResponseDto' from JSON`, ); }