een-api-toolkit 0.3.60 → 0.3.67
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/.claude/agents/docs-accuracy-reviewer.md +17 -4
- package/.claude/agents/een-auth-agent.md +1 -1
- package/.claude/agents/een-devices-agent.md +1 -1
- package/.claude/agents/een-media-agent.md +7 -5
- package/.claude/agents/een-users-agent.md +5 -5
- package/.claude/agents/test-runner.md +8 -6
- package/CHANGELOG.md +119 -9
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +68 -0
- package/dist/index.js +127 -118
- package/dist/index.js.map +1 -1
- package/docs/AI-CONTEXT.md +1 -1
- package/docs/ai-reference/AI-AUTH.md +1 -1
- package/docs/ai-reference/AI-AUTOMATIONS.md +1 -1
- package/docs/ai-reference/AI-DEVICES.md +1 -1
- package/docs/ai-reference/AI-EVENT-DATA-SCHEMAS.md +76 -74
- package/docs/ai-reference/AI-EVENTS.md +2 -1
- package/docs/ai-reference/AI-GROUPING.md +1 -1
- package/docs/ai-reference/AI-JOBS.md +1 -1
- package/docs/ai-reference/AI-MEDIA.md +1 -1
- package/docs/ai-reference/AI-SETUP.md +1 -1
- package/docs/ai-reference/AI-USERS.md +1 -1
- package/examples/vue-alerts-metrics/README.md +10 -0
- package/examples/vue-automations/README.md +4 -0
- package/examples/vue-bridges/README.md +6 -0
- package/examples/vue-cameras/README.md +7 -0
- package/examples/vue-event-subscriptions/README.md +10 -0
- package/examples/vue-events/README.md +12 -0
- package/examples/vue-events/src/components/EventsModal.vue +1 -0
- package/examples/vue-feeds/README.md +5 -0
- package/examples/vue-feeds/src/App.vue +5 -4
- package/examples/vue-feeds/src/views/Home.vue +3 -1
- package/examples/vue-jobs/README.md +7 -0
- package/examples/vue-layouts/README.md +3 -1
- package/examples/vue-media/README.md +5 -0
- package/examples/vue-users/README.md +3 -0
- package/examples/vue-users/package-lock.json +2 -2
- package/examples/vue-users/package.json +1 -1
- package/package.json +2 -1
package/docs/AI-CONTEXT.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Event Type to Data Schemas Mapping - EEN API Toolkit
|
|
2
2
|
|
|
3
|
-
> **Version:** 0.3.
|
|
3
|
+
> **Version:** 0.3.67
|
|
4
4
|
>
|
|
5
5
|
> Complete reference for event type to data schema mappings.
|
|
6
6
|
> Load this document when building dynamic event queries with the `include` parameter.
|
|
@@ -112,124 +112,123 @@ const schemas = EVENT_TYPE_DATA_SCHEMAS['een.personDetectionEvent.v1']
|
|
|
112
112
|
|
|
113
113
|
## Event Type to Data Schemas Reference
|
|
114
114
|
|
|
115
|
+
|
|
115
116
|
### Detection Events
|
|
116
117
|
|
|
117
118
|
| Event Type | Data Schemas |
|
|
118
119
|
|------------|--------------|
|
|
119
|
-
| `een.motionDetectionEvent.v1` |
|
|
120
|
-
| `een.motionInRegionDetectionEvent.v1` |
|
|
121
|
-
| `een.personDetectionEvent.v1` |
|
|
122
|
-
| `een.personMotionDetectionEvent.v1` |
|
|
123
|
-
| `een.animalDetectionEvent.v1` |
|
|
124
|
-
| `een.faceDetectionEvent.v1` |
|
|
125
|
-
| `een.vehicleDetectionEvent.v1` |
|
|
126
|
-
| `een.vehicleMotionDetectionEvent.v1` |
|
|
127
|
-
| `een.gunDetectionEvent.v1` |
|
|
128
|
-
| `een.weaponDetectionEvent.v1` |
|
|
129
|
-
| `een.fallDetectionEvent.v1` |
|
|
130
|
-
| `een.fireDetectionEvent.v1` |
|
|
131
|
-
| `een.spillDetectionEvent.v1` |
|
|
132
|
-
| `een.crowdFormationDetectionEvent.v1` |
|
|
133
|
-
|
|
134
|
-
|
|
120
|
+
| `een.motionDetectionEvent.v1` | objectDetection, fullFrameImageUrl, croppedFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
121
|
+
| `een.motionInRegionDetectionEvent.v1` | motionRegion, objectDetection, fullFrameImageUrl, croppedFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
122
|
+
| `een.personDetectionEvent.v1` | objectDetection, personAttributes, fullFrameImageUrl, croppedFrameImageUrl, objectClassification, objectRegionMapping, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay, geoLocation |
|
|
123
|
+
| `een.personMotionDetectionEvent.v1` | objectDetection, fullFrameImageUrl, croppedFrameImageUrl, objectClassification |
|
|
124
|
+
| `een.animalDetectionEvent.v1` | objectDetection, animalAttributes, fullFrameImageUrl, croppedFrameImageUrl, objectClassification, objectRegionMapping, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
125
|
+
| `een.faceDetectionEvent.v1` | objectDetection, personAttributes, fullFrameImageUrl, croppedFrameImageUrl, objectClassification, objectRegionMapping, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
126
|
+
| `een.vehicleDetectionEvent.v1` | objectDetection, fullFrameImageUrl, croppedFrameImageUrl, objectClassification, vehicleAttributes, objectRegionMapping, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
127
|
+
| `een.vehicleMotionDetectionEvent.v1` | objectDetection, fullFrameImageUrl, croppedFrameImageUrl, objectClassification, vehicleAttributes |
|
|
128
|
+
| `een.gunDetectionEvent.v1` | fullFrameImageUrl, croppedFrameImageUrl, objectDetection, motionRegion, objectClassification, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay, weaponAttributes, personAttributes, humanValidationDetails |
|
|
129
|
+
| `een.weaponDetectionEvent.v1` | fullFrameImageUrl, croppedFrameImageUrl, objectDetection, motionRegion, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
130
|
+
| `een.fallDetectionEvent.v1` | objectDetection, fullFrameImageUrl, croppedFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
131
|
+
| `een.fireDetectionEvent.v1` | objectDetection, objectClassification, croppedFrameImageUrl, fullFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
132
|
+
| `een.spillDetectionEvent.v1` | objectDetection, objectClassification, croppedFrameImageUrl, fullFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
133
|
+
| `een.crowdFormationDetectionEvent.v1` | objectDetection, objectClassification, croppedFrameImageUrl, fullFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
134
|
+
| `een.tamperDetectionEvent.v1` | fullFrameImageUrl |
|
|
135
|
+
| `een.loiterDetectionEvent.v1` | loiterArea, objectDetection, fullFrameImageUrl, croppedFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
136
|
+
| `een.gunShotAudioDetectionEvent.v1` | audioDetection, geoLocation |
|
|
137
|
+
| `een.t3AlarmAudioDetectionEvent.v1` | audioDetection |
|
|
138
|
+
| `een.t4AlarmAudioDetectionEvent.v1` | audioDetection |
|
|
139
|
+
| `een.violenceDetectionEvent.v1` | *(none)* |
|
|
140
|
+
| `een.fightDetectionEvent.v1` | *(none)* |
|
|
141
|
+
| `een.handsUpDetectionEvent.v1` | *(none)* |
|
|
142
|
+
| `een.vapeDetectionEvent.v1` | *(none)* |
|
|
143
|
+
|
|
144
|
+
### Other Events
|
|
135
145
|
|
|
136
146
|
| Event Type | Data Schemas |
|
|
137
147
|
|------------|--------------|
|
|
138
|
-
| `een.
|
|
139
|
-
| `een.
|
|
140
|
-
| `een.
|
|
141
|
-
| `een.
|
|
142
|
-
| `een.
|
|
143
|
-
| `een.
|
|
144
|
-
| `een.
|
|
145
|
-
| `een.personTailgateEvent.v1` | `objectDetection`, `fullFrameImageUrl`, `croppedFrameImageUrl`, `displayOverlay.boundingBox`, `fullFrameImageUrlWithOverlay` |
|
|
146
|
-
| `een.ppeViolationEvent.v1` | `objectDetection`, `personAttributes`, `fullFrameImageUrl`, `croppedFrameImageUrl`, `objectClassification`, `objectRegionMapping`, `displayOverlay.boundingBox`, `fullFrameImageUrlWithOverlay` |
|
|
148
|
+
| `een.objectLineCrossEvent.v1` | lineCrossLine, objectDetection, fullFrameImageUrl, croppedFrameImageUrl, entryDirection, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
149
|
+
| `een.objectLineCrossCountEvent.v1` | lineCrossLine, objectDetection, fullFrameImageUrl, croppedFrameImageUrl, entryDirection, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
150
|
+
| `een.countedObjectLineCrossEvent.v1` | countedLineCross |
|
|
151
|
+
| `een.objectIntrusionEvent.v1` | intrusionArea, objectDetection, fullFrameImageUrl, croppedFrameImageUrl, entryDirection, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
152
|
+
| `een.objectRemovalEvent.v1` | monitoredArea, objectDetection, fullFrameImageUrl, croppedFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
153
|
+
| `een.personTailgateEvent.v1` | objectDetection, fullFrameImageUrl, croppedFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
154
|
+
| `een.edgeReportedDeviceStatusEvent.v1` | deviceCommonStatusUpdate, deviceErrorStatusUpdate |
|
|
147
155
|
|
|
148
|
-
###
|
|
156
|
+
### Camera Analytics Events
|
|
149
157
|
|
|
150
158
|
| Event Type | Data Schemas |
|
|
151
159
|
|------------|--------------|
|
|
152
|
-
| `een.
|
|
153
|
-
| `een.eevaQueryEvent.v1` | `customLabels`, `eevaAttributes`, `objectDetection`, `fullFrameImageUrl`, `fullFrameImageUrlWithOverlay`, `displayOverlay.boundingBox` |
|
|
160
|
+
| `een.ppeViolationEvent.v1` | objectDetection, personAttributes, fullFrameImageUrl, croppedFrameImageUrl, objectClassification, objectRegionMapping, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay |
|
|
154
161
|
|
|
155
|
-
###
|
|
162
|
+
### AI/Scene Events
|
|
156
163
|
|
|
157
164
|
| Event Type | Data Schemas |
|
|
158
165
|
|------------|--------------|
|
|
159
|
-
| `een.
|
|
160
|
-
| `een.
|
|
166
|
+
| `een.sceneLabelEvent.v1` | objectDetection, objectClassification, vehicleAttributes, personAttributes, animalAttributes, croppedFrameImageUrl, fullFrameImageUrl, objectRegionMapping, displayOverlay.boundingBox, customLabels, eevaAttributes, fullFrameImageUrlWithOverlay |
|
|
167
|
+
| `een.eevaQueryEvent.v1` | customLabels, eevaAttributes, objectDetection, fullFrameImageUrl, fullFrameImageUrlWithOverlay, displayOverlay.boundingBox |
|
|
161
168
|
|
|
162
|
-
###
|
|
169
|
+
### License Plate & Fleet Recognition Events
|
|
163
170
|
|
|
164
171
|
| Event Type | Data Schemas |
|
|
165
172
|
|------------|--------------|
|
|
166
|
-
| `een.
|
|
167
|
-
| `een.
|
|
168
|
-
| `een.t4AlarmAudioDetectionEvent.v1` | `audioDetection` |
|
|
173
|
+
| `een.lprPlateReadEvent.v1` | objectDetection, lprDetection, vehicleAttributes, lprAccessType, userData, userTags, croppedFrameImageUrl, fullFrameImageUrl, displayOverlay.boundingBox, fullFrameImageUrlWithOverlay, vehicleListInfo, resourceDetails, vspInsightsSummary |
|
|
174
|
+
| `een.fleetCodeRecognitionEvent.v1` | objectDetection, dotNumberRecognition, truckNumberRecognition, trailerNumberRecognition, croppedFrameImageUrl, fullFrameImageUrl, recognizedText, resourceDetails |
|
|
169
175
|
|
|
170
176
|
### POS (Point of Sale) Events
|
|
171
177
|
|
|
172
178
|
| Event Type | Data Schemas |
|
|
173
179
|
|------------|--------------|
|
|
174
|
-
| `een.posTransactionEvent.v1` |
|
|
180
|
+
| `een.posTransactionEvent.v1` | posTransactionStart, posTransactionEnd, posTransactionItem, posTransactionPayment, posTransactionCartChangeTrail, posTransactionCardLoadSummary, posTransactionFlag, posTransactionLabel, rawData, displayLocationSummary, fullFrameImageUrl |
|
|
175
181
|
|
|
176
182
|
### Device & System Events
|
|
177
183
|
|
|
178
184
|
| Event Type | Data Schemas |
|
|
179
185
|
|------------|--------------|
|
|
180
|
-
| `een.deviceCloudStatusUpdateEvent.v1` |
|
|
181
|
-
| `een.deviceCloudConnectionStatusUpdateEvent.v1` |
|
|
182
|
-
| `een.
|
|
183
|
-
| `een.
|
|
184
|
-
| `een.
|
|
185
|
-
| `een.
|
|
186
|
+
| `een.deviceCloudStatusUpdateEvent.v1` | deviceCloudStatusUpdate, deviceCloudPreviousStatus |
|
|
187
|
+
| `een.deviceCloudConnectionStatusUpdateEvent.v1` | deviceCloudConnectionStatusUpdate, deviceCloudConnectionPreviousStatus |
|
|
188
|
+
| `een.deviceIOEvent.v1` | deviceIO |
|
|
189
|
+
| `een.deviceOperationEvent.v1` | resourceDetails, deviceOperationDetails, deviceOperationSubStep, deviceOperationUpdate |
|
|
190
|
+
| `een.ptzPositionUpdateEvent.v1` | ptzPositionUpdate |
|
|
191
|
+
| `een.deviceCreationEvent.v1` | resourceDetails |
|
|
192
|
+
| `een.deviceUpdateEvent.v1` | resourceDetails |
|
|
193
|
+
| `een.deviceDeletionEvent.v1` | resourceDetails |
|
|
186
194
|
|
|
187
195
|
### Sensor Events
|
|
188
196
|
|
|
189
197
|
| Event Type | Data Schemas |
|
|
190
198
|
|------------|--------------|
|
|
191
|
-
| `een.doorStatusEvent.v1` |
|
|
192
|
-
| `een.batteryLevelUpdateEvent.v1` |
|
|
193
|
-
| `een.measurementThresholdStatusEvent.v1` |
|
|
194
|
-
| `een.thermalCameraThresholdStatusEvent.v1` |
|
|
199
|
+
| `een.doorStatusEvent.v1` | measurementStringValueUpdate |
|
|
200
|
+
| `een.batteryLevelUpdateEvent.v1` | batteryLevelUpdate |
|
|
201
|
+
| `een.measurementThresholdStatusEvent.v1` | measurementThresholdStatus, measurementValueUpdate, measurementStringValueUpdate |
|
|
202
|
+
| `een.thermalCameraThresholdStatusEvent.v1` | thermalCameraValueUpdate, thermalMonitoredArea |
|
|
195
203
|
|
|
196
204
|
### Resource Management Events
|
|
197
205
|
|
|
198
|
-
All resource management events use `resourceDetails.v1`:
|
|
199
|
-
|
|
200
|
-
- `een.layoutCreationEvent.v1`, `een.layoutUpdateEvent.v1`, `een.layoutDeletionEvent.v1`
|
|
201
|
-
- `een.deviceCreationEvent.v1`, `een.deviceUpdateEvent.v1`, `een.deviceDeletionEvent.v1`
|
|
202
|
-
- `een.userCreationEvent.v1`, `een.userUpdateEvent.v1`, `een.userDeletionEvent.v1`
|
|
203
|
-
- `een.accountCreationEvent.v1`, `een.accountUpdateEvent.v1`, `een.accountDeletionEvent.v1`
|
|
204
|
-
|
|
205
|
-
### Job Events
|
|
206
|
-
|
|
207
206
|
| Event Type | Data Schemas |
|
|
208
207
|
|------------|--------------|
|
|
209
|
-
| `een.
|
|
210
|
-
| `een.
|
|
211
|
-
| `een.
|
|
208
|
+
| `een.layoutCreationEvent.v1` | resourceDetails |
|
|
209
|
+
| `een.layoutUpdateEvent.v1` | resourceDetails |
|
|
210
|
+
| `een.layoutDeletionEvent.v1` | resourceDetails |
|
|
211
|
+
| `een.userCreationEvent.v1` | resourceDetails |
|
|
212
|
+
| `een.userUpdateEvent.v1` | resourceDetails |
|
|
213
|
+
| `een.userDeletionEvent.v1` | resourceDetails |
|
|
214
|
+
| `een.accountCreationEvent.v1` | resourceDetails |
|
|
215
|
+
| `een.accountUpdateEvent.v1` | resourceDetails |
|
|
216
|
+
| `een.accountDeletionEvent.v1` | resourceDetails |
|
|
217
|
+
| `een.jobCreationEvent.v1` | jobDetails, ownerDetails |
|
|
218
|
+
| `een.jobUpdateEvent.v1` | jobDetails, ownerDetails |
|
|
219
|
+
| `een.jobDeletionEvent.v1` | ownerDetails |
|
|
212
220
|
|
|
213
221
|
### Safety & Protocol Events
|
|
214
222
|
|
|
215
223
|
| Event Type | Data Schemas |
|
|
216
224
|
|------------|--------------|
|
|
217
|
-
| `een.panicButtonEvent.v1` |
|
|
225
|
+
| `een.panicButtonEvent.v1` | geoLocation |
|
|
218
226
|
| `een.evacuateProtocolEvent.v1` | *(none)* |
|
|
219
227
|
| `een.holdProtocolEvent.v1` | *(none)* |
|
|
220
228
|
| `een.lockdownProtocolEvent.v1` | *(none)* |
|
|
221
229
|
| `een.secureProtocolEvent.v1` | *(none)* |
|
|
222
230
|
| `een.shelterProtocolEvent.v1` | *(none)* |
|
|
223
231
|
|
|
224
|
-
### Behavioral Events
|
|
225
|
-
|
|
226
|
-
These events have no associated data schemas:
|
|
227
|
-
|
|
228
|
-
- `een.violenceDetectionEvent.v1`
|
|
229
|
-
- `een.fightDetectionEvent.v1`
|
|
230
|
-
- `een.handsUpDetectionEvent.v1`
|
|
231
|
-
- `een.vapeDetectionEvent.v1`
|
|
232
|
-
|
|
233
232
|
---
|
|
234
233
|
|
|
235
234
|
## Common Data Schemas
|
|
@@ -321,8 +320,11 @@ This mapping is derived from the Eagle Eye Networks API v3.0 specification (`eve
|
|
|
321
320
|
|
|
322
321
|
## Maintenance
|
|
323
322
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
323
|
+
This file is auto-generated from `src/events/dataSchemas.ts` by `scripts/generate-event-data-schemas-doc.ts`.
|
|
324
|
+
|
|
325
|
+
To update:
|
|
326
|
+
1. Modify `src/events/dataSchemas.ts` with new event types or data schemas
|
|
327
|
+
2. Run `npm run docs:ai-context` to regenerate this file
|
|
328
|
+
3. The script automatically extracts types, mappings, and generates tables
|
|
329
|
+
|
|
330
|
+
Do not edit this file manually - changes will be overwritten on next generation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Events, Alerts & Real-Time Streaming - EEN API Toolkit
|
|
2
2
|
|
|
3
|
-
> **Version:** 0.3.
|
|
3
|
+
> **Version:** 0.3.67
|
|
4
4
|
>
|
|
5
5
|
> Complete reference for events, alerts, metrics, and SSE subscriptions.
|
|
6
6
|
> Load this document when implementing event-driven features.
|
|
@@ -1002,6 +1002,7 @@ watch([timeRange, selectedEventTypes], () => {
|
|
|
1002
1002
|
class="json-button"
|
|
1003
1003
|
@click="openJsonViewer(event.id)"
|
|
1004
1004
|
title="View JSON data"
|
|
1005
|
+
aria-label="View event JSON data"
|
|
1005
1006
|
data-testid="json-button"
|
|
1006
1007
|
>{ }</button>
|
|
1007
1008
|
</div>
|
|
@@ -123,13 +123,23 @@ This example demonstrates the following `een-api-toolkit` functions:
|
|
|
123
123
|
- `initEenToolkit()` - Initialize the toolkit
|
|
124
124
|
- `getAuthUrl()` - Get OAuth authorization URL
|
|
125
125
|
- `handleAuthCallback()` - Handle OAuth callback
|
|
126
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
126
127
|
- `useAuthStore()` - Access authentication state
|
|
128
|
+
- `getCurrentUser()` - Get current user profile
|
|
127
129
|
- `getCameras()` - List available cameras
|
|
128
130
|
- `listEventFieldValues()` - Get available event types for a camera
|
|
129
131
|
- `getEventMetrics()` - Fetch event metrics time-series data
|
|
130
132
|
- `listAlertTypes()` - Get available alert types
|
|
131
133
|
- `listAlerts()` - Fetch alerts for a camera
|
|
134
|
+
- `getAlert()` - Get a single alert by ID
|
|
132
135
|
- `listNotifications()` - Fetch notifications for a camera
|
|
136
|
+
- `getNotification()` - Get a single notification by ID
|
|
137
|
+
- `getRecordedImage()` - Fetch recorded image at a timestamp
|
|
138
|
+
- `initMediaSession()` - Initialize media session for image access
|
|
139
|
+
- `listMedia()` - Get media intervals
|
|
140
|
+
- `formatTimestamp()` - Format timestamps for display
|
|
141
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
142
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
133
143
|
|
|
134
144
|
## Known Limitations
|
|
135
145
|
|
|
@@ -29,10 +29,14 @@ This is the recommended strategy for high-security deployments where protecting
|
|
|
29
29
|
- `listAlertConditionRules()` - List alert condition rules with optional includes
|
|
30
30
|
- `listAlertActionRules()` - List alert action rules
|
|
31
31
|
- `listAlertActions()` - List alert actions
|
|
32
|
+
- `getCurrentUser()` - Get current user profile
|
|
32
33
|
- `useAuthStore()` - Authentication state management
|
|
33
34
|
- `getAuthUrl()` - Generate OAuth login URL
|
|
34
35
|
- `handleAuthCallback()` - Process OAuth callback
|
|
36
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
35
37
|
- `initEenToolkit()` - Toolkit initialization
|
|
38
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
39
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
36
40
|
|
|
37
41
|
## Setup
|
|
38
42
|
|
|
@@ -18,8 +18,14 @@ A Vue 3 example demonstrating how to list and view EEN bridge devices using the
|
|
|
18
18
|
|
|
19
19
|
- `getBridges()` - List bridges with filtering and pagination
|
|
20
20
|
- `getBridge()` - Get single bridge by ID
|
|
21
|
+
- `getCurrentUser()` - Get current user profile
|
|
21
22
|
- `useAuthStore()` - Authentication state management
|
|
23
|
+
- `getAuthUrl()` - Generate OAuth login URL
|
|
24
|
+
- `handleAuthCallback()` - Process OAuth callback
|
|
25
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
22
26
|
- `initEenToolkit()` - Toolkit initialization
|
|
27
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
28
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
23
29
|
|
|
24
30
|
## Setup
|
|
25
31
|
|
|
@@ -18,8 +18,15 @@ A Vue 3 example demonstrating how to list and view EEN cameras using the een-api
|
|
|
18
18
|
|
|
19
19
|
- `getCameras()` - List cameras with filtering and pagination
|
|
20
20
|
- `getCamera()` - Get single camera by ID
|
|
21
|
+
- `getCameraSettings()` - Get camera settings
|
|
22
|
+
- `getCurrentUser()` - Get current user profile
|
|
21
23
|
- `useAuthStore()` - Authentication state management
|
|
24
|
+
- `getAuthUrl()` - Generate OAuth login URL
|
|
25
|
+
- `handleAuthCallback()` - Process OAuth callback
|
|
26
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
22
27
|
- `initEenToolkit()` - Toolkit initialization
|
|
28
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
29
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
23
30
|
|
|
24
31
|
## Setup
|
|
25
32
|
|
|
@@ -76,6 +76,16 @@ This example demonstrates how to use the Event Subscriptions API from the EEN AP
|
|
|
76
76
|
- `connectToEventSubscription(sseUrl, options)` - Connect to SSE stream
|
|
77
77
|
- `getCameras()` - List cameras for filter selection
|
|
78
78
|
- `listEventTypes()` - List event types for filter selection
|
|
79
|
+
- `getCurrentUser()` - Get current user profile
|
|
80
|
+
- `initMediaSession()` - Initialize media session for image access
|
|
81
|
+
- `listMedia()` - Get media intervals
|
|
82
|
+
- `formatTimestamp()` - Format timestamps for display
|
|
83
|
+
- `useAuthStore()` - Authentication state management
|
|
84
|
+
- `getAuthUrl()` - Generate OAuth login URL
|
|
85
|
+
- `handleAuthCallback()` - Process OAuth callback
|
|
86
|
+
- `initEenToolkit()` - Toolkit initialization
|
|
87
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
88
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
79
89
|
|
|
80
90
|
## Event Subscription Lifecycle
|
|
81
91
|
|
|
@@ -23,12 +23,24 @@ A Vue 3 example demonstrating how to query and display events from EEN cameras u
|
|
|
23
23
|
## APIs Used
|
|
24
24
|
|
|
25
25
|
- `listEvents()` - List events with actor, type, and timestamp filters
|
|
26
|
+
- `getEvent()` - Get a single event by ID
|
|
26
27
|
- `listEventFieldValues()` - Get available event types for a specific camera
|
|
27
28
|
- `listEventTypes()` - Get human-readable names for event types
|
|
29
|
+
- `getIncludeParameterForEventTypes()` - Get include parameters for event types
|
|
30
|
+
- `getDataSchemasForEventType()` - Get data schemas for a specific event type
|
|
28
31
|
- `getRecordedImage()` - Fetch preview image at event timestamp
|
|
29
32
|
- `getCameras()` - List cameras for the camera grid
|
|
33
|
+
- `getCurrentUser()` - Get current user profile
|
|
34
|
+
- `initMediaSession()` - Initialize media session for image access
|
|
35
|
+
- `listMedia()` - Get media intervals
|
|
36
|
+
- `formatTimestamp()` - Format timestamps for display
|
|
30
37
|
- `useAuthStore()` - Authentication state management
|
|
38
|
+
- `getAuthUrl()` - Generate OAuth login URL
|
|
39
|
+
- `handleAuthCallback()` - Process OAuth callback
|
|
40
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
31
41
|
- `initEenToolkit()` - Toolkit initialization
|
|
42
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
43
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
32
44
|
|
|
33
45
|
## Setup
|
|
34
46
|
|
|
@@ -22,7 +22,12 @@ A Vue 3 example demonstrating how to list camera feeds and display live video us
|
|
|
22
22
|
- `listFeeds()` - List feeds with streaming URLs (HLS, Multipart, FLV, RTSP)
|
|
23
23
|
- `initMediaSession()` - Initialize session cookie for media access
|
|
24
24
|
- `useAuthStore()` - Authentication state management
|
|
25
|
+
- `getAuthUrl()` - Generate OAuth login URL
|
|
26
|
+
- `handleAuthCallback()` - Process OAuth callback
|
|
27
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
25
28
|
- `initEenToolkit()` - Toolkit initialization
|
|
29
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
30
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
26
31
|
|
|
27
32
|
## Video Streaming Modes
|
|
28
33
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { onMounted } from 'vue'
|
|
2
|
+
import { onMounted, computed } from 'vue'
|
|
3
3
|
import { useAuthStore } from 'een-api-toolkit'
|
|
4
4
|
|
|
5
5
|
const authStore = useAuthStore()
|
|
6
|
+
const isAuthenticated = computed(() => authStore.isAuthenticated)
|
|
6
7
|
|
|
7
8
|
// Initialize auth store from localStorage on app mount
|
|
8
9
|
onMounted(() => {
|
|
@@ -16,9 +17,9 @@ onMounted(() => {
|
|
|
16
17
|
<h1>EEN Feeds Example</h1>
|
|
17
18
|
<nav>
|
|
18
19
|
<router-link to="/" data-testid="nav-home">Home</router-link>
|
|
19
|
-
<router-link v-if="!
|
|
20
|
-
<router-link v-if="
|
|
21
|
-
<router-link v-if="
|
|
20
|
+
<router-link v-if="!isAuthenticated" to="/login" data-testid="nav-login">Login</router-link>
|
|
21
|
+
<router-link v-if="isAuthenticated" to="/feeds" data-testid="nav-feeds">Feeds</router-link>
|
|
22
|
+
<router-link v-if="isAuthenticated" to="/logout" data-testid="nav-logout">Logout</router-link>
|
|
22
23
|
</nav>
|
|
23
24
|
</header>
|
|
24
25
|
<main>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
2
3
|
import { useAuthStore, getStorageStrategy, STORAGE_STRATEGY_DESCRIPTIONS } from 'een-api-toolkit'
|
|
3
4
|
|
|
4
5
|
const authStore = useAuthStore()
|
|
6
|
+
const isAuthenticated = computed(() => authStore.isAuthenticated)
|
|
5
7
|
|
|
6
8
|
const storageStrategy = getStorageStrategy()
|
|
7
9
|
const storageDescription = STORAGE_STRATEGY_DESCRIPTIONS[storageStrategy]
|
|
@@ -11,7 +13,7 @@ const storageDescription = STORAGE_STRATEGY_DESCRIPTIONS[storageStrategy]
|
|
|
11
13
|
<div class="home">
|
|
12
14
|
<h2>Welcome to the EEN Feeds Example</h2>
|
|
13
15
|
|
|
14
|
-
<div v-if="!
|
|
16
|
+
<div v-if="!isAuthenticated" class="login-prompt" data-testid="not-authenticated">
|
|
15
17
|
<p>Please log in to view camera feeds.</p>
|
|
16
18
|
<router-link to="/login">
|
|
17
19
|
<button data-testid="login-button">Login with Eagle Eye Networks</button>
|
|
@@ -27,14 +27,21 @@ This is the recommended strategy for high-security deployments where protecting
|
|
|
27
27
|
|
|
28
28
|
- `listJobs()` - List jobs with filtering and pagination
|
|
29
29
|
- `getJob()` - Get single job details
|
|
30
|
+
- `deleteJob()` - Delete a job
|
|
30
31
|
- `createExportJob()` - Create video export job
|
|
31
32
|
- `listFiles()` - List files with pagination
|
|
32
33
|
- `downloadFile()` - Download file content
|
|
34
|
+
- `deleteFile()` - Delete a file
|
|
33
35
|
- `getCameras()` - Get cameras for export selection
|
|
36
|
+
- `getCurrentUser()` - Get current user profile
|
|
37
|
+
- `formatTimestamp()` - Format timestamps for display
|
|
34
38
|
- `useAuthStore()` - Authentication state management
|
|
35
39
|
- `getAuthUrl()` - Generate OAuth login URL
|
|
36
40
|
- `handleAuthCallback()` - Process OAuth callback
|
|
41
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
37
42
|
- `initEenToolkit()` - Toolkit initialization
|
|
43
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
44
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
38
45
|
|
|
39
46
|
## Setup
|
|
40
47
|
|
|
@@ -30,7 +30,6 @@ This is the recommended strategy for high-security deployments where protecting
|
|
|
30
30
|
## APIs Used
|
|
31
31
|
|
|
32
32
|
- `getLayouts()` - List layouts with pagination and filtering
|
|
33
|
-
- `getLayout()` - Get a specific layout by ID
|
|
34
33
|
- `createLayout()` - Create a new layout
|
|
35
34
|
- `updateLayout()` - Update an existing layout
|
|
36
35
|
- `deleteLayout()` - Delete a layout
|
|
@@ -39,7 +38,10 @@ This is the recommended strategy for high-security deployments where protecting
|
|
|
39
38
|
- `useAuthStore()` - Authentication state management
|
|
40
39
|
- `getAuthUrl()` - Generate OAuth login URL
|
|
41
40
|
- `handleAuthCallback()` - Process OAuth callback
|
|
41
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
42
42
|
- `initEenToolkit()` - Toolkit initialization
|
|
43
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
44
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
43
45
|
|
|
44
46
|
## Setup
|
|
45
47
|
|
|
@@ -88,7 +88,12 @@ Streams recorded video using HLS (HTTP Live Streaming) protocol with adaptive bi
|
|
|
88
88
|
| `initMediaSession()` | HLS Video | Initialize media session for video URLs |
|
|
89
89
|
| `listMedia()` | HLS Video | Get media intervals with streaming URLs |
|
|
90
90
|
| `useAuthStore()` | All pages | Authentication state management |
|
|
91
|
+
| `getAuthUrl()` | Login | Generate OAuth login URL |
|
|
92
|
+
| `handleAuthCallback()` | Callback | Process OAuth callback |
|
|
93
|
+
| `revokeToken()` | Logout | Revoke authentication token on logout |
|
|
91
94
|
| `initEenToolkit()` | App initialization | Configure toolkit settings |
|
|
95
|
+
| `getStorageStrategy()` | Home | Get the current storage strategy |
|
|
96
|
+
| `STORAGE_STRATEGY_DESCRIPTIONS` | Home | Human-readable storage strategy descriptions |
|
|
92
97
|
|
|
93
98
|
**Note on `useAuthStore()`:** All toolkit functions (`getCameras`, `getLiveImage`, `getRecordedImage`, `listMedia`) use `useAuthStore()` internally to get the authentication token. The HLS Video page is the only one that explicitly calls `useAuthStore()` in its code because HLS.js is a third-party library that makes its own HTTP requests - the token must be manually passed to HLS.js via the `xhrSetup` callback.
|
|
94
99
|
|
|
@@ -30,7 +30,10 @@ This is the recommended strategy for high-security deployments where protecting
|
|
|
30
30
|
- `useAuthStore()` - Authentication state management
|
|
31
31
|
- `getAuthUrl()` - Generate OAuth login URL
|
|
32
32
|
- `handleAuthCallback()` - Process OAuth callback
|
|
33
|
+
- `revokeToken()` - Revoke authentication token on logout
|
|
33
34
|
- `initEenToolkit()` - Toolkit initialization
|
|
35
|
+
- `getStorageStrategy()` - Get the current storage strategy
|
|
36
|
+
- `STORAGE_STRATEGY_DESCRIPTIONS` - Human-readable storage strategy descriptions
|
|
34
37
|
|
|
35
38
|
## Setup
|
|
36
39
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "een-api-toolkit-example",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "een-api-toolkit-example",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.27",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"een-api-toolkit": "file:../..",
|
|
12
12
|
"pinia": "^3.0.4",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "een-api-toolkit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.67",
|
|
4
4
|
"description": "EEN Video platform API v3.0 library for Vue 3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"test:watch": "vitest",
|
|
31
31
|
"test:e2e": "playwright test",
|
|
32
32
|
"test:e2e:ui": "playwright test --ui",
|
|
33
|
+
"test:e2e:examples": "./scripts/run-examples-e2e.sh",
|
|
33
34
|
"lint": "eslint src",
|
|
34
35
|
"lint:fix": "eslint src --fix",
|
|
35
36
|
"typecheck": "vue-tsc --noEmit",
|