/* * 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 { NetworkLogResourceInfo, NetworkLogResourceInfo$inboundSchema, } from "./networklogresourceinfo.js"; export type NetworkLog = { /** * Storage handle for the full HAR network log. */ harHandle?: string | undefined; /** * Resources fetched during page load. */ resources?: Array | null | undefined; }; /** @internal */ export const NetworkLog$inboundSchema: z.ZodType< NetworkLog, z.ZodTypeDef, unknown > = z.object({ har_handle: z.string().optional(), resources: z.nullable(z.array(NetworkLogResourceInfo$inboundSchema)) .optional(), }).transform((v) => { return remap$(v, { "har_handle": "harHandle", }); }); export function networkLogFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => NetworkLog$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NetworkLog' from JSON`, ); }