import { toQueryString } from "../../utils" ; import { SdkClient } from "../common/sdk-client" ; import { SignalValidationModels } from "./signal-validation-models" ; export class extends SdkClient export class SignalValidationClient extends SdkClient { private _baseUrl : string = "/api/signalvalidation/v3" ; param { SignalValidationModels . Timeseries } timeseries param { { variableName : string ; lowerLimit : number ; upperLimit : number ; * } } params param params . variableName param params . lowerLimit param params . upperLimit returns { Promise < SignalValidationModels . Range > } memberOf public async DetectRangeViolations ( timeseries , params ) { return ( ( await this . HttpAction ( { verb : "POST" , body : timeseries , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/detectrangeviolations?${ toQueryString ( params ) }` } ) ) as unknown ) as SignalValidationModels . Range [ ] ; } param { SignalValidationModels . Timeseries [ ] } timeseries param { { variableName : string ; windowSize : number ; * } } params param params . variableName param params . windowSize returns { Promise < SignalValidationModels . Spike [ ] > } memberOf public async DetectSpikes ( timeseries , params ) { return ( ( await this . HttpAction ( { verb : "POST" , body : timeseries , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/detectspikes?${ toQueryString ( params ) }` } ) ) as unknown ) as SignalValidationModels . Spike [ ] ; } param { SignalValidationModels . Timeseries [ ] } timeseries param { { variableName : string ; windowRadius : number ; threshold : number ; * } } params param params . variableName param params . windowRadius param params . threshold returns { Promise < SignalValidationModels . Noise [ ] > } memberOf public async DetectNoise ( timeseries , params ) { return ( ( await this . HttpAction ( { verb : "POST" , body : timeseries , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/detectnoise?${ toQueryString ( params ) }` } ) ) as unknown ) as SignalValidationModels . Noise [ ] ; } param { SignalValidationModels . Timeseries [ ] } timeseries param { { variableName : string ; windowSize : number ; * } } params param params . variableName param params . windowSize returns { Promise < SignalValidationModels . Jump [ ] > } memberOf public async DetectJumps ( timeseries , params ) { return ( ( await this . HttpAction ( { verb : "POST" , body : timeseries , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/detectjumps?${ toQueryString ( params ) }` } ) ) as unknown ) as SignalValidationModels . Jump [ ] ; } param { SignalValidationModels . Timeseries [ ] } timeseries param { { variableName : string ; threshold : number ; * } } params param params . variableName param params . threshold returns { Promise < SignalValidationModels . DataGap > } memberOf public async DetectGaps ( timeseries , params ) { return ( ( await this . HttpAction ( { verb : "POST" , body : timeseries , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/detectgaps?${ toQueryString ( params ) }` } ) ) as unknown ) as SignalValidationModels . DataGap ; } param { SignalValidationModels . Timeseries [ ] } timeseries param { { variableName : string ; threshold : number ; * } } params param params . variableName param params . threshold returns { Promise < SignalValidationModels . DataGapInterpolated > } memberOf public async DetectGapsAndInterpolate ( timeseries , params ) { return ( ( await this . HttpAction ( { verb : "POST" , body : timeseries , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/detectgapsandinterpolate?${ toQueryString ( params ) }` } ) ) as unknown ) as SignalValidationModels . DataGapInterpolated ; } param { SignalValidationModels . Timeseries [ ] } timeseries param { { variableName : string ; windowSize : number ; threshold : number ; step : number ; * } } params param params . variableName param params . windowSize param params . threshold param params . step returns { Promise < SignalValidationModels . Bias [ ] > } memberOf public async DetectBias ( timeseries , params ) { return ( ( await this . HttpAction ( { verb : "POST" , body : timeseries , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/detectbias?${ toQueryString ( params ) }` } ) ) as unknown ) as SignalValidationModels . Bias [ ] ; } }