UNPKG

@flesh-and-blood/search

Version:

TypeScript search engine for Flesh and Blood cards

36 lines (35 loc) 1.13 kB
import { Hero } from "@flesh-and-blood/types"; export declare enum FilterProperty { BannedFormats = "bannedFormats", LegalFormats = "legalFormats", LegalHeroes = "legalHeroes" } interface AppliedFilter { filterToPropertyMapping: FilterToPropertyMapping; values: string[]; isAnd?: boolean; isExcluded?: boolean; isOptional?: boolean; isOr?: boolean; isAdditional?: boolean; modifier?: Modifier; cardTypes?: string[]; } interface FilterToPropertyMapping { nestedProperty?: string; property: string; exclusion?: Exclusion; isArray?: boolean; isNumber?: boolean; isString?: boolean; isBoolean?: boolean; isMeta?: boolean; modifier?: Modifier; partialMatch?: boolean; specialProperty?: string; } type Exclusion = "!" | "-"; type Modifier = ">=" | ">" | "<=" | "<"; export declare const getMetaFilters: (isExcluded: boolean, isOptional: boolean, filterKey: string, values: string[], modifier: string, additionalHeroes: Hero[]) => AppliedFilter[]; export declare const getExcludedMetaFilters: (filterKey: string) => AppliedFilter[]; export {};