I think you’re supposed to use QueryOp or CollectionOp now. Also see Add-on porting notes for Anki 2.1.45.
QueryOp
CollectionOp