@robotbas/robotcloud-client 0.3.2 → 0.3.3

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.
@@ -1,102 +1,106 @@
1
- /**
2
- *
3
- */
4
-
5
- import { MeasurementStatus } from "./services";
6
-
7
- /*
8
- * GENERIC REQUEST PARAMS INTERFACES
9
- */
10
-
11
- export interface SubsystemRequestParams {
12
- subsystem_id?: string;
13
- }
14
-
15
- export interface PaginableRequestParams {
16
- startIndex?: number;
17
- maxSize?: number;
18
- }
19
- export interface SortableListRequestParams {
20
- sort_by?: string; // Prefix the field name with '-' for descending order.
21
- }
22
-
23
- export interface SubsystemTagsRequestParams extends SubsystemRequestParams {
24
- tag_id?: string | string[];
25
- }
26
-
27
- export interface BaseFullPaginableRequestParams
28
- extends SubsystemTagsRequestParams,
29
- PaginableRequestParams { }
30
-
31
- /*
32
- * CONCRETE INTERFACES
33
- */
34
-
35
- export interface ProjectClassifiersRequestParams
36
- extends PaginableRequestParams { }
37
-
38
- export interface ProjectsRequestParams extends PaginableRequestParams {
39
- "organization-id": string;
40
- }
41
-
42
- export interface ProjectDetailsRequestParams { }
43
-
44
- export interface ProjectLocationsRequestParams
45
- extends BaseFullPaginableRequestParams { }
46
-
47
- export interface ServiceInstanceDataRequestParams { }
48
-
49
- export interface ProjectTagRequestParams extends PaginableRequestParams {
50
- parent_tag?: string;
51
- no_parent?: boolean;
52
- }
53
-
54
- export interface LocationServiceInstancesRequestParams
55
- extends BaseFullPaginableRequestParams { }
56
-
57
- export interface AlertLogsListRequestParams
58
- extends BaseFullPaginableRequestParams,
59
- SortableListRequestParams {
60
- location_id?: string;
61
- classifier_id?: string;
62
- service_name?: string;
63
- instance_id?: string;
64
- name?: string;
65
- active?: boolean;
66
- acknowledged?: boolean;
67
- ack_user?: string;
68
- active_time?: string;
69
- deactive_time?: string;
70
- ack_time?: string;
71
- }
72
- export interface AlertsProjectStatsRequestParams extends SubsystemRequestParams { }
73
- export interface AlertAggregatedLogsRequestParams extends SubsystemTagsRequestParams {
74
- location_id?: string;
75
- classifier_id?: string;
76
- service_name?: string;
77
- instance_id?: string;
78
- name?: string;
79
- periode: `${number}${'h' | 'd' | 'w' | 'm' | 'y'}`;
80
- offset?: string;
81
- time_range: string;
82
- }
83
- export interface ServiceInstancesRequestParams
84
- extends BaseFullPaginableRequestParams {
85
- id?: string;
86
- name?: string;
87
- location_id?: string;
88
- device_id?: string;
89
- }
90
-
91
- export interface ServiceDataRequestParams extends SubsystemTagsRequestParams { }
92
-
93
- export interface ServiceInstanceHistoricAggregateParams {
94
- offset?: string;
95
- property?: any[];
96
- maxSize?: number;
97
- }
98
- export interface ServiceInstanceHistoricParams {
99
- status?: MeasurementStatus;
100
- property?: any[];
101
- maxSize?: number;
102
- }
1
+ /**
2
+ *
3
+ */
4
+
5
+ import { MeasurementStatus } from "./services";
6
+
7
+ /*
8
+ * GENERIC REQUEST PARAMS INTERFACES
9
+ */
10
+
11
+ export interface SubsystemRequestParams {
12
+ subsystem_id?: string;
13
+ }
14
+
15
+ export interface PaginableRequestParams {
16
+ startIndex?: number;
17
+ maxSize?: number;
18
+ }
19
+ export interface SortableListRequestParams {
20
+ sort_by?: string; // Prefix the field name with '-' for descending order.
21
+ }
22
+
23
+ export interface SubsystemTagsRequestParams extends SubsystemRequestParams {
24
+ tag_id?: string | string[];
25
+ }
26
+
27
+ export interface BaseFullPaginableRequestParams
28
+ extends SubsystemTagsRequestParams,
29
+ PaginableRequestParams { }
30
+
31
+ /*
32
+ * CONCRETE INTERFACES
33
+ */
34
+
35
+ export interface ProjectClassifiersRequestParams
36
+ extends PaginableRequestParams { }
37
+
38
+ export interface ProjectsRequestParams extends PaginableRequestParams {
39
+ "organization-id": string;
40
+ }
41
+
42
+ export interface ProjectDetailsRequestParams { }
43
+
44
+ export interface ProjectLocationsRequestParams
45
+ extends BaseFullPaginableRequestParams { }
46
+
47
+ export interface ServiceInstanceDataRequestParams { }
48
+
49
+ export interface ServiceInstanceAlertRequestParams { }
50
+
51
+ export interface ProjectTagRequestParams extends PaginableRequestParams {
52
+ parent_tag?: string;
53
+ no_parent?: boolean;
54
+ }
55
+
56
+ export interface LocationServiceInstancesRequestParams
57
+ extends BaseFullPaginableRequestParams { }
58
+
59
+ export interface AlertLogsListRequestParams
60
+ extends BaseFullPaginableRequestParams,
61
+ SortableListRequestParams {
62
+ location_id?: string;
63
+ classifier_id?: string;
64
+ service_name?: string;
65
+ instance_id?: string;
66
+ name?: string;
67
+ active?: boolean;
68
+ acknowledged?: boolean;
69
+ ack_user?: string;
70
+ active_time?: string;
71
+ deactive_time?: string;
72
+ ack_time?: string;
73
+ }
74
+ export interface AlertsProjectStatsRequestParams extends SubsystemRequestParams { }
75
+ export interface AlertAggregatedLogsRequestParams extends SubsystemTagsRequestParams {
76
+ location_id?: string;
77
+ classifier_id?: string;
78
+ service_name?: string;
79
+ instance_id?: string;
80
+ name?: string;
81
+ periode: `${number}${'h' | 'd' | 'w' | 'm' | 'y'}`;
82
+ offset?: string;
83
+ time_range: string;
84
+ }
85
+ export interface ServiceInstancesRequestParams
86
+ extends BaseFullPaginableRequestParams {
87
+ id?: string;
88
+ name?: string;
89
+ location_id?: string;
90
+ device_id?: string;
91
+ }
92
+
93
+ export interface ServiceDataRequestParams extends SubsystemTagsRequestParams { }
94
+
95
+ export interface ServiceAlertRequestParams extends SubsystemTagsRequestParams { }
96
+
97
+ export interface ServiceInstanceHistoricAggregateParams {
98
+ offset?: string;
99
+ property?: any[];
100
+ maxSize?: number;
101
+ }
102
+ export interface ServiceInstanceHistoricParams {
103
+ status?: MeasurementStatus;
104
+ property?: any[];
105
+ maxSize?: number;
106
+ }
@@ -1,5 +1,30 @@
1
1
  import { RegimState, TemperatureUnit } from "./RobotCloudClient";
