import { BlobContentDownloadResponse , BlobStorageClient } from 'azure-services' ; import { inject , injectable } from 'inversify' ; import { DataProvidersCommon } from './data-providers-common' ; @ injectable ( ) export class PageScanRunReportProvider { constructor ( @ inject ( BlobStorageClient ) private readonly blobStorageClient , @ inject ( DataProvidersCommon ) private readonly dataProvidersCommon ) { } public async saveReport ( fileId , content ) { const filePath = this . dataProvidersCommon . getBlobName ( fileId ) ; await this . blobStorageClient . uploadBlobContent ( DataProvidersCommon . reportBlobContainerName , filePath , content ) ; return filePath ; } public async readReport ( fileId ) { const downloadResponse = await this . blobStorageClient . getBlobContent ( DataProvidersCommon . reportBlobContainerName , this . dataProvidersCommon . getBlobName ( fileId ) ) ; return downloadResponse ; } }