interface SearchParams { field : string ; value : string ; match ? : string ; operator ? : string ; } export const getSnapshotSearchWildcard = ( { field , value , match , operator , } ) : string => { value = operator === 'exact' ? value : `*${ value }*` ; const excludingWildcard = field === 'policyName' ? `*,_none,-${ value }` : `*,-${ value }` ; return match === 'must_not' ? excludingWildcard : value ; } ;