@apocaliss92/camstack-js-sdk 0.1.5
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/README.md +57 -0
- package/dist/index.cjs +1074 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +759 -0
- package/dist/index.d.ts +759 -0
- package/dist/index.js +995 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @apocaliss92/camstack-js-sdk
|
|
2
|
+
|
|
3
|
+
Shared types, constants, and utilities for the CamStack ecosystem.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This SDK provides the shared foundation used by both the **CamStack proxy** (Node.js backend) and the **CamStack app** (Expo/React Native frontend). It ensures type safety and consistency across the entire stack.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @apocaliss92/camstack-js-sdk
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## What's Included
|
|
16
|
+
|
|
17
|
+
### Detection Classes (`detection`)
|
|
18
|
+
- `DetectionClass` enum and sub-class arrays (animals, persons, vehicles, faces, etc.)
|
|
19
|
+
- Classification helpers: `isFaceClassname()`, `isAnimalClassname()`, `getParentClass()`, etc.
|
|
20
|
+
- Timeline presets: `TIMELINE_PRESET_CRITICAL`, `TIMELINE_PRESET_IMPORTANT`, `TIMELINE_PRESET_ALL`
|
|
21
|
+
- Default enabled classes configuration
|
|
22
|
+
|
|
23
|
+
### Device Types (`devices`)
|
|
24
|
+
- `CanonicalDeviceType` — normalized device type union
|
|
25
|
+
- `RAW_TO_CANONICAL` — mapping from Scrypted PascalCase / HA domains to canonical types
|
|
26
|
+
- `ELIGIBLE_SCRYPTED_DEVICE_TYPES`, `ELIGIBLE_HA_DOMAINS` — supported device filters
|
|
27
|
+
- `Device`, `DeviceCommand`, `CommandResult` interfaces
|
|
28
|
+
|
|
29
|
+
### Timeline & Events (`timeline`)
|
|
30
|
+
- `DetectionEvent`, `MotionItem`, `TimelineArtifact` — timeline data types
|
|
31
|
+
- `TimelineCluster`, `DetectionGroup` — server-side grouping types
|
|
32
|
+
- `CameraDayDataResponse`, `ClusteredDayDataResponse` — API response shapes
|
|
33
|
+
- Query types for clustered data, grouped events, and reels
|
|
34
|
+
|
|
35
|
+
### Camera & PTZ (`camera`)
|
|
36
|
+
- `CameraSourceType` (`"scrypted" | "frigate" | "onvif" | "rtsp"`)
|
|
37
|
+
- `PanTiltZoomCommand`, `PanTiltZoomCapabilities`
|
|
38
|
+
- `CameraAccessorySwitchKind`, `CameraStatusEntry`
|
|
39
|
+
|
|
40
|
+
### Feature Matrix (`features`)
|
|
41
|
+
- `FEATURE_MATRIX` — static capability table (features x sources x platforms)
|
|
42
|
+
- `isFeatureAvailable()`, `getSourceFeatures()`, `getBackendRequiredFeatures()`
|
|
43
|
+
|
|
44
|
+
### NVR Types (`nvr`)
|
|
45
|
+
- `NvrCamera`, `NvrEvent`, `NvrConfig` — NVR provider types
|
|
46
|
+
- `RecordingSegment`, `MotionBucket`, `StreamInfo`
|
|
47
|
+
- `NvrVideoClip`, `VideoClipsQuery`, `VideoClipsResult`
|
|
48
|
+
- Event/motion/recording query interfaces
|
|
49
|
+
|
|
50
|
+
### Client (`client`, `proxy-client`, `direct-client`)
|
|
51
|
+
- `CamStackClient` — auto-detecting client (proxy or direct)
|
|
52
|
+
- `ProxyClient` — connects via WebSocket to camstack-proxy
|
|
53
|
+
- `DirectClient` — connects directly to NVR HTTP API
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|