@camera.ui/sdk 0.0.8 → 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 CHANGED
@@ -4427,10 +4427,12 @@ type PythonVersion = '3.11' | '3.12';
4427
4427
  */
4428
4428
  declare enum PluginRole {
4429
4429
  /**
4430
- * Cloud-service integration that manages its own cameras end-to-end via a
4431
- * vendor account (e.g. a vendor SDK / cloud API). The hub owns camera
4432
- * creation, streaming and sensors; it cannot expose sensors for cameras
4433
- * owned by other plugins.
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 */
@@ -5540,8 +5565,8 @@ declare function getContractValidationErrors(contract: unknown): string[];
5540
5565
  */
5541
5566
  declare function validateContractConsistency(contract: PluginContract, pluginName?: string): void;
5542
5567
  /**
5543
- * Reports whether the plugin's role is Hub (vendor cloud integration that
5544
- * manages its own cameras end-to-end).
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).
5545
5570
  *
5546
5571
  * @param contract - Plugin contract to inspect.
5547
5572
  *
@@ -5738,4 +5763,4 @@ interface OAuthClientCredentialsCapable extends OAuthCapable {
5738
5763
  }
5739
5764
 
5740
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 };
5741
- 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 };
@@ -412,10 +412,12 @@ type PythonVersion = '3.11' | '3.12';
412
412
  */
413
413
  declare enum PluginRole {
414
414
  /**
415
- * Cloud-service integration that manages its own cameras end-to-end via a
416
- * vendor account (e.g. a vendor SDK / cloud API). The hub owns camera
417
- * creation, streaming and sensors; it cannot expose sensors for cameras
418
- * owned by other plugins.
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
  /**
@@ -5,10 +5,12 @@
5
5
  export var PluginRole;
6
6
  (function (PluginRole) {
7
7
  /**
8
- * Cloud-service integration that manages its own cameras end-to-end via a
9
- * vendor account (e.g. a vendor SDK / cloud API). The hub owns camera
10
- * creation, streaming and sensors; it cannot expose sensors for cameras
11
- * owned by other plugins.
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
  /**
@@ -182,8 +182,8 @@ export function validateContractConsistency(contract, pluginName) {
182
182
  }
183
183
  }
184
184
  /**
185
- * Reports whether the plugin's role is Hub (vendor cloud integration that
186
- * manages its own cameras end-to-end).
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.8",
3
+ "version": "0.0.9",
4
4
  "description": "camera.ui sdk",
5
5
  "exports": {
6
6
  ".": {
@@ -34,13 +34,13 @@
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": "26.0.0",
37
+ "@types/node": "26.0.1",
38
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.7",
41
+ "eslint-plugin-jsdoc": "^63.0.10",
42
42
  "globals": "^17.7.0",
43
- "prettier": "^3.8.4",
43
+ "prettier": "^3.9.1",
44
44
  "rimraf": "^6.1.3",
45
45
  "rollup": "^4.62.2",
46
46
  "rollup-plugin-dts": "^6.4.1",