@budibase/backend-core 2.11.39 → 2.11.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6682,6 +6682,24 @@ var allowDisplayColumnByType = {
6682
6682
  ["json" /* JSON */]: false,
6683
6683
  ["bb_reference" /* BB_REFERENCE */]: false
6684
6684
  };
6685
+ var allowSortColumnByType = {
6686
+ ["string" /* STRING */]: true,
6687
+ ["longform" /* LONGFORM */]: true,
6688
+ ["options" /* OPTIONS */]: true,
6689
+ ["number" /* NUMBER */]: true,
6690
+ ["datetime" /* DATETIME */]: true,
6691
+ ["auto" /* AUTO */]: true,
6692
+ ["internal" /* INTERNAL */]: true,
6693
+ ["barcodeqr" /* BARCODEQR */]: true,
6694
+ ["bigint" /* BIGINT */]: true,
6695
+ ["boolean" /* BOOLEAN */]: true,
6696
+ ["json" /* JSON */]: true,
6697
+ ["formula" /* FORMULA */]: false,
6698
+ ["attachment" /* ATTACHMENT */]: false,
6699
+ ["array" /* ARRAY */]: false,
6700
+ ["link" /* LINK */]: false,
6701
+ ["bb_reference" /* BB_REFERENCE */]: false
6702
+ };
6685
6703
 
6686
6704
  // src/users/utils.ts
6687
6705
  var isBuilder2 = sdk_exports.users.isBuilder;
@@ -6884,12 +6902,14 @@ var PAGE_LIMIT = 8;
6884
6902
  var paginatedUsers = async ({
6885
6903
  bookmark,
6886
6904
  query,
6887
- appId
6905
+ appId,
6906
+ limit
6888
6907
  } = {}) => {
6889
6908
  const db = getGlobalDB();
6909
+ const pageLimit = limit ? limit + 1 : PAGE_LIMIT + 1;
6890
6910
  const opts = {
6891
6911
  include_docs: true,
6892
- limit: PAGE_LIMIT + 1
6912
+ limit: pageLimit
6893
6913
  };
6894
6914
  if (bookmark) {
6895
6915
  opts.startkey = bookmark;
@@ -6907,7 +6927,7 @@ var paginatedUsers = async ({
6907
6927
  const response = await db.allDocs(getGlobalUserParams(null, opts));
6908
6928
  userList = response.rows.map((row) => row.doc);
6909
6929
  }
6910
- return pagination(userList, PAGE_LIMIT, {
6930
+ return pagination(userList, pageLimit, {
6911
6931
  paginate: true,
6912
6932
  property,
6913
6933
  getKey
@@ -9867,14 +9887,14 @@ var UserDB = class _UserDB {
9867
9887
  userCount: response.length
9868
9888
  };
9869
9889
  }
9870
- static async getUsersByAppAccess(appId) {
9871
- const opts = {
9890
+ static async getUsersByAppAccess(opts) {
9891
+ const params2 = {
9872
9892
  include_docs: true,
9873
- limit: 50
9893
+ limit: opts.limit || 50
9874
9894
  };
9875
9895
  let response = await searchGlobalUsersByAppAccess(
9876
- appId,
9877
- opts
9896
+ opts.appId,
9897
+ params2
9878
9898
  );
9879
9899
  return response;
9880
9900
  }