add orderby parameter to getDeletedDocuments