een-api-toolkit 0.3.28 → 0.3.30

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.
@@ -119,15 +119,28 @@ interface ListCamerasParams {
119
119
  ## Key Functions
120
120
 
121
121
  ### getCameras()
122
- List cameras with optional filters:
122
+ List cameras with optional filters.
123
+
124
+ **IMPORTANT:** The `status` field is NOT included by default. You must use `include: ['status']` to receive it:
125
+
123
126
  ```typescript
124
127
  import { getCameras, type Camera, type ListCamerasParams } from 'een-api-toolkit'
125
128
 
126
129
  const cameras = ref<Camera[]>([])
127
130
 
128
- // Get all online cameras
131
+ // Get all cameras WITH status - include: ['status'] is required!
132
+ async function fetchCameras() {
133
+ const result = await getCameras({
134
+ include: ['status'], // Required to get camera.status
135
+ pageSize: 100
136
+ })
137
+ // Now camera.status will be populated
138
+ }
139
+
140
+ // Get all online cameras (still need include for display)
129
141
  async function fetchOnlineCameras() {
130
142
  const result = await getCameras({
143
+ include: ['status'], // Required to display status in UI
131
144
  status__in: ['online', 'streaming', 'recording'],
132
145
  pageSize: 100
133
146
  })
@@ -231,17 +244,33 @@ async function fetchBridge(bridgeId: string) {
231
244
 
232
245
  ```vue
233
246
  <script setup lang="ts">
234
- import { ref, onMounted } from 'vue'
235
- import { getCameras, type Camera, type ListCamerasParams } from 'een-api-toolkit'
247
+ import { ref, onMounted, computed } from 'vue'
248
+ import { getCameras, type Camera, type CameraStatus, type ListCamerasParams } from 'een-api-toolkit'
236
249
 
237
250
  const cameras = ref<Camera[]>([])
238
251
  const loading = ref(false)
239
252
  const statusFilter = ref<string[]>(['online', 'streaming', 'recording'])
240
253
 
254
+ // Helper: status can be a string OR an object with connectionStatus
255
+ function getStatusString(status?: CameraStatus | { connectionStatus?: CameraStatus }): string | undefined {
256
+ if (!status) return undefined
257
+ if (typeof status === 'string') return status
258
+ return status.connectionStatus
259
+ }
260
+
261
+ // Computed property to pre-process cameras with status string (avoids calling helper multiple times in template)
262
+ const camerasWithStatus = computed(() =>
263
+ cameras.value.map(camera => ({
264
+ ...camera,
265
+ statusString: getStatusString(camera.status),
266
+ }))
267
+ )
268
+
241
269
  async function fetchCameras() {
242
270
  loading.value = true
243
271
 
244
272
  const params: ListCamerasParams = {
273
+ include: ['status'], // Required to receive status field
245
274
  pageSize: 100
246
275
  }
247
276
 
@@ -275,10 +304,13 @@ onMounted(fetchCameras)
275
304
 
276
305
  <div v-if="loading">Loading cameras...</div>
277
306
 
307
+ <!-- Use computed property for better performance (status string computed once per camera) -->
278
308
  <div class="camera-grid" v-else>
279
- <div v-for="camera in cameras" :key="camera.id" class="camera-card">
309
+ <div v-for="camera in camerasWithStatus" :key="camera.id" class="camera-card">
280
310
  <h3>{{ camera.name }}</h3>
281
- <span :class="camera.status">{{ camera.status }}</span>
311
+ <span :class="camera.statusString">
312
+ {{ camera.statusString || 'unknown' }}
313
+ </span>
282
314
  </div>
283
315
  </div>
284
316
  </div>
package/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [0.3.28] - 2026-01-23
5
+ ## [0.3.30] - 2026-01-23
6
6
 
7
7
  ### Release Summary
8
8
 
@@ -10,19 +10,13 @@ No PR descriptions available for this release.
10
10
 
11
11
  ### Detailed Changes
12
12
 
13
- #### Bug Fixes
14
- - fix: Suppress eslint console.log warning in debug utility
15
-
16
13
  #### Other Changes
17
- - docs: Address Gemini and Claude review comments
18
- - chore: Add OAuth proxy startup to PR-and-check skill
19
- - docs: Add Claude Code agent setup instructions to Live Viewer prompt
20
- - docs: Add Claude Code agents documentation to User Guide and README
21
- - docs: Improve agent documentation based on usage experience
14
+ - refactor: Use computed property for camera status in devices agent
15
+ - docs: Document status field requirements in devices agent
22
16
 
23
17
  ### Links
24
18
  - [npm package](https://www.npmjs.com/package/een-api-toolkit)
25
- - [Full Changelog](https://github.com/klaushofrichter/een-api-toolkit/compare/v0.3.22...v0.3.28)
19
+ - [Full Changelog](https://github.com/klaushofrichter/een-api-toolkit/compare/v0.3.28...v0.3.30)
26
20
 
27
21
  ---
28
- *Released: 2026-01-23 08:45:39 CST*
22
+ *Released: 2026-01-23 17:42:54 CST*
@@ -1,6 +1,6 @@
1
1
  # EEN API Toolkit - AI Reference
2
2
 
3
- > **Version:** 0.3.28
3
+ > **Version:** 0.3.30
4
4
  >
5
5
  > This documentation is optimized for AI assistants. It provides focused, domain-specific
6
6
  > references to help you understand and use the een-api-toolkit efficiently.
@@ -1,6 +1,6 @@
1
1
  # Authentication - EEN API Toolkit
2
2
 
3
- > **Version:** 0.3.28
3
+ > **Version:** 0.3.30
4
4
  >
5
5
  > OAuth flow implementation, token management, and session handling.
6
6
  > Load this document when implementing login, logout, or auth guards.
@@ -1,6 +1,6 @@
1
1
  # Cameras & Bridges API - EEN API Toolkit
2
2
 
3
- > **Version:** 0.3.28
3
+ > **Version:** 0.3.30
4
4
  >
5
5
  > Complete reference for camera and bridge management.
6
6
  > Load this document when working with devices.
@@ -1,6 +1,6 @@
1
1
  # Events, Alerts & Real-Time Streaming - EEN API Toolkit
2
2
 
3
- > **Version:** 0.3.28
3
+ > **Version:** 0.3.30
4
4
  >
5
5
  > Complete reference for events, alerts, metrics, and SSE subscriptions.
6
6
  > Load this document when implementing event-driven features.
@@ -1,6 +1,6 @@
1
1
  # Media & Live Video - EEN API Toolkit
2
2
 
3
- > **Version:** 0.3.28
3
+ > **Version:** 0.3.30
4
4
  >
5
5
  > Complete reference for media retrieval, live streaming, and video playback.
6
6
  > Load this document when implementing video features.
@@ -1,6 +1,6 @@
1
1
  # Vue 3 Application Setup - EEN API Toolkit
2
2
 
3
- > **Version:** 0.3.28
3
+ > **Version:** 0.3.30
4
4
  >
5
5
  > Complete guide for setting up a Vue 3 application with the een-api-toolkit.
6
6
  > Load this document when creating a new project or troubleshooting setup issues.
@@ -1,6 +1,6 @@
1
1
  # Users API - EEN API Toolkit
2
2
 
3
- > **Version:** 0.3.28
3
+ > **Version:** 0.3.30
4
4
  >
5
5
  > Complete reference for user management.
6
6
  > Load this document when working with user data.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "een-api-toolkit",
3
- "version": "0.3.28",
3
+ "version": "0.3.30",
4
4
  "description": "EEN Video platform API v3.0 library for Vue 3",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",