/* * 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 V3GlobaldataAssetWebpropertyListPostGlobals = { organizationId?: string | undefined; }; export type V3GlobaldataAssetWebpropertyListPostRequest = { /** * 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; assetWebpropertyListInputBody: components.AssetWebpropertyListInputBody; }; export type V3GlobaldataAssetWebpropertyListPostResponse = { headers: { [k: string]: Array }; result: components.ResponseEnvelopeListWebpropertyAsset; }; /** @internal */ export type V3GlobaldataAssetWebpropertyListPostRequest$Outbound = { organization_id?: string | undefined; AssetWebpropertyListInputBody: components.AssetWebpropertyListInputBody$Outbound; }; /** @internal */ export const V3GlobaldataAssetWebpropertyListPostRequest$outboundSchema: z.ZodType< V3GlobaldataAssetWebpropertyListPostRequest$Outbound, z.ZodTypeDef, V3GlobaldataAssetWebpropertyListPostRequest > = z.object({ organizationId: z.string().optional(), assetWebpropertyListInputBody: components.AssetWebpropertyListInputBody$outboundSchema, }).transform((v) => { return remap$(v, { organizationId: "organization_id", assetWebpropertyListInputBody: "AssetWebpropertyListInputBody", }); }); export function v3GlobaldataAssetWebpropertyListPostRequestToJSON( v3GlobaldataAssetWebpropertyListPostRequest: V3GlobaldataAssetWebpropertyListPostRequest, ): string { return JSON.stringify( V3GlobaldataAssetWebpropertyListPostRequest$outboundSchema.parse( v3GlobaldataAssetWebpropertyListPostRequest, ), ); } /** @internal */ export const V3GlobaldataAssetWebpropertyListPostResponse$inboundSchema: z.ZodType< V3GlobaldataAssetWebpropertyListPostResponse, z.ZodTypeDef, unknown > = z.object({ Headers: z.record(z.array(z.string())).default({}), Result: components.ResponseEnvelopeListWebpropertyAsset$inboundSchema, }).transform((v) => { return remap$(v, { "Headers": "headers", "Result": "result", }); }); export function v3GlobaldataAssetWebpropertyListPostResponseFromJSON( jsonString: string, ): SafeParseResult< V3GlobaldataAssetWebpropertyListPostResponse, SDKValidationError > { return safeParse( jsonString, (x) => V3GlobaldataAssetWebpropertyListPostResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'V3GlobaldataAssetWebpropertyListPostResponse' from JSON`, ); }