import type Database from "@metabase/embedding-sdk-react/dist/frontend/src/metabase-lib/v1/metadata/Database";
import type { GroupsPermissions, GroupPermissions, DatabasePermissions } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase-types/api";
import type { DatabaseEntityId, EntityId, EntityWithGroupId, SchemaEntityId, TableEntityId } from "../../types";
import { DataPermission, DataPermissionValue } from "../../types";
export declare const isRestrictivePermission: (value: DataPermissionValue) => boolean;
export declare function updatePermission(permissions: GroupsPermissions, groupId: number, databaseId: number, permission: DataPermission, path: Array<number | string>, value: string | undefined, entityIds?: any[]): GroupsPermissions;
export declare const getSchemasPermission: (permissions: GroupsPermissions, groupId: number, { databaseId }: DatabaseEntityId, permission: DataPermission) => DataPermissionValue;
export declare const getTablesPermission: (permissions: GroupsPermissions, groupId: number, { databaseId, schemaName }: SchemaEntityId, permission: DataPermission) => DataPermissionValue;
export declare const getFieldsPermission: (permissions: GroupsPermissions, groupId: number, { databaseId, schemaName, tableId }: TableEntityId, permission: DataPermission) => DataPermissionValue;
export declare function hasPermissionValueInGraph(permissions: GroupsPermissions | GroupPermissions | DatabasePermissions | DataPermissionValue, permissionValue: DataPermissionValue): boolean;
export declare function hasPermissionValueInEntityGraphs(permissions: GroupsPermissions, entityIds: EntityWithGroupId[], permission: DataPermission, permissionValue: DataPermissionValue): boolean;
export declare function restrictNativeQueryPermissionsIfNeeded(permissions: GroupsPermissions, groupId: number, entityId: EntityId, permission: DataPermission, value: DataPermissionValue, database: Database): GroupsPermissions;
export declare function downgradeNativePermissionsIfNeeded(permissions: GroupsPermissions, groupId: number, { databaseId }: DatabaseEntityId, value: DataPermissionValue): GroupsPermissions;
export declare function inferAndUpdateEntityPermissions(permissions: GroupsPermissions, groupId: number, entityId: EntityId, database: Database, permission: DataPermission, downgradeNative?: boolean): GroupsPermissions;
export declare function updateFieldsPermission(permissions: GroupsPermissions, groupId: number, entityId: TableEntityId, value: any, database: Database, permission: DataPermission, downgradeNative?: boolean): GroupsPermissions;
export declare function updateTablesPermission(permissions: GroupsPermissions, groupId: number, { databaseId, schemaName }: SchemaEntityId, value: any, database: Database, permission: DataPermission, downgradeNative?: boolean): GroupsPermissions;
export declare function updateSchemasPermission(permissions: GroupsPermissions, groupId: number, { databaseId }: DatabaseEntityId, value: DataPermissionValue, database: Database, permission: DataPermission, downgradeNative?: boolean): GroupsPermissions;
