package storecontract import ( "context" "github.com/samcharles93/archie-core/internal/domain/mapping" ) // MappingStore persists payload field mappings. Deliberately separate from // TaskStore and CaptureStore for the same reason those are split: the // dashboard's mapping editor should only acquire the mapping surface, not the // full task or capture APIs. See type MappingStore interface { InsertMapping(ctx context.Context, m mapping.Mapping) (string, error) GetMapping(ctx context.Context, id string) (*mapping.Mapping, error) ListMappings(ctx context.Context) ([]mapping.Mapping, error) UpdateMapping(ctx context.Context, m mapping.Mapping) error DeleteMapping(ctx context.Context, id string) error } // MappingMatchRecorder counts the events each mapping resolved, which the // store reports as Mapping.MatchCount and LastMatchedAt. Recording the same // (mapping, capture) twice counts once. type MappingMatchRecorder interface { RecordMappingMatch(ctx context.Context, mappingID, captureID string) error }