/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type SearchQueryInputBody = { /** * Specify fields to only return in the response. If you provide fields and omit `host.services.port`, `host.services.transport_protocol`, and `host.services.protocol`, then `matched_services` will not be returned in the response. */ fields?: Array | null | undefined; /** * Number of results to return to per page. The default and maximum is 100. */ pageSize?: number | null | undefined; /** * page token for the requested page of search results */ pageToken?: string | undefined; /** * CenQL query string to search upon */ query: string; }; /** @internal */ export type SearchQueryInputBody$Outbound = { fields?: Array | null | undefined; page_size?: number | null | undefined; page_token?: string | undefined; query: string; }; /** @internal */ export const SearchQueryInputBody$outboundSchema: z.ZodType< SearchQueryInputBody$Outbound, z.ZodTypeDef, SearchQueryInputBody > = z.object({ fields: z.nullable(z.array(z.string())).optional(), pageSize: z.nullable(z.number().int()).optional(), pageToken: z.string().optional(), query: z.string(), }).transform((v) => { return remap$(v, { pageSize: "page_size", pageToken: "page_token", }); }); export function searchQueryInputBodyToJSON( searchQueryInputBody: SearchQueryInputBody, ): string { return JSON.stringify( SearchQueryInputBody$outboundSchema.parse(searchQueryInputBody), ); }