@7365admin1/core 3.133.0 → 3.133.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.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/test/ounitech-api-2025-10.test.mjs +13 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.133.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 11ad275: Ounitech records: English words for the alerts robot 424 sends (205, 206, 588, 589, 593), an untranslated alert keeps its code in front, part names start with a capital, and "no station bound" reads as no base station instead of an error.
|
|
8
|
+
|
|
3
9
|
## 3.133.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -65178,7 +65178,12 @@ function ounitechTaskRecord(t, maps = [], tz = 480) {
|
|
|
65178
65178
|
};
|
|
65179
65179
|
}
|
|
65180
65180
|
var ALERT_WORDS = {
|
|
65181
|
+
"205": "Side brush driver offline",
|
|
65182
|
+
"206": "Button panel offline",
|
|
65181
65183
|
"540": "Floor check: cliff sensor switched on",
|
|
65184
|
+
"588": "Switched off with the power button",
|
|
65185
|
+
"589": "Switched off by the timed power schedule",
|
|
65186
|
+
"593": "Still finding its position - try again shortly",
|
|
65182
65187
|
"601": "Left wheel driver reset",
|
|
65183
65188
|
"620": "Right wheel driver offline",
|
|
65184
65189
|
"621": "Right wheel driver reset",
|
|
@@ -65199,7 +65204,8 @@ function ounitechAlertRecord(a, tz = 480) {
|
|
|
65199
65204
|
return {
|
|
65200
65205
|
code,
|
|
65201
65206
|
level: lv ? ALERT_LEVEL_WORDS[lv[1].trim()] ?? lv[1].trim() : null,
|
|
65202
|
-
|
|
65207
|
+
// An untranslated Chinese text keeps its code up front, so the row is never only Chinese.
|
|
65208
|
+
message: ALERT_WORDS[code] ?? (/[㐀-鿿]/.test(rest || raw) && code ? `Robot alert ${code}: ${rest || raw}` : rest || raw),
|
|
65203
65209
|
vendorText: rest || raw,
|
|
65204
65210
|
resolved,
|
|
65205
65211
|
at: ounitechTime(a.createTime, tz)
|
|
@@ -65309,11 +65315,12 @@ var PART_WORDS = {
|
|
|
65309
65315
|
floor_brush_double_roller_structure: "Floor brush rollers",
|
|
65310
65316
|
floor_mop_double_roller_structure: "Mop rollers"
|
|
65311
65317
|
};
|
|
65318
|
+
var upFirst = (t) => t.charAt(0).toUpperCase() + t.slice(1);
|
|
65312
65319
|
function ounitechConsumable(u) {
|
|
65313
65320
|
const code = String(u.unitcode ?? "").trim();
|
|
65314
65321
|
const minutes = num(u.workminutes);
|
|
65315
65322
|
return {
|
|
65316
|
-
part: PART_WORDS[code] ?? (code.replace(/_/g, " ") || String(u.unitname ?? "").trim() || "Part"),
|
|
65323
|
+
part: PART_WORDS[code] ?? upFirst(code.replace(/_/g, " ") || String(u.unitname ?? "").trim() || "Part"),
|
|
65317
65324
|
hours: minutes !== void 0 ? Math.round(minutes / 6) / 10 : null,
|
|
65318
65325
|
days: num(u.workdays) ?? null
|
|
65319
65326
|
};
|
|
@@ -65497,7 +65504,11 @@ function createOunitechAdapter(credentials, options) {
|
|
|
65497
65504
|
) : { items: [] };
|
|
65498
65505
|
const readings = await part(async () => ounitechReadings((await cloud.getRobotState(robotId)).properties));
|
|
65499
65506
|
const station = await part(async () => {
|
|
65500
|
-
const st = await cloud.getStationState(robotId)
|
|
65507
|
+
const st = await cloud.getStationState(robotId).catch((e) => {
|
|
65508
|
+
if (/no station bound|e=59/i.test(String(e?.message ?? "")))
|
|
65509
|
+
return null;
|
|
65510
|
+
throw e;
|
|
65511
|
+
});
|
|
65501
65512
|
return st ? [{ status: String(st.statusName ?? "").trim() || null, readings: ounitechReadings(st.properties, true) }] : [];
|
|
65502
65513
|
});
|
|
65503
65514
|
return { supported: true, readAt: now.toISOString(), tasks, alerts, consumables, power, lifts, readings, station };
|