/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type InboundWebhooksControllerHandleWebhookRequest = { /** * The environment identifier */ environmentId: string; /** * The integration identifier for the delivery provider */ integrationId: string; /** * A header for idempotency purposes */ idempotencyKey?: string | undefined; /** * Webhook event payload from the delivery provider */ requestBody: { [k: string]: any }; }; /** @internal */ export type InboundWebhooksControllerHandleWebhookRequest$Outbound = { environmentId: string; integrationId: string; "idempotency-key"?: string | undefined; RequestBody: { [k: string]: any }; }; /** @internal */ export const InboundWebhooksControllerHandleWebhookRequest$outboundSchema: z.ZodType< InboundWebhooksControllerHandleWebhookRequest$Outbound, z.ZodTypeDef, InboundWebhooksControllerHandleWebhookRequest > = z.object({ environmentId: z.string(), integrationId: z.string(), idempotencyKey: z.string().optional(), requestBody: z.record(z.any()), }).transform((v) => { return remap$(v, { idempotencyKey: "idempotency-key", requestBody: "RequestBody", }); }); export function inboundWebhooksControllerHandleWebhookRequestToJSON( inboundWebhooksControllerHandleWebhookRequest: InboundWebhooksControllerHandleWebhookRequest, ): string { return JSON.stringify( InboundWebhooksControllerHandleWebhookRequest$outboundSchema.parse( inboundWebhooksControllerHandleWebhookRequest, ), ); }