/* * 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"; /** * Request body for retrying event delivery to a destination. */ export type RetryRequest = { /** * The ID of the event to retry. */ eventId: string; /** * The ID of the destination to deliver to. */ destinationId: string; }; /** @internal */ export const RetryRequest$inboundSchema: z.ZodType< RetryRequest, z.ZodTypeDef, unknown > = z.object({ event_id: z.string(), destination_id: z.string(), }).transform((v) => { return remap$(v, { "event_id": "eventId", "destination_id": "destinationId", }); }); /** @internal */ export type RetryRequest$Outbound = { event_id: string; destination_id: string; }; /** @internal */ export const RetryRequest$outboundSchema: z.ZodType< RetryRequest$Outbound, z.ZodTypeDef, RetryRequest > = z.object({ eventId: z.string(), destinationId: z.string(), }).transform((v) => { return remap$(v, { eventId: "event_id", destinationId: "destination_id", }); }); export function retryRequestToJSON(retryRequest: RetryRequest): string { return JSON.stringify(RetryRequest$outboundSchema.parse(retryRequest)); } export function retryRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RetryRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetryRequest' from JSON`, ); }