/* * 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 V3ThreathuntingCenseyeJobsListGlobals = { organizationId?: string | undefined; }; export type V3ThreathuntingCenseyeJobsListRequest = { /** * 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; /** * Number of results per page (max 100) */ pageSize?: number | undefined; /** * Pagination token from previous response */ pageToken?: string | undefined; /** * Filter by host IP address. */ hostId?: string | undefined; /** * Filter by web property (hostname:port). */ webpropertyId?: string | undefined; /** * Filter by certificate SHA-256 fingerprint. */ certificateId?: string | undefined; }; export type V3ThreathuntingCenseyeJobsListResponse = { headers: { [k: string]: Array }; result: components.ResponseEnvelopeCenseyeJobsListResponse; }; /** @internal */ export type V3ThreathuntingCenseyeJobsListRequest$Outbound = { organization_id?: string | undefined; page_size: number; page_token?: string | undefined; host_id?: string | undefined; webproperty_id?: string | undefined; certificate_id?: string | undefined; }; /** @internal */ export const V3ThreathuntingCenseyeJobsListRequest$outboundSchema: z.ZodType< V3ThreathuntingCenseyeJobsListRequest$Outbound, z.ZodTypeDef, V3ThreathuntingCenseyeJobsListRequest > = z.object({ organizationId: z.string().optional(), pageSize: z.number().int().default(100), pageToken: z.string().optional(), hostId: z.string().optional(), webpropertyId: z.string().optional(), certificateId: z.string().optional(), }).transform((v) => { return remap$(v, { organizationId: "organization_id", pageSize: "page_size", pageToken: "page_token", hostId: "host_id", webpropertyId: "webproperty_id", certificateId: "certificate_id", }); }); export function v3ThreathuntingCenseyeJobsListRequestToJSON( v3ThreathuntingCenseyeJobsListRequest: V3ThreathuntingCenseyeJobsListRequest, ): string { return JSON.stringify( V3ThreathuntingCenseyeJobsListRequest$outboundSchema.parse( v3ThreathuntingCenseyeJobsListRequest, ), ); } /** @internal */ export const V3ThreathuntingCenseyeJobsListResponse$inboundSchema: z.ZodType< V3ThreathuntingCenseyeJobsListResponse, z.ZodTypeDef, unknown > = z.object({ Headers: z.record(z.array(z.string())).default({}), Result: components.ResponseEnvelopeCenseyeJobsListResponse$inboundSchema, }).transform((v) => { return remap$(v, { "Headers": "headers", "Result": "result", }); }); export function v3ThreathuntingCenseyeJobsListResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3ThreathuntingCenseyeJobsListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3ThreathuntingCenseyeJobsListResponse' from JSON`, ); }