/* * 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 { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type WebhookDtoRejectedEventData = { customerId?: string | undefined; eventName?: string | undefined; externalCustomerId?: string | undefined; id?: string | undefined; properties?: { [k: string]: any } | undefined; source?: string | undefined; timestamp?: string | undefined; }; /** @internal */ export const WebhookDtoRejectedEventData$inboundSchema: z.ZodMiniType< WebhookDtoRejectedEventData, unknown > = z.pipe( z.object({ customer_id: types.optional(types.string()), event_name: types.optional(types.string()), external_customer_id: types.optional(types.string()), id: types.optional(types.string()), properties: types.optional(z.record(z.string(), z.any())), source: types.optional(types.string()), timestamp: types.optional(types.string()), }), z.transform((v) => { return remap$(v, { "customer_id": "customerId", "event_name": "eventName", "external_customer_id": "externalCustomerId", }); }), ); export function webhookDtoRejectedEventDataFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WebhookDtoRejectedEventData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookDtoRejectedEventData' from JSON`, ); }