@camstack/addon-provider-unifi 0.2.41 → 0.2.42
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 +33 -6
- package/dist/addon.mjs +33 -6
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -24959,6 +24959,33 @@ var intercomCapability = {
|
|
|
24959
24959
|
deviceNative: true,
|
|
24960
24960
|
mode: "singleton",
|
|
24961
24961
|
deviceTypes: [DeviceType.Camera],
|
|
24962
|
+
/**
|
|
24963
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
24964
|
+
*
|
|
24965
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
24966
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
24967
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
24968
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
24969
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
24970
|
+
* `admin` because they change what the device IS.
|
|
24971
|
+
*
|
|
24972
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
24973
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
24974
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
24975
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
24976
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
24977
|
+
* camera 7.
|
|
24978
|
+
*
|
|
24979
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
24980
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
24981
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
24982
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
24983
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
24984
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
24985
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
24986
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
24987
|
+
* preset promises a cap no row of that preset can reach.
|
|
24988
|
+
*/
|
|
24962
24989
|
methods: {
|
|
24963
24990
|
/**
|
|
24964
24991
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -24971,7 +24998,7 @@ var intercomCapability = {
|
|
|
24971
24998
|
sdpOffer: string()
|
|
24972
24999
|
}), {
|
|
24973
25000
|
kind: "mutation",
|
|
24974
|
-
auth: "
|
|
25001
|
+
auth: "protected"
|
|
24975
25002
|
}),
|
|
24976
25003
|
handleAnswer: method(object({
|
|
24977
25004
|
deviceId: number(),
|
|
@@ -24979,7 +25006,7 @@ var intercomCapability = {
|
|
|
24979
25006
|
sdpAnswer: string()
|
|
24980
25007
|
}), _void(), {
|
|
24981
25008
|
kind: "mutation",
|
|
24982
|
-
auth: "
|
|
25009
|
+
auth: "protected"
|
|
24983
25010
|
}),
|
|
24984
25011
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
24985
25012
|
stopSession: method(object({
|
|
@@ -24987,7 +25014,7 @@ var intercomCapability = {
|
|
|
24987
25014
|
sessionId: string()
|
|
24988
25015
|
}), _void(), {
|
|
24989
25016
|
kind: "mutation",
|
|
24990
|
-
auth: "
|
|
25017
|
+
auth: "protected"
|
|
24991
25018
|
}),
|
|
24992
25019
|
/**
|
|
24993
25020
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25000,7 +25027,7 @@ var intercomCapability = {
|
|
|
25000
25027
|
*/
|
|
25001
25028
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
|
|
25002
25029
|
kind: "mutation",
|
|
25003
|
-
auth: "
|
|
25030
|
+
auth: "protected"
|
|
25004
25031
|
}),
|
|
25005
25032
|
/**
|
|
25006
25033
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25035,12 +25062,12 @@ var intercomCapability = {
|
|
|
25035
25062
|
sequenceNumber: number().int()
|
|
25036
25063
|
}), object({ accepted: boolean() }), {
|
|
25037
25064
|
kind: "mutation",
|
|
25038
|
-
auth: "
|
|
25065
|
+
auth: "protected"
|
|
25039
25066
|
}),
|
|
25040
25067
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25041
25068
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25042
25069
|
kind: "mutation",
|
|
25043
|
-
auth: "
|
|
25070
|
+
auth: "protected"
|
|
25044
25071
|
})
|
|
25045
25072
|
},
|
|
25046
25073
|
events: { onStatusChanged: { data: object({
|
package/dist/addon.mjs
CHANGED
|
@@ -24958,6 +24958,33 @@ var intercomCapability = {
|
|
|
24958
24958
|
deviceNative: true,
|
|
24959
24959
|
mode: "singleton",
|
|
24960
24960
|
deviceTypes: [DeviceType.Camera],
|
|
24961
|
+
/**
|
|
24962
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
24963
|
+
*
|
|
24964
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
24965
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
24966
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
24967
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
24968
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
24969
|
+
* `admin` because they change what the device IS.
|
|
24970
|
+
*
|
|
24971
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
24972
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
24973
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
24974
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
24975
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
24976
|
+
* camera 7.
|
|
24977
|
+
*
|
|
24978
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
24979
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
24980
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
24981
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
24982
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
24983
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
24984
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
24985
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
24986
|
+
* preset promises a cap no row of that preset can reach.
|
|
24987
|
+
*/
|
|
24961
24988
|
methods: {
|
|
24962
24989
|
/**
|
|
24963
24990
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -24970,7 +24997,7 @@ var intercomCapability = {
|
|
|
24970
24997
|
sdpOffer: string()
|
|
24971
24998
|
}), {
|
|
24972
24999
|
kind: "mutation",
|
|
24973
|
-
auth: "
|
|
25000
|
+
auth: "protected"
|
|
24974
25001
|
}),
|
|
24975
25002
|
handleAnswer: method(object({
|
|
24976
25003
|
deviceId: number(),
|
|
@@ -24978,7 +25005,7 @@ var intercomCapability = {
|
|
|
24978
25005
|
sdpAnswer: string()
|
|
24979
25006
|
}), _void(), {
|
|
24980
25007
|
kind: "mutation",
|
|
24981
|
-
auth: "
|
|
25008
|
+
auth: "protected"
|
|
24982
25009
|
}),
|
|
24983
25010
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
24984
25011
|
stopSession: method(object({
|
|
@@ -24986,7 +25013,7 @@ var intercomCapability = {
|
|
|
24986
25013
|
sessionId: string()
|
|
24987
25014
|
}), _void(), {
|
|
24988
25015
|
kind: "mutation",
|
|
24989
|
-
auth: "
|
|
25016
|
+
auth: "protected"
|
|
24990
25017
|
}),
|
|
24991
25018
|
/**
|
|
24992
25019
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -24999,7 +25026,7 @@ var intercomCapability = {
|
|
|
24999
25026
|
*/
|
|
25000
25027
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
|
|
25001
25028
|
kind: "mutation",
|
|
25002
|
-
auth: "
|
|
25029
|
+
auth: "protected"
|
|
25003
25030
|
}),
|
|
25004
25031
|
/**
|
|
25005
25032
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25034,12 +25061,12 @@ var intercomCapability = {
|
|
|
25034
25061
|
sequenceNumber: number().int()
|
|
25035
25062
|
}), object({ accepted: boolean() }), {
|
|
25036
25063
|
kind: "mutation",
|
|
25037
|
-
auth: "
|
|
25064
|
+
auth: "protected"
|
|
25038
25065
|
}),
|
|
25039
25066
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25040
25067
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25041
25068
|
kind: "mutation",
|
|
25042
|
-
auth: "
|
|
25069
|
+
auth: "protected"
|
|
25043
25070
|
})
|
|
25044
25071
|
},
|
|
25045
25072
|
events: { onStatusChanged: { data: object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.42",
|
|
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",
|