/* * 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 * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ChromeDevtools, ChromeDevtools$inboundSchema, } from "./chromedevtools.js"; import { CobaltStrike, CobaltStrike$inboundSchema } from "./cobaltstrike.js"; import { ElasticSearch, ElasticSearch$inboundSchema } from "./elasticsearch.js"; import { ExtractedEndpointData, ExtractedEndpointData$inboundSchema, } from "./extractedendpointdata.js"; import { Fortigate, Fortigate$inboundSchema } from "./fortigate.js"; import { Graphql, Graphql$inboundSchema } from "./graphql.js"; import { Http, Http$inboundSchema } from "./http.js"; import { IvantiAvalanche, IvantiAvalanche$inboundSchema, } from "./ivantiavalanche.js"; import { Jenkins, Jenkins$inboundSchema } from "./jenkins.js"; import { Kubernetes, Kubernetes$inboundSchema } from "./kubernetes.js"; import { Mcp, Mcp$inboundSchema } from "./mcp.js"; import { Ollama, Ollama$inboundSchema } from "./ollama.js"; import { OpenDirectory, OpenDirectory$inboundSchema } from "./opendirectory.js"; import { PlexMediaServer, PlexMediaServer$inboundSchema, } from "./plexmediaserver.js"; import { Pprof, Pprof$inboundSchema } from "./pprof.js"; import { Prometheus, Prometheus$inboundSchema } from "./prometheus.js"; import { PrometheusTarget, PrometheusTarget$inboundSchema, } from "./prometheustarget.js"; import { RedlionWeb, RedlionWeb$inboundSchema } from "./redlionweb.js"; import { ScadaView, ScadaView$inboundSchema } from "./scadaview.js"; import { Screenshot, Screenshot$inboundSchema } from "./screenshot.js"; export const EndpointScanStateTransportProtocol = { Unknown: "", Tcp: "tcp", Udp: "udp", Icmp: "icmp", Quic: "quic", } as const; export type EndpointScanStateTransportProtocol = OpenEnum< typeof EndpointScanStateTransportProtocol >; export type EndpointScanState = { banner?: string | undefined; bannerHashSha256?: string | undefined; chromeDevtools?: ChromeDevtools | undefined; cobaltStrike?: CobaltStrike | undefined; elasticsearch?: ElasticSearch | undefined; endpointType?: string | undefined; extracted?: ExtractedEndpointData | undefined; fortigate?: Fortigate | undefined; graphql?: Graphql | undefined; hostname?: string | undefined; http?: Http | undefined; ip?: string | undefined; ivantiAvalanche?: IvantiAvalanche | undefined; jenkins?: Jenkins | undefined; kubernetes?: Kubernetes | undefined; mcp?: Mcp | undefined; ollama?: Ollama | undefined; openDirectory?: OpenDirectory | undefined; path?: string | undefined; plexMediaServer?: PlexMediaServer | undefined; port?: number | undefined; pprof?: Pprof | undefined; prometheus?: Prometheus | undefined; prometheusTarget?: PrometheusTarget | undefined; redlionWeb?: RedlionWeb | undefined; scadaView?: ScadaView | undefined; scanTime?: string | undefined; screenshots?: Array | null | undefined; transportProtocol?: EndpointScanStateTransportProtocol | undefined; }; /** @internal */ export const EndpointScanStateTransportProtocol$inboundSchema: z.ZodType< EndpointScanStateTransportProtocol, z.ZodTypeDef, unknown > = openEnums.inboundSchema(EndpointScanStateTransportProtocol); /** @internal */ export const EndpointScanState$inboundSchema: z.ZodType< EndpointScanState, z.ZodTypeDef, unknown > = z.object({ banner: z.string().optional(), banner_hash_sha256: z.string().optional(), chrome_devtools: ChromeDevtools$inboundSchema.optional(), cobalt_strike: CobaltStrike$inboundSchema.optional(), elasticsearch: ElasticSearch$inboundSchema.optional(), endpoint_type: z.string().optional(), extracted: ExtractedEndpointData$inboundSchema.optional(), fortigate: Fortigate$inboundSchema.optional(), graphql: Graphql$inboundSchema.optional(), hostname: z.string().optional(), http: Http$inboundSchema.optional(), ip: z.string().optional(), ivanti_avalanche: IvantiAvalanche$inboundSchema.optional(), jenkins: Jenkins$inboundSchema.optional(), kubernetes: Kubernetes$inboundSchema.optional(), mcp: Mcp$inboundSchema.optional(), ollama: Ollama$inboundSchema.optional(), open_directory: OpenDirectory$inboundSchema.optional(), path: z.string().optional(), plex_media_server: PlexMediaServer$inboundSchema.optional(), port: z.number().int().optional(), pprof: Pprof$inboundSchema.optional(), prometheus: Prometheus$inboundSchema.optional(), prometheus_target: PrometheusTarget$inboundSchema.optional(), redlion_web: RedlionWeb$inboundSchema.optional(), scada_view: ScadaView$inboundSchema.optional(), scan_time: z.string().optional(), screenshots: z.nullable(z.array(Screenshot$inboundSchema)).optional(), transport_protocol: EndpointScanStateTransportProtocol$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "banner_hash_sha256": "bannerHashSha256", "chrome_devtools": "chromeDevtools", "cobalt_strike": "cobaltStrike", "endpoint_type": "endpointType", "ivanti_avalanche": "ivantiAvalanche", "open_directory": "openDirectory", "plex_media_server": "plexMediaServer", "prometheus_target": "prometheusTarget", "redlion_web": "redlionWeb", "scada_view": "scadaView", "scan_time": "scanTime", "transport_protocol": "transportProtocol", }); }); export function endpointScanStateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EndpointScanState$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointScanState' from JSON`, ); }