@camstack/addon-provider-wyze 0.2.140 → 0.2.142
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.js
CHANGED
|
@@ -31,7 +31,7 @@ let net = require("net");
|
|
|
31
31
|
net = __toESM(net, 1);
|
|
32
32
|
let node_child_process = require("node:child_process");
|
|
33
33
|
let node_tls = require("node:tls");
|
|
34
|
-
//#region ../types/dist/event-category-
|
|
34
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
35
35
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
36
36
|
EventCategory["SystemBoot"] = "system.boot";
|
|
37
37
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -110,9 +110,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
110
110
|
/**
|
|
111
111
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
112
112
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
113
|
-
* alert centre turns it into one
|
|
113
|
+
* alert centre turns it into one critical alert.
|
|
114
114
|
*/
|
|
115
115
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
116
|
+
/**
|
|
117
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
118
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
119
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
120
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
121
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
122
|
+
* event may be dropped (D8, D11).
|
|
123
|
+
*/
|
|
124
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
116
125
|
EventCategory["AddonError"] = "addon.error";
|
|
117
126
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
118
127
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5437,7 +5446,7 @@ var ZodIssueCode = {
|
|
|
5437
5446
|
var ZodFirstPartyTypeKind;
|
|
5438
5447
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5439
5448
|
//#endregion
|
|
5440
|
-
//#region ../types/dist/sleep-
|
|
5449
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5441
5450
|
/**
|
|
5442
5451
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5443
5452
|
* window to float samples (D455).
|
|
@@ -7819,6 +7828,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7819
7828
|
if (Array.isArray(result)) return { providers: result };
|
|
7820
7829
|
return result;
|
|
7821
7830
|
}
|
|
7831
|
+
/**
|
|
7832
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7833
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7834
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7835
|
+
*/
|
|
7836
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7822
7837
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7823
7838
|
var PeerBytesTicketSchema = object({
|
|
7824
7839
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12518,6 +12533,229 @@ var ConvertResultSchema = object({
|
|
|
12518
12533
|
files: array(string()).readonly()
|
|
12519
12534
|
})).readonly()
|
|
12520
12535
|
});
|
|
12536
|
+
/**
|
|
12537
|
+
* Zod schemas for persisted record types.
|
|
12538
|
+
*
|
|
12539
|
+
* These schemas serve as the single source of truth for types that are
|
|
12540
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12541
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12542
|
+
* enabling runtime validation when reading from the backend.
|
|
12543
|
+
*
|
|
12544
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12545
|
+
* keeps the original name for backward compatibility.
|
|
12546
|
+
*/
|
|
12547
|
+
/**
|
|
12548
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12549
|
+
*
|
|
12550
|
+
* Two principals:
|
|
12551
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12552
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12553
|
+
*
|
|
12554
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12555
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12556
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12557
|
+
* distinction was only ever used to route role-specific procedures
|
|
12558
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12559
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12560
|
+
*/
|
|
12561
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12562
|
+
var MethodAccessSchema = _enum([
|
|
12563
|
+
"view",
|
|
12564
|
+
"create",
|
|
12565
|
+
"delete"
|
|
12566
|
+
]);
|
|
12567
|
+
/**
|
|
12568
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12569
|
+
* semantics; the first match decides whether the call passes:
|
|
12570
|
+
*
|
|
12571
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12572
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12573
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12574
|
+
* reachable to every user with `category:device [...]` without a
|
|
12575
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12576
|
+
*
|
|
12577
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12578
|
+
* useful when an integration needs to interact with one specific
|
|
12579
|
+
* addon's surface regardless of how many caps it exports.
|
|
12580
|
+
*
|
|
12581
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12582
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12583
|
+
* and nothing else.
|
|
12584
|
+
*
|
|
12585
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12586
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12587
|
+
*/
|
|
12588
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12589
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12590
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12591
|
+
/**
|
|
12592
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12593
|
+
*
|
|
12594
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12595
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12596
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12597
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12598
|
+
*
|
|
12599
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12600
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12601
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12602
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12603
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12604
|
+
* is NOT covered until the grant is edited.
|
|
12605
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12606
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12607
|
+
* re-resolves on the next request.
|
|
12608
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12609
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12610
|
+
* null/unset location matches NO `locations` selector.
|
|
12611
|
+
*/
|
|
12612
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12613
|
+
object({ kind: literal("all") }),
|
|
12614
|
+
object({
|
|
12615
|
+
kind: literal("ids"),
|
|
12616
|
+
ids: array(number().int()).min(1)
|
|
12617
|
+
}),
|
|
12618
|
+
object({
|
|
12619
|
+
kind: literal("types"),
|
|
12620
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12621
|
+
}),
|
|
12622
|
+
object({
|
|
12623
|
+
kind: literal("locations"),
|
|
12624
|
+
locations: array(string().min(1)).min(1)
|
|
12625
|
+
})
|
|
12626
|
+
]);
|
|
12627
|
+
var DeviceTokenScopeSchema = object({
|
|
12628
|
+
type: literal("device"),
|
|
12629
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12630
|
+
selector: DeviceSelectorSchema,
|
|
12631
|
+
access: array(MethodAccessSchema).min(1),
|
|
12632
|
+
/**
|
|
12633
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12634
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12635
|
+
* Direction is parent → children ONLY.
|
|
12636
|
+
*
|
|
12637
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12638
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12639
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12640
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12641
|
+
* explicitly to override that default per grant.
|
|
12642
|
+
*/
|
|
12643
|
+
includeLinked: boolean().optional()
|
|
12644
|
+
});
|
|
12645
|
+
/**
|
|
12646
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12647
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12648
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12649
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12650
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12651
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12652
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12653
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12654
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12655
|
+
*/
|
|
12656
|
+
function migrateLegacyTokenScope(raw) {
|
|
12657
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12658
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12659
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12660
|
+
const targets = Reflect.get(raw, "targets");
|
|
12661
|
+
if (!Array.isArray(targets)) return raw;
|
|
12662
|
+
return {
|
|
12663
|
+
type: "device",
|
|
12664
|
+
selector: {
|
|
12665
|
+
kind: "ids",
|
|
12666
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12667
|
+
},
|
|
12668
|
+
access: Reflect.get(raw, "access")
|
|
12669
|
+
};
|
|
12670
|
+
}
|
|
12671
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12672
|
+
object({
|
|
12673
|
+
type: literal("category"),
|
|
12674
|
+
target: CapScopeSchema,
|
|
12675
|
+
access: array(MethodAccessSchema).min(1)
|
|
12676
|
+
}),
|
|
12677
|
+
object({
|
|
12678
|
+
type: literal("capability"),
|
|
12679
|
+
target: string(),
|
|
12680
|
+
access: array(MethodAccessSchema).min(1)
|
|
12681
|
+
}),
|
|
12682
|
+
object({
|
|
12683
|
+
type: literal("addon"),
|
|
12684
|
+
target: string(),
|
|
12685
|
+
access: array(MethodAccessSchema).min(1)
|
|
12686
|
+
}),
|
|
12687
|
+
DeviceTokenScopeSchema
|
|
12688
|
+
]));
|
|
12689
|
+
object({
|
|
12690
|
+
id: string(),
|
|
12691
|
+
username: string(),
|
|
12692
|
+
passwordHash: string(),
|
|
12693
|
+
/**
|
|
12694
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12695
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12696
|
+
* role enum collapsed onto this boolean in v2.
|
|
12697
|
+
*/
|
|
12698
|
+
isAdmin: boolean().default(false),
|
|
12699
|
+
allowedProviders: AllowedProviderSchema,
|
|
12700
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12701
|
+
/**
|
|
12702
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12703
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12704
|
+
* protected call.
|
|
12705
|
+
*/
|
|
12706
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12707
|
+
createdAt: number(),
|
|
12708
|
+
updatedAt: number()
|
|
12709
|
+
});
|
|
12710
|
+
object({
|
|
12711
|
+
id: string(),
|
|
12712
|
+
label: string(),
|
|
12713
|
+
isAdmin: boolean().default(false),
|
|
12714
|
+
allowedProviders: AllowedProviderSchema,
|
|
12715
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12716
|
+
tokenHash: string(),
|
|
12717
|
+
tokenPrefix: string(),
|
|
12718
|
+
createdAt: number(),
|
|
12719
|
+
lastUsedAt: number().optional()
|
|
12720
|
+
});
|
|
12721
|
+
object({
|
|
12722
|
+
id: string(),
|
|
12723
|
+
userId: string(),
|
|
12724
|
+
name: string(),
|
|
12725
|
+
tokenHash: string(),
|
|
12726
|
+
tokenPrefix: string(),
|
|
12727
|
+
scopes: array(TokenScopeSchema),
|
|
12728
|
+
expiresAt: number().nullish(),
|
|
12729
|
+
lastUsedAt: number().nullish(),
|
|
12730
|
+
createdAt: number()
|
|
12731
|
+
});
|
|
12732
|
+
/** What a share-view grant lets its holder see. */
|
|
12733
|
+
var ShareViewGrantSchema = object({
|
|
12734
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
12735
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
12736
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
12737
|
+
talk: boolean().optional()
|
|
12738
|
+
});
|
|
12739
|
+
var ShareViewScopeSchema = object({
|
|
12740
|
+
type: literal("share-view"),
|
|
12741
|
+
grant: ShareViewGrantSchema
|
|
12742
|
+
});
|
|
12743
|
+
var AddonRoutesScopeSchema = object({
|
|
12744
|
+
type: literal("addon-routes"),
|
|
12745
|
+
access: array(MethodAccessSchema).min(1)
|
|
12746
|
+
});
|
|
12747
|
+
var CredentialScopeSchema = union([
|
|
12748
|
+
literal("*"),
|
|
12749
|
+
ShareViewScopeSchema,
|
|
12750
|
+
AddonRoutesScopeSchema,
|
|
12751
|
+
TokenScopeSchema
|
|
12752
|
+
]);
|
|
12753
|
+
object({
|
|
12754
|
+
kind: literal("credential"),
|
|
12755
|
+
sub: string().min(1),
|
|
12756
|
+
jti: string().min(16),
|
|
12757
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
12758
|
+
});
|
|
12521
12759
|
_enum(["new-session", "step-up"]);
|
|
12522
12760
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12523
12761
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13234,7 +13472,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13234
13472
|
]);
|
|
13235
13473
|
var AlertActionSchema = object({
|
|
13236
13474
|
label: string(),
|
|
13237
|
-
href: string().optional()
|
|
13475
|
+
href: string().optional(),
|
|
13476
|
+
/**
|
|
13477
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13478
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13479
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13480
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13481
|
+
*/
|
|
13482
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13238
13483
|
});
|
|
13239
13484
|
var AlertStatusSchema = _enum([
|
|
13240
13485
|
"active",
|
|
@@ -41967,6 +42212,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41967
42212
|
"server-updated",
|
|
41968
42213
|
"export-completed",
|
|
41969
42214
|
"backup-completed",
|
|
42215
|
+
"alert-critical",
|
|
42216
|
+
"alert-error",
|
|
42217
|
+
"alert-critical-resolved",
|
|
41970
42218
|
"camera-online",
|
|
41971
42219
|
"camera-offline",
|
|
41972
42220
|
"camera-disabled",
|
|
@@ -44002,202 +44250,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44002
44250
|
auth: "admin"
|
|
44003
44251
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44004
44252
|
/**
|
|
44005
|
-
* Zod schemas for persisted record types.
|
|
44006
|
-
*
|
|
44007
|
-
* These schemas serve as the single source of truth for types that are
|
|
44008
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44009
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44010
|
-
* enabling runtime validation when reading from the backend.
|
|
44011
|
-
*
|
|
44012
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44013
|
-
* keeps the original name for backward compatibility.
|
|
44014
|
-
*/
|
|
44015
|
-
/**
|
|
44016
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44017
|
-
*
|
|
44018
|
-
* Two principals:
|
|
44019
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44020
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44021
|
-
*
|
|
44022
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44023
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44024
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44025
|
-
* distinction was only ever used to route role-specific procedures
|
|
44026
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44027
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44028
|
-
*/
|
|
44029
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44030
|
-
var MethodAccessSchema = _enum([
|
|
44031
|
-
"view",
|
|
44032
|
-
"create",
|
|
44033
|
-
"delete"
|
|
44034
|
-
]);
|
|
44035
|
-
/**
|
|
44036
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44037
|
-
* semantics; the first match decides whether the call passes:
|
|
44038
|
-
*
|
|
44039
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44040
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44041
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44042
|
-
* reachable to every user with `category:device [...]` without a
|
|
44043
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44044
|
-
*
|
|
44045
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44046
|
-
* useful when an integration needs to interact with one specific
|
|
44047
|
-
* addon's surface regardless of how many caps it exports.
|
|
44048
|
-
*
|
|
44049
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44050
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44051
|
-
* and nothing else.
|
|
44052
|
-
*
|
|
44053
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44054
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44055
|
-
*/
|
|
44056
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44057
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44058
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44059
|
-
/**
|
|
44060
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44061
|
-
*
|
|
44062
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44063
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44064
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44065
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44066
|
-
*
|
|
44067
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44068
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44069
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44070
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44071
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44072
|
-
* is NOT covered until the grant is edited.
|
|
44073
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44074
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44075
|
-
* re-resolves on the next request.
|
|
44076
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44077
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44078
|
-
* null/unset location matches NO `locations` selector.
|
|
44079
|
-
*/
|
|
44080
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44081
|
-
object({ kind: literal("all") }),
|
|
44082
|
-
object({
|
|
44083
|
-
kind: literal("ids"),
|
|
44084
|
-
ids: array(number().int()).min(1)
|
|
44085
|
-
}),
|
|
44086
|
-
object({
|
|
44087
|
-
kind: literal("types"),
|
|
44088
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44089
|
-
}),
|
|
44090
|
-
object({
|
|
44091
|
-
kind: literal("locations"),
|
|
44092
|
-
locations: array(string().min(1)).min(1)
|
|
44093
|
-
})
|
|
44094
|
-
]);
|
|
44095
|
-
var DeviceTokenScopeSchema = object({
|
|
44096
|
-
type: literal("device"),
|
|
44097
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44098
|
-
selector: DeviceSelectorSchema,
|
|
44099
|
-
access: array(MethodAccessSchema).min(1),
|
|
44100
|
-
/**
|
|
44101
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44102
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44103
|
-
* Direction is parent → children ONLY.
|
|
44104
|
-
*
|
|
44105
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44106
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44107
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44108
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44109
|
-
* explicitly to override that default per grant.
|
|
44110
|
-
*/
|
|
44111
|
-
includeLinked: boolean().optional()
|
|
44112
|
-
});
|
|
44113
|
-
/**
|
|
44114
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44115
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44116
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44117
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44118
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44119
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44120
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44121
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44122
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44123
|
-
*/
|
|
44124
|
-
function migrateLegacyTokenScope(raw) {
|
|
44125
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44126
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44127
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44128
|
-
const targets = Reflect.get(raw, "targets");
|
|
44129
|
-
if (!Array.isArray(targets)) return raw;
|
|
44130
|
-
return {
|
|
44131
|
-
type: "device",
|
|
44132
|
-
selector: {
|
|
44133
|
-
kind: "ids",
|
|
44134
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44135
|
-
},
|
|
44136
|
-
access: Reflect.get(raw, "access")
|
|
44137
|
-
};
|
|
44138
|
-
}
|
|
44139
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44140
|
-
object({
|
|
44141
|
-
type: literal("category"),
|
|
44142
|
-
target: CapScopeSchema,
|
|
44143
|
-
access: array(MethodAccessSchema).min(1)
|
|
44144
|
-
}),
|
|
44145
|
-
object({
|
|
44146
|
-
type: literal("capability"),
|
|
44147
|
-
target: string(),
|
|
44148
|
-
access: array(MethodAccessSchema).min(1)
|
|
44149
|
-
}),
|
|
44150
|
-
object({
|
|
44151
|
-
type: literal("addon"),
|
|
44152
|
-
target: string(),
|
|
44153
|
-
access: array(MethodAccessSchema).min(1)
|
|
44154
|
-
}),
|
|
44155
|
-
DeviceTokenScopeSchema
|
|
44156
|
-
]));
|
|
44157
|
-
object({
|
|
44158
|
-
id: string(),
|
|
44159
|
-
username: string(),
|
|
44160
|
-
passwordHash: string(),
|
|
44161
|
-
/**
|
|
44162
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44163
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44164
|
-
* role enum collapsed onto this boolean in v2.
|
|
44165
|
-
*/
|
|
44166
|
-
isAdmin: boolean().default(false),
|
|
44167
|
-
allowedProviders: AllowedProviderSchema,
|
|
44168
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44169
|
-
/**
|
|
44170
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44171
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44172
|
-
* protected call.
|
|
44173
|
-
*/
|
|
44174
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44175
|
-
createdAt: number(),
|
|
44176
|
-
updatedAt: number()
|
|
44177
|
-
});
|
|
44178
|
-
object({
|
|
44179
|
-
id: string(),
|
|
44180
|
-
label: string(),
|
|
44181
|
-
isAdmin: boolean().default(false),
|
|
44182
|
-
allowedProviders: AllowedProviderSchema,
|
|
44183
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44184
|
-
tokenHash: string(),
|
|
44185
|
-
tokenPrefix: string(),
|
|
44186
|
-
createdAt: number(),
|
|
44187
|
-
lastUsedAt: number().optional()
|
|
44188
|
-
});
|
|
44189
|
-
object({
|
|
44190
|
-
id: string(),
|
|
44191
|
-
userId: string(),
|
|
44192
|
-
name: string(),
|
|
44193
|
-
tokenHash: string(),
|
|
44194
|
-
tokenPrefix: string(),
|
|
44195
|
-
scopes: array(TokenScopeSchema),
|
|
44196
|
-
expiresAt: number().nullish(),
|
|
44197
|
-
lastUsedAt: number().nullish(),
|
|
44198
|
-
createdAt: number()
|
|
44199
|
-
});
|
|
44200
|
-
/**
|
|
44201
44253
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44202
44254
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44203
44255
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51147,7 +51199,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51147
51199
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51148
51200
|
kind: "mutation",
|
|
51149
51201
|
auth: "admin"
|
|
51150
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51202
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51203
|
+
clear: boolean(),
|
|
51204
|
+
repointLocationId: string().optional()
|
|
51205
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51151
51206
|
kind: "mutation",
|
|
51152
51207
|
auth: "admin"
|
|
51153
51208
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -55411,6 +55466,11 @@ onStatusChanged: { data: object({
|
|
|
55411
55466
|
*
|
|
55412
55467
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55413
55468
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55469
|
+
*
|
|
55470
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55471
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55472
|
+
* the link is down, or the description does not carry it) and is never
|
|
55473
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55414
55474
|
*/
|
|
55415
55475
|
var DishwasherStateSchema = _enum([
|
|
55416
55476
|
"idle",
|
|
@@ -55420,43 +55480,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55420
55480
|
"error",
|
|
55421
55481
|
"unavailable"
|
|
55422
55482
|
]);
|
|
55483
|
+
/**
|
|
55484
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55485
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55486
|
+
*/
|
|
55487
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55488
|
+
"Inactive",
|
|
55489
|
+
"Ready",
|
|
55490
|
+
"DelayedStart",
|
|
55491
|
+
"Run",
|
|
55492
|
+
"Pause",
|
|
55493
|
+
"ActionRequired",
|
|
55494
|
+
"Finished",
|
|
55495
|
+
"Error",
|
|
55496
|
+
"Aborting"
|
|
55497
|
+
]);
|
|
55498
|
+
/**
|
|
55499
|
+
* Why fields may be `null`:
|
|
55500
|
+
* - `available` — the link is up and the description is loaded;
|
|
55501
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55502
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55503
|
+
* be loaded, so its values cannot be decoded.
|
|
55504
|
+
*/
|
|
55505
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55506
|
+
"available",
|
|
55507
|
+
"offline",
|
|
55508
|
+
"description-missing"
|
|
55509
|
+
]);
|
|
55423
55510
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55424
55511
|
"ok",
|
|
55425
55512
|
"low",
|
|
55426
55513
|
"empty"
|
|
55427
55514
|
]);
|
|
55428
55515
|
var DishwasherStatusSchema = object({
|
|
55516
|
+
availability: DishwasherAvailabilitySchema,
|
|
55517
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55429
55518
|
state: DishwasherStateSchema,
|
|
55430
|
-
/**
|
|
55519
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
55520
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
55521
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55431
55522
|
program: string().nullable(),
|
|
55432
|
-
/**
|
|
55523
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
55524
|
+
selectedProgram: string().nullable(),
|
|
55525
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55433
55526
|
availablePrograms: array(string()),
|
|
55434
|
-
/**
|
|
55435
|
-
|
|
55527
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
55528
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
55529
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
55530
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55436
55531
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55437
55532
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55438
|
-
/** True when the door is reported open. */
|
|
55439
|
-
doorOpen: boolean(),
|
|
55440
|
-
/** True when
|
|
55441
|
-
|
|
55442
|
-
/**
|
|
55443
|
-
|
|
55533
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
55534
|
+
doorOpen: boolean().nullable(),
|
|
55535
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
55536
|
+
doorLocked: boolean().nullable(),
|
|
55537
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
55538
|
+
remoteStartAllowed: boolean().nullable(),
|
|
55539
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
55540
|
+
remoteControlActive: boolean().nullable(),
|
|
55541
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
55542
|
+
localControlActive: boolean().nullable(),
|
|
55543
|
+
/** Main power / switched-on state; null when not known. */
|
|
55544
|
+
powerOn: boolean().nullable(),
|
|
55545
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
55546
|
+
powerState: string().nullable(),
|
|
55444
55547
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55445
55548
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55446
|
-
|
|
55447
|
-
|
|
55549
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
55550
|
+
halfLoad: boolean().nullable(),
|
|
55551
|
+
hygienePlus: boolean().nullable(),
|
|
55448
55552
|
/** Extra dry option when the appliance exposes it. */
|
|
55449
|
-
extraDry: boolean(),
|
|
55553
|
+
extraDry: boolean().nullable(),
|
|
55450
55554
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55451
|
-
intensiveZone: boolean(),
|
|
55555
|
+
intensiveZone: boolean().nullable(),
|
|
55452
55556
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55453
|
-
varioSpeedPlus: boolean(),
|
|
55454
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55455
|
-
childLock: boolean(),
|
|
55557
|
+
varioSpeedPlus: boolean().nullable(),
|
|
55558
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
55559
|
+
childLock: boolean().nullable(),
|
|
55560
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
55561
|
+
activeEvents: array(string()),
|
|
55562
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55456
55563
|
errorCode: number().nullable(),
|
|
55564
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55457
55565
|
errorLabel: string().nullable(),
|
|
55566
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55458
55567
|
lastFetchedAt: number()
|
|
55459
55568
|
});
|
|
55569
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
55570
|
+
/** A value a program option or setting can take. */
|
|
55571
|
+
var DishwasherValueSchema = union([
|
|
55572
|
+
boolean(),
|
|
55573
|
+
string(),
|
|
55574
|
+
number()
|
|
55575
|
+
]);
|
|
55576
|
+
var DishwasherAccessSchema = _enum([
|
|
55577
|
+
"none",
|
|
55578
|
+
"read",
|
|
55579
|
+
"readWrite",
|
|
55580
|
+
"writeOnly",
|
|
55581
|
+
"readStatic"
|
|
55582
|
+
]);
|
|
55583
|
+
/**
|
|
55584
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
55585
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
55586
|
+
*/
|
|
55587
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
55588
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
55589
|
+
key: string(),
|
|
55590
|
+
/** Last segment of the key, for display. */
|
|
55591
|
+
name: string(),
|
|
55592
|
+
type: _enum([
|
|
55593
|
+
"boolean",
|
|
55594
|
+
"number",
|
|
55595
|
+
"enum",
|
|
55596
|
+
"string"
|
|
55597
|
+
]),
|
|
55598
|
+
access: DishwasherAccessSchema,
|
|
55599
|
+
/** The appliance reports this entity as currently available. */
|
|
55600
|
+
available: boolean(),
|
|
55601
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
55602
|
+
unit: string().nullable(),
|
|
55603
|
+
min: number().nullable(),
|
|
55604
|
+
max: number().nullable(),
|
|
55605
|
+
step: number().nullable(),
|
|
55606
|
+
/** Allowed members of an enum; null for other types. */
|
|
55607
|
+
enumValues: array(string()).nullable(),
|
|
55608
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
55609
|
+
});
|
|
55610
|
+
var DishwasherProgramSchema = object({
|
|
55611
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
55612
|
+
key: string(),
|
|
55613
|
+
name: string(),
|
|
55614
|
+
/** The appliance currently offers this program. */
|
|
55615
|
+
available: boolean(),
|
|
55616
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
55617
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55618
|
+
});
|
|
55619
|
+
var DishwasherOptionsSchema = object({
|
|
55620
|
+
availability: DishwasherAvailabilitySchema,
|
|
55621
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
55622
|
+
supportsStart: boolean(),
|
|
55623
|
+
supportsPause: boolean(),
|
|
55624
|
+
supportsResume: boolean(),
|
|
55625
|
+
supportsStop: boolean(),
|
|
55626
|
+
supportsPower: boolean(),
|
|
55627
|
+
/** Every program the description lists, with its options. */
|
|
55628
|
+
programs: array(DishwasherProgramSchema),
|
|
55629
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
55630
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
55631
|
+
});
|
|
55460
55632
|
var dishwasherCapability = {
|
|
55461
55633
|
name: "dishwasher",
|
|
55462
55634
|
scope: "device",
|
|
@@ -55464,86 +55636,102 @@ var dishwasherCapability = {
|
|
|
55464
55636
|
mode: "singleton",
|
|
55465
55637
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55466
55638
|
methods: {
|
|
55467
|
-
|
|
55639
|
+
/**
|
|
55640
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
55641
|
+
* option feature keys; each is checked against the program's constraints.
|
|
55642
|
+
*/
|
|
55643
|
+
start: method(object({
|
|
55644
|
+
deviceId: DeviceIdSchema,
|
|
55645
|
+
program: string().min(1).optional(),
|
|
55646
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
55647
|
+
}), _void(), {
|
|
55468
55648
|
kind: "mutation",
|
|
55469
55649
|
auth: "protected"
|
|
55470
55650
|
}),
|
|
55471
|
-
pause: method(object({ deviceId:
|
|
55651
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55472
55652
|
kind: "mutation",
|
|
55473
55653
|
auth: "protected"
|
|
55474
55654
|
}),
|
|
55475
|
-
|
|
55655
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55656
|
+
kind: "mutation",
|
|
55657
|
+
auth: "protected"
|
|
55658
|
+
}),
|
|
55659
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55476
55660
|
kind: "mutation",
|
|
55477
55661
|
auth: "protected"
|
|
55478
55662
|
}),
|
|
55663
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55479
55664
|
setProgram: method(object({
|
|
55480
|
-
deviceId:
|
|
55665
|
+
deviceId: DeviceIdSchema,
|
|
55481
55666
|
program: string().min(1)
|
|
55482
55667
|
}), _void(), {
|
|
55483
55668
|
kind: "mutation",
|
|
55484
55669
|
auth: "protected"
|
|
55485
55670
|
}),
|
|
55486
55671
|
setPower: method(object({
|
|
55487
|
-
deviceId:
|
|
55672
|
+
deviceId: DeviceIdSchema,
|
|
55488
55673
|
on: boolean()
|
|
55489
55674
|
}), _void(), {
|
|
55490
55675
|
kind: "mutation",
|
|
55491
55676
|
auth: "protected"
|
|
55492
55677
|
}),
|
|
55493
55678
|
setHalfLoad: method(object({
|
|
55494
|
-
deviceId:
|
|
55679
|
+
deviceId: DeviceIdSchema,
|
|
55495
55680
|
on: boolean()
|
|
55496
55681
|
}), _void(), {
|
|
55497
55682
|
kind: "mutation",
|
|
55498
55683
|
auth: "protected"
|
|
55499
55684
|
}),
|
|
55500
55685
|
setHygienePlus: method(object({
|
|
55501
|
-
deviceId:
|
|
55686
|
+
deviceId: DeviceIdSchema,
|
|
55502
55687
|
on: boolean()
|
|
55503
55688
|
}), _void(), {
|
|
55504
55689
|
kind: "mutation",
|
|
55505
55690
|
auth: "protected"
|
|
55506
55691
|
}),
|
|
55507
55692
|
setExtraDry: method(object({
|
|
55508
|
-
deviceId:
|
|
55693
|
+
deviceId: DeviceIdSchema,
|
|
55509
55694
|
on: boolean()
|
|
55510
55695
|
}), _void(), {
|
|
55511
55696
|
kind: "mutation",
|
|
55512
55697
|
auth: "protected"
|
|
55513
55698
|
}),
|
|
55514
55699
|
setIntensiveZone: method(object({
|
|
55515
|
-
deviceId:
|
|
55700
|
+
deviceId: DeviceIdSchema,
|
|
55516
55701
|
on: boolean()
|
|
55517
55702
|
}), _void(), {
|
|
55518
55703
|
kind: "mutation",
|
|
55519
55704
|
auth: "protected"
|
|
55520
55705
|
}),
|
|
55521
55706
|
setVarioSpeedPlus: method(object({
|
|
55522
|
-
deviceId:
|
|
55707
|
+
deviceId: DeviceIdSchema,
|
|
55523
55708
|
on: boolean()
|
|
55524
55709
|
}), _void(), {
|
|
55525
55710
|
kind: "mutation",
|
|
55526
55711
|
auth: "protected"
|
|
55527
55712
|
}),
|
|
55528
55713
|
setChildLock: method(object({
|
|
55529
|
-
deviceId:
|
|
55714
|
+
deviceId: DeviceIdSchema,
|
|
55530
55715
|
on: boolean()
|
|
55531
55716
|
}), _void(), {
|
|
55532
55717
|
kind: "mutation",
|
|
55533
55718
|
auth: "protected"
|
|
55534
55719
|
}),
|
|
55720
|
+
/**
|
|
55721
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
55722
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
55723
|
+
* its declared range / members.
|
|
55724
|
+
*/
|
|
55535
55725
|
setOption: method(object({
|
|
55536
|
-
deviceId:
|
|
55726
|
+
deviceId: DeviceIdSchema,
|
|
55537
55727
|
key: string().min(1),
|
|
55538
|
-
value:
|
|
55539
|
-
boolean(),
|
|
55540
|
-
string(),
|
|
55541
|
-
number()
|
|
55542
|
-
])
|
|
55728
|
+
value: DishwasherValueSchema
|
|
55543
55729
|
}), _void(), {
|
|
55544
55730
|
kind: "mutation",
|
|
55545
55731
|
auth: "protected"
|
|
55546
|
-
})
|
|
55732
|
+
}),
|
|
55733
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
55734
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
55547
55735
|
},
|
|
55548
55736
|
status: {
|
|
55549
55737
|
schema: DishwasherStatusSchema,
|
|
@@ -69492,6 +69680,12 @@ Object.freeze({
|
|
|
69492
69680
|
addonId: null,
|
|
69493
69681
|
access: "view"
|
|
69494
69682
|
},
|
|
69683
|
+
"dishwasher.getOptions": {
|
|
69684
|
+
capName: "dishwasher",
|
|
69685
|
+
capScope: "device",
|
|
69686
|
+
addonId: null,
|
|
69687
|
+
access: "view"
|
|
69688
|
+
},
|
|
69495
69689
|
"dishwasher.getStatus": {
|
|
69496
69690
|
capName: "dishwasher",
|
|
69497
69691
|
capScope: "device",
|
|
@@ -69504,6 +69698,12 @@ Object.freeze({
|
|
|
69504
69698
|
addonId: null,
|
|
69505
69699
|
access: "create"
|
|
69506
69700
|
},
|
|
69701
|
+
"dishwasher.resume": {
|
|
69702
|
+
capName: "dishwasher",
|
|
69703
|
+
capScope: "device",
|
|
69704
|
+
addonId: null,
|
|
69705
|
+
access: "create"
|
|
69706
|
+
},
|
|
69507
69707
|
"dishwasher.setChildLock": {
|
|
69508
69708
|
capName: "dishwasher",
|
|
69509
69709
|
capScope: "device",
|
|
@@ -74004,6 +74204,12 @@ Object.freeze({
|
|
|
74004
74204
|
addonId: null,
|
|
74005
74205
|
access: "view"
|
|
74006
74206
|
},
|
|
74207
|
+
"storageMigration.moverClearance": {
|
|
74208
|
+
capName: "storage-migration",
|
|
74209
|
+
capScope: "system",
|
|
74210
|
+
addonId: null,
|
|
74211
|
+
access: "view"
|
|
74212
|
+
},
|
|
74007
74213
|
"storageMigration.movers": {
|
|
74008
74214
|
capName: "storage-migration",
|
|
74009
74215
|
capScope: "system",
|
|
@@ -76197,6 +76403,11 @@ Object.freeze({
|
|
|
76197
76403
|
form: "single",
|
|
76198
76404
|
optional: false
|
|
76199
76405
|
}],
|
|
76406
|
+
"dishwasher.getOptions": [{
|
|
76407
|
+
name: "deviceId",
|
|
76408
|
+
form: "single",
|
|
76409
|
+
optional: false
|
|
76410
|
+
}],
|
|
76200
76411
|
"dishwasher.getStatus": [{
|
|
76201
76412
|
name: "deviceId",
|
|
76202
76413
|
form: "single",
|
|
@@ -76207,6 +76418,11 @@ Object.freeze({
|
|
|
76207
76418
|
form: "single",
|
|
76208
76419
|
optional: false
|
|
76209
76420
|
}],
|
|
76421
|
+
"dishwasher.resume": [{
|
|
76422
|
+
name: "deviceId",
|
|
76423
|
+
form: "single",
|
|
76424
|
+
optional: false
|
|
76425
|
+
}],
|
|
76210
76426
|
"dishwasher.setChildLock": [{
|
|
76211
76427
|
name: "deviceId",
|
|
76212
76428
|
form: "single",
|
|
@@ -78293,6 +78509,9 @@ new Map(Object.entries({
|
|
|
78293
78509
|
"wrapper-update-available": "system",
|
|
78294
78510
|
"backup-completed": "system",
|
|
78295
78511
|
"export-completed": "system",
|
|
78512
|
+
"alert-critical": "system",
|
|
78513
|
+
"alert-error": "system",
|
|
78514
|
+
"alert-critical-resolved": "system",
|
|
78296
78515
|
"storage-location-low": "system",
|
|
78297
78516
|
"storage-location-critical": "system",
|
|
78298
78517
|
"storage-location-ok": "system",
|
|
@@ -78417,6 +78636,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
78417
78636
|
"storage-location-ok"
|
|
78418
78637
|
]
|
|
78419
78638
|
},
|
|
78639
|
+
{
|
|
78640
|
+
id: "alerts",
|
|
78641
|
+
family: "system",
|
|
78642
|
+
label: "Alerts",
|
|
78643
|
+
kinds: [
|
|
78644
|
+
"alert-critical",
|
|
78645
|
+
"alert-error",
|
|
78646
|
+
"alert-critical-resolved"
|
|
78647
|
+
]
|
|
78648
|
+
},
|
|
78420
78649
|
{
|
|
78421
78650
|
id: "alarm",
|
|
78422
78651
|
family: "alarm",
|
|
@@ -78461,6 +78690,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
78461
78690
|
return [[descriptor.kind, field]];
|
|
78462
78691
|
})));
|
|
78463
78692
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
78693
|
+
object({
|
|
78694
|
+
phase: _enum(["raised", "resolved"]),
|
|
78695
|
+
episodeId: string().min(1),
|
|
78696
|
+
alertId: string().min(1),
|
|
78697
|
+
severity: AlertSeveritySchema,
|
|
78698
|
+
category: string(),
|
|
78699
|
+
title: string(),
|
|
78700
|
+
message: string(),
|
|
78701
|
+
sourceType: string().optional(),
|
|
78702
|
+
sourceId: string().optional(),
|
|
78703
|
+
nodeId: string().optional(),
|
|
78704
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
78705
|
+
actionUrl: string().optional(),
|
|
78706
|
+
at: number()
|
|
78707
|
+
});
|
|
78464
78708
|
var RULE_BODY_ONLY = ["body"];
|
|
78465
78709
|
var RULE_TEXT = ["title", "body"];
|
|
78466
78710
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -78470,6 +78714,11 @@ var TANK = [
|
|
|
78470
78714
|
"device-tank-full",
|
|
78471
78715
|
"device-tank-normal"
|
|
78472
78716
|
];
|
|
78717
|
+
var ALERT_EPISODE = [
|
|
78718
|
+
"alert-critical",
|
|
78719
|
+
"alert-error",
|
|
78720
|
+
"alert-critical-resolved"
|
|
78721
|
+
];
|
|
78473
78722
|
var UPDATES = [
|
|
78474
78723
|
"addon-update-available",
|
|
78475
78724
|
"server-update-available",
|
|
@@ -78662,14 +78911,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
78662
78911
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
78663
78912
|
([...RULE_TEXT], [...TANK]),
|
|
78664
78913
|
[...RULE_TEXT],
|
|
78665
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78666
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
78667
|
-
[...RULE_TEXT],
|
|
78914
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78915
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
78668
78916
|
[...RULE_TEXT],
|
|
78669
78917
|
[...RULE_TEXT],
|
|
78670
78918
|
[...RULE_TEXT],
|
|
78671
78919
|
[...RULE_TEXT],
|
|
78672
78920
|
[...RULE_TEXT],
|
|
78921
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78673
78922
|
[...RULE_TEXT],
|
|
78674
78923
|
[...RULE_TEXT],
|
|
78675
78924
|
[...RULE_TEXT],
|
|
@@ -78687,7 +78936,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
78687
78936
|
[...RULE_TEXT],
|
|
78688
78937
|
[...RULE_TEXT],
|
|
78689
78938
|
[...RULE_TEXT],
|
|
78690
|
-
[...RULE_TEXT],
|
|
78939
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78940
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78941
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78942
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78943
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
78691
78944
|
[...RULE_TEXT],
|
|
78692
78945
|
[...RULE_TEXT],
|
|
78693
78946
|
[...RULE_TEXT],
|