import { BaseRequestPolicy , WebResource } from "@azure/storage-blob" ; export default class QueryRequestPolicyFactory { private oldValue : string ; private newValue : string ; constructor ( oldValue , newValue ) { this . oldValue = oldValue ; this . newValue = newValue ; } create ( nextPolicy , options ) { return new QueryRequestPolicy ( nextPolicy , options , this . oldValue , this . newValue ) ; } } class QueryRequestPolicy extends BaseRequestPolicy { private oldValue : string ; private newValue : string ; constructor ( nextPolicy , options , oldValue , newValue ) { super ( nextPolicy , options ) ; this . oldValue = oldValue ; this . newValue = newValue ; } async sendRequest ( request ) { request . url = request . url . replace ( this . oldValue , this . newValue ) ; const response = await this . _nextPolicy . sendRequest ( request ) ; return response ; } }