@camstack/addon-agent-ui 1.2.140 → 1.2.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +1266 -854
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5361,7 +5361,7 @@ var ZodIssueCode = {
|
|
|
5361
5361
|
var ZodFirstPartyTypeKind;
|
|
5362
5362
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5363
5363
|
//#endregion
|
|
5364
|
-
//#region ../types/dist/sleep-
|
|
5364
|
+
//#region ../types/dist/sleep-pM_J7YnY.mjs
|
|
5365
5365
|
/**
|
|
5366
5366
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5367
5367
|
* window to float samples (D455).
|
|
@@ -6497,6 +6497,24 @@ function normalizeAddonInitResult(result) {
|
|
|
6497
6497
|
if (Array.isArray(result)) return { providers: result };
|
|
6498
6498
|
return result;
|
|
6499
6499
|
}
|
|
6500
|
+
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
6501
|
+
var PeerBytesTicketSchema = object({
|
|
6502
|
+
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
6503
|
+
url: string().min(1),
|
|
6504
|
+
/**
|
|
6505
|
+
* The HOST node this URL means something on — the hub or a named agent,
|
|
6506
|
+
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
6507
|
+
* refuses `cross-node` by name when they differ, without dialling.
|
|
6508
|
+
*/
|
|
6509
|
+
hostNodeId: string().min(1),
|
|
6510
|
+
expiresAtMs: number().int().nonnegative(),
|
|
6511
|
+
/**
|
|
6512
|
+
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
6513
|
+
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
6514
|
+
* must be able to tell "the producer did not say" from "the body is empty".
|
|
6515
|
+
*/
|
|
6516
|
+
declaredBytes: number().int().nonnegative().nullable()
|
|
6517
|
+
});
|
|
6500
6518
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
6501
6519
|
var CamProfileSchema = _enum([
|
|
6502
6520
|
"high",
|
|
@@ -7533,24 +7551,6 @@ object({
|
|
|
7533
7551
|
unreachable: number()
|
|
7534
7552
|
})
|
|
7535
7553
|
});
|
|
7536
|
-
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
7537
|
-
var PeerBytesTicketSchema = object({
|
|
7538
|
-
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
7539
|
-
url: string().min(1),
|
|
7540
|
-
/**
|
|
7541
|
-
* The HOST node this URL means something on — the hub or a named agent,
|
|
7542
|
-
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
7543
|
-
* refuses `cross-node` by name when they differ, without dialling.
|
|
7544
|
-
*/
|
|
7545
|
-
hostNodeId: string().min(1),
|
|
7546
|
-
expiresAtMs: number().int().nonnegative(),
|
|
7547
|
-
/**
|
|
7548
|
-
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
7549
|
-
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
7550
|
-
* must be able to tell "the producer did not say" from "the body is empty".
|
|
7551
|
-
*/
|
|
7552
|
-
declaredBytes: number().int().nonnegative().nullable()
|
|
7553
|
-
});
|
|
7554
7554
|
/**
|
|
7555
7555
|
* Adoption job — the background form of `device-adoption.adopt`.
|
|
7556
7556
|
*
|
|
@@ -7662,7 +7662,7 @@ var AdoptionJobSchema = object({
|
|
|
7662
7662
|
* component's original options — detection to the detection-pipeline wrapper
|
|
7663
7663
|
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7664
7664
|
* (which was always first-class; the switch was a veneer over
|
|
7665
|
-
* `
|
|
7665
|
+
* `recordingArchive.setDeviceConfig`), notifications to a notification-center
|
|
7666
7666
|
* per-device setting, the two camera planes to their own components.
|
|
7667
7667
|
*
|
|
7668
7668
|
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
@@ -7688,7 +7688,7 @@ var AdoptionJobSchema = object({
|
|
|
7688
7688
|
* | `stream-broker` | `deviceManager.setDisabled` | `StreamBrokerManager.reconcileAllCatalogs` releases the brokers; `ensureBroker` refuses re-creation |
|
|
7689
7689
|
* | `object-detection` | `deviceManager.setWrapperActive('detection-pipeline')` | `PipelineSettingsStore.resolvePipelineForDevice` returns `{ steps: [], audio: null }` |
|
|
7690
7690
|
* | `audio-analysis` | `deviceManager.setWrapperActive('audio-analysis')` | `AudioSubscriptionController.subscribeAudioStream` returns `null` before opening the stream |
|
|
7691
|
-
* | `recording` | `
|
|
7691
|
+
* | `recording` | `recordingArchive.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
|
|
7692
7692
|
* | `notifications` | `notificationRules.setDeviceMuted` | `NotificationCenter.evaluateAndEnqueue` returns before any rule is evaluated |
|
|
7693
7693
|
* | `privacy-mask` | `privacyMask.setMask({ enabled })` → the CAMERA | the camera blanks the masked regions itself; every stream and recording carries the black boxes |
|
|
7694
7694
|
* | `device-audio` | `privacyMask.setAudioEnabled` → the CAMERA | the camera stops encoding an audio track at all; every consumer sees silent video |
|
|
@@ -11586,58 +11586,6 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11586
11586
|
auth: "admin"
|
|
11587
11587
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11588
11588
|
DeviceType.Camera;
|
|
11589
|
-
/**
|
|
11590
|
-
* The signals a device can emit to WAKE its own stream.
|
|
11591
|
-
*
|
|
11592
|
-
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11593
|
-
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11594
|
-
* puller holds a session open for ever, and treating that as demand would keep
|
|
11595
|
-
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11596
|
-
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11597
|
-
* itself, with no stream running.
|
|
11598
|
-
*
|
|
11599
|
-
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11600
|
-
*
|
|
11601
|
-
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11602
|
-
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11603
|
-
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11604
|
-
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11605
|
-
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11606
|
-
*
|
|
11607
|
-
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11608
|
-
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11609
|
-
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11610
|
-
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11611
|
-
* different question from "what may wake a sleeping stream". A camera can do
|
|
11612
|
-
* the first and not be trusted with the second, and the operator picks per
|
|
11613
|
-
* camera. Two questions, two authorities.
|
|
11614
|
-
*
|
|
11615
|
-
* ## Availability is not permission
|
|
11616
|
-
*
|
|
11617
|
-
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11618
|
-
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11619
|
-
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11620
|
-
* provider declaring a signal is not a provider enabling it.
|
|
11621
|
-
*/
|
|
11622
|
-
/** One signal a device can emit. */
|
|
11623
|
-
var StreamSignalSchema = object({
|
|
11624
|
-
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11625
|
-
code: string().min(1),
|
|
11626
|
-
/** What an operator reads in the picker. The provider's own wording. */
|
|
11627
|
-
label: string().min(1),
|
|
11628
|
-
/**
|
|
11629
|
-
* Whether the provider recommends this signal ON when a camera is first set
|
|
11630
|
-
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11631
|
-
* operator should not have to discover that by trial. Reolink recommends
|
|
11632
|
-
* both of its own.
|
|
11633
|
-
*/
|
|
11634
|
-
recommended: boolean()
|
|
11635
|
-
});
|
|
11636
|
-
object({
|
|
11637
|
-
signals: array(StreamSignalSchema),
|
|
11638
|
-
lastFetchedAt: number()
|
|
11639
|
-
});
|
|
11640
|
-
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11641
11589
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11642
11590
|
var StreamFormatSchema = _enum([
|
|
11643
11591
|
"webrtc",
|
|
@@ -13001,6 +12949,97 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
|
|
|
13001
12949
|
});
|
|
13002
12950
|
DeviceType.Camera;
|
|
13003
12951
|
/**
|
|
12952
|
+
* device-admin-link — "this device has a management page of its own, and here
|
|
12953
|
+
* is its address".
|
|
12954
|
+
*
|
|
12955
|
+
* ## Why this is not a `deviceConfig` cap
|
|
12956
|
+
*
|
|
12957
|
+
* There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
|
|
12958
|
+
* can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
|
|
12959
|
+
* patch back through a setter; it costs a `builderId` reducer in
|
|
12960
|
+
* `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
|
|
12961
|
+
* renders a form section. This cap answers ONE question with ONE read and
|
|
12962
|
+
* renders a button. Nothing about it is a form, so it carries no `deviceConfig`
|
|
12963
|
+
* block, no `settings`, no `runtimeState` and no reducer — exactly like
|
|
12964
|
+
* `reboot`, the other pure-RPC device-native cap.
|
|
12965
|
+
*
|
|
12966
|
+
* ## Absent, and the difference between "no page" and "we cannot say"
|
|
12967
|
+
*
|
|
12968
|
+
* The two are answered at DIFFERENT layers, on purpose:
|
|
12969
|
+
*
|
|
12970
|
+
* - **"We cannot say"** → the provider never registers the cap for that
|
|
12971
|
+
* device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
|
|
12972
|
+
* fan are reached only through a vendor cloud; there is no address to hand
|
|
12973
|
+
* out and no page to open. A Tuya plug, a Wyze camera and a Gree air
|
|
12974
|
+
* conditioner DO have a LAN IP, and still have no HTTP management page
|
|
12975
|
+
* behind it. None of them register, so `deviceManager.getBindings` never
|
|
12976
|
+
* lists the cap and no surface asks.
|
|
12977
|
+
* - **"This device has no page, and I know that"** → the provider registers
|
|
12978
|
+
* and `getAdminLink` returns `null`. This is the answer for a device whose
|
|
12979
|
+
* sibling DOES have a page: a Reolink battery camera reached over UDP by
|
|
12980
|
+
* `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
|
|
12981
|
+
* transport, a Home Assistant broker authenticated by supervisor token
|
|
12982
|
+
* (which carries no `baseUrl` at all).
|
|
12983
|
+
*
|
|
12984
|
+
* Both draw NOTHING. A button that opens a browser error is worse than no
|
|
12985
|
+
* button, and D62 is the same rule from the other side: an off switch is
|
|
12986
|
+
* reported off, never made to look broken. There is no third state where the
|
|
12987
|
+
* UI renders a disabled button "because the device might have a page".
|
|
12988
|
+
*
|
|
12989
|
+
* ## The URL never carries credentials
|
|
12990
|
+
*
|
|
12991
|
+
* Not in userinfo, not in a query string. Every provider builds through
|
|
12992
|
+
* `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
|
|
12993
|
+
* scheme and path as separate arguments — there is no parameter a secret could
|
|
12994
|
+
* arrive in — and re-checks its own output for the `scheme://user:pass@` shape
|
|
12995
|
+
* that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
|
|
12996
|
+
* output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
|
|
12997
|
+
* keeps providers from hand-rolling one anyway.
|
|
12998
|
+
*
|
|
12999
|
+
* This matters here more than anywhere else in the repo, because every provider
|
|
13000
|
+
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
13001
|
+
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
13002
|
+
* and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
|
|
13003
|
+
* camera's own page will ask for its own login. That is correct, and pre-
|
|
13004
|
+
* filling it is the operator's business, not ours.
|
|
13005
|
+
*
|
|
13006
|
+
* ## It is a LAN fact
|
|
13007
|
+
*
|
|
13008
|
+
* The URL addresses the device where the NODE can see it. It is not proxied,
|
|
13009
|
+
* not made reachable from outside, and not sent anywhere. A surface renders it
|
|
13010
|
+
* as a link the operator's own browser follows, on the operator's own network,
|
|
13011
|
+
* or renders nothing.
|
|
13012
|
+
*/
|
|
13013
|
+
/**
|
|
13014
|
+
* Whose page is it. The distinction is for the OPERATOR, who needs to know
|
|
13015
|
+
* before clicking whether he is about to land on a camera's own web server or
|
|
13016
|
+
* inside Home Assistant.
|
|
13017
|
+
*/
|
|
13018
|
+
var AdminLinkTargetEnum = _enum(["device", "integration"]);
|
|
13019
|
+
var DeviceAdminLinkSchema = object({
|
|
13020
|
+
/**
|
|
13021
|
+
* Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
|
|
13022
|
+
* free of userinfo and of any credential-shaped query key.
|
|
13023
|
+
*/
|
|
13024
|
+
url: string(),
|
|
13025
|
+
/**
|
|
13026
|
+
* What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
|
|
13027
|
+
* The PROVIDER names it, because only the provider knows what the page is;
|
|
13028
|
+
* a UI that invented the label from the addon id would call the Home
|
|
13029
|
+
* Assistant device page "Provider Homeassistant".
|
|
13030
|
+
*/
|
|
13031
|
+
label: string(),
|
|
13032
|
+
target: AdminLinkTargetEnum,
|
|
13033
|
+
/**
|
|
13034
|
+
* Host the URL points at, without scheme, port or path — for the tooltip, so
|
|
13035
|
+
* an operator can see WHERE the button goes before he follows it. Redundant
|
|
13036
|
+
* with `url` by construction; carried separately so no surface has to parse
|
|
13037
|
+
* a URL to show it.
|
|
13038
|
+
*/
|
|
13039
|
+
host: string()
|
|
13040
|
+
});
|
|
13041
|
+
method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
|
|
13042
|
+
/**
|
|
13004
13043
|
* Identity envelope for a device's upstream-system metadata.
|
|
13005
13044
|
*
|
|
13006
13045
|
* Two jobs:
|
|
@@ -13328,97 +13367,6 @@ method(object({ integrationId: string() }), object({ filters: array(AdoptionFilt
|
|
|
13328
13367
|
auth: "admin"
|
|
13329
13368
|
});
|
|
13330
13369
|
/**
|
|
13331
|
-
* device-admin-link — "this device has a management page of its own, and here
|
|
13332
|
-
* is its address".
|
|
13333
|
-
*
|
|
13334
|
-
* ## Why this is not a `deviceConfig` cap
|
|
13335
|
-
*
|
|
13336
|
-
* There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
|
|
13337
|
-
* can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
|
|
13338
|
-
* patch back through a setter; it costs a `builderId` reducer in
|
|
13339
|
-
* `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
|
|
13340
|
-
* renders a form section. This cap answers ONE question with ONE read and
|
|
13341
|
-
* renders a button. Nothing about it is a form, so it carries no `deviceConfig`
|
|
13342
|
-
* block, no `settings`, no `runtimeState` and no reducer — exactly like
|
|
13343
|
-
* `reboot`, the other pure-RPC device-native cap.
|
|
13344
|
-
*
|
|
13345
|
-
* ## Absent, and the difference between "no page" and "we cannot say"
|
|
13346
|
-
*
|
|
13347
|
-
* The two are answered at DIFFERENT layers, on purpose:
|
|
13348
|
-
*
|
|
13349
|
-
* - **"We cannot say"** → the provider never registers the cap for that
|
|
13350
|
-
* device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
|
|
13351
|
-
* fan are reached only through a vendor cloud; there is no address to hand
|
|
13352
|
-
* out and no page to open. A Tuya plug, a Wyze camera and a Gree air
|
|
13353
|
-
* conditioner DO have a LAN IP, and still have no HTTP management page
|
|
13354
|
-
* behind it. None of them register, so `deviceManager.getBindings` never
|
|
13355
|
-
* lists the cap and no surface asks.
|
|
13356
|
-
* - **"This device has no page, and I know that"** → the provider registers
|
|
13357
|
-
* and `getAdminLink` returns `null`. This is the answer for a device whose
|
|
13358
|
-
* sibling DOES have a page: a Reolink battery camera reached over UDP by
|
|
13359
|
-
* `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
|
|
13360
|
-
* transport, a Home Assistant broker authenticated by supervisor token
|
|
13361
|
-
* (which carries no `baseUrl` at all).
|
|
13362
|
-
*
|
|
13363
|
-
* Both draw NOTHING. A button that opens a browser error is worse than no
|
|
13364
|
-
* button, and D62 is the same rule from the other side: an off switch is
|
|
13365
|
-
* reported off, never made to look broken. There is no third state where the
|
|
13366
|
-
* UI renders a disabled button "because the device might have a page".
|
|
13367
|
-
*
|
|
13368
|
-
* ## The URL never carries credentials
|
|
13369
|
-
*
|
|
13370
|
-
* Not in userinfo, not in a query string. Every provider builds through
|
|
13371
|
-
* `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
|
|
13372
|
-
* scheme and path as separate arguments — there is no parameter a secret could
|
|
13373
|
-
* arrive in — and re-checks its own output for the `scheme://user:pass@` shape
|
|
13374
|
-
* that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
|
|
13375
|
-
* output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
|
|
13376
|
-
* keeps providers from hand-rolling one anyway.
|
|
13377
|
-
*
|
|
13378
|
-
* This matters here more than anywhere else in the repo, because every provider
|
|
13379
|
-
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
13380
|
-
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
13381
|
-
* and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
|
|
13382
|
-
* camera's own page will ask for its own login. That is correct, and pre-
|
|
13383
|
-
* filling it is the operator's business, not ours.
|
|
13384
|
-
*
|
|
13385
|
-
* ## It is a LAN fact
|
|
13386
|
-
*
|
|
13387
|
-
* The URL addresses the device where the NODE can see it. It is not proxied,
|
|
13388
|
-
* not made reachable from outside, and not sent anywhere. A surface renders it
|
|
13389
|
-
* as a link the operator's own browser follows, on the operator's own network,
|
|
13390
|
-
* or renders nothing.
|
|
13391
|
-
*/
|
|
13392
|
-
/**
|
|
13393
|
-
* Whose page is it. The distinction is for the OPERATOR, who needs to know
|
|
13394
|
-
* before clicking whether he is about to land on a camera's own web server or
|
|
13395
|
-
* inside Home Assistant.
|
|
13396
|
-
*/
|
|
13397
|
-
var AdminLinkTargetEnum = _enum(["device", "integration"]);
|
|
13398
|
-
var DeviceAdminLinkSchema = object({
|
|
13399
|
-
/**
|
|
13400
|
-
* Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
|
|
13401
|
-
* free of userinfo and of any credential-shaped query key.
|
|
13402
|
-
*/
|
|
13403
|
-
url: string(),
|
|
13404
|
-
/**
|
|
13405
|
-
* What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
|
|
13406
|
-
* The PROVIDER names it, because only the provider knows what the page is;
|
|
13407
|
-
* a UI that invented the label from the addon id would call the Home
|
|
13408
|
-
* Assistant device page "Provider Homeassistant".
|
|
13409
|
-
*/
|
|
13410
|
-
label: string(),
|
|
13411
|
-
target: AdminLinkTargetEnum,
|
|
13412
|
-
/**
|
|
13413
|
-
* Host the URL points at, without scheme, port or path — for the tooltip, so
|
|
13414
|
-
* an operator can see WHERE the button goes before he follows it. Redundant
|
|
13415
|
-
* with `url` by construction; carried separately so no surface has to parse
|
|
13416
|
-
* a URL to show it.
|
|
13417
|
-
*/
|
|
13418
|
-
host: string()
|
|
13419
|
-
});
|
|
13420
|
-
method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
|
|
13421
|
-
/**
|
|
13422
13370
|
* `device-export` — collection cap for addons that export camstack
|
|
13423
13371
|
* devices to external ecosystems (HomeAssistant via MQTT discovery,
|
|
13424
13372
|
* HomeKit/HAP, Alexa Smart Home, …).
|
|
@@ -16605,6 +16553,7 @@ sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
|
|
|
16605
16553
|
sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
|
|
16606
16554
|
sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
|
|
16607
16555
|
sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
|
|
16556
|
+
sub("cover", "control", "control", "#0ea5e9", "door", "Cover");
|
|
16608
16557
|
sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
|
|
16609
16558
|
sub("siren", "control", "control", "#dc2626", "siren", "Siren");
|
|
16610
16559
|
sub("button", "control", "control", "#10b981", "button", "Button");
|
|
@@ -16885,6 +16834,10 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16885
16834
|
"alarm-disarmed",
|
|
16886
16835
|
"alarm-arming",
|
|
16887
16836
|
"alarm-arm-refused",
|
|
16837
|
+
"alarm-pending",
|
|
16838
|
+
"alarm-rearmed",
|
|
16839
|
+
"alarm-sensor-bypass",
|
|
16840
|
+
"alarm-check-failed",
|
|
16888
16841
|
"addon-updated",
|
|
16889
16842
|
"server-updated",
|
|
16890
16843
|
"export-completed",
|
|
@@ -17480,6 +17433,19 @@ var NcMediaFrameSchema = _enum([
|
|
|
17480
17433
|
"full",
|
|
17481
17434
|
"boxed"
|
|
17482
17435
|
]);
|
|
17436
|
+
/**
|
|
17437
|
+
* How a SENSOR notification shows the cameras that link the sensor.
|
|
17438
|
+
*
|
|
17439
|
+
* `mosaic` — one image composed of every linked camera's photograph, taken at
|
|
17440
|
+
* the trigger. `each` — one image per camera where the target takes several
|
|
17441
|
+
* attachments; a target that takes one keeps the first camera's (the degrade
|
|
17442
|
+
* engine drops the rest by order). Either way ONE notification per event.
|
|
17443
|
+
* Absent = `mosaic`, applied by the Notification Center and deliberately NOT
|
|
17444
|
+
* a Zod default (see NcRulePatchSchema: a default materialises on every
|
|
17445
|
+
* partial patch). Meaningless for a rule whose subject is not a sensor, and a
|
|
17446
|
+
* sensor linked to one camera ships that camera's plain snapshot either way.
|
|
17447
|
+
*/
|
|
17448
|
+
var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
|
|
17483
17449
|
var NcMediaPolicySchema = object({
|
|
17484
17450
|
attach: _enum([
|
|
17485
17451
|
"best",
|
|
@@ -17525,7 +17491,9 @@ var NcMediaPolicySchema = object({
|
|
|
17525
17491
|
* A profile that is not assigned falls back to the cheapest, and the render
|
|
17526
17492
|
* reports which one actually ran.
|
|
17527
17493
|
*/
|
|
17528
|
-
profile: CamProfileSchema.optional()
|
|
17494
|
+
profile: CamProfileSchema.optional(),
|
|
17495
|
+
/** See {@link NcLinkedCameraModeSchema}. */
|
|
17496
|
+
linkedCameras: NcLinkedCameraModeSchema.optional()
|
|
17529
17497
|
});
|
|
17530
17498
|
/**
|
|
17531
17499
|
* Cooldown GRANULARITY over the subject's class — how much a fired
|
|
@@ -17645,7 +17613,7 @@ var NcRuleInputSchema = object({
|
|
|
17645
17613
|
cooldownSec: 60,
|
|
17646
17614
|
scope: "rule-device"
|
|
17647
17615
|
}),
|
|
17648
|
-
/** `{{var}}`
|
|
17616
|
+
/** `{{var}}` title/body. The variables are declared in `NC_TEMPLATE_VARS` (@camstack/types) and depend on the rule kind — see `templateVarsFor`. */
|
|
17649
17617
|
template: object({
|
|
17650
17618
|
title: string().max(500).optional(),
|
|
17651
17619
|
body: string().max(2e3).optional()
|
|
@@ -17825,6 +17793,22 @@ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
|
17825
17793
|
throttle: NcThrottleSchema.optional(),
|
|
17826
17794
|
priority: number().int().min(1).max(5).optional()
|
|
17827
17795
|
});
|
|
17796
|
+
var NcRuleClearableKeySchema = _enum([
|
|
17797
|
+
"template",
|
|
17798
|
+
"schedule",
|
|
17799
|
+
"targetUsers",
|
|
17800
|
+
"snoozeOptions",
|
|
17801
|
+
"snoozeAllowGlobal",
|
|
17802
|
+
"waitForEnhancement",
|
|
17803
|
+
"actions",
|
|
17804
|
+
"confirm",
|
|
17805
|
+
"groupIdleSec"
|
|
17806
|
+
]);
|
|
17807
|
+
var NcRuleUpdateInputSchema = object({
|
|
17808
|
+
ruleId: string(),
|
|
17809
|
+
patch: NcRulePatchSchema,
|
|
17810
|
+
clear: array(NcRuleClearableKeySchema).optional()
|
|
17811
|
+
});
|
|
17828
17812
|
/** A persisted rule. */
|
|
17829
17813
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
17830
17814
|
id: string(),
|
|
@@ -17856,6 +17840,85 @@ var NcTestResultSchema = object({
|
|
|
17856
17840
|
className: string().optional(),
|
|
17857
17841
|
label: string().optional()
|
|
17858
17842
|
});
|
|
17843
|
+
/** The five rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts`
|
|
17844
|
+
* is the same union; the template-vars spec pins the two together. */
|
|
17845
|
+
var NcRuleKindSchema = _enum([
|
|
17846
|
+
"detection",
|
|
17847
|
+
"sensor",
|
|
17848
|
+
"occupancy",
|
|
17849
|
+
"sound",
|
|
17850
|
+
"system"
|
|
17851
|
+
]);
|
|
17852
|
+
/** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
|
|
17853
|
+
var NcTemplateFamilySchema = _enum([
|
|
17854
|
+
"rule",
|
|
17855
|
+
"timelapse",
|
|
17856
|
+
"summary"
|
|
17857
|
+
]);
|
|
17858
|
+
/** Which text field of that producer. `previewText` is the timelapse frame
|
|
17859
|
+
* caption, `captionText` the digest mosaic caption — both see fewer vars. */
|
|
17860
|
+
var NcTemplateFieldSchema = _enum([
|
|
17861
|
+
"title",
|
|
17862
|
+
"body",
|
|
17863
|
+
"previewText",
|
|
17864
|
+
"captionText"
|
|
17865
|
+
]);
|
|
17866
|
+
var NcTemplateVarGroupSchema = _enum([
|
|
17867
|
+
"subject",
|
|
17868
|
+
"place",
|
|
17869
|
+
"time",
|
|
17870
|
+
"rule",
|
|
17871
|
+
"occupancy",
|
|
17872
|
+
"sound",
|
|
17873
|
+
"sensor",
|
|
17874
|
+
"system",
|
|
17875
|
+
"digest",
|
|
17876
|
+
"ai"
|
|
17877
|
+
]);
|
|
17878
|
+
/**
|
|
17879
|
+
* ONE `{{var}}` a notification template may name.
|
|
17880
|
+
*
|
|
17881
|
+
* `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
|
|
17882
|
+
* it has a value; absent = no restriction on that axis. `systemEventKinds` is
|
|
17883
|
+
* read only for a `system` rule. `dynamic` declares a FAMILY of names
|
|
17884
|
+
* (`count_<class>`): the descriptor's `name` is the example member.
|
|
17885
|
+
*/
|
|
17886
|
+
var NcTemplateVarDescriptorSchema = object({
|
|
17887
|
+
name: string().regex(/^\w+$/),
|
|
17888
|
+
label: string(),
|
|
17889
|
+
description: string().optional(),
|
|
17890
|
+
example: string(),
|
|
17891
|
+
group: NcTemplateVarGroupSchema,
|
|
17892
|
+
families: array(NcTemplateFamilySchema).min(1),
|
|
17893
|
+
fields: array(NcTemplateFieldSchema).optional(),
|
|
17894
|
+
kinds: array(NcRuleKindSchema).optional(),
|
|
17895
|
+
deliveries: array(NcDeliverySchema).optional(),
|
|
17896
|
+
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
17897
|
+
dynamic: object({
|
|
17898
|
+
prefix: literal("count_"),
|
|
17899
|
+
from: literal("classes")
|
|
17900
|
+
}).optional()
|
|
17901
|
+
});
|
|
17902
|
+
/** Input to `previewTemplate` — the editor's own context, plus the draft text. */
|
|
17903
|
+
var NcTemplatePreviewInputSchema = object({
|
|
17904
|
+
context: object({
|
|
17905
|
+
family: NcTemplateFamilySchema,
|
|
17906
|
+
field: NcTemplateFieldSchema,
|
|
17907
|
+
kind: NcRuleKindSchema.optional(),
|
|
17908
|
+
delivery: NcDeliverySchema.optional(),
|
|
17909
|
+
systemEventKinds: array(NcSystemEventKindSchema).optional()
|
|
17910
|
+
}),
|
|
17911
|
+
template: object({
|
|
17912
|
+
title: string().max(500).optional(),
|
|
17913
|
+
body: string().max(2e3).optional()
|
|
17914
|
+
})
|
|
17915
|
+
});
|
|
17916
|
+
var NcTemplatePreviewSchema = object({
|
|
17917
|
+
title: string().nullable(),
|
|
17918
|
+
body: string().nullable(),
|
|
17919
|
+
/** Names the template uses that this context never fills — they render empty. */
|
|
17920
|
+
unknown: array(string())
|
|
17921
|
+
});
|
|
17859
17922
|
var NcConditionDescriptorSchema = object({
|
|
17860
17923
|
/** Field id inside `NcConditions` (or `'schedule'` for the rule-level group). */
|
|
17861
17924
|
id: string(),
|
|
@@ -18121,8 +18184,17 @@ object({
|
|
|
18121
18184
|
lastAt: number()
|
|
18122
18185
|
});
|
|
18123
18186
|
/**
|
|
18124
|
-
* The
|
|
18125
|
-
*
|
|
18187
|
+
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
18188
|
+
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
18189
|
+
* at the boundary rather than interpreted.
|
|
18190
|
+
*/
|
|
18191
|
+
var NcAlarmNonBlockingListSchema = array(object({
|
|
18192
|
+
mode: AlarmArmModeSchema,
|
|
18193
|
+
deviceIds: array(number().int()).max(200)
|
|
18194
|
+
})).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
|
|
18195
|
+
/**
|
|
18196
|
+
* The three durations the panel's state machine runs on, who hears about its
|
|
18197
|
+
* transitions, and which openings each mode tolerates.
|
|
18126
18198
|
*
|
|
18127
18199
|
* They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
|
|
18128
18200
|
* `alarm-panel` is `deviceNative` and its other provider mirrors somebody
|
|
@@ -18141,21 +18213,39 @@ var NcAlarmSettingsSchema = object({
|
|
|
18141
18213
|
* existed, and therefore what an untouched install keeps doing.
|
|
18142
18214
|
*/
|
|
18143
18215
|
triggeredDurationSec: number().int().min(0).max(3600),
|
|
18144
|
-
/** Send a notification when a mode takes effect. */
|
|
18145
|
-
announceArm: boolean(),
|
|
18146
18216
|
/**
|
|
18147
|
-
*
|
|
18217
|
+
* Deprecated by D630 — every transition is announced. Parsed, never read;
|
|
18218
|
+
* remove after one release. Optional so an older admin's patch (which still
|
|
18219
|
+
* sends it) parses rather than failing the whole save.
|
|
18220
|
+
*/
|
|
18221
|
+
announceArm: boolean().optional(),
|
|
18222
|
+
/**
|
|
18223
|
+
* Target ids from `notification-output`: every alarm transition goes here.
|
|
18148
18224
|
*
|
|
18149
|
-
* Explicit rather than "everyone": an
|
|
18225
|
+
* Explicit rather than "everyone": an alarm announcement is a household
|
|
18150
18226
|
* message, and broadcasting it to every configured endpoint (including a
|
|
18151
18227
|
* webhook wired to something else) is not a default anybody would choose.
|
|
18152
|
-
* Empty
|
|
18153
|
-
*
|
|
18228
|
+
* Empty sends nothing, and the server logs that — silence must be
|
|
18229
|
+
* attributable.
|
|
18154
18230
|
*/
|
|
18155
|
-
announceTargets: array(string().min(1)).max(16)
|
|
18231
|
+
announceTargets: array(string().min(1)).max(16),
|
|
18232
|
+
/**
|
|
18233
|
+
* Per arm mode, the covered devices whose being OPEN does not refuse the
|
|
18234
|
+
* arm (a window left ajar for the cat under `home`, say). At most one entry
|
|
18235
|
+
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
18236
|
+
* parses as "every opening blocks" — the behaviour it was written under.
|
|
18237
|
+
*/
|
|
18238
|
+
nonBlocking: NcAlarmNonBlockingListSchema.default([])
|
|
18156
18239
|
});
|
|
18157
|
-
/**
|
|
18158
|
-
|
|
18240
|
+
/**
|
|
18241
|
+
* Every field optional — a tab edits one control at a time.
|
|
18242
|
+
*
|
|
18243
|
+
* `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
|
|
18244
|
+
* remove an inner `.default()`, so a patch that never named the field would
|
|
18245
|
+
* parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
|
|
18246
|
+
* (the same trap {@link NcRulePatchSchema} documents).
|
|
18247
|
+
*/
|
|
18248
|
+
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
|
|
18159
18249
|
/**
|
|
18160
18250
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
18161
18251
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -18200,6 +18290,36 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
18200
18290
|
*/
|
|
18201
18291
|
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
18202
18292
|
});
|
|
18293
|
+
/** One covered device that reads open, and whether that refuses the arm. */
|
|
18294
|
+
var NcAlarmOpeningSchema = object({
|
|
18295
|
+
deviceId: number().int(),
|
|
18296
|
+
name: string(),
|
|
18297
|
+
/** The device's state word as read (`open`, `unlocked`, …). */
|
|
18298
|
+
state: string(),
|
|
18299
|
+
/** False when the mode's non-blocking list names this device. */
|
|
18300
|
+
blocking: boolean()
|
|
18301
|
+
});
|
|
18302
|
+
/** A device the panel is currently ignoring, and which side of it it is on. */
|
|
18303
|
+
var NcAlarmExclusionViewSchema = object({
|
|
18304
|
+
deviceId: number().int(),
|
|
18305
|
+
name: string(),
|
|
18306
|
+
phase: _enum(["open", "closed"])
|
|
18307
|
+
});
|
|
18308
|
+
/** One mode's openings: devices read open, plus those whose state is unknown. */
|
|
18309
|
+
var NcAlarmModeOpeningsSchema = object({
|
|
18310
|
+
mode: AlarmArmModeSchema,
|
|
18311
|
+
devices: array(NcAlarmOpeningSchema),
|
|
18312
|
+
/** Covered devices whose state could not be read (D49): neither open nor closed. */
|
|
18313
|
+
unknown: array(number().int())
|
|
18314
|
+
});
|
|
18315
|
+
var NcAlarmLiveSchema = object({
|
|
18316
|
+
state: AlarmStateSchema,
|
|
18317
|
+
/** The mode being armed into (exit delay) or held; null when disarmed. */
|
|
18318
|
+
targetMode: AlarmArmModeSchema.nullable(),
|
|
18319
|
+
availableModes: array(AlarmArmModeSchema),
|
|
18320
|
+
openings: array(NcAlarmModeOpeningsSchema),
|
|
18321
|
+
exclusions: array(NcAlarmExclusionViewSchema)
|
|
18322
|
+
});
|
|
18203
18323
|
var NcAlarmConfigSchema = object({
|
|
18204
18324
|
/**
|
|
18205
18325
|
* The panel's device id, or null when this install has no panel (the ensure
|
|
@@ -18209,7 +18329,13 @@ var NcAlarmConfigSchema = object({
|
|
|
18209
18329
|
*/
|
|
18210
18330
|
deviceId: number().int().nullable(),
|
|
18211
18331
|
settings: NcAlarmSettingsSchema,
|
|
18212
|
-
coverage: array(NcAlarmModeCoverageSchema)
|
|
18332
|
+
coverage: array(NcAlarmModeCoverageSchema),
|
|
18333
|
+
/**
|
|
18334
|
+
* The panel as it is NOW — state, what each mode would find open, what is
|
|
18335
|
+
* excluded. Optional: a panel-less hub answers without it, and a client
|
|
18336
|
+
* must not read its absence as "nothing is open".
|
|
18337
|
+
*/
|
|
18338
|
+
live: NcAlarmLiveSchema.optional()
|
|
18213
18339
|
});
|
|
18214
18340
|
/**
|
|
18215
18341
|
* ONE rule's demand on ONE camera's clip ring.
|
|
@@ -18257,10 +18383,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18257
18383
|
kind: "mutation",
|
|
18258
18384
|
auth: "admin",
|
|
18259
18385
|
caller: "required"
|
|
18260
|
-
}), method(object({
|
|
18261
|
-
ruleId: string(),
|
|
18262
|
-
patch: NcRulePatchSchema
|
|
18263
|
-
}), object({ rule: NcRuleSchema }), {
|
|
18386
|
+
}), method(NcRuleUpdateInputSchema, object({ rule: NcRuleSchema }), {
|
|
18264
18387
|
kind: "mutation",
|
|
18265
18388
|
auth: "admin",
|
|
18266
18389
|
caller: "required"
|
|
@@ -18288,7 +18411,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18288
18411
|
}), method(object({}), object({
|
|
18289
18412
|
catalog: array(NcConditionDescriptorSchema),
|
|
18290
18413
|
taxonomy: NcTaxonomySchema.optional()
|
|
18291
|
-
})), method(object({
|
|
18414
|
+
})), method(object({}), object({ vars: array(NcTemplateVarDescriptorSchema) })), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
|
|
18415
|
+
kind: "mutation",
|
|
18416
|
+
access: "view"
|
|
18417
|
+
}), 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 }), {
|
|
18292
18418
|
kind: "mutation",
|
|
18293
18419
|
caller: "required"
|
|
18294
18420
|
}), method(object({ snoozeId: string() }), object({ success: literal(true) }), {
|
|
@@ -22721,6 +22847,7 @@ var CAP_TO_KIND = {
|
|
|
22721
22847
|
"enum-sensor": "enum-sensor",
|
|
22722
22848
|
"event-emitter": "device-event",
|
|
22723
22849
|
"lock-control": "lock",
|
|
22850
|
+
cover: "cover",
|
|
22724
22851
|
switch: "switch",
|
|
22725
22852
|
button: "button",
|
|
22726
22853
|
doorbell: "doorbell"
|
|
@@ -23538,6 +23665,58 @@ method(_void(), ProviderInfoSchema, { auth: "admin" }), method(object({ config:
|
|
|
23538
23665
|
kind: "mutation",
|
|
23539
23666
|
auth: "admin"
|
|
23540
23667
|
});
|
|
23668
|
+
/**
|
|
23669
|
+
* The signals a device can emit to WAKE its own stream.
|
|
23670
|
+
*
|
|
23671
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
23672
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
23673
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
23674
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
23675
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
23676
|
+
* itself, with no stream running.
|
|
23677
|
+
*
|
|
23678
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
23679
|
+
*
|
|
23680
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
23681
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
23682
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
23683
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
23684
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
23685
|
+
*
|
|
23686
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
23687
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
23688
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
23689
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
23690
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
23691
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
23692
|
+
* camera. Two questions, two authorities.
|
|
23693
|
+
*
|
|
23694
|
+
* ## Availability is not permission
|
|
23695
|
+
*
|
|
23696
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
23697
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
23698
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
23699
|
+
* provider declaring a signal is not a provider enabling it.
|
|
23700
|
+
*/
|
|
23701
|
+
/** One signal a device can emit. */
|
|
23702
|
+
var StreamSignalSchema = object({
|
|
23703
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
23704
|
+
code: string().min(1),
|
|
23705
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
23706
|
+
label: string().min(1),
|
|
23707
|
+
/**
|
|
23708
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
23709
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
23710
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
23711
|
+
* both of its own.
|
|
23712
|
+
*/
|
|
23713
|
+
recommended: boolean()
|
|
23714
|
+
});
|
|
23715
|
+
object({
|
|
23716
|
+
signals: array(StreamSignalSchema),
|
|
23717
|
+
lastFetchedAt: number()
|
|
23718
|
+
});
|
|
23719
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
23541
23720
|
/** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
|
|
23542
23721
|
var ProfileSettingsSchemaBridge = unknown().nullable();
|
|
23543
23722
|
var ProfileSettingsBagSchema = record(string(), unknown());
|
|
@@ -25820,6 +25999,143 @@ DeviceType.Camera, method(object({ deviceId: number() }), CameraCredentialsSchem
|
|
|
25820
25999
|
kind: "query",
|
|
25821
26000
|
auth: "admin"
|
|
25822
26001
|
});
|
|
26002
|
+
/**
|
|
26003
|
+
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
26004
|
+
* page.
|
|
26005
|
+
*
|
|
26006
|
+
* ## Why this is a capability and not an addon settings schema
|
|
26007
|
+
*
|
|
26008
|
+
* It was one, and it did not render. The addon declared the editor as a
|
|
26009
|
+
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
26010
|
+
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
26011
|
+
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
26012
|
+
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
26013
|
+
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
26014
|
+
* not on it "falls off silently".
|
|
26015
|
+
*
|
|
26016
|
+
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
26017
|
+
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
26018
|
+
* beside PTZ and motion zones on the camera itself. The device page is
|
|
26019
|
+
* BINDING-driven (D12), so the way in is a capability bound to the device —
|
|
26020
|
+
* and this cap carries its section the way `recording` does, by RETURNING it
|
|
26021
|
+
* from `getDeviceSettingsContribution`.
|
|
26022
|
+
*
|
|
26023
|
+
* Seven other widgets are still declared the other way, through a
|
|
26024
|
+
* `deviceConfig.ui` block the framework derives a section from. That route
|
|
26025
|
+
* gives the addon no say in where its own panel lands and no way to decline
|
|
26026
|
+
* for a device the panel does not suit, which is why this one does not use it.
|
|
26027
|
+
*
|
|
26028
|
+
* ## Why one addon may implement it
|
|
26029
|
+
*
|
|
26030
|
+
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
26031
|
+
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
26032
|
+
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
26033
|
+
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
26034
|
+
* reached only by a caller that already knew the addon id.
|
|
26035
|
+
*
|
|
26036
|
+
* ## The tab
|
|
26037
|
+
*
|
|
26038
|
+
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
26039
|
+
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
26040
|
+
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
26041
|
+
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
26042
|
+
* next to "PTZ").
|
|
26043
|
+
*/
|
|
26044
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
26045
|
+
var GridNormalizedRectSchema = object({
|
|
26046
|
+
x: number().min(0).max(1),
|
|
26047
|
+
y: number().min(0).max(1),
|
|
26048
|
+
width: number().gt(0).max(1),
|
|
26049
|
+
height: number().gt(0).max(1)
|
|
26050
|
+
});
|
|
26051
|
+
/**
|
|
26052
|
+
* One source camera, the part of its picture taken, and where that part lands.
|
|
26053
|
+
*
|
|
26054
|
+
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
26055
|
+
* — a profile switch, a firmware update, a substream that comes back different
|
|
26056
|
+
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
26057
|
+
* which is the class of bug nobody files.
|
|
26058
|
+
*/
|
|
26059
|
+
var GridLayoutCellSchema = object({
|
|
26060
|
+
deviceId: number().int().positive(),
|
|
26061
|
+
/** The part of the SOURCE taken, normalized against the source. */
|
|
26062
|
+
source: GridNormalizedRectSchema,
|
|
26063
|
+
/** Where it lands, normalized against the CANVAS. */
|
|
26064
|
+
cell: GridNormalizedRectSchema
|
|
26065
|
+
});
|
|
26066
|
+
/**
|
|
26067
|
+
* Which profiles this grid can actually compose, and why not.
|
|
26068
|
+
*
|
|
26069
|
+
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
26070
|
+
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
26071
|
+
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
26072
|
+
* low" is, and it is the one an operator can act on.
|
|
26073
|
+
*/
|
|
26074
|
+
var GridProfileOfferSchema = object({
|
|
26075
|
+
profile: _enum([
|
|
26076
|
+
"high",
|
|
26077
|
+
"mid",
|
|
26078
|
+
"low"
|
|
26079
|
+
]),
|
|
26080
|
+
offered: boolean(),
|
|
26081
|
+
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
26082
|
+
missingSources: array(number().int().positive()),
|
|
26083
|
+
/**
|
|
26084
|
+
* The canvas this profile composes onto, `WxH`, or empty when it is not
|
|
26085
|
+
* offered. DERIVED from the cells and the sources' own size at this profile —
|
|
26086
|
+
* it is reported because nothing else in the system would ever say what the
|
|
26087
|
+
* grid came out as, and because it is the number an operator would otherwise
|
|
26088
|
+
* expect to type.
|
|
26089
|
+
*/
|
|
26090
|
+
canvas: string(),
|
|
26091
|
+
/**
|
|
26092
|
+
* Whether this profile is PUBLISHED, of the ones the grid could serve.
|
|
26093
|
+
*
|
|
26094
|
+
* A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
|
|
26095
|
+
* a 4K canvas built from 4K decodes — something to opt into, not something a
|
|
26096
|
+
* viewer's adaptive should be handed by climbing to the top rung it can see.
|
|
26097
|
+
* Default is `mid` + `low`.
|
|
26098
|
+
*/
|
|
26099
|
+
published: boolean()
|
|
26100
|
+
});
|
|
26101
|
+
var GridLayoutViewSchema = object({
|
|
26102
|
+
/** The persisted grid row this camera was declared from. */
|
|
26103
|
+
instanceId: string(),
|
|
26104
|
+
deviceId: number().int().nonnegative(),
|
|
26105
|
+
name: string(),
|
|
26106
|
+
/**
|
|
26107
|
+
* NO canvas size. A grid's resolution is not authored: each profile derives
|
|
26108
|
+
* its own from the cells and its sources' dimensions. The two numbers that
|
|
26109
|
+
* used to be here were a text field that silently decided both how much the
|
|
26110
|
+
* composite cost and how sharp it was — see `profiles[].canvas` for what it
|
|
26111
|
+
* came out as.
|
|
26112
|
+
*/
|
|
26113
|
+
fps: number().int(),
|
|
26114
|
+
cells: array(GridLayoutCellSchema),
|
|
26115
|
+
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
26116
|
+
profiles: array(GridProfileOfferSchema)
|
|
26117
|
+
});
|
|
26118
|
+
var GridLayoutPatchSchema = object({
|
|
26119
|
+
deviceId: number().int().nonnegative(),
|
|
26120
|
+
name: string().min(1).max(160).optional(),
|
|
26121
|
+
fps: number().int().min(1).max(60).optional(),
|
|
26122
|
+
/** Which profiles to publish. See `GridProfileOffer.published`. */
|
|
26123
|
+
publishedProfiles: array(_enum([
|
|
26124
|
+
"high",
|
|
26125
|
+
"mid",
|
|
26126
|
+
"low"
|
|
26127
|
+
])).max(3).optional(),
|
|
26128
|
+
/**
|
|
26129
|
+
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
26130
|
+
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
26131
|
+
* for.
|
|
26132
|
+
*/
|
|
26133
|
+
cells: array(GridLayoutCellSchema).max(16)
|
|
26134
|
+
});
|
|
26135
|
+
DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
26136
|
+
kind: "mutation",
|
|
26137
|
+
auth: "admin"
|
|
26138
|
+
});
|
|
25823
26139
|
object({
|
|
25824
26140
|
detected: boolean(),
|
|
25825
26141
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -26293,307 +26609,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
|
|
|
26293
26609
|
auth: "admin"
|
|
26294
26610
|
});
|
|
26295
26611
|
/**
|
|
26296
|
-
* Vendor-neutral **onboard** recording + storage cap — what the CAMERA
|
|
26297
|
-
* writes to the CAMERA's own card, on the camera's own schedule.
|
|
26298
|
-
*
|
|
26299
|
-
* This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
|
|
26300
|
-
* footage ledger, our storage locations, our retention. This one has a
|
|
26301
|
-
* different authority — the camera's firmware — and per D62 it stores
|
|
26302
|
-
* nothing of its own. Every value here is read from the camera and every
|
|
26303
|
-
* write goes back to the camera; there is no CamStack-side mirror that
|
|
26304
|
-
* could disagree with the device.
|
|
26305
|
-
*
|
|
26306
|
-
* ## One shape, two firmwares
|
|
26307
|
-
*
|
|
26308
|
-
* Measured 2026-09-22 against the live fleet:
|
|
26309
|
-
*
|
|
26310
|
-
* | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
|
|
26311
|
-
* | --- | --- | --- |
|
|
26312
|
-
* | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
|
|
26313
|
-
* | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
|
|
26314
|
-
* | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
|
|
26315
|
-
* | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
|
|
26316
|
-
* | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
|
|
26317
|
-
* | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
|
|
26318
|
-
* | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
|
|
26319
|
-
* | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
|
|
26320
|
-
*
|
|
26321
|
-
* The two schedule models look different and are the same thing in
|
|
26322
|
-
* different coordinates: both answer "for this trigger, during which
|
|
26323
|
-
* weekly windows does the camera record". {@link RecordWindow} is that
|
|
26324
|
-
* question in one shape — Hikvision's ranges map straight onto it,
|
|
26325
|
-
* Reolink's mask expands into hour-aligned windows.
|
|
26326
|
-
*
|
|
26327
|
-
* ## Union, not intersection
|
|
26328
|
-
*
|
|
26329
|
-
* **The same fields exist on every camera.** What differs per device is
|
|
26330
|
-
* which VALUES that device accepts, and that is what {@link
|
|
26331
|
-
* RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
|
|
26332
|
-
* per field plus the schedule's own limits. A control a camera cannot
|
|
26333
|
-
* honour is rendered DISABLED WITH ITS REASON, never missing and never
|
|
26334
|
-
* dead: disabled must not look like broken.
|
|
26335
|
-
*
|
|
26336
|
-
* ## Refusal by name
|
|
26337
|
-
*
|
|
26338
|
-
* A write a camera cannot honour is refused with a sentence the operator
|
|
26339
|
-
* can read — never accepted and dropped. Both providers refuse through
|
|
26340
|
-
* {@link describeOnboardRefusal}, so the vocabulary is one function and
|
|
26341
|
-
* one test, not two hand-written vendor opinions.
|
|
26342
|
-
*
|
|
26343
|
-
* Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
|
|
26344
|
-
* `getOptions` advertises per-camera availability, `getStatus` (auto-
|
|
26345
|
-
* injected from `status`) reports the live values, and a single
|
|
26346
|
-
* `setSettings` mutation applies a partial change. No hand-written
|
|
26347
|
-
* settings-contribution methods.
|
|
26348
|
-
*/
|
|
26349
|
-
/**
|
|
26350
|
-
* What makes the camera start recording during a window.
|
|
26351
|
-
*
|
|
26352
|
-
* The union of both vendors' vocabularies. `continuous` is Hikvision's
|
|
26353
|
-
* `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
|
|
26354
|
-
* object-class triggers are Reolink-only today and the smart-event ones
|
|
26355
|
-
* (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
|
|
26356
|
-
* firmwares measured — a camera that cannot record on a trigger simply
|
|
26357
|
-
* does not list it in `options.schedule.triggers`, and a window naming
|
|
26358
|
-
* it is REFUSED, not dropped.
|
|
26359
|
-
*/
|
|
26360
|
-
var RecordTriggerSchema = _enum([
|
|
26361
|
-
"continuous",
|
|
26362
|
-
"motion",
|
|
26363
|
-
"person",
|
|
26364
|
-
"vehicle",
|
|
26365
|
-
"animal",
|
|
26366
|
-
"lineCrossing",
|
|
26367
|
-
"intrusion",
|
|
26368
|
-
"loitering",
|
|
26369
|
-
"alarmInput"
|
|
26370
|
-
]);
|
|
26371
|
-
/**
|
|
26372
|
-
* One weekly recording window: "on `day`, from `startMinute` to
|
|
26373
|
-
* `endMinute`, record on `trigger`".
|
|
26374
|
-
*
|
|
26375
|
-
* `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
|
|
26376
|
-
* both firmwares enumerate). Minutes are local camera time since
|
|
26377
|
-
* midnight; `endMinute` may be 1440, meaning end of day — that is
|
|
26378
|
-
* Hikvision's literal `24:00` and Reolink's 24th mask slot, and
|
|
26379
|
-
* collapsing it to 0 would turn a whole-day window into an empty one.
|
|
26380
|
-
*/
|
|
26381
|
-
var RecordWindowSchema = object({
|
|
26382
|
-
trigger: RecordTriggerSchema,
|
|
26383
|
-
day: number().int().min(0).max(6),
|
|
26384
|
-
startMinute: number().int().min(0).max(1439),
|
|
26385
|
-
endMinute: number().int().min(1).max(1440)
|
|
26386
|
-
});
|
|
26387
|
-
/** Status of one physical volume, as the camera itself describes it. */
|
|
26388
|
-
var OnboardStorageVolumeSchema = object({
|
|
26389
|
-
/** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
|
|
26390
|
-
id: string(),
|
|
26391
|
-
/** The camera's own name for it, when it gives one (`hddName`). */
|
|
26392
|
-
label: string().optional(),
|
|
26393
|
-
status: _enum([
|
|
26394
|
-
"ok",
|
|
26395
|
-
"unformatted",
|
|
26396
|
-
"error",
|
|
26397
|
-
"offline",
|
|
26398
|
-
"unknown"
|
|
26399
|
-
]),
|
|
26400
|
-
/**
|
|
26401
|
-
* Total size in MB, or **null when the camera did not say**.
|
|
26402
|
-
*
|
|
26403
|
-
* Never 0 for an unreadable value: a measurement that failed is not a
|
|
26404
|
-
* measurement (D393), and a card whose size is unknown must not be
|
|
26405
|
-
* rendered as a card of size zero.
|
|
26406
|
-
*/
|
|
26407
|
-
capacityMb: number().nullable(),
|
|
26408
|
-
/**
|
|
26409
|
-
* Free space in MB, or null when unknown.
|
|
26410
|
-
*
|
|
26411
|
-
* **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
|
|
26412
|
-
* 1439 both report exactly 11776 MB free — the fixed reserve a looping
|
|
26413
|
-
* card converges on once it has wrapped. At loop steady state the
|
|
26414
|
-
* number is identical whether the camera recorded yesterday or stopped
|
|
26415
|
-
* a month ago.
|
|
26416
|
-
*/
|
|
26417
|
-
freeMb: number().nullable(),
|
|
26418
|
-
/** True when the camera reports the volume writable (`property` RW). */
|
|
26419
|
-
writable: boolean().optional()
|
|
26420
|
-
});
|
|
26421
|
-
object({
|
|
26422
|
-
storage: discriminatedUnion("kind", [
|
|
26423
|
-
object({
|
|
26424
|
-
kind: literal("present"),
|
|
26425
|
-
volumes: array(OnboardStorageVolumeSchema)
|
|
26426
|
-
}),
|
|
26427
|
-
object({
|
|
26428
|
-
kind: literal("absent"),
|
|
26429
|
-
reason: string()
|
|
26430
|
-
}),
|
|
26431
|
-
object({
|
|
26432
|
-
kind: literal("unknown"),
|
|
26433
|
-
reason: string()
|
|
26434
|
-
})
|
|
26435
|
-
]),
|
|
26436
|
-
tracks: array(object({
|
|
26437
|
-
id: string(),
|
|
26438
|
-
enabled: boolean(),
|
|
26439
|
-
isVideo: boolean(),
|
|
26440
|
-
/** From the camera's own track description. Null when it does not say. */
|
|
26441
|
-
codec: string().nullable(),
|
|
26442
|
-
resolution: string().nullable(),
|
|
26443
|
-
/** Per-track overwrite flag, where the firmware keeps it per track. */
|
|
26444
|
-
overwriteWhenFull: boolean().nullable()
|
|
26445
|
-
})),
|
|
26446
|
-
/**
|
|
26447
|
-
* The track the write path targets — the enabled VIDEO one. Null when
|
|
26448
|
-
* no track could be identified, which is itself a refusal reason.
|
|
26449
|
-
*/
|
|
26450
|
-
primaryTrackId: string().nullable(),
|
|
26451
|
-
/** Master "record to the card at all" switch. */
|
|
26452
|
-
enabled: boolean().nullable(),
|
|
26453
|
-
overwriteWhenFull: boolean().nullable(),
|
|
26454
|
-
preRecordSec: number().nullable(),
|
|
26455
|
-
postRecordSec: number().nullable(),
|
|
26456
|
-
/** Length of one recorded file, in minutes. */
|
|
26457
|
-
segmentMinutes: number().nullable(),
|
|
26458
|
-
/** The primary track's weekly windows, flattened. */
|
|
26459
|
-
windows: array(RecordWindowSchema),
|
|
26460
|
-
/**
|
|
26461
|
-
* How many windows the camera described that CamStack could NOT read —
|
|
26462
|
-
* an unrecognised trigger, an unparseable clock, a weekday it does not
|
|
26463
|
-
* name.
|
|
26464
|
-
*
|
|
26465
|
-
* A dropped window is work the reader threw away, and a schedule that
|
|
26466
|
-
* silently shows fewer rows than the camera holds is how an operator
|
|
26467
|
-
* saves back a schedule shorter than the one they were looking at
|
|
26468
|
-
* (D391). Non-zero means the window list is INCOMPLETE and a write
|
|
26469
|
-
* that replaces it would delete what was not shown — which is why a
|
|
26470
|
-
* provider reporting a non-zero count also reports the schedule as not
|
|
26471
|
-
* writable.
|
|
26472
|
-
*/
|
|
26473
|
-
unreadableWindows: number(),
|
|
26474
|
-
/**
|
|
26475
|
-
* The camera is scheduled to record and has NO usable storage.
|
|
26476
|
-
*
|
|
26477
|
-
* A first-class fact because it is the fleet's most common silent
|
|
26478
|
-
* defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
|
|
26479
|
-
* to a card that is not there. Neither the schedule nor the storage
|
|
26480
|
-
* read says anything wrong on its own; only the pair does.
|
|
26481
|
-
*/
|
|
26482
|
-
recordingToNowhere: boolean(),
|
|
26483
|
-
lastFetchedAt: number()
|
|
26484
|
-
});
|
|
26485
|
-
/** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
|
|
26486
|
-
var RangeSchema = object({
|
|
26487
|
-
min: number(),
|
|
26488
|
-
max: number(),
|
|
26489
|
-
step: number()
|
|
26490
|
-
});
|
|
26491
|
-
/**
|
|
26492
|
-
* The values a camera actually takes for a numeric field, when they are a SET
|
|
26493
|
-
* rather than a range.
|
|
26494
|
-
*
|
|
26495
|
-
* `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
|
|
26496
|
-
* (I91DN) on 2026-09-22 by writing each value and reading it back:
|
|
26497
|
-
*
|
|
26498
|
-
* - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
|
|
26499
|
-
* camera's "no limit" — `-1` and `4294967295` both land on it);
|
|
26500
|
-
* - post-record: `5, 10, 30, 60, 120, 300, 600`.
|
|
26501
|
-
*
|
|
26502
|
-
* Neither is expressible as a step: the first has a sentinel two billion away
|
|
26503
|
-
* from its neighbours, the second doubles and then jumps. A range that tried
|
|
26504
|
-
* would forbid values the camera takes AND permit values it silently replaces
|
|
26505
|
-
* with 5 — wrong in both directions at once.
|
|
26506
|
-
*
|
|
26507
|
-
* `sentinel` names the member that is not a duration, so a surface can render
|
|
26508
|
-
* "no limit" instead of `2147483647` seconds.
|
|
26509
|
-
*/
|
|
26510
|
-
var AllowedValuesSchema = object({
|
|
26511
|
-
values: array(number()).min(1),
|
|
26512
|
-
sentinel: object({
|
|
26513
|
-
value: number(),
|
|
26514
|
-
meaning: _enum(["no-limit", "disabled"])
|
|
26515
|
-
}).optional()
|
|
26516
|
-
});
|
|
26517
|
-
/**
|
|
26518
|
-
* Per-field availability on ONE camera.
|
|
26519
|
-
*
|
|
26520
|
-
* The field exists on every camera — this says whether this one can be
|
|
26521
|
-
* read and whether it can be written, and `reason` says why not when
|
|
26522
|
-
* either is false. The UI renders the control DISABLED with the reason
|
|
26523
|
-
* rather than hiding it, so a limitation is legible instead of looking
|
|
26524
|
-
* like a missing feature.
|
|
26525
|
-
*/
|
|
26526
|
-
var OnboardFieldSupportSchema = object({
|
|
26527
|
-
readable: boolean(),
|
|
26528
|
-
writable: boolean(),
|
|
26529
|
-
/** Required whenever `readable` or `writable` is false. */
|
|
26530
|
-
reason: string().optional()
|
|
26531
|
-
});
|
|
26532
|
-
/** What this camera's schedule model can express. */
|
|
26533
|
-
var OnboardScheduleSupportSchema = object({
|
|
26534
|
-
support: OnboardFieldSupportSchema,
|
|
26535
|
-
/**
|
|
26536
|
-
* The smallest time step the camera can express, in minutes.
|
|
26537
|
-
*
|
|
26538
|
-
* Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
|
|
26539
|
-
* 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
|
|
26540
|
-
* window whose edges are not a multiple of this is REFUSED rather than
|
|
26541
|
-
* quietly rounded — rounding is how an operator's 06:30 becomes 06:00
|
|
26542
|
-
* and nothing says so.
|
|
26543
|
-
*/
|
|
26544
|
-
granularityMinutes: number(),
|
|
26545
|
-
/** Triggers this camera can record on. A window naming another is refused. */
|
|
26546
|
-
triggers: array(RecordTriggerSchema),
|
|
26547
|
-
/**
|
|
26548
|
-
* False when the camera stores ONE trigger per time range, so two
|
|
26549
|
-
* windows overlapping on the same day cannot carry different triggers.
|
|
26550
|
-
* True on Reolink, whose mask is per-trigger and independent.
|
|
26551
|
-
*/
|
|
26552
|
-
supportsOverlappingTriggers: boolean()
|
|
26553
|
-
});
|
|
26554
|
-
var RecordingOnboardOptionsSchema = object({
|
|
26555
|
-
enabled: OnboardFieldSupportSchema,
|
|
26556
|
-
overwriteWhenFull: OnboardFieldSupportSchema,
|
|
26557
|
-
preRecordSec: OnboardFieldSupportSchema,
|
|
26558
|
-
preRecordSecRange: RangeSchema.optional(),
|
|
26559
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
26560
|
-
preRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
26561
|
-
postRecordSec: OnboardFieldSupportSchema,
|
|
26562
|
-
postRecordSecRange: RangeSchema.optional(),
|
|
26563
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
26564
|
-
postRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
26565
|
-
segmentMinutes: OnboardFieldSupportSchema,
|
|
26566
|
-
segmentMinutesRange: RangeSchema.optional(),
|
|
26567
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
26568
|
-
segmentMinutesAllowed: AllowedValuesSchema.optional(),
|
|
26569
|
-
schedule: OnboardScheduleSupportSchema
|
|
26570
|
-
});
|
|
26571
|
-
/**
|
|
26572
|
-
* A partial change. Every field optional.
|
|
26573
|
-
*
|
|
26574
|
-
* Unlike the other `deviceConfig` caps, a provider here does **NOT**
|
|
26575
|
-
* silently ignore a field it cannot support — it refuses, by name,
|
|
26576
|
-
* through {@link describeOnboardRefusal}. Silence on a recording setting
|
|
26577
|
-
* is the failure D62 exists to prevent: the operator believes the camera
|
|
26578
|
-
* is recording the way the form says, and it is not.
|
|
26579
|
-
*/
|
|
26580
|
-
var RecordingOnboardPatchSchema = object({
|
|
26581
|
-
enabled: boolean().optional(),
|
|
26582
|
-
overwriteWhenFull: boolean().optional(),
|
|
26583
|
-
preRecordSec: number().optional(),
|
|
26584
|
-
postRecordSec: number().optional(),
|
|
26585
|
-
segmentMinutes: number().optional(),
|
|
26586
|
-
/** The complete new window set for the primary track — not a delta. */
|
|
26587
|
-
windows: array(RecordWindowSchema).optional()
|
|
26588
|
-
});
|
|
26589
|
-
DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
|
|
26590
|
-
deviceId: number(),
|
|
26591
|
-
settings: RecordingOnboardPatchSchema
|
|
26592
|
-
}), _void(), {
|
|
26593
|
-
kind: "mutation",
|
|
26594
|
-
auth: "admin"
|
|
26595
|
-
});
|
|
26596
|
-
/**
|
|
26597
26612
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
26598
26613
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
26599
26614
|
* cap-keyed slice for the basic device flags every consumer expects to
|
|
@@ -26687,30 +26702,6 @@ object({
|
|
|
26687
26702
|
eventCountSinceStart: number()
|
|
26688
26703
|
});
|
|
26689
26704
|
DeviceType.EventEmitter;
|
|
26690
|
-
var EventItemSchema = object({
|
|
26691
|
-
id: string(),
|
|
26692
|
-
type: string(),
|
|
26693
|
-
timestamp: number(),
|
|
26694
|
-
label: string().optional(),
|
|
26695
|
-
thumbnailUrl: string().optional(),
|
|
26696
|
-
clipUrl: string().optional(),
|
|
26697
|
-
metadata: record(string(), unknown()).optional()
|
|
26698
|
-
});
|
|
26699
|
-
DeviceType.Camera, method(object({
|
|
26700
|
-
deviceId: number(),
|
|
26701
|
-
from: number().optional(),
|
|
26702
|
-
to: number().optional(),
|
|
26703
|
-
limit: number().optional()
|
|
26704
|
-
}), array(EventItemSchema)), method(object({
|
|
26705
|
-
deviceId: number(),
|
|
26706
|
-
eventId: string()
|
|
26707
|
-
}), object({
|
|
26708
|
-
base64: string(),
|
|
26709
|
-
contentType: string()
|
|
26710
|
-
}).nullable()), method(object({
|
|
26711
|
-
deviceId: number(),
|
|
26712
|
-
eventId: string()
|
|
26713
|
-
}), string().nullable());
|
|
26714
26705
|
var IdentitySchema = object({
|
|
26715
26706
|
id: string(),
|
|
26716
26707
|
name: string(),
|
|
@@ -28382,143 +28373,6 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
|
|
|
28382
28373
|
lastChangedAt: number()
|
|
28383
28374
|
});
|
|
28384
28375
|
/**
|
|
28385
|
-
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
28386
|
-
* page.
|
|
28387
|
-
*
|
|
28388
|
-
* ## Why this is a capability and not an addon settings schema
|
|
28389
|
-
*
|
|
28390
|
-
* It was one, and it did not render. The addon declared the editor as a
|
|
28391
|
-
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
28392
|
-
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
28393
|
-
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
28394
|
-
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
28395
|
-
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
28396
|
-
* not on it "falls off silently".
|
|
28397
|
-
*
|
|
28398
|
-
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
28399
|
-
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
28400
|
-
* beside PTZ and motion zones on the camera itself. The device page is
|
|
28401
|
-
* BINDING-driven (D12), so the way in is a capability bound to the device —
|
|
28402
|
-
* and this cap carries its section the way `recording` does, by RETURNING it
|
|
28403
|
-
* from `getDeviceSettingsContribution`.
|
|
28404
|
-
*
|
|
28405
|
-
* Seven other widgets are still declared the other way, through a
|
|
28406
|
-
* `deviceConfig.ui` block the framework derives a section from. That route
|
|
28407
|
-
* gives the addon no say in where its own panel lands and no way to decline
|
|
28408
|
-
* for a device the panel does not suit, which is why this one does not use it.
|
|
28409
|
-
*
|
|
28410
|
-
* ## Why one addon may implement it
|
|
28411
|
-
*
|
|
28412
|
-
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
28413
|
-
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
28414
|
-
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
28415
|
-
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
28416
|
-
* reached only by a caller that already knew the addon id.
|
|
28417
|
-
*
|
|
28418
|
-
* ## The tab
|
|
28419
|
-
*
|
|
28420
|
-
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
28421
|
-
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
28422
|
-
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
28423
|
-
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
28424
|
-
* next to "PTZ").
|
|
28425
|
-
*/
|
|
28426
|
-
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
28427
|
-
var GridNormalizedRectSchema = object({
|
|
28428
|
-
x: number().min(0).max(1),
|
|
28429
|
-
y: number().min(0).max(1),
|
|
28430
|
-
width: number().gt(0).max(1),
|
|
28431
|
-
height: number().gt(0).max(1)
|
|
28432
|
-
});
|
|
28433
|
-
/**
|
|
28434
|
-
* One source camera, the part of its picture taken, and where that part lands.
|
|
28435
|
-
*
|
|
28436
|
-
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
28437
|
-
* — a profile switch, a firmware update, a substream that comes back different
|
|
28438
|
-
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
28439
|
-
* which is the class of bug nobody files.
|
|
28440
|
-
*/
|
|
28441
|
-
var GridLayoutCellSchema = object({
|
|
28442
|
-
deviceId: number().int().positive(),
|
|
28443
|
-
/** The part of the SOURCE taken, normalized against the source. */
|
|
28444
|
-
source: GridNormalizedRectSchema,
|
|
28445
|
-
/** Where it lands, normalized against the CANVAS. */
|
|
28446
|
-
cell: GridNormalizedRectSchema
|
|
28447
|
-
});
|
|
28448
|
-
/**
|
|
28449
|
-
* Which profiles this grid can actually compose, and why not.
|
|
28450
|
-
*
|
|
28451
|
-
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
28452
|
-
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
28453
|
-
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
28454
|
-
* low" is, and it is the one an operator can act on.
|
|
28455
|
-
*/
|
|
28456
|
-
var GridProfileOfferSchema = object({
|
|
28457
|
-
profile: _enum([
|
|
28458
|
-
"high",
|
|
28459
|
-
"mid",
|
|
28460
|
-
"low"
|
|
28461
|
-
]),
|
|
28462
|
-
offered: boolean(),
|
|
28463
|
-
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
28464
|
-
missingSources: array(number().int().positive()),
|
|
28465
|
-
/**
|
|
28466
|
-
* The canvas this profile composes onto, `WxH`, or empty when it is not
|
|
28467
|
-
* offered. DERIVED from the cells and the sources' own size at this profile —
|
|
28468
|
-
* it is reported because nothing else in the system would ever say what the
|
|
28469
|
-
* grid came out as, and because it is the number an operator would otherwise
|
|
28470
|
-
* expect to type.
|
|
28471
|
-
*/
|
|
28472
|
-
canvas: string(),
|
|
28473
|
-
/**
|
|
28474
|
-
* Whether this profile is PUBLISHED, of the ones the grid could serve.
|
|
28475
|
-
*
|
|
28476
|
-
* A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
|
|
28477
|
-
* a 4K canvas built from 4K decodes — something to opt into, not something a
|
|
28478
|
-
* viewer's adaptive should be handed by climbing to the top rung it can see.
|
|
28479
|
-
* Default is `mid` + `low`.
|
|
28480
|
-
*/
|
|
28481
|
-
published: boolean()
|
|
28482
|
-
});
|
|
28483
|
-
var GridLayoutViewSchema = object({
|
|
28484
|
-
/** The persisted grid row this camera was declared from. */
|
|
28485
|
-
instanceId: string(),
|
|
28486
|
-
deviceId: number().int().nonnegative(),
|
|
28487
|
-
name: string(),
|
|
28488
|
-
/**
|
|
28489
|
-
* NO canvas size. A grid's resolution is not authored: each profile derives
|
|
28490
|
-
* its own from the cells and its sources' dimensions. The two numbers that
|
|
28491
|
-
* used to be here were a text field that silently decided both how much the
|
|
28492
|
-
* composite cost and how sharp it was — see `profiles[].canvas` for what it
|
|
28493
|
-
* came out as.
|
|
28494
|
-
*/
|
|
28495
|
-
fps: number().int(),
|
|
28496
|
-
cells: array(GridLayoutCellSchema),
|
|
28497
|
-
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
28498
|
-
profiles: array(GridProfileOfferSchema)
|
|
28499
|
-
});
|
|
28500
|
-
var GridLayoutPatchSchema = object({
|
|
28501
|
-
deviceId: number().int().nonnegative(),
|
|
28502
|
-
name: string().min(1).max(160).optional(),
|
|
28503
|
-
fps: number().int().min(1).max(60).optional(),
|
|
28504
|
-
/** Which profiles to publish. See `GridProfileOffer.published`. */
|
|
28505
|
-
publishedProfiles: array(_enum([
|
|
28506
|
-
"high",
|
|
28507
|
-
"mid",
|
|
28508
|
-
"low"
|
|
28509
|
-
])).max(3).optional(),
|
|
28510
|
-
/**
|
|
28511
|
-
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
28512
|
-
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
28513
|
-
* for.
|
|
28514
|
-
*/
|
|
28515
|
-
cells: array(GridLayoutCellSchema).max(16)
|
|
28516
|
-
});
|
|
28517
|
-
DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
28518
|
-
kind: "mutation",
|
|
28519
|
-
auth: "admin"
|
|
28520
|
-
});
|
|
28521
|
-
/**
|
|
28522
28376
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
28523
28377
|
* on-camera motion-detection mask is a single `grid` region (a row-major
|
|
28524
28378
|
* boolean cell lattice the camera's onboard VMD evaluates). Composing it as
|
|
@@ -30330,37 +30184,37 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
30330
30184
|
kind: "mutation",
|
|
30331
30185
|
auth: "admin"
|
|
30332
30186
|
});
|
|
30333
|
-
/**
|
|
30334
|
-
* `recording` cap — footage availability + HLS playback manifests + per-device
|
|
30335
|
-
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
30336
|
-
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
30337
|
-
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
30338
|
-
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
30339
|
-
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
30340
|
-
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
30341
|
-
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
30342
|
-
*/
|
|
30343
|
-
var RecordingStatusSchema = object({
|
|
30344
|
-
deviceId: number(),
|
|
30345
|
-
enabled: boolean(),
|
|
30346
|
-
/** THE derived storage mode, from the one definition
|
|
30347
|
-
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
30348
|
-
* `on-device-decision` could have reached the recorder and not the status. */
|
|
30349
|
-
activeMode: RecordingStorageModeSchema,
|
|
30350
|
-
nodeId: string(),
|
|
30351
|
-
storageBytes: number()
|
|
30352
|
-
});
|
|
30353
30187
|
var RecordingRangeSchema = object({
|
|
30354
30188
|
profile: string(),
|
|
30355
30189
|
startMs: number(),
|
|
30356
30190
|
endMs: number()
|
|
30357
30191
|
});
|
|
30192
|
+
/**
|
|
30193
|
+
* How a source ANSWERED, on every singular read of this cap.
|
|
30194
|
+
*
|
|
30195
|
+
* `'read'` — it looked. `ranges: []` / `days: []` is then a real claim: this
|
|
30196
|
+
* source has no coverage in the window. `'unreadable'` — nobody could look
|
|
30197
|
+
* (the camera was unreachable, the calendar rung threw, the location is
|
|
30198
|
+
* unmounted, the node is still on the old build), and the emptiness beside it
|
|
30199
|
+
* means NOTHING.
|
|
30200
|
+
*
|
|
30201
|
+
* The batch rows have carried this since the grid existed; the SINGULAR
|
|
30202
|
+
* answers gained it with the collection (D625 §10.4), because they are the
|
|
30203
|
+
* ones the single-camera picker uses and because a half-converted fleet makes
|
|
30204
|
+
* "nobody looked" common for the length of a deploy. Without it the timeline
|
|
30205
|
+
* has no vocabulary for it, and `(data ?? [])` in a viewer turns a rollout into
|
|
30206
|
+
* a fleet of cameras that appear to have lost their recordings (D315, D393).
|
|
30207
|
+
*/
|
|
30208
|
+
var RecordingReadSchema = _enum(["read", "unreadable"]);
|
|
30358
30209
|
var RecordingAvailabilitySchema = object({
|
|
30359
30210
|
deviceId: number(),
|
|
30211
|
+
/** See {@link RecordingReadSchema}. An `'unreadable'` answer carries an empty
|
|
30212
|
+
* `ranges` that means nothing — never draw it as "no footage". */
|
|
30213
|
+
read: RecordingReadSchema,
|
|
30360
30214
|
ranges: array(RecordingRangeSchema),
|
|
30361
30215
|
/**
|
|
30362
|
-
* Every profile this camera has footage in — not only the one
|
|
30363
|
-
* describes (D433).
|
|
30216
|
+
* Every profile this camera has footage in AT THIS SOURCE — not only the one
|
|
30217
|
+
* `ranges` describes (D433).
|
|
30364
30218
|
*
|
|
30365
30219
|
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
30366
30220
|
* and enumerating all of them triples the directory reads for a bar that
|
|
@@ -30377,15 +30231,285 @@ var RecordingAvailabilitySchema = object({
|
|
|
30377
30231
|
});
|
|
30378
30232
|
var RecordingDaysSchema = object({
|
|
30379
30233
|
deviceId: number(),
|
|
30234
|
+
/** See {@link RecordingReadSchema}. `days: []` on an `'unreadable'` answer is
|
|
30235
|
+
* "nobody could look", and the date-picker must not spell it the same as
|
|
30236
|
+
* "no footage this month". */
|
|
30237
|
+
read: RecordingReadSchema,
|
|
30380
30238
|
/** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
|
|
30381
30239
|
days: array(number())
|
|
30382
30240
|
});
|
|
30241
|
+
var RecordingManifestSchema = object({
|
|
30242
|
+
deviceId: number(),
|
|
30243
|
+
/** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
|
|
30244
|
+
localMasterPath: string().nullable(),
|
|
30245
|
+
/** HTTP(S) URL to the master playlist on the recording node's playback server
|
|
30246
|
+
* (the PRIMARY candidate); null when no recording / server. Carries the
|
|
30247
|
+
* scoped playback token in its path. */
|
|
30248
|
+
playbackUrl: string().nullable(),
|
|
30249
|
+
/**
|
|
30250
|
+
* Candidate master-playlist URLs the client tries in order (LAN first, then
|
|
30251
|
+
* remote — Tailscale/Cloudflare if the operator configured extra hosts), each
|
|
30252
|
+
* carrying the same scoped token. `playbackUrl` is the first entry. Empty when
|
|
30253
|
+
* there is no recording / server.
|
|
30254
|
+
*/
|
|
30255
|
+
playbackEndpoints: array(string())
|
|
30256
|
+
});
|
|
30257
|
+
var RecordingSourceAvailabilitySchema = object({
|
|
30258
|
+
state: _enum([
|
|
30259
|
+
"ok",
|
|
30260
|
+
"sleeping",
|
|
30261
|
+
"unreachable",
|
|
30262
|
+
"no-storage",
|
|
30263
|
+
"index-empty"
|
|
30264
|
+
]),
|
|
30265
|
+
/** Free text, shown verbatim. Names the camera's own refusal when there is one. */
|
|
30266
|
+
reason: string().optional(),
|
|
30267
|
+
/** When this source's coverage was last CONFIRMED. A cached answer is never
|
|
30268
|
+
* drawn as current: the surface shows the age whenever it is older than the
|
|
30269
|
+
* refresh interval. The clip catalog's `catalogAsOf`, under the name the
|
|
30270
|
+
* timeline uses for it. */
|
|
30271
|
+
coverageAsOf: number().optional()
|
|
30272
|
+
});
|
|
30273
|
+
/**
|
|
30274
|
+
* One SOURCE of recorded coverage for a camera — a row of the picker.
|
|
30275
|
+
*
|
|
30276
|
+
* A provider lists the sources IT serves for that device, and answers for each
|
|
30277
|
+
* of them whether it can answer at all. A provider with nothing to offer on a
|
|
30278
|
+
* camera returns `[]` — it is not that camera's business. The five availability
|
|
30279
|
+
* states are `ClipSourceAvailability`'s verbatim: they mean exactly the same
|
|
30280
|
+
* things about a coverage index as about a clip catalog, and `sleeping` in
|
|
30281
|
+
* particular is what stops a battery camera being woken to paint a bar.
|
|
30282
|
+
*/
|
|
30283
|
+
var RecordingSourceSchema = object({
|
|
30284
|
+
/** The source id. {@link RECORDING_SOURCE_CAMSTACK} for ours (RESERVED), a
|
|
30285
|
+
* vendor namespace (`native:reolink:onboard`, …) for a camera's own store. */
|
|
30286
|
+
source: string(),
|
|
30287
|
+
/** Operator-facing name of the source ("CamStack recordings", "SD card"). */
|
|
30288
|
+
label: string(),
|
|
30289
|
+
/**
|
|
30290
|
+
* The addon that SERVES this row, and the value a later call passes as
|
|
30291
|
+
* `provider`.
|
|
30292
|
+
*
|
|
30293
|
+
* Optional for version skew only. The collection dispatcher stamps it from
|
|
30294
|
+
* the registry, so a row that travelled through the fan-out carries the
|
|
30295
|
+
* authoritative id whatever the provider filled in (D557 §4).
|
|
30296
|
+
*/
|
|
30297
|
+
addonId: string().optional(),
|
|
30298
|
+
availability: RecordingSourceAvailabilitySchema
|
|
30299
|
+
});
|
|
30300
|
+
/**
|
|
30301
|
+
* What a surface may DRAW for this (camera, source) — D612's rule applied to a
|
|
30302
|
+
* timeline: **the source declares what it can do, and the surface draws what
|
|
30303
|
+
* was declared. It never assumes, and never offers a gesture it will then
|
|
30304
|
+
* refuse.** D612 exists because `8` and `16` were offered as clip rates, the
|
|
30305
|
+
* broker clamped them to `4`, and no line anywhere said so.
|
|
30306
|
+
*
|
|
30307
|
+
* Asked once per (camera, source) before anything is drawn — never replaced by
|
|
30308
|
+
* a constant the surface keeps, which is the second authority D612 ends.
|
|
30309
|
+
*/
|
|
30310
|
+
var RecordingSourceOptionsSchema = object({
|
|
30311
|
+
/** How this source's media reaches the player.
|
|
30312
|
+
* `archive` = our own indexed segment tree; `stream` = the provider's
|
|
30313
|
+
* forward-only fMP4 (D597); `realtime` = a replay bound to wall clock. */
|
|
30314
|
+
transport: _enum([
|
|
30315
|
+
"archive",
|
|
30316
|
+
"stream",
|
|
30317
|
+
"realtime"
|
|
30318
|
+
]),
|
|
30319
|
+
/** What the BAR means. `continuous` = gaps are holes in a recording;
|
|
30320
|
+
* `sparse` = gaps are the absence of one, and must be drawn as such.
|
|
30321
|
+
*
|
|
30322
|
+
* Not an onboard-only concession: measured 2026-09-24, OUR bar covers 98.8 %
|
|
30323
|
+
* of 592's day and 1.2 % of 1436's. It is a fact about a (source, camera)
|
|
30324
|
+
* pair, and ours answers it per camera from `deriveRecordingMode`. */
|
|
30325
|
+
coverage: _enum(["continuous", "sparse"]),
|
|
30326
|
+
/** Where the playhead may be put.
|
|
30327
|
+
* `free` — anywhere, to the frame.
|
|
30328
|
+
* `forward` — only ahead of the current position.
|
|
30329
|
+
* `segment` — a position SNAPS to the head of the covering segment; a finer
|
|
30330
|
+
* ask is accepted by the camera and SILENTLY IGNORED. Measured
|
|
30331
|
+
* on 1436 (Hikvision V5.7.1, 2026-09-23): a window-narrowed
|
|
30332
|
+
* `ContentMgmt/search` returns a row and a `playbackURI`, the
|
|
30333
|
+
* replay opens 200 and delivers media — and the burned-in OSD of
|
|
30334
|
+
* the first frame reads the SEGMENT HEAD every time. Calling
|
|
30335
|
+
* that `forward` would tell the surface it may move the playhead
|
|
30336
|
+
* ahead within a loaded segment, which it may not. */
|
|
30337
|
+
seek: _enum([
|
|
30338
|
+
"free",
|
|
30339
|
+
"forward",
|
|
30340
|
+
"segment"
|
|
30341
|
+
]),
|
|
30342
|
+
/** Frame-step BACKWARD is meaningful. */
|
|
30343
|
+
stepBack: boolean(),
|
|
30344
|
+
/** Whether the drag-scrub gesture is served, as opposed to refused by name. */
|
|
30345
|
+
scrub: boolean(),
|
|
30346
|
+
/** Deliverable rates, ascending, always containing `1`. The surface draws its
|
|
30347
|
+
* picker from this and from NOTHING else (D612, D620, D621). `0` is not a
|
|
30348
|
+
* member: pause is the absence of a rate. */
|
|
30349
|
+
rates: array(number().positive()).min(1).readonly(),
|
|
30350
|
+
/** TRUE when a read of this source HOLDS the camera's only playback session.
|
|
30351
|
+
* A surface with this set makes at most ONE read at a time and draws no
|
|
30352
|
+
* scrub-thumbnail strip, no hover preview, no prefetch and no background
|
|
30353
|
+
* refresh. The precedent is exact and expensive: filling one screen of
|
|
30354
|
+
* Hikvision thumbnails at 1.01× realtime consumed fifteen minutes of that
|
|
30355
|
+
* camera's only playback session (1.2.126, reported within minutes), and a
|
|
30356
|
+
* timeline is a screenful of reads by construction. */
|
|
30357
|
+
exclusive: boolean()
|
|
30358
|
+
});
|
|
30359
|
+
/**
|
|
30360
|
+
* How to PLAY the instant that was asked for, from the chosen source.
|
|
30361
|
+
*
|
|
30362
|
+
* No new media transport is built for onboard sources: the `clip` arm is a
|
|
30363
|
+
* DELEGATION to the `videoclips` transport that vendor already has (D597 /
|
|
30364
|
+
* D616 / D617). The onboard half of this collection is a PROJECTION of
|
|
30365
|
+
* `videoclips` for coverage and a delegation to it for bytes.
|
|
30366
|
+
*/
|
|
30367
|
+
var RecordingPlaybackSchema = discriminatedUnion("kind", [
|
|
30368
|
+
object({
|
|
30369
|
+
kind: literal("hls"),
|
|
30370
|
+
manifest: RecordingManifestSchema
|
|
30371
|
+
}),
|
|
30372
|
+
object({
|
|
30373
|
+
kind: literal("clip"),
|
|
30374
|
+
/** The `videoclips` source namespace this clip id belongs to. */
|
|
30375
|
+
source: string(),
|
|
30376
|
+
clipId: string(),
|
|
30377
|
+
/** Where this clip actually STARTS. On a `seek: 'segment'` source the
|
|
30378
|
+
* playhead lands here, not at the requested instant — the surface must be
|
|
30379
|
+
* TOLD, not left to discover it from a burned-in OSD. */
|
|
30380
|
+
startsAtMs: number()
|
|
30381
|
+
}),
|
|
30382
|
+
object({
|
|
30383
|
+
kind: literal("none"),
|
|
30384
|
+
reason: string()
|
|
30385
|
+
})
|
|
30386
|
+
]);
|
|
30387
|
+
DeviceType.Camera, method(object({ deviceId: number() }), array(RecordingSourceSchema).readonly(), {
|
|
30388
|
+
kind: "query",
|
|
30389
|
+
auth: "protected"
|
|
30390
|
+
}), method(object({
|
|
30391
|
+
deviceId: number(),
|
|
30392
|
+
/**
|
|
30393
|
+
* WHICH provider to ask — the `addonId` a {@link RecordingSourceSchema}
|
|
30394
|
+
* row carries, never a source id and never a list. **REQUIRED**, in the
|
|
30395
|
+
* schema, where the generated types make it unomittable rather than
|
|
30396
|
+
* merely discouraged (D554 amended).
|
|
30397
|
+
*
|
|
30398
|
+
* It was learned the expensive way on `videoclips.listClips`: measured
|
|
30399
|
+
* on the live hub 2026-09-20, device 592 bound to `recorder` AND
|
|
30400
|
+
* `provider-reolink`, a bare call with `limit: 3` answered SIX rows,
|
|
30401
|
+
* three from each source, merged — `device-collection-dispatch.ts`
|
|
30402
|
+
* leaves an unpinned fan-out un-narrowed, so absence buys the union the
|
|
30403
|
+
* method exists not to be. An un-narrowed `getAvailability` would do
|
|
30404
|
+
* that to a TIMELINE: our ranges and the card's clips unioned into one
|
|
30405
|
+
* bar, which is "two sources are never drawn together" broken in the
|
|
30406
|
+
* one place it matters most.
|
|
30407
|
+
*
|
|
30408
|
+
* A provider the device is not bound to is refused BY NAME (D552's
|
|
30409
|
+
* `rejectUnresolvedAddonPin`), never answered by another one.
|
|
30410
|
+
*/
|
|
30411
|
+
provider: string().min(1),
|
|
30412
|
+
fromMs: number(),
|
|
30413
|
+
toMs: number(),
|
|
30414
|
+
/**
|
|
30415
|
+
* Answer for THIS profile instead of the source's preferred one (D433).
|
|
30416
|
+
* Absent keeps the timeline's behaviour — one bar, one profile, one set
|
|
30417
|
+
* of reads. `profilesWithFootage` on the answer says what may be asked
|
|
30418
|
+
* for.
|
|
30419
|
+
*/
|
|
30420
|
+
profile: string().optional()
|
|
30421
|
+
}), RecordingAvailabilitySchema, {
|
|
30422
|
+
kind: "query",
|
|
30423
|
+
auth: "protected"
|
|
30424
|
+
}), method(object({
|
|
30425
|
+
deviceId: number(),
|
|
30426
|
+
provider: string().min(1),
|
|
30427
|
+
fromMs: number(),
|
|
30428
|
+
toMs: number(),
|
|
30429
|
+
tzOffsetMinutes: number()
|
|
30430
|
+
}), RecordingDaysSchema, {
|
|
30431
|
+
kind: "query",
|
|
30432
|
+
auth: "protected"
|
|
30433
|
+
}), method(object({
|
|
30434
|
+
deviceId: number(),
|
|
30435
|
+
provider: string().min(1),
|
|
30436
|
+
fromMs: number(),
|
|
30437
|
+
toMs: number(),
|
|
30438
|
+
profile: CamProfileSchema.optional()
|
|
30439
|
+
}), RecordingPlaybackSchema, {
|
|
30440
|
+
kind: "query",
|
|
30441
|
+
auth: "protected"
|
|
30442
|
+
}), method(object({
|
|
30443
|
+
deviceId: number(),
|
|
30444
|
+
provider: string().min(1)
|
|
30445
|
+
}), RecordingSourceOptionsSchema, {
|
|
30446
|
+
kind: "query",
|
|
30447
|
+
auth: "protected"
|
|
30448
|
+
});
|
|
30449
|
+
/**
|
|
30450
|
+
* `recording-archive` — OUR archive, and the intent that fills it.
|
|
30451
|
+
*
|
|
30452
|
+
* The system-singleton half of the 2026-09-24 cut (D625). `recording` used to
|
|
30453
|
+
* be one 33-method system singleton holding two unrelated subjects: three
|
|
30454
|
+
* per-camera READS about coverage and playback, and everything else — storage
|
|
30455
|
+
* locations, retention, relocation, rebalance, the ops log, the placement
|
|
30456
|
+
* table and the byte-plane primitives our scrub and export are built on.
|
|
30457
|
+
*
|
|
30458
|
+
* The reads became a device-scoped COLLECTION, so a camera's own card can be a
|
|
30459
|
+
* source beside ours (`recording.cap.ts`). Everything that is about OUR store,
|
|
30460
|
+
* or unimplementable by a camera, stayed here.
|
|
30461
|
+
*
|
|
30462
|
+
* ## On the name
|
|
30463
|
+
*
|
|
30464
|
+
* `recording-storage` was the obvious choice and is wrong: this cap also holds
|
|
30465
|
+
* `getDeviceConfig`/`setDeviceConfig`, which are recording INTENT — bands,
|
|
30466
|
+
* retention, the D62 switch authority — and a name that says "storage" invites
|
|
30467
|
+
* the next reader to move them out again. An archive is a thing we keep, and
|
|
30468
|
+
* what we keep it under is a policy; the name covers both halves honestly and
|
|
30469
|
+
* sits in the existing family (`recording-onboard`, `recording-export`,
|
|
30470
|
+
* `recording-signal`).
|
|
30471
|
+
*
|
|
30472
|
+
* ## What must NOT happen to it
|
|
30473
|
+
*
|
|
30474
|
+
* It stays a SINGLETON. It is registered by `recorder`, which is
|
|
30475
|
+
* `placement: 'any-node'` and runs on every recording node; the hub dispatches
|
|
30476
|
+
* to one of them. Putting the ledger, the placement table or the relocation
|
|
30477
|
+
* jobs behind a fan-out is the one genuinely dangerous move in this cut.
|
|
30478
|
+
*
|
|
30479
|
+
* `getDeviceConfig` / `setDeviceConfig` in particular are the D62 recording
|
|
30480
|
+
* authority (`CameraSwitch.authority`). If a write reached a different provider
|
|
30481
|
+
* than the read — which a collection fan-out permits — two authorities would
|
|
30482
|
+
* decide when one camera records, and the symptom (recording silently off, or
|
|
30483
|
+
* a `bands` array clobbered by a partial write) is durable and silent. Keeping
|
|
30484
|
+
* them here means the worst case during a rollout is a 412: the switch refuses
|
|
30485
|
+
* to flip and SAYS so. **Do not move them into the collection, at any point,
|
|
30486
|
+
* for any reason.**
|
|
30487
|
+
*
|
|
30488
|
+
* ## The two batch reads
|
|
30489
|
+
*
|
|
30490
|
+
* `getAvailabilityBatch` / `getDaysWithRecordingsBatch` take `deviceIds:
|
|
30491
|
+
* number[]` with no single `deviceId`, and a device-scoped mount routes
|
|
30492
|
+
* through `getProviderForDevice(deviceId)` — there is nothing for it to route
|
|
30493
|
+
* on. They stay here, and on this cap the batch is explicitly OURS: a grid has
|
|
30494
|
+
* no per-camera picker, and a caller that wants another source's coverage asks
|
|
30495
|
+
* `recording.getAvailability` per device with that source's `provider`.
|
|
30496
|
+
*/
|
|
30497
|
+
var RecordingStatusSchema = object({
|
|
30498
|
+
deviceId: number(),
|
|
30499
|
+
enabled: boolean(),
|
|
30500
|
+
/** THE derived storage mode, from the one definition
|
|
30501
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
30502
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
30503
|
+
activeMode: RecordingStorageModeSchema,
|
|
30504
|
+
nodeId: string(),
|
|
30505
|
+
storageBytes: number()
|
|
30506
|
+
});
|
|
30383
30507
|
/**
|
|
30384
30508
|
* One camera's row in a `getAvailabilityBatch` answer.
|
|
30385
30509
|
*
|
|
30386
|
-
* `ranges` is EXACTLY what `getAvailability` returns for that camera
|
|
30387
|
-
* batch collapses the transport, not the work — plus the
|
|
30388
|
-
*
|
|
30510
|
+
* `ranges` is EXACTLY what `recording.getAvailability` returns for that camera
|
|
30511
|
+
* at OUR source — the batch collapses the transport, not the work — plus the
|
|
30512
|
+
* `read` mark the singular answer now carries too (D625):
|
|
30389
30513
|
*
|
|
30390
30514
|
* - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
|
|
30391
30515
|
* no footage in the window", which is a real claim.
|
|
@@ -30417,22 +30541,6 @@ var RecordingDaysForDeviceSchema = object({
|
|
|
30417
30541
|
/** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
|
|
30418
30542
|
days: array(number()).readonly()
|
|
30419
30543
|
});
|
|
30420
|
-
var RecordingManifestSchema = object({
|
|
30421
|
-
deviceId: number(),
|
|
30422
|
-
/** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
|
|
30423
|
-
localMasterPath: string().nullable(),
|
|
30424
|
-
/** HTTP(S) URL to the master playlist on the recording node's playback server
|
|
30425
|
-
* (the PRIMARY candidate); null when no recording / server. Carries the
|
|
30426
|
-
* scoped playback token in its path. */
|
|
30427
|
-
playbackUrl: string().nullable(),
|
|
30428
|
-
/**
|
|
30429
|
-
* Candidate master-playlist URLs the client tries in order (LAN first, then
|
|
30430
|
-
* remote — Tailscale/Cloudflare if the operator configured extra hosts), each
|
|
30431
|
-
* carrying the same scoped token. `playbackUrl` is the first entry. Empty when
|
|
30432
|
-
* there is no recording / server.
|
|
30433
|
-
*/
|
|
30434
|
-
playbackEndpoints: array(string())
|
|
30435
|
-
});
|
|
30436
30544
|
/**
|
|
30437
30545
|
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
30438
30546
|
* across every profile and every resolvable location on this node.
|
|
@@ -30691,34 +30799,12 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
30691
30799
|
segmentEndMs: number()
|
|
30692
30800
|
})]);
|
|
30693
30801
|
method(object({
|
|
30694
|
-
deviceId: number(),
|
|
30695
|
-
fromMs: number(),
|
|
30696
|
-
toMs: number(),
|
|
30697
|
-
/**
|
|
30698
|
-
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
30699
|
-
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
30700
|
-
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
30701
|
-
* for.
|
|
30702
|
-
*/
|
|
30703
|
-
profile: string().optional()
|
|
30704
|
-
}), RecordingAvailabilitySchema, {
|
|
30705
|
-
kind: "query",
|
|
30706
|
-
auth: "protected"
|
|
30707
|
-
}), method(object({
|
|
30708
30802
|
deviceIds: array(number()).min(1).max(200),
|
|
30709
30803
|
fromMs: number(),
|
|
30710
30804
|
toMs: number()
|
|
30711
30805
|
}), array(RecordingAvailabilityForDeviceSchema).readonly(), {
|
|
30712
30806
|
kind: "query",
|
|
30713
30807
|
auth: "protected"
|
|
30714
|
-
}), method(object({
|
|
30715
|
-
deviceId: number(),
|
|
30716
|
-
fromMs: number(),
|
|
30717
|
-
toMs: number(),
|
|
30718
|
-
tzOffsetMinutes: number()
|
|
30719
|
-
}), RecordingDaysSchema, {
|
|
30720
|
-
kind: "query",
|
|
30721
|
-
auth: "protected"
|
|
30722
30808
|
}), method(object({
|
|
30723
30809
|
deviceIds: array(number()).min(1).max(200),
|
|
30724
30810
|
fromMs: number(),
|
|
@@ -30727,13 +30813,6 @@ method(object({
|
|
|
30727
30813
|
}), array(RecordingDaysForDeviceSchema).readonly(), {
|
|
30728
30814
|
kind: "query",
|
|
30729
30815
|
auth: "protected"
|
|
30730
|
-
}), method(object({
|
|
30731
|
-
deviceId: number(),
|
|
30732
|
-
fromMs: number(),
|
|
30733
|
-
toMs: number()
|
|
30734
|
-
}), RecordingManifestSchema, {
|
|
30735
|
-
kind: "query",
|
|
30736
|
-
auth: "protected"
|
|
30737
30816
|
}), method(object({}), RecordingStorageUsageSchema, {
|
|
30738
30817
|
kind: "query",
|
|
30739
30818
|
auth: "admin"
|
|
@@ -31181,6 +31260,307 @@ method(object({
|
|
|
31181
31260
|
auth: "protected"
|
|
31182
31261
|
});
|
|
31183
31262
|
/**
|
|
31263
|
+
* Vendor-neutral **onboard** recording + storage cap — what the CAMERA
|
|
31264
|
+
* writes to the CAMERA's own card, on the camera's own schedule.
|
|
31265
|
+
*
|
|
31266
|
+
* This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
|
|
31267
|
+
* footage ledger, our storage locations, our retention. This one has a
|
|
31268
|
+
* different authority — the camera's firmware — and per D62 it stores
|
|
31269
|
+
* nothing of its own. Every value here is read from the camera and every
|
|
31270
|
+
* write goes back to the camera; there is no CamStack-side mirror that
|
|
31271
|
+
* could disagree with the device.
|
|
31272
|
+
*
|
|
31273
|
+
* ## One shape, two firmwares
|
|
31274
|
+
*
|
|
31275
|
+
* Measured 2026-09-22 against the live fleet:
|
|
31276
|
+
*
|
|
31277
|
+
* | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
|
|
31278
|
+
* | --- | --- | --- |
|
|
31279
|
+
* | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
|
|
31280
|
+
* | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
|
|
31281
|
+
* | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
|
|
31282
|
+
* | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
|
|
31283
|
+
* | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
|
|
31284
|
+
* | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
|
|
31285
|
+
* | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
|
|
31286
|
+
* | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
|
|
31287
|
+
*
|
|
31288
|
+
* The two schedule models look different and are the same thing in
|
|
31289
|
+
* different coordinates: both answer "for this trigger, during which
|
|
31290
|
+
* weekly windows does the camera record". {@link RecordWindow} is that
|
|
31291
|
+
* question in one shape — Hikvision's ranges map straight onto it,
|
|
31292
|
+
* Reolink's mask expands into hour-aligned windows.
|
|
31293
|
+
*
|
|
31294
|
+
* ## Union, not intersection
|
|
31295
|
+
*
|
|
31296
|
+
* **The same fields exist on every camera.** What differs per device is
|
|
31297
|
+
* which VALUES that device accepts, and that is what {@link
|
|
31298
|
+
* RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
|
|
31299
|
+
* per field plus the schedule's own limits. A control a camera cannot
|
|
31300
|
+
* honour is rendered DISABLED WITH ITS REASON, never missing and never
|
|
31301
|
+
* dead: disabled must not look like broken.
|
|
31302
|
+
*
|
|
31303
|
+
* ## Refusal by name
|
|
31304
|
+
*
|
|
31305
|
+
* A write a camera cannot honour is refused with a sentence the operator
|
|
31306
|
+
* can read — never accepted and dropped. Both providers refuse through
|
|
31307
|
+
* {@link describeOnboardRefusal}, so the vocabulary is one function and
|
|
31308
|
+
* one test, not two hand-written vendor opinions.
|
|
31309
|
+
*
|
|
31310
|
+
* Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
|
|
31311
|
+
* `getOptions` advertises per-camera availability, `getStatus` (auto-
|
|
31312
|
+
* injected from `status`) reports the live values, and a single
|
|
31313
|
+
* `setSettings` mutation applies a partial change. No hand-written
|
|
31314
|
+
* settings-contribution methods.
|
|
31315
|
+
*/
|
|
31316
|
+
/**
|
|
31317
|
+
* What makes the camera start recording during a window.
|
|
31318
|
+
*
|
|
31319
|
+
* The union of both vendors' vocabularies. `continuous` is Hikvision's
|
|
31320
|
+
* `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
|
|
31321
|
+
* object-class triggers are Reolink-only today and the smart-event ones
|
|
31322
|
+
* (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
|
|
31323
|
+
* firmwares measured — a camera that cannot record on a trigger simply
|
|
31324
|
+
* does not list it in `options.schedule.triggers`, and a window naming
|
|
31325
|
+
* it is REFUSED, not dropped.
|
|
31326
|
+
*/
|
|
31327
|
+
var RecordTriggerSchema = _enum([
|
|
31328
|
+
"continuous",
|
|
31329
|
+
"motion",
|
|
31330
|
+
"person",
|
|
31331
|
+
"vehicle",
|
|
31332
|
+
"animal",
|
|
31333
|
+
"lineCrossing",
|
|
31334
|
+
"intrusion",
|
|
31335
|
+
"loitering",
|
|
31336
|
+
"alarmInput"
|
|
31337
|
+
]);
|
|
31338
|
+
/**
|
|
31339
|
+
* One weekly recording window: "on `day`, from `startMinute` to
|
|
31340
|
+
* `endMinute`, record on `trigger`".
|
|
31341
|
+
*
|
|
31342
|
+
* `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
|
|
31343
|
+
* both firmwares enumerate). Minutes are local camera time since
|
|
31344
|
+
* midnight; `endMinute` may be 1440, meaning end of day — that is
|
|
31345
|
+
* Hikvision's literal `24:00` and Reolink's 24th mask slot, and
|
|
31346
|
+
* collapsing it to 0 would turn a whole-day window into an empty one.
|
|
31347
|
+
*/
|
|
31348
|
+
var RecordWindowSchema = object({
|
|
31349
|
+
trigger: RecordTriggerSchema,
|
|
31350
|
+
day: number().int().min(0).max(6),
|
|
31351
|
+
startMinute: number().int().min(0).max(1439),
|
|
31352
|
+
endMinute: number().int().min(1).max(1440)
|
|
31353
|
+
});
|
|
31354
|
+
/** Status of one physical volume, as the camera itself describes it. */
|
|
31355
|
+
var OnboardStorageVolumeSchema = object({
|
|
31356
|
+
/** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
|
|
31357
|
+
id: string(),
|
|
31358
|
+
/** The camera's own name for it, when it gives one (`hddName`). */
|
|
31359
|
+
label: string().optional(),
|
|
31360
|
+
status: _enum([
|
|
31361
|
+
"ok",
|
|
31362
|
+
"unformatted",
|
|
31363
|
+
"error",
|
|
31364
|
+
"offline",
|
|
31365
|
+
"unknown"
|
|
31366
|
+
]),
|
|
31367
|
+
/**
|
|
31368
|
+
* Total size in MB, or **null when the camera did not say**.
|
|
31369
|
+
*
|
|
31370
|
+
* Never 0 for an unreadable value: a measurement that failed is not a
|
|
31371
|
+
* measurement (D393), and a card whose size is unknown must not be
|
|
31372
|
+
* rendered as a card of size zero.
|
|
31373
|
+
*/
|
|
31374
|
+
capacityMb: number().nullable(),
|
|
31375
|
+
/**
|
|
31376
|
+
* Free space in MB, or null when unknown.
|
|
31377
|
+
*
|
|
31378
|
+
* **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
|
|
31379
|
+
* 1439 both report exactly 11776 MB free — the fixed reserve a looping
|
|
31380
|
+
* card converges on once it has wrapped. At loop steady state the
|
|
31381
|
+
* number is identical whether the camera recorded yesterday or stopped
|
|
31382
|
+
* a month ago.
|
|
31383
|
+
*/
|
|
31384
|
+
freeMb: number().nullable(),
|
|
31385
|
+
/** True when the camera reports the volume writable (`property` RW). */
|
|
31386
|
+
writable: boolean().optional()
|
|
31387
|
+
});
|
|
31388
|
+
object({
|
|
31389
|
+
storage: discriminatedUnion("kind", [
|
|
31390
|
+
object({
|
|
31391
|
+
kind: literal("present"),
|
|
31392
|
+
volumes: array(OnboardStorageVolumeSchema)
|
|
31393
|
+
}),
|
|
31394
|
+
object({
|
|
31395
|
+
kind: literal("absent"),
|
|
31396
|
+
reason: string()
|
|
31397
|
+
}),
|
|
31398
|
+
object({
|
|
31399
|
+
kind: literal("unknown"),
|
|
31400
|
+
reason: string()
|
|
31401
|
+
})
|
|
31402
|
+
]),
|
|
31403
|
+
tracks: array(object({
|
|
31404
|
+
id: string(),
|
|
31405
|
+
enabled: boolean(),
|
|
31406
|
+
isVideo: boolean(),
|
|
31407
|
+
/** From the camera's own track description. Null when it does not say. */
|
|
31408
|
+
codec: string().nullable(),
|
|
31409
|
+
resolution: string().nullable(),
|
|
31410
|
+
/** Per-track overwrite flag, where the firmware keeps it per track. */
|
|
31411
|
+
overwriteWhenFull: boolean().nullable()
|
|
31412
|
+
})),
|
|
31413
|
+
/**
|
|
31414
|
+
* The track the write path targets — the enabled VIDEO one. Null when
|
|
31415
|
+
* no track could be identified, which is itself a refusal reason.
|
|
31416
|
+
*/
|
|
31417
|
+
primaryTrackId: string().nullable(),
|
|
31418
|
+
/** Master "record to the card at all" switch. */
|
|
31419
|
+
enabled: boolean().nullable(),
|
|
31420
|
+
overwriteWhenFull: boolean().nullable(),
|
|
31421
|
+
preRecordSec: number().nullable(),
|
|
31422
|
+
postRecordSec: number().nullable(),
|
|
31423
|
+
/** Length of one recorded file, in minutes. */
|
|
31424
|
+
segmentMinutes: number().nullable(),
|
|
31425
|
+
/** The primary track's weekly windows, flattened. */
|
|
31426
|
+
windows: array(RecordWindowSchema),
|
|
31427
|
+
/**
|
|
31428
|
+
* How many windows the camera described that CamStack could NOT read —
|
|
31429
|
+
* an unrecognised trigger, an unparseable clock, a weekday it does not
|
|
31430
|
+
* name.
|
|
31431
|
+
*
|
|
31432
|
+
* A dropped window is work the reader threw away, and a schedule that
|
|
31433
|
+
* silently shows fewer rows than the camera holds is how an operator
|
|
31434
|
+
* saves back a schedule shorter than the one they were looking at
|
|
31435
|
+
* (D391). Non-zero means the window list is INCOMPLETE and a write
|
|
31436
|
+
* that replaces it would delete what was not shown — which is why a
|
|
31437
|
+
* provider reporting a non-zero count also reports the schedule as not
|
|
31438
|
+
* writable.
|
|
31439
|
+
*/
|
|
31440
|
+
unreadableWindows: number(),
|
|
31441
|
+
/**
|
|
31442
|
+
* The camera is scheduled to record and has NO usable storage.
|
|
31443
|
+
*
|
|
31444
|
+
* A first-class fact because it is the fleet's most common silent
|
|
31445
|
+
* defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
|
|
31446
|
+
* to a card that is not there. Neither the schedule nor the storage
|
|
31447
|
+
* read says anything wrong on its own; only the pair does.
|
|
31448
|
+
*/
|
|
31449
|
+
recordingToNowhere: boolean(),
|
|
31450
|
+
lastFetchedAt: number()
|
|
31451
|
+
});
|
|
31452
|
+
/** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
|
|
31453
|
+
var RangeSchema = object({
|
|
31454
|
+
min: number(),
|
|
31455
|
+
max: number(),
|
|
31456
|
+
step: number()
|
|
31457
|
+
});
|
|
31458
|
+
/**
|
|
31459
|
+
* The values a camera actually takes for a numeric field, when they are a SET
|
|
31460
|
+
* rather than a range.
|
|
31461
|
+
*
|
|
31462
|
+
* `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
|
|
31463
|
+
* (I91DN) on 2026-09-22 by writing each value and reading it back:
|
|
31464
|
+
*
|
|
31465
|
+
* - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
|
|
31466
|
+
* camera's "no limit" — `-1` and `4294967295` both land on it);
|
|
31467
|
+
* - post-record: `5, 10, 30, 60, 120, 300, 600`.
|
|
31468
|
+
*
|
|
31469
|
+
* Neither is expressible as a step: the first has a sentinel two billion away
|
|
31470
|
+
* from its neighbours, the second doubles and then jumps. A range that tried
|
|
31471
|
+
* would forbid values the camera takes AND permit values it silently replaces
|
|
31472
|
+
* with 5 — wrong in both directions at once.
|
|
31473
|
+
*
|
|
31474
|
+
* `sentinel` names the member that is not a duration, so a surface can render
|
|
31475
|
+
* "no limit" instead of `2147483647` seconds.
|
|
31476
|
+
*/
|
|
31477
|
+
var AllowedValuesSchema = object({
|
|
31478
|
+
values: array(number()).min(1),
|
|
31479
|
+
sentinel: object({
|
|
31480
|
+
value: number(),
|
|
31481
|
+
meaning: _enum(["no-limit", "disabled"])
|
|
31482
|
+
}).optional()
|
|
31483
|
+
});
|
|
31484
|
+
/**
|
|
31485
|
+
* Per-field availability on ONE camera.
|
|
31486
|
+
*
|
|
31487
|
+
* The field exists on every camera — this says whether this one can be
|
|
31488
|
+
* read and whether it can be written, and `reason` says why not when
|
|
31489
|
+
* either is false. The UI renders the control DISABLED with the reason
|
|
31490
|
+
* rather than hiding it, so a limitation is legible instead of looking
|
|
31491
|
+
* like a missing feature.
|
|
31492
|
+
*/
|
|
31493
|
+
var OnboardFieldSupportSchema = object({
|
|
31494
|
+
readable: boolean(),
|
|
31495
|
+
writable: boolean(),
|
|
31496
|
+
/** Required whenever `readable` or `writable` is false. */
|
|
31497
|
+
reason: string().optional()
|
|
31498
|
+
});
|
|
31499
|
+
/** What this camera's schedule model can express. */
|
|
31500
|
+
var OnboardScheduleSupportSchema = object({
|
|
31501
|
+
support: OnboardFieldSupportSchema,
|
|
31502
|
+
/**
|
|
31503
|
+
* The smallest time step the camera can express, in minutes.
|
|
31504
|
+
*
|
|
31505
|
+
* Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
|
|
31506
|
+
* 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
|
|
31507
|
+
* window whose edges are not a multiple of this is REFUSED rather than
|
|
31508
|
+
* quietly rounded — rounding is how an operator's 06:30 becomes 06:00
|
|
31509
|
+
* and nothing says so.
|
|
31510
|
+
*/
|
|
31511
|
+
granularityMinutes: number(),
|
|
31512
|
+
/** Triggers this camera can record on. A window naming another is refused. */
|
|
31513
|
+
triggers: array(RecordTriggerSchema),
|
|
31514
|
+
/**
|
|
31515
|
+
* False when the camera stores ONE trigger per time range, so two
|
|
31516
|
+
* windows overlapping on the same day cannot carry different triggers.
|
|
31517
|
+
* True on Reolink, whose mask is per-trigger and independent.
|
|
31518
|
+
*/
|
|
31519
|
+
supportsOverlappingTriggers: boolean()
|
|
31520
|
+
});
|
|
31521
|
+
var RecordingOnboardOptionsSchema = object({
|
|
31522
|
+
enabled: OnboardFieldSupportSchema,
|
|
31523
|
+
overwriteWhenFull: OnboardFieldSupportSchema,
|
|
31524
|
+
preRecordSec: OnboardFieldSupportSchema,
|
|
31525
|
+
preRecordSecRange: RangeSchema.optional(),
|
|
31526
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
31527
|
+
preRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
31528
|
+
postRecordSec: OnboardFieldSupportSchema,
|
|
31529
|
+
postRecordSecRange: RangeSchema.optional(),
|
|
31530
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
31531
|
+
postRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
31532
|
+
segmentMinutes: OnboardFieldSupportSchema,
|
|
31533
|
+
segmentMinutesRange: RangeSchema.optional(),
|
|
31534
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
31535
|
+
segmentMinutesAllowed: AllowedValuesSchema.optional(),
|
|
31536
|
+
schedule: OnboardScheduleSupportSchema
|
|
31537
|
+
});
|
|
31538
|
+
/**
|
|
31539
|
+
* A partial change. Every field optional.
|
|
31540
|
+
*
|
|
31541
|
+
* Unlike the other `deviceConfig` caps, a provider here does **NOT**
|
|
31542
|
+
* silently ignore a field it cannot support — it refuses, by name,
|
|
31543
|
+
* through {@link describeOnboardRefusal}. Silence on a recording setting
|
|
31544
|
+
* is the failure D62 exists to prevent: the operator believes the camera
|
|
31545
|
+
* is recording the way the form says, and it is not.
|
|
31546
|
+
*/
|
|
31547
|
+
var RecordingOnboardPatchSchema = object({
|
|
31548
|
+
enabled: boolean().optional(),
|
|
31549
|
+
overwriteWhenFull: boolean().optional(),
|
|
31550
|
+
preRecordSec: number().optional(),
|
|
31551
|
+
postRecordSec: number().optional(),
|
|
31552
|
+
segmentMinutes: number().optional(),
|
|
31553
|
+
/** The complete new window set for the primary track — not a delta. */
|
|
31554
|
+
windows: array(RecordWindowSchema).optional()
|
|
31555
|
+
});
|
|
31556
|
+
DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
|
|
31557
|
+
deviceId: number(),
|
|
31558
|
+
settings: RecordingOnboardPatchSchema
|
|
31559
|
+
}), _void(), {
|
|
31560
|
+
kind: "mutation",
|
|
31561
|
+
auth: "admin"
|
|
31562
|
+
});
|
|
31563
|
+
/**
|
|
31184
31564
|
* A camera's own "record me NOW" LEVEL — a signal the device raises while
|
|
31185
31565
|
* something it knows about is happening (a robot vacuum cleaning, a machine
|
|
31186
31566
|
* running, a gate open) and lowers when it stops.
|
|
@@ -36474,24 +36854,6 @@ Object.freeze({
|
|
|
36474
36854
|
addonId: null,
|
|
36475
36855
|
access: "view"
|
|
36476
36856
|
},
|
|
36477
|
-
"events.getEventClipUrl": {
|
|
36478
|
-
capName: "events",
|
|
36479
|
-
capScope: "device",
|
|
36480
|
-
addonId: null,
|
|
36481
|
-
access: "view"
|
|
36482
|
-
},
|
|
36483
|
-
"events.getEvents": {
|
|
36484
|
-
capName: "events",
|
|
36485
|
-
capScope: "device",
|
|
36486
|
-
addonId: null,
|
|
36487
|
-
access: "view"
|
|
36488
|
-
},
|
|
36489
|
-
"events.getEventThumbnail": {
|
|
36490
|
-
capName: "events",
|
|
36491
|
-
capScope: "device",
|
|
36492
|
-
addonId: null,
|
|
36493
|
-
access: "view"
|
|
36494
|
-
},
|
|
36495
36857
|
"faceGallery.assignFace": {
|
|
36496
36858
|
capName: "face-gallery",
|
|
36497
36859
|
capScope: "system",
|
|
@@ -37812,6 +38174,12 @@ Object.freeze({
|
|
|
37812
38174
|
addonId: null,
|
|
37813
38175
|
access: "view"
|
|
37814
38176
|
},
|
|
38177
|
+
"notificationRules.getTemplateCatalog": {
|
|
38178
|
+
capName: "notification-rules",
|
|
38179
|
+
capScope: "system",
|
|
38180
|
+
addonId: null,
|
|
38181
|
+
access: "view"
|
|
38182
|
+
},
|
|
37815
38183
|
"notificationRules.listDeviceMutes": {
|
|
37816
38184
|
capName: "notification-rules",
|
|
37817
38185
|
capScope: "system",
|
|
@@ -37830,6 +38198,12 @@ Object.freeze({
|
|
|
37830
38198
|
addonId: null,
|
|
37831
38199
|
access: "view"
|
|
37832
38200
|
},
|
|
38201
|
+
"notificationRules.previewTemplate": {
|
|
38202
|
+
capName: "notification-rules",
|
|
38203
|
+
capScope: "system",
|
|
38204
|
+
addonId: null,
|
|
38205
|
+
access: "view"
|
|
38206
|
+
},
|
|
37833
38207
|
"notificationRules.resolveArtifactUrl": {
|
|
37834
38208
|
capName: "notification-rules",
|
|
37835
38209
|
capScope: "system",
|
|
@@ -39366,224 +39740,236 @@ Object.freeze({
|
|
|
39366
39740
|
addonId: null,
|
|
39367
39741
|
access: "create"
|
|
39368
39742
|
},
|
|
39369
|
-
"recording.
|
|
39743
|
+
"recording.getAvailability": {
|
|
39370
39744
|
capName: "recording",
|
|
39371
|
-
capScope: "
|
|
39745
|
+
capScope: "device",
|
|
39372
39746
|
addonId: null,
|
|
39373
|
-
access: "
|
|
39747
|
+
access: "view"
|
|
39374
39748
|
},
|
|
39375
|
-
"recording.
|
|
39749
|
+
"recording.getDaysWithRecordings": {
|
|
39376
39750
|
capName: "recording",
|
|
39377
|
-
capScope: "
|
|
39751
|
+
capScope: "device",
|
|
39378
39752
|
addonId: null,
|
|
39379
|
-
access: "
|
|
39753
|
+
access: "view"
|
|
39380
39754
|
},
|
|
39381
|
-
"recording.
|
|
39755
|
+
"recording.getPlayback": {
|
|
39382
39756
|
capName: "recording",
|
|
39383
|
-
capScope: "
|
|
39757
|
+
capScope: "device",
|
|
39384
39758
|
addonId: null,
|
|
39385
|
-
access: "
|
|
39759
|
+
access: "view"
|
|
39386
39760
|
},
|
|
39387
|
-
"recording.
|
|
39761
|
+
"recording.getPlaybackOptions": {
|
|
39388
39762
|
capName: "recording",
|
|
39389
|
-
capScope: "
|
|
39763
|
+
capScope: "device",
|
|
39390
39764
|
addonId: null,
|
|
39391
|
-
access: "
|
|
39765
|
+
access: "view"
|
|
39392
39766
|
},
|
|
39393
|
-
"recording.
|
|
39767
|
+
"recording.listSources": {
|
|
39394
39768
|
capName: "recording",
|
|
39395
|
-
capScope: "
|
|
39769
|
+
capScope: "device",
|
|
39396
39770
|
addonId: null,
|
|
39397
39771
|
access: "view"
|
|
39398
39772
|
},
|
|
39399
|
-
"
|
|
39400
|
-
capName: "recording",
|
|
39773
|
+
"recordingArchive.applyDeviceSettingsPatch": {
|
|
39774
|
+
capName: "recording-archive",
|
|
39401
39775
|
capScope: "system",
|
|
39402
39776
|
addonId: null,
|
|
39403
|
-
access: "
|
|
39777
|
+
access: "create"
|
|
39404
39778
|
},
|
|
39405
|
-
"
|
|
39406
|
-
capName: "recording",
|
|
39779
|
+
"recordingArchive.cancelRelocateJob": {
|
|
39780
|
+
capName: "recording-archive",
|
|
39407
39781
|
capScope: "system",
|
|
39408
39782
|
addonId: null,
|
|
39409
|
-
access: "
|
|
39783
|
+
access: "create"
|
|
39410
39784
|
},
|
|
39411
|
-
"
|
|
39412
|
-
capName: "recording",
|
|
39785
|
+
"recordingArchive.cancelStorageMigrationMove": {
|
|
39786
|
+
capName: "recording-archive",
|
|
39787
|
+
capScope: "system",
|
|
39788
|
+
addonId: null,
|
|
39789
|
+
access: "create"
|
|
39790
|
+
},
|
|
39791
|
+
"recordingArchive.deleteFootprint": {
|
|
39792
|
+
capName: "recording-archive",
|
|
39793
|
+
capScope: "system",
|
|
39794
|
+
addonId: null,
|
|
39795
|
+
access: "delete"
|
|
39796
|
+
},
|
|
39797
|
+
"recordingArchive.getAvailabilityBatch": {
|
|
39798
|
+
capName: "recording-archive",
|
|
39413
39799
|
capScope: "system",
|
|
39414
39800
|
addonId: null,
|
|
39415
39801
|
access: "view"
|
|
39416
39802
|
},
|
|
39417
|
-
"
|
|
39418
|
-
capName: "recording",
|
|
39803
|
+
"recordingArchive.getDaysWithRecordingsBatch": {
|
|
39804
|
+
capName: "recording-archive",
|
|
39419
39805
|
capScope: "system",
|
|
39420
39806
|
addonId: null,
|
|
39421
39807
|
access: "view"
|
|
39422
39808
|
},
|
|
39423
|
-
"
|
|
39424
|
-
capName: "recording",
|
|
39809
|
+
"recordingArchive.getDeviceConfig": {
|
|
39810
|
+
capName: "recording-archive",
|
|
39425
39811
|
capScope: "system",
|
|
39426
39812
|
addonId: null,
|
|
39427
39813
|
access: "view"
|
|
39428
39814
|
},
|
|
39429
|
-
"
|
|
39430
|
-
capName: "recording",
|
|
39815
|
+
"recordingArchive.getDeviceLiveContribution": {
|
|
39816
|
+
capName: "recording-archive",
|
|
39431
39817
|
capScope: "system",
|
|
39432
39818
|
addonId: null,
|
|
39433
39819
|
access: "view"
|
|
39434
39820
|
},
|
|
39435
|
-
"
|
|
39436
|
-
capName: "recording",
|
|
39821
|
+
"recordingArchive.getDeviceSettingsContribution": {
|
|
39822
|
+
capName: "recording-archive",
|
|
39437
39823
|
capScope: "system",
|
|
39438
39824
|
addonId: null,
|
|
39439
39825
|
access: "view"
|
|
39440
39826
|
},
|
|
39441
|
-
"
|
|
39442
|
-
capName: "recording",
|
|
39827
|
+
"recordingArchive.getPlacement": {
|
|
39828
|
+
capName: "recording-archive",
|
|
39443
39829
|
capScope: "system",
|
|
39444
39830
|
addonId: null,
|
|
39445
39831
|
access: "view"
|
|
39446
39832
|
},
|
|
39447
|
-
"
|
|
39448
|
-
capName: "recording",
|
|
39833
|
+
"recordingArchive.getRelocateResidue": {
|
|
39834
|
+
capName: "recording-archive",
|
|
39449
39835
|
capScope: "system",
|
|
39450
39836
|
addonId: null,
|
|
39451
39837
|
access: "view"
|
|
39452
39838
|
},
|
|
39453
|
-
"
|
|
39454
|
-
capName: "recording",
|
|
39839
|
+
"recordingArchive.getStatus": {
|
|
39840
|
+
capName: "recording-archive",
|
|
39455
39841
|
capScope: "system",
|
|
39456
39842
|
addonId: null,
|
|
39457
39843
|
access: "view"
|
|
39458
39844
|
},
|
|
39459
|
-
"
|
|
39460
|
-
capName: "recording",
|
|
39845
|
+
"recordingArchive.getStorageMigrationMoveStatus": {
|
|
39846
|
+
capName: "recording-archive",
|
|
39461
39847
|
capScope: "system",
|
|
39462
39848
|
addonId: null,
|
|
39463
39849
|
access: "view"
|
|
39464
39850
|
},
|
|
39465
|
-
"
|
|
39466
|
-
capName: "recording",
|
|
39851
|
+
"recordingArchive.getStorageUsage": {
|
|
39852
|
+
capName: "recording-archive",
|
|
39467
39853
|
capScope: "system",
|
|
39468
39854
|
addonId: null,
|
|
39469
39855
|
access: "view"
|
|
39470
39856
|
},
|
|
39471
|
-
"
|
|
39472
|
-
capName: "recording",
|
|
39857
|
+
"recordingArchive.listOpsLog": {
|
|
39858
|
+
capName: "recording-archive",
|
|
39473
39859
|
capScope: "system",
|
|
39474
39860
|
addonId: null,
|
|
39475
39861
|
access: "view"
|
|
39476
39862
|
},
|
|
39477
|
-
"
|
|
39478
|
-
capName: "recording",
|
|
39863
|
+
"recordingArchive.listRelocateJobs": {
|
|
39864
|
+
capName: "recording-archive",
|
|
39479
39865
|
capScope: "system",
|
|
39480
39866
|
addonId: null,
|
|
39481
39867
|
access: "view"
|
|
39482
39868
|
},
|
|
39483
|
-
"
|
|
39484
|
-
capName: "recording",
|
|
39869
|
+
"recordingArchive.locateSegment": {
|
|
39870
|
+
capName: "recording-archive",
|
|
39485
39871
|
capScope: "system",
|
|
39486
39872
|
addonId: null,
|
|
39487
39873
|
access: "view"
|
|
39488
39874
|
},
|
|
39489
|
-
"
|
|
39490
|
-
capName: "recording",
|
|
39875
|
+
"recordingArchive.pauseForStorageMigration": {
|
|
39876
|
+
capName: "recording-archive",
|
|
39491
39877
|
capScope: "system",
|
|
39492
39878
|
addonId: null,
|
|
39493
39879
|
access: "create"
|
|
39494
39880
|
},
|
|
39495
|
-
"
|
|
39496
|
-
capName: "recording",
|
|
39881
|
+
"recordingArchive.planStorageRebalance": {
|
|
39882
|
+
capName: "recording-archive",
|
|
39497
39883
|
capScope: "system",
|
|
39498
39884
|
addonId: null,
|
|
39499
39885
|
access: "view"
|
|
39500
39886
|
},
|
|
39501
|
-
"
|
|
39502
|
-
capName: "recording",
|
|
39887
|
+
"recordingArchive.pruneFootage": {
|
|
39888
|
+
capName: "recording-archive",
|
|
39503
39889
|
capScope: "system",
|
|
39504
39890
|
addonId: null,
|
|
39505
39891
|
access: "create"
|
|
39506
39892
|
},
|
|
39507
|
-
"
|
|
39508
|
-
capName: "recording",
|
|
39893
|
+
"recordingArchive.readGopBytes": {
|
|
39894
|
+
capName: "recording-archive",
|
|
39509
39895
|
capScope: "system",
|
|
39510
39896
|
addonId: null,
|
|
39511
39897
|
access: "view"
|
|
39512
39898
|
},
|
|
39513
|
-
"
|
|
39514
|
-
capName: "recording",
|
|
39899
|
+
"recordingArchive.readSegmentBytes": {
|
|
39900
|
+
capName: "recording-archive",
|
|
39515
39901
|
capScope: "system",
|
|
39516
39902
|
addonId: null,
|
|
39517
39903
|
access: "view"
|
|
39518
39904
|
},
|
|
39519
|
-
"
|
|
39520
|
-
capName: "recording",
|
|
39905
|
+
"recordingArchive.readWindowBytes": {
|
|
39906
|
+
capName: "recording-archive",
|
|
39521
39907
|
capScope: "system",
|
|
39522
39908
|
addonId: null,
|
|
39523
39909
|
access: "view"
|
|
39524
39910
|
},
|
|
39525
|
-
"
|
|
39526
|
-
capName: "recording",
|
|
39911
|
+
"recordingArchive.reconcileLedgerAgainstDisk": {
|
|
39912
|
+
capName: "recording-archive",
|
|
39527
39913
|
capScope: "system",
|
|
39528
39914
|
addonId: null,
|
|
39529
39915
|
access: "create"
|
|
39530
39916
|
},
|
|
39531
|
-
"
|
|
39532
|
-
capName: "recording",
|
|
39917
|
+
"recordingArchive.refreshStorageLocationsForMigration": {
|
|
39918
|
+
capName: "recording-archive",
|
|
39533
39919
|
capScope: "system",
|
|
39534
39920
|
addonId: null,
|
|
39535
39921
|
access: "create"
|
|
39536
39922
|
},
|
|
39537
|
-
"
|
|
39538
|
-
capName: "recording",
|
|
39923
|
+
"recordingArchive.relocateFootage": {
|
|
39924
|
+
capName: "recording-archive",
|
|
39539
39925
|
capScope: "system",
|
|
39540
39926
|
addonId: null,
|
|
39541
39927
|
access: "create"
|
|
39542
39928
|
},
|
|
39543
|
-
"
|
|
39544
|
-
capName: "recording",
|
|
39929
|
+
"recordingArchive.renderClip": {
|
|
39930
|
+
capName: "recording-archive",
|
|
39545
39931
|
capScope: "system",
|
|
39546
39932
|
addonId: null,
|
|
39547
39933
|
access: "create"
|
|
39548
39934
|
},
|
|
39549
|
-
"
|
|
39550
|
-
capName: "recording",
|
|
39935
|
+
"recordingArchive.renderGif": {
|
|
39936
|
+
capName: "recording-archive",
|
|
39551
39937
|
capScope: "system",
|
|
39552
39938
|
addonId: null,
|
|
39553
39939
|
access: "create"
|
|
39554
39940
|
},
|
|
39555
|
-
"
|
|
39556
|
-
capName: "recording",
|
|
39941
|
+
"recordingArchive.rescanStorage": {
|
|
39942
|
+
capName: "recording-archive",
|
|
39557
39943
|
capScope: "system",
|
|
39558
39944
|
addonId: null,
|
|
39559
39945
|
access: "create"
|
|
39560
39946
|
},
|
|
39561
|
-
"
|
|
39562
|
-
capName: "recording",
|
|
39947
|
+
"recordingArchive.resumeForStorageMigration": {
|
|
39948
|
+
capName: "recording-archive",
|
|
39563
39949
|
capScope: "system",
|
|
39564
39950
|
addonId: null,
|
|
39565
39951
|
access: "create"
|
|
39566
39952
|
},
|
|
39567
|
-
"
|
|
39568
|
-
capName: "recording",
|
|
39953
|
+
"recordingArchive.setDeviceConfig": {
|
|
39954
|
+
capName: "recording-archive",
|
|
39569
39955
|
capScope: "system",
|
|
39570
39956
|
addonId: null,
|
|
39571
39957
|
access: "create"
|
|
39572
39958
|
},
|
|
39573
|
-
"
|
|
39574
|
-
capName: "recording",
|
|
39959
|
+
"recordingArchive.setDevicePlacement": {
|
|
39960
|
+
capName: "recording-archive",
|
|
39575
39961
|
capScope: "system",
|
|
39576
39962
|
addonId: null,
|
|
39577
39963
|
access: "create"
|
|
39578
39964
|
},
|
|
39579
|
-
"
|
|
39580
|
-
capName: "recording",
|
|
39965
|
+
"recordingArchive.startStorageMigrationMove": {
|
|
39966
|
+
capName: "recording-archive",
|
|
39581
39967
|
capScope: "system",
|
|
39582
39968
|
addonId: null,
|
|
39583
39969
|
access: "create"
|
|
39584
39970
|
},
|
|
39585
|
-
"
|
|
39586
|
-
capName: "recording",
|
|
39971
|
+
"recordingArchive.startStorageRebalance": {
|
|
39972
|
+
capName: "recording-archive",
|
|
39587
39973
|
capScope: "system",
|
|
39588
39974
|
addonId: null,
|
|
39589
39975
|
access: "create"
|
|
@@ -41888,21 +42274,6 @@ Object.freeze({
|
|
|
41888
42274
|
form: "single",
|
|
41889
42275
|
optional: false
|
|
41890
42276
|
}],
|
|
41891
|
-
"events.getEventClipUrl": [{
|
|
41892
|
-
name: "deviceId",
|
|
41893
|
-
form: "single",
|
|
41894
|
-
optional: false
|
|
41895
|
-
}],
|
|
41896
|
-
"events.getEvents": [{
|
|
41897
|
-
name: "deviceId",
|
|
41898
|
-
form: "single",
|
|
41899
|
-
optional: false
|
|
41900
|
-
}],
|
|
41901
|
-
"events.getEventThumbnail": [{
|
|
41902
|
-
name: "deviceId",
|
|
41903
|
-
form: "single",
|
|
41904
|
-
optional: false
|
|
41905
|
-
}],
|
|
41906
42277
|
"faceGallery.getFaceByTrack": [{
|
|
41907
42278
|
name: "deviceId",
|
|
41908
42279
|
form: "single",
|
|
@@ -42821,107 +43192,117 @@ Object.freeze({
|
|
|
42821
43192
|
form: "single",
|
|
42822
43193
|
optional: false
|
|
42823
43194
|
}],
|
|
42824
|
-
"recording.
|
|
43195
|
+
"recording.getAvailability": [{
|
|
42825
43196
|
name: "deviceId",
|
|
42826
43197
|
form: "single",
|
|
42827
43198
|
optional: false
|
|
42828
43199
|
}],
|
|
42829
|
-
"recording.
|
|
43200
|
+
"recording.getDaysWithRecordings": [{
|
|
42830
43201
|
name: "deviceId",
|
|
42831
43202
|
form: "single",
|
|
42832
43203
|
optional: false
|
|
42833
43204
|
}],
|
|
42834
|
-
"recording.
|
|
42835
|
-
name: "
|
|
42836
|
-
form: "
|
|
43205
|
+
"recording.getPlayback": [{
|
|
43206
|
+
name: "deviceId",
|
|
43207
|
+
form: "single",
|
|
42837
43208
|
optional: false
|
|
42838
43209
|
}],
|
|
42839
|
-
"recording.
|
|
43210
|
+
"recording.getPlaybackOptions": [{
|
|
42840
43211
|
name: "deviceId",
|
|
42841
43212
|
form: "single",
|
|
42842
43213
|
optional: false
|
|
42843
43214
|
}],
|
|
42844
|
-
"recording.
|
|
42845
|
-
name: "
|
|
42846
|
-
form: "
|
|
43215
|
+
"recording.listSources": [{
|
|
43216
|
+
name: "deviceId",
|
|
43217
|
+
form: "single",
|
|
42847
43218
|
optional: false
|
|
42848
43219
|
}],
|
|
42849
|
-
"
|
|
43220
|
+
"recordingArchive.deleteFootprint": [{
|
|
42850
43221
|
name: "deviceId",
|
|
42851
43222
|
form: "single",
|
|
42852
43223
|
optional: false
|
|
42853
43224
|
}],
|
|
42854
|
-
"
|
|
43225
|
+
"recordingArchive.getAvailabilityBatch": [{
|
|
43226
|
+
name: "deviceIds",
|
|
43227
|
+
form: "array",
|
|
43228
|
+
optional: false
|
|
43229
|
+
}],
|
|
43230
|
+
"recordingArchive.getDaysWithRecordingsBatch": [{
|
|
43231
|
+
name: "deviceIds",
|
|
43232
|
+
form: "array",
|
|
43233
|
+
optional: false
|
|
43234
|
+
}],
|
|
43235
|
+
"recordingArchive.getDeviceConfig": [{
|
|
42855
43236
|
name: "deviceId",
|
|
42856
43237
|
form: "single",
|
|
42857
43238
|
optional: false
|
|
42858
43239
|
}],
|
|
42859
|
-
"
|
|
43240
|
+
"recordingArchive.listOpsLog": [{
|
|
42860
43241
|
name: "deviceId",
|
|
42861
43242
|
form: "single",
|
|
42862
43243
|
optional: true
|
|
42863
43244
|
}],
|
|
42864
|
-
"
|
|
43245
|
+
"recordingArchive.locateSegment": [{
|
|
42865
43246
|
name: "deviceId",
|
|
42866
43247
|
form: "single",
|
|
42867
43248
|
optional: false
|
|
42868
43249
|
}],
|
|
42869
|
-
"
|
|
43250
|
+
"recordingArchive.pruneFootage": [{
|
|
42870
43251
|
name: "deviceId",
|
|
42871
43252
|
form: "single",
|
|
42872
43253
|
optional: false
|
|
42873
43254
|
}],
|
|
42874
|
-
"
|
|
43255
|
+
"recordingArchive.readGopBytes": [{
|
|
42875
43256
|
name: "deviceId",
|
|
42876
43257
|
form: "single",
|
|
42877
43258
|
optional: false
|
|
42878
43259
|
}],
|
|
42879
|
-
"
|
|
43260
|
+
"recordingArchive.readSegmentBytes": [{
|
|
42880
43261
|
name: "deviceId",
|
|
42881
43262
|
form: "single",
|
|
42882
43263
|
optional: false
|
|
42883
43264
|
}],
|
|
42884
|
-
"
|
|
43265
|
+
"recordingArchive.readWindowBytes": [{
|
|
42885
43266
|
name: "deviceId",
|
|
42886
43267
|
form: "single",
|
|
42887
43268
|
optional: false
|
|
42888
43269
|
}],
|
|
42889
|
-
"
|
|
43270
|
+
"recordingArchive.reconcileLedgerAgainstDisk": [{
|
|
42890
43271
|
name: "deviceId",
|
|
42891
43272
|
form: "single",
|
|
42892
43273
|
optional: true
|
|
42893
43274
|
}],
|
|
42894
|
-
"
|
|
43275
|
+
"recordingArchive.relocateFootage": [{
|
|
42895
43276
|
name: "deviceId",
|
|
42896
43277
|
form: "single",
|
|
42897
43278
|
optional: true
|
|
42898
43279
|
}],
|
|
42899
|
-
"
|
|
43280
|
+
"recordingArchive.renderClip": [{
|
|
42900
43281
|
name: "deviceId",
|
|
42901
43282
|
form: "single",
|
|
42902
43283
|
optional: false
|
|
42903
43284
|
}],
|
|
42904
|
-
"
|
|
43285
|
+
"recordingArchive.renderGif": [{
|
|
42905
43286
|
name: "deviceId",
|
|
42906
43287
|
form: "single",
|
|
42907
43288
|
optional: false
|
|
42908
43289
|
}],
|
|
42909
|
-
"
|
|
43290
|
+
"recordingArchive.rescanStorage": [{
|
|
42910
43291
|
name: "deviceId",
|
|
42911
43292
|
form: "single",
|
|
42912
43293
|
optional: false
|
|
42913
43294
|
}],
|
|
42914
|
-
"
|
|
43295
|
+
"recordingArchive.setDeviceConfig": [{
|
|
42915
43296
|
name: "deviceId",
|
|
42916
43297
|
form: "single",
|
|
42917
43298
|
optional: false
|
|
42918
43299
|
}],
|
|
42919
|
-
"
|
|
43300
|
+
"recordingArchive.setDevicePlacement": [{
|
|
42920
43301
|
name: "deviceId",
|
|
42921
43302
|
form: "single",
|
|
42922
43303
|
optional: false
|
|
42923
43304
|
}],
|
|
42924
|
-
"
|
|
43305
|
+
"recordingArchive.startStorageMigrationMove": [{
|
|
42925
43306
|
name: "deviceId",
|
|
42926
43307
|
form: "single",
|
|
42927
43308
|
optional: true
|
|
@@ -43390,6 +43771,37 @@ var NC_AUDIO_DEFAULTS = {
|
|
|
43390
43771
|
};
|
|
43391
43772
|
new Set(["devices", "classes"]);
|
|
43392
43773
|
NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
|
|
43774
|
+
var RULE_BODY_ONLY = ["body"];
|
|
43775
|
+
var RULE_TEXT = ["title", "body"];
|
|
43776
|
+
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
43777
|
+
var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
|
|
43778
|
+
var UPDATES = [
|
|
43779
|
+
"addon-update-available",
|
|
43780
|
+
"server-update-available",
|
|
43781
|
+
"wrapper-update-available"
|
|
43782
|
+
];
|
|
43783
|
+
var PACKAGE_UPDATES = ["addon-update-available", "server-update-available"];
|
|
43784
|
+
var ALARM = [
|
|
43785
|
+
"alarm-triggered",
|
|
43786
|
+
"alarm-armed",
|
|
43787
|
+
"alarm-disarmed",
|
|
43788
|
+
"alarm-arming",
|
|
43789
|
+
"alarm-arm-refused"
|
|
43790
|
+
];
|
|
43791
|
+
var COMBINED_ALARM = ["alarm-triggered"];
|
|
43792
|
+
var DEVICE_EVENTS = [
|
|
43793
|
+
"device-online",
|
|
43794
|
+
"device-offline",
|
|
43795
|
+
"device-disabled",
|
|
43796
|
+
"device-enabled",
|
|
43797
|
+
...BATTERY,
|
|
43798
|
+
...CONSUMABLE,
|
|
43799
|
+
"stream-online",
|
|
43800
|
+
"stream-offline",
|
|
43801
|
+
"detection-blind",
|
|
43802
|
+
...ALARM
|
|
43803
|
+
];
|
|
43804
|
+
[...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];
|
|
43393
43805
|
/**
|
|
43394
43806
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
43395
43807
|
*
|
|
@@ -43886,7 +44298,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
43886
44298
|
capability: adminUiCapability,
|
|
43887
44299
|
provider: {
|
|
43888
44300
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
43889
|
-
getVersion: async () => ({ version: "1.2.
|
|
44301
|
+
getVersion: async () => ({ version: "1.2.142" })
|
|
43890
44302
|
}
|
|
43891
44303
|
}];
|
|
43892
44304
|
}
|