/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SubscriberFeedResponseDto = { /** * The internal ID generated by Novu for your subscriber. This ID does not match the `subscriberId` used in your queries. Refer to `subscriberId` for that identifier. */ id?: string | undefined; /** * The first name of the subscriber. */ firstName?: string | undefined; /** * The last name of the subscriber. */ lastName?: string | undefined; /** * The URL of the subscriber's avatar image. */ avatar?: string | undefined; /** * The identifier used to create this subscriber, which typically corresponds to the user ID in your system. */ subscriberId: string; }; /** @internal */ export const SubscriberFeedResponseDto$inboundSchema: z.ZodType< SubscriberFeedResponseDto, z.ZodTypeDef, unknown > = z.object({ _id: z.string().optional(), firstName: z.string().optional(), lastName: z.string().optional(), avatar: z.string().optional(), subscriberId: z.string(), }).transform((v) => { return remap$(v, { "_id": "id", }); }); export function subscriberFeedResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SubscriberFeedResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubscriberFeedResponseDto' from JSON`, ); }