@robotbas/robotcloud-client 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/services.d.ts +23 -1
package/package.json
CHANGED
package/types/services.d.ts
CHANGED
|
@@ -38,7 +38,28 @@ export interface RoomGuestStatus1AlertEventValue {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
////
|
|
42
|
+
// Alert status interfaces
|
|
43
|
+
////
|
|
44
|
+
|
|
45
|
+
export interface ServiceTypeAlertStatusResponse<T extends string> {
|
|
46
|
+
instance: string;
|
|
47
|
+
time_mark: string;
|
|
48
|
+
alert_status: Record<T, ServiceTypeAlertStatus>;
|
|
49
|
+
}
|
|
50
|
+
export interface ServiceTypeAlertStatus {
|
|
51
|
+
acknowledged: boolean;
|
|
52
|
+
ack_time: string;
|
|
53
|
+
ack_user: string; // username
|
|
54
|
+
active_time: string;
|
|
55
|
+
deactive_time: string;
|
|
56
|
+
activation_count: number;
|
|
57
|
+
}
|
|
41
58
|
|
|
59
|
+
export interface ServiceTypeAlertStatusClient<T extends string> {
|
|
60
|
+
get(instance_id: string): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
|
|
61
|
+
put(instance_id: string, status: Record<T, boolean>): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
|
|
62
|
+
}
|
|
42
63
|
|
|
43
64
|
////
|
|
44
65
|
// Generic interface types
|
|
@@ -47,7 +68,8 @@ export interface RoomGuestStatus1AlertEventValue {
|
|
|
47
68
|
export type HistoricAggregateFunction = "count"|"increase"|"mean"|"first"|"last"|"max"|"min"|"amax"|"amin"|"pmax"|"pmin"|"nmax"|"nmin";
|
|
48
69
|
|
|
49
70
|
export interface ServiceTypeClient<T_ALERTS, T_DATA, T_CONFIG> {
|
|
50
|
-
|
|
71
|
+
get alertStatus(): ServiceTypeAlertStatusClient<any>;
|
|
72
|
+
getAlerts(
|
|
51
73
|
prjId: string,
|
|
52
74
|
params?: ServiceDataRequestParams
|
|
53
75
|
): Promise<AxiosResponse<ServiceDataMeasurement<T_ALERTS>[]>>;
|