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