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