@camstack/addon-provider-gree 0.2.40 → 0.2.41
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
|
@@ -24945,6 +24945,33 @@ var intercomCapability = {
|
|
|
24945
24945
|
deviceNative: true,
|
|
24946
24946
|
mode: "singleton",
|
|
24947
24947
|
deviceTypes: [DeviceType.Camera],
|
|
24948
|
+
/**
|
|
24949
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
24950
|
+
*
|
|
24951
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
24952
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
24953
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
24954
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
24955
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
24956
|
+
* `admin` because they change what the device IS.
|
|
24957
|
+
*
|
|
24958
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
24959
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
24960
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
24961
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
24962
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
24963
|
+
* camera 7.
|
|
24964
|
+
*
|
|
24965
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
24966
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
24967
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
24968
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
24969
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
24970
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
24971
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
24972
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
24973
|
+
* preset promises a cap no row of that preset can reach.
|
|
24974
|
+
*/
|
|
24948
24975
|
methods: {
|
|
24949
24976
|
/**
|
|
24950
24977
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -24957,7 +24984,7 @@ var intercomCapability = {
|
|
|
24957
24984
|
sdpOffer: string()
|
|
24958
24985
|
}), {
|
|
24959
24986
|
kind: "mutation",
|
|
24960
|
-
auth: "
|
|
24987
|
+
auth: "protected"
|
|
24961
24988
|
}),
|
|
24962
24989
|
handleAnswer: method(object({
|
|
24963
24990
|
deviceId: number(),
|
|
@@ -24965,7 +24992,7 @@ var intercomCapability = {
|
|
|
24965
24992
|
sdpAnswer: string()
|
|
24966
24993
|
}), _void(), {
|
|
24967
24994
|
kind: "mutation",
|
|
24968
|
-
auth: "
|
|
24995
|
+
auth: "protected"
|
|
24969
24996
|
}),
|
|
24970
24997
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
24971
24998
|
stopSession: method(object({
|
|
@@ -24973,7 +25000,7 @@ var intercomCapability = {
|
|
|
24973
25000
|
sessionId: string()
|
|
24974
25001
|
}), _void(), {
|
|
24975
25002
|
kind: "mutation",
|
|
24976
|
-
auth: "
|
|
25003
|
+
auth: "protected"
|
|
24977
25004
|
}),
|
|
24978
25005
|
/**
|
|
24979
25006
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -24986,7 +25013,7 @@ var intercomCapability = {
|
|
|
24986
25013
|
*/
|
|
24987
25014
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
|
|
24988
25015
|
kind: "mutation",
|
|
24989
|
-
auth: "
|
|
25016
|
+
auth: "protected"
|
|
24990
25017
|
}),
|
|
24991
25018
|
/**
|
|
24992
25019
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25021,12 +25048,12 @@ var intercomCapability = {
|
|
|
25021
25048
|
sequenceNumber: number().int()
|
|
25022
25049
|
}), object({ accepted: boolean() }), {
|
|
25023
25050
|
kind: "mutation",
|
|
25024
|
-
auth: "
|
|
25051
|
+
auth: "protected"
|
|
25025
25052
|
}),
|
|
25026
25053
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25027
25054
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25028
25055
|
kind: "mutation",
|
|
25029
|
-
auth: "
|
|
25056
|
+
auth: "protected"
|
|
25030
25057
|
})
|
|
25031
25058
|
},
|
|
25032
25059
|
events: { onStatusChanged: { data: object({
|
package/dist/addon.mjs
CHANGED
|
@@ -24944,6 +24944,33 @@ var intercomCapability = {
|
|
|
24944
24944
|
deviceNative: true,
|
|
24945
24945
|
mode: "singleton",
|
|
24946
24946
|
deviceTypes: [DeviceType.Camera],
|
|
24947
|
+
/**
|
|
24948
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
24949
|
+
*
|
|
24950
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
24951
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
24952
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
24953
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
24954
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
24955
|
+
* `admin` because they change what the device IS.
|
|
24956
|
+
*
|
|
24957
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
24958
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
24959
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
24960
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
24961
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
24962
|
+
* camera 7.
|
|
24963
|
+
*
|
|
24964
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
24965
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
24966
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
24967
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
24968
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
24969
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
24970
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
24971
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
24972
|
+
* preset promises a cap no row of that preset can reach.
|
|
24973
|
+
*/
|
|
24947
24974
|
methods: {
|
|
24948
24975
|
/**
|
|
24949
24976
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -24956,7 +24983,7 @@ var intercomCapability = {
|
|
|
24956
24983
|
sdpOffer: string()
|
|
24957
24984
|
}), {
|
|
24958
24985
|
kind: "mutation",
|
|
24959
|
-
auth: "
|
|
24986
|
+
auth: "protected"
|
|
24960
24987
|
}),
|
|
24961
24988
|
handleAnswer: method(object({
|
|
24962
24989
|
deviceId: number(),
|
|
@@ -24964,7 +24991,7 @@ var intercomCapability = {
|
|
|
24964
24991
|
sdpAnswer: string()
|
|
24965
24992
|
}), _void(), {
|
|
24966
24993
|
kind: "mutation",
|
|
24967
|
-
auth: "
|
|
24994
|
+
auth: "protected"
|
|
24968
24995
|
}),
|
|
24969
24996
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
24970
24997
|
stopSession: method(object({
|
|
@@ -24972,7 +24999,7 @@ var intercomCapability = {
|
|
|
24972
24999
|
sessionId: string()
|
|
24973
25000
|
}), _void(), {
|
|
24974
25001
|
kind: "mutation",
|
|
24975
|
-
auth: "
|
|
25002
|
+
auth: "protected"
|
|
24976
25003
|
}),
|
|
24977
25004
|
/**
|
|
24978
25005
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -24985,7 +25012,7 @@ var intercomCapability = {
|
|
|
24985
25012
|
*/
|
|
24986
25013
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
|
|
24987
25014
|
kind: "mutation",
|
|
24988
|
-
auth: "
|
|
25015
|
+
auth: "protected"
|
|
24989
25016
|
}),
|
|
24990
25017
|
/**
|
|
24991
25018
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25020,12 +25047,12 @@ var intercomCapability = {
|
|
|
25020
25047
|
sequenceNumber: number().int()
|
|
25021
25048
|
}), object({ accepted: boolean() }), {
|
|
25022
25049
|
kind: "mutation",
|
|
25023
|
-
auth: "
|
|
25050
|
+
auth: "protected"
|
|
25024
25051
|
}),
|
|
25025
25052
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25026
25053
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25027
25054
|
kind: "mutation",
|
|
25028
|
-
auth: "
|
|
25055
|
+
auth: "protected"
|
|
25029
25056
|
})
|
|
25030
25057
|
},
|
|
25031
25058
|
events: { onStatusChanged: { data: object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-gree",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.41",
|
|
4
4
|
"description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|