[api] Add support for JS filters