een-api-toolkit 0.3.47 → 0.3.51
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/een-events-agent.md +34 -1
- package/.claude/agents/een-jobs-agent.md +676 -0
- package/CHANGELOG.md +7 -8
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1172 -28
- package/dist/index.js +796 -333
- package/dist/index.js.map +1 -1
- package/docs/AI-CONTEXT.md +22 -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-EVENTS.md +114 -4
- package/docs/ai-reference/AI-GROUPING.md +1 -1
- package/docs/ai-reference/AI-JOBS.md +1084 -0
- 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-events/src/components/EventsModal.vue +328 -3
- package/examples/vue-jobs/.env.example +11 -0
- package/examples/vue-jobs/README.md +245 -0
- package/examples/vue-jobs/e2e/app.spec.ts +79 -0
- package/examples/vue-jobs/e2e/auth.spec.ts +382 -0
- package/examples/vue-jobs/e2e/delete-features.spec.ts +564 -0
- package/examples/vue-jobs/e2e/timelapse.spec.ts +361 -0
- package/examples/vue-jobs/index.html +13 -0
- package/examples/vue-jobs/package-lock.json +1722 -0
- package/examples/vue-jobs/package.json +28 -0
- package/examples/vue-jobs/playwright.config.ts +47 -0
- package/examples/vue-jobs/src/App.vue +154 -0
- package/examples/vue-jobs/src/main.ts +25 -0
- package/examples/vue-jobs/src/router/index.ts +82 -0
- package/examples/vue-jobs/src/views/Callback.vue +76 -0
- package/examples/vue-jobs/src/views/CreateExport.vue +284 -0
- package/examples/vue-jobs/src/views/Files.vue +424 -0
- package/examples/vue-jobs/src/views/Home.vue +195 -0
- package/examples/vue-jobs/src/views/JobDetail.vue +392 -0
- package/examples/vue-jobs/src/views/Jobs.vue +297 -0
- package/examples/vue-jobs/src/views/Login.vue +33 -0
- package/examples/vue-jobs/src/views/Logout.vue +59 -0
- package/examples/vue-jobs/src/vite-env.d.ts +1 -0
- package/examples/vue-jobs/tsconfig.json +25 -0
- package/examples/vue-jobs/vite.config.ts +12 -0
- package/package.json +1 -1
|
@@ -86,10 +86,43 @@ interface ListEventsParams {
|
|
|
86
86
|
endTimestamp__lte?: string // Optional: filter by event end time
|
|
87
87
|
pageSize?: number
|
|
88
88
|
pageToken?: string
|
|
89
|
-
include?: string[] //
|
|
89
|
+
include?: string[] // Data schemas to include (see below)
|
|
90
90
|
}
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
### Include Parameter & Data Schemas
|
|
94
|
+
|
|
95
|
+
The `include` parameter controls which data schemas are populated in the `event.data[]` array.
|
|
96
|
+
Include values are derived from the event's `dataSchemas` array by adding the `data.` prefix.
|
|
97
|
+
|
|
98
|
+
**How it works:**
|
|
99
|
+
1. Each event has a `dataSchemas` array listing available schemas (e.g., `['een.objectDetection.v1', 'een.fullFrameImageUrl.v1']`)
|
|
100
|
+
2. To include that data, prefix with `data.` (e.g., `include: ['data.een.objectDetection.v1']`)
|
|
101
|
+
3. Without includes, the event may return with minimal or empty `data[]`
|
|
102
|
+
|
|
103
|
+
**Common data schemas:**
|
|
104
|
+
| Schema | Include Value | Description |
|
|
105
|
+
|--------|---------------|-------------|
|
|
106
|
+
| `een.objectDetection.v1` | `data.een.objectDetection.v1` | Bounding boxes `[x1, y1, x2, y2]` (normalized 0-1) |
|
|
107
|
+
| `een.objectClassification.v1` | `data.een.objectClassification.v1` | Object labels (person, vehicle, etc.) |
|
|
108
|
+
| `een.fullFrameImageUrl.v1` | `data.een.fullFrameImageUrl.v1` | Full frame image URL |
|
|
109
|
+
| `een.croppedFrameImageUrl.v1` | `data.een.croppedFrameImageUrl.v1` | Cropped/zoomed image URL |
|
|
110
|
+
| `een.fullFrameImageUrlWithOverlay.v1` | `data.een.fullFrameImageUrlWithOverlay.v1` | Image URL with bounding box overlay |
|
|
111
|
+
| `een.eevaAttributes.v1` | `data.een.eevaAttributes.v1` | EEVA analytics attributes |
|
|
112
|
+
| `een.customLabels.v1` | `data.een.customLabels.v1` | Custom detection labels |
|
|
113
|
+
|
|
114
|
+
**Fetching full event details:**
|
|
115
|
+
```typescript
|
|
116
|
+
import { getEvent } from 'een-api-toolkit'
|
|
117
|
+
|
|
118
|
+
// Get event with all available data based on its dataSchemas
|
|
119
|
+
const simpleEvent = events.value.find(e => e.id === eventId)
|
|
120
|
+
const includes = simpleEvent?.dataSchemas.map(schema => `data.${schema}`) || []
|
|
121
|
+
|
|
122
|
+
const { data: fullEvent } = await getEvent(eventId, { include: includes })
|
|
123
|
+
// fullEvent.data[] now contains all available data objects
|
|
124
|
+
```
|
|
125
|
+
|
|
93
126
|
### EventMetric Interface
|
|
94
127
|
```typescript
|
|
95
128
|
interface EventMetric {
|