@robotbas/robotcloud-client 0.1.13 → 0.1.15
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/dist/helpers/index.d.mts +1 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/{index-rOMDEfBU.d.mts → index-NoveF7Iq.d.mts} +6 -2
- package/dist/{index-rOMDEfBU.d.ts → index-NoveF7Iq.d.ts} +6 -2
- package/dist/index.d.mts +95 -70
- package/dist/index.d.ts +95 -70
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/types/RobotCloudClient.d.ts +5 -1
- package/types/services.d.ts +98 -69
package/types/services.d.ts
CHANGED
|
@@ -1,43 +1,49 @@
|
|
|
1
1
|
import { AxiosResponse } from "axios";
|
|
2
2
|
import { ServiceInstanceRead } from "./ServiceInstanceRead";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import {
|
|
4
|
+
ServiceInstanceDataRequestParams,
|
|
5
|
+
SubsystemRequestParams,
|
|
6
|
+
SubsystemTagsRequestParams,
|
|
7
|
+
} from "./RobotCloudClient";
|
|
8
|
+
|
|
9
|
+
export type MeasurementStatus =
|
|
10
|
+
| "GOOD"
|
|
11
|
+
| "NOT_MEASURED"
|
|
12
|
+
| "INVALID_VALUE"
|
|
13
|
+
| "DEVICE_ERROR";
|
|
6
14
|
|
|
7
15
|
export interface ServiceDataMeasurement<T> extends ServiceInstanceRead<T> {
|
|
8
|
-
|
|
16
|
+
status: MeasurementStatus;
|
|
9
17
|
}
|
|
10
18
|
|
|
11
19
|
export interface ServiceDataRequestParams extends SubsystemRequestParams {
|
|
12
|
-
|
|
20
|
+
tag_id?: string | string[];
|
|
13
21
|
}
|
|
14
22
|
export interface ServiceInstanceHistoricAggregateParams {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
23
|
+
offset?: string;
|
|
24
|
+
property?: any[];
|
|
25
|
+
maxSize?: number;
|
|
26
|
+
}
|
|
19
27
|
export interface ServiceInstanceHistoricParams {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
28
|
+
status?: MeasurementStatus;
|
|
29
|
+
property?: any[];
|
|
30
|
+
maxSize?: number;
|
|
31
|
+
}
|
|
24
32
|
|
|
25
33
|
export interface AirQuality1DataEventValue {
|
|
26
|
-
|
|
34
|
+
co2: number;
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
export interface AirQuality1AlertEventValue {
|
|
30
|
-
|
|
38
|
+
high_co2: boolean;
|
|
31
39
|
}
|
|
32
40
|
|
|
33
|
-
|
|
34
41
|
export interface RoomGuestStatus1AlertEventValue {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
door_open_overtime: boolean;
|
|
43
|
+
window_open_overtime: boolean;
|
|
44
|
+
medical_alarm: boolean;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
|
-
|
|
41
47
|
////
|
|
42
48
|
// Alert status interfaces
|
|
43
49
|
////
|
|
@@ -57,61 +63,84 @@ export interface ServiceTypeAlertStatus {
|
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
export interface ServiceTypeAlertStatusClient<T extends string> {
|
|
60
|
-
getAll(
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
getAll(
|
|
67
|
+
projectId: string,
|
|
68
|
+
params?: SubsystemTagsRequestParams
|
|
69
|
+
): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>[]>>;
|
|
70
|
+
get(
|
|
71
|
+
projectId: string,
|
|
72
|
+
instanceId: string
|
|
73
|
+
): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
|
|
74
|
+
put(
|
|
75
|
+
projectId: string,
|
|
76
|
+
instanceId: string,
|
|
77
|
+
status: Record<T, boolean>
|
|
78
|
+
): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
|
|
63
79
|
}
|
|
64
80
|
|
|
65
81
|
////
|
|
66
82
|
// Generic interface types
|
|
67
83
|
////
|
|
68
84
|
|
|
69
|
-
export type HistoricAggregateFunction =
|
|
85
|
+
export type HistoricAggregateFunction =
|
|
86
|
+
| "count"
|
|
87
|
+
| "increase"
|
|
88
|
+
| "mean"
|
|
89
|
+
| "first"
|
|
90
|
+
| "last"
|
|
91
|
+
| "max"
|
|
92
|
+
| "min"
|
|
93
|
+
| "amax"
|
|
94
|
+
| "amin"
|
|
95
|
+
| "pmax"
|
|
96
|
+
| "pmin"
|
|
97
|
+
| "nmax"
|
|
98
|
+
| "nmin";
|
|
70
99
|
|
|
71
100
|
export interface ServiceTypeClient<T_ALERTS, T_DATA, T_CONFIG> {
|
|
72
|
-
get alertStatus(): ServiceTypeAlertStatusClient<any>;
|
|
101
|
+
get alertStatus(): ServiceTypeAlertStatusClient<any>;
|
|
73
102
|
getAlerts(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
103
|
+
prjId: string,
|
|
104
|
+
params?: ServiceDataRequestParams
|
|
105
|
+
): Promise<AxiosResponse<ServiceDataMeasurement<T_ALERTS>[]>>;
|
|
106
|
+
|
|
107
|
+
getData(
|
|
108
|
+
prjId: string,
|
|
109
|
+
params?: ServiceDataRequestParams
|
|
110
|
+
): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
|
|
111
|
+
|
|
112
|
+
getInstanceConfiguration(
|
|
113
|
+
prjId: string,
|
|
114
|
+
instanceId: string
|
|
115
|
+
): Promise<AxiosResponse<T_CONFIG>>;
|
|
116
|
+
|
|
117
|
+
putInstanceConfiguration(
|
|
118
|
+
prjId: string,
|
|
119
|
+
instanceId: string,
|
|
120
|
+
data: T_CONFIG
|
|
121
|
+
): Promise<AxiosResponse<T_CONFIG>>;
|
|
122
|
+
|
|
123
|
+
getInstanceData(
|
|
124
|
+
prjId: string,
|
|
125
|
+
instanceId: string,
|
|
126
|
+
params?: ServiceInstanceDataRequestParams
|
|
127
|
+
): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>>>;
|
|
128
|
+
|
|
129
|
+
getInstanceHistoric(
|
|
130
|
+
prjId: string,
|
|
131
|
+
instanceId: string,
|
|
132
|
+
startTime: Date,
|
|
133
|
+
endTime: Date,
|
|
134
|
+
params: ServiceInstanceHistoricParams
|
|
135
|
+
): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
|
|
136
|
+
|
|
137
|
+
getInstanceHistoricAggregate(
|
|
138
|
+
prjId: string,
|
|
139
|
+
instanceId: string,
|
|
140
|
+
startTime: Date,
|
|
141
|
+
endTime: Date,
|
|
142
|
+
aggFunction: HistoricAggregateFunction,
|
|
143
|
+
periode: string,
|
|
144
|
+
params: ServiceInstanceHistoricAggregateParams
|
|
145
|
+
): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
|
|
146
|
+
}
|