@camstack/addon-provider-amcrest 0.2.139 → 0.2.141
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
|
@@ -35,7 +35,7 @@ let node_stream_promises = require("node:stream/promises");
|
|
|
35
35
|
let node_child_process = require("node:child_process");
|
|
36
36
|
require("node:zlib");
|
|
37
37
|
let node_os = require("node:os");
|
|
38
|
-
//#region ../types/dist/event-category-
|
|
38
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
39
39
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
40
40
|
EventCategory["SystemBoot"] = "system.boot";
|
|
41
41
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -114,9 +114,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
114
114
|
/**
|
|
115
115
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
116
116
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
117
|
-
* alert centre turns it into one
|
|
117
|
+
* alert centre turns it into one critical alert.
|
|
118
118
|
*/
|
|
119
119
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
120
|
+
/**
|
|
121
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
122
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
123
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
124
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
125
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
126
|
+
* event may be dropped (D8, D11).
|
|
127
|
+
*/
|
|
128
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
120
129
|
EventCategory["AddonError"] = "addon.error";
|
|
121
130
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
122
131
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5441,7 +5450,7 @@ var ZodIssueCode = {
|
|
|
5441
5450
|
var ZodFirstPartyTypeKind;
|
|
5442
5451
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5443
5452
|
//#endregion
|
|
5444
|
-
//#region ../types/dist/sleep-
|
|
5453
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5445
5454
|
/**
|
|
5446
5455
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5447
5456
|
* window to float samples (D455).
|
|
@@ -7823,6 +7832,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7823
7832
|
if (Array.isArray(result)) return { providers: result };
|
|
7824
7833
|
return result;
|
|
7825
7834
|
}
|
|
7835
|
+
/**
|
|
7836
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7837
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7838
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7839
|
+
*/
|
|
7840
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7826
7841
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7827
7842
|
var PeerBytesTicketSchema = object({
|
|
7828
7843
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12512,6 +12527,229 @@ var ConvertResultSchema = object({
|
|
|
12512
12527
|
files: array(string()).readonly()
|
|
12513
12528
|
})).readonly()
|
|
12514
12529
|
});
|
|
12530
|
+
/**
|
|
12531
|
+
* Zod schemas for persisted record types.
|
|
12532
|
+
*
|
|
12533
|
+
* These schemas serve as the single source of truth for types that are
|
|
12534
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12535
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12536
|
+
* enabling runtime validation when reading from the backend.
|
|
12537
|
+
*
|
|
12538
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12539
|
+
* keeps the original name for backward compatibility.
|
|
12540
|
+
*/
|
|
12541
|
+
/**
|
|
12542
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12543
|
+
*
|
|
12544
|
+
* Two principals:
|
|
12545
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12546
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12547
|
+
*
|
|
12548
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12549
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12550
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12551
|
+
* distinction was only ever used to route role-specific procedures
|
|
12552
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12553
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12554
|
+
*/
|
|
12555
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12556
|
+
var MethodAccessSchema = _enum([
|
|
12557
|
+
"view",
|
|
12558
|
+
"create",
|
|
12559
|
+
"delete"
|
|
12560
|
+
]);
|
|
12561
|
+
/**
|
|
12562
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12563
|
+
* semantics; the first match decides whether the call passes:
|
|
12564
|
+
*
|
|
12565
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12566
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12567
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12568
|
+
* reachable to every user with `category:device [...]` without a
|
|
12569
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12570
|
+
*
|
|
12571
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12572
|
+
* useful when an integration needs to interact with one specific
|
|
12573
|
+
* addon's surface regardless of how many caps it exports.
|
|
12574
|
+
*
|
|
12575
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12576
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12577
|
+
* and nothing else.
|
|
12578
|
+
*
|
|
12579
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12580
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12581
|
+
*/
|
|
12582
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12583
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12584
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12585
|
+
/**
|
|
12586
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12587
|
+
*
|
|
12588
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12589
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12590
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12591
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12592
|
+
*
|
|
12593
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12594
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12595
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12596
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12597
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12598
|
+
* is NOT covered until the grant is edited.
|
|
12599
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12600
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12601
|
+
* re-resolves on the next request.
|
|
12602
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12603
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12604
|
+
* null/unset location matches NO `locations` selector.
|
|
12605
|
+
*/
|
|
12606
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12607
|
+
object({ kind: literal("all") }),
|
|
12608
|
+
object({
|
|
12609
|
+
kind: literal("ids"),
|
|
12610
|
+
ids: array(number().int()).min(1)
|
|
12611
|
+
}),
|
|
12612
|
+
object({
|
|
12613
|
+
kind: literal("types"),
|
|
12614
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12615
|
+
}),
|
|
12616
|
+
object({
|
|
12617
|
+
kind: literal("locations"),
|
|
12618
|
+
locations: array(string().min(1)).min(1)
|
|
12619
|
+
})
|
|
12620
|
+
]);
|
|
12621
|
+
var DeviceTokenScopeSchema = object({
|
|
12622
|
+
type: literal("device"),
|
|
12623
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12624
|
+
selector: DeviceSelectorSchema,
|
|
12625
|
+
access: array(MethodAccessSchema).min(1),
|
|
12626
|
+
/**
|
|
12627
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12628
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12629
|
+
* Direction is parent → children ONLY.
|
|
12630
|
+
*
|
|
12631
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12632
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12633
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12634
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12635
|
+
* explicitly to override that default per grant.
|
|
12636
|
+
*/
|
|
12637
|
+
includeLinked: boolean().optional()
|
|
12638
|
+
});
|
|
12639
|
+
/**
|
|
12640
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12641
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12642
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12643
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12644
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12645
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12646
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12647
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12648
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12649
|
+
*/
|
|
12650
|
+
function migrateLegacyTokenScope(raw) {
|
|
12651
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12652
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12653
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12654
|
+
const targets = Reflect.get(raw, "targets");
|
|
12655
|
+
if (!Array.isArray(targets)) return raw;
|
|
12656
|
+
return {
|
|
12657
|
+
type: "device",
|
|
12658
|
+
selector: {
|
|
12659
|
+
kind: "ids",
|
|
12660
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12661
|
+
},
|
|
12662
|
+
access: Reflect.get(raw, "access")
|
|
12663
|
+
};
|
|
12664
|
+
}
|
|
12665
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12666
|
+
object({
|
|
12667
|
+
type: literal("category"),
|
|
12668
|
+
target: CapScopeSchema,
|
|
12669
|
+
access: array(MethodAccessSchema).min(1)
|
|
12670
|
+
}),
|
|
12671
|
+
object({
|
|
12672
|
+
type: literal("capability"),
|
|
12673
|
+
target: string(),
|
|
12674
|
+
access: array(MethodAccessSchema).min(1)
|
|
12675
|
+
}),
|
|
12676
|
+
object({
|
|
12677
|
+
type: literal("addon"),
|
|
12678
|
+
target: string(),
|
|
12679
|
+
access: array(MethodAccessSchema).min(1)
|
|
12680
|
+
}),
|
|
12681
|
+
DeviceTokenScopeSchema
|
|
12682
|
+
]));
|
|
12683
|
+
object({
|
|
12684
|
+
id: string(),
|
|
12685
|
+
username: string(),
|
|
12686
|
+
passwordHash: string(),
|
|
12687
|
+
/**
|
|
12688
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12689
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12690
|
+
* role enum collapsed onto this boolean in v2.
|
|
12691
|
+
*/
|
|
12692
|
+
isAdmin: boolean().default(false),
|
|
12693
|
+
allowedProviders: AllowedProviderSchema,
|
|
12694
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12695
|
+
/**
|
|
12696
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12697
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12698
|
+
* protected call.
|
|
12699
|
+
*/
|
|
12700
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12701
|
+
createdAt: number(),
|
|
12702
|
+
updatedAt: number()
|
|
12703
|
+
});
|
|
12704
|
+
object({
|
|
12705
|
+
id: string(),
|
|
12706
|
+
label: string(),
|
|
12707
|
+
isAdmin: boolean().default(false),
|
|
12708
|
+
allowedProviders: AllowedProviderSchema,
|
|
12709
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12710
|
+
tokenHash: string(),
|
|
12711
|
+
tokenPrefix: string(),
|
|
12712
|
+
createdAt: number(),
|
|
12713
|
+
lastUsedAt: number().optional()
|
|
12714
|
+
});
|
|
12715
|
+
object({
|
|
12716
|
+
id: string(),
|
|
12717
|
+
userId: string(),
|
|
12718
|
+
name: string(),
|
|
12719
|
+
tokenHash: string(),
|
|
12720
|
+
tokenPrefix: string(),
|
|
12721
|
+
scopes: array(TokenScopeSchema),
|
|
12722
|
+
expiresAt: number().nullish(),
|
|
12723
|
+
lastUsedAt: number().nullish(),
|
|
12724
|
+
createdAt: number()
|
|
12725
|
+
});
|
|
12726
|
+
/** What a share-view grant lets its holder see. */
|
|
12727
|
+
var ShareViewGrantSchema = object({
|
|
12728
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
12729
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
12730
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
12731
|
+
talk: boolean().optional()
|
|
12732
|
+
});
|
|
12733
|
+
var ShareViewScopeSchema = object({
|
|
12734
|
+
type: literal("share-view"),
|
|
12735
|
+
grant: ShareViewGrantSchema
|
|
12736
|
+
});
|
|
12737
|
+
var AddonRoutesScopeSchema = object({
|
|
12738
|
+
type: literal("addon-routes"),
|
|
12739
|
+
access: array(MethodAccessSchema).min(1)
|
|
12740
|
+
});
|
|
12741
|
+
var CredentialScopeSchema = union([
|
|
12742
|
+
literal("*"),
|
|
12743
|
+
ShareViewScopeSchema,
|
|
12744
|
+
AddonRoutesScopeSchema,
|
|
12745
|
+
TokenScopeSchema
|
|
12746
|
+
]);
|
|
12747
|
+
object({
|
|
12748
|
+
kind: literal("credential"),
|
|
12749
|
+
sub: string().min(1),
|
|
12750
|
+
jti: string().min(16),
|
|
12751
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
12752
|
+
});
|
|
12515
12753
|
_enum(["new-session", "step-up"]);
|
|
12516
12754
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12517
12755
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13228,7 +13466,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13228
13466
|
]);
|
|
13229
13467
|
var AlertActionSchema = object({
|
|
13230
13468
|
label: string(),
|
|
13231
|
-
href: string().optional()
|
|
13469
|
+
href: string().optional(),
|
|
13470
|
+
/**
|
|
13471
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13472
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13473
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13474
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13475
|
+
*/
|
|
13476
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13232
13477
|
});
|
|
13233
13478
|
var AlertStatusSchema = _enum([
|
|
13234
13479
|
"active",
|
|
@@ -42057,6 +42302,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42057
42302
|
"server-updated",
|
|
42058
42303
|
"export-completed",
|
|
42059
42304
|
"backup-completed",
|
|
42305
|
+
"alert-critical",
|
|
42306
|
+
"alert-error",
|
|
42307
|
+
"alert-critical-resolved",
|
|
42060
42308
|
"camera-online",
|
|
42061
42309
|
"camera-offline",
|
|
42062
42310
|
"camera-disabled",
|
|
@@ -44092,202 +44340,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
44092
44340
|
auth: "admin"
|
|
44093
44341
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
44094
44342
|
/**
|
|
44095
|
-
* Zod schemas for persisted record types.
|
|
44096
|
-
*
|
|
44097
|
-
* These schemas serve as the single source of truth for types that are
|
|
44098
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
44099
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
44100
|
-
* enabling runtime validation when reading from the backend.
|
|
44101
|
-
*
|
|
44102
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
44103
|
-
* keeps the original name for backward compatibility.
|
|
44104
|
-
*/
|
|
44105
|
-
/**
|
|
44106
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
44107
|
-
*
|
|
44108
|
-
* Two principals:
|
|
44109
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
44110
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
44111
|
-
*
|
|
44112
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
44113
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
44114
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
44115
|
-
* distinction was only ever used to route role-specific procedures
|
|
44116
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
44117
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
44118
|
-
*/
|
|
44119
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
44120
|
-
var MethodAccessSchema = _enum([
|
|
44121
|
-
"view",
|
|
44122
|
-
"create",
|
|
44123
|
-
"delete"
|
|
44124
|
-
]);
|
|
44125
|
-
/**
|
|
44126
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
44127
|
-
* semantics; the first match decides whether the call passes:
|
|
44128
|
-
*
|
|
44129
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
44130
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
44131
|
-
* automatically — adding a device cap to the codebase makes it
|
|
44132
|
-
* reachable to every user with `category:device [...]` without a
|
|
44133
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
44134
|
-
*
|
|
44135
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
44136
|
-
* useful when an integration needs to interact with one specific
|
|
44137
|
-
* addon's surface regardless of how many caps it exports.
|
|
44138
|
-
*
|
|
44139
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
44140
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
44141
|
-
* and nothing else.
|
|
44142
|
-
*
|
|
44143
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
44144
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
44145
|
-
*/
|
|
44146
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
44147
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
44148
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
44149
|
-
/**
|
|
44150
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
44151
|
-
*
|
|
44152
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
44153
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
44154
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
44155
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
44156
|
-
*
|
|
44157
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
44158
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
44159
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44160
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44161
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44162
|
-
* is NOT covered until the grant is edited.
|
|
44163
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44164
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44165
|
-
* re-resolves on the next request.
|
|
44166
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44167
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44168
|
-
* null/unset location matches NO `locations` selector.
|
|
44169
|
-
*/
|
|
44170
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44171
|
-
object({ kind: literal("all") }),
|
|
44172
|
-
object({
|
|
44173
|
-
kind: literal("ids"),
|
|
44174
|
-
ids: array(number().int()).min(1)
|
|
44175
|
-
}),
|
|
44176
|
-
object({
|
|
44177
|
-
kind: literal("types"),
|
|
44178
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44179
|
-
}),
|
|
44180
|
-
object({
|
|
44181
|
-
kind: literal("locations"),
|
|
44182
|
-
locations: array(string().min(1)).min(1)
|
|
44183
|
-
})
|
|
44184
|
-
]);
|
|
44185
|
-
var DeviceTokenScopeSchema = object({
|
|
44186
|
-
type: literal("device"),
|
|
44187
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44188
|
-
selector: DeviceSelectorSchema,
|
|
44189
|
-
access: array(MethodAccessSchema).min(1),
|
|
44190
|
-
/**
|
|
44191
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44192
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44193
|
-
* Direction is parent → children ONLY.
|
|
44194
|
-
*
|
|
44195
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44196
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44197
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44198
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44199
|
-
* explicitly to override that default per grant.
|
|
44200
|
-
*/
|
|
44201
|
-
includeLinked: boolean().optional()
|
|
44202
|
-
});
|
|
44203
|
-
/**
|
|
44204
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44205
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44206
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44207
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44208
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44209
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44210
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44211
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44212
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44213
|
-
*/
|
|
44214
|
-
function migrateLegacyTokenScope(raw) {
|
|
44215
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44216
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44217
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44218
|
-
const targets = Reflect.get(raw, "targets");
|
|
44219
|
-
if (!Array.isArray(targets)) return raw;
|
|
44220
|
-
return {
|
|
44221
|
-
type: "device",
|
|
44222
|
-
selector: {
|
|
44223
|
-
kind: "ids",
|
|
44224
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44225
|
-
},
|
|
44226
|
-
access: Reflect.get(raw, "access")
|
|
44227
|
-
};
|
|
44228
|
-
}
|
|
44229
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44230
|
-
object({
|
|
44231
|
-
type: literal("category"),
|
|
44232
|
-
target: CapScopeSchema,
|
|
44233
|
-
access: array(MethodAccessSchema).min(1)
|
|
44234
|
-
}),
|
|
44235
|
-
object({
|
|
44236
|
-
type: literal("capability"),
|
|
44237
|
-
target: string(),
|
|
44238
|
-
access: array(MethodAccessSchema).min(1)
|
|
44239
|
-
}),
|
|
44240
|
-
object({
|
|
44241
|
-
type: literal("addon"),
|
|
44242
|
-
target: string(),
|
|
44243
|
-
access: array(MethodAccessSchema).min(1)
|
|
44244
|
-
}),
|
|
44245
|
-
DeviceTokenScopeSchema
|
|
44246
|
-
]));
|
|
44247
|
-
object({
|
|
44248
|
-
id: string(),
|
|
44249
|
-
username: string(),
|
|
44250
|
-
passwordHash: string(),
|
|
44251
|
-
/**
|
|
44252
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44253
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44254
|
-
* role enum collapsed onto this boolean in v2.
|
|
44255
|
-
*/
|
|
44256
|
-
isAdmin: boolean().default(false),
|
|
44257
|
-
allowedProviders: AllowedProviderSchema,
|
|
44258
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44259
|
-
/**
|
|
44260
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44261
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44262
|
-
* protected call.
|
|
44263
|
-
*/
|
|
44264
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44265
|
-
createdAt: number(),
|
|
44266
|
-
updatedAt: number()
|
|
44267
|
-
});
|
|
44268
|
-
object({
|
|
44269
|
-
id: string(),
|
|
44270
|
-
label: string(),
|
|
44271
|
-
isAdmin: boolean().default(false),
|
|
44272
|
-
allowedProviders: AllowedProviderSchema,
|
|
44273
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44274
|
-
tokenHash: string(),
|
|
44275
|
-
tokenPrefix: string(),
|
|
44276
|
-
createdAt: number(),
|
|
44277
|
-
lastUsedAt: number().optional()
|
|
44278
|
-
});
|
|
44279
|
-
object({
|
|
44280
|
-
id: string(),
|
|
44281
|
-
userId: string(),
|
|
44282
|
-
name: string(),
|
|
44283
|
-
tokenHash: string(),
|
|
44284
|
-
tokenPrefix: string(),
|
|
44285
|
-
scopes: array(TokenScopeSchema),
|
|
44286
|
-
expiresAt: number().nullish(),
|
|
44287
|
-
lastUsedAt: number().nullish(),
|
|
44288
|
-
createdAt: number()
|
|
44289
|
-
});
|
|
44290
|
-
/**
|
|
44291
44343
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44292
44344
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44293
44345
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -51237,7 +51289,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
51237
51289
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
51238
51290
|
kind: "mutation",
|
|
51239
51291
|
auth: "admin"
|
|
51240
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
51292
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
51293
|
+
clear: boolean(),
|
|
51294
|
+
repointLocationId: string().optional()
|
|
51295
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
51241
51296
|
kind: "mutation",
|
|
51242
51297
|
auth: "admin"
|
|
51243
51298
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -55902,6 +55957,11 @@ onStatusChanged: { data: object({
|
|
|
55902
55957
|
*
|
|
55903
55958
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
55904
55959
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
55960
|
+
*
|
|
55961
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
55962
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
55963
|
+
* the link is down, or the description does not carry it) and is never
|
|
55964
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
55905
55965
|
*/
|
|
55906
55966
|
var DishwasherStateSchema = _enum([
|
|
55907
55967
|
"idle",
|
|
@@ -55911,43 +55971,155 @@ var DishwasherStateSchema = _enum([
|
|
|
55911
55971
|
"error",
|
|
55912
55972
|
"unavailable"
|
|
55913
55973
|
]);
|
|
55974
|
+
/**
|
|
55975
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
55976
|
+
* view for compact surfaces; this is what the appliance said.
|
|
55977
|
+
*/
|
|
55978
|
+
var DishwasherOperationStateSchema = _enum([
|
|
55979
|
+
"Inactive",
|
|
55980
|
+
"Ready",
|
|
55981
|
+
"DelayedStart",
|
|
55982
|
+
"Run",
|
|
55983
|
+
"Pause",
|
|
55984
|
+
"ActionRequired",
|
|
55985
|
+
"Finished",
|
|
55986
|
+
"Error",
|
|
55987
|
+
"Aborting"
|
|
55988
|
+
]);
|
|
55989
|
+
/**
|
|
55990
|
+
* Why fields may be `null`:
|
|
55991
|
+
* - `available` — the link is up and the description is loaded;
|
|
55992
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
55993
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
55994
|
+
* be loaded, so its values cannot be decoded.
|
|
55995
|
+
*/
|
|
55996
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
55997
|
+
"available",
|
|
55998
|
+
"offline",
|
|
55999
|
+
"description-missing"
|
|
56000
|
+
]);
|
|
55914
56001
|
var DishwasherConsumableLevelSchema = _enum([
|
|
55915
56002
|
"ok",
|
|
55916
56003
|
"low",
|
|
55917
56004
|
"empty"
|
|
55918
56005
|
]);
|
|
55919
56006
|
var DishwasherStatusSchema = object({
|
|
56007
|
+
availability: DishwasherAvailabilitySchema,
|
|
56008
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
55920
56009
|
state: DishwasherStateSchema,
|
|
55921
|
-
/**
|
|
56010
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
56011
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
56012
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
55922
56013
|
program: string().nullable(),
|
|
55923
|
-
/**
|
|
56014
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
56015
|
+
selectedProgram: string().nullable(),
|
|
56016
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
55924
56017
|
availablePrograms: array(string()),
|
|
55925
|
-
/**
|
|
55926
|
-
|
|
56018
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
56019
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
56020
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
56021
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
55927
56022
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
55928
56023
|
progressPercent: number().min(0).max(100).nullable(),
|
|
55929
|
-
/** True when the door is reported open. */
|
|
55930
|
-
doorOpen: boolean(),
|
|
55931
|
-
/** True when
|
|
55932
|
-
|
|
55933
|
-
/**
|
|
55934
|
-
|
|
56024
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
56025
|
+
doorOpen: boolean().nullable(),
|
|
56026
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
56027
|
+
doorLocked: boolean().nullable(),
|
|
56028
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
56029
|
+
remoteStartAllowed: boolean().nullable(),
|
|
56030
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
56031
|
+
remoteControlActive: boolean().nullable(),
|
|
56032
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
56033
|
+
localControlActive: boolean().nullable(),
|
|
56034
|
+
/** Main power / switched-on state; null when not known. */
|
|
56035
|
+
powerOn: boolean().nullable(),
|
|
56036
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
56037
|
+
powerState: string().nullable(),
|
|
55935
56038
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55936
56039
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
55937
|
-
|
|
55938
|
-
|
|
56040
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
56041
|
+
halfLoad: boolean().nullable(),
|
|
56042
|
+
hygienePlus: boolean().nullable(),
|
|
55939
56043
|
/** Extra dry option when the appliance exposes it. */
|
|
55940
|
-
extraDry: boolean(),
|
|
56044
|
+
extraDry: boolean().nullable(),
|
|
55941
56045
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
55942
|
-
intensiveZone: boolean(),
|
|
56046
|
+
intensiveZone: boolean().nullable(),
|
|
55943
56047
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
55944
|
-
varioSpeedPlus: boolean(),
|
|
55945
|
-
/** Child lock (controls disabled on the appliance). */
|
|
55946
|
-
childLock: boolean(),
|
|
56048
|
+
varioSpeedPlus: boolean().nullable(),
|
|
56049
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
56050
|
+
childLock: boolean().nullable(),
|
|
56051
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
56052
|
+
activeEvents: array(string()),
|
|
56053
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
55947
56054
|
errorCode: number().nullable(),
|
|
56055
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
55948
56056
|
errorLabel: string().nullable(),
|
|
56057
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
55949
56058
|
lastFetchedAt: number()
|
|
55950
56059
|
});
|
|
56060
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
56061
|
+
/** A value a program option or setting can take. */
|
|
56062
|
+
var DishwasherValueSchema = union([
|
|
56063
|
+
boolean(),
|
|
56064
|
+
string(),
|
|
56065
|
+
number()
|
|
56066
|
+
]);
|
|
56067
|
+
var DishwasherAccessSchema = _enum([
|
|
56068
|
+
"none",
|
|
56069
|
+
"read",
|
|
56070
|
+
"readWrite",
|
|
56071
|
+
"writeOnly",
|
|
56072
|
+
"readStatic"
|
|
56073
|
+
]);
|
|
56074
|
+
/**
|
|
56075
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
56076
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
56077
|
+
*/
|
|
56078
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
56079
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
56080
|
+
key: string(),
|
|
56081
|
+
/** Last segment of the key, for display. */
|
|
56082
|
+
name: string(),
|
|
56083
|
+
type: _enum([
|
|
56084
|
+
"boolean",
|
|
56085
|
+
"number",
|
|
56086
|
+
"enum",
|
|
56087
|
+
"string"
|
|
56088
|
+
]),
|
|
56089
|
+
access: DishwasherAccessSchema,
|
|
56090
|
+
/** The appliance reports this entity as currently available. */
|
|
56091
|
+
available: boolean(),
|
|
56092
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
56093
|
+
unit: string().nullable(),
|
|
56094
|
+
min: number().nullable(),
|
|
56095
|
+
max: number().nullable(),
|
|
56096
|
+
step: number().nullable(),
|
|
56097
|
+
/** Allowed members of an enum; null for other types. */
|
|
56098
|
+
enumValues: array(string()).nullable(),
|
|
56099
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
56100
|
+
});
|
|
56101
|
+
var DishwasherProgramSchema = object({
|
|
56102
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
56103
|
+
key: string(),
|
|
56104
|
+
name: string(),
|
|
56105
|
+
/** The appliance currently offers this program. */
|
|
56106
|
+
available: boolean(),
|
|
56107
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
56108
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
56109
|
+
});
|
|
56110
|
+
var DishwasherOptionsSchema = object({
|
|
56111
|
+
availability: DishwasherAvailabilitySchema,
|
|
56112
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
56113
|
+
supportsStart: boolean(),
|
|
56114
|
+
supportsPause: boolean(),
|
|
56115
|
+
supportsResume: boolean(),
|
|
56116
|
+
supportsStop: boolean(),
|
|
56117
|
+
supportsPower: boolean(),
|
|
56118
|
+
/** Every program the description lists, with its options. */
|
|
56119
|
+
programs: array(DishwasherProgramSchema),
|
|
56120
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
56121
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
56122
|
+
});
|
|
55951
56123
|
var dishwasherCapability = {
|
|
55952
56124
|
name: "dishwasher",
|
|
55953
56125
|
scope: "device",
|
|
@@ -55955,86 +56127,102 @@ var dishwasherCapability = {
|
|
|
55955
56127
|
mode: "singleton",
|
|
55956
56128
|
deviceTypes: [DeviceType.Dishwasher],
|
|
55957
56129
|
methods: {
|
|
55958
|
-
|
|
56130
|
+
/**
|
|
56131
|
+
* Start a program. Without `program` the selected one starts. `options` are
|
|
56132
|
+
* option feature keys; each is checked against the program's constraints.
|
|
56133
|
+
*/
|
|
56134
|
+
start: method(object({
|
|
56135
|
+
deviceId: DeviceIdSchema,
|
|
56136
|
+
program: string().min(1).optional(),
|
|
56137
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
56138
|
+
}), _void(), {
|
|
55959
56139
|
kind: "mutation",
|
|
55960
56140
|
auth: "protected"
|
|
55961
56141
|
}),
|
|
55962
|
-
pause: method(object({ deviceId:
|
|
56142
|
+
pause: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55963
56143
|
kind: "mutation",
|
|
55964
56144
|
auth: "protected"
|
|
55965
56145
|
}),
|
|
55966
|
-
|
|
56146
|
+
resume: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
56147
|
+
kind: "mutation",
|
|
56148
|
+
auth: "protected"
|
|
56149
|
+
}),
|
|
56150
|
+
stop: method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
55967
56151
|
kind: "mutation",
|
|
55968
56152
|
auth: "protected"
|
|
55969
56153
|
}),
|
|
56154
|
+
/** Select (not start) a program; refused when the appliance does not offer it. */
|
|
55970
56155
|
setProgram: method(object({
|
|
55971
|
-
deviceId:
|
|
56156
|
+
deviceId: DeviceIdSchema,
|
|
55972
56157
|
program: string().min(1)
|
|
55973
56158
|
}), _void(), {
|
|
55974
56159
|
kind: "mutation",
|
|
55975
56160
|
auth: "protected"
|
|
55976
56161
|
}),
|
|
55977
56162
|
setPower: method(object({
|
|
55978
|
-
deviceId:
|
|
56163
|
+
deviceId: DeviceIdSchema,
|
|
55979
56164
|
on: boolean()
|
|
55980
56165
|
}), _void(), {
|
|
55981
56166
|
kind: "mutation",
|
|
55982
56167
|
auth: "protected"
|
|
55983
56168
|
}),
|
|
55984
56169
|
setHalfLoad: method(object({
|
|
55985
|
-
deviceId:
|
|
56170
|
+
deviceId: DeviceIdSchema,
|
|
55986
56171
|
on: boolean()
|
|
55987
56172
|
}), _void(), {
|
|
55988
56173
|
kind: "mutation",
|
|
55989
56174
|
auth: "protected"
|
|
55990
56175
|
}),
|
|
55991
56176
|
setHygienePlus: method(object({
|
|
55992
|
-
deviceId:
|
|
56177
|
+
deviceId: DeviceIdSchema,
|
|
55993
56178
|
on: boolean()
|
|
55994
56179
|
}), _void(), {
|
|
55995
56180
|
kind: "mutation",
|
|
55996
56181
|
auth: "protected"
|
|
55997
56182
|
}),
|
|
55998
56183
|
setExtraDry: method(object({
|
|
55999
|
-
deviceId:
|
|
56184
|
+
deviceId: DeviceIdSchema,
|
|
56000
56185
|
on: boolean()
|
|
56001
56186
|
}), _void(), {
|
|
56002
56187
|
kind: "mutation",
|
|
56003
56188
|
auth: "protected"
|
|
56004
56189
|
}),
|
|
56005
56190
|
setIntensiveZone: method(object({
|
|
56006
|
-
deviceId:
|
|
56191
|
+
deviceId: DeviceIdSchema,
|
|
56007
56192
|
on: boolean()
|
|
56008
56193
|
}), _void(), {
|
|
56009
56194
|
kind: "mutation",
|
|
56010
56195
|
auth: "protected"
|
|
56011
56196
|
}),
|
|
56012
56197
|
setVarioSpeedPlus: method(object({
|
|
56013
|
-
deviceId:
|
|
56198
|
+
deviceId: DeviceIdSchema,
|
|
56014
56199
|
on: boolean()
|
|
56015
56200
|
}), _void(), {
|
|
56016
56201
|
kind: "mutation",
|
|
56017
56202
|
auth: "protected"
|
|
56018
56203
|
}),
|
|
56019
56204
|
setChildLock: method(object({
|
|
56020
|
-
deviceId:
|
|
56205
|
+
deviceId: DeviceIdSchema,
|
|
56021
56206
|
on: boolean()
|
|
56022
56207
|
}), _void(), {
|
|
56023
56208
|
kind: "mutation",
|
|
56024
56209
|
auth: "protected"
|
|
56025
56210
|
}),
|
|
56211
|
+
/**
|
|
56212
|
+
* Write any option or setting by feature key. Refused when the description does
|
|
56213
|
+
* not list it, it is not writable or not available now, or the value is outside
|
|
56214
|
+
* its declared range / members.
|
|
56215
|
+
*/
|
|
56026
56216
|
setOption: method(object({
|
|
56027
|
-
deviceId:
|
|
56217
|
+
deviceId: DeviceIdSchema,
|
|
56028
56218
|
key: string().min(1),
|
|
56029
|
-
value:
|
|
56030
|
-
boolean(),
|
|
56031
|
-
string(),
|
|
56032
|
-
number()
|
|
56033
|
-
])
|
|
56219
|
+
value: DishwasherValueSchema
|
|
56034
56220
|
}), _void(), {
|
|
56035
56221
|
kind: "mutation",
|
|
56036
56222
|
auth: "protected"
|
|
56037
|
-
})
|
|
56223
|
+
}),
|
|
56224
|
+
/** What this appliance can do, from its own description — the UI is derived from it. */
|
|
56225
|
+
getOptions: method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" })
|
|
56038
56226
|
},
|
|
56039
56227
|
status: {
|
|
56040
56228
|
schema: DishwasherStatusSchema,
|
|
@@ -70449,6 +70637,12 @@ Object.freeze({
|
|
|
70449
70637
|
addonId: null,
|
|
70450
70638
|
access: "view"
|
|
70451
70639
|
},
|
|
70640
|
+
"dishwasher.getOptions": {
|
|
70641
|
+
capName: "dishwasher",
|
|
70642
|
+
capScope: "device",
|
|
70643
|
+
addonId: null,
|
|
70644
|
+
access: "view"
|
|
70645
|
+
},
|
|
70452
70646
|
"dishwasher.getStatus": {
|
|
70453
70647
|
capName: "dishwasher",
|
|
70454
70648
|
capScope: "device",
|
|
@@ -70461,6 +70655,12 @@ Object.freeze({
|
|
|
70461
70655
|
addonId: null,
|
|
70462
70656
|
access: "create"
|
|
70463
70657
|
},
|
|
70658
|
+
"dishwasher.resume": {
|
|
70659
|
+
capName: "dishwasher",
|
|
70660
|
+
capScope: "device",
|
|
70661
|
+
addonId: null,
|
|
70662
|
+
access: "create"
|
|
70663
|
+
},
|
|
70464
70664
|
"dishwasher.setChildLock": {
|
|
70465
70665
|
capName: "dishwasher",
|
|
70466
70666
|
capScope: "device",
|
|
@@ -74961,6 +75161,12 @@ Object.freeze({
|
|
|
74961
75161
|
addonId: null,
|
|
74962
75162
|
access: "view"
|
|
74963
75163
|
},
|
|
75164
|
+
"storageMigration.moverClearance": {
|
|
75165
|
+
capName: "storage-migration",
|
|
75166
|
+
capScope: "system",
|
|
75167
|
+
addonId: null,
|
|
75168
|
+
access: "view"
|
|
75169
|
+
},
|
|
74964
75170
|
"storageMigration.movers": {
|
|
74965
75171
|
capName: "storage-migration",
|
|
74966
75172
|
capScope: "system",
|
|
@@ -77360,6 +77566,11 @@ Object.freeze({
|
|
|
77360
77566
|
form: "single",
|
|
77361
77567
|
optional: false
|
|
77362
77568
|
}],
|
|
77569
|
+
"dishwasher.getOptions": [{
|
|
77570
|
+
name: "deviceId",
|
|
77571
|
+
form: "single",
|
|
77572
|
+
optional: false
|
|
77573
|
+
}],
|
|
77363
77574
|
"dishwasher.getStatus": [{
|
|
77364
77575
|
name: "deviceId",
|
|
77365
77576
|
form: "single",
|
|
@@ -77370,6 +77581,11 @@ Object.freeze({
|
|
|
77370
77581
|
form: "single",
|
|
77371
77582
|
optional: false
|
|
77372
77583
|
}],
|
|
77584
|
+
"dishwasher.resume": [{
|
|
77585
|
+
name: "deviceId",
|
|
77586
|
+
form: "single",
|
|
77587
|
+
optional: false
|
|
77588
|
+
}],
|
|
77373
77589
|
"dishwasher.setChildLock": [{
|
|
77374
77590
|
name: "deviceId",
|
|
77375
77591
|
form: "single",
|
|
@@ -79456,6 +79672,9 @@ new Map(Object.entries({
|
|
|
79456
79672
|
"wrapper-update-available": "system",
|
|
79457
79673
|
"backup-completed": "system",
|
|
79458
79674
|
"export-completed": "system",
|
|
79675
|
+
"alert-critical": "system",
|
|
79676
|
+
"alert-error": "system",
|
|
79677
|
+
"alert-critical-resolved": "system",
|
|
79459
79678
|
"storage-location-low": "system",
|
|
79460
79679
|
"storage-location-critical": "system",
|
|
79461
79680
|
"storage-location-ok": "system",
|
|
@@ -79580,6 +79799,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
79580
79799
|
"storage-location-ok"
|
|
79581
79800
|
]
|
|
79582
79801
|
},
|
|
79802
|
+
{
|
|
79803
|
+
id: "alerts",
|
|
79804
|
+
family: "system",
|
|
79805
|
+
label: "Alerts",
|
|
79806
|
+
kinds: [
|
|
79807
|
+
"alert-critical",
|
|
79808
|
+
"alert-error",
|
|
79809
|
+
"alert-critical-resolved"
|
|
79810
|
+
]
|
|
79811
|
+
},
|
|
79583
79812
|
{
|
|
79584
79813
|
id: "alarm",
|
|
79585
79814
|
family: "alarm",
|
|
@@ -79624,6 +79853,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
79624
79853
|
return [[descriptor.kind, field]];
|
|
79625
79854
|
})));
|
|
79626
79855
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
79856
|
+
object({
|
|
79857
|
+
phase: _enum(["raised", "resolved"]),
|
|
79858
|
+
episodeId: string().min(1),
|
|
79859
|
+
alertId: string().min(1),
|
|
79860
|
+
severity: AlertSeveritySchema,
|
|
79861
|
+
category: string(),
|
|
79862
|
+
title: string(),
|
|
79863
|
+
message: string(),
|
|
79864
|
+
sourceType: string().optional(),
|
|
79865
|
+
sourceId: string().optional(),
|
|
79866
|
+
nodeId: string().optional(),
|
|
79867
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
79868
|
+
actionUrl: string().optional(),
|
|
79869
|
+
at: number()
|
|
79870
|
+
});
|
|
79627
79871
|
var RULE_BODY_ONLY = ["body"];
|
|
79628
79872
|
var RULE_TEXT = ["title", "body"];
|
|
79629
79873
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -79633,6 +79877,11 @@ var TANK = [
|
|
|
79633
79877
|
"device-tank-full",
|
|
79634
79878
|
"device-tank-normal"
|
|
79635
79879
|
];
|
|
79880
|
+
var ALERT_EPISODE = [
|
|
79881
|
+
"alert-critical",
|
|
79882
|
+
"alert-error",
|
|
79883
|
+
"alert-critical-resolved"
|
|
79884
|
+
];
|
|
79636
79885
|
var UPDATES = [
|
|
79637
79886
|
"addon-update-available",
|
|
79638
79887
|
"server-update-available",
|
|
@@ -79825,14 +80074,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
79825
80074
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
79826
80075
|
([...RULE_TEXT], [...TANK]),
|
|
79827
80076
|
[...RULE_TEXT],
|
|
79828
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
79829
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
79830
|
-
[...RULE_TEXT],
|
|
80077
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
80078
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
79831
80079
|
[...RULE_TEXT],
|
|
79832
80080
|
[...RULE_TEXT],
|
|
79833
80081
|
[...RULE_TEXT],
|
|
79834
80082
|
[...RULE_TEXT],
|
|
79835
80083
|
[...RULE_TEXT],
|
|
80084
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79836
80085
|
[...RULE_TEXT],
|
|
79837
80086
|
[...RULE_TEXT],
|
|
79838
80087
|
[...RULE_TEXT],
|
|
@@ -79850,7 +80099,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
79850
80099
|
[...RULE_TEXT],
|
|
79851
80100
|
[...RULE_TEXT],
|
|
79852
80101
|
[...RULE_TEXT],
|
|
79853
|
-
[...RULE_TEXT],
|
|
80102
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80103
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80104
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80105
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
80106
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
79854
80107
|
[...RULE_TEXT],
|
|
79855
80108
|
[...RULE_TEXT],
|
|
79856
80109
|
[...RULE_TEXT],
|