@evercam/api 1.0.0-f6f982c6c → 1.0.0-preview-fix-evercam-ui-publish-script-58a674953

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.
@@ -1,6 +1,5 @@
1
1
  import { CountryCode, CountryId, DateType, Nvr, PaginationParams, PowerType, Project, Region, Router, Schedule } from "@/types";
2
2
  export type Kit = {
3
- alarms: KitAlarm[];
4
3
  countryCode: CountryCode;
5
4
  countryId: CountryId;
6
5
  countryName: string;
@@ -15,7 +14,6 @@ export type Kit = {
15
14
  router: Partial<Router>;
16
15
  serial: string;
17
16
  status: KitStatus;
18
- powerSchedule: Schedule;
19
17
  };
20
18
  export declare enum KitStatus {
21
19
  New = "new",
@@ -29,19 +27,6 @@ export declare enum KitAlarm {
29
27
  UnknownCamera = "unknown_camera",
30
28
  NotRecordingCamera = "not_recording_camera"
31
29
  }
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
- }
45
30
  export declare enum GrafanaMetricId {
46
31
  SbcCpuLoad = "SbcCpuLoad",
47
32
  SbcSystemLoad5MnAvg = "SbcSystemLoad5MnAvg",
@@ -88,7 +73,7 @@ export declare enum GrafanaMetricId {
88
73
  ExNvrMemoryUsage = "ExNvrMemoryUsage",
89
74
  ExNvrLogs = "ExNvrLogs"
90
75
  }
91
- export declare enum KitChartType {
76
+ export declare enum GrafanaChartType {
92
77
  Stat = "stat",
93
78
  Gauge = "gauge",
94
79
  Graph = "graph",
@@ -115,7 +100,7 @@ export type GrafanaPanel = {
115
100
  name: keyof GrafanaMetricId;
116
101
  title: string;
117
102
  description: string;
118
- type: KitChartType;
103
+ type: GrafanaChartType;
119
104
  datasource: GrafanaDataSource;
120
105
  targets: GrafanaTarget[];
121
106
  maxDataPoints?: number;
@@ -212,27 +197,17 @@ export type GrafanaFrame = {
212
197
  nanos?: Array<number[] | null>;
213
198
  };
214
199
  };
215
- export type KitMetricData = {
216
- type: KitChartType;
217
- chartProps?: Record<string, unknown>;
218
- };
219
200
  export type GrafanaQueryResult = {
220
201
  status: number;
221
202
  frames: GrafanaFrame[];
222
203
  };
223
- export type GrafanaMetricData = KitMetricData & {
204
+ export type GrafanaMetricResponse = {
224
205
  results: {
225
206
  [key: string]: GrafanaQueryResult;
226
207
  };
208
+ type: GrafanaChartType;
227
209
  };
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
- };
210
+ export type GrafanaKitMetrics = Record<keyof typeof GrafanaMetricId, GrafanaMetricResponse>;
236
211
  export type KitQueryParams = PaginationParams & {
237
212
  name: string;
238
213
  serial: string;
@@ -1,4 +1,4 @@
1
- import { MilesightCameraNetworkConfiguration, MilesightCameraOsdConfiguration, MilesightCameraSdCardInfo, MilesightCameraSystemSettings, MilesightCameraTimeInfo, MilesightCameraVideoConfig, TaskStatus, DateTime_Z_micros, KitMetricData } from "@/types";
1
+ import { MilesightCameraNetworkConfiguration, MilesightCameraOsdConfiguration, MilesightCameraSdCardInfo, MilesightCameraSystemSettings, MilesightCameraTimeInfo, MilesightCameraVideoConfig, TaskStatus, DateTime_Z_micros, GrafanaChartType } from "@/types";
2
2
  export declare enum ExNvrHealthCheckTaskId {
3
3
  ExNvrLogin = "exNvrLogin",
4
4
  ExNvrConfigCheck = "exNvrGetDeviceInfo",
@@ -113,7 +113,8 @@ export declare enum ExNvrMetricId {
113
113
  RamUsage = "ram_usage",
114
114
  SwapUsage = "swap_usage"
115
115
  }
116
- export type ExNvrMetric = KitMetricData & {
116
+ export type ExNvrMetric = {
117
117
  metricId: ExNvrMetricId;
118
+ type: GrafanaChartType;
118
119
  value: number;
119
120
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evercam/api",
3
- "version": "1.0.0-f6f982c6c",
3
+ "version": "1.0.0-preview-fix-evercam-ui-publish-script-58a674953",
4
4
  "description": "Evercam API client",
5
5
  "repository": {
6
6
  "type": "git",