@iot-app-kit/core
Advanced tools
Comparing version 7.2.1 to 7.3.0
@@ -17,9 +17,12 @@ import { AggregateType } from '@aws-sdk/client-iotsitewise'; | ||
export type Viewport = DurationViewport | HistoricalViewport; | ||
export type DataRequest = { | ||
viewport?: Viewport; | ||
settings?: TimeSeriesDataRequestSettings; | ||
}; | ||
/** | ||
* Request Information utilized by consumers of the widgets to connect the `data-provider` to their data source. | ||
*/ | ||
export type TimeSeriesDataRequest = { | ||
export interface TimeSeriesDataRequest extends DataRequest { | ||
viewport: Viewport; | ||
settings?: TimeSeriesDataRequestSettings; | ||
}; | ||
} | ||
export type ResolutionConfig = ResolutionMapping | string; | ||
@@ -26,0 +29,0 @@ export interface TimeSeriesDataRequestSettings { |
@@ -11,14 +11,19 @@ import { AggregateType } from '@aws-sdk/client-iotsitewise'; | ||
export type Timestamp = number; | ||
export type DataPoint<T extends Primitive = Primitive> = { | ||
x: Timestamp; | ||
export type DataPointBase<T extends Primitive = Primitive> = { | ||
y: T; | ||
}; | ||
export interface DataPoint<T extends Primitive = Primitive> extends DataPointBase<T> { | ||
x: Timestamp; | ||
} | ||
export type Resolution = number; | ||
export type Primitive = string | number | boolean; | ||
export type DataStreamId = string; | ||
export type TimeSeriesData = { | ||
export type DataBase = { | ||
dataStreams: DataStreamBase[]; | ||
}; | ||
export interface TimeSeriesData extends DataBase { | ||
dataStreams: DataStream[]; | ||
viewport: Viewport; | ||
thresholds: Threshold[]; | ||
}; | ||
} | ||
export type RefId = string; | ||
@@ -44,3 +49,9 @@ export type RequestInformation = { | ||
export type StatusIconType = 'error' | 'active' | 'normal' | 'acknowledged' | 'snoozed' | 'disabled' | 'latched'; | ||
export interface DataStream<T extends Primitive = Primitive> { | ||
export interface DataStreamBase<T extends Primitive = Primitive> { | ||
data: DataPointBase<T>[]; | ||
error?: ErrorDetails; | ||
dataType?: DataType; | ||
meta?: Record<string, string | number | boolean>; | ||
} | ||
export interface DataStream<T extends Primitive = Primitive> extends DataStreamBase<T> { | ||
id: DataStreamId; | ||
@@ -50,3 +61,2 @@ data: DataPoint<T>[]; | ||
aggregationType?: AggregateType; | ||
dataType?: DataType; | ||
refId?: string; | ||
@@ -61,4 +71,2 @@ name?: string; | ||
isRefreshing?: boolean; | ||
error?: ErrorDetails; | ||
meta?: Record<string, string | number | boolean>; | ||
} | ||
@@ -65,0 +73,0 @@ export type DataSource<Query extends DataStreamQuery = AnyDataStreamQuery> = { |
@@ -17,9 +17,12 @@ import { AggregateType } from '@aws-sdk/client-iotsitewise'; | ||
export type Viewport = DurationViewport | HistoricalViewport; | ||
export type DataRequest = { | ||
viewport?: Viewport; | ||
settings?: TimeSeriesDataRequestSettings; | ||
}; | ||
/** | ||
* Request Information utilized by consumers of the widgets to connect the `data-provider` to their data source. | ||
*/ | ||
export type TimeSeriesDataRequest = { | ||
export interface TimeSeriesDataRequest extends DataRequest { | ||
viewport: Viewport; | ||
settings?: TimeSeriesDataRequestSettings; | ||
}; | ||
} | ||
export type ResolutionConfig = ResolutionMapping | string; | ||
@@ -26,0 +29,0 @@ export interface TimeSeriesDataRequestSettings { |
@@ -11,14 +11,19 @@ import { AggregateType } from '@aws-sdk/client-iotsitewise'; | ||
export type Timestamp = number; | ||
export type DataPoint<T extends Primitive = Primitive> = { | ||
x: Timestamp; | ||
export type DataPointBase<T extends Primitive = Primitive> = { | ||
y: T; | ||
}; | ||
export interface DataPoint<T extends Primitive = Primitive> extends DataPointBase<T> { | ||
x: Timestamp; | ||
} | ||
export type Resolution = number; | ||
export type Primitive = string | number | boolean; | ||
export type DataStreamId = string; | ||
export type TimeSeriesData = { | ||
export type DataBase = { | ||
dataStreams: DataStreamBase[]; | ||
}; | ||
export interface TimeSeriesData extends DataBase { | ||
dataStreams: DataStream[]; | ||
viewport: Viewport; | ||
thresholds: Threshold[]; | ||
}; | ||
} | ||
export type RefId = string; | ||
@@ -44,3 +49,9 @@ export type RequestInformation = { | ||
export type StatusIconType = 'error' | 'active' | 'normal' | 'acknowledged' | 'snoozed' | 'disabled' | 'latched'; | ||
export interface DataStream<T extends Primitive = Primitive> { | ||
export interface DataStreamBase<T extends Primitive = Primitive> { | ||
data: DataPointBase<T>[]; | ||
error?: ErrorDetails; | ||
dataType?: DataType; | ||
meta?: Record<string, string | number | boolean>; | ||
} | ||
export interface DataStream<T extends Primitive = Primitive> extends DataStreamBase<T> { | ||
id: DataStreamId; | ||
@@ -50,3 +61,2 @@ data: DataPoint<T>[]; | ||
aggregationType?: AggregateType; | ||
dataType?: DataType; | ||
refId?: string; | ||
@@ -61,4 +71,2 @@ name?: string; | ||
isRefreshing?: boolean; | ||
error?: ErrorDetails; | ||
meta?: Record<string, string | number | boolean>; | ||
} | ||
@@ -65,0 +73,0 @@ export type DataSource<Query extends DataStreamQuery = AnyDataStreamQuery> = { |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "7.2.1", | ||
"version": "7.3.0", | ||
"description": "IoT Application Kit core", | ||
@@ -63,8 +63,8 @@ "main": "./dist/cjs/index.js", | ||
"devDependencies": { | ||
"@iot-app-kit/jest-config": "7.2.1", | ||
"@iot-app-kit/ts-config": "7.2.1", | ||
"@iot-app-kit/jest-config": "7.3.0", | ||
"@iot-app-kit/ts-config": "7.3.0", | ||
"@types/d3-array": "^3.0.5", | ||
"@types/jest": "^29.4.0", | ||
"@types/uuid": "^9.0.2", | ||
"eslint-config-iot-app-kit": "7.2.1", | ||
"eslint-config-iot-app-kit": "7.3.0", | ||
"flush-promises": "^1.0.2", | ||
@@ -71,0 +71,0 @@ "jest": "^29.5.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
338792
5017