@camstack/addon-provider-unifi 0.2.113 → 0.2.115

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 CHANGED
@@ -5360,7 +5360,7 @@ var ZodIssueCode = {
5360
5360
  var ZodFirstPartyTypeKind;
5361
5361
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5362
5362
  //#endregion
5363
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5363
+ //#region ../types/dist/sleep-GU_us3DG.mjs
5364
5364
  /**
5365
5365
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5366
5366
  * window to float samples (D455).
@@ -11850,6 +11850,24 @@ var GetStreamWithCodecInputSchema = object({
11850
11850
  });
11851
11851
  var RtpSourceSchema = object({
11852
11852
  url: string(),
11853
+ /**
11854
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11855
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11856
+ *
11857
+ * The broker answers it because the broker is the only thing that can:
11858
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11859
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11860
+ * cap bindings would be a second authority, and two authorities on the same
11861
+ * question is how a composite camera ends up dialling a sleeping camera
11862
+ * because its own copy of the rule was a release behind.
11863
+ *
11864
+ * `null` is a real answer and is never a live url in disguise: a consumer
11865
+ * that silently fell back to {@link url} would perform exactly the wake this
11866
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11867
+ * transcode hands back an egress the broker is feeding itself, which has no
11868
+ * sentry counterpart.
11869
+ */
11870
+ sentryUrl: string().nullable().optional(),
11853
11871
  videoCodec: _enum(["H264", "H265"]),
11854
11872
  audioCodec: string(),
11855
11873
  resolution: object({
@@ -28888,6 +28906,118 @@ var motionTriggerCapability = {
28888
28906
  durability: "session"
28889
28907
  };
28890
28908
  /**
28909
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28910
+ * page.
28911
+ *
28912
+ * ## Why this is a capability and not an addon settings schema
28913
+ *
28914
+ * It was one, and it did not render. The addon declared the editor as a
28915
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28916
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28917
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28918
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28919
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28920
+ * not on it "falls off silently".
28921
+ *
28922
+ * Adding a fifth name to that list would have been the wrong fix twice over:
28923
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
28924
+ * beside PTZ and motion zones on the camera itself. The device page is
28925
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
28926
+ * and this cap carries its section the way `recording` does, by RETURNING it
28927
+ * from `getDeviceSettingsContribution`.
28928
+ *
28929
+ * Seven other widgets are still declared the other way, through a
28930
+ * `deviceConfig.ui` block the framework derives a section from. That route
28931
+ * gives the addon no say in where its own panel lands and no way to decline
28932
+ * for a device the panel does not suit, which is why this one does not use it.
28933
+ *
28934
+ * ## Why one addon may implement it
28935
+ *
28936
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
28937
+ * itself. Nothing else declares a composite camera, so nothing else has a
28938
+ * layout — and the device-scoped route means the widget asks THE camera, not
28939
+ * "the camera-grid addon", which is what let the old custom-action pair be
28940
+ * reached only by a caller that already knew the addon id.
28941
+ *
28942
+ * ## The tab
28943
+ *
28944
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28945
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28946
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28947
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28948
+ * next to "PTZ").
28949
+ */
28950
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28951
+ var GridNormalizedRectSchema = object({
28952
+ x: number().min(0).max(1),
28953
+ y: number().min(0).max(1),
28954
+ width: number().gt(0).max(1),
28955
+ height: number().gt(0).max(1)
28956
+ });
28957
+ /**
28958
+ * One source camera, the part of its picture taken, and where that part lands.
28959
+ *
28960
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28961
+ * — a profile switch, a firmware update, a substream that comes back different
28962
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28963
+ * which is the class of bug nobody files.
28964
+ */
28965
+ var GridLayoutCellSchema = object({
28966
+ deviceId: number().int().positive(),
28967
+ /** The part of the SOURCE taken, normalized against the source. */
28968
+ source: GridNormalizedRectSchema,
28969
+ /** Where it lands, normalized against the CANVAS. */
28970
+ cell: GridNormalizedRectSchema
28971
+ });
28972
+ /**
28973
+ * Which profiles this grid can actually compose, and why not.
28974
+ *
28975
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28976
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
28977
+ * the sources, because "this grid has no low" is not a finding — "615 has no
28978
+ * low" is, and it is the one an operator can act on.
28979
+ */
28980
+ var GridProfileOfferSchema = object({
28981
+ profile: _enum([
28982
+ "high",
28983
+ "mid",
28984
+ "low"
28985
+ ]),
28986
+ offered: boolean(),
28987
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28988
+ missingSources: array(number().int().positive())
28989
+ });
28990
+ var GridLayoutViewSchema = object({
28991
+ /** The persisted grid row this camera was declared from. */
28992
+ instanceId: string(),
28993
+ deviceId: number().int().nonnegative(),
28994
+ name: string(),
28995
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
28996
+ width: number().int(),
28997
+ height: number().int(),
28998
+ fps: number().int(),
28999
+ cells: array(GridLayoutCellSchema),
29000
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29001
+ profiles: array(GridProfileOfferSchema)
29002
+ });
29003
+ var GridLayoutPatchSchema = object({
29004
+ deviceId: number().int().nonnegative(),
29005
+ name: string().min(1).max(160).optional(),
29006
+ width: number().int().min(160).max(7680).optional(),
29007
+ height: number().int().min(120).max(4320).optional(),
29008
+ fps: number().int().min(1).max(60).optional(),
29009
+ /**
29010
+ * The whole cell list at once. A per-cell patch would need an ordering the
29011
+ * editor does not have, and a half-applied layout is a picture nobody asked
29012
+ * for.
29013
+ */
29014
+ cells: array(GridLayoutCellSchema).max(16)
29015
+ });
29016
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29017
+ kind: "mutation",
29018
+ auth: "admin"
29019
+ });
29020
+ /**
28891
29021
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28892
29022
  * on-camera motion-detection mask is a single `grid` region (a row-major
28893
29023
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -36614,6 +36744,18 @@ Object.freeze({
36614
36744
  addonId: null,
36615
36745
  access: "view"
36616
36746
  },
36747
+ "cameraGridLayout.getLayout": {
36748
+ capName: "camera-grid-layout",
36749
+ capScope: "device",
36750
+ addonId: null,
36751
+ access: "view"
36752
+ },
36753
+ "cameraGridLayout.saveLayout": {
36754
+ capName: "camera-grid-layout",
36755
+ capScope: "device",
36756
+ addonId: null,
36757
+ access: "create"
36758
+ },
36617
36759
  "cameraStreams.getBrokerStreams": {
36618
36760
  capName: "camera-streams",
36619
36761
  capScope: "device",
@@ -42313,6 +42455,21 @@ Object.freeze({
42313
42455
  form: "single",
42314
42456
  optional: false
42315
42457
  }],
42458
+ "cameraGridLayout.getLayout": [{
42459
+ name: "deviceId",
42460
+ form: "single",
42461
+ optional: false
42462
+ }],
42463
+ "cameraGridLayout.saveLayout": [{
42464
+ name: "cells",
42465
+ form: "object-array",
42466
+ optional: false,
42467
+ itemField: "deviceId"
42468
+ }, {
42469
+ name: "deviceId",
42470
+ form: "single",
42471
+ optional: false
42472
+ }],
42316
42473
  "cameraStreams.getBrokerStreams": [{
42317
42474
  name: "deviceId",
42318
42475
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
5359
5359
  var ZodFirstPartyTypeKind;
5360
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5361
5361
  //#endregion
5362
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5362
+ //#region ../types/dist/sleep-GU_us3DG.mjs
5363
5363
  /**
5364
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5365
5365
  * window to float samples (D455).
@@ -11849,6 +11849,24 @@ var GetStreamWithCodecInputSchema = object({
11849
11849
  });
11850
11850
  var RtpSourceSchema = object({
11851
11851
  url: string(),
11852
+ /**
11853
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11854
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11855
+ *
11856
+ * The broker answers it because the broker is the only thing that can:
11857
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11858
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11859
+ * cap bindings would be a second authority, and two authorities on the same
11860
+ * question is how a composite camera ends up dialling a sleeping camera
11861
+ * because its own copy of the rule was a release behind.
11862
+ *
11863
+ * `null` is a real answer and is never a live url in disguise: a consumer
11864
+ * that silently fell back to {@link url} would perform exactly the wake this
11865
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11866
+ * transcode hands back an egress the broker is feeding itself, which has no
11867
+ * sentry counterpart.
11868
+ */
11869
+ sentryUrl: string().nullable().optional(),
11852
11870
  videoCodec: _enum(["H264", "H265"]),
11853
11871
  audioCodec: string(),
11854
11872
  resolution: object({
@@ -28887,6 +28905,118 @@ var motionTriggerCapability = {
28887
28905
  durability: "session"
28888
28906
  };
28889
28907
  /**
28908
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28909
+ * page.
28910
+ *
28911
+ * ## Why this is a capability and not an addon settings schema
28912
+ *
28913
+ * It was one, and it did not render. The addon declared the editor as a
28914
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28915
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28916
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28917
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28918
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28919
+ * not on it "falls off silently".
28920
+ *
28921
+ * Adding a fifth name to that list would have been the wrong fix twice over:
28922
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
28923
+ * beside PTZ and motion zones on the camera itself. The device page is
28924
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
28925
+ * and this cap carries its section the way `recording` does, by RETURNING it
28926
+ * from `getDeviceSettingsContribution`.
28927
+ *
28928
+ * Seven other widgets are still declared the other way, through a
28929
+ * `deviceConfig.ui` block the framework derives a section from. That route
28930
+ * gives the addon no say in where its own panel lands and no way to decline
28931
+ * for a device the panel does not suit, which is why this one does not use it.
28932
+ *
28933
+ * ## Why one addon may implement it
28934
+ *
28935
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
28936
+ * itself. Nothing else declares a composite camera, so nothing else has a
28937
+ * layout — and the device-scoped route means the widget asks THE camera, not
28938
+ * "the camera-grid addon", which is what let the old custom-action pair be
28939
+ * reached only by a caller that already knew the addon id.
28940
+ *
28941
+ * ## The tab
28942
+ *
28943
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28944
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28945
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28946
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28947
+ * next to "PTZ").
28948
+ */
28949
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28950
+ var GridNormalizedRectSchema = object({
28951
+ x: number().min(0).max(1),
28952
+ y: number().min(0).max(1),
28953
+ width: number().gt(0).max(1),
28954
+ height: number().gt(0).max(1)
28955
+ });
28956
+ /**
28957
+ * One source camera, the part of its picture taken, and where that part lands.
28958
+ *
28959
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28960
+ * — a profile switch, a firmware update, a substream that comes back different
28961
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28962
+ * which is the class of bug nobody files.
28963
+ */
28964
+ var GridLayoutCellSchema = object({
28965
+ deviceId: number().int().positive(),
28966
+ /** The part of the SOURCE taken, normalized against the source. */
28967
+ source: GridNormalizedRectSchema,
28968
+ /** Where it lands, normalized against the CANVAS. */
28969
+ cell: GridNormalizedRectSchema
28970
+ });
28971
+ /**
28972
+ * Which profiles this grid can actually compose, and why not.
28973
+ *
28974
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28975
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
28976
+ * the sources, because "this grid has no low" is not a finding — "615 has no
28977
+ * low" is, and it is the one an operator can act on.
28978
+ */
28979
+ var GridProfileOfferSchema = object({
28980
+ profile: _enum([
28981
+ "high",
28982
+ "mid",
28983
+ "low"
28984
+ ]),
28985
+ offered: boolean(),
28986
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28987
+ missingSources: array(number().int().positive())
28988
+ });
28989
+ var GridLayoutViewSchema = object({
28990
+ /** The persisted grid row this camera was declared from. */
28991
+ instanceId: string(),
28992
+ deviceId: number().int().nonnegative(),
28993
+ name: string(),
28994
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
28995
+ width: number().int(),
28996
+ height: number().int(),
28997
+ fps: number().int(),
28998
+ cells: array(GridLayoutCellSchema),
28999
+ /** What the catalog will publish, and what it refuses to. Read-only. */
29000
+ profiles: array(GridProfileOfferSchema)
29001
+ });
29002
+ var GridLayoutPatchSchema = object({
29003
+ deviceId: number().int().nonnegative(),
29004
+ name: string().min(1).max(160).optional(),
29005
+ width: number().int().min(160).max(7680).optional(),
29006
+ height: number().int().min(120).max(4320).optional(),
29007
+ fps: number().int().min(1).max(60).optional(),
29008
+ /**
29009
+ * The whole cell list at once. A per-cell patch would need an ordering the
29010
+ * editor does not have, and a half-applied layout is a picture nobody asked
29011
+ * for.
29012
+ */
29013
+ cells: array(GridLayoutCellSchema).max(16)
29014
+ });
29015
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29016
+ kind: "mutation",
29017
+ auth: "admin"
29018
+ });
29019
+ /**
28890
29020
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28891
29021
  * on-camera motion-detection mask is a single `grid` region (a row-major
28892
29022
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -36613,6 +36743,18 @@ Object.freeze({
36613
36743
  addonId: null,
36614
36744
  access: "view"
36615
36745
  },
36746
+ "cameraGridLayout.getLayout": {
36747
+ capName: "camera-grid-layout",
36748
+ capScope: "device",
36749
+ addonId: null,
36750
+ access: "view"
36751
+ },
36752
+ "cameraGridLayout.saveLayout": {
36753
+ capName: "camera-grid-layout",
36754
+ capScope: "device",
36755
+ addonId: null,
36756
+ access: "create"
36757
+ },
36616
36758
  "cameraStreams.getBrokerStreams": {
36617
36759
  capName: "camera-streams",
36618
36760
  capScope: "device",
@@ -42312,6 +42454,21 @@ Object.freeze({
42312
42454
  form: "single",
42313
42455
  optional: false
42314
42456
  }],
42457
+ "cameraGridLayout.getLayout": [{
42458
+ name: "deviceId",
42459
+ form: "single",
42460
+ optional: false
42461
+ }],
42462
+ "cameraGridLayout.saveLayout": [{
42463
+ name: "cells",
42464
+ form: "object-array",
42465
+ optional: false,
42466
+ itemField: "deviceId"
42467
+ }, {
42468
+ name: "deviceId",
42469
+ form: "single",
42470
+ optional: false
42471
+ }],
42315
42472
  "cameraStreams.getBrokerStreams": [{
42316
42473
  name: "deviceId",
42317
42474
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.113",
3
+ "version": "0.2.115",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",