-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
Copy pathindex.ts
40 lines (35 loc) · 984 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
interface Stat {
label: string;
value: string;
color?: string;
}
interface Coordinates {
x: number;
y: number;
}
interface Series {
label: string;
coordinates: Coordinates[];
color?: string;
key?: string;
}
export interface FetcherResponse {
title: string;
appLink: string;
stats: Stat[];
series: Series[];
}
export interface SearchParams {
// The start timestamp in milliseconds of the queried time interval
startTime: number;
// The end timestamp in milliseconds of the queried time interval
endTime: number;
// The aggregation bucket size in milliseconds if applicable to the data source
bucketSize: number;
}
export type DataFetcher = (searchParams: SearchParams) => Promise<FetcherResponse[]>;