For the activity feed API we need to be able to split a mongo filter in two. One filter needs to be applied to a JSON object, while the other needs to be applied to SQL. But both filters need to have the same result if they are 'anded' together. This is accomplished by the new splitFilter utility method.
Added getUsedKeys util method that returns all the used keys in a filter.
Added support for the yg grouped filters in all utility methods (the yg group filter is returned for filter strings that are enclosed between parenthesis at the root, like (test:something))
Added chainTransformers, which returns a new transformer by combining multiple transformers
Added mapKeys which returns transformers that replace keys in a filter with an easy to read syntax.
Added replaceFilters method which replaces filters that use a given key.
refs https://github.com/TryGhost/Team/issues/2129
getUsedKeys
util method that returns all the used keys in a filter.yg
grouped filters in all utility methods (the yg group filter is returned for filter strings that are enclosed between parenthesis at the root, like(test:something)
)chainTransformers
, which returns a new transformer by combining multiple transformersmapKeys
which returns transformers that replace keys in a filter with an easy to read syntax.replaceFilters
method which replaces filters that use a given key.