@camstack/sdk 0.1.55 → 0.2.0

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.
@@ -2,4 +2,4 @@
2
2
  * Re-export AppRouter type from @camstack/types (pre-generated from server router).
3
3
  * Type-only — no runtime dependency on the backend package.
4
4
  */
5
- export type { AppRouter as BackendAppRouter } from "@camstack/types";
5
+ export type { AppRouter as BackendAppRouter } from '@camstack/types';
package/dist/camera.d.ts CHANGED
@@ -2,12 +2,12 @@
2
2
  * Camera & PTZ types — shared between CamStack app and proxy.
3
3
  */
4
4
  /** Camera source type discriminator. */
5
- export type CameraSourceType = "scrypted" | "frigate" | "onvif" | "rtsp" | "camstack";
5
+ export type CameraSourceType = 'scrypted' | 'frigate' | 'onvif' | 'rtsp' | 'camstack';
6
6
  /** Streaming method. */
7
- export type StreamMethod = "webrtc" | "mjpeg";
7
+ export type StreamMethod = 'webrtc' | 'mjpeg';
8
8
  /** Scrypted-compatible PTZ command. */
9
9
  export interface PanTiltZoomCommand {
10
- movement?: "Relative" | "Absolute" | "Continuous" | "Home" | "Preset";
10
+ movement?: 'Relative' | 'Absolute' | 'Continuous' | 'Home' | 'Preset';
11
11
  pan?: number;
12
12
  tilt?: number;
13
13
  zoom?: number;
@@ -22,7 +22,7 @@ export interface PanTiltZoomCapabilities {
22
22
  presets?: Record<string, string>;
23
23
  }
24
24
  /** Accessory switch kinds exposed by the Advanced Notifier plugin. */
25
- export type CameraAccessorySwitchKind = "siren_on_motion" | "siren" | "light_on_motion" | "light" | "pir" | "autotracking";
25
+ export type CameraAccessorySwitchKind = 'siren_on_motion' | 'siren' | 'light_on_motion' | 'light' | 'pir' | 'autotracking';
26
26
  /** Extended camera status with accessory switches (from AN plugin). */
27
27
  export interface CameraStatusEntry {
28
28
  notificationsEnabled: boolean;
@@ -47,7 +47,7 @@ export declare const getParentDetectionClass: (det: {
47
47
  export declare const defaultDetectionClasses: DetectionClass[];
48
48
  /** Default enabled classes: all except Motion. */
49
49
  export declare const DEFAULT_ENABLED_CLASSES: (DetectionClass.Person | DetectionClass.Vehicle | DetectionClass.Animal | DetectionClass.Audio | DetectionClass.Face | DetectionClass.Plate | DetectionClass.Package | DetectionClass.Doorbell | DetectionClass.Sensor)[];
50
- export type TimelineEventPreset = "all" | "important" | "critical" | "custom";
50
+ export type TimelineEventPreset = 'all' | 'important' | 'critical' | 'custom';
51
51
  /** Classes for "critical" preset: security-relevant only (person, doorbell, package). */
52
52
  export declare const TIMELINE_PRESET_CRITICAL: string[];
53
53
  /** Classes for "important" preset: critical + vehicle, animal, audio, face, plate. */
package/dist/devices.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * - Unified Device / DeviceCommand / CommandResult interfaces
8
8
  * - AssociatedDeviceState shape
9
9
  */
10
- export type CanonicalDeviceType = "light" | "switch" | "cover" | "lock" | "alarm" | "button" | "select" | "siren" | "sensor" | "entry" | "media_player" | "script";
10
+ export type CanonicalDeviceType = 'light' | 'switch' | 'cover' | 'lock' | 'alarm' | 'button' | 'select' | 'siren' | 'sensor' | 'entry' | 'media_player' | 'script';
11
11
  /**
12
12
  * Maps raw device types from Scrypted (PascalCase) and Home Assistant (lowercase domains)
13
13
  * to canonical CamStack device types.
@@ -34,7 +34,7 @@ export declare const ELIGIBLE_HA_DOMAINS: readonly ["light", "switch", "input_bo
34
34
  /** Set version for O(1) lookup. */
35
35
  export declare const ELIGIBLE_HA_DOMAINS_SET: Set<string>;
36
36
  /** All device command actions supported by CamStack. */
37
- export type DeviceCommandAction = "turnOn" | "turnOff" | "openEntry" | "closeEntry" | "stopEntry" | "lock" | "unlock" | "disarm" | "arm" | "pressButton" | "selectOption" | "volumeUp" | "volumeDown" | "volumeMute";
37
+ export type DeviceCommandAction = 'turnOn' | 'turnOff' | 'openEntry' | 'closeEntry' | 'stopEntry' | 'lock' | 'unlock' | 'disarm' | 'arm' | 'pressButton' | 'selectOption' | 'volumeUp' | 'volumeDown' | 'volumeMute';
38
38
  /**
39
39
  * State snapshot shape for an associated device.
40
40
  * Used by both app (AssociatedDeviceStateSnapshot) and proxy (Device.state).
@@ -52,7 +52,7 @@ export interface AssociatedDeviceState {
52
52
  supportedModes?: string[];
53
53
  };
54
54
  buttons?: string[];
55
- entryOpen?: boolean | "jammed";
55
+ entryOpen?: boolean | 'jammed';
56
56
  value?: string;
57
57
  options?: string[];
58
58
  volumeLevel?: number;
@@ -99,7 +99,7 @@ export interface CommandResult {
99
99
  state?: Record<string, unknown>;
100
100
  }
101
101
  /** Device source type (integration that provides the device). */
102
- export type AssociatedDeviceSource = "scrypted" | "ha";
102
+ export type AssociatedDeviceSource = 'scrypted' | 'ha';
103
103
  /** Eligible device summary (for device picker UI). */
104
104
  export interface EligibleDevice {
105
105
  id: string;
@@ -117,7 +117,7 @@ export interface DeviceAction {
117
117
  /** Display label (e.g. "Toggle", "Set Brightness", "Move Camera"). */
118
118
  label: string;
119
119
  /** Action category for UI grouping. */
120
- category?: "power" | "control" | "ptz" | "media" | "system" | "custom";
120
+ category?: 'power' | 'control' | 'ptz' | 'media' | 'system' | 'custom';
121
121
  /** Icon hint (lucide icon name or emoji). */
122
122
  icon?: string;
123
123
  /** Parameters this action accepts. */
@@ -132,7 +132,7 @@ export interface DeviceActionParam {
132
132
  /** Display label. */
133
133
  label: string;
134
134
  /** Type for UI rendering. */
135
- type: "boolean" | "number" | "string" | "select" | "slider";
135
+ type: 'boolean' | 'number' | 'string' | 'select' | 'slider';
136
136
  /** Default value. */
137
137
  default?: unknown;
138
138
  /** For select type: available options. */
@@ -7,9 +7,9 @@
7
7
  * - Whether the camstack-server backend is required
8
8
  * - The ICameraSource method that enables the feature
9
9
  */
10
- export type FeatureId = "liveStream" | "multiResolution" | "motion" | "objectDetection" | "audioVolume" | "audioVolumes" | "ptz" | "intercom" | "deviceStatus" | "timeline" | "clusteredTimeline" | "detectionClasses" | "videoClips" | "nvrPlayback" | "nvrScrub" | "recordingThumbnail" | "nvrSeekToLive";
11
- export type PlatformId = "ios" | "android" | "web" | "scryptedEmbed";
12
- export type SourceType = "frigate" | "scrypted" | "rtsp";
10
+ export type FeatureId = 'liveStream' | 'multiResolution' | 'motion' | 'objectDetection' | 'audioVolume' | 'audioVolumes' | 'ptz' | 'intercom' | 'deviceStatus' | 'timeline' | 'clusteredTimeline' | 'detectionClasses' | 'videoClips' | 'nvrPlayback' | 'nvrScrub' | 'recordingThumbnail' | 'nvrSeekToLive';
11
+ export type PlatformId = 'ios' | 'android' | 'web' | 'scryptedEmbed';
12
+ export type SourceType = 'frigate' | 'scrypted' | 'rtsp';
13
13
  export interface FeatureEntry {
14
14
  id: FeatureId;
15
15
  label: string;