import { RbacAdapter } from "./index.js";
import { Querier } from "@platform-modules/db";
//#region src/rbac-triad.d.ts
declare const rolesTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "tenancy_roles";
  schema: undefined;
  columns: {
    id: import("drizzle-orm/pg-core").PgColumn<{
      name: "id";
      tableName: "tenancy_roles";
      dataType: "string";
      columnType: "PgUUID";
      data: string;
      driverParam: string;
      notNull: true;
      hasDefault: true;
      isPrimaryKey: true;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    tenantId: import("drizzle-orm/pg-core").PgColumn<{
      name: "tenant_id";
      tableName: "tenancy_roles";
      dataType: "string";
      columnType: "PgUUID";
      data: string;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    name: import("drizzle-orm/pg-core").PgColumn<{
      name: "name";
      tableName: "tenancy_roles";
      dataType: "string";
      columnType: "PgText";
      data: string;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: [string, ...string[]];
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    isSystemRole: import("drizzle-orm/pg-core").PgColumn<{
      name: "is_system_role";
      tableName: "tenancy_roles";
      dataType: "boolean";
      columnType: "PgBoolean";
      data: boolean;
      driverParam: boolean;
      notNull: true;
      hasDefault: true;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const permissionsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "tenancy_permissions";
  schema: undefined;
  columns: {
    id: import("drizzle-orm/pg-core").PgColumn<{
      name: "id";
      tableName: "tenancy_permissions";
      dataType: "string";
      columnType: "PgUUID";
      data: string;
      driverParam: string;
      notNull: true;
      hasDefault: true;
      isPrimaryKey: true;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    key: import("drizzle-orm/pg-core").PgColumn<{
      name: "key";
      tableName: "tenancy_permissions";
      dataType: "string";
      columnType: "PgText";
      data: string;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: [string, ...string[]];
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const rolePermissionsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
  name: "tenancy_role_permissions";
  schema: undefined;
  columns: {
    roleId: import("drizzle-orm/pg-core").PgColumn<{
      name: "role_id";
      tableName: "tenancy_role_permissions";
      dataType: "string";
      columnType: "PgUUID";
      data: string;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
    permissionId: import("drizzle-orm/pg-core").PgColumn<{
      name: "permission_id";
      tableName: "tenancy_role_permissions";
      dataType: "string";
      columnType: "PgUUID";
      data: string;
      driverParam: string;
      notNull: true;
      hasDefault: false;
      isPrimaryKey: false;
      isAutoincrement: false;
      hasRuntimeDefault: false;
      enumValues: undefined;
      baseColumn: never;
      identity: undefined;
      generated: undefined;
    }, {}, {}>;
  };
  dialect: "pg";
}>;
declare const triadSchema: {
  roles: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "tenancy_roles";
    schema: undefined;
    columns: {
      id: import("drizzle-orm/pg-core").PgColumn<{
        name: "id";
        tableName: "tenancy_roles";
        dataType: "string";
        columnType: "PgUUID";
        data: string;
        driverParam: string;
        notNull: true;
        hasDefault: true;
        isPrimaryKey: true;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      tenantId: import("drizzle-orm/pg-core").PgColumn<{
        name: "tenant_id";
        tableName: "tenancy_roles";
        dataType: "string";
        columnType: "PgUUID";
        data: string;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      name: import("drizzle-orm/pg-core").PgColumn<{
        name: "name";
        tableName: "tenancy_roles";
        dataType: "string";
        columnType: "PgText";
        data: string;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: [string, ...string[]];
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      isSystemRole: import("drizzle-orm/pg-core").PgColumn<{
        name: "is_system_role";
        tableName: "tenancy_roles";
        dataType: "boolean";
        columnType: "PgBoolean";
        data: boolean;
        driverParam: boolean;
        notNull: true;
        hasDefault: true;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
  permissions: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "tenancy_permissions";
    schema: undefined;
    columns: {
      id: import("drizzle-orm/pg-core").PgColumn<{
        name: "id";
        tableName: "tenancy_permissions";
        dataType: "string";
        columnType: "PgUUID";
        data: string;
        driverParam: string;
        notNull: true;
        hasDefault: true;
        isPrimaryKey: true;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      key: import("drizzle-orm/pg-core").PgColumn<{
        name: "key";
        tableName: "tenancy_permissions";
        dataType: "string";
        columnType: "PgText";
        data: string;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: [string, ...string[]];
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
  rolePermissions: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "tenancy_role_permissions";
    schema: undefined;
    columns: {
      roleId: import("drizzle-orm/pg-core").PgColumn<{
        name: "role_id";
        tableName: "tenancy_role_permissions";
        dataType: "string";
        columnType: "PgUUID";
        data: string;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
      permissionId: import("drizzle-orm/pg-core").PgColumn<{
        name: "permission_id";
        tableName: "tenancy_role_permissions";
        dataType: "string";
        columnType: "PgUUID";
        data: string;
        driverParam: string;
        notNull: true;
        hasDefault: false;
        isPrimaryKey: false;
        isAutoincrement: false;
        hasRuntimeDefault: false;
        enumValues: undefined;
        baseColumn: never;
        identity: undefined;
        generated: undefined;
      }, {}, {}>;
    };
    dialect: "pg";
  }>;
};
type TriadSchema = typeof triadSchema;
/** Production-sourced system role set (spec excludes ACCOUNTANT). */
declare const SYSTEM_ROLE_NAMES: readonly ["OWNER", "ADMIN", "MEMBER", "VIEWER", "CONTRACTOR"];
type SystemRoleName = (typeof SYSTEM_ROLE_NAMES)[number];
declare const SYSTEM_ROLE_PERMISSIONS: Record<SystemRoleName, readonly string[]>;
type TriadRbac = RbacAdapter & {
  seedSystemRoles(tenantId: string): Promise<void>;
  seedPermissionCatalog(): Promise<void>;
};
declare function createTriadRbac<S extends TriadSchema>(db: Querier<S>): TriadRbac;
//#endregion
export { SYSTEM_ROLE_NAMES, SYSTEM_ROLE_PERMISSIONS, SystemRoleName, TriadRbac, TriadSchema, createTriadRbac, permissionsTable, rolePermissionsTable, rolesTable, triadSchema };