downloadCSV (query) {
    return new Promise((resolve, reject) => {
      fetch('api/users/csv', {
        method: 'POST',
        headers: setReqHeaders({ 'Content-Type': 'application/json' }),
        body: JSON.stringify(query)
      }).then((response) => {
        return response.blob();
      }).then((csvBlob) => {
        const url = window.URL.createObjectURL(csvBlob);
        const a = document.createElement('a');
        a.href = url;
        a.download = 'users.csv';
        document.body.appendChild(a);
        a.click();
        a.remove();
        return resolve({ success: true, text: 'Downloaded!' });
      }).catch((error) => {
        reject(error);
      });
    });
  }
Download users csv
@param {Object} query - The query to filter users to download
                        {desc:false,start:0,length:50,filter:"",sortField:"userId"}