| 1 |
import { TimeSeriesAggregationType } from '.'; |
| 2 |
|
| 3 |
export const FIRST_KEY_INDEX = 1; |
| 4 |
|
| 5 |
export function transformArguments( |
| 6 |
sourceKey: string, |
| 7 |
destinationKey: string, |
| 8 |
aggregationType: TimeSeriesAggregationType, |
| 9 |
bucketDuration: number, |
| 10 |
alignTimestamp?: number |
| 11 |
): Array<string> { |
| 12 |
const args = [ |
| 13 |
'TS.CREATERULE', |
| 14 |
sourceKey, |
| 15 |
destinationKey, |
| 16 |
'AGGREGATION', |
| 17 |
aggregationType, |
| 18 |
bucketDuration.toString() |
| 19 |
]; |
| 20 |
|
| 21 |
if (alignTimestamp) { |
| 22 |
args.push(alignTimestamp.toString()); |
| 23 |
} |
| 24 |
|
| 25 |
return args; |
| 26 |
} |
| 27 |
|
| 28 |
export declare function transformReply(): 'OK'; |