/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type V3GlobaldataAssetHostListPostGlobals = { organizationId?: string | undefined; }; export type V3GlobaldataAssetHostListPostRequest = { /** * The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. */ organizationId?: string | undefined; assetHostListInputBody: components.AssetHostListInputBody; }; export type V3GlobaldataAssetHostListPostResponse = { headers: { [k: string]: Array }; result: components.ResponseEnvelopeListHostAsset; }; /** @internal */ export type V3GlobaldataAssetHostListPostRequest$Outbound = { organization_id?: string | undefined; AssetHostListInputBody: components.AssetHostListInputBody$Outbound; }; /** @internal */ export const V3GlobaldataAssetHostListPostRequest$outboundSchema: z.ZodType< V3GlobaldataAssetHostListPostRequest$Outbound, z.ZodTypeDef, V3GlobaldataAssetHostListPostRequest > = z.object({ organizationId: z.string().optional(), assetHostListInputBody: components.AssetHostListInputBody$outboundSchema, }).transform((v) => { return remap$(v, { organizationId: "organization_id", assetHostListInputBody: "AssetHostListInputBody", }); }); export function v3GlobaldataAssetHostListPostRequestToJSON( v3GlobaldataAssetHostListPostRequest: V3GlobaldataAssetHostListPostRequest, ): string { return JSON.stringify( V3GlobaldataAssetHostListPostRequest$outboundSchema.parse( v3GlobaldataAssetHostListPostRequest, ), ); } /** @internal */ export const V3GlobaldataAssetHostListPostResponse$inboundSchema: z.ZodType< V3GlobaldataAssetHostListPostResponse, z.ZodTypeDef, unknown > = z.object({ Headers: z.record(z.array(z.string())).default({}), Result: components.ResponseEnvelopeListHostAsset$inboundSchema, }).transform((v) => { return remap$(v, { "Headers": "headers", "Result": "result", }); }); export function v3GlobaldataAssetHostListPostResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3GlobaldataAssetHostListPostResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3GlobaldataAssetHostListPostResponse' from JSON`, ); }