@evercam/api 1.0.0-6fbecaded → 1.0.0-8b5d82253

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.
@@ -79,7 +79,8 @@ export declare enum CopilotSuggestion {
79
79
  GateReport = "gate_report",
80
80
  Weather = "weather",
81
81
  Clip = "clip",
82
- Timelapse = "timelapse"
82
+ Timelapse = "timelapse",
83
+ Chart = "chart"
83
84
  }
84
85
  export declare enum CopilotChatProvider {
85
86
  Gemini = "gemini",
@@ -15,6 +15,7 @@ export type Kit = {
15
15
  router: Partial<Router>;
16
16
  serial: string;
17
17
  status: KitStatus;
18
+ powerSchedule: Schedule;
18
19
  };
19
20
  export declare enum KitStatus {
20
21
  New = "new",
@@ -28,6 +29,19 @@ export declare enum KitAlarm {
28
29
  UnknownCamera = "unknown_camera",
29
30
  NotRecordingCamera = "not_recording_camera"
30
31
  }
32
+ export declare enum KitMetricId {
33
+ Battery = "battery"
34
+ }
35
+ export declare enum KitMetricPeriod {
36
+ Last5Minutes = "now-5m",
37
+ Last15Minutes = "now-15m",
38
+ Last30Minutes = "now-30m",
39
+ Last1Hour = "now-1h",
40
+ Last3Hours = "now-3h",
41
+ Last6Hours = "now-6h",
42
+ Last12Hours = "now-12h",
43
+ Last24Hours = "now-24h"
44
+ }
31
45
  export declare enum GrafanaMetricId {
32
46
  SbcCpuLoad = "SbcCpuLoad",
33
47
  SbcSystemLoad5MnAvg = "SbcSystemLoad5MnAvg",
@@ -74,7 +88,7 @@ export declare enum GrafanaMetricId {
74
88
  ExNvrMemoryUsage = "ExNvrMemoryUsage",
75
89
  ExNvrLogs = "ExNvrLogs"
76
90
  }
77
- export declare enum GrafanaChartType {
91
+ export declare enum KitChartType {
78
92
  Stat = "stat",
79
93
  Gauge = "gauge",
80
94
  Graph = "graph",
@@ -101,7 +115,7 @@ export type GrafanaPanel = {
101
115
  name: keyof GrafanaMetricId;
102
116
  title: string;
103
117
  description: string;
104
- type: GrafanaChartType;
118
+ type: KitChartType;
105
119
  datasource: GrafanaDataSource;
106
120
  targets: GrafanaTarget[];
107
121
  maxDataPoints?: number;
@@ -198,17 +212,27 @@ export type GrafanaFrame = {
198
212
  nanos?: Array<number[] | null>;
199
213
  };
200
214
  };
215
+ export type KitMetricData = {
216
+ type: KitChartType;
217
+ chartProps?: Record<string, unknown>;
218
+ };
201
219
  export type GrafanaQueryResult = {
202
220
  status: number;
203
221
  frames: GrafanaFrame[];
204
222
  };
205
- export type GrafanaMetricResponse = {
223
+ export type GrafanaMetricData = KitMetricData & {
206
224
  results: {
207
225
  [key: string]: GrafanaQueryResult;
208
226
  };
209
- type: GrafanaChartType;
210
227
  };
211
- export type GrafanaKitMetrics = Record<keyof typeof GrafanaMetricId, GrafanaMetricResponse>;
228
+ export type EvercamMetricData = KitMetricData & {
229
+ stats: EvercamStats[];
230
+ };
231
+ export type GrafanaKitMetrics = Record<keyof typeof GrafanaMetricId, GrafanaMetricData>;
232
+ export type EvercamStats = {
233
+ [k: string]: number | string;
234
+ timestamp: string;
235
+ };
212
236
  export type KitQueryParams = PaginationParams & {
213
237
  name: string;
214
238
  serial: string;
@@ -1,4 +1,4 @@
1
- import { MilesightCameraNetworkConfiguration, MilesightCameraOsdConfiguration, MilesightCameraSdCardInfo, MilesightCameraSystemSettings, MilesightCameraTimeInfo, MilesightCameraVideoConfig, TaskStatus, DateTime_Z_micros, GrafanaChartType } from "@/types";
1
+ import { MilesightCameraNetworkConfiguration, MilesightCameraOsdConfiguration, MilesightCameraSdCardInfo, MilesightCameraSystemSettings, MilesightCameraTimeInfo, MilesightCameraVideoConfig, TaskStatus, DateTime_Z_micros, KitMetricData } from "@/types";
2
2
  export declare enum ExNvrHealthCheckTaskId {
3
3
  ExNvrLogin = "exNvrLogin",
4
4
  ExNvrConfigCheck = "exNvrGetDeviceInfo",
@@ -113,8 +113,7 @@ export declare enum ExNvrMetricId {
113
113
  RamUsage = "ram_usage",
114
114
  SwapUsage = "swap_usage"
115
115
  }
116
- export type ExNvrMetric = {
116
+ export type ExNvrMetric = KitMetricData & {
117
117
  metricId: ExNvrMetricId;
118
- type: GrafanaChartType;
119
118
  value: number;
120
119
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evercam/api",
3
- "version": "1.0.0-6fbecaded",
3
+ "version": "1.0.0-8b5d82253",
4
4
  "description": "Evercam API client",
5
5
  "repository": {
6
6
  "type": "git",