2
2
 
3
+ export interface AirHandlingUnitConfigurationParams {
4
+ air_quality_co2_set_point?: number,
5
+ cool_heat_order?: "COOL" | "HEAT" | "AUTO";
6
+ conf_on?: boolean,
7
+ humidity_set_point?: number,
8
+ impulsion_hysteresis?: number,
9
+ pressure_set_point?: number,
10
+ temperature_set_point?: number
11
+ }
12
+
13
+ export interface AirQualityConfigurationParams {
14
+ high_co2_limit?: number;
15
+ }
16
+
17
+ export interface ChillerHeatingPumpConfigurationParams {
18
+ conf_max_capacity: number,
19
+ conf_on: boolean,
20
+ conf_recovery_state: boolean,
21
+ conf_regim: "COOL" | "HEAT" | "AUTO" | "FROST",
22
+ cool_set_point: number,
23
+ frost_set_point: number,
24
+ heat_set_point: number,
25
+ recovery_set_point: number
26
+ }
27
+
3
28
  export interface RoomClimeConfigurationParams {
4
29
  temperature_set_point?: number;
5
30
  humidity_set_point?: number;
@@ -39,4 +64,13 @@ export interface RoomGroupingConfigurationParams {
39
64
  replica_3_active?: boolean;
40
65
  associate_clime?: boolean;
41
66
  associate_presence?: boolean;
67
+ }
68
+
69
+ export interface RoomConsumesConfigurationParams {
70
+ daily_energy_electric_limit: number;
71
+ daily_energy_thermal_limit: number;
72
+ daily_hot_water_limit: number;
73
+ daily_cold_water_limit: number;
74
+ co2_electric_coefficient: number;
75
+ co2_thermal_coefficient: number;
42
76
  }
@@ -1,6 +1,6 @@
1
1
  import { AxiosResponse } from "axios";
2
2
  import { ServiceInstanceRead } from "./ServiceInstanceRead";
3
- import { ServiceDataRequestParams, ServiceInstanceDataRequestParams, ServiceInstanceHistoricAggregateParams, ServiceInstanceHistoricParams } from "./request-params";
3
+ import { ServiceDataRequestParams, ServiceInstanceDataRequestParams, ServiceAlertRequestParams, ServiceInstanceAlertRequestParams, ServiceInstanceHistoricAggregateParams, ServiceInstanceHistoricParams } from "./request-params";
4
4
 
5
5
 
6
6
  export type MeasurementStatus =
@@ -12,6 +12,34 @@ export type MeasurementStatus =
12
12
  export interface ServiceDataMeasurement<T> extends ServiceInstanceRead<T> {
13
13
  status: MeasurementStatus;
14
14
  }
15
+ export interface AirHandlingUnit1AlertEventValue {
16
+ alarm_1: boolean,
17
+ alarm_2: boolean,
18
+ alarm_3: boolean,
19
+ alarm_4: boolean,
20
+ alarm_general: boolean
21
+ }
22
+
23
+ export interface AirHandlingUnit1DataEventValue {
24
+ cool_heat_state?: "COOL" | "HEAT" | "AUTO",
25
+ cool_heat_valve_state?: number,
26
+ heat_valve_state?: number,
27
+ impulsion_fan_speed?: number,
28
+ impulsion_fan_state?: boolean,
29
+ impulsion_flow?: number,
30
+ impulsion_set_point?: number,
31
+ impulsion_temperature?: number,
32
+ on?: boolean,
33
+ outdoor_air_damper_state?: number,
34
+ return_ambient_air_quality?: number,
35
+ return_ambient_co2?: number,
36
+ return_ambient_enthalpy?: number,
37
+ return_ambient_humidity?: number,
38
+ return_ambient_temperature?: number,
39
+ return_fan_speed?: number,
40
+ return_fan_state?: boolean,
41
+ return_flow?: number
42
+ }
15
43
 
16
44
  export interface AirQuality1DataEventValue {
17
45
  co2: number;
@@ -21,6 +49,39 @@ export interface AirQuality1AlertEventValue {
21
49
  high_co2: boolean;
22
50
  }
23
51
 
52
+ export interface ChillerHeatingPump1DataEventValue {
53
+ COP?: number,
54
+ capacity?: number,
55
+ compressor_state?: number,
56
+ condenser_impulsion_temperature?: number,
57
+ condenser_return_temperature?: number,
58
+ expansion_valve_position?: number,
59
+ flow_state?: boolean,
60
+ impulsion_temperature?: number,
61
+ max_capacity?: number,
62
+ on?: boolean,
63
+ recovery_impulsion_temperature?: number,
64
+ recovery_return_temperature?: number,
65
+ recovery_state?: boolean,
66
+ regim?: "COOL" | "HEAT" | "AUTO" | "FROST",
67
+ remote_state?: boolean,
68
+ return_temperature?: number
69
+ }
70
+
71
+ export interface ChillerHeatingPump1AlertEventValue {
72
+ alarm_1?: boolean;
73
+ alarm_2?: boolean;
74
+ alarm_3?: boolean;
75
+ alarm_4?: boolean;
76
+ alarm_5?: boolean;
77
+ alarm_6?: boolean;
78
+ alarm_7?: boolean;
79
+ alarm_8?: boolean;
80
+ alarm_9?: boolean;
81
+ alarm_10?: boolean;
82
+ alarm_general?: boolean;
83
+ }
84
+
24
85
  export interface RoomGuestStatus1AlertEventValue {
25
86
  door_open_overtime: boolean;
26
87
  window_open_overtime: boolean;
@@ -47,30 +108,53 @@ export type HistoricAggregateFunction =
47
108
  | "nmax"
48
109
  | "nmin";
49
110
 
50
-
111
+
51
112
  export interface ServiceInstanceConfigClient<T> {
52
113
  get(project_id: string, instance_id: string): Promise<AxiosResponse<T>>;
53
114
  put(project_id: string, instance_id: string, configuration: T): Promise<AxiosResponse<T>>;
54
115
  }
55
116
 
56
- export interface ServiceTypeClient<T_ALERTS, T_DATA> {
57
-
58
- get configuration(): ServiceInstanceConfigClient<any>;
59
- getAlerts(
60
- prjId: string,
61
- params?: ServiceDataRequestParams
62
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_ALERTS>[]>>;
117
+ export interface ServiceInstanceDataClient<T> {
118
+
119
+ /**
120
+ * Get data for a given project and instance
121
+ * @param prjId - The project ID
122
+ * @param instanceId - The instance ID
123
+ * @param params - The request parameters
124
+ * @returns A promise that resolves to the data
125
+ */
126
+ get(prjId: string, instanceId: string, params?: ServiceInstanceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<T>>>;
127
+
128
+ /**
129
+ * Get all data for a given project and service
130
+ * @param prjId - The project ID
131
+ * @param params - The request parameters
132
+ * @returns A promise that resolves to the data
133
+ */
134
+ getAll(prjId: string, params?: ServiceDataRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<T>[]>>;
135
+ }
63
136
 
64
- getData(
65
- prjId: string,
66
- params?: ServiceDataRequestParams
67
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
137
+ export interface ServiceInstanceAlertClient<T> {
138
+
139
+ /**
140
+ * Get Alert for a given project and instance
141
+ * @param prjId - The project ID
142
+ * @param instanceId - The instance ID
143
+ * @param params - The request parameters
144
+ * @returns A promise that resolves to the data
145
+ */
146
+ get(prjId: string, instanceId: string, params?: ServiceInstanceAlertRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<T>>>;
147
+
148
+ /**
149
+ * Get all alerts for a given project and service
150
+ * @param prjId - The project ID
151
+ * @param params - The request parameters
152
+ * @returns A promise that resolves to the data
153
+ */
154
+ getAll(prjId: string, params?: ServiceAlertRequestParams): Promise<AxiosResponse<ServiceDataMeasurement<T>[]>>;
155
+ }
68
156
 
69
- getInstanceData(
70
- prjId: string,
71
- instanceId: string,
72
- params?: ServiceInstanceDataRequestParams
73
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>>>;
157
+ export interface ServiceInstanceHistoricClient<T> {
74
158
 
75
159
  getInstanceHistoric(
76
160
  prjId: string,
@@ -78,7 +162,7 @@ export interface ServiceTypeClient<T_ALERTS, T_DATA> {
78
162
  startTime: Date,
79
163
  endTime: Date,
80
164
  params: ServiceInstanceHistoricParams
81
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
165
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T>[]>>;
82
166
 
83
167
  getInstanceHistoricAggregate(
84
168
  prjId: string,
@@ -88,5 +172,13 @@ export interface ServiceTypeClient<T_ALERTS, T_DATA> {
88
172
  aggFunction: HistoricAggregateFunction,
89
173
  periode: string,
90
174
  params: ServiceInstanceHistoricAggregateParams
91
- ): Promise<AxiosResponse<ServiceDataMeasurement<T_DATA>[]>>;
175
+ ): Promise<AxiosResponse<ServiceDataMeasurement<T>[]>>;
92
176
  }
177
+
178
+
179
+ export interface ServiceTypeClient<T_DATA, T_ALERTS, T_CONFIG> {
180
+ get configuration(): ServiceInstanceConfigClient<T_CONFIG>;
181
+ get data(): ServiceInstanceDataClient<T_DATA>;
182
+ get alert(): ServiceInstanceAlertClient<T_ALERTS>;
183
+ get historic(): ServiceInstanceHistoricClient<T_DATA>;
184
+ }