/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ae723f22344d */ import * as z from "zod/v3"; import { FacetFilterSet, FacetFilterSet$Outbound, FacetFilterSet$outboundSchema, } from "./facetfilterset.js"; export type GetDocumentsByFacetsRequest = { /** * Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. */ datasourcesFilter?: Array | undefined; /** * A list of facet filter sets that will be OR'ed together. An AND is assumed between different filters in each set. */ filterSets: Array; /** * Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. */ cursor?: string | undefined; }; /** @internal */ export type GetDocumentsByFacetsRequest$Outbound = { datasourcesFilter?: Array | undefined; filterSets: Array; cursor?: string | undefined; }; /** @internal */ export const GetDocumentsByFacetsRequest$outboundSchema: z.ZodType< GetDocumentsByFacetsRequest$Outbound, z.ZodTypeDef, GetDocumentsByFacetsRequest > = z.object({ datasourcesFilter: z.array(z.string()).optional(), filterSets: z.array(FacetFilterSet$outboundSchema), cursor: z.string().optional(), }); export function getDocumentsByFacetsRequestToJSON( getDocumentsByFacetsRequest: GetDocumentsByFacetsRequest, ): string { return JSON.stringify( GetDocumentsByFacetsRequest$outboundSchema.parse( getDocumentsByFacetsRequest, ), ); }