@camstack/addon-provider-bosch 0.1.14 → 0.1.16
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/{account-integration-offline-jniFa10l.mjs → account-integration-offline-ASUhiSjp.mjs} +1 -1
- package/dist/{account-integration-offline-Bk-vELSf.js → account-integration-offline-BTvqsjjH.js} +1 -1
- package/dist/{dist-CPBdrxct.js → dist-BUFPeAeI.js} +237 -61
- package/dist/{dist-CWDKl4Cl.mjs → dist-PdvgOyAy.mjs} +237 -61
- package/dist/home-connect/addon.js +63 -6
- package/dist/home-connect/addon.mjs +63 -6
- package/dist/homecom/addon.js +3 -3
- package/dist/homecom/addon.mjs +3 -3
- package/dist/shc/addon.js +1 -1
- package/dist/shc/addon.mjs +1 -1
- package/i18n/en.json +2 -2
- package/i18n/it.json +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as object, C as defineCustomActions, D as array, E as _enum, F as EventCategory, M as string, N as union, O as literal, P as unknown, S as customAction, T as isSecretMarkerLike, a as binaryCapability, b as errMsg, c as deviceAdoptionCapability, d as eventEmitterCapability, j as record, l as dishwasherCapability, m as powerMeterCapability, n as BaseDeviceProvider, p as numericSensorCapability, r as DishwasherOperationStateSchema, s as connectionTestCapability, t as BaseDevice, u as enumSensorCapability, v as DeviceRole, w as isSecretMarker, x as createEvent, y as DeviceType } from "../dist-
|
|
2
|
-
import { n as cascadeRemoveDevicesForIntegration, r as parseOAuthCallback, t as setIntegrationDevicesOnline } from "../account-integration-offline-
|
|
1
|
+
import { A as object, C as defineCustomActions, D as array, E as _enum, F as EventCategory, M as string, N as union, O as literal, P as unknown, S as customAction, T as isSecretMarkerLike, a as binaryCapability, b as errMsg, c as deviceAdoptionCapability, d as eventEmitterCapability, j as record, l as dishwasherCapability, m as powerMeterCapability, n as BaseDeviceProvider, p as numericSensorCapability, r as DishwasherOperationStateSchema, s as connectionTestCapability, t as BaseDevice, u as enumSensorCapability, v as DeviceRole, w as isSecretMarker, x as createEvent, y as DeviceType } from "../dist-PdvgOyAy.mjs";
|
|
2
|
+
import { n as cascadeRemoveDevicesForIntegration, r as parseOAuthCallback, t as setIntegrationDevicesOnline } from "../account-integration-offline-ASUhiSjp.mjs";
|
|
3
3
|
import { createHash, randomBytes } from "node:crypto";
|
|
4
4
|
import { connect } from "node:tls";
|
|
5
5
|
import { inflateRawSync } from "node:zlib";
|
|
@@ -1399,7 +1399,7 @@ function buildHomeConnectFormSchema() {
|
|
|
1399
1399
|
id: "gateway",
|
|
1400
1400
|
title: "Home Connect",
|
|
1401
1401
|
titleKey: "provider-bosch:home-connect.s_gateway.title",
|
|
1402
|
-
description: "
|
|
1402
|
+
description: "Open the login link, sign in, then paste the address the browser stops on (hcauth://auth/prod?code=…). Chrome: DevTools > Network > last redirect > Location.",
|
|
1403
1403
|
descriptionKey: "provider-bosch:home-connect.s_gateway.description",
|
|
1404
1404
|
columns: 1,
|
|
1405
1405
|
fields: [
|
|
@@ -3784,6 +3784,16 @@ function consumableFromEvents(view, nearlyEmpty, empty) {
|
|
|
3784
3784
|
if (gone.includes(false) || nearly.includes(false)) return "ok";
|
|
3785
3785
|
return null;
|
|
3786
3786
|
}
|
|
3787
|
+
/** Any listed reminder raised → `true`; else any reading clear → `false`; none reported → `null`. */
|
|
3788
|
+
function reminderDue(view, shortNames) {
|
|
3789
|
+
const states = eventStates(view, shortNames);
|
|
3790
|
+
if (states.includes(true)) return true;
|
|
3791
|
+
return states.includes(false) ? false : null;
|
|
3792
|
+
}
|
|
3793
|
+
/** A non-negative whole count, or `null`. */
|
|
3794
|
+
function countOf(raw) {
|
|
3795
|
+
return typeof raw === "number" && Number.isInteger(raw) && raw >= 0 ? raw : null;
|
|
3796
|
+
}
|
|
3787
3797
|
function programKey(raw) {
|
|
3788
3798
|
return stringOf(raw);
|
|
3789
3799
|
}
|
|
@@ -3817,6 +3827,9 @@ var COLD_DISHWASHER_STATUS = {
|
|
|
3817
3827
|
powerState: null,
|
|
3818
3828
|
saltLevel: null,
|
|
3819
3829
|
rinseAidLevel: null,
|
|
3830
|
+
filterCleaningDue: null,
|
|
3831
|
+
machineCareDue: null,
|
|
3832
|
+
machineCareRemainingRuns: null,
|
|
3820
3833
|
halfLoad: null,
|
|
3821
3834
|
hygienePlus: null,
|
|
3822
3835
|
extraDry: null,
|
|
@@ -3873,6 +3886,13 @@ function dishwasherStatusFromFeatures(input) {
|
|
|
3873
3886
|
powerState: powerRaw,
|
|
3874
3887
|
saltLevel: consumableFromEvents(input, ["SaltNearlyEmpty"], ["SaltEmpty", "SaltLack"]),
|
|
3875
3888
|
rinseAidLevel: consumableFromEvents(input, ["RinseAidNearlyEmpty"], ["RinseAidEmpty", "RinseAidLack"]),
|
|
3889
|
+
filterCleaningDue: reminderDue(input, [
|
|
3890
|
+
"SmartFilterCleaningReminder",
|
|
3891
|
+
"CheckFilterSystem",
|
|
3892
|
+
"MachineCareAndFilterCleaningReminder"
|
|
3893
|
+
]),
|
|
3894
|
+
machineCareDue: reminderDue(input, ["MachineCareReminder", "MachineCareAndFilterCleaningReminder"]),
|
|
3895
|
+
machineCareRemainingRuns: countOf(valueOf(input, findEntity(description, ["status"], ["RemainingProgramRuns"]))),
|
|
3876
3896
|
halfLoad: optionBool(input, ["HalfLoad"]),
|
|
3877
3897
|
hygienePlus: optionBool(input, ["HygienePlus"]),
|
|
3878
3898
|
extraDry: optionBool(input, ["ExtraDry"]),
|
|
@@ -4218,7 +4238,7 @@ var LEGACY_CHILD_KEYS = {
|
|
|
4218
4238
|
role: DeviceRole.NumericSensor
|
|
4219
4239
|
},
|
|
4220
4240
|
"remote-control-level": {
|
|
4221
|
-
key: "BSH.Common.
|
|
4241
|
+
key: "BSH.Common.Setting.RemoteControlLevel",
|
|
4222
4242
|
cap: "enum-sensor",
|
|
4223
4243
|
role: DeviceRole.EnumSensor
|
|
4224
4244
|
},
|
|
@@ -4244,6 +4264,28 @@ var LEGACY_CHILD_KEYS = {
|
|
|
4244
4264
|
}
|
|
4245
4265
|
};
|
|
4246
4266
|
/**
|
|
4267
|
+
* Keys the old fixed catalog guessed WRONG and persisted, mapped to the key the appliance really
|
|
4268
|
+
* lists. The remote-control level is a SETTING; the catalog filed it as a status, so a container
|
|
4269
|
+
* saved then carries `remote-control-level` on a key no description has, next to the derived
|
|
4270
|
+
* child the real key produced — one label, two devices.
|
|
4271
|
+
*/
|
|
4272
|
+
var SUPERSEDED_LEGACY_KEYS = { "BSH.Common.Status.RemoteControlLevel": "BSH.Common.Setting.RemoteControlLevel" };
|
|
4273
|
+
/**
|
|
4274
|
+
* A persisted binding with a superseded legacy key re-pointed at the real one (same suffix, so
|
|
4275
|
+
* the same device); every other binding unchanged.
|
|
4276
|
+
*/
|
|
4277
|
+
function withCurrentLegacyKey(binding) {
|
|
4278
|
+
const current = SUPERSEDED_LEGACY_KEYS[binding.key];
|
|
4279
|
+
return current === void 0 ? binding : {
|
|
4280
|
+
...binding,
|
|
4281
|
+
key: current
|
|
4282
|
+
};
|
|
4283
|
+
}
|
|
4284
|
+
/** Whether a suffix is the one a key would derive — i.e. not an identity inherited from the old catalog. */
|
|
4285
|
+
function isDerivedSuffix(binding) {
|
|
4286
|
+
return binding.stableIdSuffix === slugFeatureKey(binding.key);
|
|
4287
|
+
}
|
|
4288
|
+
/**
|
|
4247
4289
|
* The bindings that keep a container's EXISTING children alive until its description has been
|
|
4248
4290
|
* read once: a container saved with the old fixed `children` list has no `entities` yet, and a
|
|
4249
4291
|
* spec without those children would make the kernel delete them (removal by absence) before any
|
|
@@ -4287,6 +4329,20 @@ function keysMissingFromDescription(persisted, description) {
|
|
|
4287
4329
|
return new Set(persisted.filter((b) => !isSyntheticKey(b.key) && description.entityByName(b.key) === void 0).map((b) => b.key));
|
|
4288
4330
|
}
|
|
4289
4331
|
/**
|
|
4332
|
+
* One row per Home Connect key. Two rows on one key are one entity filed twice (an identity from
|
|
4333
|
+
* the old catalog and the one derivation gave it): the older identity — the suffix that is NOT
|
|
4334
|
+
* the key's own slug — is the device the operator already has, so it stays and the twin leaves
|
|
4335
|
+
* (the kernel removes a child its spec no longer lists).
|
|
4336
|
+
*/
|
|
4337
|
+
function oneRowPerKey(rows) {
|
|
4338
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
4339
|
+
for (const row of rows) {
|
|
4340
|
+
const held = byKey.get(row.key);
|
|
4341
|
+
if (held === void 0 || isDerivedSuffix(held) && !isDerivedSuffix(row)) byKey.set(row.key, row);
|
|
4342
|
+
}
|
|
4343
|
+
return [...byKey.values()];
|
|
4344
|
+
}
|
|
4345
|
+
/**
|
|
4290
4346
|
* The bindings a container should carry: what the description derives now, plus what it
|
|
4291
4347
|
* already had. A child leaves only when its entity is missing from TWO agreeing reads (D49):
|
|
4292
4348
|
* `missingBefore` is what the previous read lacked — one description that omits an entity is
|
|
@@ -4295,10 +4351,11 @@ function keysMissingFromDescription(persisted, description) {
|
|
|
4295
4351
|
* derived model (legacy children) keeps its device ids instead of being rebuilt.
|
|
4296
4352
|
*/
|
|
4297
4353
|
function mergeChildBindings(persisted, derived, description, missingBefore = /* @__PURE__ */ new Set()) {
|
|
4298
|
-
const
|
|
4354
|
+
const rows = oneRowPerKey(persisted.map(withCurrentLegacyKey));
|
|
4355
|
+
const missingNow = keysMissingFromDescription(rows, description);
|
|
4299
4356
|
const out = /* @__PURE__ */ new Map();
|
|
4300
4357
|
const suffixByKey = /* @__PURE__ */ new Map();
|
|
4301
|
-
for (const kept of
|
|
4358
|
+
for (const kept of rows) {
|
|
4302
4359
|
if (missingNow.has(kept.key) && missingBefore.has(kept.key)) continue;
|
|
4303
4360
|
out.set(kept.stableIdSuffix, kept);
|
|
4304
4361
|
suffixByKey.set(kept.key, kept);
|
package/dist/homecom/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("../dist-
|
|
3
|
-
const require_account_integration_offline = require("../account-integration-offline-
|
|
2
|
+
const require_dist = require("../dist-BUFPeAeI.js");
|
|
3
|
+
const require_account_integration_offline = require("../account-integration-offline-BTvqsjjH.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
//#region src/homecom/custom-actions.ts
|
|
6
6
|
var homeComActions = require_dist.defineCustomActions({
|
|
@@ -187,7 +187,7 @@ function buildHomeComFormSchema() {
|
|
|
187
187
|
id: "account",
|
|
188
188
|
title: "HomeCom account",
|
|
189
189
|
titleKey: "provider-bosch:homecom.s_account.title",
|
|
190
|
-
description: "
|
|
190
|
+
description: "Sign in with your SingleKey ID, then paste the address the browser stops on (com.bosch.tt.dashtt.pointt://app/login?code=…). Find it in DevTools > Network.",
|
|
191
191
|
descriptionKey: "provider-bosch:homecom.s_account.description",
|
|
192
192
|
columns: 1,
|
|
193
193
|
fields: [
|
package/dist/homecom/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as object, C as defineCustomActions, E as _enum, F as EventCategory, M as string, O as literal, S as customAction, T as isSecretMarkerLike, _ as waterHeaterCapability, b as errMsg, c as deviceAdoptionCapability, n as BaseDeviceProvider, o as climateControlCapability, s as connectionTestCapability, t as BaseDevice, w as isSecretMarker, y as DeviceType } from "../dist-
|
|
2
|
-
import { n as cascadeRemoveDevicesForIntegration, r as parseOAuthCallback, t as setIntegrationDevicesOnline } from "../account-integration-offline-
|
|
1
|
+
import { A as object, C as defineCustomActions, E as _enum, F as EventCategory, M as string, O as literal, S as customAction, T as isSecretMarkerLike, _ as waterHeaterCapability, b as errMsg, c as deviceAdoptionCapability, n as BaseDeviceProvider, o as climateControlCapability, s as connectionTestCapability, t as BaseDevice, w as isSecretMarker, y as DeviceType } from "../dist-PdvgOyAy.mjs";
|
|
2
|
+
import { n as cascadeRemoveDevicesForIntegration, r as parseOAuthCallback, t as setIntegrationDevicesOnline } from "../account-integration-offline-ASUhiSjp.mjs";
|
|
3
3
|
import { createHash, randomBytes } from "node:crypto";
|
|
4
4
|
//#region src/homecom/custom-actions.ts
|
|
5
5
|
var homeComActions = defineCustomActions({
|
|
@@ -186,7 +186,7 @@ function buildHomeComFormSchema() {
|
|
|
186
186
|
id: "account",
|
|
187
187
|
title: "HomeCom account",
|
|
188
188
|
titleKey: "provider-bosch:homecom.s_account.title",
|
|
189
|
-
description: "
|
|
189
|
+
description: "Sign in with your SingleKey ID, then paste the address the browser stops on (com.bosch.tt.dashtt.pointt://app/login?code=…). Find it in DevTools > Network.",
|
|
190
190
|
descriptionKey: "provider-bosch:homecom.s_account.description",
|
|
191
191
|
columns: 1,
|
|
192
192
|
fields: [
|
package/dist/shc/addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
4
|
//#endregion
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-BUFPeAeI.js");
|
|
6
6
|
let node_crypto = require("node:crypto");
|
|
7
7
|
let node_https = require("node:https");
|
|
8
8
|
let node_child_process = require("node:child_process");
|
package/dist/shc/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as object, C as defineCustomActions, D as array, E as _enum, F as EventCategory, M as string, O as literal, S as customAction, b as errMsg, c as deviceAdoptionCapability, f as heatingValveCapability, g as temperatureSensorCapability, h as switchCapability, i as batteryCapability, k as number, n as BaseDeviceProvider, o as climateControlCapability, s as connectionTestCapability, t as BaseDevice, y as DeviceType } from "../dist-
|
|
1
|
+
import { A as object, C as defineCustomActions, D as array, E as _enum, F as EventCategory, M as string, O as literal, S as customAction, b as errMsg, c as deviceAdoptionCapability, f as heatingValveCapability, g as temperatureSensorCapability, h as switchCapability, i as batteryCapability, k as number, n as BaseDeviceProvider, o as climateControlCapability, s as connectionTestCapability, t as BaseDevice, y as DeviceType } from "../dist-PdvgOyAy.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { request } from "node:https";
|
package/i18n/en.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"bosch-home-connect.name": "Bosch Home Connect",
|
|
4
4
|
"bosch-homecom.name": "Bosch HomeCom",
|
|
5
5
|
"homecom.s_account.title": "HomeCom account",
|
|
6
|
-
"homecom.s_account.description": "
|
|
6
|
+
"homecom.s_account.description": "Sign in with your SingleKey ID, then paste the address the browser stops on (com.bosch.tt.dashtt.pointt://app/login?code=…). Find it in DevTools > Network.",
|
|
7
7
|
"homecom.s_account.__homecom-begin.label": "HomeCom",
|
|
8
8
|
"homecom.s_account.authorizeUrl.label": "Login link",
|
|
9
9
|
"homecom.s_account.callback.label": "Redirect address or code",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"homecom.s_account.brand.label": "Brand",
|
|
19
19
|
"homecom.s_account.region.label": "Region",
|
|
20
20
|
"home-connect.s_gateway.title": "Home Connect",
|
|
21
|
-
"home-connect.s_gateway.description": "
|
|
21
|
+
"home-connect.s_gateway.description": "Open the login link, sign in, then paste the address the browser stops on (hcauth://auth/prod?code=…). Chrome: DevTools > Network > last redirect > Location.",
|
|
22
22
|
"home-connect.s_gateway.__home-connect-begin.label": "Home Connect",
|
|
23
23
|
"home-connect.s_gateway.authorizeUrl.label": "Login link",
|
|
24
24
|
"home-connect.s_gateway.callback.label": "Redirect address or code",
|
package/i18n/it.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"bosch-home-connect.name": "Bosch Home Connect",
|
|
4
4
|
"bosch-homecom.name": "Bosch HomeCom",
|
|
5
5
|
"homecom.s_account.title": "Account HomeCom",
|
|
6
|
-
"homecom.s_account.description": "
|
|
6
|
+
"homecom.s_account.description": "Accedi con il tuo SingleKey ID, poi incolla l'indirizzo su cui si ferma il browser (com.bosch.tt.dashtt.pointt://app/login?code=…). Lo trovi in DevTools > Network.",
|
|
7
7
|
"homecom.s_account.__homecom-begin.label": "HomeCom",
|
|
8
8
|
"homecom.s_account.authorizeUrl.label": "Link di accesso",
|
|
9
9
|
"homecom.s_account.callback.label": "Indirizzo di reindirizzamento o codice",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"homecom.s_account.brand.label": "Marchio",
|
|
19
19
|
"homecom.s_account.region.label": "Regione",
|
|
20
20
|
"home-connect.s_gateway.title": "Home Connect",
|
|
21
|
-
"home-connect.s_gateway.description": "
|
|
21
|
+
"home-connect.s_gateway.description": "Apri il link di accesso, accedi, poi incolla l'indirizzo su cui si ferma il browser (hcauth://auth/prod?code=…). Chrome: DevTools > Network > ultimo redirect > Location.",
|
|
22
22
|
"home-connect.s_gateway.__home-connect-begin.label": "Home Connect",
|
|
23
23
|
"home-connect.s_gateway.authorizeUrl.label": "Link di accesso",
|
|
24
24
|
"home-connect.s_gateway.callback.label": "Indirizzo di reindirizzamento o codice",
|
package/package.json
CHANGED