@budibase/backend-core 2.9.38 → 2.9.39-alpha.0

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.
@@ -6,7 +6,8 @@ export * as roles from "./security/roles";
6
6
  export * as permissions from "./security/permissions";
7
7
  export * as accounts from "./accounts";
8
8
  export * as installation from "./installation";
9
- export * as featureFlags from "./featureFlags";
9
+ export * as featureFlags from "./features";
10
+ export * as features from "./features/installation";
10
11
  export * as sessions from "./security/sessions";
11
12
  export * as platform from "./platform";
12
13
  export * as auth from "./auth";
@@ -68,18 +68,7 @@ export declare function checkForRoleResourceArray(rolePerms: {
68
68
  * Given an app ID this will retrieve all of the roles that are currently within that app.
69
69
  * @return {Promise<object[]>} An array of the role objects that were found.
70
70
  */
71
- export declare function getAllRoles(appId?: string): Promise<any>;
72
- /**
73
- * This retrieves the required role for a resource
74
- * @param permLevel The level of request
75
- * @param resourceId The resource being requested
76
- * @param subResourceId The sub resource being requested
77
- * @return {Promise<{permissions}|Object>} returns the permissions required to access.
78
- */
79
- export declare function getRequiredResourceRole(permLevel: string, { resourceId, subResourceId }: {
80
- resourceId?: string;
81
- subResourceId?: string;
82
- }): Promise<any[]>;
71
+ export declare function getAllRoles(appId?: string): Promise<RoleDoc[]>;
83
72
  export declare class AccessController {
84
73
  userHierarchies: {
85
74
  [key: string]: string[];
@@ -1,13 +1,17 @@
1
- import { BulkUserCreated, BulkUserDeleted, SaveUserOpts, User, Account } from "@budibase/types";
1
+ import { Account, BulkUserCreated, BulkUserDeleted, SaveUserOpts, User, UserGroup } from "@budibase/types";
2
2
  declare type QuotaUpdateFn = (change: number, cb?: () => Promise<any>) => Promise<any>;
3
3
  declare type GroupUpdateFn = (groupId: string, userIds: string[]) => Promise<any>;
4
4
  declare type FeatureFn = () => Promise<Boolean>;
5
+ declare type GroupGetFn = (ids: string[]) => Promise<UserGroup[]>;
6
+ declare type GroupBuildersFn = (user: User) => Promise<string[]>;
5
7
  declare type QuotaFns = {
6
8
  addUsers: QuotaUpdateFn;
7
9
  removeUsers: QuotaUpdateFn;
8
10
  };
9
11
  declare type GroupFns = {
10
12
  addUsers: GroupUpdateFn;
13
+ getBulk: GroupGetFn;
14
+ getGroupBuilderAppIds: GroupBuildersFn;
11
15
  };
12
16
  declare type FeatureFns = {
13
17
  isSSOEnforced: FeatureFn;
@@ -30,9 +34,13 @@ export declare class UserDB {
30
34
  * Gets a user by ID from the global database, based on the current tenancy.
31
35
  */
32
36
  static getUser(userId: string): Promise<User>;
37
+ static bulkGet(userIds: string[]): Promise<User[]>;
38
+ static bulkUpdate(users: User[]): Promise<import("@budibase/types").BulkDocsResponse>;
33
39
  static save(user: User, opts?: SaveUserOpts): Promise<User>;
34
40
  static bulkCreate(newUsersRequested: User[], groups: string[]): Promise<BulkUserCreated>;
35
41
  static bulkDelete(userIds: string[]): Promise<BulkUserDeleted>;
36
42
  static destroy(id: string): Promise<void>;
43
+ static getGroups(groupIds: string[]): Promise<UserGroup[]>;
44
+ static getGroupBuilderAppIds(user: User): Promise<string[]>;
37
45
  }
38
46
  export {};
@@ -17,7 +17,9 @@ export declare const useEnforceableSSO: () => License;
17
17
  export declare const useGroups: () => License;
18
18
  export declare const useEnvironmentVariables: () => License;
19
19
  export declare const useAuditLogs: () => License;
20
+ export declare const usePublicApiUserRoles: () => License;
20
21
  export declare const useScimIntegration: () => License;
21
22
  export declare const useSyncAutomations: () => License;
22
23
  export declare const useAppBuilders: () => License;
24
+ export declare const useViewPermissions: () => License;
23
25
  export declare const setAutomationLogsQuota: (value: number) => License;