@camera.ui/sdk 0.0.7 → 0.0.9
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/index.d.ts +41 -7
- package/dist/internal/index.d.ts +6 -4
- package/dist/plugin/contract.js +6 -4
- package/dist/plugin/helper.js +2 -2
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -4427,10 +4427,12 @@ type PythonVersion = '3.11' | '3.12';
|
|
|
4427
4427
|
*/
|
|
4428
4428
|
declare enum PluginRole {
|
|
4429
4429
|
/**
|
|
4430
|
-
*
|
|
4431
|
-
*
|
|
4432
|
-
*
|
|
4433
|
-
*
|
|
4430
|
+
* System-wide aggregator that attaches to cameras owned by *other* plugins
|
|
4431
|
+
* to provide a cross-camera service (e.g. bridging cameras and sensors into a
|
|
4432
|
+
* smart-home platform, or recording and notifications). A hub creates no
|
|
4433
|
+
* cameras of its own and provides no sensors (`provides` must be empty); it
|
|
4434
|
+
* attaches to cameras via the `hub` assignment and typically reads camera and
|
|
4435
|
+
* sensor state through `consumes`.
|
|
4434
4436
|
*/
|
|
4435
4437
|
Hub = "hub",
|
|
4436
4438
|
/**
|
|
@@ -4849,6 +4851,7 @@ interface PluginAPI {
|
|
|
4849
4851
|
* Generic notification types — domain-agnostic. The NotificationManager and
|
|
4850
4852
|
* notifier plugins talk over RPC and JSON-encode these types directly.
|
|
4851
4853
|
*/
|
|
4854
|
+
|
|
4852
4855
|
/**
|
|
4853
4856
|
* Severity classifies how urgent a Notification is. Notifiers map this to
|
|
4854
4857
|
* platform-specific delivery characteristics; the host bypasses user-configured
|
|
@@ -4934,6 +4937,18 @@ interface Notification {
|
|
|
4934
4937
|
*/
|
|
4935
4938
|
adminOnly?: boolean;
|
|
4936
4939
|
}
|
|
4940
|
+
/**
|
|
4941
|
+
* Result of a {@link NotifierInterface.testNotification} call: whether the
|
|
4942
|
+
* test notification was delivered and, when known, to how many devices.
|
|
4943
|
+
*/
|
|
4944
|
+
interface TestNotificationResponse {
|
|
4945
|
+
/** True when the notifier accepted and dispatched the test notification. */
|
|
4946
|
+
delivered: boolean;
|
|
4947
|
+
/** Number of devices the test notification was delivered to. */
|
|
4948
|
+
deviceCount?: number;
|
|
4949
|
+
/** Human-readable status or error detail. */
|
|
4950
|
+
message?: string;
|
|
4951
|
+
}
|
|
4937
4952
|
/**
|
|
4938
4953
|
* Implemented by plugins that deliver notifications. The NotificationManager
|
|
4939
4954
|
* invokes these methods over RPC. Plugins own their device storage — the
|
|
@@ -4972,6 +4987,16 @@ interface NotifierInterface {
|
|
|
4972
4987
|
* manager can probe the next plugin.
|
|
4973
4988
|
*/
|
|
4974
4989
|
updateDevice(deviceId: string, patch: Record<string, unknown>): Promise<NotifierDevice | null>;
|
|
4990
|
+
/**
|
|
4991
|
+
* Sends a test notification to the given devices and returns the delivery
|
|
4992
|
+
* result. `deviceIds` optionally restricts delivery to a subset.
|
|
4993
|
+
*/
|
|
4994
|
+
testNotification?(notification: Notification, deviceIds?: string[]): Promise<TestNotificationResponse | undefined>;
|
|
4995
|
+
/**
|
|
4996
|
+
* Returns the JSON schema used to render the notifier's settings form in
|
|
4997
|
+
* the UI, or undefined for no schema.
|
|
4998
|
+
*/
|
|
4999
|
+
notificationSettings?(): Promise<JsonSchema[] | undefined>;
|
|
4975
5000
|
}
|
|
4976
5001
|
|
|
4977
5002
|
/** Image metadata for detection test requests */
|
|
@@ -5281,6 +5306,15 @@ interface CoreManager {
|
|
|
5281
5306
|
* @returns Array of server addresses
|
|
5282
5307
|
*/
|
|
5283
5308
|
getServerAddresses(): Promise<string[]>;
|
|
5309
|
+
/**
|
|
5310
|
+
* Get the cloud server identity this server is registered as.
|
|
5311
|
+
*
|
|
5312
|
+
* Returns the cloud `server_id` from the active cloud pairing, or an empty
|
|
5313
|
+
* string when the server is not connected to the cloud.
|
|
5314
|
+
*
|
|
5315
|
+
* @returns Cloud server id, or an empty string if not paired
|
|
5316
|
+
*/
|
|
5317
|
+
getCloudServerId(): Promise<string>;
|
|
5284
5318
|
/**
|
|
5285
5319
|
* Get all active plugins that implement a specific interface.
|
|
5286
5320
|
*
|
|
@@ -5531,8 +5565,8 @@ declare function getContractValidationErrors(contract: unknown): string[];
|
|
|
5531
5565
|
*/
|
|
5532
5566
|
declare function validateContractConsistency(contract: PluginContract, pluginName?: string): void;
|
|
5533
5567
|
/**
|
|
5534
|
-
* Reports whether the plugin's role is Hub (
|
|
5535
|
-
*
|
|
5568
|
+
* Reports whether the plugin's role is Hub (a cross-camera aggregator such as a
|
|
5569
|
+
* smart-home bridge or recorder, which owns no cameras of its own).
|
|
5536
5570
|
*
|
|
5537
5571
|
* @param contract - Plugin contract to inspect.
|
|
5538
5572
|
*
|
|
@@ -5729,4 +5763,4 @@ interface OAuthClientCredentialsCapable extends OAuthCapable {
|
|
|
5729
5763
|
}
|
|
5730
5764
|
|
|
5731
5765
|
export { API_EVENT, AudioDetectorSensor, AudioProperty, AudioSensor, BASE_AUDIO_LABELS, BasePlugin, BatteryCapability, BatteryInfo, BatteryProperty, BehaviorSubject, ChargingState, ClassifierDetectorSensor, ClassifierProperty, ClassifierSensor, ClipDetectorSensor, ContactProperty, ContactSensor, DETECTION_ATTRIBUTES, DETECTION_LABELS, Disposable, DoorbellProperty, DoorbellTrigger, EVENT_TRIGGER_TYPES, FaceDetectorSensor, FaceProperty, FaceSensor, GarageControl, GarageProperty, GarageState, HumidityInfo, HumidityProperty, LeakProperty, LeakSensor, LicensePlateDetectorSensor, LicensePlateProperty, LicensePlateSensor, LightCapability, LightControl, LightProperty, LockControl, LockProperty, LockState, MotionDetectorSensor, MotionProperty, MotionSensor, ObjectDetectorSensor, ObjectProperty, ObjectSensor, Observable, OccupancyProperty, OccupancySensor, PTZCapability, PTZControl, PTZProperty, PluginCapability, PluginInterface, PluginRole, RING_AUTO_RESET_MS, ReplaySubject, RtpPacket, SecuritySystem, SecuritySystemProperty, SecuritySystemState, Sensor, SensorCategory, SensorType, Severity, SirenCapability, SirenControl, SirenProperty, SmokeProperty, SmokeSensor, Subject, SwitchControl, SwitchProperty, TemperatureInfo, TemperatureProperty, canCreateCameras, canProvideSensorsToAnyCameras, distinctUntilChanged, filter, firstValueFrom, getContractValidationErrors, hasCapability, hasInterface, isHub, map, mergeMap, pairwise, share, validateContractConsistency };
|
|
5732
|
-
export type { AssignedPlugin, AudioCodec, AudioCodecProperties, AudioDetectionInterface, AudioDetectionPluginResponse, AudioDetectionSettings, AudioFFmpegCodec, AudioFrameData, AudioInputSpec, AudioLabel, AudioMetadata, AudioModelSpec, AudioResult, AudioSensorLike, AudioSensorProperties, AudioStreamInfo, BaseAudioLabel, BaseCamera, BaseCameraConfig, BatteryInfoLike, BatteryInfoProperties, BoundingBox, Camera, CameraAspectRatio, CameraConfig, CameraConfigInputSettings, CameraDetectionSettings, CameraDevice, CameraDeviceSource, CameraFrameWorkerSettings, CameraImplementation, CameraInformation, CameraInput, CameraPluginInfo, CameraRole, CameraSource, CameraType, CameraUiSettings, ClassifierDetection, ClassifierDetectionInterface, ClassifierDetectionPluginResponse, ClassifierResult, ClassifierSensorLike, ClassifierSensorProperties, ClipDetectionInterface, ClipDetectionPluginResponse, ClipEmbedding, ClipResult, ClipTextEmbeddingResult, ContactSensorLike, ContactSensorProperties, CoreManager, CoreManagerEvent, CreateDownloadOptions, CreateStreamDownloadOptions, Detection, DetectionAttribute, DetectionEvent, DetectionEventState, DetectionEventType, DetectionLabel, DetectionLine, DetectionZone, DeviceManager, DeviceStorage, DiscoveredCamera, DiscoveryProvider, DoorbellTriggerLike, DoorbellTriggerProperties, DownloadCleanup, DownloadManager, DownloadToken, EventAttribute, EventDescription, EventDetection, EventSegment, EventTrigger, EventTriggerType, FMTPInfo, FaceDetection, FaceDetectionInterface, FaceDetectionPluginResponse, FaceResult, FaceSensorLike, FaceSensorProperties, Fmp4Session, Fmp4SessionOptions, FormSubmitResponse, FormSubmitSchema, GarageControlLike, GarageControlProperties, Go2RtcRTSPSource, Go2RtcSnapshotSource, Go2RtcWSSource, HardwareAcceleration, HumidityInfoLike, HumidityInfoProperties, ImageMetadata, JsonArraySchema, JsonBaseSchema, JsonBaseSchemaWithoutCallbacks, JsonBooleanSchema, JsonEnumSchema, JsonFactorySchema, JsonNumberSchema, JsonSchema, JsonSchemaArray, JsonSchemaArrayWithoutCallbacks, JsonSchemaBoolean, JsonSchemaBooleanWithoutCallbacks, JsonSchemaButton, JsonSchemaEnum, JsonSchemaEnumWithoutCallbacks, JsonSchemaNumber, JsonSchemaNumberWithoutCallbacks, JsonSchemaString, JsonSchemaStringWithoutCallbacks, JsonSchemaSubmit, JsonSchemaType, JsonSchemaWithoutCallbacks, JsonSchemaWithoutKey, JsonStringSchema, LeakSensorLike, LeakSensorProperties, LicensePlateDetection, LicensePlateDetectionInterface, LicensePlateDetectionPluginResponse, LicensePlateResult, LicensePlateSensorLike, LicensePlateSensorProperties, LightControlLike, LightControlProperties, LineDirection, LockControlLike, LockControlProperties, LoggerService, ModelSpec, MotionDetectionInterface, MotionDetectionPluginResponse, MotionDetectionSettings, MotionResolution, MotionResult, MotionSensorLike, MotionSensorProperties, Notification, NotificationManager, NotifierDevice, NotifierInterface, OAuthAuthCodeFlowCapable, OAuthCapable, OAuthClientCredentialsCapable, OAuthDeviceFlowCapable, OAuthMetadata, OAuthProviderConfig, OAuthProviderDeclaration, OAuthState, OAuthStatus, ObjectDetectionInterface, ObjectDetectionPluginResponse, ObjectDetectionSettings, ObjectModelSpec, ObjectResult, ObjectSensorLike, ObjectSensorProperties, OccupancySensorLike, OccupancySensorProperties, OperatorFn, PTZControlLike, PTZControlProperties, PTZDirection, PTZPosition, PluginAPI, PluginAssignments, PluginConfig, PluginContract, PluginInfo, PluginInterfaces, Point, ProbeAudioCodec, ProbeConfig, ProbeStream, PropertyChangeOf, PtzAutotrackSettings, PythonVersion, RTPInfo, RTSPAudioCodec, RTSPUrlOptions, RtpSession, RtpSessionBackchannelOptions, RtpSessionOptions, SchemaCondition, SchemaConditionOperator, SchemaConfig, SecuritySystemLike, SecuritySystemProperties, SensorCapability, SensorLike, SensorPropertyType, SensorTriggerRef, SensorTriggerSettings, SirenControlLike, SirenControlProperties, SmokeSensorLike, SmokeSensorProperties, SnapshotInterface, SnapshotSettings, SnapshotUrlOptions, StreamDirection, StreamUrls, StreamingInterface, StreamingRole, SwitchControlLike, SwitchControlProperties, TemperatureInfoLike, TemperatureInfoProperties, ToastMessage, TrackedDetection, VideoCodec, VideoCodecProperties, VideoFFmpegCodec, VideoFrameData, VideoInputSpec, VideoStreamInfo, VideoStreamingMode, ZoneFilter, ZoneType };
|
|
5766
|
+
export type { AssignedPlugin, AudioCodec, AudioCodecProperties, AudioDetectionInterface, AudioDetectionPluginResponse, AudioDetectionSettings, AudioFFmpegCodec, AudioFrameData, AudioInputSpec, AudioLabel, AudioMetadata, AudioModelSpec, AudioResult, AudioSensorLike, AudioSensorProperties, AudioStreamInfo, BaseAudioLabel, BaseCamera, BaseCameraConfig, BatteryInfoLike, BatteryInfoProperties, BoundingBox, Camera, CameraAspectRatio, CameraConfig, CameraConfigInputSettings, CameraDetectionSettings, CameraDevice, CameraDeviceSource, CameraFrameWorkerSettings, CameraImplementation, CameraInformation, CameraInput, CameraPluginInfo, CameraRole, CameraSource, CameraType, CameraUiSettings, ClassifierDetection, ClassifierDetectionInterface, ClassifierDetectionPluginResponse, ClassifierResult, ClassifierSensorLike, ClassifierSensorProperties, ClipDetectionInterface, ClipDetectionPluginResponse, ClipEmbedding, ClipResult, ClipTextEmbeddingResult, ContactSensorLike, ContactSensorProperties, CoreManager, CoreManagerEvent, CreateDownloadOptions, CreateStreamDownloadOptions, Detection, DetectionAttribute, DetectionEvent, DetectionEventState, DetectionEventType, DetectionLabel, DetectionLine, DetectionZone, DeviceManager, DeviceStorage, DiscoveredCamera, DiscoveryProvider, DoorbellTriggerLike, DoorbellTriggerProperties, DownloadCleanup, DownloadManager, DownloadToken, EventAttribute, EventDescription, EventDetection, EventSegment, EventTrigger, EventTriggerType, FMTPInfo, FaceDetection, FaceDetectionInterface, FaceDetectionPluginResponse, FaceResult, FaceSensorLike, FaceSensorProperties, Fmp4Session, Fmp4SessionOptions, FormSubmitResponse, FormSubmitSchema, GarageControlLike, GarageControlProperties, Go2RtcRTSPSource, Go2RtcSnapshotSource, Go2RtcWSSource, HardwareAcceleration, HumidityInfoLike, HumidityInfoProperties, ImageMetadata, JsonArraySchema, JsonBaseSchema, JsonBaseSchemaWithoutCallbacks, JsonBooleanSchema, JsonEnumSchema, JsonFactorySchema, JsonNumberSchema, JsonSchema, JsonSchemaArray, JsonSchemaArrayWithoutCallbacks, JsonSchemaBoolean, JsonSchemaBooleanWithoutCallbacks, JsonSchemaButton, JsonSchemaEnum, JsonSchemaEnumWithoutCallbacks, JsonSchemaNumber, JsonSchemaNumberWithoutCallbacks, JsonSchemaString, JsonSchemaStringWithoutCallbacks, JsonSchemaSubmit, JsonSchemaType, JsonSchemaWithoutCallbacks, JsonSchemaWithoutKey, JsonStringSchema, LeakSensorLike, LeakSensorProperties, LicensePlateDetection, LicensePlateDetectionInterface, LicensePlateDetectionPluginResponse, LicensePlateResult, LicensePlateSensorLike, LicensePlateSensorProperties, LightControlLike, LightControlProperties, LineDirection, LockControlLike, LockControlProperties, LoggerService, ModelSpec, MotionDetectionInterface, MotionDetectionPluginResponse, MotionDetectionSettings, MotionResolution, MotionResult, MotionSensorLike, MotionSensorProperties, Notification, NotificationManager, NotifierDevice, NotifierInterface, OAuthAuthCodeFlowCapable, OAuthCapable, OAuthClientCredentialsCapable, OAuthDeviceFlowCapable, OAuthMetadata, OAuthProviderConfig, OAuthProviderDeclaration, OAuthState, OAuthStatus, ObjectDetectionInterface, ObjectDetectionPluginResponse, ObjectDetectionSettings, ObjectModelSpec, ObjectResult, ObjectSensorLike, ObjectSensorProperties, OccupancySensorLike, OccupancySensorProperties, OperatorFn, PTZControlLike, PTZControlProperties, PTZDirection, PTZPosition, PluginAPI, PluginAssignments, PluginConfig, PluginContract, PluginInfo, PluginInterfaces, Point, ProbeAudioCodec, ProbeConfig, ProbeStream, PropertyChangeOf, PtzAutotrackSettings, PythonVersion, RTPInfo, RTSPAudioCodec, RTSPUrlOptions, RtpSession, RtpSessionBackchannelOptions, RtpSessionOptions, SchemaCondition, SchemaConditionOperator, SchemaConfig, SecuritySystemLike, SecuritySystemProperties, SensorCapability, SensorLike, SensorPropertyType, SensorTriggerRef, SensorTriggerSettings, SirenControlLike, SirenControlProperties, SmokeSensorLike, SmokeSensorProperties, SnapshotInterface, SnapshotSettings, SnapshotUrlOptions, StreamDirection, StreamUrls, StreamingInterface, StreamingRole, SwitchControlLike, SwitchControlProperties, TemperatureInfoLike, TemperatureInfoProperties, TestNotificationResponse, ToastMessage, TrackedDetection, VideoCodec, VideoCodecProperties, VideoFFmpegCodec, VideoFrameData, VideoInputSpec, VideoStreamInfo, VideoStreamingMode, ZoneFilter, ZoneType };
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -412,10 +412,12 @@ type PythonVersion = '3.11' | '3.12';
|
|
|
412
412
|
*/
|
|
413
413
|
declare enum PluginRole {
|
|
414
414
|
/**
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
415
|
+
* System-wide aggregator that attaches to cameras owned by *other* plugins
|
|
416
|
+
* to provide a cross-camera service (e.g. bridging cameras and sensors into a
|
|
417
|
+
* smart-home platform, or recording and notifications). A hub creates no
|
|
418
|
+
* cameras of its own and provides no sensors (`provides` must be empty); it
|
|
419
|
+
* attaches to cameras via the `hub` assignment and typically reads camera and
|
|
420
|
+
* sensor state through `consumes`.
|
|
419
421
|
*/
|
|
420
422
|
Hub = "hub",
|
|
421
423
|
/**
|
package/dist/plugin/contract.js
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
export var PluginRole;
|
|
6
6
|
(function (PluginRole) {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* System-wide aggregator that attaches to cameras owned by *other* plugins
|
|
9
|
+
* to provide a cross-camera service (e.g. bridging cameras and sensors into a
|
|
10
|
+
* smart-home platform, or recording and notifications). A hub creates no
|
|
11
|
+
* cameras of its own and provides no sensors (`provides` must be empty); it
|
|
12
|
+
* attaches to cameras via the `hub` assignment and typically reads camera and
|
|
13
|
+
* sensor state through `consumes`.
|
|
12
14
|
*/
|
|
13
15
|
PluginRole["Hub"] = "hub";
|
|
14
16
|
/**
|
package/dist/plugin/helper.js
CHANGED
|
@@ -182,8 +182,8 @@ export function validateContractConsistency(contract, pluginName) {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
185
|
-
* Reports whether the plugin's role is Hub (
|
|
186
|
-
*
|
|
185
|
+
* Reports whether the plugin's role is Hub (a cross-camera aggregator such as a
|
|
186
|
+
* smart-home bridge or recorder, which owns no cameras of its own).
|
|
187
187
|
*
|
|
188
188
|
* @param contract - Plugin contract to inspect.
|
|
189
189
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "camera.ui sdk",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
35
35
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
36
36
|
"@types/multicast-dns": "^7.2.4",
|
|
37
|
-
"@types/node": "
|
|
38
|
-
"@typescript-eslint/parser": "^8.
|
|
37
|
+
"@types/node": "26.0.1",
|
|
38
|
+
"@typescript-eslint/parser": "^8.62.0",
|
|
39
39
|
"cpy-cli": "^7.0.0",
|
|
40
40
|
"eslint": "9.39.2",
|
|
41
|
-
"eslint-plugin-jsdoc": "^63.0.
|
|
42
|
-
"globals": "^17.
|
|
43
|
-
"prettier": "^3.
|
|
41
|
+
"eslint-plugin-jsdoc": "^63.0.10",
|
|
42
|
+
"globals": "^17.7.0",
|
|
43
|
+
"prettier": "^3.9.1",
|
|
44
44
|
"rimraf": "^6.1.3",
|
|
45
|
-
"rollup": "^4.62.
|
|
45
|
+
"rollup": "^4.62.2",
|
|
46
46
|
"rollup-plugin-dts": "^6.4.1",
|
|
47
47
|
"tsyringe": "^4.10.0",
|
|
48
48
|
"typedoc-plugin-markdown": "^4.12.0",
|
|
49
49
|
"typedoc-vitepress-theme": "^1.1.3",
|
|
50
50
|
"typescript": "5.9.3",
|
|
51
|
-
"typescript-eslint": "^8.
|
|
51
|
+
"typescript-eslint": "^8.62.0",
|
|
52
52
|
"vitepress": "^1.6.4",
|
|
53
53
|
"vitest": "^4.1.9",
|
|
54
54
|
"werift": "0.23.0",
|