een-api-toolkit 0.3.55 → 0.3.63

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.
Files changed (32) hide show
  1. package/.claude/agents/docs-accuracy-reviewer.md +17 -4
  2. package/.claude/agents/een-auth-agent.md +1 -1
  3. package/.claude/agents/een-devices-agent.md +51 -4
  4. package/.claude/agents/een-events-agent.md +8 -0
  5. package/.claude/agents/een-media-agent.md +7 -5
  6. package/.claude/agents/een-users-agent.md +5 -5
  7. package/.claude/agents/test-runner.md +8 -6
  8. package/CHANGELOG.md +108 -5
  9. package/dist/index.cjs +2 -2
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.ts +304 -0
  12. package/dist/index.js +167 -138
  13. package/dist/index.js.map +1 -1
  14. package/docs/AI-CONTEXT.md +1 -1
  15. package/docs/ai-reference/AI-AUTH.md +1 -1
  16. package/docs/ai-reference/AI-AUTOMATIONS.md +1 -1
  17. package/docs/ai-reference/AI-DEVICES.md +175 -78
  18. package/docs/ai-reference/AI-EVENT-DATA-SCHEMAS.md +1 -1
  19. package/docs/ai-reference/AI-EVENTS.md +1 -1
  20. package/docs/ai-reference/AI-GROUPING.md +1 -1
  21. package/docs/ai-reference/AI-JOBS.md +1 -1
  22. package/docs/ai-reference/AI-MEDIA.md +1 -1
  23. package/docs/ai-reference/AI-SETUP.md +1 -1
  24. package/docs/ai-reference/AI-USERS.md +1 -1
  25. package/examples/vue-cameras/cameras-screenshot.png +0 -0
  26. package/examples/vue-cameras/e2e/camera-details.spec.ts +547 -0
  27. package/examples/vue-cameras/e2e/camera-settings.spec.ts +424 -0
  28. package/examples/vue-cameras/src/views/CameraDetail.vue +17 -0
  29. package/examples/vue-cameras/src/views/Cameras.vue +261 -115
  30. package/examples/vue-cameras/src/views/Home.vue +7 -6
  31. package/examples/vue-media/e2e/auth.spec.ts +21 -12
  32. package/package.json +2 -1
@@ -2,7 +2,7 @@
2
2
  name: docs-accuracy-reviewer
3
3
  description: |
4
4
  Use this agent when you need to verify that project documentation accurately reflects the actual codebase, when checking for broken links in markdown files, when validating configuration examples in documentation, or when ensuring README and other docs are up-to-date with implemented features. This agent reads documentation and compares it against source code but does not modify code files.
5
- model: inherit
5
+ model: sonnet
6
6
  color: purple
7
7
  ---
8
8
 
