@camstack/addon-provider-tuya 0.2.127 → 0.2.129
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/addon.js +493 -240
- package/dist/addon.mjs +493 -240
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -818,7 +818,7 @@ async function discoverDevices(options = {}, binder = createDgramBinder()) {
|
|
|
818
818
|
return [...byId.values()];
|
|
819
819
|
}
|
|
820
820
|
//#endregion
|
|
821
|
-
//#region ../types/dist/event-category-
|
|
821
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
822
822
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
823
823
|
EventCategory["SystemBoot"] = "system.boot";
|
|
824
824
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -897,9 +897,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
897
897
|
/**
|
|
898
898
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
899
899
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
900
|
-
* alert centre turns it into one
|
|
900
|
+
* alert centre turns it into one critical alert.
|
|
901
901
|
*/
|
|
902
902
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
903
|
+
/**
|
|
904
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
905
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
906
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
907
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
908
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
909
|
+
* event may be dropped (D8, D11).
|
|
910
|
+
*/
|
|
911
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
903
912
|
EventCategory["AddonError"] = "addon.error";
|
|
904
913
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
905
914
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -6224,7 +6233,7 @@ var ZodIssueCode = {
|
|
|
6224
6233
|
var ZodFirstPartyTypeKind;
|
|
6225
6234
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6226
6235
|
//#endregion
|
|
6227
|
-
//#region ../types/dist/sleep-
|
|
6236
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
6228
6237
|
/**
|
|
6229
6238
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6230
6239
|
* window to float samples (D455).
|
|
@@ -8606,6 +8615,12 @@ function normalizeAddonInitResult(result) {
|
|
|
8606
8615
|
if (Array.isArray(result)) return { providers: result };
|
|
8607
8616
|
return result;
|
|
8608
8617
|
}
|
|
8618
|
+
/**
|
|
8619
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
8620
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
8621
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
8622
|
+
*/
|
|
8623
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
8609
8624
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
8610
8625
|
var PeerBytesTicketSchema = object({
|
|
8611
8626
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -13271,6 +13286,229 @@ var ConvertResultSchema = object({
|
|
|
13271
13286
|
files: array(string()).readonly()
|
|
13272
13287
|
})).readonly()
|
|
13273
13288
|
});
|
|
13289
|
+
/**
|
|
13290
|
+
* Zod schemas for persisted record types.
|
|
13291
|
+
*
|
|
13292
|
+
* These schemas serve as the single source of truth for types that are
|
|
13293
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
13294
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
13295
|
+
* enabling runtime validation when reading from the backend.
|
|
13296
|
+
*
|
|
13297
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
13298
|
+
* keeps the original name for backward compatibility.
|
|
13299
|
+
*/
|
|
13300
|
+
/**
|
|
13301
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
13302
|
+
*
|
|
13303
|
+
* Two principals:
|
|
13304
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
13305
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
13306
|
+
*
|
|
13307
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
13308
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
13309
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
13310
|
+
* distinction was only ever used to route role-specific procedures
|
|
13311
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
13312
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
13313
|
+
*/
|
|
13314
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
13315
|
+
var MethodAccessSchema = _enum([
|
|
13316
|
+
"view",
|
|
13317
|
+
"create",
|
|
13318
|
+
"delete"
|
|
13319
|
+
]);
|
|
13320
|
+
/**
|
|
13321
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
13322
|
+
* semantics; the first match decides whether the call passes:
|
|
13323
|
+
*
|
|
13324
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
13325
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
13326
|
+
* automatically — adding a device cap to the codebase makes it
|
|
13327
|
+
* reachable to every user with `category:device [...]` without a
|
|
13328
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
13329
|
+
*
|
|
13330
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
13331
|
+
* useful when an integration needs to interact with one specific
|
|
13332
|
+
* addon's surface regardless of how many caps it exports.
|
|
13333
|
+
*
|
|
13334
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
13335
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
13336
|
+
* and nothing else.
|
|
13337
|
+
*
|
|
13338
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
13339
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
13340
|
+
*/
|
|
13341
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
13342
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
13343
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
13344
|
+
/**
|
|
13345
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
13346
|
+
*
|
|
13347
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
13348
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
13349
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
13350
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
13351
|
+
*
|
|
13352
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
13353
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
13354
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
13355
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
13356
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
13357
|
+
* is NOT covered until the grant is edited.
|
|
13358
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
13359
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
13360
|
+
* re-resolves on the next request.
|
|
13361
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
13362
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
13363
|
+
* null/unset location matches NO `locations` selector.
|
|
13364
|
+
*/
|
|
13365
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
13366
|
+
object({ kind: literal("all") }),
|
|
13367
|
+
object({
|
|
13368
|
+
kind: literal("ids"),
|
|
13369
|
+
ids: array(number().int()).min(1)
|
|
13370
|
+
}),
|
|
13371
|
+
object({
|
|
13372
|
+
kind: literal("types"),
|
|
13373
|
+
types: array(_enum(DeviceType)).min(1)
|
|
13374
|
+
}),
|
|
13375
|
+
object({
|
|
13376
|
+
kind: literal("locations"),
|
|
13377
|
+
locations: array(string().min(1)).min(1)
|
|
13378
|
+
})
|
|
13379
|
+
]);
|
|
13380
|
+
var DeviceTokenScopeSchema = object({
|
|
13381
|
+
type: literal("device"),
|
|
13382
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
13383
|
+
selector: DeviceSelectorSchema,
|
|
13384
|
+
access: array(MethodAccessSchema).min(1),
|
|
13385
|
+
/**
|
|
13386
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
13387
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
13388
|
+
* Direction is parent → children ONLY.
|
|
13389
|
+
*
|
|
13390
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
13391
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
13392
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
13393
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
13394
|
+
* explicitly to override that default per grant.
|
|
13395
|
+
*/
|
|
13396
|
+
includeLinked: boolean().optional()
|
|
13397
|
+
});
|
|
13398
|
+
/**
|
|
13399
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
13400
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
13401
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
13402
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
13403
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
13404
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
13405
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
13406
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
13407
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
13408
|
+
*/
|
|
13409
|
+
function migrateLegacyTokenScope(raw) {
|
|
13410
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
13411
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
13412
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
13413
|
+
const targets = Reflect.get(raw, "targets");
|
|
13414
|
+
if (!Array.isArray(targets)) return raw;
|
|
13415
|
+
return {
|
|
13416
|
+
type: "device",
|
|
13417
|
+
selector: {
|
|
13418
|
+
kind: "ids",
|
|
13419
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
13420
|
+
},
|
|
13421
|
+
access: Reflect.get(raw, "access")
|
|
13422
|
+
};
|
|
13423
|
+
}
|
|
13424
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
13425
|
+
object({
|
|
13426
|
+
type: literal("category"),
|
|
13427
|
+
target: CapScopeSchema,
|
|
13428
|
+
access: array(MethodAccessSchema).min(1)
|
|
13429
|
+
}),
|
|
13430
|
+
object({
|
|
13431
|
+
type: literal("capability"),
|
|
13432
|
+
target: string(),
|
|
13433
|
+
access: array(MethodAccessSchema).min(1)
|
|
13434
|
+
}),
|
|
13435
|
+
object({
|
|
13436
|
+
type: literal("addon"),
|
|
13437
|
+
target: string(),
|
|
13438
|
+
access: array(MethodAccessSchema).min(1)
|
|
13439
|
+
}),
|
|
13440
|
+
DeviceTokenScopeSchema
|
|
13441
|
+
]));
|
|
13442
|
+
object({
|
|
13443
|
+
id: string(),
|
|
13444
|
+
username: string(),
|
|
13445
|
+
passwordHash: string(),
|
|
13446
|
+
/**
|
|
13447
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
13448
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
13449
|
+
* role enum collapsed onto this boolean in v2.
|
|
13450
|
+
*/
|
|
13451
|
+
isAdmin: boolean().default(false),
|
|
13452
|
+
allowedProviders: AllowedProviderSchema,
|
|
13453
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13454
|
+
/**
|
|
13455
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
13456
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
13457
|
+
* protected call.
|
|
13458
|
+
*/
|
|
13459
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
13460
|
+
createdAt: number(),
|
|
13461
|
+
updatedAt: number()
|
|
13462
|
+
});
|
|
13463
|
+
object({
|
|
13464
|
+
id: string(),
|
|
13465
|
+
label: string(),
|
|
13466
|
+
isAdmin: boolean().default(false),
|
|
13467
|
+
allowedProviders: AllowedProviderSchema,
|
|
13468
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13469
|
+
tokenHash: string(),
|
|
13470
|
+
tokenPrefix: string(),
|
|
13471
|
+
createdAt: number(),
|
|
13472
|
+
lastUsedAt: number().optional()
|
|
13473
|
+
});
|
|
13474
|
+
object({
|
|
13475
|
+
id: string(),
|
|
13476
|
+
userId: string(),
|
|
13477
|
+
name: string(),
|
|
13478
|
+
tokenHash: string(),
|
|
13479
|
+
tokenPrefix: string(),
|
|
13480
|
+
scopes: array(TokenScopeSchema),
|
|
13481
|
+
expiresAt: number().nullish(),
|
|
13482
|
+
lastUsedAt: number().nullish(),
|
|
13483
|
+
createdAt: number()
|
|
13484
|
+
});
|
|
13485
|
+
/** What a share-view grant lets its holder see. */
|
|
13486
|
+
var ShareViewGrantSchema = object({
|
|
13487
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13488
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13489
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13490
|
+
talk: boolean().optional()
|
|
13491
|
+
});
|
|
13492
|
+
var ShareViewScopeSchema = object({
|
|
13493
|
+
type: literal("share-view"),
|
|
13494
|
+
grant: ShareViewGrantSchema
|
|
13495
|
+
});
|
|
13496
|
+
var AddonRoutesScopeSchema = object({
|
|
13497
|
+
type: literal("addon-routes"),
|
|
13498
|
+
access: array(MethodAccessSchema).min(1)
|
|
13499
|
+
});
|
|
13500
|
+
var CredentialScopeSchema = union([
|
|
13501
|
+
literal("*"),
|
|
13502
|
+
ShareViewScopeSchema,
|
|
13503
|
+
AddonRoutesScopeSchema,
|
|
13504
|
+
TokenScopeSchema
|
|
13505
|
+
]);
|
|
13506
|
+
object({
|
|
13507
|
+
kind: literal("credential"),
|
|
13508
|
+
sub: string().min(1),
|
|
13509
|
+
jti: string().min(16),
|
|
13510
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13511
|
+
});
|
|
13274
13512
|
_enum(["new-session", "step-up"]);
|
|
13275
13513
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
13276
13514
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13987,7 +14225,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13987
14225
|
]);
|
|
13988
14226
|
var AlertActionSchema = object({
|
|
13989
14227
|
label: string(),
|
|
13990
|
-
href: string().optional()
|
|
14228
|
+
href: string().optional(),
|
|
14229
|
+
/**
|
|
14230
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
14231
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
14232
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
14233
|
+
* the SPA has no such route and would bounce to the home page.
|
|
14234
|
+
*/
|
|
14235
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13991
14236
|
});
|
|
13992
14237
|
var AlertStatusSchema = _enum([
|
|
13993
14238
|
"active",
|
|
@@ -42720,6 +42965,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42720
42965
|
"server-updated",
|
|
42721
42966
|
"export-completed",
|
|
42722
42967
|
"backup-completed",
|
|
42968
|
+
"alert-critical",
|
|
42969
|
+
"alert-error",
|
|
42970
|
+
"alert-critical-resolved",
|
|
42723
42971
|
"camera-online",
|
|
42724
42972
|
"camera-offline",
|
|
42725
42973
|
"camera-disabled",
|
|
@@ -44755,202 +45003,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44755
45003
|
auth: "admin"
|
|
44756
45004
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44757
45005
|
/**
|
|
44758
|
-
* Zod schemas for persisted record types.
|
|
44759
|
-
*
|
|
44760
|
-
* These schemas serve as the single source of truth for types that are
|
|
44761
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44762
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44763
|
-
* enabling runtime validation when reading from the backend.
|
|
44764
|
-
*
|
|
44765
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44766
|
-
* keeps the original name for backward compatibility.
|
|
44767
|
-
*/
|
|
44768
|
-
/**
|
|
44769
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44770
|
-
*
|
|
44771
|
-
* Two principals:
|
|
44772
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44773
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44774
|
-
*
|
|
44775
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44776
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44777
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44778
|
-
* distinction was only ever used to route role-specific procedures
|
|
44779
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44780
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44781
|
-
*/
|
|
44782
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44783
|
-
var MethodAccessSchema = _enum([
|
|
44784
|
-
"view",
|
|
44785
|
-
"create",
|
|
44786
|
-
"delete"
|
|
44787
|
-
]);
|
|
44788
|
-
/**
|
|
44789
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44790
|
-
* semantics; the first match decides whether the call passes:
|
|
44791
|
-
*
|
|
44792
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44793
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44794
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44795
|
-
* reachable to every user with `category:device [...]` without a
|
|
44796
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44797
|
-
*
|
|
44798
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44799
|
-
* useful when an integration needs to interact with one specific
|
|
44800
|
-
* addon's surface regardless of how many caps it exports.
|
|
44801
|
-
*
|
|
44802
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44803
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44804
|
-
* and nothing else.
|
|
44805
|
-
*
|
|
44806
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44807
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44808
|
-
*/
|
|
44809
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44810
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44811
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44812
|
-
/**
|
|
44813
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44814
|
-
*
|
|
44815
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44816
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44817
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44818
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44819
|
-
*
|
|
44820
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44821
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44822
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44823
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44824
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44825
|
-
* is NOT covered until the grant is edited.
|
|
44826
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44827
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44828
|
-
* re-resolves on the next request.
|
|
44829
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44830
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44831
|
-
* null/unset location matches NO `locations` selector.
|
|
44832
|
-
*/
|
|
44833
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44834
|
-
object({ kind: literal("all") }),
|
|
44835
|
-
object({
|
|
44836
|
-
kind: literal("ids"),
|
|
44837
|
-
ids: array(number().int()).min(1)
|
|
44838
|
-
}),
|
|
44839
|
-
object({
|
|
44840
|
-
kind: literal("types"),
|
|
44841
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44842
|
-
}),
|
|
44843
|
-
object({
|
|
44844
|
-
kind: literal("locations"),
|
|
44845
|
-
locations: array(string().min(1)).min(1)
|
|
44846
|
-
})
|
|
44847
|
-
]);
|
|
44848
|
-
var DeviceTokenScopeSchema = object({
|
|
44849
|
-
type: literal("device"),
|
|
44850
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44851
|
-
selector: DeviceSelectorSchema,
|
|
44852
|
-
access: array(MethodAccessSchema).min(1),
|
|
44853
|
-
/**
|
|
44854
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44855
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44856
|
-
* Direction is parent → children ONLY.
|
|
44857
|
-
*
|
|
44858
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44859
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44860
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44861
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44862
|
-
* explicitly to override that default per grant.
|
|
44863
|
-
*/
|
|
44864
|
-
includeLinked: boolean().optional()
|
|
44865
|
-
});
|
|
44866
|
-
/**
|
|
44867
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44868
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44869
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44870
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44871
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44872
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44873
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44874
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44875
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44876
|
-
*/
|
|
44877
|
-
function migrateLegacyTokenScope(raw) {
|
|
44878
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44879
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44880
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44881
|
-
const targets = Reflect.get(raw, "targets");
|
|
44882
|
-
if (!Array.isArray(targets)) return raw;
|
|
44883
|
-
return {
|
|
44884
|
-
type: "device",
|
|
44885
|
-
selector: {
|
|
44886
|
-
kind: "ids",
|
|
44887
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44888
|
-
},
|
|
44889
|
-
access: Reflect.get(raw, "access")
|
|
44890
|
-
};
|
|
44891
|
-
}
|
|
44892
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44893
|
-
object({
|
|
44894
|
-
type: literal("category"),
|
|
44895
|
-
target: CapScopeSchema,
|
|
44896
|
-
access: array(MethodAccessSchema).min(1)
|
|
44897
|
-
}),
|
|
44898
|
-
object({
|
|
44899
|
-
type: literal("capability"),
|
|
44900
|
-
target: string(),
|
|
44901
|
-
access: array(MethodAccessSchema).min(1)
|
|
44902
|
-
}),
|
|
44903
|
-
object({
|
|
44904
|
-
type: literal("addon"),
|
|
44905
|
-
target: string(),
|
|
44906
|
-
access: array(MethodAccessSchema).min(1)
|
|
44907
|
-
}),
|
|
44908
|
-
DeviceTokenScopeSchema
|
|
44909
|
-
]));
|
|
44910
|
-
object({
|
|
44911
|
-
id: string(),
|
|
44912
|
-
username: string(),
|
|
44913
|
-
passwordHash: string(),
|
|
44914
|
-
/**
|
|
44915
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44916
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44917
|
-
* role enum collapsed onto this boolean in v2.
|
|
44918
|
-
*/
|
|
44919
|
-
isAdmin: boolean().default(false),
|
|
44920
|
-
allowedProviders: AllowedProviderSchema,
|
|
44921
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44922
|
-
/**
|
|
44923
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44924
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44925
|
-
* protected call.
|
|
44926
|
-
*/
|
|
44927
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44928
|
-
createdAt: number(),
|
|
44929
|
-
updatedAt: number()
|
|
44930
|
-
});
|
|
44931
|
-
object({
|
|
44932
|
-
id: string(),
|
|
44933
|
-
label: string(),
|
|
44934
|
-
isAdmin: boolean().default(false),
|
|
44935
|
-
allowedProviders: AllowedProviderSchema,
|
|
44936
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44937
|
-
tokenHash: string(),
|
|
44938
|
-
tokenPrefix: string(),
|
|
44939
|
-
createdAt: number(),
|
|
44940
|
-
lastUsedAt: number().optional()
|
|
44941
|
-
});
|
|
44942
|
-
object({
|
|
44943
|
-
id: string(),
|
|
44944
|
-
userId: string(),
|
|
44945
|
-
name: string(),
|
|
44946
|
-
tokenHash: string(),
|
|
44947
|
-
tokenPrefix: string(),
|
|
44948
|
-
scopes: array(TokenScopeSchema),
|
|
44949
|
-
expiresAt: number().nullish(),
|
|
44950
|
-
lastUsedAt: number().nullish(),
|
|
44951
|
-
createdAt: number()
|
|
44952
|
-
});
|
|
44953
|
-
/**
|
|
44954
45006
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44955
45007
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44956
45008
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51796,7 +51848,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51796
51848
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51797
51849
|
kind: "mutation",
|
|
51798
51850
|
auth: "admin"
|
|
51799
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51851
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51852
|
+
clear: boolean(),
|
|
51853
|
+
repointLocationId: string().optional()
|
|
51854
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51800
51855
|
kind: "mutation",
|
|
51801
51856
|
auth: "admin"
|
|
51802
51857
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -56060,6 +56115,11 @@ onStatusChanged: { data: object({
|
|
|
56060
56115
|
*
|
|
56061
56116
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
56062
56117
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
56118
|
+
*
|
|
56119
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
56120
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
56121
|
+
* the link is down, or the description does not carry it) and is never
|
|
56122
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
56063
56123
|
*/
|
|
56064
56124
|
var DishwasherStateSchema = _enum([
|
|
56065
56125
|
"idle",
|
|
@@ -56069,43 +56129,155 @@ var DishwasherStateSchema = _enum([
|
|
|
56069
56129
|
"error",
|
|
56070
56130
|
"unavailable"
|
|
56071
56131
|
]);
|
|
56132
|
+
/**
|
|
56133
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
56134
|
+
* view for compact surfaces; this is what the appliance said.
|
|
56135
|
+
*/
|
|
56136
|
+
var DishwasherOperationStateSchema = _enum([
|
|
56137
|
+
"Inactive",
|
|
56138
|
+
"Ready",
|
|
56139
|
+
"DelayedStart",
|
|
56140
|
+
"Run",
|
|
56141
|
+
"Pause",
|
|
56142
|
+
"ActionRequired",
|
|
56143
|
+
"Finished",
|
|
56144
|
+
"Error",
|
|
56145
|
+
"Aborting"
|
|
56146
|
+
]);
|
|
56147
|
+
/**
|
|
56148
|
+
* Why fields may be `null`:
|
|
56149
|
+
* - `available` — the link is up and the description is loaded;
|
|
56150
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
56151
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
56152
|
+
* be loaded, so its values cannot be decoded.
|
|
56153
|
+
*/
|
|
56154
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
56155
|
+
"available",
|
|
56156
|
+
"offline",
|
|
56157
|
+
"description-missing"
|
|
56158
|
+
]);
|
|
56072
56159
|
var DishwasherConsumableLevelSchema = _enum([
|
|
56073
56160
|
"ok",
|
|
56074
56161
|
"low",
|
|
56075
56162
|
"empty"
|
|
56076
56163
|
]);
|
|
56077
56164
|
var DishwasherStatusSchema = object({
|
|
56165
|
+
availability: DishwasherAvailabilitySchema,
|
|
56166
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
56078
56167
|
state: DishwasherStateSchema,
|
|
56079
|
-
/**
|
|
56168
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
56169
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
56170
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
56080
56171
|
program: string().nullable(),
|
|
56081
|
-
/**
|
|
56172
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
56173
|
+
selectedProgram: string().nullable(),
|
|
56174
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
56082
56175
|
availablePrograms: array(string()),
|
|
56083
|
-
/**
|
|
56084
|
-
|
|
56176
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
56177
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
56178
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
56179
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
56085
56180
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
56086
56181
|
progressPercent: number().min(0).max(100).nullable(),
|
|
56087
|
-
/** True when the door is reported open. */
|
|
56088
|
-
doorOpen: boolean(),
|
|
56089
|
-
/** True when
|
|
56090
|
-
|
|
56091
|
-
/**
|
|
56092
|
-
|
|
56182
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
56183
|
+
doorOpen: boolean().nullable(),
|
|
56184
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
56185
|
+
doorLocked: boolean().nullable(),
|
|
56186
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
56187
|
+
remoteStartAllowed: boolean().nullable(),
|
|
56188
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
56189
|
+
remoteControlActive: boolean().nullable(),
|
|
56190
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
56191
|
+
localControlActive: boolean().nullable(),
|
|
56192
|
+
/** Main power / switched-on state; null when not known. */
|
|
56193
|
+
powerOn: boolean().nullable(),
|
|
56194
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
56195
|
+
powerState: string().nullable(),
|
|
56093
56196
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56094
56197
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
56095
|
-
|
|
56096
|
-
|
|
56198
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
56199
|
+
halfLoad: boolean().nullable(),
|
|
56200
|
+
hygienePlus: boolean().nullable(),
|
|
56097
56201
|
/** Extra dry option when the appliance exposes it. */
|
|
56098
|
-
extraDry: boolean(),
|
|
56202
|
+
extraDry: boolean().nullable(),
|
|
56099
56203
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
56100
|
-
intensiveZone: boolean(),
|
|
56204
|
+
intensiveZone: boolean().nullable(),
|
|
56101
56205
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
56102
|
-
varioSpeedPlus: boolean(),
|
|
56103
|
-
/** Child lock (controls disabled on the appliance). */
|
|
56104
|
-
childLock: boolean(),
|
|
56206
|
+
varioSpeedPlus: boolean().nullable(),
|
|
56207
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
56208
|
+
childLock: boolean().nullable(),
|
|
56209
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
56210
|
+
activeEvents: array(string()),
|
|
56211
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
56105
56212
|
errorCode: number().nullable(),
|
|
56213
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
56106
56214
|
errorLabel: string().nullable(),
|
|
56215
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
56107
56216
|
lastFetchedAt: number()
|
|
56108
56217
|
});
|
|
56218
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
56219
|
+
/** A value a program option or setting can take. */
|
|
56220
|
+
var DishwasherValueSchema = union([
|
|
56221
|
+
boolean(),
|
|
56222
|
+
string(),
|
|
56223
|
+
number()
|
|
56224
|
+
]);
|
|
56225
|
+
var DishwasherAccessSchema = _enum([
|
|
56226
|
+
"none",
|
|
56227
|
+
"read",
|
|
56228
|
+
"readWrite",
|
|
56229
|
+
"writeOnly",
|
|
56230
|
+
"readStatic"
|
|
56231
|
+
]);
|
|
56232
|
+
/**
|
|
56233
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
56234
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
56235
|
+
*/
|
|
56236
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
56237
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
56238
|
+
key: string(),
|
|
56239
|
+
/** Last segment of the key, for display. */
|
|
56240
|
+
name: string(),
|
|
56241
|
+
type: _enum([
|
|
56242
|
+
"boolean",
|
|
56243
|
+
"number",
|
|
56244
|
+
"enum",
|
|
56245
|
+
"string"
|
|
56246
|
+
]),
|
|
56247
|
+
access: DishwasherAccessSchema,
|
|
56248
|
+
/** The appliance reports this entity as currently available. */
|
|
56249
|
+
available: boolean(),
|
|
56250
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
56251
|
+
unit: string().nullable(),
|
|
56252
|
+
min: number().nullable(),
|
|
56253
|
+
max: number().nullable(),
|
|
56254
|
+
step: number().nullable(),
|
|
56255
|
+
/** Allowed members of an enum; null for other types. */
|
|
56256
|
+
enumValues: array(string()).nullable(),
|
|
56257
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
56258
|
+
});
|
|
56259
|
+
var DishwasherProgramSchema = object({
|
|
56260
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
56261
|
+
key: string(),
|
|
56262
|
+
name: string(),
|
|
56263
|
+
/** The appliance currently offers this program. */
|
|
56264
|
+
available: boolean(),
|
|
56265
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
56266
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
56267
|
+
});
|
|
56268
|
+
var DishwasherOptionsSchema = object({
|
|
56269
|
+
availability: DishwasherAvailabilitySchema,
|
|
56270
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
56271
|
+
supportsStart: boolean(),
|
|
56272
|
+
supportsPause: boolean(),
|
|
56273
|
+
supportsResume: boolean(),
|
|
56274
|
+
supportsStop: boolean(),
|
|
56275
|
+
supportsPower: boolean(),
|
|
56276
|
+
/** Every program the description lists, with its options. */
|
|
56277
|
+
programs: array(DishwasherProgramSchema),
|
|
56278
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
56279
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
56280
|
+
});
|
|
56109
56281
|
var dishwasherCapability = {
|
|
56110
56282
|
name: "dishwasher",
|
|
56111
56283
|
scope: "device",
|
|
@@ -56113,86 +56285,102 @@ var dishwasherCapability = {
|
|
|
56113
56285
|
mode: "singleton",
|
|
56114
56286
|
deviceTypes: [DeviceType.Dishwasher],
|
|
56115
56287
|
methods: {
|
|
56116
|
-
|
|
56288
|
+
/**
|
|
56289
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
56290
|
+
* option feature keys; each is checked against the program's constraints.
|
|
56291
|
+
*/
|
|
56292
|
+
start: method(object({
|
|
56293
|
+
deviceId: DeviceIdSchema,
|
|
56294
|
+
program: string().min(1).optional(),
|
|
56295
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
56296
|
+
}), _void(), {
|
|
56117
56297
|
kind: "mutation",
|
|
56118
56298
|
auth: "protected"
|
|
56119
56299
|
}),
|
|
56120
|
-
pause: method(object({ deviceId:
|
|
56300
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56121
56301
|
kind: "mutation",
|
|
56122
56302
|
auth: "protected"
|
|
56123
56303
|
}),
|
|
56124
|
-
|
|
56304
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56305
|
+
kind: "mutation",
|
|
56306
|
+
auth: "protected"
|
|
56307
|
+
}),
|
|
56308
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56125
56309
|
kind: "mutation",
|
|
56126
56310
|
auth: "protected"
|
|
56127
56311
|
}),
|
|
56312
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
56128
56313
|
setProgram: method(object({
|
|
56129
|
-
deviceId:
|
|
56314
|
+
deviceId: DeviceIdSchema,
|
|
56130
56315
|
program: string().min(1)
|
|
56131
56316
|
}), _void(), {
|
|
56132
56317
|
kind: "mutation",
|
|
56133
56318
|
auth: "protected"
|
|
56134
56319
|
}),
|
|
56135
56320
|
setPower: method(object({
|
|
56136
|
-
deviceId:
|
|
56321
|
+
deviceId: DeviceIdSchema,
|
|
56137
56322
|
on: boolean()
|
|
56138
56323
|
}), _void(), {
|
|
56139
56324
|
kind: "mutation",
|
|
56140
56325
|
auth: "protected"
|
|
56141
56326
|
}),
|
|
56142
56327
|
setHalfLoad: method(object({
|
|
56143
|
-
deviceId:
|
|
56328
|
+
deviceId: DeviceIdSchema,
|
|
56144
56329
|
on: boolean()
|
|
56145
56330
|
}), _void(), {
|
|
56146
56331
|
kind: "mutation",
|
|
56147
56332
|
auth: "protected"
|
|
56148
56333
|
}),
|
|
56149
56334
|
setHygienePlus: method(object({
|
|
56150
|
-
deviceId:
|
|
56335
|
+
deviceId: DeviceIdSchema,
|
|
56151
56336
|
on: boolean()
|
|
56152
56337
|
}), _void(), {
|
|
56153
56338
|
kind: "mutation",
|
|
56154
56339
|
auth: "protected"
|
|
56155
56340
|
}),
|
|
56156
56341
|
setExtraDry: method(object({
|
|
56157
|
-
deviceId:
|
|
56342
|
+
deviceId: DeviceIdSchema,
|
|
56158
56343
|
on: boolean()
|
|
56159
56344
|
}), _void(), {
|
|
56160
56345
|
kind: "mutation",
|
|
56161
56346
|
auth: "protected"
|
|
56162
56347
|
}),
|
|
56163
56348
|
setIntensiveZone: method(object({
|
|
56164
|
-
deviceId:
|
|
56349
|
+
deviceId: DeviceIdSchema,
|
|
56165
56350
|
on: boolean()
|
|
56166
56351
|
}), _void(), {
|
|
56167
56352
|
kind: "mutation",
|
|
56168
56353
|
auth: "protected"
|
|
56169
56354
|
}),
|
|
56170
56355
|
setVarioSpeedPlus: method(object({
|
|
56171
|
-
deviceId:
|
|
56356
|
+
deviceId: DeviceIdSchema,
|
|
56172
56357
|
on: boolean()
|
|
56173
56358
|
}), _void(), {
|
|
56174
56359
|
kind: "mutation",
|
|
56175
56360
|
auth: "protected"
|
|
56176
56361
|
}),
|
|
56177
56362
|
setChildLock: method(object({
|
|
56178
|
-
deviceId:
|
|
56363
|
+
deviceId: DeviceIdSchema,
|
|
56179
56364
|
on: boolean()
|
|
56180
56365
|
}), _void(), {
|
|
56181
56366
|
kind: "mutation",
|
|
56182
56367
|
auth: "protected"
|
|
56183
56368
|
}),
|
|
56369
|
+
/**
|
|
56370
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
56371
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
56372
|
+
* its declared range / members.
|
|
56373
|
+
*/
|
|
56184
56374
|
setOption: method(object({
|
|
56185
|
-
deviceId:
|
|
56375
|
+
deviceId: DeviceIdSchema,
|
|
56186
56376
|
key: string().min(1),
|
|
56187
|
-
value:
|
|
56188
|
-
boolean(),
|
|
56189
|
-
string(),
|
|
56190
|
-
number()
|
|
56191
|
-
])
|
|
56377
|
+
value: DishwasherValueSchema
|
|
56192
56378
|
}), _void(), {
|
|
56193
56379
|
kind: "mutation",
|
|
56194
56380
|
auth: "protected"
|
|
56195
|
-
})
|
|
56381
|
+
}),
|
|
56382
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
56383
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
56196
56384
|
},
|
|
56197
56385
|
status: {
|
|
56198
56386
|
schema: DishwasherStatusSchema,
|
|
@@ -70141,6 +70329,12 @@ Object.freeze({
|
|
|
70141
70329
|
addonId: null,
|
|
70142
70330
|
access: "view"
|
|
70143
70331
|
},
|
|
70332
|
+
"dishwasher.getOptions": {
|
|
70333
|
+
capName: "dishwasher",
|
|
70334
|
+
capScope: "device",
|
|
70335
|
+
addonId: null,
|
|
70336
|
+
access: "view"
|
|
70337
|
+
},
|
|
70144
70338
|
"dishwasher.getStatus": {
|
|
70145
70339
|
capName: "dishwasher",
|
|
70146
70340
|
capScope: "device",
|
|
@@ -70153,6 +70347,12 @@ Object.freeze({
|
|
|
70153
70347
|
addonId: null,
|
|
70154
70348
|
access: "create"
|
|
70155
70349
|
},
|
|
70350
|
+
"dishwasher.resume": {
|
|
70351
|
+
capName: "dishwasher",
|
|
70352
|
+
capScope: "device",
|
|
70353
|
+
addonId: null,
|
|
70354
|
+
access: "create"
|
|
70355
|
+
},
|
|
70156
70356
|
"dishwasher.setChildLock": {
|
|
70157
70357
|
capName: "dishwasher",
|
|
70158
70358
|
capScope: "device",
|
|
@@ -74653,6 +74853,12 @@ Object.freeze({
|
|
|
74653
74853
|
addonId: null,
|
|
74654
74854
|
access: "view"
|
|
74655
74855
|
},
|
|
74856
|
+
"storageMigration.moverClearance": {
|
|
74857
|
+
capName: "storage-migration",
|
|
74858
|
+
capScope: "system",
|
|
74859
|
+
addonId: null,
|
|
74860
|
+
access: "view"
|
|
74861
|
+
},
|
|
74656
74862
|
"storageMigration.movers": {
|
|
74657
74863
|
capName: "storage-migration",
|
|
74658
74864
|
capScope: "system",
|
|
@@ -76846,6 +77052,11 @@ Object.freeze({
|
|
|
76846
77052
|
form: "single",
|
|
76847
77053
|
optional: false
|
|
76848
77054
|
}],
|
|
77055
|
+
"dishwasher.getOptions": [{
|
|
77056
|
+
name: "deviceId",
|
|
77057
|
+
form: "single",
|
|
77058
|
+
optional: false
|
|
77059
|
+
}],
|
|
76849
77060
|
"dishwasher.getStatus": [{
|
|
76850
77061
|
name: "deviceId",
|
|
76851
77062
|
form: "single",
|
|
@@ -76856,6 +77067,11 @@ Object.freeze({
|
|
|
76856
77067
|
form: "single",
|
|
76857
77068
|
optional: false
|
|
76858
77069
|
}],
|
|
77070
|
+
"dishwasher.resume": [{
|
|
77071
|
+
name: "deviceId",
|
|
77072
|
+
form: "single",
|
|
77073
|
+
optional: false
|
|
77074
|
+
}],
|
|
76859
77075
|
"dishwasher.setChildLock": [{
|
|
76860
77076
|
name: "deviceId",
|
|
76861
77077
|
form: "single",
|
|
@@ -78942,6 +79158,9 @@ new Map(Object.entries({
|
|
|
78942
79158
|
"wrapper-update-available": "system",
|
|
78943
79159
|
"backup-completed": "system",
|
|
78944
79160
|
"export-completed": "system",
|
|
79161
|
+
"alert-critical": "system",
|
|
79162
|
+
"alert-error": "system",
|
|
79163
|
+
"alert-critical-resolved": "system",
|
|
78945
79164
|
"storage-location-low": "system",
|
|
78946
79165
|
"storage-location-critical": "system",
|
|
78947
79166
|
"storage-location-ok": "system",
|
|
@@ -79066,6 +79285,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
79066
79285
|
"storage-location-ok"
|
|
79067
79286
|
]
|
|
79068
79287
|
},
|
|
79288
|
+
{
|
|
79289
|
+
id: "alerts",
|
|
79290
|
+
family: "system",
|
|
79291
|
+
label: "Alerts",
|
|
79292
|
+
kinds: [
|
|
79293
|
+
"alert-critical",
|
|
79294
|
+
"alert-error",
|
|
79295
|
+
"alert-critical-resolved"
|
|
79296
|
+
]
|
|
79297
|
+
},
|
|
79069
79298
|
{
|
|
79070
79299
|
id: "alarm",
|
|
79071
79300
|
family: "alarm",
|
|
@@ -79110,6 +79339,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
79110
79339
|
return [[descriptor.kind, field]];
|
|
79111
79340
|
})));
|
|
79112
79341
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
79342
|
+
object({
|
|
79343
|
+
phase: _enum(["raised", "resolved"]),
|
|
79344
|
+
episodeId: string().min(1),
|
|
79345
|
+
alertId: string().min(1),
|
|
79346
|
+
severity: AlertSeveritySchema,
|
|
79347
|
+
category: string(),
|
|
79348
|
+
title: string(),
|
|
79349
|
+
message: string(),
|
|
79350
|
+
sourceType: string().optional(),
|
|
79351
|
+
sourceId: string().optional(),
|
|
79352
|
+
nodeId: string().optional(),
|
|
79353
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
79354
|
+
actionUrl: string().optional(),
|
|
79355
|
+
at: number()
|
|
79356
|
+
});
|
|
79113
79357
|
var RULE_BODY_ONLY = ["body"];
|
|
79114
79358
|
var RULE_TEXT = ["title", "body"];
|
|
79115
79359
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -79119,6 +79363,11 @@ var TANK = [
|
|
|
79119
79363
|
"device-tank-full",
|
|
79120
79364
|
"device-tank-normal"
|
|
79121
79365
|
];
|
|
79366
|
+
var ALERT_EPISODE = [
|
|
79367
|
+
"alert-critical",
|
|
79368
|
+
"alert-error",
|
|
79369
|
+
"alert-critical-resolved"
|
|
79370
|
+
];
|
|
79122
79371
|
var UPDATES = [
|
|
79123
79372
|
"addon-update-available",
|
|
79124
79373
|
"server-update-available",
|
|
@@ -79311,14 +79560,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
79311
79560
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
79312
79561
|
([...RULE_TEXT], [...TANK]),
|
|
79313
79562
|
[...RULE_TEXT],
|
|
79314
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
79315
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
79316
|
-
[...RULE_TEXT],
|
|
79563
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
79564
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
79317
79565
|
[...RULE_TEXT],
|
|
79318
79566
|
[...RULE_TEXT],
|
|
79319
79567
|
[...RULE_TEXT],
|
|
79320
79568
|
[...RULE_TEXT],
|
|
79321
79569
|
[...RULE_TEXT],
|
|
79570
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79322
79571
|
[...RULE_TEXT],
|
|
79323
79572
|
[...RULE_TEXT],
|
|
79324
79573
|
[...RULE_TEXT],
|
|
@@ -79336,7 +79585,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
79336
79585
|
[...RULE_TEXT],
|
|
79337
79586
|
[...RULE_TEXT],
|
|
79338
79587
|
[...RULE_TEXT],
|
|
79339
|
-
[...RULE_TEXT],
|
|
79588
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79589
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79590
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79591
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79592
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79340
79593
|
[...RULE_TEXT],
|
|
79341
79594
|
[...RULE_TEXT],
|
|
79342
79595
|
[...RULE_TEXT],
|