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