// ----------------------------------------------------------------------------- // IArtifactIndexRepository.cs // Sprint: SPRINT_20260118_017_Evidence_artifact_store_unification // Task: AS-003 - Create ArtifactStore PostgreSQL index // Description: Artifact index repository abstraction // ----------------------------------------------------------------------------- using StellaOps.Artifact.Core; namespace StellaOps.Artifact.Infrastructure; /// /// PostgreSQL repository for artifact index. /// Provides efficient bom-ref based querying. /// public interface IArtifactIndexRepository { /// /// Indexes a stored artifact. /// Task IndexAsync(ArtifactIndexEntry entry, CancellationToken ct = default); /// /// Finds artifacts by bom-ref. /// Task> FindByBomRefAsync(string bomRef, CancellationToken ct = default); /// /// Finds artifacts by bom-ref and serial number. /// Task> FindByBomRefAndSerialAsync( string bomRef, string serialNumber, CancellationToken ct = default); /// /// Gets a specific artifact index entry. /// Task GetAsync( string bomRef, string serialNumber, string artifactId, CancellationToken ct = default); /// /// Removes an artifact from the index. /// Task RemoveAsync( string bomRef, string serialNumber, string artifactId, CancellationToken ct = default); /// /// Finds artifacts by SHA-256 hash. /// Task> FindBySha256Async(string sha256, CancellationToken ct = default); /// /// Finds artifacts by type. /// Task> FindByTypeAsync( ArtifactType type, Guid tenantId, int limit = 100, CancellationToken ct = default); }