/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 9da56f40a849 */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SearchRequestInputDetails = { /** * Whether the associated query was at least partially copy-pasted. If subsequent requests are issued after a copy-pasted query is constructed (e.g. with facet modifications), this bit should continue to be set for those requests. */ hasCopyPaste?: boolean | undefined; }; /** @internal */ export const SearchRequestInputDetails$inboundSchema: z.ZodType< SearchRequestInputDetails, z.ZodTypeDef, unknown > = z.object({ hasCopyPaste: z.boolean().optional(), }); /** @internal */ export type SearchRequestInputDetails$Outbound = { hasCopyPaste?: boolean | undefined; }; /** @internal */ export const SearchRequestInputDetails$outboundSchema: z.ZodType< SearchRequestInputDetails$Outbound, z.ZodTypeDef, SearchRequestInputDetails > = z.object({ hasCopyPaste: z.boolean().optional(), }); export function searchRequestInputDetailsToJSON( searchRequestInputDetails: SearchRequestInputDetails, ): string { return JSON.stringify( SearchRequestInputDetails$outboundSchema.parse(searchRequestInputDetails), ); } export function searchRequestInputDetailsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SearchRequestInputDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchRequestInputDetails' from JSON`, ); }