/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { WebhookEventTypeEnum, WebhookEventTypeEnum$outboundSchema, } from "./webhookeventtypeenum.js"; export type WebhookUpdateRequest = { /** * Type of event that triggered the webhook. */ event: WebhookEventTypeEnum; /** * URL webhook events are sent to. */ url: string; /** * Determines whether the webhook is active or not. */ active?: boolean | undefined; /** * Determines whether the webhook is a test webhook or not. */ isTest?: boolean | undefined; }; /** @internal */ export type WebhookUpdateRequest$Outbound = { event: string; url: string; active?: boolean | undefined; is_test?: boolean | undefined; }; /** @internal */ export const WebhookUpdateRequest$outboundSchema: z.ZodMiniType< WebhookUpdateRequest$Outbound, WebhookUpdateRequest > = z.pipe( z.object({ event: WebhookEventTypeEnum$outboundSchema, url: z.string(), active: z.optional(z.boolean()), isTest: z.optional(z.boolean()), }), z.transform((v) => { return remap$(v, { isTest: "is_test", }); }), ); export function webhookUpdateRequestToJSON( webhookUpdateRequest: WebhookUpdateRequest, ): string { return JSON.stringify( WebhookUpdateRequest$outboundSchema.parse(webhookUpdateRequest), ); }