/* * 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"; export type HttpFavicon = { hashMd5?: string | undefined; /** * A 64-bit 'perceptual' hash of the favicon */ hashPhash?: string | undefined; hashSha256?: string | undefined; /** * A hash expressed as a signed decimal integer, provided for compatability with Shodan search. */ hashShodan?: number | undefined; /** * The URI used to retrieve the favicon, which most commonly use the http(s) or data schemes. URIs using the data scheme are truncated: the first 48 and last 24 characters are preserved. */ name?: string | undefined; /** * The size of the favicon retrieved, in bytes. */ size?: number | undefined; }; /** @internal */ export const HttpFavicon$inboundSchema: z.ZodType< HttpFavicon, z.ZodTypeDef, unknown > = z.object({ hash_md5: z.string().optional(), hash_phash: z.string().optional(), hash_sha256: z.string().optional(), hash_shodan: z.number().int().optional(), name: z.string().optional(), size: z.number().int().optional(), }).transform((v) => { return remap$(v, { "hash_md5": "hashMd5", "hash_phash": "hashPhash", "hash_sha256": "hashSha256", "hash_shodan": "hashShodan", }); }); export function httpFaviconFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HttpFavicon$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HttpFavicon' from JSON`, ); }