@camstack/addon-waste-collections 0.1.9 → 0.1.11
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/waste-collections.addon.js +480 -240
- package/dist/waste-collections.addon.mjs +480 -240
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-DOl51-Ij.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -81,9 +81,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
81
81
|
/**
|
|
82
82
|
* The node's one-shot runner boot check (D877): planned runners against the
|
|
83
83
|
* process service, `degraded` when any is failed, refused or missing. The
|
|
84
|
-
* alert centre turns it into one
|
|
84
|
+
* alert centre turns it into one critical alert.
|
|
85
85
|
*/
|
|
86
86
|
EventCategory["SystemRunnerCheck"] = "system.runner-check";
|
|
87
|
+
/**
|
|
88
|
+
* An alert EPISODE opened or closed, emitted by the alert centre for alerts
|
|
89
|
+
* of severity `critical` or `error` (`AlertEpisodePayload`). The alert
|
|
90
|
+
* centre sends no notification of its own: Notification Center turns this
|
|
91
|
+
* into the `alert-critical` / `alert-error` / `alert-critical-resolved`
|
|
92
|
+
* system-event kinds, and reconciles from the alerts store because a bus
|
|
93
|
+
* event may be dropped (D8, D11).
|
|
94
|
+
*/
|
|
95
|
+
EventCategory["AlertEpisode"] = "alert.episode";
|
|
87
96
|
EventCategory["AddonError"] = "addon.error";
|
|
88
97
|
EventCategory["AddonPageReady"] = "addon.page-ready";
|
|
89
98
|
EventCategory["AddonWidgetReady"] = "addon.widget-ready";
|
|
@@ -5541,7 +5550,7 @@ var ZodIssueCode = {
|
|
|
5541
5550
|
var ZodFirstPartyTypeKind;
|
|
5542
5551
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5543
5552
|
//#endregion
|
|
5544
|
-
//#region ../types/dist/sleep-
|
|
5553
|
+
//#region ../types/dist/sleep-BxjU_fJM.mjs
|
|
5545
5554
|
/**
|
|
5546
5555
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5547
5556
|
* window to float samples (D455).
|
|
@@ -7933,6 +7942,12 @@ function normalizeAddonInitResult(result) {
|
|
|
7933
7942
|
if (Array.isArray(result)) return { providers: result };
|
|
7934
7943
|
return result;
|
|
7935
7944
|
}
|
|
7945
|
+
/**
|
|
7946
|
+
* The share-view scope kinds a `csv_*` share token can carry. The hub mints
|
|
7947
|
+
* and validates them (`share-token.service.ts` builds its enum from this
|
|
7948
|
+
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7949
|
+
*/
|
|
7950
|
+
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7936
7951
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7937
7952
|
var PeerBytesTicketSchema = object({
|
|
7938
7953
|
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
@@ -12805,6 +12820,229 @@ var ConvertResultSchema = object({
|
|
|
12805
12820
|
files: array(string()).readonly()
|
|
12806
12821
|
})).readonly()
|
|
12807
12822
|
});
|
|
12823
|
+
/**
|
|
12824
|
+
* Zod schemas for persisted record types.
|
|
12825
|
+
*
|
|
12826
|
+
* These schemas serve as the single source of truth for types that are
|
|
12827
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
12828
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
12829
|
+
* enabling runtime validation when reading from the backend.
|
|
12830
|
+
*
|
|
12831
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
12832
|
+
* keeps the original name for backward compatibility.
|
|
12833
|
+
*/
|
|
12834
|
+
/**
|
|
12835
|
+
* Auth model (v2 — 2026-05-12 caps-only):
|
|
12836
|
+
*
|
|
12837
|
+
* Two principals:
|
|
12838
|
+
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
12839
|
+
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
12840
|
+
*
|
|
12841
|
+
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
12842
|
+
* `super_admin` — collapsed onto the single boolean because every
|
|
12843
|
+
* non-admin caller is governed by the same scope-check rules; the
|
|
12844
|
+
* distinction was only ever used to route role-specific procedures
|
|
12845
|
+
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
12846
|
+
* with `isAdmin: false` + an explicit scope list.
|
|
12847
|
+
*/
|
|
12848
|
+
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
12849
|
+
var MethodAccessSchema = _enum([
|
|
12850
|
+
"view",
|
|
12851
|
+
"create",
|
|
12852
|
+
"delete"
|
|
12853
|
+
]);
|
|
12854
|
+
/**
|
|
12855
|
+
* A single scope grant. Three forms — checked in matcher with OR
|
|
12856
|
+
* semantics; the first match decides whether the call passes:
|
|
12857
|
+
*
|
|
12858
|
+
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
12859
|
+
* cap with the matching `scope` declaration. New caps inherit grants
|
|
12860
|
+
* automatically — adding a device cap to the codebase makes it
|
|
12861
|
+
* reachable to every user with `category:device [...]` without a
|
|
12862
|
+
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
12863
|
+
*
|
|
12864
|
+
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
12865
|
+
* useful when an integration needs to interact with one specific
|
|
12866
|
+
* addon's surface regardless of how many caps it exports.
|
|
12867
|
+
*
|
|
12868
|
+
* - `capability` — the most precise form. Single cap name. Use for
|
|
12869
|
+
* integration tokens where you want to grant `addons.installPackage`
|
|
12870
|
+
* and nothing else.
|
|
12871
|
+
*
|
|
12872
|
+
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
12873
|
+
* "give me everything" escape; there is no wildcard scope.
|
|
12874
|
+
*/
|
|
12875
|
+
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
12876
|
+
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
12877
|
+
var CapScopeSchema = _enum(["device", "system"]);
|
|
12878
|
+
/**
|
|
12879
|
+
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
12880
|
+
*
|
|
12881
|
+
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
12882
|
+
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
12883
|
+
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
12884
|
+
* AFTER the grant was minted — no re-grant, no re-login.
|
|
12885
|
+
*
|
|
12886
|
+
* - `all` — every device in the deployment. The broad viewer/operator
|
|
12887
|
+
* lever without a `category` grant (a `category` grant also covers device
|
|
12888
|
+
* caps that carry no deviceId; `all` is specifically the device set).
|
|
12889
|
+
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
12890
|
+
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
12891
|
+
* is NOT covered until the grant is edited.
|
|
12892
|
+
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
12893
|
+
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
12894
|
+
* re-resolves on the next request.
|
|
12895
|
+
* - `locations` — every device whose operator-assigned `location` label is
|
|
12896
|
+
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
12897
|
+
* null/unset location matches NO `locations` selector.
|
|
12898
|
+
*/
|
|
12899
|
+
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
12900
|
+
object({ kind: literal("all") }),
|
|
12901
|
+
object({
|
|
12902
|
+
kind: literal("ids"),
|
|
12903
|
+
ids: array(number().int()).min(1)
|
|
12904
|
+
}),
|
|
12905
|
+
object({
|
|
12906
|
+
kind: literal("types"),
|
|
12907
|
+
types: array(_enum(DeviceType)).min(1)
|
|
12908
|
+
}),
|
|
12909
|
+
object({
|
|
12910
|
+
kind: literal("locations"),
|
|
12911
|
+
locations: array(string().min(1)).min(1)
|
|
12912
|
+
})
|
|
12913
|
+
]);
|
|
12914
|
+
var DeviceTokenScopeSchema = object({
|
|
12915
|
+
type: literal("device"),
|
|
12916
|
+
/** The device SET this grant covers — resolved against the live fleet. */
|
|
12917
|
+
selector: DeviceSelectorSchema,
|
|
12918
|
+
access: array(MethodAccessSchema).min(1),
|
|
12919
|
+
/**
|
|
12920
|
+
* Whether a grant on a PARENT device transparently covers its accessory
|
|
12921
|
+
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
12922
|
+
* Direction is parent → children ONLY.
|
|
12923
|
+
*
|
|
12924
|
+
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
12925
|
+
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
12926
|
+
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
12927
|
+
* operator must grant on the child, not inherit from the parent). Set it
|
|
12928
|
+
* explicitly to override that default per grant.
|
|
12929
|
+
*/
|
|
12930
|
+
includeLinked: boolean().optional()
|
|
12931
|
+
});
|
|
12932
|
+
/**
|
|
12933
|
+
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
12934
|
+
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
12935
|
+
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
12936
|
+
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
12937
|
+
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
12938
|
+
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
12939
|
+
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
12940
|
+
* migration covers both without a flag day. No cast — the raw object is read
|
|
12941
|
+
* through `Reflect.get` (its static type is `unknown`).
|
|
12942
|
+
*/
|
|
12943
|
+
function migrateLegacyTokenScope(raw) {
|
|
12944
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
12945
|
+
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
12946
|
+
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
12947
|
+
const targets = Reflect.get(raw, "targets");
|
|
12948
|
+
if (!Array.isArray(targets)) return raw;
|
|
12949
|
+
return {
|
|
12950
|
+
type: "device",
|
|
12951
|
+
selector: {
|
|
12952
|
+
kind: "ids",
|
|
12953
|
+
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
12954
|
+
},
|
|
12955
|
+
access: Reflect.get(raw, "access")
|
|
12956
|
+
};
|
|
12957
|
+
}
|
|
12958
|
+
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
12959
|
+
object({
|
|
12960
|
+
type: literal("category"),
|
|
12961
|
+
target: CapScopeSchema,
|
|
12962
|
+
access: array(MethodAccessSchema).min(1)
|
|
12963
|
+
}),
|
|
12964
|
+
object({
|
|
12965
|
+
type: literal("capability"),
|
|
12966
|
+
target: string(),
|
|
12967
|
+
access: array(MethodAccessSchema).min(1)
|
|
12968
|
+
}),
|
|
12969
|
+
object({
|
|
12970
|
+
type: literal("addon"),
|
|
12971
|
+
target: string(),
|
|
12972
|
+
access: array(MethodAccessSchema).min(1)
|
|
12973
|
+
}),
|
|
12974
|
+
DeviceTokenScopeSchema
|
|
12975
|
+
]));
|
|
12976
|
+
object({
|
|
12977
|
+
id: string(),
|
|
12978
|
+
username: string(),
|
|
12979
|
+
passwordHash: string(),
|
|
12980
|
+
/**
|
|
12981
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
12982
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
12983
|
+
* role enum collapsed onto this boolean in v2.
|
|
12984
|
+
*/
|
|
12985
|
+
isAdmin: boolean().default(false),
|
|
12986
|
+
allowedProviders: AllowedProviderSchema,
|
|
12987
|
+
allowedDevices: AllowedDevicesSchema,
|
|
12988
|
+
/**
|
|
12989
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
12990
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
12991
|
+
* protected call.
|
|
12992
|
+
*/
|
|
12993
|
+
scopes: array(TokenScopeSchema).default([]),
|
|
12994
|
+
createdAt: number(),
|
|
12995
|
+
updatedAt: number()
|
|
12996
|
+
});
|
|
12997
|
+
object({
|
|
12998
|
+
id: string(),
|
|
12999
|
+
label: string(),
|
|
13000
|
+
isAdmin: boolean().default(false),
|
|
13001
|
+
allowedProviders: AllowedProviderSchema,
|
|
13002
|
+
allowedDevices: AllowedDevicesSchema,
|
|
13003
|
+
tokenHash: string(),
|
|
13004
|
+
tokenPrefix: string(),
|
|
13005
|
+
createdAt: number(),
|
|
13006
|
+
lastUsedAt: number().optional()
|
|
13007
|
+
});
|
|
13008
|
+
object({
|
|
13009
|
+
id: string(),
|
|
13010
|
+
userId: string(),
|
|
13011
|
+
name: string(),
|
|
13012
|
+
tokenHash: string(),
|
|
13013
|
+
tokenPrefix: string(),
|
|
13014
|
+
scopes: array(TokenScopeSchema),
|
|
13015
|
+
expiresAt: number().nullish(),
|
|
13016
|
+
lastUsedAt: number().nullish(),
|
|
13017
|
+
createdAt: number()
|
|
13018
|
+
});
|
|
13019
|
+
/** What a share-view grant lets its holder see. */
|
|
13020
|
+
var ShareViewGrantSchema = object({
|
|
13021
|
+
kind: _enum(SHARE_VIEW_KINDS),
|
|
13022
|
+
deviceIds: array(number().int().nonnegative()).min(1).max(64),
|
|
13023
|
+
/** Talk-back, opt-in at mint time; absent means off. */
|
|
13024
|
+
talk: boolean().optional()
|
|
13025
|
+
});
|
|
13026
|
+
var ShareViewScopeSchema = object({
|
|
13027
|
+
type: literal("share-view"),
|
|
13028
|
+
grant: ShareViewGrantSchema
|
|
13029
|
+
});
|
|
13030
|
+
var AddonRoutesScopeSchema = object({
|
|
13031
|
+
type: literal("addon-routes"),
|
|
13032
|
+
access: array(MethodAccessSchema).min(1)
|
|
13033
|
+
});
|
|
13034
|
+
var CredentialScopeSchema = union([
|
|
13035
|
+
literal("*"),
|
|
13036
|
+
ShareViewScopeSchema,
|
|
13037
|
+
AddonRoutesScopeSchema,
|
|
13038
|
+
TokenScopeSchema
|
|
13039
|
+
]);
|
|
13040
|
+
object({
|
|
13041
|
+
kind: literal("credential"),
|
|
13042
|
+
sub: string().min(1),
|
|
13043
|
+
jti: string().min(16),
|
|
13044
|
+
scopes: array(CredentialScopeSchema).min(1)
|
|
13045
|
+
});
|
|
12808
13046
|
_enum(["new-session", "step-up"]);
|
|
12809
13047
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12810
13048
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -13521,7 +13759,14 @@ var AlertSeveritySchema = _enum([
|
|
|
13521
13759
|
]);
|
|
13522
13760
|
var AlertActionSchema = object({
|
|
13523
13761
|
label: string(),
|
|
13524
|
-
href: string().optional()
|
|
13762
|
+
href: string().optional(),
|
|
13763
|
+
/**
|
|
13764
|
+
* How `href` is followed. Absent / `app`: an admin-ui route (client-side).
|
|
13765
|
+
* `server`: a route the HUB serves (an addon HTTP route such as an OAuth
|
|
13766
|
+
* start) — the browser must leave the SPA with a full navigation, because
|
|
13767
|
+
* the SPA has no such route and would bounce to the home page.
|
|
13768
|
+
*/
|
|
13769
|
+
navigation: _enum(["app", "server"]).optional()
|
|
13525
13770
|
});
|
|
13526
13771
|
var AlertStatusSchema = _enum([
|
|
13527
13772
|
"active",
|
|
@@ -41897,6 +42142,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
41897
42142
|
"server-updated",
|
|
41898
42143
|
"export-completed",
|
|
41899
42144
|
"backup-completed",
|
|
42145
|
+
"alert-critical",
|
|
42146
|
+
"alert-error",
|
|
42147
|
+
"alert-critical-resolved",
|
|
41900
42148
|
"camera-online",
|
|
41901
42149
|
"camera-offline",
|
|
41902
42150
|
"camera-disabled",
|
|
@@ -43932,202 +44180,6 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
43932
44180
|
auth: "admin"
|
|
43933
44181
|
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
43934
44182
|
/**
|
|
43935
|
-
* Zod schemas for persisted record types.
|
|
43936
|
-
*
|
|
43937
|
-
* These schemas serve as the single source of truth for types that are
|
|
43938
|
-
* stored in the settings-store backend and retrieved via tRPC. They
|
|
43939
|
-
* replace the manual TypeScript interfaces with schema-derived types,
|
|
43940
|
-
* enabling runtime validation when reading from the backend.
|
|
43941
|
-
*
|
|
43942
|
-
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
43943
|
-
* keeps the original name for backward compatibility.
|
|
43944
|
-
*/
|
|
43945
|
-
/**
|
|
43946
|
-
* Auth model (v2 — 2026-05-12 caps-only):
|
|
43947
|
-
*
|
|
43948
|
-
* Two principals:
|
|
43949
|
-
* - `isAdmin: true` — full bypass. Admin scope set is ignored.
|
|
43950
|
-
* - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
|
|
43951
|
-
*
|
|
43952
|
-
* No role enum. There used to be `viewer / agent / scoped` and earlier
|
|
43953
|
-
* `super_admin` — collapsed onto the single boolean because every
|
|
43954
|
-
* non-admin caller is governed by the same scope-check rules; the
|
|
43955
|
-
* distinction was only ever used to route role-specific procedures
|
|
43956
|
-
* which we no longer have. CLI / webhook integrations are `cst_*` tokens
|
|
43957
|
-
* with `isAdmin: false` + an explicit scope list.
|
|
43958
|
-
*/
|
|
43959
|
-
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
43960
|
-
var MethodAccessSchema = _enum([
|
|
43961
|
-
"view",
|
|
43962
|
-
"create",
|
|
43963
|
-
"delete"
|
|
43964
|
-
]);
|
|
43965
|
-
/**
|
|
43966
|
-
* A single scope grant. Three forms — checked in matcher with OR
|
|
43967
|
-
* semantics; the first match decides whether the call passes:
|
|
43968
|
-
*
|
|
43969
|
-
* - `category` — broadest. `target: 'device' | 'system'` selects every
|
|
43970
|
-
* cap with the matching `scope` declaration. New caps inherit grants
|
|
43971
|
-
* automatically — adding a device cap to the codebase makes it
|
|
43972
|
-
* reachable to every user with `category:device [...]` without a
|
|
43973
|
-
* re-grant. Use this for "family viewer" / "operator" tiers.
|
|
43974
|
-
*
|
|
43975
|
-
* - `addon` — every cap that ships inside a given addon id. Niche;
|
|
43976
|
-
* useful when an integration needs to interact with one specific
|
|
43977
|
-
* addon's surface regardless of how many caps it exports.
|
|
43978
|
-
*
|
|
43979
|
-
* - `capability` — the most precise form. Single cap name. Use for
|
|
43980
|
-
* integration tokens where you want to grant `addons.installPackage`
|
|
43981
|
-
* and nothing else.
|
|
43982
|
-
*
|
|
43983
|
-
* `access` is REQUIRED with min 1 element. `admin` bypass is the
|
|
43984
|
-
* "give me everything" escape; there is no wildcard scope.
|
|
43985
|
-
*/
|
|
43986
|
-
var AllowedProviderSchema = union([literal("*"), array(string())]);
|
|
43987
|
-
var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
|
|
43988
|
-
var CapScopeSchema = _enum(["device", "system"]);
|
|
43989
|
-
/**
|
|
43990
|
-
* DeviceSelector (scope model v3 — 2026-08-12).
|
|
43991
|
-
*
|
|
43992
|
-
* A `device` grant no longer carries a frozen list of deviceIds. It carries
|
|
43993
|
-
* a SELECTOR the matcher resolves against the live fleet, so the grant can be
|
|
43994
|
-
* DYNAMIC: a `types:['camera']` selector automatically covers a camera added
|
|
43995
|
-
* AFTER the grant was minted — no re-grant, no re-login.
|
|
43996
|
-
*
|
|
43997
|
-
* - `all` — every device in the deployment. The broad viewer/operator
|
|
43998
|
-
* lever without a `category` grant (a `category` grant also covers device
|
|
43999
|
-
* caps that carry no deviceId; `all` is specifically the device set).
|
|
44000
|
-
* - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
|
|
44001
|
-
* grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
|
|
44002
|
-
* is NOT covered until the grant is edited.
|
|
44003
|
-
* - `types` — every device of a `DeviceType` (e.g. every `camera`).
|
|
44004
|
-
* DYNAMIC. A device that changes type, or a new device of the type,
|
|
44005
|
-
* re-resolves on the next request.
|
|
44006
|
-
* - `locations` — every device whose operator-assigned `location` label is
|
|
44007
|
-
* in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
|
|
44008
|
-
* null/unset location matches NO `locations` selector.
|
|
44009
|
-
*/
|
|
44010
|
-
var DeviceSelectorSchema = discriminatedUnion("kind", [
|
|
44011
|
-
object({ kind: literal("all") }),
|
|
44012
|
-
object({
|
|
44013
|
-
kind: literal("ids"),
|
|
44014
|
-
ids: array(number().int()).min(1)
|
|
44015
|
-
}),
|
|
44016
|
-
object({
|
|
44017
|
-
kind: literal("types"),
|
|
44018
|
-
types: array(_enum(DeviceType)).min(1)
|
|
44019
|
-
}),
|
|
44020
|
-
object({
|
|
44021
|
-
kind: literal("locations"),
|
|
44022
|
-
locations: array(string().min(1)).min(1)
|
|
44023
|
-
})
|
|
44024
|
-
]);
|
|
44025
|
-
var DeviceTokenScopeSchema = object({
|
|
44026
|
-
type: literal("device"),
|
|
44027
|
-
/** The device SET this grant covers — resolved against the live fleet. */
|
|
44028
|
-
selector: DeviceSelectorSchema,
|
|
44029
|
-
access: array(MethodAccessSchema).min(1),
|
|
44030
|
-
/**
|
|
44031
|
-
* Whether a grant on a PARENT device transparently covers its accessory
|
|
44032
|
-
* CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
|
|
44033
|
-
* Direction is parent → children ONLY.
|
|
44034
|
-
*
|
|
44035
|
-
* Absent → the matcher DERIVES it from the access flavour: `view`
|
|
44036
|
-
* inherits (a camera viewer sees the camera's accessories), `create` /
|
|
44037
|
-
* `delete` do NOT (actuating/removing a child is an explicit act the
|
|
44038
|
-
* operator must grant on the child, not inherit from the parent). Set it
|
|
44039
|
-
* explicitly to override that default per grant.
|
|
44040
|
-
*/
|
|
44041
|
-
includeLinked: boolean().optional()
|
|
44042
|
-
});
|
|
44043
|
-
/**
|
|
44044
|
-
* v2 → v3 lazy migration. A pre-v3 `device` grant carried
|
|
44045
|
-
* `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
|
|
44046
|
-
* `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
|
|
44047
|
-
* EVERY parse path — stored records AND the JWT-carried scope arrays
|
|
44048
|
-
* normalised at the request boundary ({@link normalizeTokenScopes} in
|
|
44049
|
-
* `device-selector.ts`). Chosen over a one-time DB migration because a
|
|
44050
|
-
* migration cannot reach a JWT already in a client's hands; parse-time
|
|
44051
|
-
* migration covers both without a flag day. No cast — the raw object is read
|
|
44052
|
-
* through `Reflect.get` (its static type is `unknown`).
|
|
44053
|
-
*/
|
|
44054
|
-
function migrateLegacyTokenScope(raw) {
|
|
44055
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
44056
|
-
if (Reflect.get(raw, "type") !== "device") return raw;
|
|
44057
|
-
if (Reflect.get(raw, "selector") !== void 0) return raw;
|
|
44058
|
-
const targets = Reflect.get(raw, "targets");
|
|
44059
|
-
if (!Array.isArray(targets)) return raw;
|
|
44060
|
-
return {
|
|
44061
|
-
type: "device",
|
|
44062
|
-
selector: {
|
|
44063
|
-
kind: "ids",
|
|
44064
|
-
ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
|
|
44065
|
-
},
|
|
44066
|
-
access: Reflect.get(raw, "access")
|
|
44067
|
-
};
|
|
44068
|
-
}
|
|
44069
|
-
var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
|
|
44070
|
-
object({
|
|
44071
|
-
type: literal("category"),
|
|
44072
|
-
target: CapScopeSchema,
|
|
44073
|
-
access: array(MethodAccessSchema).min(1)
|
|
44074
|
-
}),
|
|
44075
|
-
object({
|
|
44076
|
-
type: literal("capability"),
|
|
44077
|
-
target: string(),
|
|
44078
|
-
access: array(MethodAccessSchema).min(1)
|
|
44079
|
-
}),
|
|
44080
|
-
object({
|
|
44081
|
-
type: literal("addon"),
|
|
44082
|
-
target: string(),
|
|
44083
|
-
access: array(MethodAccessSchema).min(1)
|
|
44084
|
-
}),
|
|
44085
|
-
DeviceTokenScopeSchema
|
|
44086
|
-
]));
|
|
44087
|
-
object({
|
|
44088
|
-
id: string(),
|
|
44089
|
-
username: string(),
|
|
44090
|
-
passwordHash: string(),
|
|
44091
|
-
/**
|
|
44092
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
44093
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
44094
|
-
* role enum collapsed onto this boolean in v2.
|
|
44095
|
-
*/
|
|
44096
|
-
isAdmin: boolean().default(false),
|
|
44097
|
-
allowedProviders: AllowedProviderSchema,
|
|
44098
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44099
|
-
/**
|
|
44100
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
44101
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
44102
|
-
* protected call.
|
|
44103
|
-
*/
|
|
44104
|
-
scopes: array(TokenScopeSchema).default([]),
|
|
44105
|
-
createdAt: number(),
|
|
44106
|
-
updatedAt: number()
|
|
44107
|
-
});
|
|
44108
|
-
object({
|
|
44109
|
-
id: string(),
|
|
44110
|
-
label: string(),
|
|
44111
|
-
isAdmin: boolean().default(false),
|
|
44112
|
-
allowedProviders: AllowedProviderSchema,
|
|
44113
|
-
allowedDevices: AllowedDevicesSchema,
|
|
44114
|
-
tokenHash: string(),
|
|
44115
|
-
tokenPrefix: string(),
|
|
44116
|
-
createdAt: number(),
|
|
44117
|
-
lastUsedAt: number().optional()
|
|
44118
|
-
});
|
|
44119
|
-
object({
|
|
44120
|
-
id: string(),
|
|
44121
|
-
userId: string(),
|
|
44122
|
-
name: string(),
|
|
44123
|
-
tokenHash: string(),
|
|
44124
|
-
tokenPrefix: string(),
|
|
44125
|
-
scopes: array(TokenScopeSchema),
|
|
44126
|
-
expiresAt: number().nullish(),
|
|
44127
|
-
lastUsedAt: number().nullish(),
|
|
44128
|
-
createdAt: number()
|
|
44129
|
-
});
|
|
44130
|
-
/**
|
|
44131
44183
|
* `oauth-integration` — a collection cap by which an addon declares
|
|
44132
44184
|
* itself a linkable OAuth client of the hub's core `/oauth2/*` server.
|
|
44133
44185
|
* Each provider returns a static descriptor; the core enumerates them
|
|
@@ -50929,7 +50981,10 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
50929
50981
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
50930
50982
|
kind: "mutation",
|
|
50931
50983
|
auth: "admin"
|
|
50932
|
-
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({
|
|
50984
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({ locationIds: array(string()).readonly() }), object({
|
|
50985
|
+
clear: boolean(),
|
|
50986
|
+
repointLocationId: string().optional()
|
|
50987
|
+
}), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
50933
50988
|
kind: "mutation",
|
|
50934
50989
|
auth: "admin"
|
|
50935
50990
|
}), method(StorageCleanupInputSchema, object({ jobId: string() }), {
|
|
@@ -54374,6 +54429,11 @@ object({
|
|
|
54374
54429
|
*
|
|
54375
54430
|
* `kind: 'poll'` — cloud REST APIs typically have no push channel; the
|
|
54376
54431
|
* provider refreshes the slice on an interval and eagerly after commands.
|
|
54432
|
+
*
|
|
54433
|
+
* UNKNOWN IS NOT OFF. Every field the appliance reports separately is
|
|
54434
|
+
* nullable: `null` means "not known right now" (the appliance has not said,
|
|
54435
|
+
* the link is down, or the description does not carry it) and is never
|
|
54436
|
+
* rendered or exported as `false` / `0`. `availability` says why.
|
|
54377
54437
|
*/
|
|
54378
54438
|
var DishwasherStateSchema = _enum([
|
|
54379
54439
|
"idle",
|
|
@@ -54383,112 +54443,227 @@ var DishwasherStateSchema = _enum([
|
|
|
54383
54443
|
"error",
|
|
54384
54444
|
"unavailable"
|
|
54385
54445
|
]);
|
|
54446
|
+
/**
|
|
54447
|
+
* The appliance's own operation state, uncollapsed. `state` above is the coarse
|
|
54448
|
+
* view for compact surfaces; this is what the appliance said.
|
|
54449
|
+
*/
|
|
54450
|
+
var DishwasherOperationStateSchema = _enum([
|
|
54451
|
+
"Inactive",
|
|
54452
|
+
"Ready",
|
|
54453
|
+
"DelayedStart",
|
|
54454
|
+
"Run",
|
|
54455
|
+
"Pause",
|
|
54456
|
+
"ActionRequired",
|
|
54457
|
+
"Finished",
|
|
54458
|
+
"Error",
|
|
54459
|
+
"Aborting"
|
|
54460
|
+
]);
|
|
54461
|
+
/**
|
|
54462
|
+
* Why fields may be `null`:
|
|
54463
|
+
* - `available` — the link is up and the description is loaded;
|
|
54464
|
+
* - `offline` — the local link is down (values are unknown, not last-known);
|
|
54465
|
+
* - `description-missing` — the link is up but the appliance's description could not
|
|
54466
|
+
* be loaded, so its values cannot be decoded.
|
|
54467
|
+
*/
|
|
54468
|
+
var DishwasherAvailabilitySchema = _enum([
|
|
54469
|
+
"available",
|
|
54470
|
+
"offline",
|
|
54471
|
+
"description-missing"
|
|
54472
|
+
]);
|
|
54386
54473
|
var DishwasherConsumableLevelSchema = _enum([
|
|
54387
54474
|
"ok",
|
|
54388
54475
|
"low",
|
|
54389
54476
|
"empty"
|
|
54390
54477
|
]);
|
|
54391
54478
|
object({
|
|
54479
|
+
availability: DishwasherAvailabilitySchema,
|
|
54480
|
+
/** Coarse state for compact surfaces; `unavailable` whenever the appliance state is not known. */
|
|
54392
54481
|
state: DishwasherStateSchema,
|
|
54393
|
-
/**
|
|
54482
|
+
/** The appliance's operation state as reported; null when not known. */
|
|
54483
|
+
operationState: DishwasherOperationStateSchema.nullable(),
|
|
54484
|
+
/** Feature key of the ACTIVE (running) program, or null when none runs / not known. */
|
|
54394
54485
|
program: string().nullable(),
|
|
54395
|
-
/**
|
|
54486
|
+
/** Feature key of the SELECTED program (what Start would run), or null when none / not known. */
|
|
54487
|
+
selectedProgram: string().nullable(),
|
|
54488
|
+
/** Feature keys of the programs the appliance currently offers — drives the UI selector. */
|
|
54396
54489
|
availablePrograms: array(string()),
|
|
54397
|
-
/**
|
|
54398
|
-
|
|
54490
|
+
/** Seconds remaining on the active cycle, or null when not running / not known. */
|
|
54491
|
+
remainingSeconds: number().int().nonnegative().nullable(),
|
|
54492
|
+
/** Seconds the delayed start is set to (time until the cycle starts), or null. */
|
|
54493
|
+
delayedStartSeconds: number().int().nonnegative().nullable(),
|
|
54399
54494
|
/** Cycle completion 0..100, or null when not applicable. */
|
|
54400
54495
|
progressPercent: number().min(0).max(100).nullable(),
|
|
54401
|
-
/** True when the door is reported open. */
|
|
54402
|
-
doorOpen: boolean(),
|
|
54403
|
-
/** True when
|
|
54404
|
-
|
|
54405
|
-
/**
|
|
54406
|
-
|
|
54496
|
+
/** True when the door is reported open; null when the door state is not known. */
|
|
54497
|
+
doorOpen: boolean().nullable(),
|
|
54498
|
+
/** True when the door is latched (locked) during a cycle; null when not reported. */
|
|
54499
|
+
doorLocked: boolean().nullable(),
|
|
54500
|
+
/** True when remote start is allowed (door closed, power on, etc.); null when not known. */
|
|
54501
|
+
remoteStartAllowed: boolean().nullable(),
|
|
54502
|
+
/** True when the appliance accepts remote control now; null when not known. */
|
|
54503
|
+
remoteControlActive: boolean().nullable(),
|
|
54504
|
+
/** True while somebody operates the appliance at its panel; null when not reported. */
|
|
54505
|
+
localControlActive: boolean().nullable(),
|
|
54506
|
+
/** Main power / switched-on state; null when not known. */
|
|
54507
|
+
powerOn: boolean().nullable(),
|
|
54508
|
+
/** The raw power state (`On`, `Off`, `Standby`, …); null when not known. */
|
|
54509
|
+
powerState: string().nullable(),
|
|
54407
54510
|
saltLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54408
54511
|
rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
|
|
54409
|
-
|
|
54410
|
-
|
|
54512
|
+
/** Option states: null when the appliance does not expose the option or has not said. */
|
|
54513
|
+
halfLoad: boolean().nullable(),
|
|
54514
|
+
hygienePlus: boolean().nullable(),
|
|
54411
54515
|
/** Extra dry option when the appliance exposes it. */
|
|
54412
|
-
extraDry: boolean(),
|
|
54516
|
+
extraDry: boolean().nullable(),
|
|
54413
54517
|
/** Intensive zone (lower basket) when the appliance exposes it. */
|
|
54414
|
-
intensiveZone: boolean(),
|
|
54518
|
+
intensiveZone: boolean().nullable(),
|
|
54415
54519
|
/** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
|
|
54416
|
-
varioSpeedPlus: boolean(),
|
|
54417
|
-
/** Child lock (controls disabled on the appliance). */
|
|
54418
|
-
childLock: boolean(),
|
|
54520
|
+
varioSpeedPlus: boolean().nullable(),
|
|
54521
|
+
/** Child lock (controls disabled on the appliance); null when not known. */
|
|
54522
|
+
childLock: boolean().nullable(),
|
|
54523
|
+
/** Feature keys of the events currently raised (salt low, rinse aid low, program finished, …). */
|
|
54524
|
+
activeEvents: array(string()),
|
|
54525
|
+
/** Numeric error code when the appliance reports one; null otherwise. */
|
|
54419
54526
|
errorCode: number().nullable(),
|
|
54527
|
+
/** Name of the raised alert-level event while the appliance is in error; null otherwise. */
|
|
54420
54528
|
errorLabel: string().nullable(),
|
|
54529
|
+
/** Ms epoch of the last value received from the appliance; 0 = never. */
|
|
54421
54530
|
lastFetchedAt: number()
|
|
54422
54531
|
});
|
|
54423
|
-
|
|
54532
|
+
var DeviceIdSchema = number().int().nonnegative();
|
|
54533
|
+
/** A value a program option or setting can take. */
|
|
54534
|
+
var DishwasherValueSchema = union([
|
|
54535
|
+
boolean(),
|
|
54536
|
+
string(),
|
|
54537
|
+
number()
|
|
54538
|
+
]);
|
|
54539
|
+
var DishwasherAccessSchema = _enum([
|
|
54540
|
+
"none",
|
|
54541
|
+
"read",
|
|
54542
|
+
"readWrite",
|
|
54543
|
+
"writeOnly",
|
|
54544
|
+
"readStatic"
|
|
54545
|
+
]);
|
|
54546
|
+
/**
|
|
54547
|
+
* One option or setting the appliance declares, with the constraints its description
|
|
54548
|
+
* gives. A `readWrite` descriptor that is `available` is what `setOption` accepts.
|
|
54549
|
+
*/
|
|
54550
|
+
var DishwasherOptionDescriptorSchema = object({
|
|
54551
|
+
/** Feature key (`Dishcare.Dishwasher.Option.ExtraDry`). */
|
|
54552
|
+
key: string(),
|
|
54553
|
+
/** Last segment of the key, for display. */
|
|
54554
|
+
name: string(),
|
|
54555
|
+
type: _enum([
|
|
54556
|
+
"boolean",
|
|
54557
|
+
"number",
|
|
54558
|
+
"enum",
|
|
54559
|
+
"string"
|
|
54560
|
+
]),
|
|
54561
|
+
access: DishwasherAccessSchema,
|
|
54562
|
+
/** The appliance reports this entity as currently available. */
|
|
54563
|
+
available: boolean(),
|
|
54564
|
+
/** Unit the description declares for a number; null when it declares none. */
|
|
54565
|
+
unit: string().nullable(),
|
|
54566
|
+
min: number().nullable(),
|
|
54567
|
+
max: number().nullable(),
|
|
54568
|
+
step: number().nullable(),
|
|
54569
|
+
/** Allowed members of an enum; null for other types. */
|
|
54570
|
+
enumValues: array(string()).nullable(),
|
|
54571
|
+
defaultValue: DishwasherValueSchema.nullable()
|
|
54572
|
+
});
|
|
54573
|
+
var DishwasherProgramSchema = object({
|
|
54574
|
+
/** Feature key (`Dishcare.Dishwasher.Program.Eco50`) — what `setProgram` / `start` take. */
|
|
54575
|
+
key: string(),
|
|
54576
|
+
name: string(),
|
|
54577
|
+
/** The appliance currently offers this program. */
|
|
54578
|
+
available: boolean(),
|
|
54579
|
+
/** The options this program lists, with the program-level access / availability / default. */
|
|
54580
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54581
|
+
});
|
|
54582
|
+
var DishwasherOptionsSchema = object({
|
|
54583
|
+
availability: DishwasherAvailabilitySchema,
|
|
54584
|
+
/** What the appliance can be told to do, from the commands its description declares. */
|
|
54585
|
+
supportsStart: boolean(),
|
|
54586
|
+
supportsPause: boolean(),
|
|
54587
|
+
supportsResume: boolean(),
|
|
54588
|
+
supportsStop: boolean(),
|
|
54589
|
+
supportsPower: boolean(),
|
|
54590
|
+
/** Every program the description lists, with its options. */
|
|
54591
|
+
programs: array(DishwasherProgramSchema),
|
|
54592
|
+
/** Every option and setting entity the description lists (programs reference these by key). */
|
|
54593
|
+
options: array(DishwasherOptionDescriptorSchema)
|
|
54594
|
+
});
|
|
54595
|
+
DeviceType.Dishwasher, method(object({
|
|
54596
|
+
deviceId: DeviceIdSchema,
|
|
54597
|
+
program: string().min(1).optional(),
|
|
54598
|
+
options: record(string(), DishwasherValueSchema).optional()
|
|
54599
|
+
}), _void(), {
|
|
54424
54600
|
kind: "mutation",
|
|
54425
54601
|
auth: "protected"
|
|
54426
|
-
}), method(object({ deviceId:
|
|
54602
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54427
54603
|
kind: "mutation",
|
|
54428
54604
|
auth: "protected"
|
|
54429
|
-
}), method(object({ deviceId:
|
|
54605
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54606
|
+
kind: "mutation",
|
|
54607
|
+
auth: "protected"
|
|
54608
|
+
}), method(object({ deviceId: DeviceIdSchema }), _void(), {
|
|
54430
54609
|
kind: "mutation",
|
|
54431
54610
|
auth: "protected"
|
|
54432
54611
|
}), method(object({
|
|
54433
|
-
deviceId:
|
|
54612
|
+
deviceId: DeviceIdSchema,
|
|
54434
54613
|
program: string().min(1)
|
|
54435
54614
|
}), _void(), {
|
|
54436
54615
|
kind: "mutation",
|
|
54437
54616
|
auth: "protected"
|
|
54438
54617
|
}), method(object({
|
|
54439
|
-
deviceId:
|
|
54618
|
+
deviceId: DeviceIdSchema,
|
|
54440
54619
|
on: boolean()
|
|
54441
54620
|
}), _void(), {
|
|
54442
54621
|
kind: "mutation",
|
|
54443
54622
|
auth: "protected"
|
|
54444
54623
|
}), method(object({
|
|
54445
|
-
deviceId:
|
|
54624
|
+
deviceId: DeviceIdSchema,
|
|
54446
54625
|
on: boolean()
|
|
54447
54626
|
}), _void(), {
|
|
54448
54627
|
kind: "mutation",
|
|
54449
54628
|
auth: "protected"
|
|
54450
54629
|
}), method(object({
|
|
54451
|
-
deviceId:
|
|
54630
|
+
deviceId: DeviceIdSchema,
|
|
54452
54631
|
on: boolean()
|
|
54453
54632
|
}), _void(), {
|
|
54454
54633
|
kind: "mutation",
|
|
54455
54634
|
auth: "protected"
|
|
54456
54635
|
}), method(object({
|
|
54457
|
-
deviceId:
|
|
54636
|
+
deviceId: DeviceIdSchema,
|
|
54458
54637
|
on: boolean()
|
|
54459
54638
|
}), _void(), {
|
|
54460
54639
|
kind: "mutation",
|
|
54461
54640
|
auth: "protected"
|
|
54462
54641
|
}), method(object({
|
|
54463
|
-
deviceId:
|
|
54642
|
+
deviceId: DeviceIdSchema,
|
|
54464
54643
|
on: boolean()
|
|
54465
54644
|
}), _void(), {
|
|
54466
54645
|
kind: "mutation",
|
|
54467
54646
|
auth: "protected"
|
|
54468
54647
|
}), method(object({
|
|
54469
|
-
deviceId:
|
|
54648
|
+
deviceId: DeviceIdSchema,
|
|
54470
54649
|
on: boolean()
|
|
54471
54650
|
}), _void(), {
|
|
54472
54651
|
kind: "mutation",
|
|
54473
54652
|
auth: "protected"
|
|
54474
54653
|
}), method(object({
|
|
54475
|
-
deviceId:
|
|
54654
|
+
deviceId: DeviceIdSchema,
|
|
54476
54655
|
on: boolean()
|
|
54477
54656
|
}), _void(), {
|
|
54478
54657
|
kind: "mutation",
|
|
54479
54658
|
auth: "protected"
|
|
54480
54659
|
}), method(object({
|
|
54481
|
-
deviceId:
|
|
54660
|
+
deviceId: DeviceIdSchema,
|
|
54482
54661
|
key: string().min(1),
|
|
54483
|
-
value:
|
|
54484
|
-
boolean(),
|
|
54485
|
-
string(),
|
|
54486
|
-
number()
|
|
54487
|
-
])
|
|
54662
|
+
value: DishwasherValueSchema
|
|
54488
54663
|
}), _void(), {
|
|
54489
54664
|
kind: "mutation",
|
|
54490
54665
|
auth: "protected"
|
|
54491
|
-
});
|
|
54666
|
+
}), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
|
|
54492
54667
|
object({
|
|
54493
54668
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
54494
54669
|
lastPressedAt: number().nullable(),
|
|
@@ -64548,6 +64723,12 @@ Object.freeze({
|
|
|
64548
64723
|
addonId: null,
|
|
64549
64724
|
access: "view"
|
|
64550
64725
|
},
|
|
64726
|
+
"dishwasher.getOptions": {
|
|
64727
|
+
capName: "dishwasher",
|
|
64728
|
+
capScope: "device",
|
|
64729
|
+
addonId: null,
|
|
64730
|
+
access: "view"
|
|
64731
|
+
},
|
|
64551
64732
|
"dishwasher.getStatus": {
|
|
64552
64733
|
capName: "dishwasher",
|
|
64553
64734
|
capScope: "device",
|
|
@@ -64560,6 +64741,12 @@ Object.freeze({
|
|
|
64560
64741
|
addonId: null,
|
|
64561
64742
|
access: "create"
|
|
64562
64743
|
},
|
|
64744
|
+
"dishwasher.resume": {
|
|
64745
|
+
capName: "dishwasher",
|
|
64746
|
+
capScope: "device",
|
|
64747
|
+
addonId: null,
|
|
64748
|
+
access: "create"
|
|
64749
|
+
},
|
|
64563
64750
|
"dishwasher.setChildLock": {
|
|
64564
64751
|
capName: "dishwasher",
|
|
64565
64752
|
capScope: "device",
|
|
@@ -69060,6 +69247,12 @@ Object.freeze({
|
|
|
69060
69247
|
addonId: null,
|
|
69061
69248
|
access: "view"
|
|
69062
69249
|
},
|
|
69250
|
+
"storageMigration.moverClearance": {
|
|
69251
|
+
capName: "storage-migration",
|
|
69252
|
+
capScope: "system",
|
|
69253
|
+
addonId: null,
|
|
69254
|
+
access: "view"
|
|
69255
|
+
},
|
|
69063
69256
|
"storageMigration.movers": {
|
|
69064
69257
|
capName: "storage-migration",
|
|
69065
69258
|
capScope: "system",
|
|
@@ -71253,6 +71446,11 @@ Object.freeze({
|
|
|
71253
71446
|
form: "single",
|
|
71254
71447
|
optional: false
|
|
71255
71448
|
}],
|
|
71449
|
+
"dishwasher.getOptions": [{
|
|
71450
|
+
name: "deviceId",
|
|
71451
|
+
form: "single",
|
|
71452
|
+
optional: false
|
|
71453
|
+
}],
|
|
71256
71454
|
"dishwasher.getStatus": [{
|
|
71257
71455
|
name: "deviceId",
|
|
71258
71456
|
form: "single",
|
|
@@ -71263,6 +71461,11 @@ Object.freeze({
|
|
|
71263
71461
|
form: "single",
|
|
71264
71462
|
optional: false
|
|
71265
71463
|
}],
|
|
71464
|
+
"dishwasher.resume": [{
|
|
71465
|
+
name: "deviceId",
|
|
71466
|
+
form: "single",
|
|
71467
|
+
optional: false
|
|
71468
|
+
}],
|
|
71266
71469
|
"dishwasher.setChildLock": [{
|
|
71267
71470
|
name: "deviceId",
|
|
71268
71471
|
form: "single",
|
|
@@ -73349,6 +73552,9 @@ new Map(Object.entries({
|
|
|
73349
73552
|
"wrapper-update-available": "system",
|
|
73350
73553
|
"backup-completed": "system",
|
|
73351
73554
|
"export-completed": "system",
|
|
73555
|
+
"alert-critical": "system",
|
|
73556
|
+
"alert-error": "system",
|
|
73557
|
+
"alert-critical-resolved": "system",
|
|
73352
73558
|
"storage-location-low": "system",
|
|
73353
73559
|
"storage-location-critical": "system",
|
|
73354
73560
|
"storage-location-ok": "system",
|
|
@@ -73473,6 +73679,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
73473
73679
|
"storage-location-ok"
|
|
73474
73680
|
]
|
|
73475
73681
|
},
|
|
73682
|
+
{
|
|
73683
|
+
id: "alerts",
|
|
73684
|
+
family: "system",
|
|
73685
|
+
label: "Alerts",
|
|
73686
|
+
kinds: [
|
|
73687
|
+
"alert-critical",
|
|
73688
|
+
"alert-error",
|
|
73689
|
+
"alert-critical-resolved"
|
|
73690
|
+
]
|
|
73691
|
+
},
|
|
73476
73692
|
{
|
|
73477
73693
|
id: "alarm",
|
|
73478
73694
|
family: "alarm",
|
|
@@ -73517,6 +73733,21 @@ var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.ent
|
|
|
73517
73733
|
return [[descriptor.kind, field]];
|
|
73518
73734
|
})));
|
|
73519
73735
|
Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
|
|
73736
|
+
object({
|
|
73737
|
+
phase: _enum(["raised", "resolved"]),
|
|
73738
|
+
episodeId: string().min(1),
|
|
73739
|
+
alertId: string().min(1),
|
|
73740
|
+
severity: AlertSeveritySchema,
|
|
73741
|
+
category: string(),
|
|
73742
|
+
title: string(),
|
|
73743
|
+
message: string(),
|
|
73744
|
+
sourceType: string().optional(),
|
|
73745
|
+
sourceId: string().optional(),
|
|
73746
|
+
nodeId: string().optional(),
|
|
73747
|
+
/** The alert's own action link (where the operator acts on it), when it has one. */
|
|
73748
|
+
actionUrl: string().optional(),
|
|
73749
|
+
at: number()
|
|
73750
|
+
});
|
|
73520
73751
|
var RULE_BODY_ONLY = ["body"];
|
|
73521
73752
|
var RULE_TEXT = ["title", "body"];
|
|
73522
73753
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
@@ -73526,6 +73757,11 @@ var TANK = [
|
|
|
73526
73757
|
"device-tank-full",
|
|
73527
73758
|
"device-tank-normal"
|
|
73528
73759
|
];
|
|
73760
|
+
var ALERT_EPISODE = [
|
|
73761
|
+
"alert-critical",
|
|
73762
|
+
"alert-error",
|
|
73763
|
+
"alert-critical-resolved"
|
|
73764
|
+
];
|
|
73529
73765
|
var UPDATES = [
|
|
73530
73766
|
"addon-update-available",
|
|
73531
73767
|
"server-update-available",
|
|
@@ -73718,14 +73954,14 @@ var STATE_SUMMARY_VARS = [
|
|
|
73718
73954
|
([...RULE_TEXT], [...CONSUMABLE]),
|
|
73719
73955
|
([...RULE_TEXT], [...TANK]),
|
|
73720
73956
|
[...RULE_TEXT],
|
|
73721
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
73722
|
-
([...RULE_TEXT], [...UPDATES]),
|
|
73723
|
-
[...RULE_TEXT],
|
|
73957
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
73958
|
+
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
73724
73959
|
[...RULE_TEXT],
|
|
73725
73960
|
[...RULE_TEXT],
|
|
73726
73961
|
[...RULE_TEXT],
|
|
73727
73962
|
[...RULE_TEXT],
|
|
73728
73963
|
[...RULE_TEXT],
|
|
73964
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73729
73965
|
[...RULE_TEXT],
|
|
73730
73966
|
[...RULE_TEXT],
|
|
73731
73967
|
[...RULE_TEXT],
|
|
@@ -73743,7 +73979,11 @@ var STATE_SUMMARY_VARS = [
|
|
|
73743
73979
|
[...RULE_TEXT],
|
|
73744
73980
|
[...RULE_TEXT],
|
|
73745
73981
|
[...RULE_TEXT],
|
|
73746
|
-
[...RULE_TEXT],
|
|
73982
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73983
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73984
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73985
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73986
|
+
([...RULE_TEXT], [...ALERT_EPISODE]),
|
|
73747
73987
|
[...RULE_TEXT],
|
|
73748
73988
|
[...RULE_TEXT],
|
|
73749
73989
|
[...RULE_TEXT],
|