/* * 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 { DebugTracker, DebugTracker$inboundSchema } from "./debug-tracker.js"; import { EventProcessingStatusType, EventProcessingStatusType$inboundSchema, } from "./event-processing-status-type.js"; import { Event, Event$inboundSchema } from "./event.js"; import { FeatureUsageInfo, FeatureUsageInfo$inboundSchema, } from "./feature-usage-info.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type GetEventByIDResponse = { debugTracker?: DebugTracker | undefined; event?: Event | undefined; processedEvents?: Array | undefined; status?: EventProcessingStatusType | undefined; }; /** @internal */ export const GetEventByIDResponse$inboundSchema: z.ZodMiniType< GetEventByIDResponse, unknown > = z.pipe( z.object({ debug_tracker: types.optional(DebugTracker$inboundSchema), event: types.optional(Event$inboundSchema), processed_events: types.optional(z.array(FeatureUsageInfo$inboundSchema)), status: types.optional(EventProcessingStatusType$inboundSchema), }), z.transform((v) => { return remap$(v, { "debug_tracker": "debugTracker", "processed_events": "processedEvents", }); }), ); export function getEventByIDResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetEventByIDResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetEventByIDResponse' from JSON`, ); }