import { EditableNumberRangeFilter , FacetFilter } from '../facet/filter' ; import { BooleanFilter } from '../facet/filter/boolean-filter.model' ; import { Filter } from '../facet/filter/filter.model' ; import { HierarchicalFilter } from '../facet/filter/hierarchical-filter.model' ; import { NumberRangeFilter } from '../facet/filter/number-range-filter.model' ; import { RawFilter } from '../facet/filter/raw-filter.model' ; import { SimpleFilter } from '../facet/filter/simple-filter.model' ; import { IdentifiableSchema } from './identifiable.schema' ; public export const FilterSchema = { ... IdentifiableSchema , modelName : expect . any ( String ) , selected : expect . any ( Boolean ) } ; /**
 * Jest schema for validating  FacetFilter entities.
 *
 *  public export const FacetFilterSchema = { ... FilterSchema , facetId : expect . anyOf ( [ Number , String ] ) , modelName : expect . any ( String ) } ; public export const RawFilterSchema = { ... FilterSchema , modelName : 'RawFilter' , id : expect . any ( String ) , selected : true } ; public export const BooleanFilterSchema = { ... FacetFilterSchema , modelName : expect . any ( String ) , label : expect . any ( String ) , totalResults : expect . undefinedOr ( Number ) } ; public export const SimpleFilterSchema = { ... BooleanFilterSchema , modelName : 'SimpleFilter' } ; public export const HierarchicalFilterSchema = { ... BooleanFilterSchema , parentId : expect . nullOrAnyOf ( [ Number , String ] ) , children : expect . undefinedOr ( Array ) , modelName : 'HierarchicalFilter' } ; public export const NumberRangeFilterSchema = { ... BooleanFilterSchema , range : { min : expect . nullOr ( Number ) , max : expect . nullOr ( Number ) } , modelName : 'NumberRangeFilter' } ; public export const EditableNumberRangeFilterSchema = { ... FacetFilterSchema , range : { min : expect . nullOr ( Number ) , max : expect . nullOr ( Number ) } , modelName : 'EditableNumberRangeFilter' } ;