import { StorageStructureRepository } from '../storage-structure/storageStructureRepository' ; export class PipelineConfigEventHandler { constructor ( private readonly structureRepository ) { } async handleCreation ( pipelineCreatedEvent ) { await this . structureRepository . create ( pipelineCreatedEvent . pipelineId . toString ( ) ) ; } async handleDeletion ( pipelineDeletedEvent ) { await this . structureRepository . delete ( pipelineDeletedEvent . pipelineId . toString ( ) ) ; } } export interface PipelineCreatedEvent { pipelineId : number ; pipelineName : string ; } export interface PipelineDeletedEvent { pipelineId : number ; pipelineName : string ; }