@@ -70,6 +70,7 @@ assistant: "I'll use the docs-accuracy-reviewer agent to verify the een-* agent
70
70
  - List all markdown files in the project (README.md, docs/**, CLAUDE.md, etc.)
71
71
  - **Scan ALL example directories** (`examples/*/README.md`) - do not skip any
72
72
  - **Check ALL agent files** in `.claude/agents/een-*.md` - verify function signatures and code examples against actual implementations
73
+ - **Check ALL skill files** in `.claude/skills/*/SKILL.md` - verify referenced scripts, npm commands, and workflows match actual implementations
73
74
  - Identify the source code structure for cross-referencing (especially `src/index.ts` exports, `src/*/service.ts` implementations, and `src/types/*.ts` definitions)
74
75
 
75
76
  2. **Analysis Phase**:
@@ -122,6 +123,17 @@ assistant: "I'll use the docs-accuracy-reviewer agent to verify the een-* agent
122
123
  - Verify .env.example matches documentation
123
124
  - Check that all required secrets are documented
124
125
 
126
+ ### For Skills (`.claude/skills/*/SKILL.md`):
127
+ - **Script References**: Verify all referenced scripts exist in `scripts/` and are executable
128
+ - **npm Commands**: Verify all `npm run` commands exist in `package.json` scripts
129
+ - **Workflow Steps**: Verify described workflows match actual tool capabilities and script behavior
130
+ - **File Paths**: Verify all referenced file paths and directories exist
131
+ - Cross-reference the PR-and-check skill's test commands against actual `package.json` scripts
132
+
133
+ ### For Test Runner Agent (`.claude/agents/test-runner.md`):
134
+ - Verify documented test commands match `package.json` scripts (e.g., `npm run test:e2e:examples` for example app E2E tests)
135
+ - Verify the E2E test execution approach matches the actual `scripts/run-examples-e2e.sh` behavior
136
+
125
137
  ### For Claude Agent Files (`.claude/agents/een-*.md`):
126
138
  - **Function Signatures**: Verify all documented function signatures match actual implementations in `src/*/service.ts`
127
139
  - **Parameter Names**: Check that parameter names in examples match the actual API (e.g., `deviceId` not `cameraId`, `userId` as direct param not `{ id: userId }`)
@@ -176,9 +188,10 @@ Before completing your review:
176
188
  1. Verify you've checked ALL markdown files in the project
177
189
  2. **Confirm ALL example app READMEs were reviewed** (list them in your report)
178
190
  3. **Confirm ALL `.claude/agents/een-*.md` files were reviewed** for API accuracy
179
- 4. Confirm each fix you made is backed by evidence from source code
180
- 5. Re-read modified sections to ensure they're clear and accurate
181
- 6. Check that your fixes didn't introduce new broken links or inconsistencies
191
+ 4. **Confirm ALL `.claude/skills/*/SKILL.md` files were reviewed** for script and npm command accuracy
192
+ 5. Confirm each fix you made is backed by evidence from source code
193
+ 6. Re-read modified sections to ensure they're clear and accurate
194
+ 7. Check that your fixes didn't introduce new broken links or inconsistencies
182
195
 
183
196
  ## Common Agent File Issues to Watch For
184
197
 
@@ -119,7 +119,7 @@ const authStore = useAuthStore()
119
119
  authStore.token // Current access token
120
120
  authStore.baseUrl // EEN API base URL (region-specific)
121
121
  authStore.isAuthenticated // Computed: true if valid token exists
122
- authStore.isExpired // Computed: true if token expired
122
+ authStore.isTokenExpired // Computed: true if token expired
123
123
  ```
124
124
 
125
125
  ### authStore.initialize() - Session Restoration (CRITICAL)
@@ -46,9 +46,10 @@ assistant: "I'll use the een-devices-agent to help fetch bridges with getBridges
46
46
  1. List and filter cameras with getCameras()
47
47
  2. List and filter bridges with getBridges()
48
48
  3. Get device details with getCamera() / getBridge()
49
- 4. Implement status filtering (online, offline, streaming, etc.)
50
- 5. Implement tag-based filtering
51
- 6. Full-text search with q parameter
49
+ 4. Get camera operational settings with getCameraSettings()
50
+ 5. Implement status filtering (online, offline, streaming, etc.)
51
+ 6. Implement tag-based filtering
52
+ 7. Full-text search with q parameter
52
53
 
53
54
  ## Key Types
54
55
 
@@ -103,6 +104,32 @@ type BridgeStatus =
103
104
  | 'initializing'
104
105
  ```
105
106
 
107
+ ### CameraSettings
108
+ ```typescript
109
+ interface CameraSettings {
110
+ data: CameraSettingsData
111
+ schema?: object // When include contains 'schema'
112
+ proposedValues?: object // When include contains 'proposedValues'
113
+ }
114
+
115
+ interface CameraSettingsData {
116
+ timeZone?: string
117
+ rtsp?: CameraRtspConnectionSettings
118
+ credentials?: { username?: string; password?: string }
119
+ retention?: CameraSettingsRetention
120
+ audio?: CameraSettingsAudio
121
+ previewVideo?: CameraSettingsPreviewVideo
122
+ mainVideo?: CameraSettingsMainVideo
123
+ analog?: CameraSettingsAnalog
124
+ operatingSettings?: CameraSettingsOperating
125
+ talkdown?: CameraSettingsTalkdown
126
+ }
127
+
128
+ interface GetCameraSettingsParams {
129
+ include?: ('schema' | 'proposedValues')[]
130
+ }
131
+ ```
132
+
106
133
  ### ListCamerasParams
107
134
  ```typescript
108
135
  interface ListCamerasParams {
@@ -114,7 +141,7 @@ interface ListCamerasParams {
114
141
  status__ne?: CameraStatus // Exclude this status
115
142
  tags__contains?: string[] // Must have ALL these tags
116
143
  tags__any?: string[] // Must have ANY of these tags
117
- bridgeId__eq?: string // Cameras on specific bridge
144
+ bridgeId__in?: string[] // Cameras on specific bridge(s)
118
145
  q?: string // Full-text search
119
146
  }
120
147
  ```
@@ -191,6 +218,26 @@ async function fetchCamera(cameraId: string) {
191
218
  }
192
219
  ```
193
220
 
221
+ ### getCameraSettings(cameraId, params?)
222
+ Get operational settings for a camera:
223
+ ```typescript
224
+ import { getCameraSettings, type CameraSettings } from 'een-api-toolkit'
225
+
226
+ async function fetchSettings(cameraId: string) {
227
+ const result = await getCameraSettings(cameraId, {
228
+ include: ['schema', 'proposedValues']
229
+ })
230
+
231
+ if (result.error) {
232
+ console.error('Failed to get settings:', result.error.message)
233
+ return null
234
+ }
235
+
236
+ console.log('Retention:', result.data.data.retention?.cloudDays, 'days')
237
+ return result.data
238
+ }
239
+ ```
240
+
194
241
  ### getBridges()
195
242
  List bridges:
196
243
  ```typescript
@@ -316,6 +316,7 @@ import { listAlerts, type Alert, type ListAlertsParams } from 'een-api-toolkit'
316
316
  async function fetchAlerts() {
317
317
  const result = await listAlerts({
318
318
  status__in: ['active', 'acknowledged'],
319
+ include: ['data', 'actions', 'dataSchemas', 'description'],
319
320
  pageSize: 20
320
321
  })
321
322
 
@@ -325,6 +326,13 @@ async function fetchAlerts() {
325
326
  }
326
327
  ```
327
328
 
329
+ #### Alert Include Parameter
330
+ The `include` parameter controls what additional data is returned with each alert:
331
+ - `'data'` - Include alert data objects (varies by alert type)
332
+ - `'actions'` - Include actions executed for this alert
333
+ - `'dataSchemas'` - Include list of data schema types
334
+ - `'description'` - Include human-readable description
335
+
328
336
  ### Alert Priority
329
337
  Alert priority is an integer value ranging from **0 to 10**:
330
338
  - `0` = Lowest priority
@@ -164,8 +164,8 @@ import { getRecordedImage, formatTimestamp } from 'een-api-toolkit'
164
164
  async function fetchRecordedFrame(deviceId: string, date: Date) {
165
165
  const result = await getRecordedImage({
166
166
  deviceId,
167
- timestamp: formatTimestamp(date.toISOString()), // MUST use formatTimestamp()
168
- type: 'preview' // Optional, defaults to 'preview'
167
+ timestamp__gte: formatTimestamp(date.toISOString()), // MUST use formatTimestamp()
168
+ type: 'preview' // Optional
169
169
  })
170
170
 
171
171
  if (result.data) {
@@ -179,12 +179,14 @@ List recorded media intervals:
179
179
  ```typescript
180
180
  import { listMedia, formatTimestamp, type ListMediaParams } from 'een-api-toolkit'
181
181
 
182
- async function fetchRecordings(cameraId: string, startDate: Date, endDate: Date) {
182
+ async function fetchRecordings(deviceId: string, startDate: Date, endDate: Date) {
183
183
  const result = await listMedia({
184
- cameraId,
184
+ deviceId,
185
+ type: 'preview', // Stream type: 'preview' or 'main'
186
+ mediaType: 'video', // Content type: 'video' or 'image'
185
187
  startTimestamp: formatTimestamp(startDate),
186
188
  endTimestamp: formatTimestamp(endDate),
187
- type: 'video'
189
+ include: ['hlsUrl'] // Request HLS URLs for playback
188
190
  })
189
191
 
190
192
  if (result.data) {
@@ -54,8 +54,8 @@ assistant: "I'll use the een-users-agent to diagnose the user lookup issue and i
54
54
  ```typescript
55
55
  interface User {
56
56
  id: string
57
- firstName?: string
58
- lastName?: string
57
+ firstName: string
58
+ lastName: string
59
59
  email: string
60
60
  isActive?: boolean
61
61
  permissions?: string[]
@@ -71,9 +71,9 @@ interface UserProfile {
71
71
  firstName: string
72
72
  lastName: string
73
73
  email: string
74
- accountId: string
75
- permissions: string[]
76
- // ... profile-specific fields
74
+ accountId?: string
75
+ timeZone?: string
76
+ language?: string
77
77
  }
78
78
  ```
79
79
 
@@ -2,7 +2,7 @@
2
2
  name: test-runner
3
3
  description: |
4
4
  Use this agent when you need to run the complete test suite for the project, including unit tests (Vitest) and E2E tests (Playwright). This agent is ideal after writing a logical chunk of code, before creating a PR, or when you want to verify the overall health of the codebase. The agent executes tests and reports results but does not modify any code.
5
- model: inherit
5
+ model: sonnet
6
6
  color: green
7
7
  ---
8
8
 
@@ -69,14 +69,16 @@ Capture and analyze:
69
69
  - Test file locations for failures
70
70
 
71
71
  ### Step 3: Execute E2E Tests
72
- Run the Playwright E2E test suite:
72
+ Run the Playwright E2E tests for all example apps:
73
73
  ```bash
74
- npm run test:e2e
74
+ npm run test:e2e:examples
75
75
  ```
76
+ This script (`scripts/run-examples-e2e.sh`) discovers all example apps with `playwright.config.ts`, frees port 3333 between runs, and stops on first failure.
77
+
76
78
  Capture and analyze:
77
- - Browser contexts tested
78
- - Total E2E scenarios run
79
- - Passed/failed counts
79
+ - Which example apps passed/failed
80
+ - Total E2E scenarios run across all apps
81
+ - Passed/failed counts per app
80
82
  - Screenshots or traces for failures (if available)
81
83
  - Timeout or network-related issues
82
84
 
package/CHANGELOG.md CHANGED
@@ -2,20 +2,123 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [0.3.55] - 2026-02-03
5
+ ## [0.3.63] - 2026-02-07
6
6
 
7
7
  ### Release Summary
8
8
 
9
- No PR descriptions available for this release.
9
+ #### PR #90: feat: Add getCameraSettings API, E2E coverage, and PR skill update
10
+ ## Summary
11
+
12
+ - **feat:** Add `getCameraSettings()` API function for `GET /cameras/{cameraId}/settings` endpoint with full TypeScript types
13
+ - **feat:** Simplify camera list cards (name, ID, bridge only) with detail/settings modals fetching full data on demand
14
+ - **feat:** Add Google Maps link on camera detail page when coordinates exist
15
+ - **test:** Add 4 new E2E tests covering card content, details modal includes, settings modal schema/proposedValues, and Google Maps link
16
+ - **chore:** Update PR-and-check skill to run E2E tests sequentially with port 3333 cleanup between apps
17
+ - **docs:** Update vue-cameras home page and screenshot
18
+
19
+ ## Version
20
+
21
+ `0.3.59`
22
+
23
+ ## Commits
24
+
25
+ - `0aa36a3` test: Add E2E coverage tests and update PR skill for sequential E2E runs
26
+ - `c8299a9` docs: Update vue-cameras home page to reflect current features
27
+ - `b3507ed` chore: Resize vue-cameras screenshot to 1200px width
28
+ - `bb5f11d` feat: Add getCameraSettings API, simplify camera list, add Google Maps link
29
+
30
+ ## Test Results
31
+
32
+ | Check | Result |
33
+ |-------|--------|
34
+ | Lint | Passed |
35
+ | Unit Tests | 600 passed (22 files) |
36
+ | Build | Passed |
37
+ | vue-alerts-metrics E2E | 20 passed |
38
+ | vue-automations E2E | 24 passed |
39
+ | vue-bridges E2E | 15 passed |
40
+ | vue-cameras E2E | 41 passed |
41
+ | vue-event-subscriptions E2E | 15 passed |
42
+ | vue-events E2E | 16 passed |
43
+ | vue-feeds E2E | 12 passed |
44
+ | vue-jobs E2E | 34 passed |
45
+ | vue-layouts E2E | 14 passed |
46
+ | vue-media E2E | 15 passed, 1 pre-existing failure* |
47
+ | vue-users E2E | 14 passed |
48
+ | **Total E2E** | **220/225 passed** |
49
+
50
+ \* vue-media failure is pre-existing: `data-testid="utc-timestamp"` missing from Recorded.vue component
51
+
52
+ ## Security Review
53
+
54
+ No HIGH severity findings. Notable MEDIUM finding: example app renders full JSON including `adminCredentials` include parameter — acceptable for demo code. All other findings are LOW severity with existing mitigations (Vue auto-escaping, `encodeURIComponent`, `rel="noopener noreferrer"`).
55
+
56
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
57
+
58
+ #### PR #91: feat: E2E runner script, release summary fix, agent updates
59
+ ## Summary
60
+
61
+ - **feat:** Add `scripts/run-examples-e2e.sh` that dynamically discovers all example apps and runs Playwright E2E tests sequentially with port 3333 cleanup between runs
62
+ - **fix:** Fix npm-publish workflow race condition where Release Summary was always empty — replaced `git log --merges` (which failed when checked-out develop commit didn't have production merge commits as ancestors) with `gh pr list --base production --state merged` via GitHub API
63
+ - **fix:** Update PR-and-check skill to fetch all tags (`git fetch origin --tags`), check for in-progress release workflows before proceeding, use `npm run test:e2e:examples` script, and set 20-minute E2E timeout
64
+ - **chore:** Update docs-accuracy-reviewer to also verify skills and agent files against actual implementations
65
+ - **chore:** Set sonnet model for test-runner and docs-accuracy-reviewer agents
66
+ - **fix:** Correct inaccuracies in een-auth, een-devices, een-media, een-users agent files
67
+
68
+ ## Version
69
+
70
+ `0.3.62`
71
+
72
+ ## Commits
73
+
74
+ - `6df59c8` chore: Set 20-minute timeout for example E2E tests in PR skill
75
+ - `fce1f9e` feat: Add E2E runner script, fix release PR summaries, update agents
76
+
77
+ ## Test Results
78
+
79
+ | Check | Result |
80
+ |-------|--------|
81
+ | Lint | Passed |
82
+ | Unit Tests | 600 passed (22 files) |
83
+ | Build | Passed |
84
+ | vue-alerts-metrics E2E | 20 passed |
85
+ | vue-automations E2E | 24 passed |
86
+ | vue-bridges E2E | 18 passed |
87
+ | vue-cameras E2E | 41 passed |
88
+ | vue-event-subscriptions E2E | 15 passed |
89
+ | vue-events E2E | 16 passed |
90
+ | vue-feeds E2E | 12 passed |
91
+ | vue-jobs E2E | 34 passed |
92
+ | vue-layouts E2E | 14 passed |
93
+ | vue-media E2E | 20 passed |
94
+ | vue-users E2E | 14 passed (passed on retry, transient OAuth callback timeout) |
95
+ | **Total E2E** | **228 passed across 11 apps** |
96
+
97
+ ## Security Review
98
+
99
+ No security concerns. Changes are limited to:
100
+ - Shell script for test orchestration (no user input, runs locally)
101
+ - GitHub Actions workflow fix (uses `gh` CLI with existing `GH_TOKEN`)
102
+ - Documentation/agent file corrections (markdown only)
103
+ - No new dependencies, no API changes, no auth flow changes
104
+
105
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
106
+
10
107
 
11
108
  ### Detailed Changes
12
109
 
13
110
  #### Features
14
- - feat: Update event type to data schema mappings from API v3.0 spec
111
+ - feat: Add E2E runner script, fix release PR summaries, update agents
112
+
113
+ #### Bug Fixes
114
+ - fix: Address code review feedback for PR #91
115
+
116
+ #### Other Changes
117
+ - chore: Set 20-minute timeout for example E2E tests in PR skill
15
118
 
16
119
  ### Links
17
120
  - [npm package](https://www.npmjs.com/package/een-api-toolkit)
18
- - [Full Changelog](https://github.com/klaushofrichter/een-api-toolkit/compare/v0.3.54...v0.3.55)
121
+ - [Full Changelog](https://github.com/klaushofrichter/een-api-toolkit/compare/v0.3.60...v0.3.63)
19
122
 
20
123
  ---
21
- *Released: 2026-02-03 21:02:16 CST*
124
+ *Released: 2026-02-07 14:18:39 CST*