@robotbas/robotcloud-client 0.2.0 → 0.2.1

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.
@@ -0,0 +1,330 @@
1
+ import { AxiosResponse } from 'axios';
2
+
3
+ type TemperatureUnit = "CELSIUS" | "FAHRENHEIT"
4
+ type RegimState = "COLD"|"HEAT"|"AUTO"
5
+
6
+ type OrganizationAccessLevel = "STAFF" | "STANDARD" | "ADMIN" | "SUPERUSER" | "MASTER"
7
+ type ProjectAccessLevel = "BLOCKED" | "RESTRICTED" | "BASIC" | "ADVANCED"
8
+ type AppAccessLevel = "BLOCKED" | "STANDARD" | "ADVANCED" | "ADMIN"
9
+
10
+ type RobotCloudServiceType = "RoomClime_1"|"RoomGuestStatus_1"|"AirQuality_1"
11
+
12
+ // Desired fancoil speed (0 = Auto, 1..3 = Manual Speed)
13
+ type FancoilSpeedState = 0|1|2|3;
14
+
15
+
16
+ /** RESPONSE **/
17
+
18
+ interface RobotCloudNamedItem {
19
+ id: string;
20
+ name: string;
21
+ }
22
+
23
+ interface RobotCloudProject {
24
+ id: string;
25
+ name: string;
26
+ organization: string;
27
+ }
28
+
29
+ /** USERS */
30
+ interface RobotCloudUserAppAccess {
31
+ app_id: string;
32
+ app_name: string;
33
+ access_level: AppAccessLevel;
34
+ }
35
+
36
+ interface RobotCloudUserSimple {
37
+ username: string;
38
+ name: string;
39
+ last_name: string;
40
+ }
41
+ interface RobotCloudUserDetails {
42
+ username: string;
43
+ name: string;
44
+ last_name: string;
45
+ email: string;
46
+ org_id: string;
47
+ org_access: OrganizationAccessLevel;
48
+ default_project_access: ProjectAccessLevel;
49
+ default_app_access: RobotCloudUserAppAccess[];
50
+ access_all_projects: boolean;
51
+ blocked: boolean;
52
+ }
53
+
54
+ interface RobotCloudUserProject {
55
+ project_id: string;
56
+ project_name: string;
57
+ access_level: ProjectAccessLevel;
58
+ app_access_level: {app_id: string, app_name: string, access_level: AppAccessLevel}[]
59
+ }
60
+
61
+ interface RobotCloudOrganizationDetails extends RobotCloudNamedItem {
62
+ description?: string;
63
+ address?: string;
64
+ }
65
+
66
+ interface RobotCloudProjectDetails extends RobotCloudProject {
67
+ version: number;
68
+ description?: string;
69
+ country?: string;
70
+ timezone?: string;
71
+ image_url?: string;
72
+ longitude?: number;
73
+ latitude?: number;
74
+ application_enabled?: boolean;
75
+ access_level?: ProjectAccessLevel;
76
+ app_access_level?: AppAccessLevel;
77
+ }
78
+
79
+ interface RobotCloudDeviceDetails extends RobotCloudNamedItem {
80
+ description?: string;
81
+ location: string;
82
+ address: {
83
+ domain: number;
84
+ zone: number;
85
+ id: number;
86
+ };
87
+ type: number;
88
+ configuration_type: string;
89
+ tags: string;
90
+ }
91
+
92
+ interface RobotCloudServiceTypeDetails {
93
+ description: string;
94
+ name: RobotCloudServiceType
95
+ }
96
+ /** SERVICE EVENTS VALUES **/
97
+ interface RoomClime1AlertEventValue {
98
+ high_temperature: boolean;
99
+ low_temperature: boolean;
100
+ high_humidity: boolean;
101
+ fancoil_on_overtime: boolean;
102
+ }
103
+
104
+ interface RoomConsumes1AlertEventValue {
105
+ high_daily_energy_electric: boolean;
106
+ high_daily_energy_thermal: boolean;
107
+ high_daily_hot_water: boolean;
108
+ high_daily_cold_water: boolean;
109
+ }
110
+
111
+ interface ServiceInstanceRead<T> {
112
+ instance: string;
113
+ time_mark: string;
114
+ value: T;
115
+ }
116
+
117
+ /**
118
+ *
119
+ */
120
+
121
+
122
+
123
+ /*
124
+ * GENERIC REQUEST PARAMS INTERFACES
125
+ */
126
+
127
+ interface SubsystemRequestParams {
128
+ subsystem_id?: string;
129
+ }
130
+
131
+ interface PaginableRequestParams {
132
+ startIndex?: number;
133
+ maxSize?: number;
134
+ }
135
+
136
+ interface SubsystemTagsRequestParams extends SubsystemRequestParams {
137
+ tag_id?: string | string[];
138
+ }
139
+
140
+ interface BaseFullPaginableRequestParams extends SubsystemTagsRequestParams, PaginableRequestParams {
141
+
142
+ }
143
+
144
+ /*
145
+ * CONCRETE INTERFACES
146
+ */
147
+
148
+ interface ProjectClassifiersRequestParams extends PaginableRequestParams {
149
+
150
+ }
151
+
152
+ interface ProjectsRequestParams extends PaginableRequestParams {
153
+ "organization-id": string;
154
+ }
155
+
156
+ interface ProjectDetailsRequestParams {
157
+
158
+ }
159
+
160
+ interface ProjectLocationsRequestParams extends BaseFullPaginableRequestParams {
161
+
162
+ }
163
+
164
+
165
+ interface ServiceInstanceDataRequestParams {
166
+
167
+ }
168
+
169
+ interface ProjectTagRequestParams extends PaginableRequestParams {
170
+ parent_tag?: string;
171
+ no_parent?: boolean;
172
+ }
173
+
174
+ interface LocationServiceInstancesRequestParams extends BaseFullPaginableRequestParams {
175
+
176
+ }
177
+
178
+ interface AlertLogsListRequestParams extends BaseFullPaginableRequestParams {
179
+
180
+ }
181
+
182
+
183
+ interface ServiceInstancesRequestParams extends BaseFullPaginableRequestParams {
184
+ id?: string;
185
+ name?: string;
186
+ location_id?: string;
187
+ device_id?: string;
188
+ }
189
+
190
+
191
+ interface ServiceDataRequestParams extends SubsystemTagsRequestParams {
192
+ }
193
+
194
+ interface ServiceInstanceHistoricAggregateParams {
195
+ offset?: string;
196
+ property?: any[];
197
+ maxSize?: number;
198
+ }
199
+ interface ServiceInstanceHistoricParams {
200
+ status?: MeasurementStatus;
201
+ property?: any[];
202
+ maxSize?: number;
203
+ }
204
+
205
+ type MeasurementStatus =
206
+ | "GOOD"
207
+ | "NOT_MEASURED"
208
+ | "INVALID_VALUE"
209
+ | "DEVICE_ERROR";
210
+
211
+ interface ServiceDataMeasurement<T> extends ServiceInstanceRead<T> {
212
+ status: MeasurementStatus;
213
+ }
214
+
215
+ interface AirQuality1DataEventValue {
216
+ co2: number;
217
+ }
218
+
219
+ interface AirQuality1AlertEventValue {
220
+ high_co2: boolean;
221
+ }
222
+
223
+ interface RoomGuestStatus1AlertEventValue {
224
+ door_open_overtime: boolean;
225
+ window_open_overtime: boolean;
226
+ medical_alarm: boolean;
227
+ }
228
+
229
+
230
+ ////
231
+ // Generic interface types
232
+ ////
233
+
234
+ type HistoricAggregateFunction =
235
+ | "count"
236
+ | "increase"
237
+ | "mean"
238
+ | "first"
239
+ | "last"
240
+ | "max"
241
+ | "min"
242
+ | "amax"
243
+ | "amin"
244
+ | "pmax"
245
+ | "pmin"
246
+ | "nmax"
247
+ | "nmin";
248
+
249
+
250
+ interface ServiceInstanceConfigClient<T> {
251
+ get(project_id: string, instance_id: string): Promise<AxiosResponse<T>>;
252
+ put(project_id: string, instance_id: string, configuration: T): Promise<AxiosResponse<T>>;
253
+ }
254
+
255
+ interface ServiceTypeClient<T_ALERTS, T_DATA> {
256
+
257
+ get configuration(): ServiceInstanceConfigClient<any>;
258
+ getAlerts(
259
+ prjId: string,
260
+ params?: ServiceDataRequestParams
261
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T_ALERTS>[]>>;
262
+
263
+ getData(
264
+ prjId: string,
265
+ params?: ServiceDataRequestParams
266
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
267
+
268
+ getInstanceData(
269
+ prjId: string,
270
+ instanceId: string,
271
+ params?: ServiceInstanceDataRequestParams
272
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>>>;
273
+
274
+ getInstanceHistoric(
275
+ prjId: string,
276
+ instanceId: string,
277
+ startTime: Date,
278
+ endTime: Date,
279
+ params: ServiceInstanceHistoricParams
280
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
281
+
282
+ getInstanceHistoricAggregate(
283
+ prjId: string,
284
+ instanceId: string,
285
+ startTime: Date,
286
+ endTime: Date,
287
+ aggFunction: HistoricAggregateFunction,
288
+ periode: string,
289
+ params: ServiceInstanceHistoricAggregateParams
290
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
291
+ }
292
+
293
+ interface ProjectTagTreeNode {
294
+ tag: ProjectTag;
295
+ children: ProjectTagTreeNode[];
296
+ }
297
+
298
+ interface ProjectTagsTree {
299
+ root: ProjectTagTreeNode[]
300
+ }
301
+
302
+ interface ProjectTag {
303
+ id: string;
304
+ name: string;
305
+ parent_id: string;
306
+ }
307
+
308
+ declare class TagsClient {
309
+ getTags: (prjId: string, params?: ProjectTagRequestParams) => Promise<AxiosResponse<ProjectTag[]>>;
310
+ }
311
+ declare const tagsClient: TagsClient;
312
+
313
+ declare class TagsHelper {
314
+ private tagsClient;
315
+ constructor(tagsClient: TagsClient);
316
+ getTagsTree: (prjId: string, maxDepth?: number, params?: ProjectTagRequestParams) => Promise<ProjectTagsTree>;
317
+ getTagsChildren: (prjId: string, level?: number, parent_id?: string, params?: ProjectTagRequestParams, maxDepth?: number) => Promise<ProjectTagTreeNode[]>;
318
+ }
319
+
320
+ interface RobotCloudPermissionsHelper {
321
+ checkProjectAccess(prjId: string, required_project_access: ProjectAccessLevel): Promise<boolean>;
322
+ hasAccessLevel(project: RobotCloudProjectDetails, required_project_access: ProjectAccessLevel): boolean;
323
+ hasAppAccessLevel(project: RobotCloudProjectDetails, required_application_access: AppAccessLevel): boolean;
324
+ }
325
+
326
+ declare const robotCloudPermissionsHelper: RobotCloudPermissionsHelper;
327
+
328
+ declare const tagsHelper: TagsHelper;
329
+
330
+ export { type AirQuality1AlertEventValue as A, tagsClient as B, tagsHelper as C, robotCloudPermissionsHelper as D, type RobotCloudPermissionsHelper as E, type ProjectTagTreeNode as F, type ProjectTagsTree as G, type HistoricAggregateFunction as H, type ProjectTag as I, type ProjectAccessLevel as J, type AppAccessLevel as K, type LocationServiceInstancesRequestParams as L, type FancoilSpeedState as M, type RobotCloudUserAppAccess as N, type OrganizationAccessLevel as O, type ProjectClassifiersRequestParams as P, type MeasurementStatus as Q, type RegimState as R, type ServiceInstanceConfigClient as S, type TemperatureUnit as T, type ServiceInstanceRead as U, type ServiceTypeClient as a, type RoomClime1AlertEventValue as b, type ServiceDataRequestParams as c, type ServiceDataMeasurement as d, type ServiceInstanceDataRequestParams as e, type ServiceInstanceHistoricParams as f, type ServiceInstanceHistoricAggregateParams as g, type RoomGuestStatus1AlertEventValue as h, type AirQuality1DataEventValue as i, type RoomConsumes1AlertEventValue as j, type RobotCloudDeviceDetails as k, type RobotCloudNamedItem as l, type RobotCloudServiceType as m, type ProjectLocationsRequestParams as n, type ProjectsRequestParams as o, type RobotCloudProject as p, type ProjectDetailsRequestParams as q, type RobotCloudProjectDetails as r, type SubsystemRequestParams as s, type RobotCloudServiceTypeDetails as t, type ServiceInstancesRequestParams as u, type AlertLogsListRequestParams as v, type RobotCloudUserSimple as w, type RobotCloudOrganizationDetails as x, type RobotCloudUserDetails as y, type RobotCloudUserProject as z };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosResponse } from 'axios';
3
- import { S as SubsystemRequestParams, a as SubsystemTagsRequestParams, b as ServiceInstanceDataRequestParams, R as RegimState, T as TemperatureUnit, c as RoomClime1AlertEventValue, d as RoomConsumes1AlertEventValue, P as PaginableRequestParams, e as RobotCloudDeviceDetails, f as RobotCloudNamedItem, g as RobotCloudServiceType, L as LocationServiceInstancesRequestParams, h as ProjectLocationsRequestParams, i as ProjectRequestParams, j as RobotCloudProject, k as ProjectDetailsRequestParams, l as RobotCloudProjectDetails, m as RobotCloudServiceTypeDetails, n as RobotCloudUserDetails, o as RobotCloudUserProject, p as RobotCloudOrganizationDetails } from './index-NoveF7Iq.mjs';
4
- export { A as AppAccessLevel, F as FancoilSpeedState, O as OrganizationAccessLevel, x as ProjectAccessLevel, w as ProjectTag, y as ProjectTagRequestParams, u as ProjectTagTreeNode, v as ProjectTagsTree, s as RobotCloudPermissionsHelper, z as RobotCloudUserAppAccess, r as robotCloudPermissionsHelper, t as tagsClient, q as tagsHelper } from './index-NoveF7Iq.mjs';
3
+ import { R as RegimState, T as TemperatureUnit, S as ServiceInstanceConfigClient, a as ServiceTypeClient, b as RoomClime1AlertEventValue, c as ServiceDataRequestParams, d as ServiceDataMeasurement, e as ServiceInstanceDataRequestParams, f as ServiceInstanceHistoricParams, H as HistoricAggregateFunction, g as ServiceInstanceHistoricAggregateParams, h as RoomGuestStatus1AlertEventValue, A as AirQuality1AlertEventValue, i as AirQuality1DataEventValue, j as RoomConsumes1AlertEventValue, P as ProjectClassifiersRequestParams, k as RobotCloudDeviceDetails, l as RobotCloudNamedItem, m as RobotCloudServiceType, L as LocationServiceInstancesRequestParams, n as ProjectLocationsRequestParams, o as ProjectsRequestParams, p as RobotCloudProject, q as ProjectDetailsRequestParams, r as RobotCloudProjectDetails, s as SubsystemRequestParams, t as RobotCloudServiceTypeDetails, u as ServiceInstancesRequestParams, v as AlertLogsListRequestParams, w as RobotCloudUserSimple, x as RobotCloudOrganizationDetails, y as RobotCloudUserDetails, z as RobotCloudUserProject } from './index-t7vP2gEL.mjs';
4
+ export { K as AppAccessLevel, M as FancoilSpeedState, Q as MeasurementStatus, O as OrganizationAccessLevel, J as ProjectAccessLevel, I as ProjectTag, F as ProjectTagTreeNode, G as ProjectTagsTree, E as RobotCloudPermissionsHelper, N as RobotCloudUserAppAccess, U as ServiceInstanceRead, D as robotCloudPermissionsHelper, B as tagsClient, C as tagsHelper } from './index-t7vP2gEL.mjs';
5
5
 
6
6
  declare const robotcloudApi: axios.AxiosInstance;
7
7
 
@@ -47,151 +47,6 @@ declare namespace robotCloudToken {
47
47
  export { type robotCloudToken_RobotCloudNewTokenResponse as RobotCloudNewTokenResponse, robotCloudToken_decodeToken as decodeToken, robotCloudToken_needRenew as needRenew, robotCloudToken_renewToken as renewToken, robotCloudToken_validateToken as validateToken };
48
48
  }
49
49
 
50
- interface ServiceInstanceRead<T> {
51
- instance: string;
52
- time_mark: string;
53
- value: T;
54
- }
55
-
56
- type MeasurementStatus =
57
- | "GOOD"
58
- | "NOT_MEASURED"
59
- | "INVALID_VALUE"
60
- | "DEVICE_ERROR";
61
-
62
- interface ServiceDataMeasurement<T> extends ServiceInstanceRead<T> {
63
- status: MeasurementStatus;
64
- }
65
-
66
- interface ServiceDataRequestParams extends SubsystemRequestParams {
67
- tag_id?: string | string[];
68
- }
69
- interface ServiceInstanceHistoricAggregateParams {
70
- offset?: string;
71
- property?: any[];
72
- maxSize?: number;
73
- }
74
- interface ServiceInstanceHistoricParams {
75
- status?: MeasurementStatus;
76
- property?: any[];
77
- maxSize?: number;
78
- }
79
-
80
- interface AirQuality1DataEventValue {
81
- co2: number;
82
- }
83
-
84
- interface AirQuality1AlertEventValue {
85
- high_co2: boolean;
86
- }
87
-
88
- interface RoomGuestStatus1AlertEventValue {
89
- door_open_overtime: boolean;
90
- window_open_overtime: boolean;
91
- medical_alarm: boolean;
92
- }
93
-
94
- ////
95
- // Alert status interfaces
96
- ////
97
-
98
- interface ServiceTypeAlertStatusResponse<T extends string> {
99
- instance: string;
100
- time_mark: string;
101
- alert_status: Record<T, ServiceTypeAlertStatus>;
102
- }
103
- interface ServiceTypeAlertStatus {
104
- acknowledged: boolean;
105
- ack_time: string;
106
- ack_user: string; // username
107
- active_time: string;
108
- deactive_time: string;
109
- activation_count: number;
110
- }
111
-
112
- interface ServiceTypeAlertStatusClient<T extends string> {
113
- getAll(
114
- projectId: string,
115
- params?: SubsystemTagsRequestParams
116
- ): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>[]>>;
117
- get(
118
- projectId: string,
119
- instanceId: string
120
- ): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
121
- put(
122
- projectId: string,
123
- instanceId: string,
124
- status: Record<T, boolean>
125
- ): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
126
- }
127
-
128
- ////
129
- // Generic interface types
130
- ////
131
-
132
- type HistoricAggregateFunction =
133
- | "count"
134
- | "increase"
135
- | "mean"
136
- | "first"
137
- | "last"
138
- | "max"
139
- | "min"
140
- | "amax"
141
- | "amin"
142
- | "pmax"
143
- | "pmin"
144
- | "nmax"
145
- | "nmin";
146
-
147
- interface ServiceTypeClient<T_ALERTS, T_DATA, T_CONFIG> {
148
- get alertStatus(): ServiceTypeAlertStatusClient<any>;
149
- getAlerts(
150
- prjId: string,
151
- params?: ServiceDataRequestParams
152
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_ALERTS>[]>>;
153
-
154
- getData(
155
- prjId: string,
156
- params?: ServiceDataRequestParams
157
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
158
-
159
- getInstanceConfiguration(
160
- prjId: string,
161
- instanceId: string
162
- ): Promise<AxiosResponse<T_CONFIG>>;
163
-
164
- putInstanceConfiguration(
165
- prjId: string,
166
- instanceId: string,
167
- data: T_CONFIG
168
- ): Promise<AxiosResponse<T_CONFIG>>;
169
-
170
- getInstanceData(
171
- prjId: string,
172
- instanceId: string,
173
- params?: ServiceInstanceDataRequestParams
174
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>>>;
175
-
176
- getInstanceHistoric(
177
- prjId: string,
178
- instanceId: string,
179
- startTime: Date,
180
- endTime: Date,
181
- params: ServiceInstanceHistoricParams
182
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
183
-
184
- getInstanceHistoricAggregate(
185
- prjId: string,
186
- instanceId: string,
187
- startTime: Date,
188
- endTime: Date,
189
- aggFunction: HistoricAggregateFunction,
190
- periode: string,
191
- params: ServiceInstanceHistoricAggregateParams
192
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
193
- }
194
-
195
50
  interface RoomClime1Data {
196
51
  demandRF: boolean;
197
52
  eco_mode: "STANDBY"|"ECO"|"VIP";
@@ -291,34 +146,36 @@ interface RoomGuestStatusConfigurationParams {
291
146
  medical_alarm?: boolean;
292
147
  }
293
148
 
294
- declare class GenericAlertStatusClient<T extends string> implements ServiceTypeAlertStatusClient<T> {
149
+ declare class GenericInstanceConfigClient<T> implements ServiceInstanceConfigClient<T> {
295
150
  private readonly serviceName;
296
151
  constructor(serviceName: string);
297
- getAll(projectId: string, params?: SubsystemTagsRequestParams): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>[]>>;
298
- get(projectId: string, instanceId: string): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
299
- put(projectId: string, instanceId: string, status: Record<T, boolean>): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
152
+ get(project_id: string, instance_id: string): Promise<AxiosResponse<T>>;
153
+ put(project_id: string, instance_id: string, new_config: T): Promise<AxiosResponse<T>>;
300
154
  }
301
155
 
302
156
  type RoomClimeAlertsKeys = "high_temperature" | "low_temperature" | "high_humidity" | "fancoil_on_overtime";
303
- declare class RoomClientAlertStatusClient extends GenericAlertStatusClient<RoomClimeAlertsKeys> {
157
+ declare class RoomClimeConfigClient extends GenericInstanceConfigClient<RoomClimeConfigurationParams> {
304
158
  constructor();
305
159
  }
306
- declare class RoomClimeClient implements ServiceTypeClient<RoomClime1AlertEventValue, RoomClime1Data, RoomClimeConfigurationParams> {
307
- private _alertstatusClient;
308
- get alertStatus(): RoomClientAlertStatusClient;
160
+ declare class RoomClimeClient implements ServiceTypeClient<RoomClime1AlertEventValue, RoomClime1Data> {
161
+ private _configurationClient;
162
+ get configuration(): RoomClimeConfigClient;
309
163
  constructor();
310
164
  getAlerts(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomClime1AlertEventValue>[]>>;
311
165
  getData(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomClime1Data>[]>>;
312
- getInstanceConfiguration(prjId: string, instanceId: string): Promise<AxiosResponse<RoomClimeConfigurationParams>>;
313
- putInstanceConfiguration(prjId: string, instanceId: string, data: RoomClimeConfigurationParams): Promise<AxiosResponse<RoomClimeConfigurationParams>>;
314
166
  getInstanceData(prjId: string, instanceId: string, params?: ServiceInstanceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomClime1Data>>>;
315
167
  getInstanceHistoric(prjId: string, instanceId: string, startTime: Date, endTime: Date, params: ServiceInstanceHistoricParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomClime1Data>[]>>;
316
168
  getInstanceHistoricAggregate(prjId: string, instanceId: string, startTime: Date, endTime: Date, aggFunction: HistoricAggregateFunction, periode: string, params: ServiceInstanceHistoricAggregateParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomClime1Data>[]>>;
317
169
  }
318
170
  declare const roomClimeClient: RoomClimeClient;
319
171
 
320
- declare class RoomGuestStatusClient implements ServiceTypeClient<RoomGuestStatus1AlertEventValue, RoomGuestStatus1Data, RoomGuestStatusConfigurationParams> {
321
- get alertStatus(): ServiceTypeAlertStatusClient<any>;
172
+ declare class RoomGuestStatusConfigClient extends GenericInstanceConfigClient<RoomGuestStatusConfigurationParams> {
173
+ constructor();
174
+ }
175
+ declare class RoomGuestStatusClient implements ServiceTypeClient<RoomGuestStatus1AlertEventValue, RoomGuestStatus1Data> {
176
+ private _configurationClient;
177
+ get configuration(): RoomGuestStatusConfigClient;
178
+ constructor();
322
179
  getAlerts(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomGuestStatus1AlertEventValue>[]>>;
323
180
  getData(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomGuestStatus1Data>[]>>;
324
181
  getInstanceConfiguration(prjId: string, instanceId: string): Promise<AxiosResponse<RoomGuestStatusConfigurationParams>>;
@@ -329,34 +186,36 @@ declare class RoomGuestStatusClient implements ServiceTypeClient<RoomGuestStatus
329
186
  }
330
187
  declare const roomGuestStatusClient: RoomGuestStatusClient;
331
188
 
332
- declare class AirQualityClient implements ServiceTypeClient<AirQuality1AlertEventValue, AirQuality1DataEventValue, any> {
333
- get alertStatus(): ServiceTypeAlertStatusClient<any>;
189
+ declare class AirQualityConfigClient extends GenericInstanceConfigClient<any> {
190
+ constructor();
191
+ }
192
+ declare class AirQualityClient implements ServiceTypeClient<AirQuality1AlertEventValue, AirQuality1DataEventValue> {
193
+ private _configurationClient;
194
+ get configuration(): AirQualityConfigClient;
195
+ constructor();
334
196
  getAlerts(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<AirQuality1AlertEventValue>[]>>;
335
197
  getData(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<AirQuality1DataEventValue>[]>>;
336
- getInstanceConfiguration<T>(prjId: string, instanceId: string): Promise<AxiosResponse<T>>;
337
- putInstanceConfiguration<T>(prjId: string, instanceId: string, data: T): Promise<AxiosResponse<T>>;
338
198
  getInstanceData(prjId: string, instanceId: string, params?: ServiceInstanceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<AirQuality1DataEventValue>>>;
339
199
  getInstanceHistoric(prjId: string, instanceId: string, startTime: Date, endTime: Date, params: ServiceInstanceHistoricParams): Promise<AxiosResponse<ServiceDataMeasurement<AirQuality1DataEventValue>[]>>;
340
200
  getInstanceHistoricAggregate(prjId: string, instanceId: string, startTime: Date, endTime: Date, aggFunction: HistoricAggregateFunction, periode: string, params: ServiceInstanceHistoricAggregateParams): Promise<AxiosResponse<ServiceDataMeasurement<AirQuality1DataEventValue>[]>>;
341
201
  }
342
202
  declare const airQualityClient: AirQualityClient;
343
203
 
344
- declare class RoomConsumesClient implements ServiceTypeClient<RoomConsumes1AlertEventValue, RoomConsumes1Data, any> {
345
- get alertStatus(): ServiceTypeAlertStatusClient<any>;
204
+ declare class RoomConsumesConfigClient extends GenericInstanceConfigClient<any> {
205
+ constructor();
206
+ }
207
+ declare class RoomConsumesClient implements ServiceTypeClient<RoomConsumes1AlertEventValue, RoomConsumes1Data> {
208
+ private _configurationClient;
209
+ get configuration(): RoomConsumesConfigClient;
210
+ constructor();
346
211
  getAlerts(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomConsumes1AlertEventValue>[]>>;
347
212
  getData(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomConsumes1Data>[]>>;
348
- getInstanceConfiguration<T>(prjId: string, instanceId: string): Promise<AxiosResponse<T>>;
349
- putInstanceConfiguration<T>(prjId: string, instanceId: string, data: T): Promise<AxiosResponse<T>>;
350
213
  getInstanceData: (prjId: string, instanceId: string, params?: ServiceInstanceDataRequestParams) => Promise<AxiosResponse<ServiceDataMeasurement<RoomConsumes1Data>>>;
351
214
  getInstanceHistoric(prjId: string, instanceId: string, startTime: Date, endTime: Date, params: ServiceInstanceHistoricParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomConsumes1Data>[]>>;
352
215
  getInstanceHistoricAggregate(prjId: string, instanceId: string, startTime: Date, endTime: Date, aggFunction: HistoricAggregateFunction, periode: string, params: ServiceInstanceHistoricAggregateParams): Promise<AxiosResponse<ServiceDataMeasurement<RoomConsumes1Data>[]>>;
353
216
  }
354
217
  declare const roomConsumesClient: RoomConsumesClient;
355
218
 
356
- interface ProjectClassifiersRequestParams extends PaginableRequestParams {
357
-
358
- }
359
-
360
219
  interface Classifier {
361
220
  id: string;
362
221
  name: string;
@@ -388,15 +247,6 @@ interface ServiceInstanceDetails extends RobotCloudServiceInstance {
388
247
  classifier: string;
389
248
  }
390
249
 
391
- interface ServiceInstancesRequestParams extends SubsystemRequestParams,
392
- PaginableRequestParams {
393
- id?: string;
394
- name?: string;
395
- location_id?: string;
396
- device_id?: string;
397
- tag_id?: string[];
398
- }
399
-
400
250
  interface RobotCloudLocationDetails {
401
251
  id: string;
402
252
  name: string;
@@ -412,7 +262,7 @@ declare class LocationsClient {
412
262
  declare const locationsClient: LocationsClient;
413
263
 
414
264
  declare class ProjectsClient {
415
- getProjects: (params?: ProjectRequestParams) => Promise<AxiosResponse<RobotCloudProject[]>>;
265
+ getProjects: (params?: ProjectsRequestParams) => Promise<AxiosResponse<RobotCloudProject[]>>;
416
266
  getProjectDetails: (prjId: string, params?: ProjectDetailsRequestParams) => Promise<AxiosResponse<RobotCloudProjectDetails>>;
417
267
  getProjectServiceTypes: (prjId: string, params?: SubsystemRequestParams) => Promise<AxiosResponse<RobotCloudServiceTypeDetails[]>>;
418
268
  }
@@ -429,11 +279,40 @@ declare class SubsystemsClient {
429
279
  }
430
280
  declare const subsystemsClient: SubsystemsClient;
431
281
 
432
- declare class UsersClient {
433
- getUser: (username: string) => Promise<AxiosResponse<RobotCloudUserDetails>>;
434
- getUserProjects: (username: string) => Promise<AxiosResponse<RobotCloudUserProject[]>>;
282
+ interface AlertsLogsStats {
283
+ total: number;
284
+ active: number;
285
+ noack: number;
286
+ active_noack: number;
435
287
  }
436
- declare const usersClient: UsersClient;
288
+ interface AlertLogLine {
289
+ id: string;
290
+ service: string;
291
+ instance: string;
292
+ location: RobotCloudNamedItem;
293
+ classifier: RobotCloudNamedItem;
294
+ alert_name: string;
295
+ acknowledged: boolean;
296
+ ack_time: string;
297
+ ack_user: RobotCloudUserSimple;
298
+ active_time: string;
299
+ deactive_time: string;
300
+ }
301
+ interface AlertsLogsList {
302
+ total_size: number;
303
+ initial_index: number;
304
+ alerts: AlertLogLine;
305
+ }
306
+ interface AlertLogAckItem {
307
+ id: string;
308
+ acknowledged: boolean;
309
+ }
310
+ interface AlertsClient {
311
+ getProjectStats(projectId: string): Promise<AxiosResponse<AlertsLogsStats>>;
312
+ getProjectLog(projectId: string, params: AlertLogsListRequestParams): Promise<AxiosResponse<AlertsLogsList>>;
313
+ acknowledge(projectId: string, data: AlertLogAckItem[]): Promise<AxiosResponse<AlertsLogsList>>;
314
+ }
315
+ declare const alertsClient: AlertsClient;
437
316
 
438
317
  declare class OrganizationsClient {
439
318
  getOrganization: (organizationId: string) => Promise<AxiosResponse<RobotCloudOrganizationDetails>>;
@@ -441,4 +320,10 @@ declare class OrganizationsClient {
441
320
  }
442
321
  declare const organizationsClient: OrganizationsClient;
443
322
 
444
- export { type AirQuality1AlertEventValue, type AirQuality1DataEventValue, type CheckTokenResponse, type Classifier, type ClassifierDetails, type HistoricAggregateFunction, LocationServiceInstancesRequestParams, type MeasurementStatus, PaginableRequestParams, type ProjectClassifiersRequestParams, ProjectDetailsRequestParams, ProjectLocationsRequestParams, ProjectRequestParams, RegimState, RobotCloudClientConfig, RobotCloudDeviceDetails, type RobotCloudJWTPayload, RobotCloudNamedItem, RobotCloudOrganizationDetails, RobotCloudProject, RobotCloudProjectDetails, type RobotCloudServiceInstance, RobotCloudServiceType, RobotCloudServiceTypeDetails, RobotCloudUserDetails, RobotCloudUserProject, RoomClientAlertStatusClient, RoomClime1AlertEventValue, type RoomClime1Data, type RoomClimeAlertsKeys, RoomClimeClient, type RoomClimeConfigurationParams, RoomConsumes1AlertEventValue, type RoomConsumes1Data, type RoomGrouping1DataEventValue, type RoomGrouping1InstanceDeviceConfig, type RoomGuestStatus1AlertEventValue, type RoomGuestStatus1Data, type RoomGuestStatusConfigurationParams, type ServiceDataMeasurement, type ServiceDataRequestParams, ServiceInstanceDataRequestParams, type ServiceInstanceDetails, type ServiceInstanceDeviceConfig, type ServiceInstanceHistoricAggregateParams, type ServiceInstanceHistoricParams, type ServiceInstanceRead, type ServiceInstancesRequestParams, type ServiceTypeAlertStatus, type ServiceTypeAlertStatusClient, type ServiceTypeAlertStatusResponse, type ServiceTypeClient, SubsystemRequestParams, SubsystemTagsRequestParams, TemperatureUnit, airQualityClient, classifiersClient, clientConfig, devicesClient, locationsClient, organizationsClient, projectsClient, robotCloudToken, robotcloudApi, roomClimeClient, roomConsumesClient, roomGuestStatusClient, serviceInstancesClient, subsystemsClient, usersClient };
323
+ declare class UsersClient {
324
+ getUser: (username: string) => Promise<AxiosResponse<RobotCloudUserDetails>>;
325
+ getUserProjects: (username: string) => Promise<AxiosResponse<RobotCloudUserProject[]>>;
326
+ }
327
+ declare const usersClient: UsersClient;
328
+
329
+ export { AirQuality1AlertEventValue, AirQuality1DataEventValue, type CheckTokenResponse, type Classifier, type ClassifierDetails, HistoricAggregateFunction, RegimState, RobotCloudClientConfig, RobotCloudDeviceDetails, type RobotCloudJWTPayload, RobotCloudNamedItem, RobotCloudOrganizationDetails, RobotCloudProject, RobotCloudProjectDetails, type RobotCloudServiceInstance, RobotCloudServiceType, RobotCloudServiceTypeDetails, RobotCloudUserDetails, RobotCloudUserProject, RobotCloudUserSimple, RoomClime1AlertEventValue, type RoomClime1Data, type RoomClimeAlertsKeys, RoomClimeClient, type RoomClimeConfigurationParams, RoomConsumes1AlertEventValue, type RoomConsumes1Data, type RoomGrouping1DataEventValue, type RoomGrouping1InstanceDeviceConfig, RoomGuestStatus1AlertEventValue, type RoomGuestStatus1Data, type RoomGuestStatusConfigurationParams, ServiceDataMeasurement, ServiceInstanceConfigClient, type ServiceInstanceDetails, type ServiceInstanceDeviceConfig, ServiceTypeClient, TemperatureUnit, airQualityClient, alertsClient, classifiersClient, clientConfig, devicesClient, locationsClient, organizationsClient, projectsClient, robotCloudToken, robotcloudApi, roomClimeClient, roomConsumesClient, roomGuestStatusClient, serviceInstancesClient, subsystemsClient, usersClient };