@robotbas/robotcloud-client 0.1.14 → 0.2.0
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/ProjectClassifer.d.ts +0 -6
- package/types/RobotCloudClient.d.ts +5 -35
- package/types/ServiceInstance.d.ts +1 -10
- package/types/request-params.d.ts +87 -0
- package/types/services.d.ts +68 -93
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { s as RobotCloudPermissionsHelper, r as robotCloudPermissionsHelper, q as tagsHelper } from '../index-NoveF7Iq.mjs';
|
|
2
2
|
import 'axios';
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { s as RobotCloudPermissionsHelper, r as robotCloudPermissionsHelper, q as tagsHelper } from '../index-NoveF7Iq.js';
|
|
2
2
|
import 'axios';
|
|
@@ -28,10 +28,14 @@ interface PaginableRequestParams {
|
|
|
28
28
|
maxSize?: number;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
interface
|
|
31
|
+
interface SubsystemTagsRequestParams extends SubsystemRequestParams {
|
|
32
32
|
tag_id?: string | string[];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
interface ProjectLocationsRequestParams extends SubsystemTagsRequestParams, PaginableRequestParams {
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
35
39
|
|
|
36
40
|
interface ServiceInstanceDataRequestParams {
|
|
37
41
|
|
|
@@ -175,4 +179,4 @@ declare const robotCloudPermissionsHelper: RobotCloudPermissionsHelper;
|
|
|
175
179
|
|
|
176
180
|
declare const tagsHelper: TagsHelper;
|
|
177
181
|
|
|
178
|
-
export { type AppAccessLevel as A, type FancoilSpeedState as F, type LocationServiceInstancesRequestParams as L, type OrganizationAccessLevel as O, type PaginableRequestParams as P, type RegimState as R, type SubsystemRequestParams as S, type TemperatureUnit as T, type
|
|
182
|
+
export { type AppAccessLevel as A, type FancoilSpeedState as F, type LocationServiceInstancesRequestParams as L, type OrganizationAccessLevel as O, type PaginableRequestParams as P, type RegimState as R, type SubsystemRequestParams as S, type TemperatureUnit as T, type SubsystemTagsRequestParams as a, type ServiceInstanceDataRequestParams as b, type RoomClime1AlertEventValue as c, type RoomConsumes1AlertEventValue as d, type RobotCloudDeviceDetails as e, type RobotCloudNamedItem as f, type RobotCloudServiceType as g, type ProjectLocationsRequestParams as h, type ProjectRequestParams as i, type RobotCloudProject as j, type ProjectDetailsRequestParams as k, type RobotCloudProjectDetails as l, type RobotCloudServiceTypeDetails as m, type RobotCloudUserDetails as n, type RobotCloudUserProject as o, type RobotCloudOrganizationDetails as p, tagsHelper as q, robotCloudPermissionsHelper as r, type RobotCloudPermissionsHelper as s, tagsClient as t, type ProjectTagTreeNode as u, type ProjectTagsTree as v, type ProjectTag as w, type ProjectAccessLevel as x, type ProjectTagRequestParams as y, type RobotCloudUserAppAccess as z };
|
|
@@ -28,10 +28,14 @@ interface PaginableRequestParams {
|
|
|
28
28
|
maxSize?: number;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
interface
|
|
31
|
+
interface SubsystemTagsRequestParams extends SubsystemRequestParams {
|
|
32
32
|
tag_id?: string | string[];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
interface ProjectLocationsRequestParams extends SubsystemTagsRequestParams, PaginableRequestParams {
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
35
39
|
|
|
36
40
|
interface ServiceInstanceDataRequestParams {
|
|
37
41
|
|
|
@@ -175,4 +179,4 @@ declare const robotCloudPermissionsHelper: RobotCloudPermissionsHelper;
|
|
|
175
179
|
|
|
176
180
|
declare const tagsHelper: TagsHelper;
|
|
177
181
|
|
|
178
|
-
export { type AppAccessLevel as A, type FancoilSpeedState as F, type LocationServiceInstancesRequestParams as L, type OrganizationAccessLevel as O, type PaginableRequestParams as P, type RegimState as R, type SubsystemRequestParams as S, type TemperatureUnit as T, type
|
|
182
|
+
export { type AppAccessLevel as A, type FancoilSpeedState as F, type LocationServiceInstancesRequestParams as L, type OrganizationAccessLevel as O, type PaginableRequestParams as P, type RegimState as R, type SubsystemRequestParams as S, type TemperatureUnit as T, type SubsystemTagsRequestParams as a, type ServiceInstanceDataRequestParams as b, type RoomClime1AlertEventValue as c, type RoomConsumes1AlertEventValue as d, type RobotCloudDeviceDetails as e, type RobotCloudNamedItem as f, type RobotCloudServiceType as g, type ProjectLocationsRequestParams as h, type ProjectRequestParams as i, type RobotCloudProject as j, type ProjectDetailsRequestParams as k, type RobotCloudProjectDetails as l, type RobotCloudServiceTypeDetails as m, type RobotCloudUserDetails as n, type RobotCloudUserProject as o, type RobotCloudOrganizationDetails as p, tagsHelper as q, robotCloudPermissionsHelper as r, type RobotCloudPermissionsHelper as s, tagsClient as t, type ProjectTagTreeNode as u, type ProjectTagsTree as v, type ProjectTag as w, type ProjectAccessLevel as x, type ProjectTagRequestParams as y, type RobotCloudUserAppAccess 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 ServiceInstanceDataRequestParams, R as RegimState, T as TemperatureUnit,
|
|
4
|
-
export { A as AppAccessLevel, F as FancoilSpeedState, O as OrganizationAccessLevel,
|
|
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';
|
|
5
5
|
|
|
6
6
|
declare const robotcloudApi: axios.AxiosInstance;
|
|
7
7
|
|
|
@@ -53,42 +53,44 @@ interface ServiceInstanceRead<T> {
|
|
|
53
53
|
value: T;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
type MeasurementStatus =
|
|
56
|
+
type MeasurementStatus =
|
|
57
|
+
| "GOOD"
|
|
58
|
+
| "NOT_MEASURED"
|
|
59
|
+
| "INVALID_VALUE"
|
|
60
|
+
| "DEVICE_ERROR";
|
|
57
61
|
|
|
58
62
|
interface ServiceDataMeasurement<T> extends ServiceInstanceRead<T> {
|
|
59
|
-
|
|
63
|
+
status: MeasurementStatus;
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
interface ServiceDataRequestParams extends SubsystemRequestParams {
|
|
63
|
-
|
|
67
|
+
tag_id?: string | string[];
|
|
64
68
|
}
|
|
65
69
|
interface ServiceInstanceHistoricAggregateParams {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
+
offset?: string;
|
|
71
|
+
property?: any[];
|
|
72
|
+
maxSize?: number;
|
|
73
|
+
}
|
|
70
74
|
interface ServiceInstanceHistoricParams {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
+
status?: MeasurementStatus;
|
|
76
|
+
property?: any[];
|
|
77
|
+
maxSize?: number;
|
|
78
|
+
}
|
|
75
79
|
|
|
76
80
|
interface AirQuality1DataEventValue {
|
|
77
|
-
|
|
81
|
+
co2: number;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
interface AirQuality1AlertEventValue {
|
|
81
|
-
|
|
85
|
+
high_co2: boolean;
|
|
82
86
|
}
|
|
83
87
|
|
|
84
|
-
|
|
85
88
|
interface RoomGuestStatus1AlertEventValue {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
door_open_overtime: boolean;
|
|
90
|
+
window_open_overtime: boolean;
|
|
91
|
+
medical_alarm: boolean;
|
|
89
92
|
}
|
|
90
93
|
|
|
91
|
-
|
|
92
94
|
////
|
|
93
95
|
// Alert status interfaces
|
|
94
96
|
////
|
|
@@ -108,63 +110,86 @@ interface ServiceTypeAlertStatus {
|
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
interface ServiceTypeAlertStatusClient<T extends string> {
|
|
111
|
-
getAll(
|
|
112
|
-
|
|
113
|
-
|
|
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>>>;
|
|
114
126
|
}
|
|
115
127
|
|
|
116
128
|
////
|
|
117
129
|
// Generic interface types
|
|
118
130
|
////
|
|
119
131
|
|
|
120
|
-
type HistoricAggregateFunction =
|
|
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";
|
|
121
146
|
|
|
122
147
|
interface ServiceTypeClient<T_ALERTS, T_DATA, T_CONFIG> {
|
|
123
|
-
get alertStatus(): ServiceTypeAlertStatusClient<any>;
|
|
148
|
+
get alertStatus(): ServiceTypeAlertStatusClient<any>;
|
|
124
149
|
getAlerts(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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>[]>>;
|
|
168
193
|
}
|
|
169
194
|
|
|
170
195
|
interface RoomClime1Data {
|
|
@@ -269,7 +294,7 @@ interface RoomGuestStatusConfigurationParams {
|
|
|
269
294
|
declare class GenericAlertStatusClient<T extends string> implements ServiceTypeAlertStatusClient<T> {
|
|
270
295
|
private readonly serviceName;
|
|
271
296
|
constructor(serviceName: string);
|
|
272
|
-
getAll(projectId: string): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>[]>>;
|
|
297
|
+
getAll(projectId: string, params?: SubsystemTagsRequestParams): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>[]>>;
|
|
273
298
|
get(projectId: string, instanceId: string): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
|
|
274
299
|
put(projectId: string, instanceId: string, status: Record<T, boolean>): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
|
|
275
300
|
}
|
|
@@ -416,4 +441,4 @@ declare class OrganizationsClient {
|
|
|
416
441
|
}
|
|
417
442
|
declare const organizationsClient: OrganizationsClient;
|
|
418
443
|
|
|
419
|
-
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, TemperatureUnit, airQualityClient, classifiersClient, clientConfig, devicesClient, locationsClient, organizationsClient, projectsClient, robotCloudToken, robotcloudApi, roomClimeClient, roomConsumesClient, roomGuestStatusClient, serviceInstancesClient, subsystemsClient, usersClient };
|
|
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 };
|
package/dist/index.d.ts
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 ServiceInstanceDataRequestParams, R as RegimState, T as TemperatureUnit,
|
|
4
|
-
export { A as AppAccessLevel, F as FancoilSpeedState, O as OrganizationAccessLevel,
|
|
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.js';
|
|
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.js';
|
|
5
5
|
|
|
6
6
|
declare const robotcloudApi: axios.AxiosInstance;
|
|
7
7
|
|
|
@@ -53,42 +53,44 @@ interface ServiceInstanceRead<T> {
|
|
|
53
53
|
value: T;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
type MeasurementStatus =
|
|
56
|
+
type MeasurementStatus =
|
|
57
|
+
| "GOOD"
|
|
58
|
+
| "NOT_MEASURED"
|
|
59
|
+
| "INVALID_VALUE"
|
|
60
|
+
| "DEVICE_ERROR";
|
|
57
61
|
|
|
58
62
|
interface ServiceDataMeasurement<T> extends ServiceInstanceRead<T> {
|
|
59
|
-
|
|
63
|
+
status: MeasurementStatus;
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
interface ServiceDataRequestParams extends SubsystemRequestParams {
|
|
63
|
-
|
|
67
|
+
tag_id?: string | string[];
|
|
64
68
|
}
|
|
65
69
|
interface ServiceInstanceHistoricAggregateParams {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
+
offset?: string;
|
|
71
|
+
property?: any[];
|
|
72
|
+
maxSize?: number;
|
|
73
|
+
}
|
|
70
74
|
interface ServiceInstanceHistoricParams {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
+
status?: MeasurementStatus;
|
|
76
|
+
property?: any[];
|
|
77
|
+
maxSize?: number;
|
|
78
|
+
}
|
|
75
79
|
|
|
76
80
|
interface AirQuality1DataEventValue {
|
|
77
|
-
|
|
81
|
+
co2: number;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
interface AirQuality1AlertEventValue {
|
|
81
|
-
|
|
85
|
+
high_co2: boolean;
|
|
82
86
|
}
|
|
83
87
|
|
|
84
|
-
|
|
85
88
|
interface RoomGuestStatus1AlertEventValue {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
door_open_overtime: boolean;
|
|
90
|
+
window_open_overtime: boolean;
|
|
91
|
+
medical_alarm: boolean;
|
|
89
92
|
}
|
|
90
93
|
|
|
91
|
-
|
|
92
94
|
////
|
|
93
95
|
// Alert status interfaces
|
|
94
96
|
////
|
|
@@ -108,63 +110,86 @@ interface ServiceTypeAlertStatus {
|
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
interface ServiceTypeAlertStatusClient<T extends string> {
|
|
111
|
-
getAll(
|
|
112
|
-
|
|
113
|
-
|
|
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>>>;
|
|
114
126
|
}
|
|
115
127
|
|
|
116
128
|
////
|
|
117
129
|
// Generic interface types
|
|
118
130
|
////
|
|
119
131
|
|
|
120
|
-
type HistoricAggregateFunction =
|
|
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";
|
|
121
146
|
|
|
122
147
|
interface ServiceTypeClient<T_ALERTS, T_DATA, T_CONFIG> {
|
|
123
|
-
get alertStatus(): ServiceTypeAlertStatusClient<any>;
|
|
148
|
+
get alertStatus(): ServiceTypeAlertStatusClient<any>;
|
|
124
149
|
getAlerts(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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>[]>>;
|
|
168
193
|
}
|
|
169
194
|
|
|
170
195
|
interface RoomClime1Data {
|
|
@@ -269,7 +294,7 @@ interface RoomGuestStatusConfigurationParams {
|
|
|
269
294
|
declare class GenericAlertStatusClient<T extends string> implements ServiceTypeAlertStatusClient<T> {
|
|
270
295
|
private readonly serviceName;
|
|
271
296
|
constructor(serviceName: string);
|
|
272
|
-
getAll(projectId: string): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>[]>>;
|
|
297
|
+
getAll(projectId: string, params?: SubsystemTagsRequestParams): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>[]>>;
|
|
273
298
|
get(projectId: string, instanceId: string): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
|
|
274
299
|
put(projectId: string, instanceId: string, status: Record<T, boolean>): Promise<AxiosResponse<ServiceTypeAlertStatusResponse<T>>>;
|
|
275
300
|
}
|
|
@@ -416,4 +441,4 @@ declare class OrganizationsClient {
|
|
|
416
441
|
}
|
|
417
442
|
declare const organizationsClient: OrganizationsClient;
|
|
418
443
|
|
|
419
|
-
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, TemperatureUnit, airQualityClient, classifiersClient, clientConfig, devicesClient, locationsClient, organizationsClient, projectsClient, robotCloudToken, robotcloudApi, roomClimeClient, roomConsumesClient, roomGuestStatusClient, serviceInstancesClient, subsystemsClient, usersClient };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -195,9 +195,12 @@ var GenericAlertStatusClient = class {
|
|
|
195
195
|
constructor(serviceName) {
|
|
196
196
|
this.serviceName = serviceName;
|
|
197
197
|
}
|
|
198
|
-
getAll(projectId) {
|
|
198
|
+
getAll(projectId, params) {
|
|
199
199
|
return robotCloudApi_default.get(
|
|
200
|
-
`/projects/${projectId}/services/${this.serviceName}/alertstatus
|
|
200
|
+
`/projects/${projectId}/services/${this.serviceName}/alertstatus`,
|
|
201
|
+
{
|
|
202
|
+
params
|
|
203
|
+
}
|
|
201
204
|
);
|
|
202
205
|
}
|
|
203
206
|
get(projectId, instanceId) {
|