/* * 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 V3GlobaldataScansRescanGlobals = { organizationId?: string | undefined; }; export type V3GlobaldataScansRescanRequest = { /** * The ID of a Censys organization to associate the request with. 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; scansRescanInputBody: components.ScansRescanInputBody; }; export type V3GlobaldataScansRescanResponse = { headers: { [k: string]: Array }; result: components.ResponseEnvelopeTrackedScan; }; /** @internal */ export type V3GlobaldataScansRescanRequest$Outbound = { organization_id?: string | undefined; ScansRescanInputBody: components.ScansRescanInputBody$Outbound; }; /** @internal */ export const V3GlobaldataScansRescanRequest$outboundSchema: z.ZodType< V3GlobaldataScansRescanRequest$Outbound, z.ZodTypeDef, V3GlobaldataScansRescanRequest > = z.object({ organizationId: z.string().optional(), scansRescanInputBody: components.ScansRescanInputBody$outboundSchema, }).transform((v) => { return remap$(v, { organizationId: "organization_id", scansRescanInputBody: "ScansRescanInputBody", }); }); export function v3GlobaldataScansRescanRequestToJSON( v3GlobaldataScansRescanRequest: V3GlobaldataScansRescanRequest, ): string { return JSON.stringify( V3GlobaldataScansRescanRequest$outboundSchema.parse( v3GlobaldataScansRescanRequest, ), ); } /** @internal */ export const V3GlobaldataScansRescanResponse$inboundSchema: z.ZodType< V3GlobaldataScansRescanResponse, z.ZodTypeDef, unknown > = z.object({ Headers: z.record(z.array(z.string())).default({}), Result: components.ResponseEnvelopeTrackedScan$inboundSchema, }).transform((v) => { return remap$(v, { "Headers": "headers", "Result": "result", }); }); export function v3GlobaldataScansRescanResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3GlobaldataScansRescanResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3GlobaldataScansRescanResponse' from JSON`, ); }