/* * 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 { EventBody, EventBody$inboundSchema } from "./eventbody.js"; export type WebhookResultDto = { /** * Unique identifier for the webhook result */ id: string; /** * Event body containing the webhook event data */ event: EventBody; }; /** @internal */ export const WebhookResultDto$inboundSchema: z.ZodType< WebhookResultDto, z.ZodTypeDef, unknown > = z.object({ id: z.string(), event: EventBody$inboundSchema, }); export function webhookResultDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WebhookResultDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookResultDto' from JSON`, ); }