import { SdkClient } from "../common/sdk-client" ; import { SignalCalculationModels } from "./signal-calculation-models" ; export class extends SdkClient see https export class SignalCalculationClient extends SdkClient { private _baseUrl : string = "/api/signalcalculation/v3" ; param { SignalCalculationModels . InputParameters } body returns { Promise < SignalCalculationModels . Signal > } memberOf public async PostApplyOperation ( body ) { return ( await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , body : body , baseUrl : `${ this . _baseUrl }/applyOperation` , } ) ) as SignalCalculationModels . Signal ; } private async PostApplyOperationDirectRaw ( body ) { return ( await this . HttpAction ( { verb : "POST" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , body : body , baseUrl : `${ this . _baseUrl }/applyOperationDirect` , } ) ) as SignalCalculationModels . SignalDirect ; } param { SignalCalculationModels . InputParametersDirect } body returns { Promise < SignalCalculationModels . SignalDirect > } memberOf public async PostApplyOperationDirect ( body ) { const result = await this . PostApplyOperationDirectRaw ( body ) ; result . timeSeries . forEach ( ( result ) => { if ( ( result . _time as any ) ?. nano && ( result . _time as any ) ?. epochSecond ) { const unixMillisecondsDate = ( result . _time as any ) ?. epochSecond * 1000 + Math . floor ( ( result . _time as any ) ?. nano / 1000000 ) ; result . _time = new Date ( unixMillisecondsDate ) . toISOString ( ) ; } } ) ; return result ; } }