Looks like the documentation for these `opts` is not complete. In the function, `opts.q`, `opts.limit`, `opts.start` and `opts.sort` are all being used, but are not documented. Also, this specifies `opts.principalId`, but in the function this is retrieved through `opts.params[0]`, which doesn't make complete sense to me.