@camstack/addon-provider-hikvision 1.2.49 → 1.2.50
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
|
@@ -25353,6 +25353,33 @@ var intercomCapability = {
|
|
|
25353
25353
|
deviceNative: true,
|
|
25354
25354
|
mode: "singleton",
|
|
25355
25355
|
deviceTypes: [DeviceType.Camera],
|
|
25356
|
+
/**
|
|
25357
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
25358
|
+
*
|
|
25359
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
25360
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
25361
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
25362
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
25363
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
25364
|
+
* `admin` because they change what the device IS.
|
|
25365
|
+
*
|
|
25366
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
25367
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
25368
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
25369
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
25370
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
25371
|
+
* camera 7.
|
|
25372
|
+
*
|
|
25373
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
25374
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
25375
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
25376
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
25377
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
25378
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
25379
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
25380
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
25381
|
+
* preset promises a cap no row of that preset can reach.
|
|
25382
|
+
*/
|
|
25356
25383
|
methods: {
|
|
25357
25384
|
/**
|
|
25358
25385
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -25365,7 +25392,7 @@ var intercomCapability = {
|
|
|
25365
25392
|
sdpOffer: string()
|
|
25366
25393
|
}), {
|
|
25367
25394
|
kind: "mutation",
|
|
25368
|
-
auth: "
|
|
25395
|
+
auth: "protected"
|
|
25369
25396
|
}),
|
|
25370
25397
|
handleAnswer: method(object({
|
|
25371
25398
|
deviceId: number(),
|
|
@@ -25373,7 +25400,7 @@ var intercomCapability = {
|
|
|
25373
25400
|
sdpAnswer: string()
|
|
25374
25401
|
}), _void(), {
|
|
25375
25402
|
kind: "mutation",
|
|
25376
|
-
auth: "
|
|
25403
|
+
auth: "protected"
|
|
25377
25404
|
}),
|
|
25378
25405
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25379
25406
|
stopSession: method(object({
|
|
@@ -25381,7 +25408,7 @@ var intercomCapability = {
|
|
|
25381
25408
|
sessionId: string()
|
|
25382
25409
|
}), _void(), {
|
|
25383
25410
|
kind: "mutation",
|
|
25384
|
-
auth: "
|
|
25411
|
+
auth: "protected"
|
|
25385
25412
|
}),
|
|
25386
25413
|
/**
|
|
25387
25414
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25394,7 +25421,7 @@ var intercomCapability = {
|
|
|
25394
25421
|
*/
|
|
25395
25422
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
|
|
25396
25423
|
kind: "mutation",
|
|
25397
|
-
auth: "
|
|
25424
|
+
auth: "protected"
|
|
25398
25425
|
}),
|
|
25399
25426
|
/**
|
|
25400
25427
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25429,12 +25456,12 @@ var intercomCapability = {
|
|
|
25429
25456
|
sequenceNumber: number().int()
|
|
25430
25457
|
}), object({ accepted: boolean() }), {
|
|
25431
25458
|
kind: "mutation",
|
|
25432
|
-
auth: "
|
|
25459
|
+
auth: "protected"
|
|
25433
25460
|
}),
|
|
25434
25461
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25435
25462
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25436
25463
|
kind: "mutation",
|
|
25437
|
-
auth: "
|
|
25464
|
+
auth: "protected"
|
|
25438
25465
|
})
|
|
25439
25466
|
},
|
|
25440
25467
|
events: { onStatusChanged: { data: object({
|
package/dist/addon.mjs
CHANGED
|
@@ -25354,6 +25354,33 @@ var intercomCapability = {
|
|
|
25354
25354
|
deviceNative: true,
|
|
25355
25355
|
mode: "singleton",
|
|
25356
25356
|
deviceTypes: [DeviceType.Camera],
|
|
25357
|
+
/**
|
|
25358
|
+
* **Auth tier: `protected` on every method — deliberate, and load-bearing.**
|
|
25359
|
+
*
|
|
25360
|
+
* Talking through a camera is an OPERATE action, not a CONFIGURE one. This
|
|
25361
|
+
* cap has no configuration surface at all: all six methods open, feed and
|
|
25362
|
+
* close one live audio session against one `deviceId`. That is the same
|
|
25363
|
+
* authority as `ptz.move` or `snapshot.getSnapshot`, both `protected` — and
|
|
25364
|
+
* the opposite of `ptz.savePreset` / `snapshot.invalidateCache`, which are
|
|
25365
|
+
* `admin` because they change what the device IS.
|
|
25366
|
+
*
|
|
25367
|
+
* `protected` does not mean ungated: `protectedProcedure` runs the
|
|
25368
|
+
* `METHOD_ACCESS_MAP` scope check, and every method here is `scope: 'device'`
|
|
25369
|
+
* with `access: 'create'` and a `deviceId` in its input. So a caller needs a
|
|
25370
|
+
* grant that covers THAT camera at `create` — a `camera-viewer` (`view`
|
|
25371
|
+
* only) still cannot talk, and a grant on camera 5 cannot talk through
|
|
25372
|
+
* camera 7.
|
|
25373
|
+
*
|
|
25374
|
+
* Every method was `auth: 'admin'` from the initial commit, which made the
|
|
25375
|
+
* cap unreachable by every non-admin principal — `adminProcedure` throws
|
|
25376
|
+
* `FORBIDDEN: Admin required` BEFORE the scope check runs, so the scope
|
|
25377
|
+
* machinery generated for this cap (`METHOD_ACCESS_MAP`,
|
|
25378
|
+
* `DEVICE_SCOPED_CAPS`, `METHOD_DEVICE_SELECTORS`) was complete and dead. The
|
|
25379
|
+
* `camera-operator` scope preset has promised "PTZ control, intercom,
|
|
25380
|
+
* snapshots" since that same commit; the promise could not be kept. Recorded
|
|
25381
|
+
* as D289; `scripts/check-scope-preset-promises.ts` now fails the build if a
|
|
25382
|
+
* preset promises a cap no row of that preset can reach.
|
|
25383
|
+
*/
|
|
25357
25384
|
methods: {
|
|
25358
25385
|
/**
|
|
25359
25386
|
* Open a server-side WebRTC audio-only session. Returns an SDP
|
|
@@ -25366,7 +25393,7 @@ var intercomCapability = {
|
|
|
25366
25393
|
sdpOffer: string()
|
|
25367
25394
|
}), {
|
|
25368
25395
|
kind: "mutation",
|
|
25369
|
-
auth: "
|
|
25396
|
+
auth: "protected"
|
|
25370
25397
|
}),
|
|
25371
25398
|
handleAnswer: method(object({
|
|
25372
25399
|
deviceId: number(),
|
|
@@ -25374,7 +25401,7 @@ var intercomCapability = {
|
|
|
25374
25401
|
sdpAnswer: string()
|
|
25375
25402
|
}), _void(), {
|
|
25376
25403
|
kind: "mutation",
|
|
25377
|
-
auth: "
|
|
25404
|
+
auth: "protected"
|
|
25378
25405
|
}),
|
|
25379
25406
|
/** Close explicitly. Server also auto-closes on 30s idle. */
|
|
25380
25407
|
stopSession: method(object({
|
|
@@ -25382,7 +25409,7 @@ var intercomCapability = {
|
|
|
25382
25409
|
sessionId: string()
|
|
25383
25410
|
}), _void(), {
|
|
25384
25411
|
kind: "mutation",
|
|
25385
|
-
auth: "
|
|
25412
|
+
auth: "protected"
|
|
25386
25413
|
}),
|
|
25387
25414
|
/**
|
|
25388
25415
|
* Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
|
|
@@ -25395,7 +25422,7 @@ var intercomCapability = {
|
|
|
25395
25422
|
*/
|
|
25396
25423
|
startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
|
|
25397
25424
|
kind: "mutation",
|
|
25398
|
-
auth: "
|
|
25425
|
+
auth: "protected"
|
|
25399
25426
|
}),
|
|
25400
25427
|
/**
|
|
25401
25428
|
* Push one chunk of talk-back audio onto the active talk session.
|
|
@@ -25430,12 +25457,12 @@ var intercomCapability = {
|
|
|
25430
25457
|
sequenceNumber: number().int()
|
|
25431
25458
|
}), object({ accepted: boolean() }), {
|
|
25432
25459
|
kind: "mutation",
|
|
25433
|
-
auth: "
|
|
25460
|
+
auth: "protected"
|
|
25434
25461
|
}),
|
|
25435
25462
|
/** Close the raw-PCM talk session. Idempotent. */
|
|
25436
25463
|
endTalkSession: method(object({ deviceId: number() }), _void(), {
|
|
25437
25464
|
kind: "mutation",
|
|
25438
|
-
auth: "
|
|
25465
|
+
auth: "protected"
|
|
25439
25466
|
})
|
|
25440
25467
|
},
|
|
25441
25468
|
events: { onStatusChanged: { data: object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-hikvision",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.50",
|
|
4
4
|
"description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|