import { SmrtCollection } from '@happyvertical/smrt-core'; import { Role } from '../models/Role.js'; import { RolePermissionPatternMatrix, SeedRolePermissionsOptions } from './RolePermissionCollection.js'; export interface SeedSystemRolesOptions extends Omit { permissionMatrix?: RolePermissionPatternMatrix; seedPermissions?: boolean; /** * System role slugs to flag `inheritsToDescendants: true` (opt-in * hierarchical membership inheritance, e.g. `['owner', 'admin']` for * organizational hierarchies). Additive and idempotent: listed slugs are * flagged on create and on already-seeded roles, but omitting a slug never * unsets a previously flagged role — unflag explicitly via a role update. * Unknown slugs throw (a typo here would silently withhold intended * authority). Default: no role inherits. */ inheritsToDescendants?: string[]; } /** * Collection for managing Role objects */ export declare class RoleCollection extends SmrtCollection { static readonly _itemClass: typeof Role; /** * Find all system roles (tenantId is null) */ findSystemRoles(): Promise; /** * Find roles available for a tenant (system + tenant-specific) */ findByTenant(tenantId: string): Promise; /** * Find tenant-specific roles only */ findTenantRoles(tenantId: string): Promise; /** * Find role by slug within a tenant context */ findBySlug(slug: string, tenantId?: string): Promise; /** Find a built-in system role only; tenant slug collisions never match. */ findSystemRoleBySlug(slug: string): Promise; /** * Seed default system roles */ seedSystemRoles(options?: SeedSystemRolesOptions): Promise; } //# sourceMappingURL=RoleCollection.d.ts.map