import { SmrtCollection } from '@happyvertical/smrt-core'; import { Issue } from '../models/Issue'; import { Repository } from '../models/Repository'; import { SearchFilters } from '../types'; export declare class IssueCollection extends SmrtCollection { static readonly _itemClass: typeof Issue; /** * Discover issues from a repository and sync to database * * This method: * 1. Fetches issues from the provider via SDK * 2. Creates/updates SMRT Issue records in the database * 3. Returns the synced Issue objects * * @param options - Discovery options * @returns Array of Issue objects */ discover(options: { repository: Repository; filters?: SearchFilters; }): Promise; /** * Find issues by repository * * @param repositoryId - Repository ID * @returns Array of issues */ findByRepository(repositoryId: string): Promise; /** * Find open issues * * @param repositoryId - Optional repository filter * @returns Array of open issues */ findOpen(repositoryId?: string): Promise; /** * Find issues by label * * @param label - Label name * @param repositoryId - Optional repository filter * @returns Array of issues with the label */ findByLabel(label: string, repositoryId?: string): Promise; /** * Find issues by assignee * * @param assignee - Assignee login * @param repositoryId - Optional repository filter * @returns Array of issues assigned to the user */ findByAssignee(assignee: string, repositoryId?: string): Promise; /** * Find issues needing review (AI-powered) * * @param repositoryId - Optional repository filter * @returns Array of issues that need review */ findNeedingReview(repositoryId?: string): Promise; /** * Find issue by number in a repository * * @param repositoryId - Repository ID * @param number - Issue number * @returns Issue or null */ findByNumber(repositoryId: string, number: number): Promise; /** * Get issues with unincorporated feedback * * Issues that have comments but haven't had feedback incorporated * * @param repositoryId - Optional repository filter * @returns Array of issues */ findWithUnincorporatedFeedback(repositoryId?: string): Promise; /** * Batch sync issues from repository * * @param repository - Repository to sync from * @param options - Sync options * @returns Array of synced issues */ batchSync(repository: Repository, options?: { force?: boolean; }): Promise; /** * Find issues by tenant ID * * @param tenantId - Tenant ID to filter by * @returns Array of issues for the tenant */ findByTenant(tenantId: string): Promise; /** * Find all global issues (no tenant association). * * Routes through the shared tenant-global helper so it does not throw under * an active tenant context (an explicit `tenant_id IS NULL` filter would be * flagged as an isolation violation). (#1600) * * @returns Array of global issues */ findGlobal(): Promise; /** * Find issues for a tenant plus all global issues. * * Fails closed if an active tenant context requests a different tenant's * rows; the admin/system path keeps the cross-tenant capability. (#1600) * * @param tenantId - Tenant ID to filter by * @returns Array of tenant and global issues */ findWithGlobals(tenantId: string): Promise; } //# sourceMappingURL=Issues.d.ts.map