UNPKG

strapi-plugin-fuzzy-search-young

Version:

Register a weighted fuzzy search endpoint for Strapi Headless CMS you can add your content types to in no time.

34 lines (33 loc) 1.1 kB
import { InferType } from 'yup'; export declare const paginationSchema: import("yup").ObjectSchema<{ pageSize: string; page: string; withCount: string; }, import("yup").AnyObject, { pageSize: undefined; page: undefined; withCount: undefined; }, "">; export declare const querySchema: import("yup").ObjectSchema<{ query: string; locale: string; filters: { contentTypes?: string; }; }, import("yup").AnyObject, { query: undefined; locale: undefined; filters: { contentTypes: undefined; }; }, "">; export declare const populationSchema: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">; type QuerySchema = InferType<typeof querySchema>; export type PaginationBaseQuery = InferType<typeof paginationSchema>; export type PopulationSchema = InferType<typeof populationSchema>; export type SearchQuery = InferType<typeof querySchema> & { pagination: Record<string, PaginationBaseQuery>; populate?: Record<string, PopulationSchema>; filters?: QuerySchema['filters'] & Record<string, any>; }; export {};