@camstack/types 1.2.68 → 1.2.69

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_event_category = require("./event-category-DxZbWydC.js");
3
- const require_sleep = require("./sleep-Dh1EJSqF.js");
3
+ const require_sleep = require("./sleep-YuacOD41.js");
4
4
  const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
5
5
  const require_enums = require("./enums.js");
6
6
  const require_err_msg = require("./err-msg-COpsHMw2.js");
@@ -13758,7 +13758,87 @@ var MethodAccessSchema = zod.z.enum([
13758
13758
  var AllowedProviderSchema = zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]);
13759
13759
  var AllowedDevicesSchema = zod.z.record(zod.z.string(), zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]));
13760
13760
  var CapScopeSchema = zod.z.enum(["device", "system"]);
13761
- var TokenScopeSchema = zod.z.discriminatedUnion("type", [
13761
+ /**
13762
+ * DeviceSelector (scope model v3 — 2026-08-12).
13763
+ *
13764
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
13765
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
13766
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
13767
+ * AFTER the grant was minted — no re-grant, no re-login.
13768
+ *
13769
+ * - `all` — every device in the deployment. The broad viewer/operator
13770
+ * lever without a `category` grant (a `category` grant also covers device
13771
+ * caps that carry no deviceId; `all` is specifically the device set).
13772
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
13773
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
13774
+ * is NOT covered until the grant is edited.
13775
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
13776
+ * DYNAMIC. A device that changes type, or a new device of the type,
13777
+ * re-resolves on the next request.
13778
+ * - `locations` — every device whose operator-assigned `location` label is
13779
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
13780
+ * null/unset location matches NO `locations` selector.
13781
+ */
13782
+ var DeviceSelectorSchema = zod.z.discriminatedUnion("kind", [
13783
+ zod.z.object({ kind: zod.z.literal("all") }),
13784
+ zod.z.object({
13785
+ kind: zod.z.literal("ids"),
13786
+ ids: zod.z.array(zod.z.number().int()).min(1)
13787
+ }),
13788
+ zod.z.object({
13789
+ kind: zod.z.literal("types"),
13790
+ types: zod.z.array(zod.z.enum(require_sleep.DeviceType)).min(1)
13791
+ }),
13792
+ zod.z.object({
13793
+ kind: zod.z.literal("locations"),
13794
+ locations: zod.z.array(zod.z.string().min(1)).min(1)
13795
+ })
13796
+ ]);
13797
+ var DeviceTokenScopeSchema = zod.z.object({
13798
+ type: zod.z.literal("device"),
13799
+ /** The device SET this grant covers — resolved against the live fleet. */
13800
+ selector: DeviceSelectorSchema,
13801
+ access: zod.z.array(MethodAccessSchema).min(1),
13802
+ /**
13803
+ * Whether a grant on a PARENT device transparently covers its accessory
13804
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
13805
+ * Direction is parent → children ONLY.
13806
+ *
13807
+ * Absent → the matcher DERIVES it from the access flavour: `view`
13808
+ * inherits (a camera viewer sees the camera's accessories), `create` /
13809
+ * `delete` do NOT (actuating/removing a child is an explicit act the
13810
+ * operator must grant on the child, not inherit from the parent). Set it
13811
+ * explicitly to override that default per grant.
13812
+ */
13813
+ includeLinked: zod.z.boolean().optional()
13814
+ });
13815
+ /**
13816
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
13817
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
13818
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
13819
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
13820
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
13821
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
13822
+ * migration cannot reach a JWT already in a client's hands; parse-time
13823
+ * migration covers both without a flag day. No cast — the raw object is read
13824
+ * through `Reflect.get` (its static type is `unknown`).
13825
+ */
13826
+ function migrateLegacyTokenScope(raw) {
13827
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
13828
+ if (Reflect.get(raw, "type") !== "device") return raw;
13829
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
13830
+ const targets = Reflect.get(raw, "targets");
13831
+ if (!Array.isArray(targets)) return raw;
13832
+ return {
13833
+ type: "device",
13834
+ selector: {
13835
+ kind: "ids",
13836
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
13837
+ },
13838
+ access: Reflect.get(raw, "access")
13839
+ };
13840
+ }
13841
+ var TokenScopeSchema = zod.z.preprocess(migrateLegacyTokenScope, zod.z.discriminatedUnion("type", [
13762
13842
  zod.z.object({
13763
13843
  type: zod.z.literal("category"),
13764
13844
  target: CapScopeSchema,
@@ -13774,18 +13854,8 @@ var TokenScopeSchema = zod.z.discriminatedUnion("type", [
13774
13854
  target: zod.z.string(),
13775
13855
  access: zod.z.array(MethodAccessSchema).min(1)
13776
13856
  }),
13777
- zod.z.object({
13778
- type: zod.z.literal("device"),
13779
- /**
13780
- * One or more deviceIds (serialised as strings for wire-format
13781
- * consistency with the rest of the union). Matcher accepts if
13782
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
13783
- * of one scope-per-device when granting access to a set of cameras.
13784
- */
13785
- targets: zod.z.array(zod.z.string()).min(1),
13786
- access: zod.z.array(MethodAccessSchema).min(1)
13787
- })
13788
- ]);
13857
+ DeviceTokenScopeSchema
13858
+ ]));
13789
13859
  var UserRecordSchema = zod.z.object({
13790
13860
  id: zod.z.string(),
13791
13861
  username: zod.z.string(),
@@ -23387,7 +23457,41 @@ var intercomCapability = {
23387
23457
  status: {
23388
23458
  schema: IntercomStatusSchema,
23389
23459
  kind: "command-driven"
23390
- }
23460
+ },
23461
+ /**
23462
+ * Runtime-state slice — mirrored by the kernel.
23463
+ *
23464
+ * The cap declared `status` and nothing else, so the only two sources an
23465
+ * exporter has for a value — the `device.state-changed` slice event and the
23466
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23467
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23468
+ * have been published and never received a value, which is the defect the
23469
+ * export's two classification tables exist to prevent (177 of them, once), so
23470
+ * `intercom` was excluded rather than exported.
23471
+ *
23472
+ * The shape is the status shape: there is exactly one truth about talk-back
23473
+ * and duplicating it into a second schema is how two halves of one capability
23474
+ * come to disagree. Providers write it through
23475
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23476
+ * and close a session, and seed it at registration so the slice exists before
23477
+ * the first session rather than after it.
23478
+ *
23479
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23480
+ * session handle, so a session torn down by a transport death that never
23481
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23482
+ * session or the next restart. That is why the slice is `session` and not
23483
+ * `restored` — a restart must never restore "talking".
23484
+ */
23485
+ runtimeState: IntercomStatusSchema,
23486
+ /**
23487
+ * Runtime-state durability: **session** — `talking` describes a live audio
23488
+ * session, which by definition does not survive the process that held it.
23489
+ * Restoring it would publish a camera as talking to nobody.
23490
+ *
23491
+ * See `RuntimeStateDurability`. Enforced by
23492
+ * `scripts/check-runtime-state-durability.ts`.
23493
+ */
23494
+ durability: "session"
23391
23495
  };
23392
23496
  //#endregion
23393
23497
  //#region src/capabilities/lawn-mower-control.cap.ts
@@ -26651,7 +26755,7 @@ var recordingCapability = {
26651
26755
  toMs: zod.z.number()
26652
26756
  }), RecordingAvailabilitySchema, {
26653
26757
  kind: "query",
26654
- auth: "admin"
26758
+ auth: "protected"
26655
26759
  }),
26656
26760
  /** Which calendar days in [fromMs,toMs) have ≥1 recorded segment, bucketed by
26657
26761
  * the client's local day (`tzOffsetMinutes` = minutes to add to UTC). Drives
@@ -26663,7 +26767,7 @@ var recordingCapability = {
26663
26767
  tzOffsetMinutes: zod.z.number()
26664
26768
  }), RecordingDaysSchema, {
26665
26769
  kind: "query",
26666
- auth: "admin"
26770
+ auth: "protected"
26667
26771
  }),
26668
26772
  getPlaybackManifest: require_sleep.method(zod.z.object({
26669
26773
  deviceId: zod.z.number(),
@@ -26671,7 +26775,7 @@ var recordingCapability = {
26671
26775
  toMs: zod.z.number()
26672
26776
  }), RecordingManifestSchema, {
26673
26777
  kind: "query",
26674
- auth: "admin"
26778
+ auth: "protected"
26675
26779
  }),
26676
26780
  getStorageUsage: require_sleep.method(zod.z.object({}), RecordingStorageUsageSchema, {
26677
26781
  kind: "query",
@@ -29648,6 +29752,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
29648
29752
  humiditySensor: humiditySensorCapability,
29649
29753
  image: imageCapability,
29650
29754
  imageSettings: imageSettingsCapability,
29755
+ intercom: intercomCapability,
29651
29756
  lawnMowerControl: lawnMowerControlCapability,
29652
29757
  lockControl: lockControlCapability,
29653
29758
  mediaPlayer: mediaPlayerCapability,
@@ -38763,6 +38868,1808 @@ var SYSTEM_CAP_NAMES = [
38763
38868
  "viewer-ui"
38764
38869
  ];
38765
38870
  //#endregion
38871
+ //#region src/generated/method-device-selectors.ts
38872
+ var METHOD_DEVICE_SELECTORS = Object.freeze({
38873
+ "accessories.setChildHidden": [{
38874
+ name: "childDeviceId",
38875
+ form: "single",
38876
+ optional: false
38877
+ }, {
38878
+ name: "deviceId",
38879
+ form: "single",
38880
+ optional: false
38881
+ }],
38882
+ "addonSettings.getDeviceSettings": [{
38883
+ name: "deviceId",
38884
+ form: "single",
38885
+ optional: false
38886
+ }],
38887
+ "addonSettings.updateDeviceSettings": [{
38888
+ name: "deviceId",
38889
+ form: "single",
38890
+ optional: false
38891
+ }],
38892
+ "alarmPanel.arm": [{
38893
+ name: "deviceId",
38894
+ form: "single",
38895
+ optional: false
38896
+ }],
38897
+ "alarmPanel.disarm": [{
38898
+ name: "deviceId",
38899
+ form: "single",
38900
+ optional: false
38901
+ }],
38902
+ "alarmPanel.trigger": [{
38903
+ name: "deviceId",
38904
+ form: "single",
38905
+ optional: false
38906
+ }],
38907
+ "audioAnalysis.resolveDeviceSettings": [{
38908
+ name: "deviceId",
38909
+ form: "single",
38910
+ optional: false
38911
+ }],
38912
+ "audioAnalyzer.classify": [{
38913
+ name: "deviceId",
38914
+ form: "single",
38915
+ optional: true
38916
+ }],
38917
+ "audioMetrics.getCurrentSnapshot": [{
38918
+ name: "deviceId",
38919
+ form: "single",
38920
+ optional: false
38921
+ }],
38922
+ "audioMetrics.getHistory": [{
38923
+ name: "deviceId",
38924
+ form: "single",
38925
+ optional: false
38926
+ }],
38927
+ "automationControl.disable": [{
38928
+ name: "deviceId",
38929
+ form: "single",
38930
+ optional: false
38931
+ }],
38932
+ "automationControl.enable": [{
38933
+ name: "deviceId",
38934
+ form: "single",
38935
+ optional: false
38936
+ }],
38937
+ "automationControl.trigger": [{
38938
+ name: "deviceId",
38939
+ form: "single",
38940
+ optional: false
38941
+ }],
38942
+ "battery.wakeForStream": [{
38943
+ name: "deviceId",
38944
+ form: "single",
38945
+ optional: false
38946
+ }],
38947
+ "brightness.setBrightness": [{
38948
+ name: "deviceId",
38949
+ form: "single",
38950
+ optional: false
38951
+ }],
38952
+ "button.press": [{
38953
+ name: "deviceId",
38954
+ form: "single",
38955
+ optional: false
38956
+ }],
38957
+ "cameraCredentials.getCredentials": [{
38958
+ name: "deviceId",
38959
+ form: "single",
38960
+ optional: false
38961
+ }],
38962
+ "cameraStreams.getBrokerStreams": [{
38963
+ name: "deviceId",
38964
+ form: "single",
38965
+ optional: false
38966
+ }],
38967
+ "cameraStreams.getCameraStreams": [{
38968
+ name: "deviceId",
38969
+ form: "single",
38970
+ optional: false
38971
+ }],
38972
+ "cameraStreams.getProfileRtspEntries": [{
38973
+ name: "deviceId",
38974
+ form: "single",
38975
+ optional: false
38976
+ }],
38977
+ "cameraStreams.getRtspEntries": [{
38978
+ name: "deviceId",
38979
+ form: "single",
38980
+ optional: false
38981
+ }],
38982
+ "cameraStreams.pickStream": [{
38983
+ name: "deviceId",
38984
+ form: "single",
38985
+ optional: false
38986
+ }],
38987
+ "climateControl.setFanMode": [{
38988
+ name: "deviceId",
38989
+ form: "single",
38990
+ optional: false
38991
+ }],
38992
+ "climateControl.setMode": [{
38993
+ name: "deviceId",
38994
+ form: "single",
38995
+ optional: false
38996
+ }],
38997
+ "climateControl.setPreset": [{
38998
+ name: "deviceId",
38999
+ form: "single",
39000
+ optional: false
39001
+ }],
39002
+ "climateControl.setSwingHorizontal": [{
39003
+ name: "deviceId",
39004
+ form: "single",
39005
+ optional: false
39006
+ }],
39007
+ "climateControl.setSwingVertical": [{
39008
+ name: "deviceId",
39009
+ form: "single",
39010
+ optional: false
39011
+ }],
39012
+ "climateControl.setTarget": [{
39013
+ name: "deviceId",
39014
+ form: "single",
39015
+ optional: false
39016
+ }],
39017
+ "climateControl.setTargetHumidity": [{
39018
+ name: "deviceId",
39019
+ form: "single",
39020
+ optional: false
39021
+ }],
39022
+ "climateControl.setTargetRange": [{
39023
+ name: "deviceId",
39024
+ form: "single",
39025
+ optional: false
39026
+ }],
39027
+ "color.setColor": [{
39028
+ name: "deviceId",
39029
+ form: "single",
39030
+ optional: false
39031
+ }],
39032
+ "consumables.reset": [{
39033
+ name: "deviceId",
39034
+ form: "single",
39035
+ optional: false
39036
+ }],
39037
+ "control.setValue": [{
39038
+ name: "deviceId",
39039
+ form: "single",
39040
+ optional: false
39041
+ }],
39042
+ "cover.close": [{
39043
+ name: "deviceId",
39044
+ form: "single",
39045
+ optional: false
39046
+ }],
39047
+ "cover.open": [{
39048
+ name: "deviceId",
39049
+ form: "single",
39050
+ optional: false
39051
+ }],
39052
+ "cover.setPosition": [{
39053
+ name: "deviceId",
39054
+ form: "single",
39055
+ optional: false
39056
+ }],
39057
+ "cover.setTiltPosition": [{
39058
+ name: "deviceId",
39059
+ form: "single",
39060
+ optional: false
39061
+ }],
39062
+ "cover.stop": [{
39063
+ name: "deviceId",
39064
+ form: "single",
39065
+ optional: false
39066
+ }],
39067
+ "dayNight.getOptions": [{
39068
+ name: "deviceId",
39069
+ form: "single",
39070
+ optional: false
39071
+ }],
39072
+ "dayNight.setSettings": [{
39073
+ name: "deviceId",
39074
+ form: "single",
39075
+ optional: false
39076
+ }],
39077
+ "decoder.createSession": [{
39078
+ name: "deviceId",
39079
+ form: "single",
39080
+ optional: true
39081
+ }],
39082
+ "deviceAdoption.release": [{
39083
+ name: "camDeviceId",
39084
+ form: "single",
39085
+ optional: false
39086
+ }],
39087
+ "deviceAdoption.resync": [{
39088
+ name: "camDeviceId",
39089
+ form: "single",
39090
+ optional: false
39091
+ }],
39092
+ "deviceDiscovery.adoptDevice": [{
39093
+ name: "deviceId",
39094
+ form: "single",
39095
+ optional: false
39096
+ }],
39097
+ "deviceDiscovery.listDiscovered": [{
39098
+ name: "deviceId",
39099
+ form: "single",
39100
+ optional: false
39101
+ }],
39102
+ "deviceDiscovery.refreshDiscovery": [{
39103
+ name: "deviceId",
39104
+ form: "single",
39105
+ optional: false
39106
+ }],
39107
+ "deviceDiscovery.releaseDevice": [{
39108
+ name: "childDeviceId",
39109
+ form: "single",
39110
+ optional: false
39111
+ }, {
39112
+ name: "deviceId",
39113
+ form: "single",
39114
+ optional: false
39115
+ }],
39116
+ "deviceManager.adoptionRelease": [{
39117
+ name: "camDeviceId",
39118
+ form: "single",
39119
+ optional: false
39120
+ }],
39121
+ "deviceManager.adoptionResync": [{
39122
+ name: "camDeviceId",
39123
+ form: "single",
39124
+ optional: false
39125
+ }],
39126
+ "deviceManager.applyInitialMeta": [{
39127
+ name: "deviceId",
39128
+ form: "single",
39129
+ optional: false
39130
+ }, {
39131
+ name: "linkDeviceId",
39132
+ form: "single",
39133
+ optional: true
39134
+ }],
39135
+ "deviceManager.disable": [{
39136
+ name: "deviceId",
39137
+ form: "single",
39138
+ optional: false
39139
+ }],
39140
+ "deviceManager.enable": [{
39141
+ name: "deviceId",
39142
+ form: "single",
39143
+ optional: false
39144
+ }],
39145
+ "deviceManager.getBindings": [{
39146
+ name: "deviceId",
39147
+ form: "single",
39148
+ optional: false
39149
+ }],
39150
+ "deviceManager.getChildren": [{
39151
+ name: "parentDeviceId",
39152
+ form: "single",
39153
+ optional: false
39154
+ }],
39155
+ "deviceManager.getConfigSchema": [{
39156
+ name: "deviceId",
39157
+ form: "single",
39158
+ optional: false
39159
+ }],
39160
+ "deviceManager.getDevice": [{
39161
+ name: "deviceId",
39162
+ form: "single",
39163
+ optional: false
39164
+ }],
39165
+ "deviceManager.getDeviceAggregate": [{
39166
+ name: "deviceId",
39167
+ form: "single",
39168
+ optional: false
39169
+ }],
39170
+ "deviceManager.getDeviceLiveInfoAggregate": [{
39171
+ name: "deviceId",
39172
+ form: "single",
39173
+ optional: false
39174
+ }],
39175
+ "deviceManager.getDeviceSettingsAggregate": [{
39176
+ name: "deviceId",
39177
+ form: "single",
39178
+ optional: false
39179
+ }],
39180
+ "deviceManager.getDeviceStatusAggregate": [{
39181
+ name: "deviceId",
39182
+ form: "single",
39183
+ optional: false
39184
+ }],
39185
+ "deviceManager.getDeviceStatusAggregateBatch": [{
39186
+ name: "deviceIds",
39187
+ form: "array",
39188
+ optional: false
39189
+ }],
39190
+ "deviceManager.getLinkedDevices": [{
39191
+ name: "deviceId",
39192
+ form: "single",
39193
+ optional: false
39194
+ }],
39195
+ "deviceManager.getSettingsSchema": [{
39196
+ name: "deviceId",
39197
+ form: "single",
39198
+ optional: false
39199
+ }],
39200
+ "deviceManager.getStreamProfileMap": [{
39201
+ name: "deviceId",
39202
+ form: "single",
39203
+ optional: false
39204
+ }],
39205
+ "deviceManager.getStreamSources": [{
39206
+ name: "deviceId",
39207
+ form: "single",
39208
+ optional: false
39209
+ }],
39210
+ "deviceManager.getWireableFields": [{
39211
+ name: "deviceId",
39212
+ form: "single",
39213
+ optional: false
39214
+ }],
39215
+ "deviceManager.loadConfig": [{
39216
+ name: "deviceId",
39217
+ form: "single",
39218
+ optional: false
39219
+ }],
39220
+ "deviceManager.loadMeta": [{
39221
+ name: "deviceId",
39222
+ form: "single",
39223
+ optional: false
39224
+ }],
39225
+ "deviceManager.loadRuntimeState": [{
39226
+ name: "deviceId",
39227
+ form: "single",
39228
+ optional: false
39229
+ }],
39230
+ "deviceManager.persistConfig": [{
39231
+ name: "deviceId",
39232
+ form: "single",
39233
+ optional: false
39234
+ }],
39235
+ "deviceManager.probeStreams": [{
39236
+ name: "deviceId",
39237
+ form: "single",
39238
+ optional: false
39239
+ }],
39240
+ "deviceManager.registerDevice": [{
39241
+ name: "parentDeviceId",
39242
+ form: "single",
39243
+ optional: true
39244
+ }],
39245
+ "deviceManager.remove": [{
39246
+ name: "deviceId",
39247
+ form: "single",
39248
+ optional: false
39249
+ }],
39250
+ "deviceManager.removeDevice": [{
39251
+ name: "deviceId",
39252
+ form: "single",
39253
+ optional: false
39254
+ }],
39255
+ "deviceManager.runDeviceAction": [{
39256
+ name: "deviceId",
39257
+ form: "single",
39258
+ optional: false
39259
+ }],
39260
+ "deviceManager.setChildLayout": [{
39261
+ name: "deviceId",
39262
+ form: "single",
39263
+ optional: false
39264
+ }],
39265
+ "deviceManager.setDisabled": [{
39266
+ name: "deviceId",
39267
+ form: "single",
39268
+ optional: false
39269
+ }],
39270
+ "deviceManager.setDisplay": [{
39271
+ name: "deviceId",
39272
+ form: "single",
39273
+ optional: false
39274
+ }],
39275
+ "deviceManager.setIntegrationId": [{
39276
+ name: "deviceId",
39277
+ form: "single",
39278
+ optional: false
39279
+ }],
39280
+ "deviceManager.setLinkDeviceId": [{
39281
+ name: "deviceId",
39282
+ form: "single",
39283
+ optional: false
39284
+ }, {
39285
+ name: "linkDeviceId",
39286
+ form: "single",
39287
+ optional: true
39288
+ }],
39289
+ "deviceManager.setLocation": [{
39290
+ name: "deviceId",
39291
+ form: "single",
39292
+ optional: false
39293
+ }],
39294
+ "deviceManager.setMetadata": [{
39295
+ name: "deviceId",
39296
+ form: "single",
39297
+ optional: false
39298
+ }],
39299
+ "deviceManager.setName": [{
39300
+ name: "deviceId",
39301
+ form: "single",
39302
+ optional: false
39303
+ }],
39304
+ "deviceManager.setPrimaryChildEntityId": [{
39305
+ name: "deviceId",
39306
+ form: "single",
39307
+ optional: false
39308
+ }],
39309
+ "deviceManager.setRole": [{
39310
+ name: "deviceId",
39311
+ form: "single",
39312
+ optional: false
39313
+ }],
39314
+ "deviceManager.setStreamProfileMap": [{
39315
+ name: "deviceId",
39316
+ form: "single",
39317
+ optional: false
39318
+ }],
39319
+ "deviceManager.setType": [{
39320
+ name: "deviceId",
39321
+ form: "single",
39322
+ optional: false
39323
+ }],
39324
+ "deviceManager.setWrapperActive": [{
39325
+ name: "deviceId",
39326
+ form: "single",
39327
+ optional: false
39328
+ }],
39329
+ "deviceManager.testField": [{
39330
+ name: "deviceId",
39331
+ form: "single",
39332
+ optional: false
39333
+ }],
39334
+ "deviceManager.updateConfig": [{
39335
+ name: "deviceId",
39336
+ form: "single",
39337
+ optional: false
39338
+ }],
39339
+ "deviceManager.updateDeviceField": [{
39340
+ name: "deviceId",
39341
+ form: "single",
39342
+ optional: false
39343
+ }],
39344
+ "deviceManager.updateDeviceFieldsBatch": [{
39345
+ name: "deviceId",
39346
+ form: "single",
39347
+ optional: false
39348
+ }],
39349
+ "deviceOps.getConfigEntries": [{
39350
+ name: "deviceId",
39351
+ form: "single",
39352
+ optional: false
39353
+ }],
39354
+ "deviceOps.getRawState": [{
39355
+ name: "deviceId",
39356
+ form: "single",
39357
+ optional: false
39358
+ }],
39359
+ "deviceOps.getSettingsSchema": [{
39360
+ name: "deviceId",
39361
+ form: "single",
39362
+ optional: false
39363
+ }],
39364
+ "deviceOps.getStreamSources": [{
39365
+ name: "deviceId",
39366
+ form: "single",
39367
+ optional: false
39368
+ }],
39369
+ "deviceOps.removeDevice": [{
39370
+ name: "deviceId",
39371
+ form: "single",
39372
+ optional: false
39373
+ }],
39374
+ "deviceOps.runAction": [{
39375
+ name: "deviceId",
39376
+ form: "single",
39377
+ optional: false
39378
+ }],
39379
+ "deviceOps.setConfig": [{
39380
+ name: "deviceId",
39381
+ form: "single",
39382
+ optional: false
39383
+ }],
39384
+ "deviceState.getCapSlice": [{
39385
+ name: "deviceId",
39386
+ form: "single",
39387
+ optional: false
39388
+ }],
39389
+ "deviceState.getSnapshot": [{
39390
+ name: "deviceId",
39391
+ form: "single",
39392
+ optional: false
39393
+ }],
39394
+ "deviceState.setCapSlice": [{
39395
+ name: "deviceId",
39396
+ form: "single",
39397
+ optional: false
39398
+ }],
39399
+ "events.getEventClipUrl": [{
39400
+ name: "deviceId",
39401
+ form: "single",
39402
+ optional: false
39403
+ }],
39404
+ "events.getEvents": [{
39405
+ name: "deviceId",
39406
+ form: "single",
39407
+ optional: false
39408
+ }],
39409
+ "events.getEventThumbnail": [{
39410
+ name: "deviceId",
39411
+ form: "single",
39412
+ optional: false
39413
+ }],
39414
+ "faceGallery.getFaceByTrack": [{
39415
+ name: "deviceId",
39416
+ form: "single",
39417
+ optional: false
39418
+ }],
39419
+ "faceGallery.listRecentFaces": [{
39420
+ name: "deviceId",
39421
+ form: "single",
39422
+ optional: true
39423
+ }],
39424
+ "fanControl.setDirection": [{
39425
+ name: "deviceId",
39426
+ form: "single",
39427
+ optional: false
39428
+ }],
39429
+ "fanControl.setOscillating": [{
39430
+ name: "deviceId",
39431
+ form: "single",
39432
+ optional: false
39433
+ }],
39434
+ "fanControl.setPercentage": [{
39435
+ name: "deviceId",
39436
+ form: "single",
39437
+ optional: false
39438
+ }],
39439
+ "fanControl.setPreset": [{
39440
+ name: "deviceId",
39441
+ form: "single",
39442
+ optional: false
39443
+ }],
39444
+ "humidifier.setMode": [{
39445
+ name: "deviceId",
39446
+ form: "single",
39447
+ optional: false
39448
+ }],
39449
+ "humidifier.setOn": [{
39450
+ name: "deviceId",
39451
+ form: "single",
39452
+ optional: false
39453
+ }],
39454
+ "humidifier.setTargetHumidity": [{
39455
+ name: "deviceId",
39456
+ form: "single",
39457
+ optional: false
39458
+ }],
39459
+ "imageSettings.getOptions": [{
39460
+ name: "deviceId",
39461
+ form: "single",
39462
+ optional: false
39463
+ }],
39464
+ "imageSettings.setSettings": [{
39465
+ name: "deviceId",
39466
+ form: "single",
39467
+ optional: false
39468
+ }],
39469
+ "intercom.endTalkSession": [{
39470
+ name: "deviceId",
39471
+ form: "single",
39472
+ optional: false
39473
+ }],
39474
+ "intercom.handleAnswer": [{
39475
+ name: "deviceId",
39476
+ form: "single",
39477
+ optional: false
39478
+ }],
39479
+ "intercom.pushTalkAudio": [{
39480
+ name: "deviceId",
39481
+ form: "single",
39482
+ optional: false
39483
+ }],
39484
+ "intercom.startSession": [{
39485
+ name: "deviceId",
39486
+ form: "single",
39487
+ optional: false
39488
+ }],
39489
+ "intercom.startTalkSession": [{
39490
+ name: "deviceId",
39491
+ form: "single",
39492
+ optional: false
39493
+ }],
39494
+ "intercom.stopSession": [{
39495
+ name: "deviceId",
39496
+ form: "single",
39497
+ optional: false
39498
+ }],
39499
+ "lawnMowerControl.dock": [{
39500
+ name: "deviceId",
39501
+ form: "single",
39502
+ optional: false
39503
+ }],
39504
+ "lawnMowerControl.pause": [{
39505
+ name: "deviceId",
39506
+ form: "single",
39507
+ optional: false
39508
+ }],
39509
+ "lawnMowerControl.startMowing": [{
39510
+ name: "deviceId",
39511
+ form: "single",
39512
+ optional: false
39513
+ }],
39514
+ "lockControl.lock": [{
39515
+ name: "deviceId",
39516
+ form: "single",
39517
+ optional: false
39518
+ }],
39519
+ "lockControl.open": [{
39520
+ name: "deviceId",
39521
+ form: "single",
39522
+ optional: false
39523
+ }],
39524
+ "lockControl.unlock": [{
39525
+ name: "deviceId",
39526
+ form: "single",
39527
+ optional: false
39528
+ }],
39529
+ "mediaPlayer.next": [{
39530
+ name: "deviceId",
39531
+ form: "single",
39532
+ optional: false
39533
+ }],
39534
+ "mediaPlayer.pause": [{
39535
+ name: "deviceId",
39536
+ form: "single",
39537
+ optional: false
39538
+ }],
39539
+ "mediaPlayer.play": [{
39540
+ name: "deviceId",
39541
+ form: "single",
39542
+ optional: false
39543
+ }],
39544
+ "mediaPlayer.playMedia": [{
39545
+ name: "deviceId",
39546
+ form: "single",
39547
+ optional: false
39548
+ }],
39549
+ "mediaPlayer.previous": [{
39550
+ name: "deviceId",
39551
+ form: "single",
39552
+ optional: false
39553
+ }],
39554
+ "mediaPlayer.seek": [{
39555
+ name: "deviceId",
39556
+ form: "single",
39557
+ optional: false
39558
+ }],
39559
+ "mediaPlayer.selectSource": [{
39560
+ name: "deviceId",
39561
+ form: "single",
39562
+ optional: false
39563
+ }],
39564
+ "mediaPlayer.setMute": [{
39565
+ name: "deviceId",
39566
+ form: "single",
39567
+ optional: false
39568
+ }],
39569
+ "mediaPlayer.setRepeat": [{
39570
+ name: "deviceId",
39571
+ form: "single",
39572
+ optional: false
39573
+ }],
39574
+ "mediaPlayer.setShuffle": [{
39575
+ name: "deviceId",
39576
+ form: "single",
39577
+ optional: false
39578
+ }],
39579
+ "mediaPlayer.setVolume": [{
39580
+ name: "deviceId",
39581
+ form: "single",
39582
+ optional: false
39583
+ }],
39584
+ "mediaPlayer.stop": [{
39585
+ name: "deviceId",
39586
+ form: "single",
39587
+ optional: false
39588
+ }],
39589
+ "motion.isDetected": [{
39590
+ name: "deviceId",
39591
+ form: "single",
39592
+ optional: false
39593
+ }],
39594
+ "motionDetection.analyze": [{
39595
+ name: "deviceId",
39596
+ form: "single",
39597
+ optional: false
39598
+ }],
39599
+ "motionDetection.removeCamera": [{
39600
+ name: "deviceId",
39601
+ form: "single",
39602
+ optional: false
39603
+ }],
39604
+ "motionTrigger.setMotionTrigger": [{
39605
+ name: "deviceId",
39606
+ form: "single",
39607
+ optional: false
39608
+ }],
39609
+ "motionZones.getOptions": [{
39610
+ name: "deviceId",
39611
+ form: "single",
39612
+ optional: false
39613
+ }],
39614
+ "motionZones.setZone": [{
39615
+ name: "deviceId",
39616
+ form: "single",
39617
+ optional: false
39618
+ }],
39619
+ "nativeObjectDetection.setEnabled": [{
39620
+ name: "deviceId",
39621
+ form: "single",
39622
+ optional: false
39623
+ }],
39624
+ "networkQuality.getDeviceStats": [{
39625
+ name: "deviceId",
39626
+ form: "single",
39627
+ optional: false
39628
+ }],
39629
+ "networkQuality.reportClientStats": [{
39630
+ name: "deviceId",
39631
+ form: "single",
39632
+ optional: false
39633
+ }],
39634
+ "notificationRules.setDeviceMuted": [{
39635
+ name: "deviceId",
39636
+ form: "single",
39637
+ optional: false
39638
+ }],
39639
+ "notifier.cancel": [{
39640
+ name: "deviceId",
39641
+ form: "single",
39642
+ optional: false
39643
+ }],
39644
+ "notifier.send": [{
39645
+ name: "deviceId",
39646
+ form: "single",
39647
+ optional: false
39648
+ }],
39649
+ "osd.setOverlay": [{
39650
+ name: "deviceId",
39651
+ form: "single",
39652
+ optional: false
39653
+ }],
39654
+ "osdManager.clearSlotBinding": [{
39655
+ name: "deviceId",
39656
+ form: "single",
39657
+ optional: false
39658
+ }],
39659
+ "osdManager.copyDeviceConfiguration": [{
39660
+ name: "sourceDeviceId",
39661
+ form: "single",
39662
+ optional: false
39663
+ }, {
39664
+ name: "targetDeviceId",
39665
+ form: "single",
39666
+ optional: false
39667
+ }],
39668
+ "osdManager.getDeviceOsd": [{
39669
+ name: "deviceId",
39670
+ form: "single",
39671
+ optional: false
39672
+ }],
39673
+ "osdManager.getSourceCatalog": [{
39674
+ name: "deviceId",
39675
+ form: "single",
39676
+ optional: false
39677
+ }],
39678
+ "osdManager.previewSlot": [{
39679
+ name: "deviceId",
39680
+ form: "single",
39681
+ optional: false
39682
+ }],
39683
+ "osdManager.renderDevice": [{
39684
+ name: "deviceId",
39685
+ form: "single",
39686
+ optional: false
39687
+ }],
39688
+ "osdManager.setSlotBinding": [{
39689
+ name: "deviceId",
39690
+ form: "single",
39691
+ optional: false
39692
+ }],
39693
+ "petFeeder.callPet": [{
39694
+ name: "deviceId",
39695
+ form: "single",
39696
+ optional: false
39697
+ }],
39698
+ "petFeeder.cancelFeed": [{
39699
+ name: "deviceId",
39700
+ form: "single",
39701
+ optional: false
39702
+ }],
39703
+ "petFeeder.feed": [{
39704
+ name: "deviceId",
39705
+ form: "single",
39706
+ optional: false
39707
+ }],
39708
+ "petFeeder.markFoodReplenished": [{
39709
+ name: "deviceId",
39710
+ form: "single",
39711
+ optional: false
39712
+ }],
39713
+ "petFeeder.playSound": [{
39714
+ name: "deviceId",
39715
+ form: "single",
39716
+ optional: false
39717
+ }],
39718
+ "petFeeder.resetDesiccant": [{
39719
+ name: "deviceId",
39720
+ form: "single",
39721
+ optional: false
39722
+ }],
39723
+ "petFeeder.setChildLock": [{
39724
+ name: "deviceId",
39725
+ form: "single",
39726
+ optional: false
39727
+ }],
39728
+ "petFeeder.setFeedSound": [{
39729
+ name: "deviceId",
39730
+ form: "single",
39731
+ optional: false
39732
+ }],
39733
+ "petFeeder.setIndicatorLight": [{
39734
+ name: "deviceId",
39735
+ form: "single",
39736
+ optional: false
39737
+ }],
39738
+ "petFeeder.setVolume": [{
39739
+ name: "deviceId",
39740
+ form: "single",
39741
+ optional: false
39742
+ }],
39743
+ "pipelineAnalytics.clearTracks": [{
39744
+ name: "deviceId",
39745
+ form: "single",
39746
+ optional: false
39747
+ }],
39748
+ "pipelineAnalytics.completeRetrainTrack": [{
39749
+ name: "deviceId",
39750
+ form: "single",
39751
+ optional: false
39752
+ }],
39753
+ "pipelineAnalytics.deleteDeviceEvents": [{
39754
+ name: "deviceId",
39755
+ form: "single",
39756
+ optional: false
39757
+ }],
39758
+ "pipelineAnalytics.deleteTracks": [{
39759
+ name: "deviceId",
39760
+ form: "single",
39761
+ optional: false
39762
+ }],
39763
+ "pipelineAnalytics.deselectRetrainFrame": [{
39764
+ name: "deviceId",
39765
+ form: "single",
39766
+ optional: false
39767
+ }],
39768
+ "pipelineAnalytics.getActiveTracks": [{
39769
+ name: "deviceId",
39770
+ form: "single",
39771
+ optional: false
39772
+ }],
39773
+ "pipelineAnalytics.getAudioEvents": [{
39774
+ name: "deviceId",
39775
+ form: "single",
39776
+ optional: false
39777
+ }],
39778
+ "pipelineAnalytics.getEventDensity": [{
39779
+ name: "deviceId",
39780
+ form: "single",
39781
+ optional: false
39782
+ }],
39783
+ "pipelineAnalytics.getKeyEvents": [{
39784
+ name: "deviceId",
39785
+ form: "single",
39786
+ optional: false
39787
+ }],
39788
+ "pipelineAnalytics.getMotionEvents": [{
39789
+ name: "deviceId",
39790
+ form: "single",
39791
+ optional: false
39792
+ }],
39793
+ "pipelineAnalytics.getObjectEvents": [{
39794
+ name: "deviceId",
39795
+ form: "single",
39796
+ optional: false
39797
+ }],
39798
+ "pipelineAnalytics.getRetrainExportUrl": [{
39799
+ name: "deviceIds",
39800
+ form: "array",
39801
+ optional: true
39802
+ }],
39803
+ "pipelineAnalytics.getSensorEvents": [{
39804
+ name: "deviceId",
39805
+ form: "single",
39806
+ optional: false
39807
+ }],
39808
+ "pipelineAnalytics.getTrack": [{
39809
+ name: "deviceId",
39810
+ form: "single",
39811
+ optional: false
39812
+ }],
39813
+ "pipelineAnalytics.getTrainingExportSummary": [{
39814
+ name: "deviceIds",
39815
+ form: "array",
39816
+ optional: true
39817
+ }],
39818
+ "pipelineAnalytics.getTrainingExportUrl": [{
39819
+ name: "deviceIds",
39820
+ form: "array",
39821
+ optional: true
39822
+ }],
39823
+ "pipelineAnalytics.listEventKinds": [{
39824
+ name: "deviceId",
39825
+ form: "single",
39826
+ optional: false
39827
+ }],
39828
+ "pipelineAnalytics.listEventKindsBatch": [{
39829
+ name: "deviceIds",
39830
+ form: "array",
39831
+ optional: false
39832
+ }],
39833
+ "pipelineAnalytics.listOpsLog": [{
39834
+ name: "deviceId",
39835
+ form: "single",
39836
+ optional: true
39837
+ }],
39838
+ "pipelineAnalytics.listRecentTracks": [{
39839
+ name: "deviceIds",
39840
+ form: "array",
39841
+ optional: false
39842
+ }],
39843
+ "pipelineAnalytics.listRetrainStaging": [{
39844
+ name: "deviceIds",
39845
+ form: "array",
39846
+ optional: true
39847
+ }],
39848
+ "pipelineAnalytics.listTracks": [{
39849
+ name: "deviceId",
39850
+ form: "single",
39851
+ optional: false
39852
+ }],
39853
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
39854
+ name: "deviceId",
39855
+ form: "single",
39856
+ optional: false
39857
+ }],
39858
+ "pipelineAnalytics.pruneEventsBefore": [{
39859
+ name: "deviceId",
39860
+ form: "single",
39861
+ optional: false
39862
+ }],
39863
+ "pipelineAnalytics.pruneTracksBefore": [{
39864
+ name: "deviceId",
39865
+ form: "single",
39866
+ optional: false
39867
+ }],
39868
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
39869
+ name: "deviceId",
39870
+ form: "single",
39871
+ optional: true
39872
+ }],
39873
+ "pipelineAnalytics.restageRetrainTrack": [{
39874
+ name: "deviceId",
39875
+ form: "single",
39876
+ optional: false
39877
+ }],
39878
+ "pipelineAnalytics.saveRetrainAnnotations": [{
39879
+ name: "deviceId",
39880
+ form: "single",
39881
+ optional: false
39882
+ }],
39883
+ "pipelineAnalytics.searchObjectEvents": [{
39884
+ name: "deviceId",
39885
+ form: "single",
39886
+ optional: true
39887
+ }],
39888
+ "pipelineAnalytics.selectRetrainFrames": [{
39889
+ name: "deviceId",
39890
+ form: "single",
39891
+ optional: false
39892
+ }],
39893
+ "pipelineAnalytics.setTrackFlags": [{
39894
+ name: "deviceId",
39895
+ form: "single",
39896
+ optional: false
39897
+ }],
39898
+ "pipelineAnalytics.wipeAllAnalytics": [{
39899
+ name: "deviceId",
39900
+ form: "single",
39901
+ optional: false
39902
+ }],
39903
+ "pipelineExecutor.runPipeline": [{
39904
+ name: "deviceId",
39905
+ form: "single",
39906
+ optional: true
39907
+ }],
39908
+ "pipelineExecutor.runPipelineBatch": [{
39909
+ name: "deviceId",
39910
+ form: "single",
39911
+ optional: true
39912
+ }],
39913
+ "pipelineOrchestrator.assignAudio": [{
39914
+ name: "deviceId",
39915
+ form: "single",
39916
+ optional: false
39917
+ }],
39918
+ "pipelineOrchestrator.assignPipeline": [{
39919
+ name: "deviceId",
39920
+ form: "single",
39921
+ optional: false
39922
+ }],
39923
+ "pipelineOrchestrator.getAudioAssignment": [{
39924
+ name: "deviceId",
39925
+ form: "single",
39926
+ optional: false
39927
+ }],
39928
+ "pipelineOrchestrator.getCameraMetrics": [{
39929
+ name: "deviceId",
39930
+ form: "single",
39931
+ optional: false
39932
+ }],
39933
+ "pipelineOrchestrator.getCameraSettings": [{
39934
+ name: "deviceId",
39935
+ form: "single",
39936
+ optional: false
39937
+ }],
39938
+ "pipelineOrchestrator.getCameraStatus": [{
39939
+ name: "deviceId",
39940
+ form: "single",
39941
+ optional: false
39942
+ }],
39943
+ "pipelineOrchestrator.getCameraStatuses": [{
39944
+ name: "deviceIds",
39945
+ form: "array",
39946
+ optional: true
39947
+ }],
39948
+ "pipelineOrchestrator.getCameraStepOverrides": [{
39949
+ name: "deviceId",
39950
+ form: "single",
39951
+ optional: false
39952
+ }],
39953
+ "pipelineOrchestrator.getCameraSwitches": [{
39954
+ name: "deviceId",
39955
+ form: "single",
39956
+ optional: false
39957
+ }],
39958
+ "pipelineOrchestrator.getPipelineAssignment": [{
39959
+ name: "deviceId",
39960
+ form: "single",
39961
+ optional: false
39962
+ }],
39963
+ "pipelineOrchestrator.getPipelineDevicePin": [{
39964
+ name: "deviceId",
39965
+ form: "single",
39966
+ optional: false
39967
+ }],
39968
+ "pipelineOrchestrator.resolvePipeline": [{
39969
+ name: "deviceId",
39970
+ form: "single",
39971
+ optional: false
39972
+ }],
39973
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
39974
+ name: "deviceId",
39975
+ form: "single",
39976
+ optional: false
39977
+ }],
39978
+ "pipelineOrchestrator.setCameraStepOverride": [{
39979
+ name: "deviceId",
39980
+ form: "single",
39981
+ optional: false
39982
+ }],
39983
+ "pipelineOrchestrator.setCameraStepToggle": [{
39984
+ name: "deviceId",
39985
+ form: "single",
39986
+ optional: false
39987
+ }],
39988
+ "pipelineOrchestrator.setCameraSwitch": [{
39989
+ name: "deviceId",
39990
+ form: "single",
39991
+ optional: false
39992
+ }],
39993
+ "pipelineOrchestrator.setPipelineDevicePin": [{
39994
+ name: "deviceId",
39995
+ form: "single",
39996
+ optional: false
39997
+ }],
39998
+ "pipelineOrchestrator.unassignAudio": [{
39999
+ name: "deviceId",
40000
+ form: "single",
40001
+ optional: false
40002
+ }],
40003
+ "pipelineOrchestrator.unassignPipeline": [{
40004
+ name: "deviceId",
40005
+ form: "single",
40006
+ optional: false
40007
+ }],
40008
+ "pipelineRunner.attachCamera": [{
40009
+ name: "deviceId",
40010
+ form: "single",
40011
+ optional: false
40012
+ }],
40013
+ "pipelineRunner.detachCamera": [{
40014
+ name: "deviceId",
40015
+ form: "single",
40016
+ optional: false
40017
+ }],
40018
+ "pipelineRunner.getCameraMetrics": [{
40019
+ name: "deviceId",
40020
+ form: "single",
40021
+ optional: false
40022
+ }],
40023
+ "pipelineRunner.reportMotion": [{
40024
+ name: "deviceId",
40025
+ form: "single",
40026
+ optional: false
40027
+ }],
40028
+ "pipelineRunner.runDetailSubtree": [{
40029
+ name: "deviceId",
40030
+ form: "single",
40031
+ optional: false
40032
+ }],
40033
+ "pipelineRunner.runStatelessStep": [{
40034
+ name: "sourceDeviceId",
40035
+ form: "single",
40036
+ optional: false
40037
+ }],
40038
+ "plateGallery.getPlateByTrack": [{
40039
+ name: "deviceId",
40040
+ form: "single",
40041
+ optional: false
40042
+ }],
40043
+ "plateGallery.listPlates": [{
40044
+ name: "deviceId",
40045
+ form: "single",
40046
+ optional: true
40047
+ }],
40048
+ "privacyMask.getOptions": [{
40049
+ name: "deviceId",
40050
+ form: "single",
40051
+ optional: false
40052
+ }],
40053
+ "privacyMask.setAudioEnabled": [{
40054
+ name: "deviceId",
40055
+ form: "single",
40056
+ optional: false
40057
+ }],
40058
+ "privacyMask.setMask": [{
40059
+ name: "deviceId",
40060
+ form: "single",
40061
+ optional: false
40062
+ }],
40063
+ "ptz.continuousMove": [{
40064
+ name: "deviceId",
40065
+ form: "single",
40066
+ optional: false
40067
+ }],
40068
+ "ptz.deletePreset": [{
40069
+ name: "deviceId",
40070
+ form: "single",
40071
+ optional: false
40072
+ }],
40073
+ "ptz.getOptions": [{
40074
+ name: "deviceId",
40075
+ form: "single",
40076
+ optional: false
40077
+ }],
40078
+ "ptz.getPosition": [{
40079
+ name: "deviceId",
40080
+ form: "single",
40081
+ optional: false
40082
+ }],
40083
+ "ptz.getPresets": [{
40084
+ name: "deviceId",
40085
+ form: "single",
40086
+ optional: false
40087
+ }],
40088
+ "ptz.goHome": [{
40089
+ name: "deviceId",
40090
+ form: "single",
40091
+ optional: false
40092
+ }],
40093
+ "ptz.goToPreset": [{
40094
+ name: "deviceId",
40095
+ form: "single",
40096
+ optional: false
40097
+ }],
40098
+ "ptz.move": [{
40099
+ name: "deviceId",
40100
+ form: "single",
40101
+ optional: false
40102
+ }],
40103
+ "ptz.savePreset": [{
40104
+ name: "deviceId",
40105
+ form: "single",
40106
+ optional: false
40107
+ }],
40108
+ "ptz.setAutofocus": [{
40109
+ name: "deviceId",
40110
+ form: "single",
40111
+ optional: false
40112
+ }],
40113
+ "ptz.stop": [{
40114
+ name: "deviceId",
40115
+ form: "single",
40116
+ optional: false
40117
+ }],
40118
+ "ptzAutotrack.getSettings": [{
40119
+ name: "deviceId",
40120
+ form: "single",
40121
+ optional: false
40122
+ }],
40123
+ "ptzAutotrack.getStatus": [{
40124
+ name: "deviceId",
40125
+ form: "single",
40126
+ optional: false
40127
+ }],
40128
+ "ptzAutotrack.setEnabled": [{
40129
+ name: "deviceId",
40130
+ form: "single",
40131
+ optional: false
40132
+ }],
40133
+ "ptzAutotrack.setSettings": [{
40134
+ name: "deviceId",
40135
+ form: "single",
40136
+ optional: false
40137
+ }],
40138
+ "reboot.reboot": [{
40139
+ name: "deviceId",
40140
+ form: "single",
40141
+ optional: false
40142
+ }],
40143
+ "recording.deleteFootprint": [{
40144
+ name: "deviceId",
40145
+ form: "single",
40146
+ optional: false
40147
+ }],
40148
+ "recording.getAvailability": [{
40149
+ name: "deviceId",
40150
+ form: "single",
40151
+ optional: false
40152
+ }],
40153
+ "recording.getDaysWithRecordings": [{
40154
+ name: "deviceId",
40155
+ form: "single",
40156
+ optional: false
40157
+ }],
40158
+ "recording.getDeviceConfig": [{
40159
+ name: "deviceId",
40160
+ form: "single",
40161
+ optional: false
40162
+ }],
40163
+ "recording.getPlaybackManifest": [{
40164
+ name: "deviceId",
40165
+ form: "single",
40166
+ optional: false
40167
+ }],
40168
+ "recording.listOpsLog": [{
40169
+ name: "deviceId",
40170
+ form: "single",
40171
+ optional: true
40172
+ }],
40173
+ "recording.locateSegment": [{
40174
+ name: "deviceId",
40175
+ form: "single",
40176
+ optional: false
40177
+ }],
40178
+ "recording.pruneFootage": [{
40179
+ name: "deviceId",
40180
+ form: "single",
40181
+ optional: false
40182
+ }],
40183
+ "recording.readGopBytes": [{
40184
+ name: "deviceId",
40185
+ form: "single",
40186
+ optional: false
40187
+ }],
40188
+ "recording.readSegmentBytes": [{
40189
+ name: "deviceId",
40190
+ form: "single",
40191
+ optional: false
40192
+ }],
40193
+ "recording.relocateFootage": [{
40194
+ name: "deviceId",
40195
+ form: "single",
40196
+ optional: true
40197
+ }],
40198
+ "recording.renderClip": [{
40199
+ name: "deviceId",
40200
+ form: "single",
40201
+ optional: false
40202
+ }],
40203
+ "recording.renderGif": [{
40204
+ name: "deviceId",
40205
+ form: "single",
40206
+ optional: false
40207
+ }],
40208
+ "recording.rescanStorage": [{
40209
+ name: "deviceId",
40210
+ form: "single",
40211
+ optional: false
40212
+ }],
40213
+ "recording.setDeviceConfig": [{
40214
+ name: "deviceId",
40215
+ form: "single",
40216
+ optional: false
40217
+ }],
40218
+ "recording.startStorageMigrationMove": [{
40219
+ name: "deviceId",
40220
+ form: "single",
40221
+ optional: true
40222
+ }],
40223
+ "recordingExport.createExport": [{
40224
+ name: "deviceId",
40225
+ form: "single",
40226
+ optional: false
40227
+ }],
40228
+ "recordingExport.listExports": [{
40229
+ name: "deviceId",
40230
+ form: "single",
40231
+ optional: true
40232
+ }],
40233
+ "sceneMonitor.captureReference": [{
40234
+ name: "deviceId",
40235
+ form: "single",
40236
+ optional: false
40237
+ }],
40238
+ "sceneMonitor.createScene": [{
40239
+ name: "deviceId",
40240
+ form: "single",
40241
+ optional: false
40242
+ }],
40243
+ "sceneMonitor.deleteReference": [{
40244
+ name: "deviceId",
40245
+ form: "single",
40246
+ optional: false
40247
+ }],
40248
+ "sceneMonitor.deleteScene": [{
40249
+ name: "deviceId",
40250
+ form: "single",
40251
+ optional: false
40252
+ }],
40253
+ "sceneMonitor.listScenes": [{
40254
+ name: "deviceId",
40255
+ form: "single",
40256
+ optional: false
40257
+ }],
40258
+ "sceneMonitor.recheckNow": [{
40259
+ name: "deviceId",
40260
+ form: "single",
40261
+ optional: false
40262
+ }],
40263
+ "sceneMonitor.updateScene": [{
40264
+ name: "deviceId",
40265
+ form: "single",
40266
+ optional: false
40267
+ }],
40268
+ "scriptRunner.run": [{
40269
+ name: "deviceId",
40270
+ form: "single",
40271
+ optional: false
40272
+ }],
40273
+ "scriptRunner.stop": [{
40274
+ name: "deviceId",
40275
+ form: "single",
40276
+ optional: false
40277
+ }],
40278
+ "snapshot.getSnapshot": [{
40279
+ name: "deviceId",
40280
+ form: "single",
40281
+ optional: false
40282
+ }],
40283
+ "snapshot.getSnapshotOverview": [{
40284
+ name: "deviceIds",
40285
+ form: "array",
40286
+ optional: false
40287
+ }],
40288
+ "snapshot.invalidateCache": [{
40289
+ name: "deviceId",
40290
+ form: "single",
40291
+ optional: false
40292
+ }],
40293
+ "streamBroker.acquireEgressTranscode": [{
40294
+ name: "deviceId",
40295
+ form: "single",
40296
+ optional: false
40297
+ }],
40298
+ "streamBroker.assignProfile": [{
40299
+ name: "deviceId",
40300
+ form: "single",
40301
+ optional: false
40302
+ }],
40303
+ "streamBroker.getDeviceAudioMute": [{
40304
+ name: "deviceId",
40305
+ form: "single",
40306
+ optional: false
40307
+ }],
40308
+ "streamBroker.getStreamWithCodec": [{
40309
+ name: "deviceId",
40310
+ form: "single",
40311
+ optional: false
40312
+ }],
40313
+ "streamBroker.produceEventMedia": [{
40314
+ name: "deviceId",
40315
+ form: "single",
40316
+ optional: false
40317
+ }],
40318
+ "streamBroker.publishCameraStream": [{
40319
+ name: "deviceId",
40320
+ form: "single",
40321
+ optional: false
40322
+ }],
40323
+ "streamBroker.renderPreBufferClip": [{
40324
+ name: "deviceId",
40325
+ form: "single",
40326
+ optional: false
40327
+ }],
40328
+ "streamBroker.restartProfile": [{
40329
+ name: "deviceId",
40330
+ form: "single",
40331
+ optional: false
40332
+ }],
40333
+ "streamBroker.retractCameraStream": [{
40334
+ name: "deviceId",
40335
+ form: "single",
40336
+ optional: false
40337
+ }],
40338
+ "streamBroker.setDeviceAudioMute": [{
40339
+ name: "deviceId",
40340
+ form: "single",
40341
+ optional: false
40342
+ }],
40343
+ "streamBroker.unassignProfile": [{
40344
+ name: "deviceId",
40345
+ form: "single",
40346
+ optional: false
40347
+ }],
40348
+ "streamCatalog.getCatalog": [{
40349
+ name: "deviceId",
40350
+ form: "single",
40351
+ optional: false
40352
+ }],
40353
+ "streamParams.getConfigSchema": [{
40354
+ name: "deviceId",
40355
+ form: "single",
40356
+ optional: false
40357
+ }],
40358
+ "streamParams.getOptions": [{
40359
+ name: "deviceId",
40360
+ form: "single",
40361
+ optional: false
40362
+ }],
40363
+ "streamParams.setProfile": [{
40364
+ name: "deviceId",
40365
+ form: "single",
40366
+ optional: false
40367
+ }],
40368
+ "switch.setState": [{
40369
+ name: "deviceId",
40370
+ form: "single",
40371
+ optional: false
40372
+ }],
40373
+ "vacuumControl.locate": [{
40374
+ name: "deviceId",
40375
+ form: "single",
40376
+ optional: false
40377
+ }],
40378
+ "vacuumControl.pause": [{
40379
+ name: "deviceId",
40380
+ form: "single",
40381
+ optional: false
40382
+ }],
40383
+ "vacuumControl.returnToBase": [{
40384
+ name: "deviceId",
40385
+ form: "single",
40386
+ optional: false
40387
+ }],
40388
+ "vacuumControl.setFanSpeed": [{
40389
+ name: "deviceId",
40390
+ form: "single",
40391
+ optional: false
40392
+ }],
40393
+ "vacuumControl.start": [{
40394
+ name: "deviceId",
40395
+ form: "single",
40396
+ optional: false
40397
+ }],
40398
+ "vacuumControl.stop": [{
40399
+ name: "deviceId",
40400
+ form: "single",
40401
+ optional: false
40402
+ }],
40403
+ "valve.close": [{
40404
+ name: "deviceId",
40405
+ form: "single",
40406
+ optional: false
40407
+ }],
40408
+ "valve.open": [{
40409
+ name: "deviceId",
40410
+ form: "single",
40411
+ optional: false
40412
+ }],
40413
+ "valve.setPosition": [{
40414
+ name: "deviceId",
40415
+ form: "single",
40416
+ optional: false
40417
+ }],
40418
+ "valve.stop": [{
40419
+ name: "deviceId",
40420
+ form: "single",
40421
+ optional: false
40422
+ }],
40423
+ "videoclips.getClipPlayback": [{
40424
+ name: "deviceId",
40425
+ form: "single",
40426
+ optional: false
40427
+ }],
40428
+ "videoclips.listClips": [{
40429
+ name: "deviceId",
40430
+ form: "single",
40431
+ optional: false
40432
+ }],
40433
+ "waterHeater.setAway": [{
40434
+ name: "deviceId",
40435
+ form: "single",
40436
+ optional: false
40437
+ }],
40438
+ "waterHeater.setOperationMode": [{
40439
+ name: "deviceId",
40440
+ form: "single",
40441
+ optional: false
40442
+ }],
40443
+ "waterHeater.setTargetTemp": [{
40444
+ name: "deviceId",
40445
+ form: "single",
40446
+ optional: false
40447
+ }],
40448
+ "webrtcSession.addIceCandidate": [{
40449
+ name: "deviceId",
40450
+ form: "single",
40451
+ optional: false
40452
+ }],
40453
+ "webrtcSession.closeSession": [{
40454
+ name: "deviceId",
40455
+ form: "single",
40456
+ optional: false
40457
+ }],
40458
+ "webrtcSession.createSession": [{
40459
+ name: "deviceId",
40460
+ form: "single",
40461
+ optional: false
40462
+ }],
40463
+ "webrtcSession.getIceCandidates": [{
40464
+ name: "deviceId",
40465
+ form: "single",
40466
+ optional: false
40467
+ }],
40468
+ "webrtcSession.getSessionState": [{
40469
+ name: "deviceId",
40470
+ form: "single",
40471
+ optional: false
40472
+ }],
40473
+ "webrtcSession.handleAnswer": [{
40474
+ name: "deviceId",
40475
+ form: "single",
40476
+ optional: false
40477
+ }],
40478
+ "webrtcSession.handleOffer": [{
40479
+ name: "deviceId",
40480
+ form: "single",
40481
+ optional: false
40482
+ }],
40483
+ "webrtcSession.hasAdaptiveBitrate": [{
40484
+ name: "deviceId",
40485
+ form: "single",
40486
+ optional: false
40487
+ }],
40488
+ "webrtcSession.listStreams": [{
40489
+ name: "deviceId",
40490
+ form: "single",
40491
+ optional: false
40492
+ }],
40493
+ "zoneAnalytics.getCameraHistory": [{
40494
+ name: "deviceId",
40495
+ form: "single",
40496
+ optional: false
40497
+ }],
40498
+ "zoneAnalytics.getCurrentSnapshot": [{
40499
+ name: "deviceId",
40500
+ form: "single",
40501
+ optional: false
40502
+ }],
40503
+ "zoneAnalytics.getUnzonedHistory": [{
40504
+ name: "deviceId",
40505
+ form: "single",
40506
+ optional: false
40507
+ }],
40508
+ "zoneAnalytics.getZoneHistory": [{
40509
+ name: "deviceId",
40510
+ form: "single",
40511
+ optional: false
40512
+ }],
40513
+ "zoneRules.listRules": [{
40514
+ name: "deviceId",
40515
+ form: "single",
40516
+ optional: false
40517
+ }],
40518
+ "zoneRules.setRules": [{
40519
+ name: "deviceId",
40520
+ form: "single",
40521
+ optional: false
40522
+ }],
40523
+ "zones.addZone": [{
40524
+ name: "deviceId",
40525
+ form: "single",
40526
+ optional: false
40527
+ }],
40528
+ "zones.listZones": [{
40529
+ name: "deviceId",
40530
+ form: "single",
40531
+ optional: false
40532
+ }],
40533
+ "zones.removeZone": [{
40534
+ name: "deviceId",
40535
+ form: "single",
40536
+ optional: false
40537
+ }],
40538
+ "zones.updateZone": [{
40539
+ name: "deviceId",
40540
+ form: "single",
40541
+ optional: false
40542
+ }]
40543
+ });
40544
+ /** Cap-method paths that carry a device reference AND live on a system-scope
40545
+ * cap — the set the v3 device check newly reaches. */
40546
+ var SYSTEM_SCOPE_DEVICE_METHODS = [
40547
+ "addonSettings.getDeviceSettings",
40548
+ "addonSettings.updateDeviceSettings",
40549
+ "audioAnalyzer.classify",
40550
+ "decoder.createSession",
40551
+ "deviceAdoption.release",
40552
+ "deviceAdoption.resync",
40553
+ "deviceManager.adoptionRelease",
40554
+ "deviceManager.adoptionResync",
40555
+ "deviceManager.applyInitialMeta",
40556
+ "deviceManager.disable",
40557
+ "deviceManager.enable",
40558
+ "deviceManager.getBindings",
40559
+ "deviceManager.getChildren",
40560
+ "deviceManager.getConfigSchema",
40561
+ "deviceManager.getDevice",
40562
+ "deviceManager.getDeviceAggregate",
40563
+ "deviceManager.getDeviceLiveInfoAggregate",
40564
+ "deviceManager.getDeviceSettingsAggregate",
40565
+ "deviceManager.getDeviceStatusAggregate",
40566
+ "deviceManager.getDeviceStatusAggregateBatch",
40567
+ "deviceManager.getLinkedDevices",
40568
+ "deviceManager.getSettingsSchema",
40569
+ "deviceManager.getStreamProfileMap",
40570
+ "deviceManager.getStreamSources",
40571
+ "deviceManager.getWireableFields",
40572
+ "deviceManager.loadConfig",
40573
+ "deviceManager.loadMeta",
40574
+ "deviceManager.loadRuntimeState",
40575
+ "deviceManager.persistConfig",
40576
+ "deviceManager.probeStreams",
40577
+ "deviceManager.registerDevice",
40578
+ "deviceManager.remove",
40579
+ "deviceManager.removeDevice",
40580
+ "deviceManager.runDeviceAction",
40581
+ "deviceManager.setChildLayout",
40582
+ "deviceManager.setDisabled",
40583
+ "deviceManager.setDisplay",
40584
+ "deviceManager.setIntegrationId",
40585
+ "deviceManager.setLinkDeviceId",
40586
+ "deviceManager.setLocation",
40587
+ "deviceManager.setMetadata",
40588
+ "deviceManager.setName",
40589
+ "deviceManager.setPrimaryChildEntityId",
40590
+ "deviceManager.setRole",
40591
+ "deviceManager.setStreamProfileMap",
40592
+ "deviceManager.setType",
40593
+ "deviceManager.setWrapperActive",
40594
+ "deviceManager.testField",
40595
+ "deviceManager.updateConfig",
40596
+ "deviceManager.updateDeviceField",
40597
+ "deviceManager.updateDeviceFieldsBatch",
40598
+ "deviceState.getCapSlice",
40599
+ "deviceState.getSnapshot",
40600
+ "deviceState.setCapSlice",
40601
+ "faceGallery.getFaceByTrack",
40602
+ "faceGallery.listRecentFaces",
40603
+ "networkQuality.getDeviceStats",
40604
+ "networkQuality.reportClientStats",
40605
+ "notificationRules.setDeviceMuted",
40606
+ "osdManager.clearSlotBinding",
40607
+ "osdManager.copyDeviceConfiguration",
40608
+ "osdManager.getDeviceOsd",
40609
+ "osdManager.getSourceCatalog",
40610
+ "osdManager.previewSlot",
40611
+ "osdManager.renderDevice",
40612
+ "osdManager.setSlotBinding",
40613
+ "pipelineExecutor.runPipeline",
40614
+ "pipelineExecutor.runPipelineBatch",
40615
+ "pipelineOrchestrator.assignAudio",
40616
+ "pipelineOrchestrator.assignPipeline",
40617
+ "pipelineOrchestrator.getAudioAssignment",
40618
+ "pipelineOrchestrator.getCameraMetrics",
40619
+ "pipelineOrchestrator.getCameraSettings",
40620
+ "pipelineOrchestrator.getCameraStatus",
40621
+ "pipelineOrchestrator.getCameraStatuses",
40622
+ "pipelineOrchestrator.getCameraStepOverrides",
40623
+ "pipelineOrchestrator.getCameraSwitches",
40624
+ "pipelineOrchestrator.getPipelineAssignment",
40625
+ "pipelineOrchestrator.getPipelineDevicePin",
40626
+ "pipelineOrchestrator.resolvePipeline",
40627
+ "pipelineOrchestrator.setCameraPipelineForAgent",
40628
+ "pipelineOrchestrator.setCameraStepOverride",
40629
+ "pipelineOrchestrator.setCameraStepToggle",
40630
+ "pipelineOrchestrator.setCameraSwitch",
40631
+ "pipelineOrchestrator.setPipelineDevicePin",
40632
+ "pipelineOrchestrator.unassignAudio",
40633
+ "pipelineOrchestrator.unassignPipeline",
40634
+ "pipelineRunner.attachCamera",
40635
+ "pipelineRunner.detachCamera",
40636
+ "pipelineRunner.getCameraMetrics",
40637
+ "pipelineRunner.reportMotion",
40638
+ "pipelineRunner.runDetailSubtree",
40639
+ "pipelineRunner.runStatelessStep",
40640
+ "plateGallery.getPlateByTrack",
40641
+ "plateGallery.listPlates",
40642
+ "recording.deleteFootprint",
40643
+ "recording.getAvailability",
40644
+ "recording.getDaysWithRecordings",
40645
+ "recording.getDeviceConfig",
40646
+ "recording.getPlaybackManifest",
40647
+ "recording.listOpsLog",
40648
+ "recording.locateSegment",
40649
+ "recording.pruneFootage",
40650
+ "recording.readGopBytes",
40651
+ "recording.readSegmentBytes",
40652
+ "recording.relocateFootage",
40653
+ "recording.renderClip",
40654
+ "recording.renderGif",
40655
+ "recording.rescanStorage",
40656
+ "recording.setDeviceConfig",
40657
+ "recording.startStorageMigrationMove",
40658
+ "recordingExport.createExport",
40659
+ "recordingExport.listExports",
40660
+ "streamBroker.acquireEgressTranscode",
40661
+ "streamBroker.assignProfile",
40662
+ "streamBroker.getDeviceAudioMute",
40663
+ "streamBroker.getStreamWithCodec",
40664
+ "streamBroker.produceEventMedia",
40665
+ "streamBroker.publishCameraStream",
40666
+ "streamBroker.renderPreBufferClip",
40667
+ "streamBroker.restartProfile",
40668
+ "streamBroker.retractCameraStream",
40669
+ "streamBroker.setDeviceAudioMute",
40670
+ "streamBroker.unassignProfile"
40671
+ ];
40672
+ //#endregion
38766
40673
  //#region src/generated/provider-kind-map.ts
38767
40674
  var CAP_PROVIDER_KIND_MAP = Object.freeze({
38768
40675
  "broker": "broker",
@@ -38796,7 +40703,7 @@ function getCapsByProviderKind(kind) {
38796
40703
  //#region src/generated/runtime-state-durability.ts
38797
40704
  /**
38798
40705
  * Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
38799
- * `runtimeState`. 62 caps: 33 `restored`, 29 `session`.
40706
+ * `runtimeState`. 63 caps: 33 `restored`, 30 `session`.
38800
40707
  *
38801
40708
  * A cap absent from this map has no runtime-state slice at all. A cap PRESENT
38802
40709
  * with `durability: 'session'` has one and has decided not to keep it.
@@ -38926,6 +40833,10 @@ var RUNTIME_STATE_POLICY = {
38926
40833
  durability: "restored",
38927
40834
  volatileFields: ["lastFetchedAt"]
38928
40835
  },
40836
+ "intercom": {
40837
+ durability: "session",
40838
+ volatileFields: []
40839
+ },
38929
40840
  "lawn-mower-control": {
38930
40841
  durability: "session",
38931
40842
  volatileFields: []
@@ -39112,7 +41023,7 @@ var SCOPE_PRESETS = [
39112
41023
  {
39113
41024
  id: "camera-viewer",
39114
41025
  label: "Camera viewer",
39115
- description: "Read-only over every device — live streams, recordings, motion events, battery state. Combine with `allowedDevices` to restrict to specific cameras.",
41026
+ description: "Read-only over every device — live streams, recordings, motion events, battery state. Pair with a `device` grant (an `ids` / `types` / `locations` selector) to restrict to specific cameras.",
39116
41027
  rows: [{
39117
41028
  type: "category",
39118
41029
  target: "device",
@@ -39129,6 +41040,28 @@ var SCOPE_PRESETS = [
39129
41040
  access: ["view", "create"]
39130
41041
  }]
39131
41042
  },
41043
+ {
41044
+ id: "full-management",
41045
+ label: "Full management",
41046
+ description: "Complete device + system control short of admin: view/create/delete on every device and every system capability. Use for a trusted operator who manages the whole deployment but should not hold the admin bypass.",
41047
+ rows: [{
41048
+ type: "category",
41049
+ target: "device",
41050
+ access: [
41051
+ "view",
41052
+ "create",
41053
+ "delete"
41054
+ ]
41055
+ }, {
41056
+ type: "category",
41057
+ target: "system",
41058
+ access: [
41059
+ "view",
41060
+ "create",
41061
+ "delete"
41062
+ ]
41063
+ }]
41064
+ },
39132
41065
  {
39133
41066
  id: "cli-deployer",
39134
41067
  label: "CLI deployer",
@@ -41125,6 +43058,252 @@ function pickNativeLeaseOverride(view) {
41125
43058
  return readNativeLeaseOverride(flat);
41126
43059
  }
41127
43060
  //#endregion
43061
+ //#region src/schemas/access-roles.ts
43062
+ /**
43063
+ * Ordered widest-last — the panel renders them top to bottom and the operator
43064
+ * reads the list as an escalation.
43065
+ */
43066
+ var ACCESS_ROLES = [
43067
+ {
43068
+ id: "viewer",
43069
+ label: "View",
43070
+ description: "Watch live and recorded video, browse events and read device state. Cannot change anything.",
43071
+ deviceAccess: ["view"],
43072
+ systemAccess: ["view"]
43073
+ },
43074
+ {
43075
+ id: "operator",
43076
+ label: "Operate",
43077
+ description: "Everything View does, plus acting on a device: PTZ, lights, sirens, locks, and snoozing notifications. Cannot delete.",
43078
+ deviceAccess: ["view", "create"],
43079
+ systemAccess: ["view", "create"]
43080
+ },
43081
+ {
43082
+ id: "manager",
43083
+ label: "Full management",
43084
+ description: "Everything Operate does, plus deleting devices, recordings and events. Short of admin — no user or cluster administration.",
43085
+ deviceAccess: [
43086
+ "view",
43087
+ "create",
43088
+ "delete"
43089
+ ],
43090
+ systemAccess: [
43091
+ "view",
43092
+ "create",
43093
+ "delete"
43094
+ ]
43095
+ }
43096
+ ];
43097
+ /** Look a role up by id. Throws on an unknown id — the union makes that
43098
+ * unreachable from typed callers, and a silent fallback would grant the
43099
+ * wrong thing. */
43100
+ function roleSpec(id) {
43101
+ const found = ACCESS_ROLES.find((r) => r.id === id);
43102
+ if (!found) throw new Error(`Unknown access role '${id}'`);
43103
+ return found;
43104
+ }
43105
+ /**
43106
+ * Compose an assignment into the grants the matcher reads.
43107
+ *
43108
+ * `includeLinked` is written explicitly in BOTH directions on purpose. Absent,
43109
+ * the matcher derives it from the access flavour (`view` inherits, `create` /
43110
+ * `delete` do not), so an omitted `false` would silently re-grant the
43111
+ * accessories the operator just excluded, and the panel would be lying about
43112
+ * its own toggle.
43113
+ */
43114
+ function buildRoleScopes(assignment) {
43115
+ const spec = roleSpec(assignment.roleId);
43116
+ return [{
43117
+ type: "device",
43118
+ selector: assignment.selector,
43119
+ access: [...spec.deviceAccess],
43120
+ includeLinked: assignment.includeLinked
43121
+ }, {
43122
+ type: "category",
43123
+ target: "system",
43124
+ access: [...spec.systemAccess]
43125
+ }];
43126
+ }
43127
+ /** Set equality over access arrays — grants round-trip through JSON and Zod
43128
+ * with no order guarantee. */
43129
+ function sameAccess(a, b) {
43130
+ if (a.length !== b.length) return false;
43131
+ const set = new Set(a);
43132
+ return b.every((x) => set.has(x));
43133
+ }
43134
+ /**
43135
+ * Recover the assignment behind a grant set, or `null` when the grants are
43136
+ * not something this panel authored.
43137
+ *
43138
+ * `null` is not an error — it is the "Advanced" case, and the panel MUST show
43139
+ * it as such rather than defaulting the radio to a role the user does not
43140
+ * have. Silently rendering an unrecognised grant set as "View" would make the
43141
+ * next save a downgrade nobody asked for.
43142
+ *
43143
+ * Strict by design: exactly the two rows `buildRoleScopes` writes, an
43144
+ * explicit `includeLinked`, and device/system access that agree on a single
43145
+ * role. Anything else belongs in the raw editor.
43146
+ */
43147
+ function detectAccessRole(scopes) {
43148
+ if (scopes.length !== 2) return null;
43149
+ const deviceRows = scopes.filter((s) => s.type === "device");
43150
+ const systemRows = scopes.filter((s) => s.type === "category" && s.target === "system");
43151
+ if (deviceRows.length !== 1 || systemRows.length !== 1) return null;
43152
+ const [deviceRow] = deviceRows;
43153
+ const [systemRow] = systemRows;
43154
+ if (deviceRow === void 0 || systemRow === void 0) return null;
43155
+ if (deviceRow.type !== "device") return null;
43156
+ if (deviceRow.includeLinked === void 0) return null;
43157
+ const spec = ACCESS_ROLES.find((r) => sameAccess(r.deviceAccess, deviceRow.access) && sameAccess(r.systemAccess, systemRow.access));
43158
+ if (!spec) return null;
43159
+ return {
43160
+ roleId: spec.id,
43161
+ selector: deviceRow.selector,
43162
+ includeLinked: deviceRow.includeLinked
43163
+ };
43164
+ }
43165
+ //#endregion
43166
+ //#region src/schemas/device-selector.ts
43167
+ /** Ancestor-walk bound — defence-in-depth against a corrupt parentage cycle. */
43168
+ var MAX_ANCESTOR_HOPS = 8;
43169
+ /**
43170
+ * Does `selector` cover `device` DIRECTLY (no inheritance)? Inheritance is
43171
+ * layered on by the resolver/matcher, which tests this against a device's
43172
+ * ancestors too.
43173
+ */
43174
+ function deviceSelectorMatches(selector, device) {
43175
+ switch (selector.kind) {
43176
+ case "all": return true;
43177
+ case "ids": return selector.ids.includes(device.id);
43178
+ case "types": return selector.types.some((t) => String(t) === device.type);
43179
+ case "locations": return device.location !== null && selector.locations.includes(device.location);
43180
+ }
43181
+ }
43182
+ /** Whether a `category:device` grant covers `access` (the broad lever). */
43183
+ function hasBroadDeviceGrant(scopes, access) {
43184
+ return scopes.some((s) => s.type === "category" && s.target === "device" && s.access.includes(access));
43185
+ }
43186
+ /** The `device`-typed scopes granting `access`. */
43187
+ function deviceScopesFor(scopes, access) {
43188
+ return scopes.filter((s) => s.type === "device" && s.access.includes(access));
43189
+ }
43190
+ /** Whether inheritance applies for a grant at `access` (view inherits, others
43191
+ * don't, unless the grant overrides via `includeLinked`). */
43192
+ function scopeInherits(scope, access) {
43193
+ return scope.includeLinked ?? access === "view";
43194
+ }
43195
+ /** Ancestors (parent, grandparent, …) of `deviceId` within a fleet map. */
43196
+ function ancestorsOf(deviceId, byId) {
43197
+ const out = [];
43198
+ let current = deviceId;
43199
+ for (let hop = 0; hop < MAX_ANCESTOR_HOPS; hop++) {
43200
+ const parent = current === null ? null : byId.get(current)?.parentDeviceId ?? null;
43201
+ if (parent === null || parent === current) break;
43202
+ out.push(parent);
43203
+ current = parent;
43204
+ }
43205
+ return out;
43206
+ }
43207
+ /**
43208
+ * Resolve the set of deviceIds the caller may reach at `access`, expanded
43209
+ * against the live `fleet`. A `category:device` grant returns the whole
43210
+ * fleet. Device selectors are matched per device — directly, or (when the
43211
+ * grant inherits) against an ancestor, so a parent grant covers its
43212
+ * accessories.
43213
+ */
43214
+ function resolveViewableDeviceIds(scopes, fleet, access) {
43215
+ if (hasBroadDeviceGrant(scopes, access)) return new Set(fleet.map((d) => d.id));
43216
+ const byId = /* @__PURE__ */ new Map();
43217
+ for (const d of fleet) byId.set(d.id, d);
43218
+ const grants = deviceScopesFor(scopes, access);
43219
+ const out = /* @__PURE__ */ new Set();
43220
+ for (const d of fleet) for (const grant of grants) {
43221
+ if (deviceSelectorMatches(grant.selector, d)) {
43222
+ out.add(d.id);
43223
+ break;
43224
+ }
43225
+ if (scopeInherits(grant, access)) {
43226
+ if (ancestorsOf(d.id, byId).some((ancestorId) => {
43227
+ const ancestor = byId.get(ancestorId);
43228
+ return ancestor !== void 0 && deviceSelectorMatches(grant.selector, ancestor);
43229
+ })) {
43230
+ out.add(d.id);
43231
+ break;
43232
+ }
43233
+ }
43234
+ }
43235
+ return out;
43236
+ }
43237
+ /**
43238
+ * Normalise a raw scope array read off a JWT payload or a stored record into
43239
+ * validated v3 `TokenScope`s, migrating any v2 `device:targets` grant on the
43240
+ * way (via {@link TokenScopeSchema}'s preprocess). Applied at the request
43241
+ * boundary (`resolveUser`) so the enforcement matcher only ever sees v3.
43242
+ *
43243
+ * Per-ITEM parse (not whole-array) so a single malformed scope is dropped
43244
+ * without discarding the caller's valid grants — losing a good grant reads as
43245
+ * a lockout, and a lockout reads as broken. A non-array input yields `[]`
43246
+ * (fail closed).
43247
+ */
43248
+ function normalizeTokenScopes(raw) {
43249
+ if (!Array.isArray(raw)) return [];
43250
+ const out = [];
43251
+ for (const item of raw) {
43252
+ const parsed = TokenScopeSchema.safeParse(item);
43253
+ if (parsed.success) out.push(parsed.data);
43254
+ }
43255
+ return out;
43256
+ }
43257
+ var ALL_ACCESS = [
43258
+ "view",
43259
+ "create",
43260
+ "delete"
43261
+ ];
43262
+ function deviceReach(scopes, fleet, access, isAdmin) {
43263
+ if (isAdmin) return {
43264
+ all: true,
43265
+ deviceCount: fleet.length
43266
+ };
43267
+ return {
43268
+ all: hasBroadDeviceGrant(scopes, access) || deviceScopesFor(scopes, access).some((s) => s.selector.kind === "all"),
43269
+ deviceCount: resolveViewableDeviceIds(scopes, fleet, access).size
43270
+ };
43271
+ }
43272
+ function capabilityGrants(scopes) {
43273
+ const out = [];
43274
+ for (const s of scopes) if (s.type === "capability") out.push({
43275
+ name: s.target,
43276
+ access: s.access
43277
+ });
43278
+ return out;
43279
+ }
43280
+ function addonGrants(scopes) {
43281
+ const out = [];
43282
+ for (const s of scopes) if (s.type === "addon") out.push({
43283
+ name: s.target,
43284
+ access: s.access
43285
+ });
43286
+ return out;
43287
+ }
43288
+ /** Build the {@link EffectiveScope} for a caller from their scopes + the fleet. */
43289
+ function summarizeEffectiveScope(scopes, fleet, isAdmin) {
43290
+ const device = {
43291
+ view: deviceReach(scopes, fleet, "view", isAdmin),
43292
+ create: deviceReach(scopes, fleet, "create", isAdmin),
43293
+ delete: deviceReach(scopes, fleet, "delete", isAdmin)
43294
+ };
43295
+ const system = isAdmin ? ALL_ACCESS : ALL_ACCESS.filter((a) => scopes.some((s) => s.type === "category" && s.target === "system" && s.access.includes(a)));
43296
+ return {
43297
+ isAdmin,
43298
+ allDevicesViewable: device.view.all,
43299
+ viewableDeviceCount: device.view.deviceCount,
43300
+ device,
43301
+ system,
43302
+ capabilities: capabilityGrants(scopes),
43303
+ addons: addonGrants(scopes)
43304
+ };
43305
+ }
43306
+ //#endregion
41128
43307
  //#region src/types/device-type.ts
41129
43308
  var DEVICE_TYPE_INFO = { ["camera"]: {
41130
43309
  type: "camera",
@@ -42436,6 +44615,7 @@ function enumerateInferenceDevices(hw) {
42436
44615
  }
42437
44616
  //#endregion
42438
44617
  exports.ACCESSORY_LABEL = ACCESSORY_LABEL;
44618
+ exports.ACCESS_ROLES = ACCESS_ROLES;
42439
44619
  exports.ALEXA_EGRESS_PROFILE = ALEXA_EGRESS_PROFILE;
42440
44620
  exports.ALL_CAPABILITY_DEFINITIONS = ALL_CAPABILITY_DEFINITIONS;
42441
44621
  exports.APPLE_SA_TO_MACRO = APPLE_SA_TO_MACRO;
@@ -42682,6 +44862,7 @@ exports.DeviceInfoSchema = DeviceInfoSchema;
42682
44862
  exports.DeviceNetworkStatsSchema = DeviceNetworkStatsSchema;
42683
44863
  exports.DeviceRole = require_sleep.DeviceRole;
42684
44864
  exports.DeviceRuntimeState = DeviceRuntimeState;
44865
+ exports.DeviceSelectorSchema = DeviceSelectorSchema;
42685
44866
  exports.DeviceStatusSchema = DeviceStatusSchema;
42686
44867
  exports.DeviceType = require_sleep.DeviceType;
42687
44868
  exports.DiscoveredChildDeviceSchema = DiscoveredChildDeviceSchema;
@@ -42831,6 +45012,7 @@ exports.MAX_EXPRESSION_CALL_ARGS = MAX_EXPRESSION_CALL_ARGS;
42831
45012
  exports.MAX_EXPRESSION_EVAL_STEPS = MAX_EXPRESSION_EVAL_STEPS;
42832
45013
  exports.MAX_EXPRESSION_SOURCE_LENGTH = MAX_EXPRESSION_SOURCE_LENGTH;
42833
45014
  exports.METHOD_ACCESS_MAP = METHOD_ACCESS_MAP;
45015
+ exports.METHOD_DEVICE_SELECTORS = METHOD_DEVICE_SELECTORS;
42834
45016
  exports.MODEL_FORMATS = MODEL_FORMATS;
42835
45017
  exports.MOTION_TRIGGER_FEATURE = MOTION_TRIGGER_FEATURE;
42836
45018
  exports.ManagedModelCatalogEntrySchema = ManagedModelCatalogEntrySchema;
@@ -43129,6 +45311,7 @@ exports.STREAM_PROFILE_META = STREAM_PROFILE_META;
43129
45311
  exports.STREAM_QUALITY_LABELS = STREAM_QUALITY_LABELS;
43130
45312
  exports.SUB_DETECTION_TYPES = SUB_DETECTION_TYPES;
43131
45313
  exports.SYSTEM_CAP_NAMES = SYSTEM_CAP_NAMES;
45314
+ exports.SYSTEM_SCOPE_DEVICE_METHODS = SYSTEM_SCOPE_DEVICE_METHODS;
43132
45315
  exports.SceneCheckSchema = SceneCheckSchema;
43133
45316
  exports.SceneConditionSchema = SceneConditionSchema;
43134
45317
  exports.SceneMonitorSchema = SceneMonitorSchema;
@@ -43351,6 +45534,7 @@ exports.buildFfmpegArgs = require_canonical_hash.buildFfmpegArgs;
43351
45534
  exports.buildInputArgs = require_canonical_hash.buildInputArgs;
43352
45535
  exports.buildModelVariantGroups = buildModelVariantGroups;
43353
45536
  exports.buildNcTaxonomy = buildNcTaxonomy;
45537
+ exports.buildRoleScopes = buildRoleScopes;
43354
45538
  exports.buildStreamParamsConfigSchema = buildStreamParamsConfigSchema;
43355
45539
  exports.buildVideoArgs = require_canonical_hash.buildVideoArgs;
43356
45540
  exports.buttonCapability = buttonCapability;
@@ -43408,6 +45592,7 @@ exports.deriveCameraSwitches = deriveCameraSwitches;
43408
45592
  exports.deriveDetailCropRect = deriveDetailCropRect;
43409
45593
  exports.deriveRecordingMode = deriveRecordingMode;
43410
45594
  exports.describeModelVariant = describeModelVariant;
45595
+ exports.detectAccessRole = detectAccessRole;
43411
45596
  exports.detectionPipelineCapability = detectionPipelineCapability;
43412
45597
  exports.deviceAdoptionCapability = deviceAdoptionCapability;
43413
45598
  exports.deviceBackendToFormat = deviceBackendToFormat;
@@ -43418,6 +45603,7 @@ exports.deviceManagerCapability = deviceManagerCapability;
43418
45603
  exports.deviceMatchesProfile = deviceMatchesProfile;
43419
45604
  exports.deviceOpsCapability = require_sleep.deviceOpsCapability;
43420
45605
  exports.deviceProviderCapability = deviceProviderCapability;
45606
+ exports.deviceSelectorMatches = deviceSelectorMatches;
43421
45607
  exports.deviceStateCapability = deviceStateCapability;
43422
45608
  exports.deviceStatusCapability = deviceStatusCapability;
43423
45609
  exports.doorbellCapability = doorbellCapability;
@@ -43530,6 +45716,7 @@ exports.nodePin = require_sleep.nodePin;
43530
45716
  exports.nodesCapability = nodesCapability;
43531
45717
  exports.normalizeAddonInitResult = require_sleep.normalizeAddonInitResult;
43532
45718
  exports.normalizeAudioLabel = normalizeAudioLabel;
45719
+ exports.normalizeTokenScopes = normalizeTokenScopes;
43533
45720
  exports.normalizeUnit = normalizeUnit;
43534
45721
  exports.notificationOutputCapability = notificationOutputCapability;
43535
45722
  exports.notificationRulesCapability = notificationRulesCapability;
@@ -43597,10 +45784,13 @@ exports.resolveMutate = resolveMutate;
43597
45784
  exports.resolveRunnerId = resolveRunnerId;
43598
45785
  exports.resolveScrubThumbnailGeometry = resolveScrubThumbnailGeometry;
43599
45786
  exports.resolveVariantModelId = resolveVariantModelId;
45787
+ exports.resolveViewableDeviceIds = resolveViewableDeviceIds;
45788
+ exports.roleSpec = roleSpec;
43600
45789
  exports.runInferenceStep = runInferenceStep;
43601
45790
  exports.runtimeDevices = runtimeDevices;
43602
45791
  exports.runtimeStatePolicyFor = runtimeStatePolicyFor;
43603
45792
  exports.sceneMonitorCapability = sceneMonitorCapability;
45793
+ exports.scopeInherits = scopeInherits;
43604
45794
  exports.scopeKey = require_sleep.scopeKey;
43605
45795
  exports.scopesAllowAddon = scopesAllowAddon;
43606
45796
  exports.scopesAllowDeviceCap = scopesAllowDeviceCap;
@@ -43629,6 +45819,7 @@ exports.streamPixels = streamPixels;
43629
45819
  exports.streamQualityLabel = streamQualityLabel;
43630
45820
  exports.subKindsOf = subKindsOf;
43631
45821
  exports.summarisePrivacyAudio = summarisePrivacyAudio;
45822
+ exports.summarizeEffectiveScope = summarizeEffectiveScope;
43632
45823
  exports.supportedRuntimes = supportedRuntimes;
43633
45824
  exports.switchCapability = switchCapability;
43634
45825
  exports.switchedOffIds = switchedOffIds;