/* * 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"; export type SubscriptionErrorDto = { /** * The subscriber ID that failed */ subscriberId: string; /** * The error code */ code: string; /** * The error message */ message: string; }; /** @internal */ export const SubscriptionErrorDto$inboundSchema: z.ZodType< SubscriptionErrorDto, z.ZodTypeDef, unknown > = z.object({ subscriberId: z.string(), code: z.string(), message: z.string(), }); export function subscriptionErrorDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SubscriptionErrorDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubscriptionErrorDto' from JSON`, ); }