/* * 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 DeleteWebhookEndpointRequest = { endpointId: string; }; /** @internal */ export const DeleteWebhookEndpointRequest$inboundSchema: z.ZodType< DeleteWebhookEndpointRequest, z.ZodTypeDef, unknown > = z.object({ endpoint_id: z.string(), }).transform((v) => { return remap$(v, { "endpoint_id": "endpointId", }); }); /** @internal */ export type DeleteWebhookEndpointRequest$Outbound = { endpoint_id: string; }; /** @internal */ export const DeleteWebhookEndpointRequest$outboundSchema: z.ZodType< DeleteWebhookEndpointRequest$Outbound, z.ZodTypeDef, DeleteWebhookEndpointRequest > = z.object({ endpointId: z.string(), }).transform((v) => { return remap$(v, { endpointId: "endpoint_id", }); }); export function deleteWebhookEndpointRequestToJSON( deleteWebhookEndpointRequest: DeleteWebhookEndpointRequest, ): string { return JSON.stringify( DeleteWebhookEndpointRequest$outboundSchema.parse( deleteWebhookEndpointRequest, ), ); } export function deleteWebhookEndpointRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteWebhookEndpointRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteWebhookEndpointRequest' from JSON`, ); }