@etainabl/nodejs-sdk 1.3.89 → 1.3.91

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/index.d.cts CHANGED
@@ -7,7 +7,256 @@ import moment from 'moment';
7
7
  import { ZodObject } from 'zod';
8
8
  import OpenAI from 'openai';
9
9
 
10
- type UtilityType = 'electricity' | 'gas' | 'water' | 'waste' | 'solar' | 'heating' | 'flow' | 'cooling' | 'temperature' | 'oil' | 'co2' | 'humid' | 'lux' | 'noise' | 'occupancy' | 'pressure' | 'voc' | 'other';
10
+ declare const wasteCategories: readonly [{
11
+ readonly name: "General Waste";
12
+ readonly type: "EfW";
13
+ }, {
14
+ readonly name: "Food";
15
+ readonly type: "Compost";
16
+ }, {
17
+ readonly name: "Mixed Recyclables";
18
+ readonly type: "Recyclable";
19
+ }, {
20
+ readonly name: "WEEE";
21
+ readonly type: "EfW";
22
+ }, {
23
+ readonly name: "Batteries";
24
+ readonly type: "Recyclable";
25
+ }, {
26
+ readonly name: "Confi. Shredding";
27
+ readonly type: "EfW";
28
+ }, {
29
+ readonly name: "General bulky";
30
+ readonly type: "EfW";
31
+ }, {
32
+ readonly name: "Glass";
33
+ readonly type: "Recyclable";
34
+ }, {
35
+ readonly name: "Other";
36
+ readonly type: "N/A";
37
+ }, {
38
+ readonly name: "Wood";
39
+ readonly type: "Recyclable";
40
+ }, {
41
+ readonly name: "Metal";
42
+ readonly type: "Recyclable";
43
+ }, {
44
+ readonly name: "Furniture";
45
+ readonly type: "Recyclable";
46
+ }, {
47
+ readonly name: "Meals Donated";
48
+ readonly type: "N/A";
49
+ }];
50
+ declare const utilityTypes: readonly [{
51
+ readonly name: "Electricity";
52
+ readonly value: "electricity";
53
+ readonly icon: "fa-plug";
54
+ readonly color: "text-warning";
55
+ }, {
56
+ readonly name: "Gas";
57
+ readonly value: "gas";
58
+ readonly icon: "fa-fire-flame-simple";
59
+ readonly color: "text-danger";
60
+ }, {
61
+ readonly name: "Water";
62
+ readonly value: "water";
63
+ readonly icon: "fa-faucet";
64
+ readonly color: "text-info";
65
+ }, {
66
+ readonly name: "Waste";
67
+ readonly value: "waste";
68
+ readonly icon: "fa-dumpster";
69
+ readonly color: "text-primary";
70
+ }, {
71
+ readonly name: "Solar";
72
+ readonly value: "solar";
73
+ readonly icon: "fa-solar-panel";
74
+ readonly color: "text-success";
75
+ }, {
76
+ readonly name: "Heating";
77
+ readonly value: "heating";
78
+ readonly icon: "fa-heat";
79
+ readonly color: "text-warning";
80
+ }, {
81
+ readonly name: "Flow";
82
+ readonly value: "flow";
83
+ readonly icon: "fa-pipe-valve";
84
+ readonly color: "text-muted";
85
+ }, {
86
+ readonly name: "Cooling";
87
+ readonly value: "cooling";
88
+ readonly icon: "fa-fan";
89
+ readonly color: "text-info";
90
+ }, {
91
+ readonly name: "Temperature";
92
+ readonly value: "temperature";
93
+ readonly icon: "fa-thermometer-half";
94
+ readonly color: "text-warning";
95
+ }, {
96
+ readonly name: "Oil";
97
+ readonly value: "oil";
98
+ readonly icon: "fa-oil-can";
99
+ readonly color: "text-muted";
100
+ }, {
101
+ readonly name: "CO2";
102
+ readonly value: "co2";
103
+ readonly icon: "fa-leaf";
104
+ readonly color: "text-success";
105
+ }, {
106
+ readonly name: "Humidity";
107
+ readonly value: "humid";
108
+ readonly icon: "fa-tint";
109
+ readonly color: "text-info";
110
+ }, {
111
+ readonly name: "Light";
112
+ readonly value: "lux";
113
+ readonly icon: "fa-sun";
114
+ readonly color: "text-warning";
115
+ }, {
116
+ readonly name: "Noise";
117
+ readonly value: "noise";
118
+ readonly icon: "fa-volume-up";
119
+ readonly color: "text-primary";
120
+ }, {
121
+ readonly name: "Occupancy";
122
+ readonly value: "occupancy";
123
+ readonly icon: "fa-users";
124
+ readonly color: "text-danger";
125
+ }, {
126
+ readonly name: "Pressure";
127
+ readonly value: "pressure";
128
+ readonly icon: "fa-tachometer-alt";
129
+ readonly color: "text-info";
130
+ }, {
131
+ readonly name: "VOC";
132
+ readonly value: "voc";
133
+ readonly icon: "fa-wind";
134
+ readonly color: "text-muted";
135
+ }, {
136
+ readonly name: "Other";
137
+ readonly value: "other";
138
+ readonly icon: "fa-meter";
139
+ readonly color: "text-muted";
140
+ }];
141
+ declare const units$1: readonly [{
142
+ readonly name: "kWh";
143
+ readonly value: "kwh";
144
+ readonly types: readonly ["electricity", "gas", "solar", "heating", "cooling"];
145
+ readonly defaultTypes: readonly ["electricity", "gas", "solar", "heating", "cooling"];
146
+ }, {
147
+ readonly name: "m3 (Cubic Meters)";
148
+ readonly value: "m3";
149
+ readonly types: readonly ["gas", "water"];
150
+ readonly defaultTypes: readonly ["water"];
151
+ }, {
152
+ readonly name: "hcf (Hundred Cubic Feet)";
153
+ readonly value: "hcf";
154
+ readonly types: readonly ["gas"];
155
+ }, {
156
+ readonly name: "ft3 (Cubic Feet)";
157
+ readonly value: "ft3";
158
+ readonly types: readonly ["gas"];
159
+ }, {
160
+ readonly name: "mcuf (Thousands of Cubic Feet)";
161
+ readonly value: "mcuf";
162
+ readonly types: readonly ["gas"];
163
+ }, {
164
+ readonly name: "hcuf (Hundreds of Cubic Feet)";
165
+ readonly value: "hcuf";
166
+ readonly types: readonly ["gas"];
167
+ }, {
168
+ readonly name: "tcuf (Tens of Cubic Feet)";
169
+ readonly value: "tcuf";
170
+ readonly types: readonly ["gas"];
171
+ }, {
172
+ readonly name: "ocuf (One Cubic Foot)";
173
+ readonly value: "ocuf";
174
+ readonly types: readonly ["gas"];
175
+ }, {
176
+ readonly name: "hm3 (Hundreds of Cubic Metres)";
177
+ readonly value: "hm3";
178
+ readonly types: readonly ["gas"];
179
+ }, {
180
+ readonly name: "tm3 (Tens of Cubic Metres)";
181
+ readonly value: "tm3";
182
+ readonly types: readonly ["gas"];
183
+ }, {
184
+ readonly name: "nm3 (Tenths of Cubic Metres)";
185
+ readonly value: "nm3";
186
+ readonly types: readonly ["gas"];
187
+ }, {
188
+ readonly name: "kg (Kilograms)";
189
+ readonly value: "kg";
190
+ readonly types: readonly ["waste", "other"];
191
+ readonly defaultTypes: readonly ["waste"];
192
+ }, {
193
+ readonly name: "tonnes (Tonnes)";
194
+ readonly value: "tonnes";
195
+ readonly types: readonly ["waste", "other"];
196
+ }, {
197
+ readonly name: "lbs (Pounds)";
198
+ readonly value: "lbs";
199
+ readonly types: readonly ["waste", "other"];
200
+ }, {
201
+ readonly name: "Wh (Watt Hour)";
202
+ readonly value: "wh";
203
+ readonly types: readonly ["electricity", "heating", "cooling"];
204
+ }, {
205
+ readonly name: "MWh (Mega Watt Hour)";
206
+ readonly value: "mwh";
207
+ readonly types: readonly ["electricity", "heating", "cooling"];
208
+ }, {
209
+ readonly name: "qty (Quantity)";
210
+ readonly value: "qty";
211
+ readonly types: readonly ["other"];
212
+ }, {
213
+ readonly name: "l (Litres)";
214
+ readonly value: "l";
215
+ readonly types: readonly ["water", "oil"];
216
+ readonly defaultTypes: readonly ["oil"];
217
+ }, {
218
+ readonly name: "m3/h (Cubic Meters/hour)";
219
+ readonly value: "m3/h";
220
+ readonly types: readonly ["flow"];
221
+ readonly defaultTypes: readonly ["flow"];
222
+ }, {
223
+ readonly name: "C (Celcius)";
224
+ readonly value: "C";
225
+ readonly types: readonly ["temperature"];
226
+ readonly defaultTypes: readonly ["temperature"];
227
+ }, {
228
+ readonly name: "% (Percentage)";
229
+ readonly value: "%";
230
+ readonly types: readonly ["humidity"];
231
+ readonly defaultTypes: readonly ["humidity"];
232
+ }, {
233
+ readonly name: "lx (Lux)";
234
+ readonly value: "lux";
235
+ readonly types: readonly ["lux"];
236
+ readonly defaultTypes: readonly ["lux"];
237
+ }, {
238
+ readonly name: "ppm (Parts Per Million)";
239
+ readonly value: "ppm";
240
+ readonly types: readonly ["co2"];
241
+ readonly defaultTypes: readonly ["co2"];
242
+ }, {
243
+ readonly name: "db (Decibels)";
244
+ readonly value: "db";
245
+ readonly types: readonly ["noise"];
246
+ readonly defaultTypes: readonly ["noise"];
247
+ }, {
248
+ readonly name: "hPa (Hectopascals)";
249
+ readonly value: "hpa";
250
+ readonly types: readonly ["pressure"];
251
+ readonly defaultTypes: readonly ["pressure"];
252
+ }, {
253
+ readonly name: "VOC (Volatile Organic Compounds)";
254
+ readonly value: "voc";
255
+ readonly types: readonly ["voc"];
256
+ readonly defaultTypes: readonly ["voc"];
257
+ }];
258
+
259
+ type UtilityType = (typeof utilityTypes)[number]['value'];
11
260
 
