import { SmrtCollection } from '@happyvertical/smrt-core'; import { Project } from '../models/Project'; import { ProjectProviderType } from '../types'; export declare class ProjectCollection extends SmrtCollection { static readonly _itemClass: typeof Project; /** * Find project by title * * @param title - Project title * @returns Project or null */ findByTitle(title: string): Promise; /** * Find projects by owner * * @param owner - Project owner (organization or user) * @returns Array of projects */ findByOwner(owner: string): Promise; /** * Find projects by provider type * * @param providerType - Provider type * @returns Array of projects */ findByProvider(providerType: ProjectProviderType): Promise; /** * Get or create a project by ID * * @param projectId - Provider-specific project ID * @param options - Additional options for creation * @returns Project (existing or newly created) */ getOrCreate(projectId: string, options?: { title?: string; owner?: string; providerType?: ProjectProviderType; tokenConfigKey?: string; statusFieldId?: string; statusOptions?: Record; }): Promise; /** * Sync all projects * * @param options - Sync options * @returns Array of synced projects */ syncAll(options?: { force?: boolean; }): Promise; /** * Find projects with items in a specific status * * @param status - Status name * @returns Array of projects */ findWithItemsInStatus(status: string): Promise; /** * Get project statistics * * @param projectId - Project ID * @returns Statistics object */ getStatistics(projectId: string): Promise<{ totalItems: number; itemsByStatus: Record; itemsByType: Record; }>; /** * Find projects by tenant ID * * @param tenantId - Tenant ID to filter by * @returns Array of projects for the tenant */ findByTenant(tenantId: string): Promise; /** * Find all global projects (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 projects */ findGlobal(): Promise; /** * Find projects for a tenant plus all global projects. * * 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 projects */ findWithGlobals(tenantId: string): Promise; } //# sourceMappingURL=Projects.d.ts.map