/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CobaltStrikeHttpConfig, CobaltStrikeHttpConfig$inboundSchema, } from "./cobaltstrikehttpconfig.js"; import { CobaltStrikePostEx, CobaltStrikePostEx$inboundSchema, } from "./cobaltstrikepostex.js"; export type CobaltStrikeConfig = { cookieBeacon?: number | undefined; cryptoScheme?: number | undefined; dns?: boolean | undefined; hostHeader?: string | undefined; httpGet?: CobaltStrikeHttpConfig | undefined; httpPost?: CobaltStrikeHttpConfig | undefined; jitter?: number | undefined; killdate?: number | undefined; postEx?: CobaltStrikePostEx | undefined; publicKey?: string | undefined; sleepTime?: number | undefined; ssl?: boolean | undefined; unknownBytes?: { [k: string]: string | null } | undefined; unknownInt?: { [k: string]: number } | undefined; userAgent?: string | undefined; watermark?: number | undefined; }; /** @internal */ export const CobaltStrikeConfig$inboundSchema: z.ZodType< CobaltStrikeConfig, z.ZodTypeDef, unknown > = z.object({ cookie_beacon: z.number().int().optional(), crypto_scheme: z.number().int().optional(), dns: z.boolean().optional(), host_header: z.string().optional(), http_get: CobaltStrikeHttpConfig$inboundSchema.optional(), http_post: CobaltStrikeHttpConfig$inboundSchema.optional(), jitter: z.number().int().optional(), killdate: z.number().int().optional(), post_ex: CobaltStrikePostEx$inboundSchema.optional(), public_key: z.string().optional(), sleep_time: z.number().int().optional(), ssl: z.boolean().optional(), unknown_bytes: z.record(z.nullable(z.string())).optional(), unknown_int: z.record(z.number().int()).optional(), user_agent: z.string().optional(), watermark: z.number().int().optional(), }).transform((v) => { return remap$(v, { "cookie_beacon": "cookieBeacon", "crypto_scheme": "cryptoScheme", "host_header": "hostHeader", "http_get": "httpGet", "http_post": "httpPost", "post_ex": "postEx", "public_key": "publicKey", "sleep_time": "sleepTime", "unknown_bytes": "unknownBytes", "unknown_int": "unknownInt", "user_agent": "userAgent", }); }); export function cobaltStrikeConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CobaltStrikeConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CobaltStrikeConfig' from JSON`, ); }