@budibase/backend-core 2.12.1 → 2.12.2

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
@@ -873,9 +873,9 @@ var init_table2 = __esm({
873
873
  }
874
874
  });
875
875
 
876
- // ../types/src/documents/app/table/schema.ts
877
- var init_schema = __esm({
878
- "../types/src/documents/app/table/schema.ts"() {
876
+ // ../types/src/documents/app/row.ts
877
+ var init_row2 = __esm({
878
+ "../types/src/documents/app/row.ts"() {
879
879
  "use strict";
880
880
  }
881
881
  });
@@ -887,6 +887,15 @@ var init_constants2 = __esm({
887
887
  }
888
888
  });
889
889
 
890
+ // ../types/src/documents/app/table/schema.ts
891
+ var init_schema = __esm({
892
+ "../types/src/documents/app/table/schema.ts"() {
893
+ "use strict";
894
+ init_row2();
895
+ init_constants2();
896
+ }
897
+ });
898
+
890
899
  // ../types/src/documents/app/table/index.ts
891
900
  var init_table3 = __esm({
892
901
  "../types/src/documents/app/table/index.ts"() {
@@ -962,13 +971,6 @@ var init_document = __esm({
962
971
  }
963
972
  });
964
973
 
965
- // ../types/src/documents/app/row.ts
966
- var init_row2 = __esm({
967
- "../types/src/documents/app/row.ts"() {
968
- "use strict";
969
- }
970
- });
971
-
972
974
  // ../types/src/documents/app/user.ts
973
975
  var init_user4 = __esm({
974
976
  "../types/src/documents/app/user.ts"() {
@@ -1332,6 +1334,13 @@ var init_permission = __esm({
1332
1334
  }
1333
1335
  });
1334
1336
 
1337
+ // ../types/src/api/web/app/attachment.ts
1338
+ var init_attachment = __esm({
1339
+ "../types/src/api/web/app/attachment.ts"() {
1340
+ "use strict";
1341
+ }
1342
+ });
1343
+
1335
1344
  // ../types/src/api/web/app/index.ts
1336
1345
  var init_app4 = __esm({
1337
1346
  "../types/src/api/web/app/index.ts"() {
@@ -1343,6 +1352,7 @@ var init_app4 = __esm({
1343
1352
  init_rows2();
1344
1353
  init_table4();
1345
1354
  init_permission();
1355
+ init_attachment();
1346
1356
  }
1347
1357
  });
1348
1358
 
@@ -2359,6 +2369,9 @@ var init_DatabaseImpl = __esm({
2359
2369
  });
2360
2370
 
2361
2371
  // src/db/constants.ts
2372
+ function isInternalColumnName(name) {
2373
+ return CONSTANT_INTERNAL_ROW_COLS.includes(name);
2374
+ }
2362
2375
  var CONSTANT_INTERNAL_ROW_COLS, CONSTANT_EXTERNAL_ROW_COLS;
2363
2376
  var init_constants4 = __esm({
2364
2377
  "src/db/constants.ts"() {
@@ -4696,6 +4709,7 @@ __export(db_exports, {
4696
4709
  isDevAppID: () => isDevAppID,
4697
4710
  isDocumentConflictError: () => isDocumentConflictError,
4698
4711
  isGlobalUserID: () => isGlobalUserID,
4712
+ isInternalColumnName: () => isInternalColumnName,
4699
4713
  isProdAppID: () => isProdAppID,
4700
4714
  isSameAppID: () => isSameAppID,
4701
4715
  isTableId: () => isTableId,
@@ -6898,7 +6912,7 @@ var searchGlobalUsersByAppAccess = async (appId, opts) => {
6898
6912
  limit: opts?.limit || 50
6899
6913
  };
6900
6914
  const resp = await directCouchFind(getGlobalDBName(), searchOptions);
6901
- return resp?.rows;
6915
+ return resp.rows;
6902
6916
  };
6903
6917
  var getGlobalUserByAppPage = (appId, user) => {
6904
6918
  if (!user) {
@@ -6934,7 +6948,8 @@ var paginatedUsers = async ({
6934
6948
  limit
6935
6949
  } = {}) => {
6936
6950
  const db = getGlobalDB();
6937
- const pageLimit = limit ? limit + 1 : PAGE_LIMIT + 1;
6951
+ const pageSize = limit ?? PAGE_LIMIT;
6952
+ const pageLimit = pageSize + 1;
6938
6953
  const opts = {
6939
6954
  include_docs: true,
6940
6955
  limit: pageLimit
@@ -6955,7 +6970,7 @@ var paginatedUsers = async ({
6955
6970
  const response = await db.allDocs(getGlobalUserParams(null, opts));
6956
6971
  userList = response.rows.map((row) => row.doc);
6957
6972
  }
6958
- return pagination(userList, pageLimit, {
6973
+ return pagination(userList, pageSize, {
6959
6974
  paginate: true,
6960
6975
  property,
6961
6976
  getKey
@@ -9916,13 +9931,9 @@ var UserDB = class _UserDB {
9916
9931
  };
9917
9932
  }
9918
9933
  static async getUsersByAppAccess(opts) {
9919
- const params2 = {
9920
- include_docs: true,
9921
- limit: opts.limit || 50
9922
- };
9923
9934
  let response = await searchGlobalUsersByAppAccess(
9924
9935
  opts.appId,
9925
- params2
9936
+ { limit: opts.limit || 50 }
9926
9937
  );
9927
9938
  return response;
9928
9939
  }