@camstack/addon-model-studio 1.1.166 → 1.1.168
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/{MotionZonesSettings-C2ftiA6i.mjs → MotionZonesSettings-WwZvrN_o.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-Xg4k3L47.mjs → PrivacyMaskSettings-eoz9NK5G.mjs} +4 -4
- package/dist/{SceneMonitorEditor-CEsQn7b2.mjs → SceneMonitorEditor-BV4pet19.mjs} +3 -3
- package/dist/_stub.js +1403 -1353
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-Doe1jImv.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BcAq_qie.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BvVNN6qP.mjs +26 -0
- package/dist/{hostInit-DJug5Kyx.mjs → hostInit-CINiPlUz.mjs} +2 -2
- package/dist/model-studio.addon.js +1265 -853
- package/dist/model-studio.addon.mjs +1265 -853
- package/dist/{player-overlays-Drd0jdDm.mjs → player-overlays-Cxpzecy1.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-CO49Ymxi.mjs → responsive-C1StxoX1.mjs} +1 -1
- package/dist/{scene-monitor-copy-D5Esy39C.mjs → scene-monitor-copy-b4S8KzJH.mjs} +1 -1
- package/dist/{square-I3JVGn-g.mjs → square-BzuCtKO-.mjs} +1 -1
- package/dist/{trash-2-Rdm8qwZb.mjs → trash-2-CWtVmull.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-WVMYffMk.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-xULEt-Fx.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-ByY5idrl.mjs +0 -26
|
@@ -5884,7 +5884,7 @@ var ZodIssueCode = {
|
|
|
5884
5884
|
var ZodFirstPartyTypeKind;
|
|
5885
5885
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5886
5886
|
//#endregion
|
|
5887
|
-
//#region ../types/dist/sleep-
|
|
5887
|
+
//#region ../types/dist/sleep-pM_J7YnY.mjs
|
|
5888
5888
|
/**
|
|
5889
5889
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5890
5890
|
* window to float samples (D455).
|
|
@@ -7020,6 +7020,24 @@ function normalizeAddonInitResult(result) {
|
|
|
7020
7020
|
if (Array.isArray(result)) return { providers: result };
|
|
7021
7021
|
return result;
|
|
7022
7022
|
}
|
|
7023
|
+
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7024
|
+
var PeerBytesTicketSchema = object({
|
|
7025
|
+
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
7026
|
+
url: string().min(1),
|
|
7027
|
+
/**
|
|
7028
|
+
* The HOST node this URL means something on — the hub or a named agent,
|
|
7029
|
+
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
7030
|
+
* refuses `cross-node` by name when they differ, without dialling.
|
|
7031
|
+
*/
|
|
7032
|
+
hostNodeId: string().min(1),
|
|
7033
|
+
expiresAtMs: number().int().nonnegative(),
|
|
7034
|
+
/**
|
|
7035
|
+
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
7036
|
+
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
7037
|
+
* must be able to tell "the producer did not say" from "the body is empty".
|
|
7038
|
+
*/
|
|
7039
|
+
declaredBytes: number().int().nonnegative().nullable()
|
|
7040
|
+
});
|
|
7023
7041
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
7024
7042
|
var CamProfileSchema = _enum([
|
|
7025
7043
|
"high",
|
|
@@ -8119,24 +8137,6 @@ object({
|
|
|
8119
8137
|
unreachable: number()
|
|
8120
8138
|
})
|
|
8121
8139
|
});
|
|
8122
|
-
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
8123
|
-
var PeerBytesTicketSchema = object({
|
|
8124
|
-
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
8125
|
-
url: string().min(1),
|
|
8126
|
-
/**
|
|
8127
|
-
* The HOST node this URL means something on — the hub or a named agent,
|
|
8128
|
-
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
8129
|
-
* refuses `cross-node` by name when they differ, without dialling.
|
|
8130
|
-
*/
|
|
8131
|
-
hostNodeId: string().min(1),
|
|
8132
|
-
expiresAtMs: number().int().nonnegative(),
|
|
8133
|
-
/**
|
|
8134
|
-
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
8135
|
-
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
8136
|
-
* must be able to tell "the producer did not say" from "the body is empty".
|
|
8137
|
-
*/
|
|
8138
|
-
declaredBytes: number().int().nonnegative().nullable()
|
|
8139
|
-
});
|
|
8140
8140
|
/**
|
|
8141
8141
|
* Adoption job — the background form of `device-adoption.adopt`.
|
|
8142
8142
|
*
|
|
@@ -8248,7 +8248,7 @@ var AdoptionJobSchema = object({
|
|
|
8248
8248
|
* component's original options — detection to the detection-pipeline wrapper
|
|
8249
8249
|
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
8250
8250
|
* (which was always first-class; the switch was a veneer over
|
|
8251
|
-
* `
|
|
8251
|
+
* `recordingArchive.setDeviceConfig`), notifications to a notification-center
|
|
8252
8252
|
* per-device setting, the two camera planes to their own components.
|
|
8253
8253
|
*
|
|
8254
8254
|
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
@@ -8274,7 +8274,7 @@ var AdoptionJobSchema = object({
|
|
|
8274
8274
|
* | `stream-broker` | `deviceManager.setDisabled` | `StreamBrokerManager.reconcileAllCatalogs` releases the brokers; `ensureBroker` refuses re-creation |
|
|
8275
8275
|
* | `object-detection` | `deviceManager.setWrapperActive('detection-pipeline')` | `PipelineSettingsStore.resolvePipelineForDevice` returns `{ steps: [], audio: null }` |
|
|
8276
8276
|
* | `audio-analysis` | `deviceManager.setWrapperActive('audio-analysis')` | `AudioSubscriptionController.subscribeAudioStream` returns `null` before opening the stream |
|
|
8277
|
-
* | `recording` | `
|
|
8277
|
+
* | `recording` | `recordingArchive.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
|
|
8278
8278
|
* | `notifications` | `notificationRules.setDeviceMuted` | `NotificationCenter.evaluateAndEnqueue` returns before any rule is evaluated |
|
|
8279
8279
|
* | `privacy-mask` | `privacyMask.setMask({ enabled })` → the CAMERA | the camera blanks the masked regions itself; every stream and recording carries the black boxes |
|
|
8280
8280
|
* | `device-audio` | `privacyMask.setAudioEnabled` → the CAMERA | the camera stops encoding an audio track at all; every consumer sees silent video |
|
|
@@ -12190,58 +12190,6 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
12190
12190
|
auth: "admin"
|
|
12191
12191
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
12192
12192
|
DeviceType.Camera;
|
|
12193
|
-
/**
|
|
12194
|
-
* The signals a device can emit to WAKE its own stream.
|
|
12195
|
-
*
|
|
12196
|
-
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
12197
|
-
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
12198
|
-
* puller holds a session open for ever, and treating that as demand would keep
|
|
12199
|
-
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
12200
|
-
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
12201
|
-
* itself, with no stream running.
|
|
12202
|
-
*
|
|
12203
|
-
* ## The vocabulary is the PROVIDER'S, not ours
|
|
12204
|
-
*
|
|
12205
|
-
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
12206
|
-
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
12207
|
-
* Reolink offers motion and camera-native detection; another provider may offer
|
|
12208
|
-
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
12209
|
-
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
12210
|
-
*
|
|
12211
|
-
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
12212
|
-
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
12213
|
-
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
12214
|
-
* binding — but both answer "what drives the detection pipeline", which is a
|
|
12215
|
-
* different question from "what may wake a sleeping stream". A camera can do
|
|
12216
|
-
* the first and not be trusted with the second, and the operator picks per
|
|
12217
|
-
* camera. Two questions, two authorities.
|
|
12218
|
-
*
|
|
12219
|
-
* ## Availability is not permission
|
|
12220
|
-
*
|
|
12221
|
-
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
12222
|
-
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
12223
|
-
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
12224
|
-
* provider declaring a signal is not a provider enabling it.
|
|
12225
|
-
*/
|
|
12226
|
-
/** One signal a device can emit. */
|
|
12227
|
-
var StreamSignalSchema = object({
|
|
12228
|
-
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
12229
|
-
code: string().min(1),
|
|
12230
|
-
/** What an operator reads in the picker. The provider's own wording. */
|
|
12231
|
-
label: string().min(1),
|
|
12232
|
-
/**
|
|
12233
|
-
* Whether the provider recommends this signal ON when a camera is first set
|
|
12234
|
-
* up. A provider knows which of its signals are cheap and reliable; an
|
|
12235
|
-
* operator should not have to discover that by trial. Reolink recommends
|
|
12236
|
-
* both of its own.
|
|
12237
|
-
*/
|
|
12238
|
-
recommended: boolean()
|
|
12239
|
-
});
|
|
12240
|
-
object({
|
|
12241
|
-
signals: array(StreamSignalSchema),
|
|
12242
|
-
lastFetchedAt: number()
|
|
12243
|
-
});
|
|
12244
|
-
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
12245
12193
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
12246
12194
|
var StreamFormatSchema = _enum([
|
|
12247
12195
|
"webrtc",
|
|
@@ -13621,6 +13569,97 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
|
|
|
13621
13569
|
});
|
|
13622
13570
|
DeviceType.Camera;
|
|
13623
13571
|
/**
|
|
13572
|
+
* device-admin-link — "this device has a management page of its own, and here
|
|
13573
|
+
* is its address".
|
|
13574
|
+
*
|
|
13575
|
+
* ## Why this is not a `deviceConfig` cap
|
|
13576
|
+
*
|
|
13577
|
+
* There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
|
|
13578
|
+
* can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
|
|
13579
|
+
* patch back through a setter; it costs a `builderId` reducer in
|
|
13580
|
+
* `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
|
|
13581
|
+
* renders a form section. This cap answers ONE question with ONE read and
|
|
13582
|
+
* renders a button. Nothing about it is a form, so it carries no `deviceConfig`
|
|
13583
|
+
* block, no `settings`, no `runtimeState` and no reducer — exactly like
|
|
13584
|
+
* `reboot`, the other pure-RPC device-native cap.
|
|
13585
|
+
*
|
|
13586
|
+
* ## Absent, and the difference between "no page" and "we cannot say"
|
|
13587
|
+
*
|
|
13588
|
+
* The two are answered at DIFFERENT layers, on purpose:
|
|
13589
|
+
*
|
|
13590
|
+
* - **"We cannot say"** → the provider never registers the cap for that
|
|
13591
|
+
* device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
|
|
13592
|
+
* fan are reached only through a vendor cloud; there is no address to hand
|
|
13593
|
+
* out and no page to open. A Tuya plug, a Wyze camera and a Gree air
|
|
13594
|
+
* conditioner DO have a LAN IP, and still have no HTTP management page
|
|
13595
|
+
* behind it. None of them register, so `deviceManager.getBindings` never
|
|
13596
|
+
* lists the cap and no surface asks.
|
|
13597
|
+
* - **"This device has no page, and I know that"** → the provider registers
|
|
13598
|
+
* and `getAdminLink` returns `null`. This is the answer for a device whose
|
|
13599
|
+
* sibling DOES have a page: a Reolink battery camera reached over UDP by
|
|
13600
|
+
* `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
|
|
13601
|
+
* transport, a Home Assistant broker authenticated by supervisor token
|
|
13602
|
+
* (which carries no `baseUrl` at all).
|
|
13603
|
+
*
|
|
13604
|
+
* Both draw NOTHING. A button that opens a browser error is worse than no
|
|
13605
|
+
* button, and D62 is the same rule from the other side: an off switch is
|
|
13606
|
+
* reported off, never made to look broken. There is no third state where the
|
|
13607
|
+
* UI renders a disabled button "because the device might have a page".
|
|
13608
|
+
*
|
|
13609
|
+
* ## The URL never carries credentials
|
|
13610
|
+
*
|
|
13611
|
+
* Not in userinfo, not in a query string. Every provider builds through
|
|
13612
|
+
* `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
|
|
13613
|
+
* scheme and path as separate arguments — there is no parameter a secret could
|
|
13614
|
+
* arrive in — and re-checks its own output for the `scheme://user:pass@` shape
|
|
13615
|
+
* that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
|
|
13616
|
+
* output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
|
|
13617
|
+
* keeps providers from hand-rolling one anyway.
|
|
13618
|
+
*
|
|
13619
|
+
* This matters here more than anywhere else in the repo, because every provider
|
|
13620
|
+
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
13621
|
+
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
13622
|
+
* and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
|
|
13623
|
+
* camera's own page will ask for its own login. That is correct, and pre-
|
|
13624
|
+
* filling it is the operator's business, not ours.
|
|
13625
|
+
*
|
|
13626
|
+
* ## It is a LAN fact
|
|
13627
|
+
*
|
|
13628
|
+
* The URL addresses the device where the NODE can see it. It is not proxied,
|
|
13629
|
+
* not made reachable from outside, and not sent anywhere. A surface renders it
|
|
13630
|
+
* as a link the operator's own browser follows, on the operator's own network,
|
|
13631
|
+
* or renders nothing.
|
|
13632
|
+
*/
|
|
13633
|
+
/**
|
|
13634
|
+
* Whose page is it. The distinction is for the OPERATOR, who needs to know
|
|
13635
|
+
* before clicking whether he is about to land on a camera's own web server or
|
|
13636
|
+
* inside Home Assistant.
|
|
13637
|
+
*/
|
|
13638
|
+
var AdminLinkTargetEnum = _enum(["device", "integration"]);
|
|
13639
|
+
var DeviceAdminLinkSchema = object({
|
|
13640
|
+
/**
|
|
13641
|
+
* Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
|
|
13642
|
+
* free of userinfo and of any credential-shaped query key.
|
|
13643
|
+
*/
|
|
13644
|
+
url: string(),
|
|
13645
|
+
/**
|
|
13646
|
+
* What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
|
|
13647
|
+
* The PROVIDER names it, because only the provider knows what the page is;
|
|
13648
|
+
* a UI that invented the label from the addon id would call the Home
|
|
13649
|
+
* Assistant device page "Provider Homeassistant".
|
|
13650
|
+
*/
|
|
13651
|
+
label: string(),
|
|
13652
|
+
target: AdminLinkTargetEnum,
|
|
13653
|
+
/**
|
|
13654
|
+
* Host the URL points at, without scheme, port or path — for the tooltip, so
|
|
13655
|
+
* an operator can see WHERE the button goes before he follows it. Redundant
|
|
13656
|
+
* with `url` by construction; carried separately so no surface has to parse
|
|
13657
|
+
* a URL to show it.
|
|
13658
|
+
*/
|
|
13659
|
+
host: string()
|
|
13660
|
+
});
|
|
13661
|
+
method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
|
|
13662
|
+
/**
|
|
13624
13663
|
* Identity envelope for a device's upstream-system metadata.
|
|
13625
13664
|
*
|
|
13626
13665
|
* Two jobs:
|
|
@@ -13948,97 +13987,6 @@ method(object({ integrationId: string() }), object({ filters: array(AdoptionFilt
|
|
|
13948
13987
|
auth: "admin"
|
|
13949
13988
|
});
|
|
13950
13989
|
/**
|
|
13951
|
-
* device-admin-link — "this device has a management page of its own, and here
|
|
13952
|
-
* is its address".
|
|
13953
|
-
*
|
|
13954
|
-
* ## Why this is not a `deviceConfig` cap
|
|
13955
|
-
*
|
|
13956
|
-
* There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
|
|
13957
|
-
* can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
|
|
13958
|
-
* patch back through a setter; it costs a `builderId` reducer in
|
|
13959
|
-
* `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
|
|
13960
|
-
* renders a form section. This cap answers ONE question with ONE read and
|
|
13961
|
-
* renders a button. Nothing about it is a form, so it carries no `deviceConfig`
|
|
13962
|
-
* block, no `settings`, no `runtimeState` and no reducer — exactly like
|
|
13963
|
-
* `reboot`, the other pure-RPC device-native cap.
|
|
13964
|
-
*
|
|
13965
|
-
* ## Absent, and the difference between "no page" and "we cannot say"
|
|
13966
|
-
*
|
|
13967
|
-
* The two are answered at DIFFERENT layers, on purpose:
|
|
13968
|
-
*
|
|
13969
|
-
* - **"We cannot say"** → the provider never registers the cap for that
|
|
13970
|
-
* device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
|
|
13971
|
-
* fan are reached only through a vendor cloud; there is no address to hand
|
|
13972
|
-
* out and no page to open. A Tuya plug, a Wyze camera and a Gree air
|
|
13973
|
-
* conditioner DO have a LAN IP, and still have no HTTP management page
|
|
13974
|
-
* behind it. None of them register, so `deviceManager.getBindings` never
|
|
13975
|
-
* lists the cap and no surface asks.
|
|
13976
|
-
* - **"This device has no page, and I know that"** → the provider registers
|
|
13977
|
-
* and `getAdminLink` returns `null`. This is the answer for a device whose
|
|
13978
|
-
* sibling DOES have a page: a Reolink battery camera reached over UDP by
|
|
13979
|
-
* `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
|
|
13980
|
-
* transport, a Home Assistant broker authenticated by supervisor token
|
|
13981
|
-
* (which carries no `baseUrl` at all).
|
|
13982
|
-
*
|
|
13983
|
-
* Both draw NOTHING. A button that opens a browser error is worse than no
|
|
13984
|
-
* button, and D62 is the same rule from the other side: an off switch is
|
|
13985
|
-
* reported off, never made to look broken. There is no third state where the
|
|
13986
|
-
* UI renders a disabled button "because the device might have a page".
|
|
13987
|
-
*
|
|
13988
|
-
* ## The URL never carries credentials
|
|
13989
|
-
*
|
|
13990
|
-
* Not in userinfo, not in a query string. Every provider builds through
|
|
13991
|
-
* `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
|
|
13992
|
-
* scheme and path as separate arguments — there is no parameter a secret could
|
|
13993
|
-
* arrive in — and re-checks its own output for the `scheme://user:pass@` shape
|
|
13994
|
-
* that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
|
|
13995
|
-
* output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
|
|
13996
|
-
* keeps providers from hand-rolling one anyway.
|
|
13997
|
-
*
|
|
13998
|
-
* This matters here more than anywhere else in the repo, because every provider
|
|
13999
|
-
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
14000
|
-
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
14001
|
-
* and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
|
|
14002
|
-
* camera's own page will ask for its own login. That is correct, and pre-
|
|
14003
|
-
* filling it is the operator's business, not ours.
|
|
14004
|
-
*
|
|
14005
|
-
* ## It is a LAN fact
|
|
14006
|
-
*
|
|
14007
|
-
* The URL addresses the device where the NODE can see it. It is not proxied,
|
|
14008
|
-
* not made reachable from outside, and not sent anywhere. A surface renders it
|
|
14009
|
-
* as a link the operator's own browser follows, on the operator's own network,
|
|
14010
|
-
* or renders nothing.
|
|
14011
|
-
*/
|
|
14012
|
-
/**
|
|
14013
|
-
* Whose page is it. The distinction is for the OPERATOR, who needs to know
|
|
14014
|
-
* before clicking whether he is about to land on a camera's own web server or
|
|
14015
|
-
* inside Home Assistant.
|
|
14016
|
-
*/
|
|
14017
|
-
var AdminLinkTargetEnum = _enum(["device", "integration"]);
|
|
14018
|
-
var DeviceAdminLinkSchema = object({
|
|
14019
|
-
/**
|
|
14020
|
-
* Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
|
|
14021
|
-
* free of userinfo and of any credential-shaped query key.
|
|
14022
|
-
*/
|
|
14023
|
-
url: string(),
|
|
14024
|
-
/**
|
|
14025
|
-
* What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
|
|
14026
|
-
* The PROVIDER names it, because only the provider knows what the page is;
|
|
14027
|
-
* a UI that invented the label from the addon id would call the Home
|
|
14028
|
-
* Assistant device page "Provider Homeassistant".
|
|
14029
|
-
*/
|
|
14030
|
-
label: string(),
|
|
14031
|
-
target: AdminLinkTargetEnum,
|
|
14032
|
-
/**
|
|
14033
|
-
* Host the URL points at, without scheme, port or path — for the tooltip, so
|
|
14034
|
-
* an operator can see WHERE the button goes before he follows it. Redundant
|
|
14035
|
-
* with `url` by construction; carried separately so no surface has to parse
|
|
14036
|
-
* a URL to show it.
|
|
14037
|
-
*/
|
|
14038
|
-
host: string()
|
|
14039
|
-
});
|
|
14040
|
-
method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
|
|
14041
|
-
/**
|
|
14042
13990
|
* `device-export` — collection cap for addons that export camstack
|
|
14043
13991
|
* devices to external ecosystems (HomeAssistant via MQTT discovery,
|
|
14044
13992
|
* HomeKit/HAP, Alexa Smart Home, …).
|
|
@@ -17231,6 +17179,7 @@ sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
|
|
|
17231
17179
|
sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
|
|
17232
17180
|
sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
|
|
17233
17181
|
sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
|
|
17182
|
+
sub("cover", "control", "control", "#0ea5e9", "door", "Cover");
|
|
17234
17183
|
sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
|
|
17235
17184
|
sub("siren", "control", "control", "#dc2626", "siren", "Siren");
|
|
17236
17185
|
sub("button", "control", "control", "#10b981", "button", "Button");
|
|
@@ -17511,6 +17460,10 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17511
17460
|
"alarm-disarmed",
|
|
17512
17461
|
"alarm-arming",
|
|
17513
17462
|
"alarm-arm-refused",
|
|
17463
|
+
"alarm-pending",
|
|
17464
|
+
"alarm-rearmed",
|
|
17465
|
+
"alarm-sensor-bypass",
|
|
17466
|
+
"alarm-check-failed",
|
|
17514
17467
|
"addon-updated",
|
|
17515
17468
|
"server-updated",
|
|
17516
17469
|
"export-completed",
|
|
@@ -18106,6 +18059,19 @@ var NcMediaFrameSchema = _enum([
|
|
|
18106
18059
|
"full",
|
|
18107
18060
|
"boxed"
|
|
18108
18061
|
]);
|
|
18062
|
+
/**
|
|
18063
|
+
* How a SENSOR notification shows the cameras that link the sensor.
|
|
18064
|
+
*
|
|
18065
|
+
* `mosaic` — one image composed of every linked camera's photograph, taken at
|
|
18066
|
+
* the trigger. `each` — one image per camera where the target takes several
|
|
18067
|
+
* attachments; a target that takes one keeps the first camera's (the degrade
|
|
18068
|
+
* engine drops the rest by order). Either way ONE notification per event.
|
|
18069
|
+
* Absent = `mosaic`, applied by the Notification Center and deliberately NOT
|
|
18070
|
+
* a Zod default (see NcRulePatchSchema: a default materialises on every
|
|
18071
|
+
* partial patch). Meaningless for a rule whose subject is not a sensor, and a
|
|
18072
|
+
* sensor linked to one camera ships that camera's plain snapshot either way.
|
|
18073
|
+
*/
|
|
18074
|
+
var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
|
|
18109
18075
|
var NcMediaPolicySchema = object({
|
|
18110
18076
|
attach: _enum([
|
|
18111
18077
|
"best",
|
|
@@ -18151,7 +18117,9 @@ var NcMediaPolicySchema = object({
|
|
|
18151
18117
|
* A profile that is not assigned falls back to the cheapest, and the render
|
|
18152
18118
|
* reports which one actually ran.
|
|
18153
18119
|
*/
|
|
18154
|
-
profile: CamProfileSchema.optional()
|
|
18120
|
+
profile: CamProfileSchema.optional(),
|
|
18121
|
+
/** See {@link NcLinkedCameraModeSchema}. */
|
|
18122
|
+
linkedCameras: NcLinkedCameraModeSchema.optional()
|
|
18155
18123
|
});
|
|
18156
18124
|
/**
|
|
18157
18125
|
* Cooldown GRANULARITY over the subject's class — how much a fired
|
|
@@ -18271,7 +18239,7 @@ var NcRuleInputSchema = object({
|
|
|
18271
18239
|
cooldownSec: 60,
|
|
18272
18240
|
scope: "rule-device"
|
|
18273
18241
|
}),
|
|
18274
|
-
/** `{{var}}`
|
|
18242
|
+
/** `{{var}}` title/body. The variables are declared in `NC_TEMPLATE_VARS` (@camstack/types) and depend on the rule kind — see `templateVarsFor`. */
|
|
18275
18243
|
template: object({
|
|
18276
18244
|
title: string().max(500).optional(),
|
|
18277
18245
|
body: string().max(2e3).optional()
|
|
@@ -18451,6 +18419,22 @@ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
|
18451
18419
|
throttle: NcThrottleSchema.optional(),
|
|
18452
18420
|
priority: number().int().min(1).max(5).optional()
|
|
18453
18421
|
});
|
|
18422
|
+
var NcRuleClearableKeySchema = _enum([
|
|
18423
|
+
"template",
|
|
18424
|
+
"schedule",
|
|
18425
|
+
"targetUsers",
|
|
18426
|
+
"snoozeOptions",
|
|
18427
|
+
"snoozeAllowGlobal",
|
|
18428
|
+
"waitForEnhancement",
|
|
18429
|
+
"actions",
|
|
18430
|
+
"confirm",
|
|
18431
|
+
"groupIdleSec"
|
|
18432
|
+
]);
|
|
18433
|
+
var NcRuleUpdateInputSchema = object({
|
|
18434
|
+
ruleId: string(),
|
|
18435
|
+
patch: NcRulePatchSchema,
|
|
18436
|
+
clear: array(NcRuleClearableKeySchema).optional()
|
|
18437
|
+
});
|
|
18454
18438
|
/** A persisted rule. */
|
|
18455
18439
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
18456
18440
|
id: string(),
|
|
@@ -18482,6 +18466,85 @@ var NcTestResultSchema = object({
|
|
|
18482
18466
|
className: string().optional(),
|
|
18483
18467
|
label: string().optional()
|
|
18484
18468
|
});
|
|
18469
|
+
/** The five rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts`
|
|
18470
|
+
* is the same union; the template-vars spec pins the two together. */
|
|
18471
|
+
var NcRuleKindSchema = _enum([
|
|
18472
|
+
"detection",
|
|
18473
|
+
"sensor",
|
|
18474
|
+
"occupancy",
|
|
18475
|
+
"sound",
|
|
18476
|
+
"system"
|
|
18477
|
+
]);
|
|
18478
|
+
/** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
|
|
18479
|
+
var NcTemplateFamilySchema = _enum([
|
|
18480
|
+
"rule",
|
|
18481
|
+
"timelapse",
|
|
18482
|
+
"summary"
|
|
18483
|
+
]);
|
|
18484
|
+
/** Which text field of that producer. `previewText` is the timelapse frame
|
|
18485
|
+
* caption, `captionText` the digest mosaic caption — both see fewer vars. */
|
|
18486
|
+
var NcTemplateFieldSchema = _enum([
|
|
18487
|
+
"title",
|
|
18488
|
+
"body",
|
|
18489
|
+
"previewText",
|
|
18490
|
+
"captionText"
|
|
18491
|
+
]);
|
|
18492
|
+
var NcTemplateVarGroupSchema = _enum([
|
|
18493
|
+
"subject",
|
|
18494
|
+
"place",
|
|
18495
|
+
"time",
|
|
18496
|
+
"rule",
|
|
18497
|
+
"occupancy",
|
|
18498
|
+
"sound",
|
|
18499
|
+
"sensor",
|
|
18500
|
+
"system",
|
|
18501
|
+
"digest",
|
|
18502
|
+
"ai"
|
|
18503
|
+
]);
|
|
18504
|
+
/**
|
|
18505
|
+
* ONE `{{var}}` a notification template may name.
|
|
18506
|
+
*
|
|
18507
|
+
* `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
|
|
18508
|
+
* it has a value; absent = no restriction on that axis. `systemEventKinds` is
|
|
18509
|
+
* read only for a `system` rule. `dynamic` declares a FAMILY of names
|
|
18510
|
+
* (`count_<class>`): the descriptor's `name` is the example member.
|
|
18511
|
+
*/
|
|
18512
|
+
var NcTemplateVarDescriptorSchema = object({
|
|
18513
|
+
name: string().regex(/^\w+$/),
|
|
18514
|
+
label: string(),
|
|
18515
|
+
description: string().optional(),
|
|
18516
|
+
example: string(),
|
|
18517
|
+
group: NcTemplateVarGroupSchema,
|
|
18518
|
+
families: array(NcTemplateFamilySchema).min(1),
|
|
18519
|
+
fields: array(NcTemplateFieldSchema).optional(),
|
|
18520
|
+
kinds: array(NcRuleKindSchema).optional(),
|
|
18521
|
+
deliveries: array(NcDeliverySchema).optional(),
|
|
18522
|
+
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
18523
|
+
dynamic: object({
|
|
18524
|
+
prefix: literal("count_"),
|
|
18525
|
+
from: literal("classes")
|
|
18526
|
+
}).optional()
|
|
18527
|
+
});
|
|
18528
|
+
/** Input to `previewTemplate` — the editor's own context, plus the draft text. */
|
|
18529
|
+
var NcTemplatePreviewInputSchema = object({
|
|
18530
|
+
context: object({
|
|
18531
|
+
family: NcTemplateFamilySchema,
|
|
18532
|
+
field: NcTemplateFieldSchema,
|
|
18533
|
+
kind: NcRuleKindSchema.optional(),
|
|
18534
|
+
delivery: NcDeliverySchema.optional(),
|
|
18535
|
+
systemEventKinds: array(NcSystemEventKindSchema).optional()
|
|
18536
|
+
}),
|
|
18537
|
+
template: object({
|
|
18538
|
+
title: string().max(500).optional(),
|
|
18539
|
+
body: string().max(2e3).optional()
|
|
18540
|
+
})
|
|
18541
|
+
});
|
|
18542
|
+
var NcTemplatePreviewSchema = object({
|
|
18543
|
+
title: string().nullable(),
|
|
18544
|
+
body: string().nullable(),
|
|
18545
|
+
/** Names the template uses that this context never fills — they render empty. */
|
|
18546
|
+
unknown: array(string())
|
|
18547
|
+
});
|
|
18485
18548
|
var NcConditionDescriptorSchema = object({
|
|
18486
18549
|
/** Field id inside `NcConditions` (or `'schedule'` for the rule-level group). */
|
|
18487
18550
|
id: string(),
|
|
@@ -18747,8 +18810,17 @@ object({
|
|
|
18747
18810
|
lastAt: number()
|
|
18748
18811
|
});
|
|
18749
18812
|
/**
|
|
18750
|
-
* The
|
|
18751
|
-
*
|
|
18813
|
+
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
18814
|
+
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
18815
|
+
* at the boundary rather than interpreted.
|
|
18816
|
+
*/
|
|
18817
|
+
var NcAlarmNonBlockingListSchema = array(object({
|
|
18818
|
+
mode: AlarmArmModeSchema,
|
|
18819
|
+
deviceIds: array(number().int()).max(200)
|
|
18820
|
+
})).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
|
|
18821
|
+
/**
|
|
18822
|
+
* The three durations the panel's state machine runs on, who hears about its
|
|
18823
|
+
* transitions, and which openings each mode tolerates.
|
|
18752
18824
|
*
|
|
18753
18825
|
* They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
|
|
18754
18826
|
* `alarm-panel` is `deviceNative` and its other provider mirrors somebody
|
|
@@ -18767,21 +18839,39 @@ var NcAlarmSettingsSchema = object({
|
|
|
18767
18839
|
* existed, and therefore what an untouched install keeps doing.
|
|
18768
18840
|
*/
|
|
18769
18841
|
triggeredDurationSec: number().int().min(0).max(3600),
|
|
18770
|
-
/** Send a notification when a mode takes effect. */
|
|
18771
|
-
announceArm: boolean(),
|
|
18772
18842
|
/**
|
|
18773
|
-
*
|
|
18843
|
+
* Deprecated by D630 — every transition is announced. Parsed, never read;
|
|
18844
|
+
* remove after one release. Optional so an older admin's patch (which still
|
|
18845
|
+
* sends it) parses rather than failing the whole save.
|
|
18846
|
+
*/
|
|
18847
|
+
announceArm: boolean().optional(),
|
|
18848
|
+
/**
|
|
18849
|
+
* Target ids from `notification-output`: every alarm transition goes here.
|
|
18774
18850
|
*
|
|
18775
|
-
* Explicit rather than "everyone": an
|
|
18851
|
+
* Explicit rather than "everyone": an alarm announcement is a household
|
|
18776
18852
|
* message, and broadcasting it to every configured endpoint (including a
|
|
18777
18853
|
* webhook wired to something else) is not a default anybody would choose.
|
|
18778
|
-
* Empty
|
|
18779
|
-
*
|
|
18854
|
+
* Empty sends nothing, and the server logs that — silence must be
|
|
18855
|
+
* attributable.
|
|
18780
18856
|
*/
|
|
18781
|
-
announceTargets: array(string().min(1)).max(16)
|
|
18857
|
+
announceTargets: array(string().min(1)).max(16),
|
|
18858
|
+
/**
|
|
18859
|
+
* Per arm mode, the covered devices whose being OPEN does not refuse the
|
|
18860
|
+
* arm (a window left ajar for the cat under `home`, say). At most one entry
|
|
18861
|
+
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
18862
|
+
* parses as "every opening blocks" — the behaviour it was written under.
|
|
18863
|
+
*/
|
|
18864
|
+
nonBlocking: NcAlarmNonBlockingListSchema.default([])
|
|
18782
18865
|
});
|
|
18783
|
-
/**
|
|
18784
|
-
|
|
18866
|
+
/**
|
|
18867
|
+
* Every field optional — a tab edits one control at a time.
|
|
18868
|
+
*
|
|
18869
|
+
* `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
|
|
18870
|
+
* remove an inner `.default()`, so a patch that never named the field would
|
|
18871
|
+
* parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
|
|
18872
|
+
* (the same trap {@link NcRulePatchSchema} documents).
|
|
18873
|
+
*/
|
|
18874
|
+
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
|
|
18785
18875
|
/**
|
|
18786
18876
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
18787
18877
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -18826,6 +18916,36 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
18826
18916
|
*/
|
|
18827
18917
|
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
18828
18918
|
});
|
|
18919
|
+
/** One covered device that reads open, and whether that refuses the arm. */
|
|
18920
|
+
var NcAlarmOpeningSchema = object({
|
|
18921
|
+
deviceId: number().int(),
|
|
18922
|
+
name: string(),
|
|
18923
|
+
/** The device's state word as read (`open`, `unlocked`, …). */
|
|
18924
|
+
state: string(),
|
|
18925
|
+
/** False when the mode's non-blocking list names this device. */
|
|
18926
|
+
blocking: boolean()
|
|
18927
|
+
});
|
|
18928
|
+
/** A device the panel is currently ignoring, and which side of it it is on. */
|
|
18929
|
+
var NcAlarmExclusionViewSchema = object({
|
|
18930
|
+
deviceId: number().int(),
|
|
18931
|
+
name: string(),
|
|
18932
|
+
phase: _enum(["open", "closed"])
|
|
18933
|
+
});
|
|
18934
|
+
/** One mode's openings: devices read open, plus those whose state is unknown. */
|
|
18935
|
+
var NcAlarmModeOpeningsSchema = object({
|
|
18936
|
+
mode: AlarmArmModeSchema,
|
|
18937
|
+
devices: array(NcAlarmOpeningSchema),
|
|
18938
|
+
/** Covered devices whose state could not be read (D49): neither open nor closed. */
|
|
18939
|
+
unknown: array(number().int())
|
|
18940
|
+
});
|
|
18941
|
+
var NcAlarmLiveSchema = object({
|
|
18942
|
+
state: AlarmStateSchema,
|
|
18943
|
+
/** The mode being armed into (exit delay) or held; null when disarmed. */
|
|
18944
|
+
targetMode: AlarmArmModeSchema.nullable(),
|
|
18945
|
+
availableModes: array(AlarmArmModeSchema),
|
|
18946
|
+
openings: array(NcAlarmModeOpeningsSchema),
|
|
18947
|
+
exclusions: array(NcAlarmExclusionViewSchema)
|
|
18948
|
+
});
|
|
18829
18949
|
var NcAlarmConfigSchema = object({
|
|
18830
18950
|
/**
|
|
18831
18951
|
* The panel's device id, or null when this install has no panel (the ensure
|
|
@@ -18835,7 +18955,13 @@ var NcAlarmConfigSchema = object({
|
|
|
18835
18955
|
*/
|
|
18836
18956
|
deviceId: number().int().nullable(),
|
|
18837
18957
|
settings: NcAlarmSettingsSchema,
|
|
18838
|
-
coverage: array(NcAlarmModeCoverageSchema)
|
|
18958
|
+
coverage: array(NcAlarmModeCoverageSchema),
|
|
18959
|
+
/**
|
|
18960
|
+
* The panel as it is NOW — state, what each mode would find open, what is
|
|
18961
|
+
* excluded. Optional: a panel-less hub answers without it, and a client
|
|
18962
|
+
* must not read its absence as "nothing is open".
|
|
18963
|
+
*/
|
|
18964
|
+
live: NcAlarmLiveSchema.optional()
|
|
18839
18965
|
});
|
|
18840
18966
|
/**
|
|
18841
18967
|
* ONE rule's demand on ONE camera's clip ring.
|
|
@@ -18883,10 +19009,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18883
19009
|
kind: "mutation",
|
|
18884
19010
|
auth: "admin",
|
|
18885
19011
|
caller: "required"
|
|
18886
|
-
}), method(object({
|
|
18887
|
-
ruleId: string(),
|
|
18888
|
-
patch: NcRulePatchSchema
|
|
18889
|
-
}), object({ rule: NcRuleSchema }), {
|
|
19012
|
+
}), method(NcRuleUpdateInputSchema, object({ rule: NcRuleSchema }), {
|
|
18890
19013
|
kind: "mutation",
|
|
18891
19014
|
auth: "admin",
|
|
18892
19015
|
caller: "required"
|
|
@@ -18914,7 +19037,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18914
19037
|
}), method(object({}), object({
|
|
18915
19038
|
catalog: array(NcConditionDescriptorSchema),
|
|
18916
19039
|
taxonomy: NcTaxonomySchema.optional()
|
|
18917
|
-
})), method(object({
|
|
19040
|
+
})), method(object({}), object({ vars: array(NcTemplateVarDescriptorSchema) })), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
|
|
19041
|
+
kind: "mutation",
|
|
19042
|
+
access: "view"
|
|
19043
|
+
}), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({ artifactId: string().min(1) }), object({ url: string().nullable() }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
|
|
18918
19044
|
kind: "mutation",
|
|
18919
19045
|
caller: "required"
|
|
18920
19046
|
}), method(object({ snoozeId: string() }), object({ success: literal(true) }), {
|
|
@@ -23347,6 +23473,7 @@ var CAP_TO_KIND = {
|
|
|
23347
23473
|
"enum-sensor": "enum-sensor",
|
|
23348
23474
|
"event-emitter": "device-event",
|
|
23349
23475
|
"lock-control": "lock",
|
|
23476
|
+
cover: "cover",
|
|
23350
23477
|
switch: "switch",
|
|
23351
23478
|
button: "button",
|
|
23352
23479
|
doorbell: "doorbell"
|
|
@@ -24164,6 +24291,58 @@ method(_void(), ProviderInfoSchema, { auth: "admin" }), method(object({ config:
|
|
|
24164
24291
|
kind: "mutation",
|
|
24165
24292
|
auth: "admin"
|
|
24166
24293
|
});
|
|
24294
|
+
/**
|
|
24295
|
+
* The signals a device can emit to WAKE its own stream.
|
|
24296
|
+
*
|
|
24297
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
24298
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
24299
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
24300
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
24301
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
24302
|
+
* itself, with no stream running.
|
|
24303
|
+
*
|
|
24304
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
24305
|
+
*
|
|
24306
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
24307
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
24308
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
24309
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
24310
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
24311
|
+
*
|
|
24312
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
24313
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
24314
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
24315
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
24316
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
24317
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
24318
|
+
* camera. Two questions, two authorities.
|
|
24319
|
+
*
|
|
24320
|
+
* ## Availability is not permission
|
|
24321
|
+
*
|
|
24322
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
24323
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
24324
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
24325
|
+
* provider declaring a signal is not a provider enabling it.
|
|
24326
|
+
*/
|
|
24327
|
+
/** One signal a device can emit. */
|
|
24328
|
+
var StreamSignalSchema = object({
|
|
24329
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
24330
|
+
code: string().min(1),
|
|
24331
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
24332
|
+
label: string().min(1),
|
|
24333
|
+
/**
|
|
24334
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
24335
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
24336
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
24337
|
+
* both of its own.
|
|
24338
|
+
*/
|
|
24339
|
+
recommended: boolean()
|
|
24340
|
+
});
|
|
24341
|
+
object({
|
|
24342
|
+
signals: array(StreamSignalSchema),
|
|
24343
|
+
lastFetchedAt: number()
|
|
24344
|
+
});
|
|
24345
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
24167
24346
|
/** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
|
|
24168
24347
|
var ProfileSettingsSchemaBridge = unknown().nullable();
|
|
24169
24348
|
var ProfileSettingsBagSchema = record(string(), unknown());
|
|
@@ -26446,6 +26625,143 @@ DeviceType.Camera, method(object({ deviceId: number() }), CameraCredentialsSchem
|
|
|
26446
26625
|
kind: "query",
|
|
26447
26626
|
auth: "admin"
|
|
26448
26627
|
});
|
|
26628
|
+
/**
|
|
26629
|
+
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
26630
|
+
* page.
|
|
26631
|
+
*
|
|
26632
|
+
* ## Why this is a capability and not an addon settings schema
|
|
26633
|
+
*
|
|
26634
|
+
* It was one, and it did not render. The addon declared the editor as a
|
|
26635
|
+
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
26636
|
+
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
26637
|
+
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
26638
|
+
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
26639
|
+
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
26640
|
+
* not on it "falls off silently".
|
|
26641
|
+
*
|
|
26642
|
+
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
26643
|
+
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
26644
|
+
* beside PTZ and motion zones on the camera itself. The device page is
|
|
26645
|
+
* BINDING-driven (D12), so the way in is a capability bound to the device —
|
|
26646
|
+
* and this cap carries its section the way `recording` does, by RETURNING it
|
|
26647
|
+
* from `getDeviceSettingsContribution`.
|
|
26648
|
+
*
|
|
26649
|
+
* Seven other widgets are still declared the other way, through a
|
|
26650
|
+
* `deviceConfig.ui` block the framework derives a section from. That route
|
|
26651
|
+
* gives the addon no say in where its own panel lands and no way to decline
|
|
26652
|
+
* for a device the panel does not suit, which is why this one does not use it.
|
|
26653
|
+
*
|
|
26654
|
+
* ## Why one addon may implement it
|
|
26655
|
+
*
|
|
26656
|
+
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
26657
|
+
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
26658
|
+
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
26659
|
+
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
26660
|
+
* reached only by a caller that already knew the addon id.
|
|
26661
|
+
*
|
|
26662
|
+
* ## The tab
|
|
26663
|
+
*
|
|
26664
|
+
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
26665
|
+
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
26666
|
+
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
26667
|
+
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
26668
|
+
* next to "PTZ").
|
|
26669
|
+
*/
|
|
26670
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
26671
|
+
var GridNormalizedRectSchema = object({
|
|
26672
|
+
x: number().min(0).max(1),
|
|
26673
|
+
y: number().min(0).max(1),
|
|
26674
|
+
width: number().gt(0).max(1),
|
|
26675
|
+
height: number().gt(0).max(1)
|
|
26676
|
+
});
|
|
26677
|
+
/**
|
|
26678
|
+
* One source camera, the part of its picture taken, and where that part lands.
|
|
26679
|
+
*
|
|
26680
|
+
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
26681
|
+
* — a profile switch, a firmware update, a substream that comes back different
|
|
26682
|
+
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
26683
|
+
* which is the class of bug nobody files.
|
|
26684
|
+
*/
|
|
26685
|
+
var GridLayoutCellSchema = object({
|
|
26686
|
+
deviceId: number().int().positive(),
|
|
26687
|
+
/** The part of the SOURCE taken, normalized against the source. */
|
|
26688
|
+
source: GridNormalizedRectSchema,
|
|
26689
|
+
/** Where it lands, normalized against the CANVAS. */
|
|
26690
|
+
cell: GridNormalizedRectSchema
|
|
26691
|
+
});
|
|
26692
|
+
/**
|
|
26693
|
+
* Which profiles this grid can actually compose, and why not.
|
|
26694
|
+
*
|
|
26695
|
+
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
26696
|
+
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
26697
|
+
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
26698
|
+
* low" is, and it is the one an operator can act on.
|
|
26699
|
+
*/
|
|
26700
|
+
var GridProfileOfferSchema = object({
|
|
26701
|
+
profile: _enum([
|
|
26702
|
+
"high",
|
|
26703
|
+
"mid",
|
|
26704
|
+
"low"
|
|
26705
|
+
]),
|
|
26706
|
+
offered: boolean(),
|
|
26707
|
+
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
26708
|
+
missingSources: array(number().int().positive()),
|
|
26709
|
+
/**
|
|
26710
|
+
* The canvas this profile composes onto, `WxH`, or empty when it is not
|
|
26711
|
+
* offered. DERIVED from the cells and the sources' own size at this profile —
|
|
26712
|
+
* it is reported because nothing else in the system would ever say what the
|
|
26713
|
+
* grid came out as, and because it is the number an operator would otherwise
|
|
26714
|
+
* expect to type.
|
|
26715
|
+
*/
|
|
26716
|
+
canvas: string(),
|
|
26717
|
+
/**
|
|
26718
|
+
* Whether this profile is PUBLISHED, of the ones the grid could serve.
|
|
26719
|
+
*
|
|
26720
|
+
* A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
|
|
26721
|
+
* a 4K canvas built from 4K decodes — something to opt into, not something a
|
|
26722
|
+
* viewer's adaptive should be handed by climbing to the top rung it can see.
|
|
26723
|
+
* Default is `mid` + `low`.
|
|
26724
|
+
*/
|
|
26725
|
+
published: boolean()
|
|
26726
|
+
});
|
|
26727
|
+
var GridLayoutViewSchema = object({
|
|
26728
|
+
/** The persisted grid row this camera was declared from. */
|
|
26729
|
+
instanceId: string(),
|
|
26730
|
+
deviceId: number().int().nonnegative(),
|
|
26731
|
+
name: string(),
|
|
26732
|
+
/**
|
|
26733
|
+
* NO canvas size. A grid's resolution is not authored: each profile derives
|
|
26734
|
+
* its own from the cells and its sources' dimensions. The two numbers that
|
|
26735
|
+
* used to be here were a text field that silently decided both how much the
|
|
26736
|
+
* composite cost and how sharp it was — see `profiles[].canvas` for what it
|
|
26737
|
+
* came out as.
|
|
26738
|
+
*/
|
|
26739
|
+
fps: number().int(),
|
|
26740
|
+
cells: array(GridLayoutCellSchema),
|
|
26741
|
+
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
26742
|
+
profiles: array(GridProfileOfferSchema)
|
|
26743
|
+
});
|
|
26744
|
+
var GridLayoutPatchSchema = object({
|
|
26745
|
+
deviceId: number().int().nonnegative(),
|
|
26746
|
+
name: string().min(1).max(160).optional(),
|
|
26747
|
+
fps: number().int().min(1).max(60).optional(),
|
|
26748
|
+
/** Which profiles to publish. See `GridProfileOffer.published`. */
|
|
26749
|
+
publishedProfiles: array(_enum([
|
|
26750
|
+
"high",
|
|
26751
|
+
"mid",
|
|
26752
|
+
"low"
|
|
26753
|
+
])).max(3).optional(),
|
|
26754
|
+
/**
|
|
26755
|
+
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
26756
|
+
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
26757
|
+
* for.
|
|
26758
|
+
*/
|
|
26759
|
+
cells: array(GridLayoutCellSchema).max(16)
|
|
26760
|
+
});
|
|
26761
|
+
DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
26762
|
+
kind: "mutation",
|
|
26763
|
+
auth: "admin"
|
|
26764
|
+
});
|
|
26449
26765
|
object({
|
|
26450
26766
|
detected: boolean(),
|
|
26451
26767
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -26919,307 +27235,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
|
|
|
26919
27235
|
auth: "admin"
|
|
26920
27236
|
});
|
|
26921
27237
|
/**
|
|
26922
|
-
* Vendor-neutral **onboard** recording + storage cap — what the CAMERA
|
|
26923
|
-
* writes to the CAMERA's own card, on the camera's own schedule.
|
|
26924
|
-
*
|
|
26925
|
-
* This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
|
|
26926
|
-
* footage ledger, our storage locations, our retention. This one has a
|
|
26927
|
-
* different authority — the camera's firmware — and per D62 it stores
|
|
26928
|
-
* nothing of its own. Every value here is read from the camera and every
|
|
26929
|
-
* write goes back to the camera; there is no CamStack-side mirror that
|
|
26930
|
-
* could disagree with the device.
|
|
26931
|
-
*
|
|
26932
|
-
* ## One shape, two firmwares
|
|
26933
|
-
*
|
|
26934
|
-
* Measured 2026-09-22 against the live fleet:
|
|
26935
|
-
*
|
|
26936
|
-
* | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
|
|
26937
|
-
* | --- | --- | --- |
|
|
26938
|
-
* | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
|
|
26939
|
-
* | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
|
|
26940
|
-
* | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
|
|
26941
|
-
* | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
|
|
26942
|
-
* | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
|
|
26943
|
-
* | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
|
|
26944
|
-
* | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
|
|
26945
|
-
* | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
|
|
26946
|
-
*
|
|
26947
|
-
* The two schedule models look different and are the same thing in
|
|
26948
|
-
* different coordinates: both answer "for this trigger, during which
|
|
26949
|
-
* weekly windows does the camera record". {@link RecordWindow} is that
|
|
26950
|
-
* question in one shape — Hikvision's ranges map straight onto it,
|
|
26951
|
-
* Reolink's mask expands into hour-aligned windows.
|
|
26952
|
-
*
|
|
26953
|
-
* ## Union, not intersection
|
|
26954
|
-
*
|
|
26955
|
-
* **The same fields exist on every camera.** What differs per device is
|
|
26956
|
-
* which VALUES that device accepts, and that is what {@link
|
|
26957
|
-
* RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
|
|
26958
|
-
* per field plus the schedule's own limits. A control a camera cannot
|
|
26959
|
-
* honour is rendered DISABLED WITH ITS REASON, never missing and never
|
|
26960
|
-
* dead: disabled must not look like broken.
|
|
26961
|
-
*
|
|
26962
|
-
* ## Refusal by name
|
|
26963
|
-
*
|
|
26964
|
-
* A write a camera cannot honour is refused with a sentence the operator
|
|
26965
|
-
* can read — never accepted and dropped. Both providers refuse through
|
|
26966
|
-
* {@link describeOnboardRefusal}, so the vocabulary is one function and
|
|
26967
|
-
* one test, not two hand-written vendor opinions.
|
|
26968
|
-
*
|
|
26969
|
-
* Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
|
|
26970
|
-
* `getOptions` advertises per-camera availability, `getStatus` (auto-
|
|
26971
|
-
* injected from `status`) reports the live values, and a single
|
|
26972
|
-
* `setSettings` mutation applies a partial change. No hand-written
|
|
26973
|
-
* settings-contribution methods.
|
|
26974
|
-
*/
|
|
26975
|
-
/**
|
|
26976
|
-
* What makes the camera start recording during a window.
|
|
26977
|
-
*
|
|
26978
|
-
* The union of both vendors' vocabularies. `continuous` is Hikvision's
|
|
26979
|
-
* `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
|
|
26980
|
-
* object-class triggers are Reolink-only today and the smart-event ones
|
|
26981
|
-
* (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
|
|
26982
|
-
* firmwares measured — a camera that cannot record on a trigger simply
|
|
26983
|
-
* does not list it in `options.schedule.triggers`, and a window naming
|
|
26984
|
-
* it is REFUSED, not dropped.
|
|
26985
|
-
*/
|
|
26986
|
-
var RecordTriggerSchema = _enum([
|
|
26987
|
-
"continuous",
|
|
26988
|
-
"motion",
|
|
26989
|
-
"person",
|
|
26990
|
-
"vehicle",
|
|
26991
|
-
"animal",
|
|
26992
|
-
"lineCrossing",
|
|
26993
|
-
"intrusion",
|
|
26994
|
-
"loitering",
|
|
26995
|
-
"alarmInput"
|
|
26996
|
-
]);
|
|
26997
|
-
/**
|
|
26998
|
-
* One weekly recording window: "on `day`, from `startMinute` to
|
|
26999
|
-
* `endMinute`, record on `trigger`".
|
|
27000
|
-
*
|
|
27001
|
-
* `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
|
|
27002
|
-
* both firmwares enumerate). Minutes are local camera time since
|
|
27003
|
-
* midnight; `endMinute` may be 1440, meaning end of day — that is
|
|
27004
|
-
* Hikvision's literal `24:00` and Reolink's 24th mask slot, and
|
|
27005
|
-
* collapsing it to 0 would turn a whole-day window into an empty one.
|
|
27006
|
-
*/
|
|
27007
|
-
var RecordWindowSchema = object({
|
|
27008
|
-
trigger: RecordTriggerSchema,
|
|
27009
|
-
day: number().int().min(0).max(6),
|
|
27010
|
-
startMinute: number().int().min(0).max(1439),
|
|
27011
|
-
endMinute: number().int().min(1).max(1440)
|
|
27012
|
-
});
|
|
27013
|
-
/** Status of one physical volume, as the camera itself describes it. */
|
|
27014
|
-
var OnboardStorageVolumeSchema = object({
|
|
27015
|
-
/** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
|
|
27016
|
-
id: string(),
|
|
27017
|
-
/** The camera's own name for it, when it gives one (`hddName`). */
|
|
27018
|
-
label: string().optional(),
|
|
27019
|
-
status: _enum([
|
|
27020
|
-
"ok",
|
|
27021
|
-
"unformatted",
|
|
27022
|
-
"error",
|
|
27023
|
-
"offline",
|
|
27024
|
-
"unknown"
|
|
27025
|
-
]),
|
|
27026
|
-
/**
|
|
27027
|
-
* Total size in MB, or **null when the camera did not say**.
|
|
27028
|
-
*
|
|
27029
|
-
* Never 0 for an unreadable value: a measurement that failed is not a
|
|
27030
|
-
* measurement (D393), and a card whose size is unknown must not be
|
|
27031
|
-
* rendered as a card of size zero.
|
|
27032
|
-
*/
|
|
27033
|
-
capacityMb: number().nullable(),
|
|
27034
|
-
/**
|
|
27035
|
-
* Free space in MB, or null when unknown.
|
|
27036
|
-
*
|
|
27037
|
-
* **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
|
|
27038
|
-
* 1439 both report exactly 11776 MB free — the fixed reserve a looping
|
|
27039
|
-
* card converges on once it has wrapped. At loop steady state the
|
|
27040
|
-
* number is identical whether the camera recorded yesterday or stopped
|
|
27041
|
-
* a month ago.
|
|
27042
|
-
*/
|
|
27043
|
-
freeMb: number().nullable(),
|
|
27044
|
-
/** True when the camera reports the volume writable (`property` RW). */
|
|
27045
|
-
writable: boolean().optional()
|
|
27046
|
-
});
|
|
27047
|
-
object({
|
|
27048
|
-
storage: discriminatedUnion("kind", [
|
|
27049
|
-
object({
|
|
27050
|
-
kind: literal("present"),
|
|
27051
|
-
volumes: array(OnboardStorageVolumeSchema)
|
|
27052
|
-
}),
|
|
27053
|
-
object({
|
|
27054
|
-
kind: literal("absent"),
|
|
27055
|
-
reason: string()
|
|
27056
|
-
}),
|
|
27057
|
-
object({
|
|
27058
|
-
kind: literal("unknown"),
|
|
27059
|
-
reason: string()
|
|
27060
|
-
})
|
|
27061
|
-
]),
|
|
27062
|
-
tracks: array(object({
|
|
27063
|
-
id: string(),
|
|
27064
|
-
enabled: boolean(),
|
|
27065
|
-
isVideo: boolean(),
|
|
27066
|
-
/** From the camera's own track description. Null when it does not say. */
|
|
27067
|
-
codec: string().nullable(),
|
|
27068
|
-
resolution: string().nullable(),
|
|
27069
|
-
/** Per-track overwrite flag, where the firmware keeps it per track. */
|
|
27070
|
-
overwriteWhenFull: boolean().nullable()
|
|
27071
|
-
})),
|
|
27072
|
-
/**
|
|
27073
|
-
* The track the write path targets — the enabled VIDEO one. Null when
|
|
27074
|
-
* no track could be identified, which is itself a refusal reason.
|
|
27075
|
-
*/
|
|
27076
|
-
primaryTrackId: string().nullable(),
|
|
27077
|
-
/** Master "record to the card at all" switch. */
|
|
27078
|
-
enabled: boolean().nullable(),
|
|
27079
|
-
overwriteWhenFull: boolean().nullable(),
|
|
27080
|
-
preRecordSec: number().nullable(),
|
|
27081
|
-
postRecordSec: number().nullable(),
|
|
27082
|
-
/** Length of one recorded file, in minutes. */
|
|
27083
|
-
segmentMinutes: number().nullable(),
|
|
27084
|
-
/** The primary track's weekly windows, flattened. */
|
|
27085
|
-
windows: array(RecordWindowSchema),
|
|
27086
|
-
/**
|
|
27087
|
-
* How many windows the camera described that CamStack could NOT read —
|
|
27088
|
-
* an unrecognised trigger, an unparseable clock, a weekday it does not
|
|
27089
|
-
* name.
|
|
27090
|
-
*
|
|
27091
|
-
* A dropped window is work the reader threw away, and a schedule that
|
|
27092
|
-
* silently shows fewer rows than the camera holds is how an operator
|
|
27093
|
-
* saves back a schedule shorter than the one they were looking at
|
|
27094
|
-
* (D391). Non-zero means the window list is INCOMPLETE and a write
|
|
27095
|
-
* that replaces it would delete what was not shown — which is why a
|
|
27096
|
-
* provider reporting a non-zero count also reports the schedule as not
|
|
27097
|
-
* writable.
|
|
27098
|
-
*/
|
|
27099
|
-
unreadableWindows: number(),
|
|
27100
|
-
/**
|
|
27101
|
-
* The camera is scheduled to record and has NO usable storage.
|
|
27102
|
-
*
|
|
27103
|
-
* A first-class fact because it is the fleet's most common silent
|
|
27104
|
-
* defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
|
|
27105
|
-
* to a card that is not there. Neither the schedule nor the storage
|
|
27106
|
-
* read says anything wrong on its own; only the pair does.
|
|
27107
|
-
*/
|
|
27108
|
-
recordingToNowhere: boolean(),
|
|
27109
|
-
lastFetchedAt: number()
|
|
27110
|
-
});
|
|
27111
|
-
/** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
|
|
27112
|
-
var RangeSchema = object({
|
|
27113
|
-
min: number(),
|
|
27114
|
-
max: number(),
|
|
27115
|
-
step: number()
|
|
27116
|
-
});
|
|
27117
|
-
/**
|
|
27118
|
-
* The values a camera actually takes for a numeric field, when they are a SET
|
|
27119
|
-
* rather than a range.
|
|
27120
|
-
*
|
|
27121
|
-
* `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
|
|
27122
|
-
* (I91DN) on 2026-09-22 by writing each value and reading it back:
|
|
27123
|
-
*
|
|
27124
|
-
* - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
|
|
27125
|
-
* camera's "no limit" — `-1` and `4294967295` both land on it);
|
|
27126
|
-
* - post-record: `5, 10, 30, 60, 120, 300, 600`.
|
|
27127
|
-
*
|
|
27128
|
-
* Neither is expressible as a step: the first has a sentinel two billion away
|
|
27129
|
-
* from its neighbours, the second doubles and then jumps. A range that tried
|
|
27130
|
-
* would forbid values the camera takes AND permit values it silently replaces
|
|
27131
|
-
* with 5 — wrong in both directions at once.
|
|
27132
|
-
*
|
|
27133
|
-
* `sentinel` names the member that is not a duration, so a surface can render
|
|
27134
|
-
* "no limit" instead of `2147483647` seconds.
|
|
27135
|
-
*/
|
|
27136
|
-
var AllowedValuesSchema = object({
|
|
27137
|
-
values: array(number()).min(1),
|
|
27138
|
-
sentinel: object({
|
|
27139
|
-
value: number(),
|
|
27140
|
-
meaning: _enum(["no-limit", "disabled"])
|
|
27141
|
-
}).optional()
|
|
27142
|
-
});
|
|
27143
|
-
/**
|
|
27144
|
-
* Per-field availability on ONE camera.
|
|
27145
|
-
*
|
|
27146
|
-
* The field exists on every camera — this says whether this one can be
|
|
27147
|
-
* read and whether it can be written, and `reason` says why not when
|
|
27148
|
-
* either is false. The UI renders the control DISABLED with the reason
|
|
27149
|
-
* rather than hiding it, so a limitation is legible instead of looking
|
|
27150
|
-
* like a missing feature.
|
|
27151
|
-
*/
|
|
27152
|
-
var OnboardFieldSupportSchema = object({
|
|
27153
|
-
readable: boolean(),
|
|
27154
|
-
writable: boolean(),
|
|
27155
|
-
/** Required whenever `readable` or `writable` is false. */
|
|
27156
|
-
reason: string().optional()
|
|
27157
|
-
});
|
|
27158
|
-
/** What this camera's schedule model can express. */
|
|
27159
|
-
var OnboardScheduleSupportSchema = object({
|
|
27160
|
-
support: OnboardFieldSupportSchema,
|
|
27161
|
-
/**
|
|
27162
|
-
* The smallest time step the camera can express, in minutes.
|
|
27163
|
-
*
|
|
27164
|
-
* Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
|
|
27165
|
-
* 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
|
|
27166
|
-
* window whose edges are not a multiple of this is REFUSED rather than
|
|
27167
|
-
* quietly rounded — rounding is how an operator's 06:30 becomes 06:00
|
|
27168
|
-
* and nothing says so.
|
|
27169
|
-
*/
|
|
27170
|
-
granularityMinutes: number(),
|
|
27171
|
-
/** Triggers this camera can record on. A window naming another is refused. */
|
|
27172
|
-
triggers: array(RecordTriggerSchema),
|
|
27173
|
-
/**
|
|
27174
|
-
* False when the camera stores ONE trigger per time range, so two
|
|
27175
|
-
* windows overlapping on the same day cannot carry different triggers.
|
|
27176
|
-
* True on Reolink, whose mask is per-trigger and independent.
|
|
27177
|
-
*/
|
|
27178
|
-
supportsOverlappingTriggers: boolean()
|
|
27179
|
-
});
|
|
27180
|
-
var RecordingOnboardOptionsSchema = object({
|
|
27181
|
-
enabled: OnboardFieldSupportSchema,
|
|
27182
|
-
overwriteWhenFull: OnboardFieldSupportSchema,
|
|
27183
|
-
preRecordSec: OnboardFieldSupportSchema,
|
|
27184
|
-
preRecordSecRange: RangeSchema.optional(),
|
|
27185
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
27186
|
-
preRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
27187
|
-
postRecordSec: OnboardFieldSupportSchema,
|
|
27188
|
-
postRecordSecRange: RangeSchema.optional(),
|
|
27189
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
27190
|
-
postRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
27191
|
-
segmentMinutes: OnboardFieldSupportSchema,
|
|
27192
|
-
segmentMinutesRange: RangeSchema.optional(),
|
|
27193
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
27194
|
-
segmentMinutesAllowed: AllowedValuesSchema.optional(),
|
|
27195
|
-
schedule: OnboardScheduleSupportSchema
|
|
27196
|
-
});
|
|
27197
|
-
/**
|
|
27198
|
-
* A partial change. Every field optional.
|
|
27199
|
-
*
|
|
27200
|
-
* Unlike the other `deviceConfig` caps, a provider here does **NOT**
|
|
27201
|
-
* silently ignore a field it cannot support — it refuses, by name,
|
|
27202
|
-
* through {@link describeOnboardRefusal}. Silence on a recording setting
|
|
27203
|
-
* is the failure D62 exists to prevent: the operator believes the camera
|
|
27204
|
-
* is recording the way the form says, and it is not.
|
|
27205
|
-
*/
|
|
27206
|
-
var RecordingOnboardPatchSchema = object({
|
|
27207
|
-
enabled: boolean().optional(),
|
|
27208
|
-
overwriteWhenFull: boolean().optional(),
|
|
27209
|
-
preRecordSec: number().optional(),
|
|
27210
|
-
postRecordSec: number().optional(),
|
|
27211
|
-
segmentMinutes: number().optional(),
|
|
27212
|
-
/** The complete new window set for the primary track — not a delta. */
|
|
27213
|
-
windows: array(RecordWindowSchema).optional()
|
|
27214
|
-
});
|
|
27215
|
-
DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
|
|
27216
|
-
deviceId: number(),
|
|
27217
|
-
settings: RecordingOnboardPatchSchema
|
|
27218
|
-
}), _void(), {
|
|
27219
|
-
kind: "mutation",
|
|
27220
|
-
auth: "admin"
|
|
27221
|
-
});
|
|
27222
|
-
/**
|
|
27223
27238
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
27224
27239
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
27225
27240
|
* cap-keyed slice for the basic device flags every consumer expects to
|
|
@@ -27313,30 +27328,6 @@ object({
|
|
|
27313
27328
|
eventCountSinceStart: number()
|
|
27314
27329
|
});
|
|
27315
27330
|
DeviceType.EventEmitter;
|
|
27316
|
-
var EventItemSchema = object({
|
|
27317
|
-
id: string(),
|
|
27318
|
-
type: string(),
|
|
27319
|
-
timestamp: number(),
|
|
27320
|
-
label: string().optional(),
|
|
27321
|
-
thumbnailUrl: string().optional(),
|
|
27322
|
-
clipUrl: string().optional(),
|
|
27323
|
-
metadata: record(string(), unknown()).optional()
|
|
27324
|
-
});
|
|
27325
|
-
DeviceType.Camera, method(object({
|
|
27326
|
-
deviceId: number(),
|
|
27327
|
-
from: number().optional(),
|
|
27328
|
-
to: number().optional(),
|
|
27329
|
-
limit: number().optional()
|
|
27330
|
-
}), array(EventItemSchema)), method(object({
|
|
27331
|
-
deviceId: number(),
|
|
27332
|
-
eventId: string()
|
|
27333
|
-
}), object({
|
|
27334
|
-
base64: string(),
|
|
27335
|
-
contentType: string()
|
|
27336
|
-
}).nullable()), method(object({
|
|
27337
|
-
deviceId: number(),
|
|
27338
|
-
eventId: string()
|
|
27339
|
-
}), string().nullable());
|
|
27340
27331
|
var IdentitySchema = object({
|
|
27341
27332
|
id: string(),
|
|
27342
27333
|
name: string(),
|
|
@@ -29008,143 +28999,6 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
|
|
|
29008
28999
|
lastChangedAt: number()
|
|
29009
29000
|
});
|
|
29010
29001
|
/**
|
|
29011
|
-
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
29012
|
-
* page.
|
|
29013
|
-
*
|
|
29014
|
-
* ## Why this is a capability and not an addon settings schema
|
|
29015
|
-
*
|
|
29016
|
-
* It was one, and it did not render. The addon declared the editor as a
|
|
29017
|
-
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
29018
|
-
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
29019
|
-
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
29020
|
-
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
29021
|
-
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
29022
|
-
* not on it "falls off silently".
|
|
29023
|
-
*
|
|
29024
|
-
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
29025
|
-
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
29026
|
-
* beside PTZ and motion zones on the camera itself. The device page is
|
|
29027
|
-
* BINDING-driven (D12), so the way in is a capability bound to the device —
|
|
29028
|
-
* and this cap carries its section the way `recording` does, by RETURNING it
|
|
29029
|
-
* from `getDeviceSettingsContribution`.
|
|
29030
|
-
*
|
|
29031
|
-
* Seven other widgets are still declared the other way, through a
|
|
29032
|
-
* `deviceConfig.ui` block the framework derives a section from. That route
|
|
29033
|
-
* gives the addon no say in where its own panel lands and no way to decline
|
|
29034
|
-
* for a device the panel does not suit, which is why this one does not use it.
|
|
29035
|
-
*
|
|
29036
|
-
* ## Why one addon may implement it
|
|
29037
|
-
*
|
|
29038
|
-
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
29039
|
-
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
29040
|
-
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
29041
|
-
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
29042
|
-
* reached only by a caller that already knew the addon id.
|
|
29043
|
-
*
|
|
29044
|
-
* ## The tab
|
|
29045
|
-
*
|
|
29046
|
-
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
29047
|
-
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
29048
|
-
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
29049
|
-
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
29050
|
-
* next to "PTZ").
|
|
29051
|
-
*/
|
|
29052
|
-
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
29053
|
-
var GridNormalizedRectSchema = object({
|
|
29054
|
-
x: number().min(0).max(1),
|
|
29055
|
-
y: number().min(0).max(1),
|
|
29056
|
-
width: number().gt(0).max(1),
|
|
29057
|
-
height: number().gt(0).max(1)
|
|
29058
|
-
});
|
|
29059
|
-
/**
|
|
29060
|
-
* One source camera, the part of its picture taken, and where that part lands.
|
|
29061
|
-
*
|
|
29062
|
-
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
29063
|
-
* — a profile switch, a firmware update, a substream that comes back different
|
|
29064
|
-
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
29065
|
-
* which is the class of bug nobody files.
|
|
29066
|
-
*/
|
|
29067
|
-
var GridLayoutCellSchema = object({
|
|
29068
|
-
deviceId: number().int().positive(),
|
|
29069
|
-
/** The part of the SOURCE taken, normalized against the source. */
|
|
29070
|
-
source: GridNormalizedRectSchema,
|
|
29071
|
-
/** Where it lands, normalized against the CANVAS. */
|
|
29072
|
-
cell: GridNormalizedRectSchema
|
|
29073
|
-
});
|
|
29074
|
-
/**
|
|
29075
|
-
* Which profiles this grid can actually compose, and why not.
|
|
29076
|
-
*
|
|
29077
|
-
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
29078
|
-
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
29079
|
-
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
29080
|
-
* low" is, and it is the one an operator can act on.
|
|
29081
|
-
*/
|
|
29082
|
-
var GridProfileOfferSchema = object({
|
|
29083
|
-
profile: _enum([
|
|
29084
|
-
"high",
|
|
29085
|
-
"mid",
|
|
29086
|
-
"low"
|
|
29087
|
-
]),
|
|
29088
|
-
offered: boolean(),
|
|
29089
|
-
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
29090
|
-
missingSources: array(number().int().positive()),
|
|
29091
|
-
/**
|
|
29092
|
-
* The canvas this profile composes onto, `WxH`, or empty when it is not
|
|
29093
|
-
* offered. DERIVED from the cells and the sources' own size at this profile —
|
|
29094
|
-
* it is reported because nothing else in the system would ever say what the
|
|
29095
|
-
* grid came out as, and because it is the number an operator would otherwise
|
|
29096
|
-
* expect to type.
|
|
29097
|
-
*/
|
|
29098
|
-
canvas: string(),
|
|
29099
|
-
/**
|
|
29100
|
-
* Whether this profile is PUBLISHED, of the ones the grid could serve.
|
|
29101
|
-
*
|
|
29102
|
-
* A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
|
|
29103
|
-
* a 4K canvas built from 4K decodes — something to opt into, not something a
|
|
29104
|
-
* viewer's adaptive should be handed by climbing to the top rung it can see.
|
|
29105
|
-
* Default is `mid` + `low`.
|
|
29106
|
-
*/
|
|
29107
|
-
published: boolean()
|
|
29108
|
-
});
|
|
29109
|
-
var GridLayoutViewSchema = object({
|
|
29110
|
-
/** The persisted grid row this camera was declared from. */
|
|
29111
|
-
instanceId: string(),
|
|
29112
|
-
deviceId: number().int().nonnegative(),
|
|
29113
|
-
name: string(),
|
|
29114
|
-
/**
|
|
29115
|
-
* NO canvas size. A grid's resolution is not authored: each profile derives
|
|
29116
|
-
* its own from the cells and its sources' dimensions. The two numbers that
|
|
29117
|
-
* used to be here were a text field that silently decided both how much the
|
|
29118
|
-
* composite cost and how sharp it was — see `profiles[].canvas` for what it
|
|
29119
|
-
* came out as.
|
|
29120
|
-
*/
|
|
29121
|
-
fps: number().int(),
|
|
29122
|
-
cells: array(GridLayoutCellSchema),
|
|
29123
|
-
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
29124
|
-
profiles: array(GridProfileOfferSchema)
|
|
29125
|
-
});
|
|
29126
|
-
var GridLayoutPatchSchema = object({
|
|
29127
|
-
deviceId: number().int().nonnegative(),
|
|
29128
|
-
name: string().min(1).max(160).optional(),
|
|
29129
|
-
fps: number().int().min(1).max(60).optional(),
|
|
29130
|
-
/** Which profiles to publish. See `GridProfileOffer.published`. */
|
|
29131
|
-
publishedProfiles: array(_enum([
|
|
29132
|
-
"high",
|
|
29133
|
-
"mid",
|
|
29134
|
-
"low"
|
|
29135
|
-
])).max(3).optional(),
|
|
29136
|
-
/**
|
|
29137
|
-
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
29138
|
-
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
29139
|
-
* for.
|
|
29140
|
-
*/
|
|
29141
|
-
cells: array(GridLayoutCellSchema).max(16)
|
|
29142
|
-
});
|
|
29143
|
-
DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
29144
|
-
kind: "mutation",
|
|
29145
|
-
auth: "admin"
|
|
29146
|
-
});
|
|
29147
|
-
/**
|
|
29148
29002
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
29149
29003
|
* on-camera motion-detection mask is a single `grid` region (a row-major
|
|
29150
29004
|
* boolean cell lattice the camera's onboard VMD evaluates). Composing it as
|
|
@@ -30956,37 +30810,37 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
30956
30810
|
kind: "mutation",
|
|
30957
30811
|
auth: "admin"
|
|
30958
30812
|
});
|
|
30959
|
-
/**
|
|
30960
|
-
* `recording` cap — footage availability + HLS playback manifests + per-device
|
|
30961
|
-
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
30962
|
-
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
30963
|
-
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
30964
|
-
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
30965
|
-
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
30966
|
-
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
30967
|
-
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
30968
|
-
*/
|
|
30969
|
-
var RecordingStatusSchema = object({
|
|
30970
|
-
deviceId: number(),
|
|
30971
|
-
enabled: boolean(),
|
|
30972
|
-
/** THE derived storage mode, from the one definition
|
|
30973
|
-
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
30974
|
-
* `on-device-decision` could have reached the recorder and not the status. */
|
|
30975
|
-
activeMode: RecordingStorageModeSchema,
|
|
30976
|
-
nodeId: string(),
|
|
30977
|
-
storageBytes: number()
|
|
30978
|
-
});
|
|
30979
30813
|
var RecordingRangeSchema = object({
|
|
30980
30814
|
profile: string(),
|
|
30981
30815
|
startMs: number(),
|
|
30982
30816
|
endMs: number()
|
|
30983
30817
|
});
|
|
30818
|
+
/**
|
|
30819
|
+
* How a source ANSWERED, on every singular read of this cap.
|
|
30820
|
+
*
|
|
30821
|
+
* `'read'` — it looked. `ranges: []` / `days: []` is then a real claim: this
|
|
30822
|
+
* source has no coverage in the window. `'unreadable'` — nobody could look
|
|
30823
|
+
* (the camera was unreachable, the calendar rung threw, the location is
|
|
30824
|
+
* unmounted, the node is still on the old build), and the emptiness beside it
|
|
30825
|
+
* means NOTHING.
|
|
30826
|
+
*
|
|
30827
|
+
* The batch rows have carried this since the grid existed; the SINGULAR
|
|
30828
|
+
* answers gained it with the collection (D625 §10.4), because they are the
|
|
30829
|
+
* ones the single-camera picker uses and because a half-converted fleet makes
|
|
30830
|
+
* "nobody looked" common for the length of a deploy. Without it the timeline
|
|
30831
|
+
* has no vocabulary for it, and `(data ?? [])` in a viewer turns a rollout into
|
|
30832
|
+
* a fleet of cameras that appear to have lost their recordings (D315, D393).
|
|
30833
|
+
*/
|
|
30834
|
+
var RecordingReadSchema = _enum(["read", "unreadable"]);
|
|
30984
30835
|
var RecordingAvailabilitySchema = object({
|
|
30985
30836
|
deviceId: number(),
|
|
30837
|
+
/** See {@link RecordingReadSchema}. An `'unreadable'` answer carries an empty
|
|
30838
|
+
* `ranges` that means nothing — never draw it as "no footage". */
|
|
30839
|
+
read: RecordingReadSchema,
|
|
30986
30840
|
ranges: array(RecordingRangeSchema),
|
|
30987
30841
|
/**
|
|
30988
|
-
* Every profile this camera has footage in — not only the one
|
|
30989
|
-
* describes (D433).
|
|
30842
|
+
* Every profile this camera has footage in AT THIS SOURCE — not only the one
|
|
30843
|
+
* `ranges` describes (D433).
|
|
30990
30844
|
*
|
|
30991
30845
|
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30992
30846
|
* and enumerating all of them triples the directory reads for a bar that
|
|
@@ -31003,15 +30857,285 @@ var RecordingAvailabilitySchema = object({
|
|
|
31003
30857
|
});
|
|
31004
30858
|
var RecordingDaysSchema = object({
|
|
31005
30859
|
deviceId: number(),
|
|
30860
|
+
/** See {@link RecordingReadSchema}. `days: []` on an `'unreadable'` answer is
|
|
30861
|
+
* "nobody could look", and the date-picker must not spell it the same as
|
|
30862
|
+
* "no footage this month". */
|
|
30863
|
+
read: RecordingReadSchema,
|
|
31006
30864
|
/** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
|
|
31007
30865
|
days: array(number())
|
|
31008
30866
|
});
|
|
30867
|
+
var RecordingManifestSchema = object({
|
|
30868
|
+
deviceId: number(),
|
|
30869
|
+
/** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
|
|
30870
|
+
localMasterPath: string().nullable(),
|
|
30871
|
+
/** HTTP(S) URL to the master playlist on the recording node's playback server
|
|
30872
|
+
* (the PRIMARY candidate); null when no recording / server. Carries the
|
|
30873
|
+
* scoped playback token in its path. */
|
|
30874
|
+
playbackUrl: string().nullable(),
|
|
30875
|
+
/**
|
|
30876
|
+
* Candidate master-playlist URLs the client tries in order (LAN first, then
|
|
30877
|
+
* remote — Tailscale/Cloudflare if the operator configured extra hosts), each
|
|
30878
|
+
* carrying the same scoped token. `playbackUrl` is the first entry. Empty when
|
|
30879
|
+
* there is no recording / server.
|
|
30880
|
+
*/
|
|
30881
|
+
playbackEndpoints: array(string())
|
|
30882
|
+
});
|
|
30883
|
+
var RecordingSourceAvailabilitySchema = object({
|
|
30884
|
+
state: _enum([
|
|
30885
|
+
"ok",
|
|
30886
|
+
"sleeping",
|
|
30887
|
+
"unreachable",
|
|
30888
|
+
"no-storage",
|
|
30889
|
+
"index-empty"
|
|
30890
|
+
]),
|
|
30891
|
+
/** Free text, shown verbatim. Names the camera's own refusal when there is one. */
|
|
30892
|
+
reason: string().optional(),
|
|
30893
|
+
/** When this source's coverage was last CONFIRMED. A cached answer is never
|
|
30894
|
+
* drawn as current: the surface shows the age whenever it is older than the
|
|
30895
|
+
* refresh interval. The clip catalog's `catalogAsOf`, under the name the
|
|
30896
|
+
* timeline uses for it. */
|
|
30897
|
+
coverageAsOf: number().optional()
|
|
30898
|
+
});
|
|
30899
|
+
/**
|
|
30900
|
+
* One SOURCE of recorded coverage for a camera — a row of the picker.
|
|
30901
|
+
*
|
|
30902
|
+
* A provider lists the sources IT serves for that device, and answers for each
|
|
30903
|
+
* of them whether it can answer at all. A provider with nothing to offer on a
|
|
30904
|
+
* camera returns `[]` — it is not that camera's business. The five availability
|
|
30905
|
+
* states are `ClipSourceAvailability`'s verbatim: they mean exactly the same
|
|
30906
|
+
* things about a coverage index as about a clip catalog, and `sleeping` in
|
|
30907
|
+
* particular is what stops a battery camera being woken to paint a bar.
|
|
30908
|
+
*/
|
|
30909
|
+
var RecordingSourceSchema = object({
|
|
30910
|
+
/** The source id. {@link RECORDING_SOURCE_CAMSTACK} for ours (RESERVED), a
|
|
30911
|
+
* vendor namespace (`native:reolink:onboard`, …) for a camera's own store. */
|
|
30912
|
+
source: string(),
|
|
30913
|
+
/** Operator-facing name of the source ("CamStack recordings", "SD card"). */
|
|
30914
|
+
label: string(),
|
|
30915
|
+
/**
|
|
30916
|
+
* The addon that SERVES this row, and the value a later call passes as
|
|
30917
|
+
* `provider`.
|
|
30918
|
+
*
|
|
30919
|
+
* Optional for version skew only. The collection dispatcher stamps it from
|
|
30920
|
+
* the registry, so a row that travelled through the fan-out carries the
|
|
30921
|
+
* authoritative id whatever the provider filled in (D557 §4).
|
|
30922
|
+
*/
|
|
30923
|
+
addonId: string().optional(),
|
|
30924
|
+
availability: RecordingSourceAvailabilitySchema
|
|
30925
|
+
});
|
|
30926
|
+
/**
|
|
30927
|
+
* What a surface may DRAW for this (camera, source) — D612's rule applied to a
|
|
30928
|
+
* timeline: **the source declares what it can do, and the surface draws what
|
|
30929
|
+
* was declared. It never assumes, and never offers a gesture it will then
|
|
30930
|
+
* refuse.** D612 exists because `8` and `16` were offered as clip rates, the
|
|
30931
|
+
* broker clamped them to `4`, and no line anywhere said so.
|
|
30932
|
+
*
|
|
30933
|
+
* Asked once per (camera, source) before anything is drawn — never replaced by
|
|
30934
|
+
* a constant the surface keeps, which is the second authority D612 ends.
|
|
30935
|
+
*/
|
|
30936
|
+
var RecordingSourceOptionsSchema = object({
|
|
30937
|
+
/** How this source's media reaches the player.
|
|
30938
|
+
* `archive` = our own indexed segment tree; `stream` = the provider's
|
|
30939
|
+
* forward-only fMP4 (D597); `realtime` = a replay bound to wall clock. */
|
|
30940
|
+
transport: _enum([
|
|
30941
|
+
"archive",
|
|
30942
|
+
"stream",
|
|
30943
|
+
"realtime"
|
|
30944
|
+
]),
|
|
30945
|
+
/** What the BAR means. `continuous` = gaps are holes in a recording;
|
|
30946
|
+
* `sparse` = gaps are the absence of one, and must be drawn as such.
|
|
30947
|
+
*
|
|
30948
|
+
* Not an onboard-only concession: measured 2026-09-24, OUR bar covers 98.8 %
|
|
30949
|
+
* of 592's day and 1.2 % of 1436's. It is a fact about a (source, camera)
|
|
30950
|
+
* pair, and ours answers it per camera from `deriveRecordingMode`. */
|
|
30951
|
+
coverage: _enum(["continuous", "sparse"]),
|
|
30952
|
+
/** Where the playhead may be put.
|
|
30953
|
+
* `free` — anywhere, to the frame.
|
|
30954
|
+
* `forward` — only ahead of the current position.
|
|
30955
|
+
* `segment` — a position SNAPS to the head of the covering segment; a finer
|
|
30956
|
+
* ask is accepted by the camera and SILENTLY IGNORED. Measured
|
|
30957
|
+
* on 1436 (Hikvision V5.7.1, 2026-09-23): a window-narrowed
|
|
30958
|
+
* `ContentMgmt/search` returns a row and a `playbackURI`, the
|
|
30959
|
+
* replay opens 200 and delivers media — and the burned-in OSD of
|
|
30960
|
+
* the first frame reads the SEGMENT HEAD every time. Calling
|
|
30961
|
+
* that `forward` would tell the surface it may move the playhead
|
|
30962
|
+
* ahead within a loaded segment, which it may not. */
|
|
30963
|
+
seek: _enum([
|
|
30964
|
+
"free",
|
|
30965
|
+
"forward",
|
|
30966
|
+
"segment"
|
|
30967
|
+
]),
|
|
30968
|
+
/** Frame-step BACKWARD is meaningful. */
|
|
30969
|
+
stepBack: boolean(),
|
|
30970
|
+
/** Whether the drag-scrub gesture is served, as opposed to refused by name. */
|
|
30971
|
+
scrub: boolean(),
|
|
30972
|
+
/** Deliverable rates, ascending, always containing `1`. The surface draws its
|
|
30973
|
+
* picker from this and from NOTHING else (D612, D620, D621). `0` is not a
|
|
30974
|
+
* member: pause is the absence of a rate. */
|
|
30975
|
+
rates: array(number().positive()).min(1).readonly(),
|
|
30976
|
+
/** TRUE when a read of this source HOLDS the camera's only playback session.
|
|
30977
|
+
* A surface with this set makes at most ONE read at a time and draws no
|
|
30978
|
+
* scrub-thumbnail strip, no hover preview, no prefetch and no background
|
|
30979
|
+
* refresh. The precedent is exact and expensive: filling one screen of
|
|
30980
|
+
* Hikvision thumbnails at 1.01× realtime consumed fifteen minutes of that
|
|
30981
|
+
* camera's only playback session (1.2.126, reported within minutes), and a
|
|
30982
|
+
* timeline is a screenful of reads by construction. */
|
|
30983
|
+
exclusive: boolean()
|
|
30984
|
+
});
|
|
30985
|
+
/**
|
|
30986
|
+
* How to PLAY the instant that was asked for, from the chosen source.
|
|
30987
|
+
*
|
|
30988
|
+
* No new media transport is built for onboard sources: the `clip` arm is a
|
|
30989
|
+
* DELEGATION to the `videoclips` transport that vendor already has (D597 /
|
|
30990
|
+
* D616 / D617). The onboard half of this collection is a PROJECTION of
|
|
30991
|
+
* `videoclips` for coverage and a delegation to it for bytes.
|
|
30992
|
+
*/
|
|
30993
|
+
var RecordingPlaybackSchema = discriminatedUnion("kind", [
|
|
30994
|
+
object({
|
|
30995
|
+
kind: literal("hls"),
|
|
30996
|
+
manifest: RecordingManifestSchema
|
|
30997
|
+
}),
|
|
30998
|
+
object({
|
|
30999
|
+
kind: literal("clip"),
|
|
31000
|
+
/** The `videoclips` source namespace this clip id belongs to. */
|
|
31001
|
+
source: string(),
|
|
31002
|
+
clipId: string(),
|
|
31003
|
+
/** Where this clip actually STARTS. On a `seek: 'segment'` source the
|
|
31004
|
+
* playhead lands here, not at the requested instant — the surface must be
|
|
31005
|
+
* TOLD, not left to discover it from a burned-in OSD. */
|
|
31006
|
+
startsAtMs: number()
|
|
31007
|
+
}),
|
|
31008
|
+
object({
|
|
31009
|
+
kind: literal("none"),
|
|
31010
|
+
reason: string()
|
|
31011
|
+
})
|
|
31012
|
+
]);
|
|
31013
|
+
DeviceType.Camera, method(object({ deviceId: number() }), array(RecordingSourceSchema).readonly(), {
|
|
31014
|
+
kind: "query",
|
|
31015
|
+
auth: "protected"
|
|
31016
|
+
}), method(object({
|
|
31017
|
+
deviceId: number(),
|
|
31018
|
+
/**
|
|
31019
|
+
* WHICH provider to ask — the `addonId` a {@link RecordingSourceSchema}
|
|
31020
|
+
* row carries, never a source id and never a list. **REQUIRED**, in the
|
|
31021
|
+
* schema, where the generated types make it unomittable rather than
|
|
31022
|
+
* merely discouraged (D554 amended).
|
|
31023
|
+
*
|
|
31024
|
+
* It was learned the expensive way on `videoclips.listClips`: measured
|
|
31025
|
+
* on the live hub 2026-09-20, device 592 bound to `recorder` AND
|
|
31026
|
+
* `provider-reolink`, a bare call with `limit: 3` answered SIX rows,
|
|
31027
|
+
* three from each source, merged — `device-collection-dispatch.ts`
|
|
31028
|
+
* leaves an unpinned fan-out un-narrowed, so absence buys the union the
|
|
31029
|
+
* method exists not to be. An un-narrowed `getAvailability` would do
|
|
31030
|
+
* that to a TIMELINE: our ranges and the card's clips unioned into one
|
|
31031
|
+
* bar, which is "two sources are never drawn together" broken in the
|
|
31032
|
+
* one place it matters most.
|
|
31033
|
+
*
|
|
31034
|
+
* A provider the device is not bound to is refused BY NAME (D552's
|
|
31035
|
+
* `rejectUnresolvedAddonPin`), never answered by another one.
|
|
31036
|
+
*/
|
|
31037
|
+
provider: string().min(1),
|
|
31038
|
+
fromMs: number(),
|
|
31039
|
+
toMs: number(),
|
|
31040
|
+
/**
|
|
31041
|
+
* Answer for THIS profile instead of the source's preferred one (D433).
|
|
31042
|
+
* Absent keeps the timeline's behaviour — one bar, one profile, one set
|
|
31043
|
+
* of reads. `profilesWithFootage` on the answer says what may be asked
|
|
31044
|
+
* for.
|
|
31045
|
+
*/
|
|
31046
|
+
profile: string().optional()
|
|
31047
|
+
}), RecordingAvailabilitySchema, {
|
|
31048
|
+
kind: "query",
|
|
31049
|
+
auth: "protected"
|
|
31050
|
+
}), method(object({
|
|
31051
|
+
deviceId: number(),
|
|
31052
|
+
provider: string().min(1),
|
|
31053
|
+
fromMs: number(),
|
|
31054
|
+
toMs: number(),
|
|
31055
|
+
tzOffsetMinutes: number()
|
|
31056
|
+
}), RecordingDaysSchema, {
|
|
31057
|
+
kind: "query",
|
|
31058
|
+
auth: "protected"
|
|
31059
|
+
}), method(object({
|
|
31060
|
+
deviceId: number(),
|
|
31061
|
+
provider: string().min(1),
|
|
31062
|
+
fromMs: number(),
|
|
31063
|
+
toMs: number(),
|
|
31064
|
+
profile: CamProfileSchema.optional()
|
|
31065
|
+
}), RecordingPlaybackSchema, {
|
|
31066
|
+
kind: "query",
|
|
31067
|
+
auth: "protected"
|
|
31068
|
+
}), method(object({
|
|
31069
|
+
deviceId: number(),
|
|
31070
|
+
provider: string().min(1)
|
|
31071
|
+
}), RecordingSourceOptionsSchema, {
|
|
31072
|
+
kind: "query",
|
|
31073
|
+
auth: "protected"
|
|
31074
|
+
});
|
|
31075
|
+
/**
|
|
31076
|
+
* `recording-archive` — OUR archive, and the intent that fills it.
|
|
31077
|
+
*
|
|
31078
|
+
* The system-singleton half of the 2026-09-24 cut (D625). `recording` used to
|
|
31079
|
+
* be one 33-method system singleton holding two unrelated subjects: three
|
|
31080
|
+
* per-camera READS about coverage and playback, and everything else — storage
|
|
31081
|
+
* locations, retention, relocation, rebalance, the ops log, the placement
|
|
31082
|
+
* table and the byte-plane primitives our scrub and export are built on.
|
|
31083
|
+
*
|
|
31084
|
+
* The reads became a device-scoped COLLECTION, so a camera's own card can be a
|
|
31085
|
+
* source beside ours (`recording.cap.ts`). Everything that is about OUR store,
|
|
31086
|
+
* or unimplementable by a camera, stayed here.
|
|
31087
|
+
*
|
|
31088
|
+
* ## On the name
|
|
31089
|
+
*
|
|
31090
|
+
* `recording-storage` was the obvious choice and is wrong: this cap also holds
|
|
31091
|
+
* `getDeviceConfig`/`setDeviceConfig`, which are recording INTENT — bands,
|
|
31092
|
+
* retention, the D62 switch authority — and a name that says "storage" invites
|
|
31093
|
+
* the next reader to move them out again. An archive is a thing we keep, and
|
|
31094
|
+
* what we keep it under is a policy; the name covers both halves honestly and
|
|
31095
|
+
* sits in the existing family (`recording-onboard`, `recording-export`,
|
|
31096
|
+
* `recording-signal`).
|
|
31097
|
+
*
|
|
31098
|
+
* ## What must NOT happen to it
|
|
31099
|
+
*
|
|
31100
|
+
* It stays a SINGLETON. It is registered by `recorder`, which is
|
|
31101
|
+
* `placement: 'any-node'` and runs on every recording node; the hub dispatches
|
|
31102
|
+
* to one of them. Putting the ledger, the placement table or the relocation
|
|
31103
|
+
* jobs behind a fan-out is the one genuinely dangerous move in this cut.
|
|
31104
|
+
*
|
|
31105
|
+
* `getDeviceConfig` / `setDeviceConfig` in particular are the D62 recording
|
|
31106
|
+
* authority (`CameraSwitch.authority`). If a write reached a different provider
|
|
31107
|
+
* than the read — which a collection fan-out permits — two authorities would
|
|
31108
|
+
* decide when one camera records, and the symptom (recording silently off, or
|
|
31109
|
+
* a `bands` array clobbered by a partial write) is durable and silent. Keeping
|
|
31110
|
+
* them here means the worst case during a rollout is a 412: the switch refuses
|
|
31111
|
+
* to flip and SAYS so. **Do not move them into the collection, at any point,
|
|
31112
|
+
* for any reason.**
|
|
31113
|
+
*
|
|
31114
|
+
* ## The two batch reads
|
|
31115
|
+
*
|
|
31116
|
+
* `getAvailabilityBatch` / `getDaysWithRecordingsBatch` take `deviceIds:
|
|
31117
|
+
* number[]` with no single `deviceId`, and a device-scoped mount routes
|
|
31118
|
+
* through `getProviderForDevice(deviceId)` — there is nothing for it to route
|
|
31119
|
+
* on. They stay here, and on this cap the batch is explicitly OURS: a grid has
|
|
31120
|
+
* no per-camera picker, and a caller that wants another source's coverage asks
|
|
31121
|
+
* `recording.getAvailability` per device with that source's `provider`.
|
|
31122
|
+
*/
|
|
31123
|
+
var RecordingStatusSchema = object({
|
|
31124
|
+
deviceId: number(),
|
|
31125
|
+
enabled: boolean(),
|
|
31126
|
+
/** THE derived storage mode, from the one definition
|
|
31127
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
31128
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
31129
|
+
activeMode: RecordingStorageModeSchema,
|
|
31130
|
+
nodeId: string(),
|
|
31131
|
+
storageBytes: number()
|
|
31132
|
+
});
|
|
31009
31133
|
/**
|
|
31010
31134
|
* One camera's row in a `getAvailabilityBatch` answer.
|
|
31011
31135
|
*
|
|
31012
|
-
* `ranges` is EXACTLY what `getAvailability` returns for that camera
|
|
31013
|
-
* batch collapses the transport, not the work — plus the
|
|
31014
|
-
*
|
|
31136
|
+
* `ranges` is EXACTLY what `recording.getAvailability` returns for that camera
|
|
31137
|
+
* at OUR source — the batch collapses the transport, not the work — plus the
|
|
31138
|
+
* `read` mark the singular answer now carries too (D625):
|
|
31015
31139
|
*
|
|
31016
31140
|
* - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
|
|
31017
31141
|
* no footage in the window", which is a real claim.
|
|
@@ -31043,22 +31167,6 @@ var RecordingDaysForDeviceSchema = object({
|
|
|
31043
31167
|
/** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
|
|
31044
31168
|
days: array(number()).readonly()
|
|
31045
31169
|
});
|
|
31046
|
-
var RecordingManifestSchema = object({
|
|
31047
|
-
deviceId: number(),
|
|
31048
|
-
/** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
|
|
31049
|
-
localMasterPath: string().nullable(),
|
|
31050
|
-
/** HTTP(S) URL to the master playlist on the recording node's playback server
|
|
31051
|
-
* (the PRIMARY candidate); null when no recording / server. Carries the
|
|
31052
|
-
* scoped playback token in its path. */
|
|
31053
|
-
playbackUrl: string().nullable(),
|
|
31054
|
-
/**
|
|
31055
|
-
* Candidate master-playlist URLs the client tries in order (LAN first, then
|
|
31056
|
-
* remote — Tailscale/Cloudflare if the operator configured extra hosts), each
|
|
31057
|
-
* carrying the same scoped token. `playbackUrl` is the first entry. Empty when
|
|
31058
|
-
* there is no recording / server.
|
|
31059
|
-
*/
|
|
31060
|
-
playbackEndpoints: array(string())
|
|
31061
|
-
});
|
|
31062
31170
|
/**
|
|
31063
31171
|
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
31064
31172
|
* across every profile and every resolvable location on this node.
|
|
@@ -31317,34 +31425,12 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
31317
31425
|
segmentEndMs: number()
|
|
31318
31426
|
})]);
|
|
31319
31427
|
method(object({
|
|
31320
|
-
deviceId: number(),
|
|
31321
|
-
fromMs: number(),
|
|
31322
|
-
toMs: number(),
|
|
31323
|
-
/**
|
|
31324
|
-
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
31325
|
-
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
31326
|
-
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
31327
|
-
* for.
|
|
31328
|
-
*/
|
|
31329
|
-
profile: string().optional()
|
|
31330
|
-
}), RecordingAvailabilitySchema, {
|
|
31331
|
-
kind: "query",
|
|
31332
|
-
auth: "protected"
|
|
31333
|
-
}), method(object({
|
|
31334
31428
|
deviceIds: array(number()).min(1).max(200),
|
|
31335
31429
|
fromMs: number(),
|
|
31336
31430
|
toMs: number()
|
|
31337
31431
|
}), array(RecordingAvailabilityForDeviceSchema).readonly(), {
|
|
31338
31432
|
kind: "query",
|
|
31339
31433
|
auth: "protected"
|
|
31340
|
-
}), method(object({
|
|
31341
|
-
deviceId: number(),
|
|
31342
|
-
fromMs: number(),
|
|
31343
|
-
toMs: number(),
|
|
31344
|
-
tzOffsetMinutes: number()
|
|
31345
|
-
}), RecordingDaysSchema, {
|
|
31346
|
-
kind: "query",
|
|
31347
|
-
auth: "protected"
|
|
31348
31434
|
}), method(object({
|
|
31349
31435
|
deviceIds: array(number()).min(1).max(200),
|
|
31350
31436
|
fromMs: number(),
|
|
@@ -31353,13 +31439,6 @@ method(object({
|
|
|
31353
31439
|
}), array(RecordingDaysForDeviceSchema).readonly(), {
|
|
31354
31440
|
kind: "query",
|
|
31355
31441
|
auth: "protected"
|
|
31356
|
-
}), method(object({
|
|
31357
|
-
deviceId: number(),
|
|
31358
|
-
fromMs: number(),
|
|
31359
|
-
toMs: number()
|
|
31360
|
-
}), RecordingManifestSchema, {
|
|
31361
|
-
kind: "query",
|
|
31362
|
-
auth: "protected"
|
|
31363
31442
|
}), method(object({}), RecordingStorageUsageSchema, {
|
|
31364
31443
|
kind: "query",
|
|
31365
31444
|
auth: "admin"
|
|
@@ -31807,6 +31886,307 @@ method(object({
|
|
|
31807
31886
|
auth: "protected"
|
|
31808
31887
|
});
|
|
31809
31888
|
/**
|
|
31889
|
+
* Vendor-neutral **onboard** recording + storage cap — what the CAMERA
|
|
31890
|
+
* writes to the CAMERA's own card, on the camera's own schedule.
|
|
31891
|
+
*
|
|
31892
|
+
* This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
|
|
31893
|
+
* footage ledger, our storage locations, our retention. This one has a
|
|
31894
|
+
* different authority — the camera's firmware — and per D62 it stores
|
|
31895
|
+
* nothing of its own. Every value here is read from the camera and every
|
|
31896
|
+
* write goes back to the camera; there is no CamStack-side mirror that
|
|
31897
|
+
* could disagree with the device.
|
|
31898
|
+
*
|
|
31899
|
+
* ## One shape, two firmwares
|
|
31900
|
+
*
|
|
31901
|
+
* Measured 2026-09-22 against the live fleet:
|
|
31902
|
+
*
|
|
31903
|
+
* | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
|
|
31904
|
+
* | --- | --- | --- |
|
|
31905
|
+
* | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
|
|
31906
|
+
* | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
|
|
31907
|
+
* | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
|
|
31908
|
+
* | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
|
|
31909
|
+
* | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
|
|
31910
|
+
* | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
|
|
31911
|
+
* | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
|
|
31912
|
+
* | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
|
|
31913
|
+
*
|
|
31914
|
+
* The two schedule models look different and are the same thing in
|
|
31915
|
+
* different coordinates: both answer "for this trigger, during which
|
|
31916
|
+
* weekly windows does the camera record". {@link RecordWindow} is that
|
|
31917
|
+
* question in one shape — Hikvision's ranges map straight onto it,
|
|
31918
|
+
* Reolink's mask expands into hour-aligned windows.
|
|
31919
|
+
*
|
|
31920
|
+
* ## Union, not intersection
|
|
31921
|
+
*
|
|
31922
|
+
* **The same fields exist on every camera.** What differs per device is
|
|
31923
|
+
* which VALUES that device accepts, and that is what {@link
|
|
31924
|
+
* RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
|
|
31925
|
+
* per field plus the schedule's own limits. A control a camera cannot
|
|
31926
|
+
* honour is rendered DISABLED WITH ITS REASON, never missing and never
|
|
31927
|
+
* dead: disabled must not look like broken.
|
|
31928
|
+
*
|
|
31929
|
+
* ## Refusal by name
|
|
31930
|
+
*
|
|
31931
|
+
* A write a camera cannot honour is refused with a sentence the operator
|
|
31932
|
+
* can read — never accepted and dropped. Both providers refuse through
|
|
31933
|
+
* {@link describeOnboardRefusal}, so the vocabulary is one function and
|
|
31934
|
+
* one test, not two hand-written vendor opinions.
|
|
31935
|
+
*
|
|
31936
|
+
* Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
|
|
31937
|
+
* `getOptions` advertises per-camera availability, `getStatus` (auto-
|
|
31938
|
+
* injected from `status`) reports the live values, and a single
|
|
31939
|
+
* `setSettings` mutation applies a partial change. No hand-written
|
|
31940
|
+
* settings-contribution methods.
|
|
31941
|
+
*/
|
|
31942
|
+
/**
|
|
31943
|
+
* What makes the camera start recording during a window.
|
|
31944
|
+
*
|
|
31945
|
+
* The union of both vendors' vocabularies. `continuous` is Hikvision's
|
|
31946
|
+
* `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
|
|
31947
|
+
* object-class triggers are Reolink-only today and the smart-event ones
|
|
31948
|
+
* (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
|
|
31949
|
+
* firmwares measured — a camera that cannot record on a trigger simply
|
|
31950
|
+
* does not list it in `options.schedule.triggers`, and a window naming
|
|
31951
|
+
* it is REFUSED, not dropped.
|
|
31952
|
+
*/
|
|
31953
|
+
var RecordTriggerSchema = _enum([
|
|
31954
|
+
"continuous",
|
|
31955
|
+
"motion",
|
|
31956
|
+
"person",
|
|
31957
|
+
"vehicle",
|
|
31958
|
+
"animal",
|
|
31959
|
+
"lineCrossing",
|
|
31960
|
+
"intrusion",
|
|
31961
|
+
"loitering",
|
|
31962
|
+
"alarmInput"
|
|
31963
|
+
]);
|
|
31964
|
+
/**
|
|
31965
|
+
* One weekly recording window: "on `day`, from `startMinute` to
|
|
31966
|
+
* `endMinute`, record on `trigger`".
|
|
31967
|
+
*
|
|
31968
|
+
* `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
|
|
31969
|
+
* both firmwares enumerate). Minutes are local camera time since
|
|
31970
|
+
* midnight; `endMinute` may be 1440, meaning end of day — that is
|
|
31971
|
+
* Hikvision's literal `24:00` and Reolink's 24th mask slot, and
|
|
31972
|
+
* collapsing it to 0 would turn a whole-day window into an empty one.
|
|
31973
|
+
*/
|
|
31974
|
+
var RecordWindowSchema = object({
|
|
31975
|
+
trigger: RecordTriggerSchema,
|
|
31976
|
+
day: number().int().min(0).max(6),
|
|
31977
|
+
startMinute: number().int().min(0).max(1439),
|
|
31978
|
+
endMinute: number().int().min(1).max(1440)
|
|
31979
|
+
});
|
|
31980
|
+
/** Status of one physical volume, as the camera itself describes it. */
|
|
31981
|
+
var OnboardStorageVolumeSchema = object({
|
|
31982
|
+
/** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
|
|
31983
|
+
id: string(),
|
|
31984
|
+
/** The camera's own name for it, when it gives one (`hddName`). */
|
|
31985
|
+
label: string().optional(),
|
|
31986
|
+
status: _enum([
|
|
31987
|
+
"ok",
|
|
31988
|
+
"unformatted",
|
|
31989
|
+
"error",
|
|
31990
|
+
"offline",
|
|
31991
|
+
"unknown"
|
|
31992
|
+
]),
|
|
31993
|
+
/**
|
|
31994
|
+
* Total size in MB, or **null when the camera did not say**.
|
|
31995
|
+
*
|
|
31996
|
+
* Never 0 for an unreadable value: a measurement that failed is not a
|
|
31997
|
+
* measurement (D393), and a card whose size is unknown must not be
|
|
31998
|
+
* rendered as a card of size zero.
|
|
31999
|
+
*/
|
|
32000
|
+
capacityMb: number().nullable(),
|
|
32001
|
+
/**
|
|
32002
|
+
* Free space in MB, or null when unknown.
|
|
32003
|
+
*
|
|
32004
|
+
* **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
|
|
32005
|
+
* 1439 both report exactly 11776 MB free — the fixed reserve a looping
|
|
32006
|
+
* card converges on once it has wrapped. At loop steady state the
|
|
32007
|
+
* number is identical whether the camera recorded yesterday or stopped
|
|
32008
|
+
* a month ago.
|
|
32009
|
+
*/
|
|
32010
|
+
freeMb: number().nullable(),
|
|
32011
|
+
/** True when the camera reports the volume writable (`property` RW). */
|
|
32012
|
+
writable: boolean().optional()
|
|
32013
|
+
});
|
|
32014
|
+
object({
|
|
32015
|
+
storage: discriminatedUnion("kind", [
|
|
32016
|
+
object({
|
|
32017
|
+
kind: literal("present"),
|
|
32018
|
+
volumes: array(OnboardStorageVolumeSchema)
|
|
32019
|
+
}),
|
|
32020
|
+
object({
|
|
32021
|
+
kind: literal("absent"),
|
|
32022
|
+
reason: string()
|
|
32023
|
+
}),
|
|
32024
|
+
object({
|
|
32025
|
+
kind: literal("unknown"),
|
|
32026
|
+
reason: string()
|
|
32027
|
+
})
|
|
32028
|
+
]),
|
|
32029
|
+
tracks: array(object({
|
|
32030
|
+
id: string(),
|
|
32031
|
+
enabled: boolean(),
|
|
32032
|
+
isVideo: boolean(),
|
|
32033
|
+
/** From the camera's own track description. Null when it does not say. */
|
|
32034
|
+
codec: string().nullable(),
|
|
32035
|
+
resolution: string().nullable(),
|
|
32036
|
+
/** Per-track overwrite flag, where the firmware keeps it per track. */
|
|
32037
|
+
overwriteWhenFull: boolean().nullable()
|
|
32038
|
+
})),
|
|
32039
|
+
/**
|
|
32040
|
+
* The track the write path targets — the enabled VIDEO one. Null when
|
|
32041
|
+
* no track could be identified, which is itself a refusal reason.
|
|
32042
|
+
*/
|
|
32043
|
+
primaryTrackId: string().nullable(),
|
|
32044
|
+
/** Master "record to the card at all" switch. */
|
|
32045
|
+
enabled: boolean().nullable(),
|
|
32046
|
+
overwriteWhenFull: boolean().nullable(),
|
|
32047
|
+
preRecordSec: number().nullable(),
|
|
32048
|
+
postRecordSec: number().nullable(),
|
|
32049
|
+
/** Length of one recorded file, in minutes. */
|
|
32050
|
+
segmentMinutes: number().nullable(),
|
|
32051
|
+
/** The primary track's weekly windows, flattened. */
|
|
32052
|
+
windows: array(RecordWindowSchema),
|
|
32053
|
+
/**
|
|
32054
|
+
* How many windows the camera described that CamStack could NOT read —
|
|
32055
|
+
* an unrecognised trigger, an unparseable clock, a weekday it does not
|
|
32056
|
+
* name.
|
|
32057
|
+
*
|
|
32058
|
+
* A dropped window is work the reader threw away, and a schedule that
|
|
32059
|
+
* silently shows fewer rows than the camera holds is how an operator
|
|
32060
|
+
* saves back a schedule shorter than the one they were looking at
|
|
32061
|
+
* (D391). Non-zero means the window list is INCOMPLETE and a write
|
|
32062
|
+
* that replaces it would delete what was not shown — which is why a
|
|
32063
|
+
* provider reporting a non-zero count also reports the schedule as not
|
|
32064
|
+
* writable.
|
|
32065
|
+
*/
|
|
32066
|
+
unreadableWindows: number(),
|
|
32067
|
+
/**
|
|
32068
|
+
* The camera is scheduled to record and has NO usable storage.
|
|
32069
|
+
*
|
|
32070
|
+
* A first-class fact because it is the fleet's most common silent
|
|
32071
|
+
* defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
|
|
32072
|
+
* to a card that is not there. Neither the schedule nor the storage
|
|
32073
|
+
* read says anything wrong on its own; only the pair does.
|
|
32074
|
+
*/
|
|
32075
|
+
recordingToNowhere: boolean(),
|
|
32076
|
+
lastFetchedAt: number()
|
|
32077
|
+
});
|
|
32078
|
+
/** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
|
|
32079
|
+
var RangeSchema = object({
|
|
32080
|
+
min: number(),
|
|
32081
|
+
max: number(),
|
|
32082
|
+
step: number()
|
|
32083
|
+
});
|
|
32084
|
+
/**
|
|
32085
|
+
* The values a camera actually takes for a numeric field, when they are a SET
|
|
32086
|
+
* rather than a range.
|
|
32087
|
+
*
|
|
32088
|
+
* `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
|
|
32089
|
+
* (I91DN) on 2026-09-22 by writing each value and reading it back:
|
|
32090
|
+
*
|
|
32091
|
+
* - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
|
|
32092
|
+
* camera's "no limit" — `-1` and `4294967295` both land on it);
|
|
32093
|
+
* - post-record: `5, 10, 30, 60, 120, 300, 600`.
|
|
32094
|
+
*
|
|
32095
|
+
* Neither is expressible as a step: the first has a sentinel two billion away
|
|
32096
|
+
* from its neighbours, the second doubles and then jumps. A range that tried
|
|
32097
|
+
* would forbid values the camera takes AND permit values it silently replaces
|
|
32098
|
+
* with 5 — wrong in both directions at once.
|
|
32099
|
+
*
|
|
32100
|
+
* `sentinel` names the member that is not a duration, so a surface can render
|
|
32101
|
+
* "no limit" instead of `2147483647` seconds.
|
|
32102
|
+
*/
|
|
32103
|
+
var AllowedValuesSchema = object({
|
|
32104
|
+
values: array(number()).min(1),
|
|
32105
|
+
sentinel: object({
|
|
32106
|
+
value: number(),
|
|
32107
|
+
meaning: _enum(["no-limit", "disabled"])
|
|
32108
|
+
}).optional()
|
|
32109
|
+
});
|
|
32110
|
+
/**
|
|
32111
|
+
* Per-field availability on ONE camera.
|
|
32112
|
+
*
|
|
32113
|
+
* The field exists on every camera — this says whether this one can be
|
|
32114
|
+
* read and whether it can be written, and `reason` says why not when
|
|
32115
|
+
* either is false. The UI renders the control DISABLED with the reason
|
|
32116
|
+
* rather than hiding it, so a limitation is legible instead of looking
|
|
32117
|
+
* like a missing feature.
|
|
32118
|
+
*/
|
|
32119
|
+
var OnboardFieldSupportSchema = object({
|
|
32120
|
+
readable: boolean(),
|
|
32121
|
+
writable: boolean(),
|
|
32122
|
+
/** Required whenever `readable` or `writable` is false. */
|
|
32123
|
+
reason: string().optional()
|
|
32124
|
+
});
|
|
32125
|
+
/** What this camera's schedule model can express. */
|
|
32126
|
+
var OnboardScheduleSupportSchema = object({
|
|
32127
|
+
support: OnboardFieldSupportSchema,
|
|
32128
|
+
/**
|
|
32129
|
+
* The smallest time step the camera can express, in minutes.
|
|
32130
|
+
*
|
|
32131
|
+
* Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
|
|
32132
|
+
* 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
|
|
32133
|
+
* window whose edges are not a multiple of this is REFUSED rather than
|
|
32134
|
+
* quietly rounded — rounding is how an operator's 06:30 becomes 06:00
|
|
32135
|
+
* and nothing says so.
|
|
32136
|
+
*/
|
|
32137
|
+
granularityMinutes: number(),
|
|
32138
|
+
/** Triggers this camera can record on. A window naming another is refused. */
|
|
32139
|
+
triggers: array(RecordTriggerSchema),
|
|
32140
|
+
/**
|
|
32141
|
+
* False when the camera stores ONE trigger per time range, so two
|
|
32142
|
+
* windows overlapping on the same day cannot carry different triggers.
|
|
32143
|
+
* True on Reolink, whose mask is per-trigger and independent.
|
|
32144
|
+
*/
|
|
32145
|
+
supportsOverlappingTriggers: boolean()
|
|
32146
|
+
});
|
|
32147
|
+
var RecordingOnboardOptionsSchema = object({
|
|
32148
|
+
enabled: OnboardFieldSupportSchema,
|
|
32149
|
+
overwriteWhenFull: OnboardFieldSupportSchema,
|
|
32150
|
+
preRecordSec: OnboardFieldSupportSchema,
|
|
32151
|
+
preRecordSecRange: RangeSchema.optional(),
|
|
32152
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
32153
|
+
preRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
32154
|
+
postRecordSec: OnboardFieldSupportSchema,
|
|
32155
|
+
postRecordSecRange: RangeSchema.optional(),
|
|
32156
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
32157
|
+
postRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
32158
|
+
segmentMinutes: OnboardFieldSupportSchema,
|
|
32159
|
+
segmentMinutesRange: RangeSchema.optional(),
|
|
32160
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
32161
|
+
segmentMinutesAllowed: AllowedValuesSchema.optional(),
|
|
32162
|
+
schedule: OnboardScheduleSupportSchema
|
|
32163
|
+
});
|
|
32164
|
+
/**
|
|
32165
|
+
* A partial change. Every field optional.
|
|
32166
|
+
*
|
|
32167
|
+
* Unlike the other `deviceConfig` caps, a provider here does **NOT**
|
|
32168
|
+
* silently ignore a field it cannot support — it refuses, by name,
|
|
32169
|
+
* through {@link describeOnboardRefusal}. Silence on a recording setting
|
|
32170
|
+
* is the failure D62 exists to prevent: the operator believes the camera
|
|
32171
|
+
* is recording the way the form says, and it is not.
|
|
32172
|
+
*/
|
|
32173
|
+
var RecordingOnboardPatchSchema = object({
|
|
32174
|
+
enabled: boolean().optional(),
|
|
32175
|
+
overwriteWhenFull: boolean().optional(),
|
|
32176
|
+
preRecordSec: number().optional(),
|
|
32177
|
+
postRecordSec: number().optional(),
|
|
32178
|
+
segmentMinutes: number().optional(),
|
|
32179
|
+
/** The complete new window set for the primary track — not a delta. */
|
|
32180
|
+
windows: array(RecordWindowSchema).optional()
|
|
32181
|
+
});
|
|
32182
|
+
DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
|
|
32183
|
+
deviceId: number(),
|
|
32184
|
+
settings: RecordingOnboardPatchSchema
|
|
32185
|
+
}), _void(), {
|
|
32186
|
+
kind: "mutation",
|
|
32187
|
+
auth: "admin"
|
|
32188
|
+
});
|
|
32189
|
+
/**
|
|
31810
32190
|
* A camera's own "record me NOW" LEVEL — a signal the device raises while
|
|
31811
32191
|
* something it knows about is happening (a robot vacuum cleaning, a machine
|
|
31812
32192
|
* running, a gate open) and lowers when it stops.
|
|
@@ -37100,24 +37480,6 @@ Object.freeze({
|
|
|
37100
37480
|
addonId: null,
|
|
37101
37481
|
access: "view"
|
|
37102
37482
|
},
|
|
37103
|
-
"events.getEventClipUrl": {
|
|
37104
|
-
capName: "events",
|
|
37105
|
-
capScope: "device",
|
|
37106
|
-
addonId: null,
|
|
37107
|
-
access: "view"
|
|
37108
|
-
},
|
|
37109
|
-
"events.getEvents": {
|
|
37110
|
-
capName: "events",
|
|
37111
|
-
capScope: "device",
|
|
37112
|
-
addonId: null,
|
|
37113
|
-
access: "view"
|
|
37114
|
-
},
|
|
37115
|
-
"events.getEventThumbnail": {
|
|
37116
|
-
capName: "events",
|
|
37117
|
-
capScope: "device",
|
|
37118
|
-
addonId: null,
|
|
37119
|
-
access: "view"
|
|
37120
|
-
},
|
|
37121
37483
|
"faceGallery.assignFace": {
|
|
37122
37484
|
capName: "face-gallery",
|
|
37123
37485
|
capScope: "system",
|
|
@@ -38438,6 +38800,12 @@ Object.freeze({
|
|
|
38438
38800
|
addonId: null,
|
|
38439
38801
|
access: "view"
|
|
38440
38802
|
},
|
|
38803
|
+
"notificationRules.getTemplateCatalog": {
|
|
38804
|
+
capName: "notification-rules",
|
|
38805
|
+
capScope: "system",
|
|
38806
|
+
addonId: null,
|
|
38807
|
+
access: "view"
|
|
38808
|
+
},
|
|
38441
38809
|
"notificationRules.listDeviceMutes": {
|
|
38442
38810
|
capName: "notification-rules",
|
|
38443
38811
|
capScope: "system",
|
|
@@ -38456,6 +38824,12 @@ Object.freeze({
|
|
|
38456
38824
|
addonId: null,
|
|
38457
38825
|
access: "view"
|
|
38458
38826
|
},
|
|
38827
|
+
"notificationRules.previewTemplate": {
|
|
38828
|
+
capName: "notification-rules",
|
|
38829
|
+
capScope: "system",
|
|
38830
|
+
addonId: null,
|
|
38831
|
+
access: "view"
|
|
38832
|
+
},
|
|
38459
38833
|
"notificationRules.resolveArtifactUrl": {
|
|
38460
38834
|
capName: "notification-rules",
|
|
38461
38835
|
capScope: "system",
|
|
@@ -39992,224 +40366,236 @@ Object.freeze({
|
|
|
39992
40366
|
addonId: null,
|
|
39993
40367
|
access: "create"
|
|
39994
40368
|
},
|
|
39995
|
-
"recording.
|
|
40369
|
+
"recording.getAvailability": {
|
|
39996
40370
|
capName: "recording",
|
|
39997
|
-
capScope: "
|
|
40371
|
+
capScope: "device",
|
|
39998
40372
|
addonId: null,
|
|
39999
|
-
access: "
|
|
40373
|
+
access: "view"
|
|
40000
40374
|
},
|
|
40001
|
-
"recording.
|
|
40375
|
+
"recording.getDaysWithRecordings": {
|
|
40002
40376
|
capName: "recording",
|
|
40003
|
-
capScope: "
|
|
40377
|
+
capScope: "device",
|
|
40004
40378
|
addonId: null,
|
|
40005
|
-
access: "
|
|
40379
|
+
access: "view"
|
|
40006
40380
|
},
|
|
40007
|
-
"recording.
|
|
40381
|
+
"recording.getPlayback": {
|
|
40008
40382
|
capName: "recording",
|
|
40009
|
-
capScope: "
|
|
40383
|
+
capScope: "device",
|
|
40010
40384
|
addonId: null,
|
|
40011
|
-
access: "
|
|
40385
|
+
access: "view"
|
|
40012
40386
|
},
|
|
40013
|
-
"recording.
|
|
40387
|
+
"recording.getPlaybackOptions": {
|
|
40014
40388
|
capName: "recording",
|
|
40015
|
-
capScope: "
|
|
40389
|
+
capScope: "device",
|
|
40016
40390
|
addonId: null,
|
|
40017
|
-
access: "
|
|
40391
|
+
access: "view"
|
|
40018
40392
|
},
|
|
40019
|
-
"recording.
|
|
40393
|
+
"recording.listSources": {
|
|
40020
40394
|
capName: "recording",
|
|
40021
|
-
capScope: "
|
|
40395
|
+
capScope: "device",
|
|
40022
40396
|
addonId: null,
|
|
40023
40397
|
access: "view"
|
|
40024
40398
|
},
|
|
40025
|
-
"
|
|
40026
|
-
capName: "recording",
|
|
40399
|
+
"recordingArchive.applyDeviceSettingsPatch": {
|
|
40400
|
+
capName: "recording-archive",
|
|
40027
40401
|
capScope: "system",
|
|
40028
40402
|
addonId: null,
|
|
40029
|
-
access: "
|
|
40403
|
+
access: "create"
|
|
40030
40404
|
},
|
|
40031
|
-
"
|
|
40032
|
-
capName: "recording",
|
|
40405
|
+
"recordingArchive.cancelRelocateJob": {
|
|
40406
|
+
capName: "recording-archive",
|
|
40033
40407
|
capScope: "system",
|
|
40034
40408
|
addonId: null,
|
|
40035
|
-
access: "
|
|
40409
|
+
access: "create"
|
|
40036
40410
|
},
|
|
40037
|
-
"
|
|
40038
|
-
capName: "recording",
|
|
40411
|
+
"recordingArchive.cancelStorageMigrationMove": {
|
|
40412
|
+
capName: "recording-archive",
|
|
40413
|
+
capScope: "system",
|
|
40414
|
+
addonId: null,
|
|
40415
|
+
access: "create"
|
|
40416
|
+
},
|
|
40417
|
+
"recordingArchive.deleteFootprint": {
|
|
40418
|
+
capName: "recording-archive",
|
|
40419
|
+
capScope: "system",
|
|
40420
|
+
addonId: null,
|
|
40421
|
+
access: "delete"
|
|
40422
|
+
},
|
|
40423
|
+
"recordingArchive.getAvailabilityBatch": {
|
|
40424
|
+
capName: "recording-archive",
|
|
40039
40425
|
capScope: "system",
|
|
40040
40426
|
addonId: null,
|
|
40041
40427
|
access: "view"
|
|
40042
40428
|
},
|
|
40043
|
-
"
|
|
40044
|
-
capName: "recording",
|
|
40429
|
+
"recordingArchive.getDaysWithRecordingsBatch": {
|
|
40430
|
+
capName: "recording-archive",
|
|
40045
40431
|
capScope: "system",
|
|
40046
40432
|
addonId: null,
|
|
40047
40433
|
access: "view"
|
|
40048
40434
|
},
|
|
40049
|
-
"
|
|
40050
|
-
capName: "recording",
|
|
40435
|
+
"recordingArchive.getDeviceConfig": {
|
|
40436
|
+
capName: "recording-archive",
|
|
40051
40437
|
capScope: "system",
|
|
40052
40438
|
addonId: null,
|
|
40053
40439
|
access: "view"
|
|
40054
40440
|
},
|
|
40055
|
-
"
|
|
40056
|
-
capName: "recording",
|
|
40441
|
+
"recordingArchive.getDeviceLiveContribution": {
|
|
40442
|
+
capName: "recording-archive",
|
|
40057
40443
|
capScope: "system",
|
|
40058
40444
|
addonId: null,
|
|
40059
40445
|
access: "view"
|
|
40060
40446
|
},
|
|
40061
|
-
"
|
|
40062
|
-
capName: "recording",
|
|
40447
|
+
"recordingArchive.getDeviceSettingsContribution": {
|
|
40448
|
+
capName: "recording-archive",
|
|
40063
40449
|
capScope: "system",
|
|
40064
40450
|
addonId: null,
|
|
40065
40451
|
access: "view"
|
|
40066
40452
|
},
|
|
40067
|
-
"
|
|
40068
|
-
capName: "recording",
|
|
40453
|
+
"recordingArchive.getPlacement": {
|
|
40454
|
+
capName: "recording-archive",
|
|
40069
40455
|
capScope: "system",
|
|
40070
40456
|
addonId: null,
|
|
40071
40457
|
access: "view"
|
|
40072
40458
|
},
|
|
40073
|
-
"
|
|
40074
|
-
capName: "recording",
|
|
40459
|
+
"recordingArchive.getRelocateResidue": {
|
|
40460
|
+
capName: "recording-archive",
|
|
40075
40461
|
capScope: "system",
|
|
40076
40462
|
addonId: null,
|
|
40077
40463
|
access: "view"
|
|
40078
40464
|
},
|
|
40079
|
-
"
|
|
40080
|
-
capName: "recording",
|
|
40465
|
+
"recordingArchive.getStatus": {
|
|
40466
|
+
capName: "recording-archive",
|
|
40081
40467
|
capScope: "system",
|
|
40082
40468
|
addonId: null,
|
|
40083
40469
|
access: "view"
|
|
40084
40470
|
},
|
|
40085
|
-
"
|
|
40086
|
-
capName: "recording",
|
|
40471
|
+
"recordingArchive.getStorageMigrationMoveStatus": {
|
|
40472
|
+
capName: "recording-archive",
|
|
40087
40473
|
capScope: "system",
|
|
40088
40474
|
addonId: null,
|
|
40089
40475
|
access: "view"
|
|
40090
40476
|
},
|
|
40091
|
-
"
|
|
40092
|
-
capName: "recording",
|
|
40477
|
+
"recordingArchive.getStorageUsage": {
|
|
40478
|
+
capName: "recording-archive",
|
|
40093
40479
|
capScope: "system",
|
|
40094
40480
|
addonId: null,
|
|
40095
40481
|
access: "view"
|
|
40096
40482
|
},
|
|
40097
|
-
"
|
|
40098
|
-
capName: "recording",
|
|
40483
|
+
"recordingArchive.listOpsLog": {
|
|
40484
|
+
capName: "recording-archive",
|
|
40099
40485
|
capScope: "system",
|
|
40100
40486
|
addonId: null,
|
|
40101
40487
|
access: "view"
|
|
40102
40488
|
},
|
|
40103
|
-
"
|
|
40104
|
-
capName: "recording",
|
|
40489
|
+
"recordingArchive.listRelocateJobs": {
|
|
40490
|
+
capName: "recording-archive",
|
|
40105
40491
|
capScope: "system",
|
|
40106
40492
|
addonId: null,
|
|
40107
40493
|
access: "view"
|
|
40108
40494
|
},
|
|
40109
|
-
"
|
|
40110
|
-
capName: "recording",
|
|
40495
|
+
"recordingArchive.locateSegment": {
|
|
40496
|
+
capName: "recording-archive",
|
|
40111
40497
|
capScope: "system",
|
|
40112
40498
|
addonId: null,
|
|
40113
40499
|
access: "view"
|
|
40114
40500
|
},
|
|
40115
|
-
"
|
|
40116
|
-
capName: "recording",
|
|
40501
|
+
"recordingArchive.pauseForStorageMigration": {
|
|
40502
|
+
capName: "recording-archive",
|
|
40117
40503
|
capScope: "system",
|
|
40118
40504
|
addonId: null,
|
|
40119
40505
|
access: "create"
|
|
40120
40506
|
},
|
|
40121
|
-
"
|
|
40122
|
-
capName: "recording",
|
|
40507
|
+
"recordingArchive.planStorageRebalance": {
|
|
40508
|
+
capName: "recording-archive",
|
|
40123
40509
|
capScope: "system",
|
|
40124
40510
|
addonId: null,
|
|
40125
40511
|
access: "view"
|
|
40126
40512
|
},
|
|
40127
|
-
"
|
|
40128
|
-
capName: "recording",
|
|
40513
|
+
"recordingArchive.pruneFootage": {
|
|
40514
|
+
capName: "recording-archive",
|
|
40129
40515
|
capScope: "system",
|
|
40130
40516
|
addonId: null,
|
|
40131
40517
|
access: "create"
|
|
40132
40518
|
},
|
|
40133
|
-
"
|
|
40134
|
-
capName: "recording",
|
|
40519
|
+
"recordingArchive.readGopBytes": {
|
|
40520
|
+
capName: "recording-archive",
|
|
40135
40521
|
capScope: "system",
|
|
40136
40522
|
addonId: null,
|
|
40137
40523
|
access: "view"
|
|
40138
40524
|
},
|
|
40139
|
-
"
|
|
40140
|
-
capName: "recording",
|
|
40525
|
+
"recordingArchive.readSegmentBytes": {
|
|
40526
|
+
capName: "recording-archive",
|
|
40141
40527
|
capScope: "system",
|
|
40142
40528
|
addonId: null,
|
|
40143
40529
|
access: "view"
|
|
40144
40530
|
},
|
|
40145
|
-
"
|
|
40146
|
-
capName: "recording",
|
|
40531
|
+
"recordingArchive.readWindowBytes": {
|
|
40532
|
+
capName: "recording-archive",
|
|
40147
40533
|
capScope: "system",
|
|
40148
40534
|
addonId: null,
|
|
40149
40535
|
access: "view"
|
|
40150
40536
|
},
|
|
40151
|
-
"
|
|
40152
|
-
capName: "recording",
|
|
40537
|
+
"recordingArchive.reconcileLedgerAgainstDisk": {
|
|
40538
|
+
capName: "recording-archive",
|
|
40153
40539
|
capScope: "system",
|
|
40154
40540
|
addonId: null,
|
|
40155
40541
|
access: "create"
|
|
40156
40542
|
},
|
|
40157
|
-
"
|
|
40158
|
-
capName: "recording",
|
|
40543
|
+
"recordingArchive.refreshStorageLocationsForMigration": {
|
|
40544
|
+
capName: "recording-archive",
|
|
40159
40545
|
capScope: "system",
|
|
40160
40546
|
addonId: null,
|
|
40161
40547
|
access: "create"
|
|
40162
40548
|
},
|
|
40163
|
-
"
|
|
40164
|
-
capName: "recording",
|
|
40549
|
+
"recordingArchive.relocateFootage": {
|
|
40550
|
+
capName: "recording-archive",
|
|
40165
40551
|
capScope: "system",
|
|
40166
40552
|
addonId: null,
|
|
40167
40553
|
access: "create"
|
|
40168
40554
|
},
|
|
40169
|
-
"
|
|
40170
|
-
capName: "recording",
|
|
40555
|
+
"recordingArchive.renderClip": {
|
|
40556
|
+
capName: "recording-archive",
|
|
40171
40557
|
capScope: "system",
|
|
40172
40558
|
addonId: null,
|
|
40173
40559
|
access: "create"
|
|
40174
40560
|
},
|
|
40175
|
-
"
|
|
40176
|
-
capName: "recording",
|
|
40561
|
+
"recordingArchive.renderGif": {
|
|
40562
|
+
capName: "recording-archive",
|
|
40177
40563
|
capScope: "system",
|
|
40178
40564
|
addonId: null,
|
|
40179
40565
|
access: "create"
|
|
40180
40566
|
},
|
|
40181
|
-
"
|
|
40182
|
-
capName: "recording",
|
|
40567
|
+
"recordingArchive.rescanStorage": {
|
|
40568
|
+
capName: "recording-archive",
|
|
40183
40569
|
capScope: "system",
|
|
40184
40570
|
addonId: null,
|
|
40185
40571
|
access: "create"
|
|
40186
40572
|
},
|
|
40187
|
-
"
|
|
40188
|
-
capName: "recording",
|
|
40573
|
+
"recordingArchive.resumeForStorageMigration": {
|
|
40574
|
+
capName: "recording-archive",
|
|
40189
40575
|
capScope: "system",
|
|
40190
40576
|
addonId: null,
|
|
40191
40577
|
access: "create"
|
|
40192
40578
|
},
|
|
40193
|
-
"
|
|
40194
|
-
capName: "recording",
|
|
40579
|
+
"recordingArchive.setDeviceConfig": {
|
|
40580
|
+
capName: "recording-archive",
|
|
40195
40581
|
capScope: "system",
|
|
40196
40582
|
addonId: null,
|
|
40197
40583
|
access: "create"
|
|
40198
40584
|
},
|
|
40199
|
-
"
|
|
40200
|
-
capName: "recording",
|
|
40585
|
+
"recordingArchive.setDevicePlacement": {
|
|
40586
|
+
capName: "recording-archive",
|
|
40201
40587
|
capScope: "system",
|
|
40202
40588
|
addonId: null,
|
|
40203
40589
|
access: "create"
|
|
40204
40590
|
},
|
|
40205
|
-
"
|
|
40206
|
-
capName: "recording",
|
|
40591
|
+
"recordingArchive.startStorageMigrationMove": {
|
|
40592
|
+
capName: "recording-archive",
|
|
40207
40593
|
capScope: "system",
|
|
40208
40594
|
addonId: null,
|
|
40209
40595
|
access: "create"
|
|
40210
40596
|
},
|
|
40211
|
-
"
|
|
40212
|
-
capName: "recording",
|
|
40597
|
+
"recordingArchive.startStorageRebalance": {
|
|
40598
|
+
capName: "recording-archive",
|
|
40213
40599
|
capScope: "system",
|
|
40214
40600
|
addonId: null,
|
|
40215
40601
|
access: "create"
|
|
@@ -42514,21 +42900,6 @@ Object.freeze({
|
|
|
42514
42900
|
form: "single",
|
|
42515
42901
|
optional: false
|
|
42516
42902
|
}],
|
|
42517
|
-
"events.getEventClipUrl": [{
|
|
42518
|
-
name: "deviceId",
|
|
42519
|
-
form: "single",
|
|
42520
|
-
optional: false
|
|
42521
|
-
}],
|
|
42522
|
-
"events.getEvents": [{
|
|
42523
|
-
name: "deviceId",
|
|
42524
|
-
form: "single",
|
|
42525
|
-
optional: false
|
|
42526
|
-
}],
|
|
42527
|
-
"events.getEventThumbnail": [{
|
|
42528
|
-
name: "deviceId",
|
|
42529
|
-
form: "single",
|
|
42530
|
-
optional: false
|
|
42531
|
-
}],
|
|
42532
42903
|
"faceGallery.getFaceByTrack": [{
|
|
42533
42904
|
name: "deviceId",
|
|
42534
42905
|
form: "single",
|
|
@@ -43447,107 +43818,117 @@ Object.freeze({
|
|
|
43447
43818
|
form: "single",
|
|
43448
43819
|
optional: false
|
|
43449
43820
|
}],
|
|
43450
|
-
"recording.
|
|
43821
|
+
"recording.getAvailability": [{
|
|
43451
43822
|
name: "deviceId",
|
|
43452
43823
|
form: "single",
|
|
43453
43824
|
optional: false
|
|
43454
43825
|
}],
|
|
43455
|
-
"recording.
|
|
43826
|
+
"recording.getDaysWithRecordings": [{
|
|
43456
43827
|
name: "deviceId",
|
|
43457
43828
|
form: "single",
|
|
43458
43829
|
optional: false
|
|
43459
43830
|
}],
|
|
43460
|
-
"recording.
|
|
43461
|
-
name: "
|
|
43462
|
-
form: "
|
|
43831
|
+
"recording.getPlayback": [{
|
|
43832
|
+
name: "deviceId",
|
|
43833
|
+
form: "single",
|
|
43463
43834
|
optional: false
|
|
43464
43835
|
}],
|
|
43465
|
-
"recording.
|
|
43836
|
+
"recording.getPlaybackOptions": [{
|
|
43466
43837
|
name: "deviceId",
|
|
43467
43838
|
form: "single",
|
|
43468
43839
|
optional: false
|
|
43469
43840
|
}],
|
|
43470
|
-
"recording.
|
|
43471
|
-
name: "
|
|
43472
|
-
form: "
|
|
43841
|
+
"recording.listSources": [{
|
|
43842
|
+
name: "deviceId",
|
|
43843
|
+
form: "single",
|
|
43473
43844
|
optional: false
|
|
43474
43845
|
}],
|
|
43475
|
-
"
|
|
43846
|
+
"recordingArchive.deleteFootprint": [{
|
|
43476
43847
|
name: "deviceId",
|
|
43477
43848
|
form: "single",
|
|
43478
43849
|
optional: false
|
|
43479
43850
|
}],
|
|
43480
|
-
"
|
|
43851
|
+
"recordingArchive.getAvailabilityBatch": [{
|
|
43852
|
+
name: "deviceIds",
|
|
43853
|
+
form: "array",
|
|
43854
|
+
optional: false
|
|
43855
|
+
}],
|
|
43856
|
+
"recordingArchive.getDaysWithRecordingsBatch": [{
|
|
43857
|
+
name: "deviceIds",
|
|
43858
|
+
form: "array",
|
|
43859
|
+
optional: false
|
|
43860
|
+
}],
|
|
43861
|
+
"recordingArchive.getDeviceConfig": [{
|
|
43481
43862
|
name: "deviceId",
|
|
43482
43863
|
form: "single",
|
|
43483
43864
|
optional: false
|
|
43484
43865
|
}],
|
|
43485
|
-
"
|
|
43866
|
+
"recordingArchive.listOpsLog": [{
|
|
43486
43867
|
name: "deviceId",
|
|
43487
43868
|
form: "single",
|
|
43488
43869
|
optional: true
|
|
43489
43870
|
}],
|
|
43490
|
-
"
|
|
43871
|
+
"recordingArchive.locateSegment": [{
|
|
43491
43872
|
name: "deviceId",
|
|
43492
43873
|
form: "single",
|
|
43493
43874
|
optional: false
|
|
43494
43875
|
}],
|
|
43495
|
-
"
|
|
43876
|
+
"recordingArchive.pruneFootage": [{
|
|
43496
43877
|
name: "deviceId",
|
|
43497
43878
|
form: "single",
|
|
43498
43879
|
optional: false
|
|
43499
43880
|
}],
|
|
43500
|
-
"
|
|
43881
|
+
"recordingArchive.readGopBytes": [{
|
|
43501
43882
|
name: "deviceId",
|
|
43502
43883
|
form: "single",
|
|
43503
43884
|
optional: false
|
|
43504
43885
|
}],
|
|
43505
|
-
"
|
|
43886
|
+
"recordingArchive.readSegmentBytes": [{
|
|
43506
43887
|
name: "deviceId",
|
|
43507
43888
|
form: "single",
|
|
43508
43889
|
optional: false
|
|
43509
43890
|
}],
|
|
43510
|
-
"
|
|
43891
|
+
"recordingArchive.readWindowBytes": [{
|
|
43511
43892
|
name: "deviceId",
|
|
43512
43893
|
form: "single",
|
|
43513
43894
|
optional: false
|
|
43514
43895
|
}],
|
|
43515
|
-
"
|
|
43896
|
+
"recordingArchive.reconcileLedgerAgainstDisk": [{
|
|
43516
43897
|
name: "deviceId",
|
|
43517
43898
|
form: "single",
|
|
43518
43899
|
optional: true
|
|
43519
43900
|
}],
|
|
43520
|
-
"
|
|
43901
|
+
"recordingArchive.relocateFootage": [{
|
|
43521
43902
|
name: "deviceId",
|
|
43522
43903
|
form: "single",
|
|
43523
43904
|
optional: true
|
|
43524
43905
|
}],
|
|
43525
|
-
"
|
|
43906
|
+
"recordingArchive.renderClip": [{
|
|
43526
43907
|
name: "deviceId",
|
|
43527
43908
|
form: "single",
|
|
43528
43909
|
optional: false
|
|
43529
43910
|
}],
|
|
43530
|
-
"
|
|
43911
|
+
"recordingArchive.renderGif": [{
|
|
43531
43912
|
name: "deviceId",
|
|
43532
43913
|
form: "single",
|
|
43533
43914
|
optional: false
|
|
43534
43915
|
}],
|
|
43535
|
-
"
|
|
43916
|
+
"recordingArchive.rescanStorage": [{
|
|
43536
43917
|
name: "deviceId",
|
|
43537
43918
|
form: "single",
|
|
43538
43919
|
optional: false
|
|
43539
43920
|
}],
|
|
43540
|
-
"
|
|
43921
|
+
"recordingArchive.setDeviceConfig": [{
|
|
43541
43922
|
name: "deviceId",
|
|
43542
43923
|
form: "single",
|
|
43543
43924
|
optional: false
|
|
43544
43925
|
}],
|
|
43545
|
-
"
|
|
43926
|
+
"recordingArchive.setDevicePlacement": [{
|
|
43546
43927
|
name: "deviceId",
|
|
43547
43928
|
form: "single",
|
|
43548
43929
|
optional: false
|
|
43549
43930
|
}],
|
|
43550
|
-
"
|
|
43931
|
+
"recordingArchive.startStorageMigrationMove": [{
|
|
43551
43932
|
name: "deviceId",
|
|
43552
43933
|
form: "single",
|
|
43553
43934
|
optional: true
|
|
@@ -44016,6 +44397,37 @@ var NC_AUDIO_DEFAULTS = {
|
|
|
44016
44397
|
};
|
|
44017
44398
|
new Set(["devices", "classes"]);
|
|
44018
44399
|
NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
|
|
44400
|
+
var RULE_BODY_ONLY = ["body"];
|
|
44401
|
+
var RULE_TEXT = ["title", "body"];
|
|
44402
|
+
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
44403
|
+
var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
|
|
44404
|
+
var UPDATES = [
|
|
44405
|
+
"addon-update-available",
|
|
44406
|
+
"server-update-available",
|
|
44407
|
+
"wrapper-update-available"
|
|
44408
|
+
];
|
|
44409
|
+
var PACKAGE_UPDATES = ["addon-update-available", "server-update-available"];
|
|
44410
|
+
var ALARM = [
|
|
44411
|
+
"alarm-triggered",
|
|
44412
|
+
"alarm-armed",
|
|
44413
|
+
"alarm-disarmed",
|
|
44414
|
+
"alarm-arming",
|
|
44415
|
+
"alarm-arm-refused"
|
|
44416
|
+
];
|
|
44417
|
+
var COMBINED_ALARM = ["alarm-triggered"];
|
|
44418
|
+
var DEVICE_EVENTS = [
|
|
44419
|
+
"device-online",
|
|
44420
|
+
"device-offline",
|
|
44421
|
+
"device-disabled",
|
|
44422
|
+
"device-enabled",
|
|
44423
|
+
...BATTERY,
|
|
44424
|
+
...CONSUMABLE,
|
|
44425
|
+
"stream-online",
|
|
44426
|
+
"stream-offline",
|
|
44427
|
+
"detection-blind",
|
|
44428
|
+
...ALARM
|
|
44429
|
+
];
|
|
44430
|
+
[...DEVICE_EVENTS], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_BODY_ONLY], [...RULE_TEXT], [...RULE_TEXT], [...DEVICE_EVENTS], [...RULE_TEXT], [...DEVICE_EVENTS], [...RULE_TEXT], [...BATTERY, ...CONSUMABLE], [...RULE_TEXT], [...CONSUMABLE], [...RULE_TEXT], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT];
|
|
44019
44431
|
/**
|
|
44020
44432
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
44021
44433
|
*
|