/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateWebhookEndpointRequest = { endpointId: string; updateWebhookEndpointPayload: components.UpdateWebhookEndpointPayload; }; /** @internal */ export const UpdateWebhookEndpointRequest$inboundSchema: z.ZodType< UpdateWebhookEndpointRequest, z.ZodTypeDef, unknown > = z.object({ endpoint_id: z.string(), UpdateWebhookEndpointPayload: components.UpdateWebhookEndpointPayload$inboundSchema, }).transform((v) => { return remap$(v, { "endpoint_id": "endpointId", "UpdateWebhookEndpointPayload": "updateWebhookEndpointPayload", }); }); /** @internal */ export type UpdateWebhookEndpointRequest$Outbound = { endpoint_id: string; UpdateWebhookEndpointPayload: components.UpdateWebhookEndpointPayload$Outbound; }; /** @internal */ export const UpdateWebhookEndpointRequest$outboundSchema: z.ZodType< UpdateWebhookEndpointRequest$Outbound, z.ZodTypeDef, UpdateWebhookEndpointRequest > = z.object({ endpointId: z.string(), updateWebhookEndpointPayload: components.UpdateWebhookEndpointPayload$outboundSchema, }).transform((v) => { return remap$(v, { endpointId: "endpoint_id", updateWebhookEndpointPayload: "UpdateWebhookEndpointPayload", }); }); export function updateWebhookEndpointRequestToJSON( updateWebhookEndpointRequest: UpdateWebhookEndpointRequest, ): string { return JSON.stringify( UpdateWebhookEndpointRequest$outboundSchema.parse( updateWebhookEndpointRequest, ), ); } export function updateWebhookEndpointRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UpdateWebhookEndpointRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateWebhookEndpointRequest' from JSON`, ); }