/* * 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 V3ThreathuntingCenseyeJobsCreateGlobals = { organizationId?: string | undefined; }; export type V3ThreathuntingCenseyeJobsCreateRequest = { /** * 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; createCenseyeJobInputBody: components.CreateCenseyeJobInputBody; }; export type V3ThreathuntingCenseyeJobsCreateResponse = { headers: { [k: string]: Array }; result: components.ResponseEnvelopeCenseyeJob; }; /** @internal */ export type V3ThreathuntingCenseyeJobsCreateRequest$Outbound = { organization_id?: string | undefined; CreateCenseyeJobInputBody: components.CreateCenseyeJobInputBody$Outbound; }; /** @internal */ export const V3ThreathuntingCenseyeJobsCreateRequest$outboundSchema: z.ZodType< V3ThreathuntingCenseyeJobsCreateRequest$Outbound, z.ZodTypeDef, V3ThreathuntingCenseyeJobsCreateRequest > = z.object({ organizationId: z.string().optional(), createCenseyeJobInputBody: components.CreateCenseyeJobInputBody$outboundSchema, }).transform((v) => { return remap$(v, { organizationId: "organization_id", createCenseyeJobInputBody: "CreateCenseyeJobInputBody", }); }); export function v3ThreathuntingCenseyeJobsCreateRequestToJSON( v3ThreathuntingCenseyeJobsCreateRequest: V3ThreathuntingCenseyeJobsCreateRequest, ): string { return JSON.stringify( V3ThreathuntingCenseyeJobsCreateRequest$outboundSchema.parse( v3ThreathuntingCenseyeJobsCreateRequest, ), ); } /** @internal */ export const V3ThreathuntingCenseyeJobsCreateResponse$inboundSchema: z.ZodType< V3ThreathuntingCenseyeJobsCreateResponse, z.ZodTypeDef, unknown > = z.object({ Headers: z.record(z.array(z.string())).default({}), Result: components.ResponseEnvelopeCenseyeJob$inboundSchema, }).transform((v) => { return remap$(v, { "Headers": "headers", "Result": "result", }); }); export function v3ThreathuntingCenseyeJobsCreateResponseFromJSON( jsonString: string, ): SafeParseResult< V3ThreathuntingCenseyeJobsCreateResponse, SDKValidationError > { return safeParse( jsonString, (x) => V3ThreathuntingCenseyeJobsCreateResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'V3ThreathuntingCenseyeJobsCreateResponse' from JSON`, ); }