/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { EndpointScanned, EndpointScanned$inboundSchema, } from "./endpointscanned.js"; import { ForwardDnsResolved, ForwardDnsResolved$inboundSchema, } from "./forwarddnsresolved.js"; import { JarmScanned, JarmScanned$inboundSchema } from "./jarmscanned.js"; import { LocationUpdated, LocationUpdated$inboundSchema, } from "./locationupdated.js"; import { ReverseDnsResolved, ReverseDnsResolved$inboundSchema, } from "./reversednsresolved.js"; import { RouteUpdated, RouteUpdated$inboundSchema } from "./routeupdated.js"; import { ServiceScanned, ServiceScanned$inboundSchema, } from "./servicescanned.js"; import { WhoisUpdated, WhoisUpdated$inboundSchema } from "./whoisupdated.js"; export type HostTimelineEvent = { endpointScanned?: EndpointScanned | undefined; eventTime?: string | undefined; forwardDnsResolved?: ForwardDnsResolved | undefined; jarmScanned?: JarmScanned | undefined; locationUpdated?: LocationUpdated | undefined; reverseDnsResolved?: ReverseDnsResolved | undefined; routeUpdated?: RouteUpdated | undefined; serviceScanned?: ServiceScanned | undefined; whoisUpdated?: WhoisUpdated | undefined; }; /** @internal */ export const HostTimelineEvent$inboundSchema: z.ZodType< HostTimelineEvent, z.ZodTypeDef, unknown > = z.object({ endpoint_scanned: EndpointScanned$inboundSchema.optional(), event_time: z.string().optional(), forward_dns_resolved: ForwardDnsResolved$inboundSchema.optional(), jarm_scanned: JarmScanned$inboundSchema.optional(), location_updated: LocationUpdated$inboundSchema.optional(), reverse_dns_resolved: ReverseDnsResolved$inboundSchema.optional(), route_updated: RouteUpdated$inboundSchema.optional(), service_scanned: ServiceScanned$inboundSchema.optional(), whois_updated: WhoisUpdated$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "endpoint_scanned": "endpointScanned", "event_time": "eventTime", "forward_dns_resolved": "forwardDnsResolved", "jarm_scanned": "jarmScanned", "location_updated": "locationUpdated", "reverse_dns_resolved": "reverseDnsResolved", "route_updated": "routeUpdated", "service_scanned": "serviceScanned", "whois_updated": "whoisUpdated", }); }); export function hostTimelineEventFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HostTimelineEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HostTimelineEvent' from JSON`, ); }