import { SmrtCollection } from '@happyvertical/smrt-core'; import { GroupMember } from '../models/GroupMember.js'; /** * Collection for managing GroupMember objects */ export declare class GroupMemberCollection extends SmrtCollection { static readonly _itemClass: typeof GroupMember; /** Memoized Group collection, used to resolve the Group table name. */ private groupCollection?; /** * Resolve the database table name for the `Group` model from the registry * (via a shared-connection GroupCollection) rather than hardcoding `groups`. * A `@smrt({ tableName })` override or table prefix on Group would otherwise * make raw joins reference a non-existent or foreign table. */ private getGroupTableName; /** * Find all members of a group */ findByGroup(groupId: string): Promise; /** * Find all groups a user belongs to */ findByUser(userId: string): Promise; /** * Check if a user is in a group */ isMember(groupId: string, userId: string): Promise; /** * Add user to a group */ addMember(groupId: string, userId: string): Promise; /** * Remove user from a group */ removeMember(groupId: string, userId: string): Promise; /** * Get group IDs for a user * @deprecated Use getGroupIdsForTenant to prevent cross-tenant leakage */ getGroupIds(userId: string): Promise; /** * Get group IDs for a user within a specific tenant * This prevents cross-tenant permission leakage by filtering groups by tenant */ getGroupIdsForTenant(userId: string, tenantId: string): Promise; /** * Get user IDs in a group */ getUserIds(groupId: string): Promise; } //# sourceMappingURL=GroupMemberCollection.d.ts.map