@camstack/addon-provider-reolink 1.2.64 → 1.2.65

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
@@ -25669,6 +25669,33 @@ var intercomCapability = {
25669
25669
  deviceNative: true,
25670
25670
  mode: "singleton",
25671
25671
  deviceTypes: [DeviceType.Camera],
25672
+ /**
25673
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25674
+ *
25675
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25676
+ * cap has no configuration surface at all: all six methods open, feed and
25677
+ * close one live audio session against one `deviceId`. That is the same
25678
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25679
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25680
+ * `admin` because they change what the device IS.
25681
+ *
25682
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25683
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25684
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25685
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25686
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25687
+ * camera 7.
25688
+ *
25689
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25690
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25691
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25692
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25693
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25694
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25695
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25696
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25697
+ * preset promises a cap no row of that preset can reach.
25698
+ */
25672
25699
  methods: {
25673
25700
  /**
25674
25701
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25681,7 +25708,7 @@ var intercomCapability = {
25681
25708
  sdpOffer: string()
25682
25709
  }), {
25683
25710
  kind: "mutation",
25684
- auth: "admin"
25711
+ auth: "protected"
25685
25712
  }),
25686
25713
  handleAnswer: method(object({
25687
25714
  deviceId: number(),
@@ -25689,7 +25716,7 @@ var intercomCapability = {
25689
25716
  sdpAnswer: string()
25690
25717
  }), _void(), {
25691
25718
  kind: "mutation",
25692
- auth: "admin"
25719
+ auth: "protected"
25693
25720
  }),
25694
25721
  /** Close explicitly. Server also auto-closes on 30s idle. */
25695
25722
  stopSession: method(object({
@@ -25697,7 +25724,7 @@ var intercomCapability = {
25697
25724
  sessionId: string()
25698
25725
  }), _void(), {
25699
25726
  kind: "mutation",
25700
- auth: "admin"
25727
+ auth: "protected"
25701
25728
  }),
25702
25729
  /**
25703
25730
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25710,7 +25737,7 @@ var intercomCapability = {
25710
25737
  */
25711
25738
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25712
25739
  kind: "mutation",
25713
- auth: "admin"
25740
+ auth: "protected"
25714
25741
  }),
25715
25742
  /**
25716
25743
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25745,12 +25772,12 @@ var intercomCapability = {
25745
25772
  sequenceNumber: number().int()
25746
25773
  }), object({ accepted: boolean() }), {
25747
25774
  kind: "mutation",
25748
- auth: "admin"
25775
+ auth: "protected"
25749
25776
  }),
25750
25777
  /** Close the raw-PCM talk session. Idempotent. */
25751
25778
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25752
25779
  kind: "mutation",
25753
- auth: "admin"
25780
+ auth: "protected"
25754
25781
  })
25755
25782
  },
25756
25783
  events: { onStatusChanged: { data: object({
package/dist/addon.mjs CHANGED
@@ -25664,6 +25664,33 @@ var intercomCapability = {
25664
25664
  deviceNative: true,
25665
25665
  mode: "singleton",
25666
25666
  deviceTypes: [DeviceType.Camera],
25667
+ /**
25668
+ * **Auth tier: `protected` on every method — deliberate, and load-bearing.**
25669
+ *
25670
+ * Talking through a camera is an OPERATE action, not a CONFIGURE one. This
25671
+ * cap has no configuration surface at all: all six methods open, feed and
25672
+ * close one live audio session against one `deviceId`. That is the same
25673
+ * authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
25674
+ * the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
25675
+ * `admin` because they change what the device IS.
25676
+ *
25677
+ * `protected` does not mean ungated: `protectedProcedure` runs the
25678
+ * `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
25679
+ * with `access: 'create'` and a `deviceId` in its input. So a caller needs a
25680
+ * grant that covers THAT camera at `create` — a `camera-viewer` (`view`
25681
+ * only) still cannot talk, and a grant on camera 5 cannot talk through
25682
+ * camera 7.
25683
+ *
25684
+ * Every method was `auth: 'admin'` from the initial commit, which made the
25685
+ * cap unreachable by every non-admin principal — `adminProcedure` throws
25686
+ * `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
25687
+ * machinery generated for this cap (`METHOD_ACCESS_MAP`,
25688
+ * `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
25689
+ * `camera-operator` scope preset has promised "PTZ control, intercom,
25690
+ * snapshots" since that same commit; the promise could not be kept. Recorded
25691
+ * as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
25692
+ * preset promises a cap no row of that preset can reach.
25693
+ */
25667
25694
  methods: {
25668
25695
  /**
25669
25696
  * Open a server-side WebRTC audio-only session. Returns an SDP
@@ -25676,7 +25703,7 @@ var intercomCapability = {
25676
25703
  sdpOffer: string()
25677
25704
  }), {
25678
25705
  kind: "mutation",
25679
- auth: "admin"
25706
+ auth: "protected"
25680
25707
  }),
25681
25708
  handleAnswer: method(object({
25682
25709
  deviceId: number(),
@@ -25684,7 +25711,7 @@ var intercomCapability = {
25684
25711
  sdpAnswer: string()
25685
25712
  }), _void(), {
25686
25713
  kind: "mutation",
25687
- auth: "admin"
25714
+ auth: "protected"
25688
25715
  }),
25689
25716
  /** Close explicitly. Server also auto-closes on 30s idle. */
25690
25717
  stopSession: method(object({
@@ -25692,7 +25719,7 @@ var intercomCapability = {
25692
25719
  sessionId: string()
25693
25720
  }), _void(), {
25694
25721
  kind: "mutation",
25695
- auth: "admin"
25722
+ auth: "protected"
25696
25723
  }),
25697
25724
  /**
25698
25725
  * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
@@ -25705,7 +25732,7 @@ var intercomCapability = {
25705
25732
  */
25706
25733
  startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
25707
25734
  kind: "mutation",
25708
- auth: "admin"
25735
+ auth: "protected"
25709
25736
  }),
25710
25737
  /**
25711
25738
  * Push one chunk of talk-back audio onto the active talk session.
@@ -25740,12 +25767,12 @@ var intercomCapability = {
25740
25767
  sequenceNumber: number().int()
25741
25768
  }), object({ accepted: boolean() }), {
25742
25769
  kind: "mutation",
25743
- auth: "admin"
25770
+ auth: "protected"
25744
25771
  }),
25745
25772
  /** Close the raw-PCM talk session. Idempotent. */
25746
25773
  endTalkSession: method(object({ deviceId: number() }), _void(), {
25747
25774
  kind: "mutation",
25748
- auth: "admin"
25775
+ auth: "protected"
25749
25776
  })
25750
25777
  },
25751
25778
  events: { onStatusChanged: { data: object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.64",
3
+ "version": "1.2.65",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",