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