12
261
  interface Item {
13
262
  units?: string | null;
@@ -59,8 +308,8 @@ interface StatusHistory {
59
308
  notes?: string;
60
309
  }
61
310
 
62
- type WasteCategories = 'General Waste' | 'Food' | 'Mixed Recyclables' | 'WEEE' | 'Batteries' | 'Confi. Shredding' | 'General bulky' | 'Glass' | 'Other' | 'Wood' | 'Metal' | 'Furniture' | 'Meals Donated';
63
- type WasteTypes = 'EfW' | 'Compost' | 'Recyclable' | 'N/A';
311
+ type WasteCategories = (typeof wasteCategories)[number]['name'];
312
+ type WasteTypes = (typeof wasteCategories)[number]['type'];
64
313
  interface PortalAccountSchema extends Portal {
65
314
  invoiceFilenames: any[];
66
315
  }
@@ -1136,16 +1385,12 @@ declare const automationServices: {
1136
1385
  category: AutomationServiceCategory;
1137
1386
  }[];
1138
1387
 
1139
- declare const wasteCategories: {
1140
- name: WasteCategories;
1141
- type: WasteTypes;
1142
- }[];
1143
-
1144
1388
  declare const index$1_automationServices: typeof automationServices;
1145
1389
  declare const index$1_automationSources: typeof automationSources;
1390
+ declare const index$1_utilityTypes: typeof utilityTypes;
1146
1391
  declare const index$1_wasteCategories: typeof wasteCategories;
1147
1392
  declare namespace index$1 {
1148
- export { index$1_automationServices as automationServices, index$1_automationSources as automationSources, index$1_wasteCategories as wasteCategories };
1393
+ export { index$1_automationServices as automationServices, index$1_automationSources as automationSources, units$1 as units, index$1_utilityTypes as utilityTypes, index$1_wasteCategories as wasteCategories };
1149
1394
  }
1150
1395
 
1151
1396
  interface ETNModel {
package/dist/index.d.ts CHANGED
@@ -7,7 +7,256 @@ import moment from 'moment';
7
7
  import { ZodObject } from 'zod';
8
8
  import OpenAI from 'openai';
9
9
 
10
- type UtilityType = 'electricity' | 'gas' | 'water' | 'waste' | 'solar' | 'heating' | 'flow' | 'cooling' | 'temperature' | 'oil' | 'co2' | 'humid' | 'lux' | 'noise' | 'occupancy' | 'pressure' | 'voc' | 'other';
10
+ declare const wasteCategories: readonly [{
11
+ readonly name: "General Waste";
12
+ readonly type: "EfW";
13
+ }, {
14
+ readonly name: "Food";
15
+ readonly type: "Compost";
16
+ }, {
17
+ readonly name: "Mixed Recyclables";
18
+ readonly type: "Recyclable";
19
+ }, {
20
+ readonly name: "WEEE";
21
+ readonly type: "EfW";
22
+ }, {
23
+ readonly name: "Batteries";
24
+ readonly type: "Recyclable";
25
+ }, {
26
+ readonly name: "Confi. Shredding";
27
+ readonly type: "EfW";
28
+ }, {
29
+ readonly name: "General bulky";
30
+ readonly type: "EfW";
31
+ }, {
32
+ readonly name: "Glass";
33
+ readonly type: "Recyclable";
34
+ }, {
35
+ readonly name: "Other";
36
+ readonly type: "N/A";
37
+ }, {
38
+ readonly name: "Wood";
39
+ readonly type: "Recyclable";
40
+ }, {
41
+ readonly name: "Metal";
42
+ readonly type: "Recyclable";
43
+ }, {
44
+ readonly name: "Furniture";
45
+ readonly type: "Recyclable";
46
+ }, {
47
+ readonly name: "Meals Donated";
48
+ readonly type: "N/A";
49
+ }];
50
+ declare const utilityTypes: readonly [{
51
+ readonly name: "Electricity";
52
+ readonly value: "electricity";
53
+ readonly icon: "fa-plug";
54
+ readonly color: "text-warning";
55
+ }, {
56
+ readonly name: "Gas";
57
+ readonly value: "gas";
58
+ readonly icon: "fa-fire-flame-simple";
59
+ readonly color: "text-danger";
60
+ }, {
61
+ readonly name: "Water";
62
+ readonly value: "water";
63
+ readonly icon: "fa-faucet";
64
+ readonly color: "text-info";
65
+ }, {
66
+ readonly name: "Waste";
67
+ readonly value: "waste";
68
+ readonly icon: "fa-dumpster";
69
+ readonly color: "text-primary";
70
+ }, {
71
+ readonly name: "Solar";
72
+ readonly value: "solar";
73
+ readonly icon: "fa-solar-panel";
74
+ readonly color: "text-success";
75
+ }, {
76
+ readonly name: "Heating";
77
+ readonly value: "heating";
78
+ readonly icon: "fa-heat";
79
+ readonly color: "text-warning";
80
+ }, {
81
+ readonly name: "Flow";
82
+ readonly value: "flow";
83
+ readonly icon: "fa-pipe-valve";
84
+ readonly color: "text-muted";
85
+ }, {
86
+ readonly name: "Cooling";
87
+ readonly value: "cooling";
88
+ readonly icon: "fa-fan";
89
+ readonly color: "text-info";
90
+ }, {
91
+ readonly name: "Temperature";
92
+ readonly value: "temperature";
93
+ readonly icon: "fa-thermometer-half";
94
+ readonly color: "text-warning";
95
+ }, {
96
+ readonly name: "Oil";
97
+ readonly value: "oil";
98
+ readonly icon: "fa-oil-can";
99
+ readonly color: "text-muted";
100
+ }, {
101
+ readonly name: "CO2";
102
+ readonly value: "co2";
103
+ readonly icon: "fa-leaf";
104
+ readonly color: "text-success";
105
+ }, {
106
+ readonly name: "Humidity";
107
+ readonly value: "humid";
108
+ readonly icon: "fa-tint";
109
+ readonly color: "text-info";
110
+ }, {
111
+ readonly name: "Light";
112
+ readonly value: "lux";
113
+ readonly icon: "fa-sun";
114
+ readonly color: "text-warning";
115
+ }, {
116
+ readonly name: "Noise";
117
+ readonly value: "noise";
118
+ readonly icon: "fa-volume-up";
119
+ readonly color: "text-primary";
120
+ }, {
121
+ readonly name: "Occupancy";
122
+ readonly value: "occupancy";
123
+ readonly icon: "fa-users";
124
+ readonly color: "text-danger";
125
+ }, {
126
+ readonly name: "Pressure";
127
+ readonly value: "pressure";
128
+ readonly icon: "fa-tachometer-alt";
129
+ readonly color: "text-info";
130
+ }, {
131
+ readonly name: "VOC";
132
+ readonly value: "voc";
133
+ readonly icon: "fa-wind";
134
+ readonly color: "text-muted";
135
+ }, {
136
+ readonly name: "Other";
137
+ readonly value: "other";
138
+ readonly icon: "fa-meter";
139
+ readonly color: "text-muted";
140
+ }];
141
+ declare const units$1: readonly [{
142
+ readonly name: "kWh";
143
+ readonly value: "kwh";
144
+ readonly types: readonly ["electricity", "gas", "solar", "heating", "cooling"];
145
+ readonly defaultTypes: readonly ["electricity", "gas", "solar", "heating", "cooling"];
146
+ }, {
147
+ readonly name: "m3 (Cubic Meters)";
148
+ readonly value: "m3";
149
+ readonly types: readonly ["gas", "water"];
150
+ readonly defaultTypes: readonly ["water"];
151
+ }, {
152
+ readonly name: "hcf (Hundred Cubic Feet)";
153
+ readonly value: "hcf";
154
+ readonly types: readonly ["gas"];
155
+ }, {
156
+ readonly name: "ft3 (Cubic Feet)";
157
+ readonly value: "ft3";
158
+ readonly types: readonly ["gas"];
159
+ }, {
160
+ readonly name: "mcuf (Thousands of Cubic Feet)";
161
+ readonly value: "mcuf";
162
+ readonly types: readonly ["gas"];
163
+ }, {
164
+ readonly name: "hcuf (Hundreds of Cubic Feet)";
165
+ readonly value: "hcuf";
166
+ readonly types: readonly ["gas"];
167
+ }, {
168
+ readonly name: "tcuf (Tens of Cubic Feet)";
169
+ readonly value: "tcuf";
170
+ readonly types: readonly ["gas"];
171
+ }, {
172
+ readonly name: "ocuf (One Cubic Foot)";
173
+ readonly value: "ocuf";
174
+ readonly types: readonly ["gas"];
175
+ }, {
176
+ readonly name: "hm3 (Hundreds of Cubic Metres)";
177
+ readonly value: "hm3";
178
+ readonly types: readonly ["gas"];
179
+ }, {
180
+ readonly name: "tm3 (Tens of Cubic Metres)";
181
+ readonly value: "tm3";
182
+ readonly types: readonly ["gas"];
183
+ }, {
184
+ readonly name: "nm3 (Tenths of Cubic Metres)";
185
+ readonly value: "nm3";
186
+ readonly types: readonly ["gas"];
187
+ }, {
188
+ readonly name: "kg (Kilograms)";
189
+ readonly value: "kg";
190
+ readonly types: readonly ["waste", "other"];
191
+ readonly defaultTypes: readonly ["waste"];
192
+ }, {
193
+ readonly name: "tonnes (Tonnes)";
194
+ readonly value: "tonnes";
195
+ readonly types: readonly ["waste", "other"];
196
+ }, {
197
+ readonly name: "lbs (Pounds)";
198
+ readonly value: "lbs";
199
+ readonly types: readonly ["waste", "other"];
200
+ }, {
201
+ readonly name: "Wh (Watt Hour)";
202
+ readonly value: "wh";
203
+ readonly types: readonly ["electricity", "heating", "cooling"];
204
+ }, {
205
+ readonly name: "MWh (Mega Watt Hour)";
206
+ readonly value: "mwh";
207
+ readonly types: readonly ["electricity", "heating", "cooling"];
208
+ }, {
209
+ readonly name: "qty (Quantity)";
210
+ readonly value: "qty";
211
+ readonly types: readonly ["other"];
212
+ }, {
213
+ readonly name: "l (Litres)";
214
+ readonly value: "l";
215
+ readonly types: readonly ["water", "oil"];
216
+ readonly defaultTypes: readonly ["oil"];
217
+ }, {
218
+ readonly name: "m3/h (Cubic Meters/hour)";
219
+ readonly value: "m3/h";
220
+ readonly types: readonly ["flow"];
221
+ readonly defaultTypes: readonly ["flow"];
222
+ }, {
223
+ readonly name: "C (Celcius)";
224
+ readonly value: "C";
225
+ readonly types: readonly ["temperature"];
226
+ readonly defaultTypes: readonly ["temperature"];
227
+ }, {
228
+ readonly name: "% (Percentage)";
229
+ readonly value: "%";
230
+ readonly types: readonly ["humidity"];
231
+ readonly defaultTypes: readonly ["humidity"];
232
+ }, {
233
+ readonly name: "lx (Lux)";
234
+ readonly value: "lux";
235
+ readonly types: readonly ["lux"];
236
+ readonly defaultTypes: readonly ["lux"];
237
+ }, {
238
+ readonly name: "ppm (Parts Per Million)";
239
+ readonly value: "ppm";
240
+ readonly types: readonly ["co2"];
241
+ readonly defaultTypes: readonly ["co2"];
242
+ }, {
243
+ readonly name: "db (Decibels)";
244
+ readonly value: "db";
245
+ readonly types: readonly ["noise"];
246
+ readonly defaultTypes: readonly ["noise"];
247
+ }, {
248
+ readonly name: "hPa (Hectopascals)";
249
+ readonly value: "hpa";
250
+ readonly types: readonly ["pressure"];
251
+ readonly defaultTypes: readonly ["pressure"];
252
+ }, {
253
+ readonly name: "VOC (Volatile Organic Compounds)";
254
+ readonly value: "voc";
255
+ readonly types: readonly ["voc"];
256
+ readonly defaultTypes: readonly ["voc"];
257
+ }];
258
+
259
+ type UtilityType = (typeof utilityTypes)[number]['value'];
11
260
 
12
261
  interface Item {
13
262
  units?: string | null;
@@ -59,8 +308,8 @@ interface StatusHistory {
59
308
  notes?: string;
60
309
  }
61
310
 
62
- type WasteCategories = 'General Waste' | 'Food' | 'Mixed Recyclables' | 'WEEE' | 'Batteries' | 'Confi. Shredding' | 'General bulky' | 'Glass' | 'Other' | 'Wood' | 'Metal' | 'Furniture' | 'Meals Donated';
63
- type WasteTypes = 'EfW' | 'Compost' | 'Recyclable' | 'N/A';
311
+ type WasteCategories = (typeof wasteCategories)[number]['name'];
312
+ type WasteTypes = (typeof wasteCategories)[number]['type'];
64
313
  interface PortalAccountSchema extends Portal {
65
314
  invoiceFilenames: any[];
66
315
  }
@@ -1136,16 +1385,12 @@ declare const automationServices: {
1136
1385
  category: AutomationServiceCategory;
1137
1386
  }[];
1138
1387
 
1139
- declare const wasteCategories: {
1140
- name: WasteCategories;
1141
- type: WasteTypes;
1142
- }[];
1143
-
1144
1388
  declare const index$1_automationServices: typeof automationServices;
1145
1389
  declare const index$1_automationSources: typeof automationSources;
1390
+ declare const index$1_utilityTypes: typeof utilityTypes;
1146
1391
  declare const index$1_wasteCategories: typeof wasteCategories;
1147
1392
  declare namespace index$1 {
1148
- export { index$1_automationServices as automationServices, index$1_automationSources as automationSources, index$1_wasteCategories as wasteCategories };
1393
+ export { index$1_automationServices as automationServices, index$1_automationSources as automationSources, units$1 as units, index$1_utilityTypes as utilityTypes, index$1_wasteCategories as wasteCategories };
1149
1394
  }
1150
1395
 
1151
1396
  interface ETNModel {
package/dist/index.js CHANGED
@@ -722,8 +722,8 @@ var convertItems = (items, type, defaultUnits, accountFactor) => {
722
722
  if (!baseUnit) throw new Error(`Account type ${type} is not supported`);
723
723
  const convertedItems = items.map((item) => {
724
724
  const factor = item.factor || accountFactor || 1;
725
- const units = item.units || item.unit || defaultUnits || baseUnit;
726
- const convertedValue = item.value * _getConversionFactor(units, baseUnit) * factor;
725
+ const units2 = item.units || item.unit || defaultUnits || baseUnit;
726
+ const convertedValue = item.value * _getConversionFactor(units2, baseUnit) * factor;
727
727
  return { ...item, value: convertedValue, units: baseUnit };
728
728
  });
729
729
  return convertedItems;
@@ -872,6 +872,8 @@ var utils_exports = {};
872
872
  __export(utils_exports, {
873
873
  automationServices: () => automationServices,
874
874
  automationSources: () => automationSources,
875
+ units: () => units,
876
+ utilityTypes: () => utilityTypes,
875
877
  wasteCategories: () => wasteCategories
876
878
  });
877
879
 
@@ -1111,6 +1113,54 @@ var wasteCategories = [
1111
1113
  { name: "Furniture", type: "Recyclable" },
1112
1114
  { name: "Meals Donated", type: "N/A" }
1113
1115
  ];
1116
+ var utilityTypes = [
1117
+ { name: "Electricity", value: "electricity", icon: "fa-plug", color: "text-warning" },
1118
+ { name: "Gas", value: "gas", icon: "fa-fire-flame-simple", color: "text-danger" },
1119
+ { name: "Water", value: "water", icon: "fa-faucet", color: "text-info" },
1120
+ { name: "Waste", value: "waste", icon: "fa-dumpster", color: "text-primary" },
1121
+ { name: "Solar", value: "solar", icon: "fa-solar-panel", color: "text-success" },
1122
+ { name: "Heating", value: "heating", icon: "fa-heat", color: "text-warning" },
1123
+ { name: "Flow", value: "flow", icon: "fa-pipe-valve", color: "text-muted" },
1124
+ { name: "Cooling", value: "cooling", icon: "fa-fan", color: "text-info" },
1125
+ { name: "Temperature", value: "temperature", icon: "fa-thermometer-half", color: "text-warning" },
1126
+ { name: "Oil", value: "oil", icon: "fa-oil-can", color: "text-muted" },
1127
+ { name: "CO2", value: "co2", icon: "fa-leaf", color: "text-success" },
1128
+ { name: "Humidity", value: "humid", icon: "fa-tint", color: "text-info" },
1129
+ { name: "Light", value: "lux", icon: "fa-sun", color: "text-warning" },
1130
+ { name: "Noise", value: "noise", icon: "fa-volume-up", color: "text-primary" },
1131
+ { name: "Occupancy", value: "occupancy", icon: "fa-users", color: "text-danger" },
1132
+ { name: "Pressure", value: "pressure", icon: "fa-tachometer-alt", color: "text-info" },
1133
+ { name: "VOC", value: "voc", icon: "fa-wind", color: "text-muted" },
1134
+ { name: "Other", value: "other", icon: "fa-meter", color: "text-muted" }
1135
+ ];
1136
+ var units = [
1137
+ { name: "kWh", value: "kwh", types: ["electricity", "gas", "solar", "heating", "cooling"], defaultTypes: ["electricity", "gas", "solar", "heating", "cooling"] },
1138
+ { name: "m3 (Cubic Meters)", value: "m3", types: ["gas", "water"], defaultTypes: ["water"] },
1139
+ { name: "hcf (Hundred Cubic Feet)", value: "hcf", types: ["gas"] },
1140
+ { name: "ft3 (Cubic Feet)", value: "ft3", types: ["gas"] },
1141
+ { name: "mcuf (Thousands of Cubic Feet)", value: "mcuf", types: ["gas"] },
1142
+ { name: "hcuf (Hundreds of Cubic Feet)", value: "hcuf", types: ["gas"] },
1143
+ { name: "tcuf (Tens of Cubic Feet)", value: "tcuf", types: ["gas"] },
1144
+ { name: "ocuf (One Cubic Foot)", value: "ocuf", types: ["gas"] },
1145
+ { name: "hm3 (Hundreds of Cubic Metres)", value: "hm3", types: ["gas"] },
1146
+ { name: "tm3 (Tens of Cubic Metres)", value: "tm3", types: ["gas"] },
1147
+ { name: "nm3 (Tenths of Cubic Metres)", value: "nm3", types: ["gas"] },
1148
+ { name: "kg (Kilograms)", value: "kg", types: ["waste", "other"], defaultTypes: ["waste"] },
1149
+ { name: "tonnes (Tonnes)", value: "tonnes", types: ["waste", "other"] },
1150
+ { name: "lbs (Pounds)", value: "lbs", types: ["waste", "other"] },
1151
+ { name: "Wh (Watt Hour)", value: "wh", types: ["electricity", "heating", "cooling"] },
1152
+ { name: "MWh (Mega Watt Hour)", value: "mwh", types: ["electricity", "heating", "cooling"] },
1153
+ { name: "qty (Quantity)", value: "qty", types: ["other"] },
1154
+ { name: "l (Litres)", value: "l", types: ["water", "oil"], defaultTypes: ["oil"] },
1155
+ { name: "m3/h (Cubic Meters/hour)", value: "m3/h", types: ["flow"], defaultTypes: ["flow"] },
1156
+ { name: "C (Celcius)", value: "C", types: ["temperature"], defaultTypes: ["temperature"] },
1157
+ { name: "% (Percentage)", value: "%", types: ["humidity"], defaultTypes: ["humidity"] },
1158
+ { name: "lx (Lux)", value: "lux", types: ["lux"], defaultTypes: ["lux"] },
1159
+ { name: "ppm (Parts Per Million)", value: "ppm", types: ["co2"], defaultTypes: ["co2"] },
1160
+ { name: "db (Decibels)", value: "db", types: ["noise"], defaultTypes: ["noise"] },
1161
+ { name: "hPa (Hectopascals)", value: "hpa", types: ["pressure"], defaultTypes: ["pressure"] },
1162
+ { name: "VOC (Volatile Organic Compounds)", value: "voc", types: ["voc"], defaultTypes: ["voc"] }
1163
+ ];
1114
1164
 
1115
1165
  // src/openai/index.ts
1116
1166
  var openai_exports = {};