import { SmrtCollection } from '@happyvertical/smrt-core'; import { Repository } from '../models/Repository'; import { RepositoryProviderType } from '../types'; export declare class RepositoryCollection extends SmrtCollection { static readonly _itemClass: typeof Repository; /** * Find a repository by owner and name * * @param owner - Repository owner * @param name - Repository name * @returns Repository or null */ findByFullName(owner: string, name: string): Promise; /** * Find repositories by owner * * @param owner - Repository owner * @returns Array of repositories */ findByOwner(owner: string): Promise; /** * Find repositories by provider type * * @param providerType - Provider type * @returns Array of repositories */ findByProvider(providerType: RepositoryProviderType): Promise; /** * Get or create a repository by owner/name * * @param owner - Repository owner * @param name - Repository name * @param options - Additional options for creation * @returns Repository (existing or newly created) */ getOrCreate(owner: string, name: string, options?: { providerType?: RepositoryProviderType; tokenConfigKey?: string; baseUrl?: string; }): Promise; /** * Sync all repositories * * @param options - Sync options * @returns Array of synced repositories */ syncAll(options?: { force?: boolean; }): Promise; /** * Find repositories with open issues * * @returns Array of repositories with at least one open issue */ findWithOpenIssues(): Promise; /** * Find repositories by tenant ID * * @param tenantId - Tenant ID to filter by * @returns Array of repositories for the tenant */ findByTenant(tenantId: string): Promise; /** * Find all global repositories (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 repositories */ findGlobal(): Promise; /** * Find repositories for a tenant plus all global repositories. * * 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 repositories */ findWithGlobals(tenantId: string): Promise; } //# sourceMappingURL=Repositories.d.ts.map