/* * 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 V3ThreathuntingCenseyeJobResultsGlobals = { organizationId?: string | undefined; }; export type V3ThreathuntingCenseyeJobResultsRequest = { /** * 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; /** * The unique identifier of the CensEye job. */ jobId: string; /** * Number of results per page (max 100) */ pageSize?: number | undefined; /** * Pagination token from previous response */ pageToken?: string | undefined; }; export type V3ThreathuntingCenseyeJobResultsResponse = { headers: { [k: string]: Array }; result: components.ResponseEnvelopeCenseyeResultsResponse; }; /** @internal */ export type V3ThreathuntingCenseyeJobResultsRequest$Outbound = { organization_id?: string | undefined; job_id: string; page_size: number; page_token?: string | undefined; }; /** @internal */ export const V3ThreathuntingCenseyeJobResultsRequest$outboundSchema: z.ZodType< V3ThreathuntingCenseyeJobResultsRequest$Outbound, z.ZodTypeDef, V3ThreathuntingCenseyeJobResultsRequest > = z.object({ organizationId: z.string().optional(), jobId: z.string(), pageSize: z.number().int().default(100), pageToken: z.string().optional(), }).transform((v) => { return remap$(v, { organizationId: "organization_id", jobId: "job_id", pageSize: "page_size", pageToken: "page_token", }); }); export function v3ThreathuntingCenseyeJobResultsRequestToJSON( v3ThreathuntingCenseyeJobResultsRequest: V3ThreathuntingCenseyeJobResultsRequest, ): string { return JSON.stringify( V3ThreathuntingCenseyeJobResultsRequest$outboundSchema.parse( v3ThreathuntingCenseyeJobResultsRequest, ), ); } /** @internal */ export const V3ThreathuntingCenseyeJobResultsResponse$inboundSchema: z.ZodType< V3ThreathuntingCenseyeJobResultsResponse, z.ZodTypeDef, unknown > = z.object({ Headers: z.record(z.array(z.string())).default({}), Result: components.ResponseEnvelopeCenseyeResultsResponse$inboundSchema, }).transform((v) => { return remap$(v, { "Headers": "headers", "Result": "result", }); }); export function v3ThreathuntingCenseyeJobResultsResponseFromJSON( jsonString: string, ): SafeParseResult< V3ThreathuntingCenseyeJobResultsResponse, SDKValidationError > { return safeParse( jsonString, (x) => V3ThreathuntingCenseyeJobResultsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'V3ThreathuntingCenseyeJobResultsResponse' from JSON`, ); }