import type { AssistantToolReference } from '@camera.ui/sdk'; import { AudioProperty } from '@camera.ui/sdk'; import { AudioSensorProperties } from '@camera.ui/sdk'; import type { BaseCamera } from '@camera.ui/sdk'; import { BasePlugin } from '@camera.ui/sdk'; import { BatteryInfoProperties } from '@camera.ui/sdk'; import { BatteryProperty } from '@camera.ui/sdk'; import { Camera } from '@camera.ui/sdk'; import type { CameraInputSettings } from '@camera.ui/sdk/internal'; import { CameraSource } from '@camera.ui/sdk'; import { CarbonDioxideInfoProperties } from '@camera.ui/sdk'; import { CarbonDioxideProperty } from '@camera.ui/sdk'; import { CarbonMonoxideProperty } from '@camera.ui/sdk'; import { CarbonMonoxideSensorProperties } from '@camera.ui/sdk'; import { ChargingState } from '@camera.ui/sdk'; import { ClassifierProperty } from '@camera.ui/sdk'; import { ClassifierSensorProperties } from '@camera.ui/sdk'; import { ColdProperty } from '@camera.ui/sdk'; import { ColdSensorProperties } from '@camera.ui/sdk'; import { ComputedRef } from 'vue'; import { ConnectionTarget } from '@camera.ui/transport'; import { ContactProperty } from '@camera.ui/sdk'; import { ContactSensorProperties } from '@camera.ui/sdk'; import { CoreManager } from '@camera.ui/sdk'; import { Detection } from '@camera.ui/sdk'; import { DoorbellProperty } from '@camera.ui/sdk'; import { DoorbellTriggerProperties } from '@camera.ui/sdk'; import { FaceDetection } from '@camera.ui/sdk'; import { FaceProperty } from '@camera.ui/sdk'; import { FaceSensorProperties } from '@camera.ui/sdk'; import { FormSubmitResponse } from '@camera.ui/sdk'; import { GarageControlProperties } from '@camera.ui/sdk'; import { GarageProperty } from '@camera.ui/sdk'; import { GarageState } from '@camera.ui/sdk'; import { GasProperty } from '@camera.ui/sdk'; import { GasSensorProperties } from '@camera.ui/sdk'; import { HeatProperty } from '@camera.ui/sdk'; import { HeatSensorProperties } from '@camera.ui/sdk'; import { HTMLAttributes } from 'vue'; import { HumidityInfoProperties } from '@camera.ui/sdk'; import { HumidityProperty } from '@camera.ui/sdk'; import { IlluminanceInfoProperties } from '@camera.ui/sdk'; import { IlluminanceProperty } from '@camera.ui/sdk'; import { InjectionKey } from 'vue'; import type { JSONSchema } from '@tanstack/ai'; import { LeakProperty } from '@camera.ui/sdk'; import { LeakSensorProperties } from '@camera.ui/sdk'; import { LicensePlateDetection } from '@camera.ui/sdk'; import { LicensePlateProperty } from '@camera.ui/sdk'; import { LicensePlateSensorProperties } from '@camera.ui/sdk'; import { LightControlProperties } from '@camera.ui/sdk'; import { LightProperty } from '@camera.ui/sdk'; import { LockControlProperties } from '@camera.ui/sdk'; import { LockProperty } from '@camera.ui/sdk'; import { LockState } from '@camera.ui/sdk'; import { MaybeRefOrGetter } from 'vue'; import type { ModelSpec } from '@camera.ui/sdk'; import { MotionProperty } from '@camera.ui/sdk'; import { MotionSensorProperties } from '@camera.ui/sdk'; import { Status as NatsStatus } from '@camera.ui/rpc'; import { NatsTransport } from '@camera.ui/transport/transports/nats'; import { OAuthMetadata } from '@camera.ui/sdk'; import { OAuthState } from '@camera.ui/sdk'; import { ObjectProperty } from '@camera.ui/sdk'; import { ObjectSensorProperties } from '@camera.ui/sdk'; import { OccupancyProperty } from '@camera.ui/sdk'; import { OccupancySensorProperties } from '@camera.ui/sdk'; import { PluginContract } from '@camera.ui/sdk'; import type { PluginInfo } from '@camera.ui/sdk'; import type { PluginInterface } from '@camera.ui/sdk'; import { PluginInterfaces } from '@camera.ui/sdk'; import { PowerProperty } from '@camera.ui/sdk'; import { PowerSensorProperties } from '@camera.ui/sdk'; import { ProbeConfig } from '@camera.ui/sdk'; import { ProbeStream } from '@camera.ui/sdk'; import { ProblemProperty } from '@camera.ui/sdk'; import { ProblemSensorProperties } from '@camera.ui/sdk'; import { Promisify } from '@camera.ui/rpc'; import { PropertyChangedEvent } from '@camera.ui/sdk/internal'; import { PTZControlProperties } from '@camera.ui/sdk'; import { PTZDirection } from '@camera.ui/sdk'; import { PTZPosition } from '@camera.ui/sdk'; import { PTZProperty } from '@camera.ui/sdk'; import { Ref } from 'vue'; import { RPCClient } from '@camera.ui/rpc'; import { SchemaConfig } from '@camera.ui/sdk'; import { SecuritySystemProperties } from '@camera.ui/sdk'; import { SecuritySystemProperty } from '@camera.ui/sdk'; import { SecuritySystemState } from '@camera.ui/sdk'; import type { SensorSourceState } from '@camera.ui/sdk'; import { SensorType } from '@camera.ui/sdk'; import { ShallowRef } from 'vue'; import { SirenControlProperties } from '@camera.ui/sdk'; import { SirenProperty } from '@camera.ui/sdk'; import { SmokeProperty } from '@camera.ui/sdk'; import { SmokeSensorProperties } from '@camera.ui/sdk'; import type { SnapshotInterface } from '@camera.ui/sdk'; import type { StreamingInterface } from '@camera.ui/sdk'; import { StreamingRole } from '@camera.ui/sdk'; import { SwitchControlProperties } from '@camera.ui/sdk'; import { SwitchProperty } from '@camera.ui/sdk'; import { TamperProperty } from '@camera.ui/sdk'; import { TamperSensorProperties } from '@camera.ui/sdk'; import { TemperatureInfoProperties } from '@camera.ui/sdk'; import { TemperatureProperty } from '@camera.ui/sdk'; import { VibrationProperty } from '@camera.ui/sdk'; import { VibrationSensorProperties } from '@camera.ui/sdk'; import { WatchSource } from 'vue'; import { WsTransport } from '@camera.ui/transport/transports/ws'; export declare function acquireSensorManager(rpcOrContext: RPCClient | ReactiveCameraDeviceContext): CachedSensorManager; export declare interface ActivityMode extends ActivityModeState, ActivityModeActions { } declare interface ActivityModeActions { setMode: (mode: CameraActivityMode) => void; reportActivity: (hasActivity: boolean) => void; resumeFromStandby: () => void; resetIdleTimer: () => void; dispose: () => void; } export declare interface ActivityModeConfig { standbyTimeout?: number; activityTimeout?: number; } declare interface ActivityModeState { readonly mode: Ref; readonly inStandby: Ref; readonly hasActivity: Ref; } declare interface AssistantAccess { allowed: boolean; model: string | null; vision: boolean | null; language: string | null; } declare interface AssistantAskRequest { pluginId: string; prompt: string; system?: string; images?: { data: Uint8Array; mimeType: string }[]; outputSchema?: JSONSchema; timeoutMs?: number; } declare type AssistantAskResult = | { ok: true; text: string; json?: unknown; usage: { promptTokens: number; completionTokens: number } } | { ok: false; reason: 'not_allowed' | 'unconfigured' | 'timeout' | 'error'; message: string }; declare interface AssistantPost { userId: string; threadId: string; title?: string; text: string; label?: string; image?: { data: string; mimeType: string }; references?: AssistantToolReference[]; } /* Excluded from this release type: AudioProperty */ /* Excluded from this release type: AudioSensorProperties */ export declare interface BaseLogger { log: (...args: unknown[]) => void; error: (...args: unknown[]) => void; warn: (...args: unknown[]) => void; success: (...args: unknown[]) => void; debug: (...args: unknown[]) => void; trace: (...args: unknown[]) => void; attention: (...args: unknown[]) => void; } /* Excluded from this release type: BatteryInfoProperties */ /* Excluded from this release type: BatteryProperty */ declare interface CachedSensorManager { manager: ReactiveSensorManager; initPromise?: Promise; } export declare const CAMERA_UI_INJECTION_KEY: InjectionKey; export declare type CameraActivityMode = 'always-on' | 'standby' | 'activity'; declare type CameraDeviceImplementation = PartialReturnType & PartialReturnType; export declare interface CameraDeviceInterface extends CameraDeviceImplementation { refreshStates(): Promise; connect(): Promise; disconnect(): Promise; snapshot(sourceId: string, forceNew?: boolean, preferNative?: boolean): Promise; snapshotWithMeta(sourceId: string, forceNew?: boolean): Promise; probeStream(sourceId: string, probeConfig?: ProbeConfig, refresh?: boolean): Promise; getStreamStatus(sourceId: string): Promise; } declare type CameraIdentifier = MaybeRefOrGetter; export declare interface CameraNamespaces { cameraSubject: string; cameraControllerRpc: string; } export declare interface CameraStream { readonly status: Ref; readonly isPlaying: Ref; readonly activeMode: Ref<'webrtc' | 'webrtc/tcp' | 'mse'>; readonly activeResolution: Ref; readonly degradedFrom: Ref; readonly unsupported: Ref; readonly hasAudio: Ref; readonly hasBackchannel: Ref; readonly error: Ref; readonly isReconnecting: Ref; readonly activityMode: Ref; readonly inStandby: Ref; readonly hasActivity: Ref; readonly isBusy: Ref; readonly hasSound: Ref; readonly hasIntercom: Ref; readonly stream: ShallowRef; readonly videoElement: ShallowRef; readonly containerElement: ShallowRef; readonly fullscreenElement: ShallowRef; readonly renderElement: ComputedRef; readonly muted: ComputedRef; readonly paused: ComputedRef; readonly nativeWidth: Ref; readonly nativeHeight: Ref; readonly isPip: Ref; readonly supportsPip: ComputedRef; readonly isFullscreen: Ref; readonly isCameraDisabled: ComputedRef; start: () => Promise; stop: () => void; restart: () => Promise; resumeFromStandby: () => void; setMode: (mode: VideoStreamingMode) => Promise; setResolution: (resolution: StreamingRole) => Promise; setMicrophone: (track: MediaStreamTrack | null) => Promise; setActivityMode: (mode: CameraActivityMode) => void; reportActivity: (hasActivity: boolean) => void; setMuted: (muted: boolean) => void; play: () => Promise; pause: () => void; togglePip: () => void; toggleFullscreen: () => Promise; captureScreenshot: () => string | null; } export declare interface CameraUiContext { rpc: ShallowRef; target: Readonly>; isConnected: Readonly>; endpoint: Readonly>; token: Readonly>; extraProxyQuery: Readonly | undefined>>; error: Readonly>; wsTransport?: WsTransport; on: (event: CameraUiEventType, cb: CameraUiEventCallback) => void; off: (event: CameraUiEventType, cb: CameraUiEventCallback) => void; } export declare type CameraUiEventCallback = () => void; export declare type CameraUiEventType = 'reconnected' | 'disconnected'; export declare type CameraUiPlugin = ReturnType; export declare interface CameraUiPluginInput { natsTransport: NatsTransport; target: Ref; wsTransport?: WsTransport; } /* Excluded from this release type: CarbonDioxideInfoProperties */ /* Excluded from this release type: CarbonDioxideProperty */ /* Excluded from this release type: CarbonMonoxideProperty */ /* Excluded from this release type: CarbonMonoxideSensorProperties */ /* Excluded from this release type: ClassifierProperty */ /* Excluded from this release type: ClassifierSensorProperties */ export declare function clearCameraCache(): void; export declare function clearOAuthCache(): void; export declare function clearPluginCache(): void; export declare function clearSensorCache(): void; export declare function clearSnapshotCache(): void; export declare function clearStorageCache(): void; export declare interface CodecCompatibility { compatible: boolean; audioCompatible: boolean; videoCompatible: boolean; incompatibleCodecs: string[]; } /* Excluded from this release type: ColdProperty */ /* Excluded from this release type: ColdSensorProperties */ /* Excluded from this release type: ContactProperty */ /* Excluded from this release type: ContactSensorProperties */ export declare interface CoreManagerInterface { ingestTrainingCandidate(payload: TrainingCandidateIngest): Promise; getTrainingCollectionEnabled(): Promise; getFFmpegPath(): Promise; getServerAddresses(): Promise; getCloudServerId(): Promise; getPlugin(pluginName: string): Promise; getPluginsByInterface(interfaceName: PluginInterface): Promise; getFloorPlan(): Promise; assistantAsk(request: AssistantAskRequest): Promise; assistantAccess(pluginId: string): Promise; assistantPost(post: AssistantPost): Promise; } export declare interface CoreManagerNamespaces { coreManagerSubject: string; coreManagerRpc: string; } export declare function createActivityMode(options: CreateActivityModeOptions): ActivityMode; declare interface CreateActivityModeOptions { initialMode?: CameraActivityMode; config?: ActivityModeConfig; onStreamStart: () => void; onStreamStop: () => void; isStreamPlaying: () => boolean; } export declare function createCameraUiPlugin(input: CameraUiContext | CameraUiPluginInput): { install(app: { provide: (key: symbol, value: unknown) => void; }): void; }; export declare function createReactiveCameraDevice(rpcOrContext: RPCClient | ReactiveCameraDeviceContext, initialCamera: Camera): Promise; export declare function createSensorManager(rpcOrContext: RPCClient | ReactiveCameraDeviceContext): ReactiveSensorManager; declare interface DBCamera extends BaseCamera { sources: CameraInputSettings[]; workerAgentId?: string; roomId: string | null; } declare interface DBFloorPlan { version: number; updatedAt: number; north: number | null; rooms: DBFloorPlanRoom[]; connections: DBFloorPlanConnection[]; cameras: DBFloorPlanCamera[]; sensors: DBFloorPlanSensor[]; } declare interface DBFloorPlanCamera { cameraId: string; roomId: string; note: string; x: number; y: number; rotation: number; fov: number; range: number; } declare interface DBFloorPlanConnection { id: string; fromRoomId: string; toRoomId: string; fromShapeId: string | null; toShapeId: string | null; offset: number | null; width: number; note: string; type: DBFloorPlanConnectionType; } declare type DBFloorPlanConnectionType = 'door' | 'opening' | 'stairs'; declare interface DBFloorPlanRoom { id: string; roomId: string; x: number; y: number; width: number; height: number; } declare interface DBFloorPlanSensor { sensorId: string; sensorType: string; roomId: string; connectionId: string | null; note: string; x: number; y: number; } declare interface DBLevel { id: string; name: string; order: number; } declare interface DBRoom { id: string; name: string; levelId: string | null; outdoor: boolean; publicSpace: boolean; note: string; } declare interface DBRoomCatalog { version: number; updatedAt: number; levels: DBLevel[]; rooms: DBRoom[]; } declare interface DetectionEventNamespaces { detectionEventSubject: string; } export declare interface DeviceManagerInterface { getCamera(cameraNameOrId: string, pluginId: string): Promise; } export declare interface DeviceManagerNamespaces { deviceManagerSubject: string; deviceManagerRpc: string; } declare interface DiscoveryManagerNamespaces { discoveryManagerSubject: string; discoveryManagerRpc: string; } /* Excluded from this release type: DoorbellProperty */ /* Excluded from this release type: DoorbellTriggerProperties */ declare interface DownloadManagerNamespaces { downloadManagerRpc: string; } /* Excluded from this release type: FaceProperty */ /* Excluded from this release type: FaceSensorProperties */ declare interface FloorPlan { rooms: DBRoomCatalog; plan: DBFloorPlan; } declare interface FrameWorkerDetectionNamespaces { detectionRpc: string; } export declare interface FrameWorkerNamespaces { frameWorkerChildRpc: string; frameWorkerChild: string; } declare type FullscreenMode = 'fit' | 'scroll'; /* Excluded from this release type: GarageControlProperties */ /* Excluded from this release type: GarageProperty */ /* Excluded from this release type: GasProperty */ /* Excluded from this release type: GasSensorProperties */ export declare function getSnapshotUrl(cameraId: string): string | undefined; /* Excluded from this release type: HeatProperty */ /* Excluded from this release type: HeatSensorProperties */ declare type HiddenCallback = () => void; declare interface HostPluginInfo extends PluginInfo { running: boolean; } /* Excluded from this release type: HumidityInfoProperties */ /* Excluded from this release type: HumidityProperty */ /* Excluded from this release type: IlluminanceInfoProperties */ /* Excluded from this release type: IlluminanceProperty */ export declare const isReactiveAudioSensor: (sensor: ReactiveSensor) => sensor is ReactiveAudioSensor; export declare const isReactiveBatteryInfo: (sensor: ReactiveSensor) => sensor is ReactiveBatteryInfo; export declare const isReactiveCarbonDioxideInfo: (sensor: ReactiveSensor) => sensor is ReactiveCarbonDioxideInfo; export declare const isReactiveCarbonMonoxideSensor: (sensor: ReactiveSensor) => sensor is ReactiveCarbonMonoxideSensor; export declare const isReactiveClassifierSensor: (sensor: ReactiveSensor) => sensor is ReactiveClassifierSensor; export declare const isReactiveColdSensor: (sensor: ReactiveSensor) => sensor is ReactiveColdSensor; export declare const isReactiveContactSensor: (sensor: ReactiveSensor) => sensor is ReactiveContactSensor; export declare const isReactiveDoorbellTrigger: (sensor: ReactiveSensor) => sensor is ReactiveDoorbellTrigger; export declare const isReactiveFaceSensor: (sensor: ReactiveSensor) => sensor is ReactiveFaceSensor; export declare const isReactiveGarageControl: (sensor: ReactiveSensor) => sensor is ReactiveGarageControl; export declare const isReactiveGasSensor: (sensor: ReactiveSensor) => sensor is ReactiveGasSensor; export declare const isReactiveHeatSensor: (sensor: ReactiveSensor) => sensor is ReactiveHeatSensor; export declare const isReactiveHumidityInfo: (sensor: ReactiveSensor) => sensor is ReactiveHumidityInfo; export declare const isReactiveIlluminanceInfo: (sensor: ReactiveSensor) => sensor is ReactiveIlluminanceInfo; export declare const isReactiveLeakSensor: (sensor: ReactiveSensor) => sensor is ReactiveLeakSensor; export declare const isReactiveLicensePlateSensor: (sensor: ReactiveSensor) => sensor is ReactiveLicensePlateSensor; export declare const isReactiveLightControl: (sensor: ReactiveSensor) => sensor is ReactiveLightControl; export declare const isReactiveLockControl: (sensor: ReactiveSensor) => sensor is ReactiveLockControl; export declare const isReactiveMotionSensor: (sensor: ReactiveSensor) => sensor is ReactiveMotionSensor; export declare const isReactiveObjectSensor: (sensor: ReactiveSensor) => sensor is ReactiveObjectSensor; export declare const isReactiveOccupancySensor: (sensor: ReactiveSensor) => sensor is ReactiveOccupancySensor; export declare const isReactivePowerSensor: (sensor: ReactiveSensor) => sensor is ReactivePowerSensor; export declare const isReactiveProblemSensor: (sensor: ReactiveSensor) => sensor is ReactiveProblemSensor; export declare const isReactivePTZControl: (sensor: ReactiveSensor) => sensor is ReactivePTZControl; export declare const isReactiveSecuritySystem: (sensor: ReactiveSensor) => sensor is ReactiveSecuritySystem; export declare const isReactiveSirenControl: (sensor: ReactiveSensor) => sensor is ReactiveSirenControl; export declare const isReactiveSmokeSensor: (sensor: ReactiveSensor) => sensor is ReactiveSmokeSensor; export declare const isReactiveSwitchControl: (sensor: ReactiveSensor) => sensor is ReactiveSwitchControl; export declare const isReactiveTamperSensor: (sensor: ReactiveSensor) => sensor is ReactiveTamperSensor; export declare const isReactiveTemperatureInfo: (sensor: ReactiveSensor) => sensor is ReactiveTemperatureInfo; export declare const isReactiveVibrationSensor: (sensor: ReactiveSensor) => sensor is ReactiveVibrationSensor; /* Excluded from this release type: LeakProperty */ /* Excluded from this release type: LeakSensorProperties */ /* Excluded from this release type: LicensePlateProperty */ /* Excluded from this release type: LicensePlateSensorProperties */ /* Excluded from this release type: LightControlProperties */ /* Excluded from this release type: LightProperty */ /* Excluded from this release type: LockControlProperties */ /* Excluded from this release type: LockProperty */ /* Excluded from this release type: MotionProperty */ /* Excluded from this release type: MotionSensorProperties */ export declare class NamespaceManager { static coreManagerNamespaces(): CoreManagerNamespaces { return { coreManagerSubject: 'coreManager.subscriber', coreManagerRpc: 'coreManager.rpc', }; } static deviceManagerNamespaces(): DeviceManagerNamespaces { return { deviceManagerSubject: 'deviceManager.subscriber', deviceManagerRpc: 'deviceManager.rpc', }; } static sensorDiscoveryNamespaces(): SensorDiscoveryNamespaces { return { sensorDiscoverySubject: 'sensorDiscovery.subscriber', }; } static discoveryManagerNamespaces(): DiscoveryManagerNamespaces { return { discoveryManagerSubject: 'discoveryManager.subscriber', discoveryManagerRpc: 'discoveryManager.rpc', }; } static pluginNamespaces(pluginId: string): PluginNamespaces { return { pluginDeviceManagerSubject: `plugin.${pluginId}.deviceManager.subscriber`, pluginChildRpc: `plugin.${pluginId}.child.rpc`, pluginChild: `plugin.${pluginId}.child`, pluginStorageRpc: `plugin.${pluginId}.storage.rpc`, pluginConfigStoreRpc: `plugin.${pluginId}.configstore.rpc`, }; } static pluginFileServeRpc(pluginId: string): string { return `plugin.${pluginId}.fileserve.rpc`; } static cameraNamespaces(cameraId: string): CameraNamespaces { return { cameraSubject: `camera.${cameraId}.subscriber`, cameraControllerRpc: `camera.${cameraId}.controller.rpc`, }; } static frameWorkerNamespaces(cameraId: string): FrameWorkerNamespaces { return { frameWorkerChildRpc: `camera.${cameraId}.frameWorker.child.rpc`, frameWorkerChild: `camera.${cameraId}.frameWorker.child`, }; } static pluginCameraNamespaces(pluginId: string, cameraId: string): PluginCameraNamespaces { return { cameraInterfacesRpc: `plugin.${pluginId}.camera.${cameraId}.cameraInterfaces.rpc`, cameraStorageRpc: `plugin.${pluginId}.camera.${cameraId}.cameraStorage.rpc`, cameraImplRpc: `plugin.${pluginId}.camera.${cameraId}.impl.rpc`, }; } static pluginSensorNamespaces(pluginId: string, sensorId: string): PluginSensorNamespaces { return { sensorStorageRpc: `plugin.${pluginId}.sensor.${sensorId}.storage.rpc`, }; } static sensorRegistryNamespaces(): SensorRegistryNamespaces { return { sensorsSubject: 'sensors.subject', sensorsRpc: 'sensors.rpc', }; } static sensorCameraViewNamespaces(cameraId: string): SensorCameraViewNamespaces { return { sensorWriteSubject: `camera.${cameraId}.sensors.writes`, }; } static sensorEventNamespaces(sensorId: string): SensorEventNamespaces { return { sensorSubject: `sensor.${sensorId}.subject`, }; } static sensorProviderNamespaces(pluginId: string, sensorId: string): SensorProviderNamespaces { return { sensorRpc: `plugin.${pluginId}.sensor.${sensorId}.rpc`, }; } static frameWorkerDetectionNamespaces(cameraId: string): FrameWorkerDetectionNamespaces { return { detectionRpc: `camera.${cameraId}.frameWorker.detection.rpc`, }; } static detectionEventNamespaces(cameraId: string): DetectionEventNamespaces { return { detectionEventSubject: `camera.${cameraId}.events.subject`, }; } static terminalManagerNamespaces(): TerminalManagerNamespaces { return { terminalManagerSubject: 'terminalManager.subscriber', terminalManagerRpc: 'terminalManager.rpc', }; } static downloadManagerNamespaces(): DownloadManagerNamespaces { return { downloadManagerRpc: 'downloadManager.rpc', }; } static notificationManagerNamespaces(): NotificationManagerNamespaces { return { notificationsPublishSubject: 'notifications.publish', }; } static workerAgentRpc(agentId: string): string { return `worker.${agentId}.rpc`; } static workerManagerRpc(): string { return 'workers.manager.rpc'; } static workerSync(agentId: string): string { return `worker.${agentId}.sync`; } static workerDisconnect(): string { return 'workers.disconnect'; } static workerLogs(): string { return 'workers.logs'; } } export { NatsStatus } declare interface NotificationManagerNamespaces { notificationsPublishSubject: string; } /* Excluded from this release type: ObjectProperty */ /* Excluded from this release type: ObjectSensorProperties */ /* Excluded from this release type: OccupancyProperty */ /* Excluded from this release type: OccupancySensorProperties */ declare type PartialReturnType = { [K in keyof T]: T[K] extends (...args: infer A) => Promise ? (...args: A) => Promise : T[K] extends (...args: infer A) => infer R ? (...args: A) => R | undefined : T[K]; }; export declare interface PluginCameraNamespaces { cameraInterfacesRpc: string; cameraStorageRpc: string; cameraImplRpc: string; } export declare interface PluginNamespaces { pluginDeviceManagerSubject: string; pluginChildRpc: string; pluginChild: string; pluginStorageRpc: string; pluginConfigStoreRpc: string; } export declare interface PluginSensorNamespaces { sensorStorageRpc: string; } /* Excluded from this release type: PowerProperty */ /* Excluded from this release type: PowerSensorProperties */ /* Excluded from this release type: ProblemProperty */ /* Excluded from this release type: ProblemSensorProperties */ /* Excluded from this release type: PTZControlProperties */ /* Excluded from this release type: PTZProperty */ export declare interface ReactiveAudioSensor extends ReactiveSensor { readonly type: typeof SensorType.Audio; getProperty(property: typeof AudioProperty.Detected): boolean | undefined; getProperty(property: typeof AudioProperty.Detections): Detection[] | undefined; getProperty(property: typeof AudioProperty.Decibels): number | undefined; getProperty(property: string): unknown; } export declare interface ReactiveBatteryInfo extends ReactiveSensor { readonly type: typeof SensorType.Battery; getProperty(property: typeof BatteryProperty.Level): number | undefined; getProperty(property: typeof BatteryProperty.Low): boolean | undefined; getProperty(property: typeof BatteryProperty.Charging): ChargingState | undefined; getProperty(property: string): unknown; } export declare interface ReactiveCameraDevice { readonly id: string; readonly name: Ref; readonly room: Ref; readonly nativeId: Ref; readonly disabled: Ref; readonly snooze: Ref; readonly isCloud: Ref; readonly connected: Ref; readonly frameWorkerConnected: Ref; readonly sources: Ref; readonly streamSource: Ref; readonly snapshotSource: Ref; readonly highResolutionSource: Ref; readonly midResolutionSource: Ref; readonly lowResolutionSource: Ref; readonly capabilities: Ref; readonly hasLight: ComputedRef; readonly hasSiren: ComputedRef; readonly hasDoorbell: ComputedRef; readonly hasBattery: ComputedRef; readonly hasAudioSensor: ComputedRef; readonly hasMotionSensor: ComputedRef; readonly hasObjectSensor: ComputedRef; readonly hasPtz: ComputedRef; readonly camera: Ref; readonly snapshot: ShallowRef; readonly snapshotLoading: Ref; fetchSnapshot: (sourceId?: string, forceNew?: boolean) => Promise; probeStream: (sourceId?: string, probeConfig?: ProbeConfig, refresh?: boolean) => Promise; streamUrl: (sourceId: string) => Promise; refreshStates: () => Promise; reconnect: () => Promise; close: () => Promise; } declare interface ReactiveCameraDeviceContext { rpc: ShallowRef; } export declare interface ReactiveCarbonDioxideInfo extends ReactiveSensor { readonly type: typeof SensorType.CarbonDioxide; getProperty(property: typeof CarbonDioxideProperty.Current): number | undefined; getProperty(property: string): unknown; } export declare interface ReactiveCarbonMonoxideSensor extends ReactiveSensor { readonly type: typeof SensorType.CarbonMonoxide; getProperty(property: typeof CarbonMonoxideProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveClassifierSensor extends ReactiveSensor { readonly type: typeof SensorType.Classifier; getProperty(property: typeof ClassifierProperty.Detected): boolean | undefined; getProperty(property: typeof ClassifierProperty.Detections): Detection[] | undefined; getProperty(property: typeof ClassifierProperty.Labels): string[] | undefined; getProperty(property: string): unknown; } export declare interface ReactiveColdSensor extends ReactiveSensor { readonly type: typeof SensorType.Cold; getProperty(property: typeof ColdProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveContactSensor extends ReactiveSensor { readonly type: typeof SensorType.Contact; getProperty(property: typeof ContactProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveCoreManager extends Omit { } export declare interface ReactiveDeviceManager { getCamera: (cameraIdOrName: string) => Promise; } export declare interface ReactiveDoorbellTrigger extends ReactiveSensor { readonly type: typeof SensorType.Doorbell; getProperty(property: typeof DoorbellProperty.Ring): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveFaceSensor extends ReactiveSensor { readonly type: typeof SensorType.Face; getProperty(property: typeof FaceProperty.Detected): boolean | undefined; getProperty(property: typeof FaceProperty.Detections): FaceDetection[] | undefined; getProperty(property: string): unknown; } export declare interface ReactiveGarageControl extends ReactiveSensor { readonly type: typeof SensorType.Garage; getProperty(property: typeof GarageProperty.CurrentState): GarageState | undefined; getProperty(property: typeof GarageProperty.TargetState): GarageState | undefined; getProperty(property: typeof GarageProperty.ObstructionDetected): boolean | undefined; getProperty(property: string): unknown; setProperty(property: typeof GarageProperty.TargetState, value: GarageState): Promise; setProperty(property: string, value: unknown): Promise; } export declare interface ReactiveGasSensor extends ReactiveSensor { readonly type: typeof SensorType.Gas; getProperty(property: typeof GasProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveHeatSensor extends ReactiveSensor { readonly type: typeof SensorType.Heat; getProperty(property: typeof HeatProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveHumidityInfo extends ReactiveSensor { readonly type: typeof SensorType.Humidity; getProperty(property: typeof HumidityProperty.Current): number | undefined; getProperty(property: string): unknown; } export declare interface ReactiveIlluminanceInfo extends ReactiveSensor { readonly type: typeof SensorType.Illuminance; getProperty(property: typeof IlluminanceProperty.Current): number | undefined; getProperty(property: string): unknown; } export declare interface ReactiveLeakSensor extends ReactiveSensor { readonly type: typeof SensorType.Leak; getProperty(property: typeof LeakProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveLicensePlateSensor extends ReactiveSensor { readonly type: typeof SensorType.LicensePlate; getProperty(property: typeof LicensePlateProperty.Detected): boolean | undefined; getProperty(property: typeof LicensePlateProperty.Detections): LicensePlateDetection[] | undefined; getProperty(property: string): unknown; } export declare interface ReactiveLightControl extends ReactiveSensor { readonly type: typeof SensorType.Light; getProperty(property: typeof LightProperty.On): boolean | undefined; getProperty(property: typeof LightProperty.Brightness): number | undefined; getProperty(property: string): unknown; setProperty(property: typeof LightProperty.On, value: boolean): Promise; setProperty(property: typeof LightProperty.Brightness, value: number): Promise; setProperty(property: string, value: unknown): Promise; } export declare interface ReactiveLockControl extends ReactiveSensor { readonly type: typeof SensorType.Lock; getProperty(property: typeof LockProperty.CurrentState): LockState | undefined; getProperty(property: typeof LockProperty.TargetState): LockState | undefined; getProperty(property: string): unknown; setProperty(property: typeof LockProperty.CurrentState, value: LockState): Promise; setProperty(property: typeof LockProperty.TargetState, value: LockState): Promise; setProperty(property: string, value: unknown): Promise; } export declare interface ReactiveMotionSensor extends ReactiveSensor { readonly type: typeof SensorType.Motion; getProperty(property: typeof MotionProperty.Detected): boolean | undefined; getProperty(property: typeof MotionProperty.Detections): Detection[] | undefined; getProperty(property: string): unknown; } export declare interface ReactiveObjectSensor extends ReactiveSensor { readonly type: typeof SensorType.Object; getProperty(property: typeof ObjectProperty.Detected): boolean | undefined; getProperty(property: typeof ObjectProperty.Detections): Detection[] | undefined; getProperty(property: typeof ObjectProperty.Labels): string[] | undefined; getProperty(property: string): unknown; } export declare interface ReactiveOccupancySensor extends ReactiveSensor { readonly type: typeof SensorType.Occupancy; getProperty(property: typeof OccupancyProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactivePowerSensor extends ReactiveSensor { readonly type: typeof SensorType.Power; getProperty(property: typeof PowerProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveProblemSensor extends ReactiveSensor { readonly type: typeof SensorType.Problem; getProperty(property: typeof ProblemProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactivePTZControl extends ReactiveSensor { readonly type: typeof SensorType.PTZ; getProperty(property: typeof PTZProperty.Position): PTZPosition | undefined; getProperty(property: typeof PTZProperty.Moving): boolean | undefined; getProperty(property: typeof PTZProperty.Presets): string[] | undefined; getProperty(property: typeof PTZProperty.Velocity): PTZDirection | undefined; getProperty(property: typeof PTZProperty.TargetPreset): string | undefined; getProperty(property: string): unknown; setProperty(property: typeof PTZProperty.Position, value: PTZPosition): Promise; setProperty(property: typeof PTZProperty.Moving, value: boolean): Promise; setProperty(property: typeof PTZProperty.Velocity, value: PTZDirection): Promise; setProperty(property: typeof PTZProperty.TargetPreset, value: string): Promise; setProperty(property: string, value: unknown): Promise; } export declare interface ReactiveSecuritySystem extends ReactiveSensor { readonly type: typeof SensorType.SecuritySystem; getProperty(property: typeof SecuritySystemProperty.CurrentState): SecuritySystemState | undefined; getProperty(property: typeof SecuritySystemProperty.TargetState): SecuritySystemState | undefined; getProperty(property: string): unknown; setProperty(property: typeof SecuritySystemProperty.CurrentState, value: SecuritySystemState): Promise; setProperty(property: typeof SecuritySystemProperty.TargetState, value: SecuritySystemState): Promise; setProperty(property: string, value: unknown): Promise; } export declare interface ReactiveSensor> { readonly id: string; readonly type: SensorType; readonly name: string; readonly displayName: Ref; readonly nativeId?: string; readonly pluginId: string; readonly boundCameraId?: string; readonly assignedCameraIds: Ref; readonly exposed: Ref; readonly connected: Ref; readonly capabilities: Ref; readonly properties: TProperties; getProperty(property: string): T | undefined; setProperty(property: string, value: unknown): Promise; setDisplayName(displayName: string): Promise; hasCapability(capability: string): boolean; onCapabilitiesChanged(callback: (capabilities: string[]) => void): () => void; } export declare interface ReactiveSensorManager { readonly sensors: ComputedRef; readonly isInitialized: ComputedRef; ensureInitialized(): Promise; reconnect(): Promise; getSensor(sensorId: string): ReactiveSensor | undefined; getSensorsByType(type: SensorType): ReactiveSensor[]; hasSensorType(type: SensorType): boolean; setDisplayName(sensorId: string, displayName: string): Promise; close(): void; } export declare interface ReactiveSirenControl extends ReactiveSensor { readonly type: typeof SensorType.Siren; getProperty(property: typeof SirenProperty.Active): boolean | undefined; getProperty(property: typeof SirenProperty.Volume): number | undefined; getProperty(property: string): unknown; setProperty(property: typeof SirenProperty.Active, value: boolean): Promise; setProperty(property: typeof SirenProperty.Volume, value: number): Promise; setProperty(property: string, value: unknown): Promise; } export declare interface ReactiveSmokeSensor extends ReactiveSensor { readonly type: typeof SensorType.Smoke; getProperty(property: typeof SmokeProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveStorage { readonly proxy: Promisify; readonly client: RPCClient; readonly config: ShallowRef; readonly isLoading: Ref; readonly error: Ref; getConfig(): Promise; setValue(key: string, value: T): Promise; setConfig(newConfig: Record): Promise; submitValue(key: string, value: unknown): Promise; } export declare interface ReactiveStream { readonly status: Ref; readonly activeMode: Ref>; readonly requestedMode: Ref; readonly activeResolution: Ref; readonly requestedResolution: Ref; readonly degradedFrom: Ref; readonly degradeReason: Ref; readonly source: Ref; readonly hasVideo: Ref; readonly hasAudio: Ref; readonly hasBackchannel: Ref; readonly isPlaying: Ref; readonly error: Ref; readonly probeInfo: Ref; readonly muted: Ref; readonly paused: Ref; readonly nativeWidth: Ref; readonly nativeHeight: Ref; start: () => Promise; stop: () => void; restart: () => Promise; setMode: (mode: VideoStreamingMode) => Promise; setResolution: (resolution: StreamingRole) => Promise; setMicrophone: (track: MediaStreamTrack | null) => Promise; setMuted: (muted: boolean) => void; play: () => Promise; pause: () => void; } export declare interface ReactiveSwitchControl extends ReactiveSensor { readonly type: typeof SensorType.Switch; getProperty(property: typeof SwitchProperty.On): boolean | undefined; getProperty(property: string): unknown; setProperty(property: typeof SwitchProperty.On, value: boolean): Promise; setProperty(property: string, value: unknown): Promise; } export declare interface ReactiveTamperSensor extends ReactiveSensor { readonly type: typeof SensorType.Tamper; getProperty(property: typeof TamperProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare interface ReactiveTemperatureInfo extends ReactiveSensor { readonly type: typeof SensorType.Temperature; getProperty(property: typeof TemperatureProperty.Current): number | undefined; getProperty(property: string): unknown; } export declare interface ReactiveVibrationSensor extends ReactiveSensor { readonly type: typeof SensorType.Vibration; getProperty(property: typeof VibrationProperty.Detected): boolean | undefined; getProperty(property: string): unknown; } export declare function refreshClientSubscriptions(): void; declare interface RefreshedStates { camera: Camera; cameraState: boolean; frameWorkerState: boolean; sensorStates: Record; } export declare function releaseSensorManager(): void; export declare function resetClientState(): void; export declare function rpcCall(rpcRef: Readonly>, fn: (rpc: RPCClient) => Promise, options?: RpcCallOptions): Promise; export declare interface RpcCallOptions { maxRetries?: number; awaitConnect?: boolean; connectTimeoutMs?: number; retryDelayMs?: (attempt: number) => number; shouldRetry?: (err: unknown, attempt: number) => boolean; signal?: AbortSignal; } export { RPCClient } /* Excluded from this release type: SecuritySystemProperties */ /* Excluded from this release type: SecuritySystemProperty */ declare interface SensorAddedEvent { sensor: StoredSensorData; state: SensorRefreshedState; } declare interface SensorAssignmentChangedEvent { sensorId: string; sensorType: SensorType; cameraId: string; assigned: boolean; } export declare interface SensorCameraViewNamespaces { sensorWriteSubject: string; } declare interface SensorCapabilitiesChangedEvent { sensorId: string; capabilities: string[]; } declare interface SensorConnectedChangedEvent { sensorId: string; sensorType: SensorType; connected: boolean; } declare interface SensorDeletedEvent { sensorId: string; sensorType: SensorType; } declare interface SensorDiscoveryNamespaces { sensorDiscoverySubject: string; } declare interface SensorDisplayNameChangedEvent { sensorId: string; displayName: string; } export declare interface SensorEventMessage { type: 'property:changed' | 'sensor:added' | 'sensor:deleted' | 'sensor:connected:changed' | 'sensor:displayName:changed' | 'sensor:capabilities:changed' | 'sensor:assignment:changed' | 'sensor:exposed:changed'; data: PropertyChangedEvent | SensorAddedEvent | SensorDeletedEvent | SensorConnectedChangedEvent | SensorDisplayNameChangedEvent | SensorCapabilitiesChangedEvent | SensorAssignmentChangedEvent | SensorExposedChangedEvent; } export declare interface SensorEventNamespaces { sensorSubject: string; } declare interface SensorExposedChangedEvent { sensorId: string; sensorType: SensorType; exposed: boolean; origin?: string; } export declare interface SensorProviderNamespaces { sensorRpc: string; } export declare interface SensorRefreshedState { type: SensorType; properties: Record; capabilities: string[]; displayName?: string; } export declare interface SensorRegistryNamespaces { sensorsSubject: string; sensorsRpc: string; } export declare interface SensorRegistryRPC { getSensors(): StoredSensorData[]; getSensorRpc(sensorId: string): StoredSensorData | undefined; getSensorState(sensorId: string): SensorRefreshedState; getSensorStates(): Record; getPropertyValue(sensorId: string, property: string): unknown; getAllPropertyValues(sensorId: string): Record; setDisplayName(sensorId: string, displayName: string): void; } export declare function setFullscreenRoot(el: HTMLElement | null): void; /* Excluded from this release type: SirenControlProperties */ /* Excluded from this release type: SirenProperty */ /* Excluded from this release type: SmokeProperty */ /* Excluded from this release type: SmokeSensorProperties */ declare interface SnapshotWithMeta { data: ArrayBuffer; ageMs: number; } export declare interface StorageRPC { getValue(key: string, defaultValue?: T): Promise; setValue(key: string, newValue: T): Promise; submitValue(key: string, newValue: unknown): Promise; hasValue(key: string): boolean; getConfig(): Promise; setConfig(newConfig: Record): Promise; getSchema(key: string): T | undefined; hasSchema(key: string): boolean; } export declare interface StoredSensorData { id: string; type: SensorType; name: string; displayName: string; nativeId?: string; pluginId: string; assignedCameraIds: string[]; boundCameraId?: string; exposed: boolean; origin?: string; address?: string; sourceState?: SensorSourceState; connected: boolean; properties: Record; capabilities: string[]; requiresFrames?: boolean; modelSpec?: ModelSpec; } export declare const STREAM_CONFIG: { readonly WEBRTC: { readonly RECONNECT_DELAY: 1000; readonly CONNECT_TIMEOUT: 10000; readonly WS_CONNECT_TIMEOUT: 5000; readonly ICE_SERVERS: readonly [{ readonly urls: "stun:stun.l.google.com:19302"; }]; }; readonly MSE: { readonly BUFFER_SIZE: number; readonly BUFFER_WINDOW: 5; }; readonly CODECS: { readonly DEFAULT: readonly ["avc1.640029", "avc1.64002A", "avc1.640033", "hvc1.1.6.L153.B0", "mp4a.40.2", "mp4a.40.5", "flac", "opus"]; readonly WEBRTC_VIDEO: readonly ["H264", "VP8", "VP9"]; readonly WEBRTC_AUDIO: readonly ["opus", "G722", "PCMU", "PCMA"]; }; }; declare type StreamDegradeReason = 'codec'; export declare interface StreamOptions { camera: MaybeRefOrGetter; videoElement: MaybeRefOrGetter; mode?: MaybeRefOrGetter; resolution?: MaybeRefOrGetter; autoStart?: boolean; manageLifecycle?: boolean; wsReconnectTimeout?: number; webrtcConnectTimeout?: number; } export declare type StreamStatus = 'idle' | 'connecting' | 'connected' | 'reconnecting' | 'error' | 'unsupported' | 'closed'; /* Excluded from this release type: SwitchControlProperties */ /* Excluded from this release type: SwitchProperty */ /* Excluded from this release type: TamperProperty */ /* Excluded from this release type: TamperSensorProperties */ /* Excluded from this release type: TemperatureInfoProperties */ /* Excluded from this release type: TemperatureProperty */ export declare interface TerminalManagerInterface { createSession(options?: TerminalOptions): Promise; generateOutput(sessionId: string): AsyncGenerator; writeInput(sessionId: string, data: string): Promise; resize(sessionId: string, dimensions: { cols: number; rows: number }): Promise; closeSession(sessionId: string): Promise; } export declare interface TerminalManagerNamespaces { terminalManagerSubject: string; terminalManagerRpc: string; } export declare interface TerminalOptions { cols?: number; rows?: number; cwd?: string; shell?: string; env?: Record; } export declare interface TerminalSessionInfo { sessionId: string; pid: number; dimensions: { cols: number; rows: number }; } declare interface TrainingCandidateBox { label: string; confidence: number; x: number; y: number; width: number; height: number; } declare interface TrainingCandidateIngest { cameraId: string; eventId: string; capturedAt: number; boxes: TrainingCandidateBox[]; scene: Uint8Array; } declare type TrainingIngestResult = 'stored' | 'skip' | 'disabled'; export declare function useAllSensors(): UseSensorsReturn; export declare function useAudioSensor(camera: CameraIdentifier, preferredPluginId?: MaybeRefOrGetter): UseSensorTypedReturn; export declare function useCameraById(cameraIdOrName: MaybeRefOrGetter): UseCameraByIdReturn; export declare interface UseCameraByIdReturn { camera: ShallowRef; isLoading: ComputedRef; error: Ref; refresh: () => Promise; } export declare function useCameraStorage(camera: CameraIdentifier, pluginName: MaybeRefOrGetter): UseStorageReturn; export declare function useCameraStream(options: UseCameraStreamOptions): CameraStream; export declare interface UseCameraStreamOptions { camera: MaybeRefOrGetter; mode?: MaybeRefOrGetter; resolution?: MaybeRefOrGetter; activityMode?: MaybeRefOrGetter; activityConfig?: ActivityModeConfig; autoStart?: MaybeRefOrGetter; startDelay?: number; isolated?: boolean; canvasStyle?: MaybeRefOrGetter; canvasClass?: MaybeRefOrGetter; videoStyle?: MaybeRefOrGetter; videoClass?: MaybeRefOrGetter; } export declare function useCameraUi(): CameraUiContext; export declare function useClassifierSensors(camera: CameraIdentifier): UseSensorsTypedReturn; export declare function useCoreManager(): ReactiveCoreManager; export declare function useCuiFullscreen(target: MaybeRefOrGetter, options?: UseCuiFullscreenOptions): UseCuiFullscreenReturn; export declare interface UseCuiFullscreenOptions { mode?: FullscreenMode; } export declare interface UseCuiFullscreenReturn { readonly isFullscreen: ComputedRef; readonly isSupported: ComputedRef; enter: () => Promise; exit: () => Promise; toggle: () => Promise; } export declare function useDeviceManager(): ReactiveDeviceManager; export declare function useFaceSensor(camera: CameraIdentifier, preferredPluginId?: MaybeRefOrGetter): UseSensorTypedReturn; export declare function useLicensePlateSensor(camera: CameraIdentifier, preferredPluginId?: MaybeRefOrGetter): UseSensorTypedReturn; export declare function useMotionSensor(camera: CameraIdentifier, preferredPluginId?: MaybeRefOrGetter): UseSensorTypedReturn; export declare function useOAuth(pluginName: string): UseOAuthReturn; export declare interface UseOAuthReturn { readonly state: Ref; readonly metadata: Ref; startDeviceFlow(scope: string[]): Promise; startAuthCodeFlow(scope: string[]): Promise; cancel(): Promise; disconnect(): Promise; refresh(): Promise; } export declare function useObjectSensor(camera: CameraIdentifier, preferredPluginId?: MaybeRefOrGetter): UseSensorTypedReturn; export declare function usePlugin(pluginName: MaybeRefOrGetter): UsePluginReturn; export declare interface UsePluginReturn { plugin: ShallowRef | undefined>; contract: Ref; isLoading: ComputedRef; error: Ref; refresh: () => Promise; } export declare function usePluginStorage(pluginName: MaybeRefOrGetter): UseStorageReturn; export declare function usePTZControl(camera: CameraIdentifier): UseSensorTypedReturn; export declare function useRpcCall(fn: (rpc: RPCClient) => Promise, options?: UseRpcCallOptions): UseRpcCallReturn; export declare interface UseRpcCallOptions extends RpcCallOptions { immediate?: boolean; watch?: WatchSource[]; refetchOnReconnect?: boolean; } export declare interface UseRpcCallReturn { readonly data: ShallowRef; readonly loading: Ref; readonly error: Ref; execute(): Promise; refresh(): Promise; } export declare function useRpcSubscription(subscribeFn: (rpc: RPCClient) => Promise<() => void>, options?: UseRpcSubscriptionOptions): UseRpcSubscriptionReturn; export declare interface UseRpcSubscriptionOptions { onError?: (err: unknown) => void; maxRetries?: number; retryDelayMs?: (attempt: number) => number; } export declare interface UseRpcSubscriptionReturn { readonly isActive: Ref; resubscribe(): Promise; } export declare function useSensorById(camera: CameraIdentifier, sensorId: MaybeRefOrGetter): UseSensorReturn; export declare function useSensorByType(camera: CameraIdentifier, sensorType: MaybeRefOrGetter): UseSensorReturn; export declare interface UseSensorReturn { sensor: ShallowRef | undefined>; isLoading: ComputedRef; error: Ref; } export declare function useSensors(camera: CameraIdentifier): UseSensorsReturn; export declare function useSensorsByType(camera: CameraIdentifier, sensorType: MaybeRefOrGetter): UseSensorsReturn; export declare interface UseSensorsReturn { sensors: ComputedRef[]>; isLoading: ComputedRef; error: Ref; } export declare function useSensorStorage(sensorId: MaybeRefOrGetter, pluginId: MaybeRefOrGetter): UseStorageReturn; export declare interface UseSensorsTypedReturn = ReactiveSensor> { sensors: ComputedRef; isLoading: ComputedRef; error: Ref; } export declare interface UseSensorTypedReturn = ReactiveSensor> { sensor: ShallowRef; isLoading: ComputedRef; error: Ref; } export declare function useSnapshot(cameraIdOrName: MaybeRefOrGetter): UseSnapshotReturn; export declare interface UseSnapshotReturn { snapshot: ShallowRef; snapshotSrc: ComputedRef; snapshotTimestamp: ComputedRef; isLoading: ComputedRef; refresh: () => Promise; } export declare interface UseStorageReturn { config: ShallowRef; isLoading: ComputedRef; error: Ref; getConfig(): Promise; setValue(key: string, value: T): Promise; setConfig(newConfig: Record): Promise; submitValue(key: string, value: unknown): Promise; isConnected: Ref; } export declare function useTabVisibility(): UseTabVisibilityReturn; export declare interface UseTabVisibilityReturn { readonly isVisible: ComputedRef; onTabHidden(cb: HiddenCallback): () => void; onTabPaused(cb: HiddenCallback, options?: { delayMs?: number; }): () => void; onTabVisible(cb: VisibleCallback): () => void; } export declare function useTerminal(): UseTerminalReturn; export declare interface UseTerminalOptions extends TerminalOptions { onData?: (data: Uint8Array) => void; onClose?: () => void; onError?: (error: Error) => void; } export declare interface UseTerminalReturn { sessionId: Readonly>; isConnected: Readonly>; isConnecting: Readonly>; isClientConnected: Readonly>; error: Readonly>; dimensions: Readonly>; connect: (options?: UseTerminalOptions) => Promise; write: (data: string) => Promise; resize: (dimensions: { cols: number; rows: number; }) => Promise; close: () => Promise; } export declare function useTopmostFullscreenElement(): ComputedRef; /* Excluded from this release type: VibrationProperty */ /* Excluded from this release type: VibrationSensorProperties */ export declare type VideoStreamingMode = 'webrtc' | 'webrtc/tcp' | 'mse' | 'auto'; declare type VisibleCallback = (info: { hiddenMs: number; }) => void; export { } declare module 'fastify' { interface FastifyRequest { locals: CustomLocals; } interface FastifyContextConfig { uploadToDisk?: boolean; } } /** * Copyright (c) 2017, Daniel Imms (MIT License). * Copyright (c) 2018, Microsoft Corporation (MIT License). */ declare module '@scrypted/node-pty' { /** * Forks a process as a pseudoterminal. * @param file The file to launch. * @param args The file's arguments as argv (string[]) or in a pre-escaped CommandLine format * (string). Note that the CommandLine option is only available on Windows and is expected to be * escaped properly. * @param options The options of the terminal. * @see CommandLineToArgvW https://msdn.microsoft.com/en-us/library/windows/desktop/bb776391(v=vs.85).aspx * @see Parsing C++ Comamnd-Line Arguments https://msdn.microsoft.com/en-us/library/17w5ykft.aspx * @see GetCommandLine https://msdn.microsoft.com/en-us/library/windows/desktop/ms683156.aspx */ export function spawn(file: string, args: string[] | string, options: IPtyForkOptions | IWindowsPtyForkOptions): IPty; export interface IBasePtyForkOptions { /** * Name of the terminal to be set in environment ($TERM variable). */ name?: string; /** * Number of intial cols of the pty. */ cols?: number; /** * Number of initial rows of the pty. */ rows?: number; /** * Working directory to be set for the child program. */ cwd?: string; /** * Environment to be set for the child program. */ env?: Record; /** * String encoding of the underlying pty. * If set, incoming data will be decoded to strings and outgoing strings to bytes applying this encoding. * If unset, incoming data will be delivered as raw bytes (Buffer type). * By default 'utf8' is assumed, to unset it explicitly set it to `null`. */ encoding?: string | null; /** * (EXPERIMENTAL) * Whether to enable flow control handling (false by default). If enabled a message of `flowControlPause` * will pause the socket and thus blocking the child program execution due to buffer back pressure. * A message of `flowControlResume` will resume the socket into flow mode. * For performance reasons only a single message as a whole will match (no message part matching). * If flow control is enabled the `flowControlPause` and `flowControlResume` messages are not forwarded to * the underlying pseudoterminal. */ handleFlowControl?: boolean; /** * (EXPERIMENTAL) * The string that should pause the pty when `handleFlowControl` is true. Default is XOFF ('\x13'). */ flowControlPause?: string; /** * (EXPERIMENTAL) * The string that should resume the pty when `handleFlowControl` is true. Default is XON ('\x11'). */ flowControlResume?: string; } export interface IPtyForkOptions extends IBasePtyForkOptions { /** * Security warning: use this option with great caution, * as opened file descriptors with higher privileges might leak to the child program. */ uid?: number; gid?: number; } export interface IWindowsPtyForkOptions extends IBasePtyForkOptions { /** * Whether to use the ConPTY system on Windows. When this is not set, ConPTY will be used when * the Windows build number is >= 18309 (instead of winpty). Note that ConPTY is available from * build 17134 but is too unstable to enable by default. * * This setting does nothing on non-Windows. */ useConpty?: boolean; /** * Whether to use PSEUDOCONSOLE_INHERIT_CURSOR in conpty. * @see https://docs.microsoft.com/en-us/windows/console/createpseudoconsole */ conptyInheritCursor?: boolean; } /** * An interface representing a pseudoterminal, on Windows this is emulated via the winpty library. */ export interface IPty { /** * The process ID of the outer process. */ readonly pid: number; /** * The column size in characters. */ readonly cols: number; /** * The row size in characters. */ readonly rows: number; /** * The title of the active process. */ readonly process: string; /** * (EXPERIMENTAL) * Whether to handle flow control. Useful to disable/re-enable flow control during runtime. * Use this for binary data that is likely to contain the `flowControlPause` string by accident. */ handleFlowControl: boolean; /** * Adds an event listener for when a data event fires. This happens when data is returned from * the pty. * @returns an `IDisposable` to stop listening. */ readonly onData: IEvent; /** * Adds an event listener for when an exit event fires. This happens when the pty exits. * @returns an `IDisposable` to stop listening. */ readonly onExit: IEvent<{ exitCode: number; signal?: number }>; /** * Resizes the dimensions of the pty. * @param columns The number of columns to use. * @param rows The number of rows to use. */ resize(columns: number, rows: number): void; /** * Clears the pty's internal representation of its buffer. This is a no-op * unless on Windows/ConPTY. This is useful if the buffer is cleared on the * frontend in order to synchronize state with the backend to avoid ConPTY * possibly reprinting the screen. */ clear(): void; /** * Writes data to the pty. * @param data The data to write. */ write(data: string): void; /** * Kills the pty. * @param signal The signal to use, defaults to SIGHUP. This parameter is not supported on * Windows. * @throws Will throw when signal is used on Windows. */ kill(signal?: string): void; /** * Pauses the pty for customizable flow control. */ pause(): void; /** * Resumes the pty for customizable flow control. */ resume(): void; } /** * An object that can be disposed via a dispose function. */ export interface IDisposable { dispose(): void; } /** * An event that can be listened to. * @returns an `IDisposable` to stop listening. */ export type IEvent = (listener: (e: T) => any) => IDisposable; }