node-zendesk
node-zendesk copied to clipboard
list users by multiple roles
Not sure this is supported, I'm trying to do this:
zdApi.users.listWithFilter("role", ["admin", "agent"])
and getting empty response.
this however works:
zdApi.users.listWithFilter("role", "admin")
happy to submit a PR with a bit of guidance, I started developing my own zd client module and then saw this library :)
btw, that method isn't on the docs nor on the types library, happy to add it there as well!
After poking around the code a bit, I tried to hack it like this:
zdApi.requestAll(
"GET",
"users/list?role[]?=admin&role[]=agent",
)
but it isn't exposed on the client
A nice API could be:
zdApi.users.list({options}, cb)
// i.e.
zdApi.users.list({role: ["agent", "admin"]}, cb)