/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 0a41bb4e61ad */ import * as z from "zod/v3"; import { FacetFilter, FacetFilter$Outbound, FacetFilter$outboundSchema, } from "./facetfilter.js"; export type PinRequest = { /** * The query strings for which the pinned result will show. */ queries?: Array | undefined; /** * Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. */ audienceFilters?: Array | undefined; /** * The document to be pinned. */ documentId?: string | undefined; }; /** @internal */ export type PinRequest$Outbound = { queries?: Array | undefined; audienceFilters?: Array | undefined; documentId?: string | undefined; }; /** @internal */ export const PinRequest$outboundSchema: z.ZodType< PinRequest$Outbound, z.ZodTypeDef, PinRequest > = z.object({ queries: z.array(z.string()).optional(), audienceFilters: z.array(FacetFilter$outboundSchema).optional(), documentId: z.string().optional(), }); export function pinRequestToJSON(pinRequest: PinRequest): string { return JSON.stringify(PinRequest$outboundSchema.parse(pinRequest)); }