import { PermissionTree } from '@mesob/common';
import { D as Database } from '../index-D90p-4Uh.js';
import 'drizzle-orm/node-postgres';
import 'drizzle-orm';
import 'drizzle-orm/pg-core';
import 'pg';

type PermissionCatalogItem = {
    id: string;
    description: unknown;
    activity: string;
    application: string;
    feature: string;
};
type PermissionListQuery = {
    search?: string;
    filter?: '' | 'application' | 'feature' | 'activity';
    sort?: 'id' | 'application' | 'feature' | 'activity';
    order?: 'asc' | 'desc';
};
declare function getMergedPermissionCatalog({ database, permissions, }: {
    database: Database;
    permissions?: PermissionTree | null;
}): Promise<PermissionCatalogItem[]>;
declare function filterAndSortPermissions(permissions: PermissionCatalogItem[], query: PermissionListQuery): PermissionCatalogItem[];

export { type PermissionCatalogItem, filterAndSortPermissions, getMergedPermissionCatalog };
