import { toQueryString } from "../../utils" ; import { SdkClient } from "../common/sdk-client" ; import { TimeSeriesAggregateModelsV4 } from "./iot-timeseries-aggregate-models-v4" ; see examples export class extends SdkClient export class TimeSeriesAggregateClientV4 extends SdkClient { private _baseUrl : string = "/api/iottsaggregates/v4" ; param { { assetId : string ; aspectName : string ; from ? : string ; to ? : string ; intervalValue ? : number ; intervalUnit ? : string ; select ? : string ; count ? : string ; * } } params param { string } params . assetId param { string } params . aspectName param params . from param params . to param params . intervalValue param params . intervalUnit param param . select param param . count returns { Promise < TimeSeriesAggregateModelsV4 . Aggregates > } example memberOf public async GetAggregates ( params ) { const qs = toQueryString ( params ) ; return ( await this . HttpAction ( { verb : "GET" , gateway : this . GetGateway ( ) , authorization : await this . GetToken ( ) , baseUrl : `${ this . _baseUrl }/aggregates?${ qs }` , message : "GetTimeSeriesAggregates" , } ) ) as TimeSeriesAggregateModelsV4 . Aggregates ; } }