@evercam/api 1.0.0-c65b4959f → 1.0.0-cb5ac4ad5

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 (99) hide show
  1. package/README.md +3 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +201 -12
  3. package/dist/api/api/adminApi.d.ts +114 -101
  4. package/dist/api/api/aiApi.d.ts +187 -82
  5. package/dist/api/api/authzApi.d.ts +34 -15
  6. package/dist/api/api/client/axios.d.ts +2 -1
  7. package/dist/api/api/client/swr/Swr.d.ts +1 -1
  8. package/dist/api/api/evercamApi.d.ts +154 -108
  9. package/dist/api/api/evercamLabsApi.d.ts +8 -17
  10. package/dist/api/api/exNvrApi.d.ts +1 -1
  11. package/dist/api/api/index.d.ts +1 -0
  12. package/dist/api/api/ingestApi.d.ts +123 -35
  13. package/dist/api/api/ptzApi.d.ts +12 -3
  14. package/dist/api/api/videoWallApi.d.ts +7 -7
  15. package/dist/api/api/weatherApi.d.ts +2 -2
  16. package/dist/api/api/workflowsApi.d.ts +15 -0
  17. package/dist/api/types/360.d.ts +288 -25
  18. package/dist/api/types/aconex.d.ts +104 -6
  19. package/dist/api/types/admin.d.ts +51 -0
  20. package/dist/api/types/aiConfigs.d.ts +244 -0
  21. package/dist/api/types/analytics.d.ts +182 -59
  22. package/dist/api/types/anpr.d.ts +53 -13
  23. package/dist/api/types/auditLogs.d.ts +19 -2
  24. package/dist/api/types/authz.d.ts +132 -0
  25. package/dist/api/types/autodesk.d.ts +7 -7
  26. package/dist/api/types/automation.d.ts +114 -1
  27. package/dist/api/types/axios.d.ts +20 -14
  28. package/dist/api/types/bim.d.ts +38 -9
  29. package/dist/api/types/camera.d.ts +130 -119
  30. package/dist/api/types/comments.d.ts +16 -11
  31. package/dist/api/types/company.d.ts +42 -1
  32. package/dist/api/types/compare.d.ts +20 -5
  33. package/dist/api/types/connector.d.ts +5 -5
  34. package/dist/api/types/coolify.d.ts +20 -2
  35. package/dist/api/types/credentials.d.ts +1 -0
  36. package/dist/api/types/detections.d.ts +23 -32
  37. package/dist/api/types/drone.d.ts +95 -6
  38. package/dist/api/types/errors.d.ts +13 -1
  39. package/dist/api/types/gateReport.d.ts +49 -168
  40. package/dist/api/types/gateReportManagement.d.ts +170 -0
  41. package/dist/api/types/hammertech.d.ts +98 -0
  42. package/dist/api/types/hdd.d.ts +26 -1
  43. package/dist/api/types/index.d.ts +16 -3
  44. package/dist/api/types/ingest.d.ts +191 -4
  45. package/dist/api/types/kit.d.ts +76 -56
  46. package/dist/api/types/map.d.ts +12 -0
  47. package/dist/api/types/media.d.ts +9 -3
  48. package/dist/api/types/notification.d.ts +83 -3
  49. package/dist/api/types/oauth.d.ts +62 -0
  50. package/dist/api/types/observationEvents.d.ts +141 -0
  51. package/dist/api/types/observations.d.ts +84 -0
  52. package/dist/api/types/planner.d.ts +102 -9
  53. package/dist/api/types/posthog.d.ts +35 -0
  54. package/dist/api/types/procore.d.ts +13 -6
  55. package/dist/api/types/progressPhoto.d.ts +6 -32
  56. package/dist/api/types/project.d.ts +150 -19
  57. package/dist/api/types/recording.d.ts +10 -15
  58. package/dist/api/types/recycleBin.d.ts +1 -1
  59. package/dist/api/types/ring.d.ts +53 -0
  60. package/dist/api/types/roi.d.ts +3 -11
  61. package/dist/api/types/routeParams.d.ts +1 -0
  62. package/dist/api/types/router.d.ts +20 -1
  63. package/dist/api/types/shared.d.ts +28 -24
  64. package/dist/api/types/shares.d.ts +6 -157
  65. package/dist/api/types/sim.d.ts +6 -6
  66. package/dist/api/types/siteAnalytics.d.ts +189 -46
  67. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  68. package/dist/api/types/siteView.d.ts +78 -0
  69. package/dist/api/types/smartSeach.d.ts +5 -0
  70. package/dist/api/types/snapshots.d.ts +49 -4
  71. package/dist/api/types/socket.d.ts +4 -0
  72. package/dist/api/types/storageProvider.d.ts +19 -0
  73. package/dist/api/types/storyblok.d.ts +27 -0
  74. package/dist/api/types/streaming.d.ts +3 -3
  75. package/dist/api/types/tag.d.ts +1 -1
  76. package/dist/api/types/time.d.ts +4 -18
  77. package/dist/api/types/timelapse.d.ts +7 -11
  78. package/dist/api/types/user.d.ts +121 -35
  79. package/dist/api/types/videoWall.d.ts +47 -14
  80. package/dist/api/types/weather.d.ts +77 -11
  81. package/dist/api/types/widget.d.ts +76 -15
  82. package/dist/api/types/workflows.d.ts +108 -0
  83. package/dist/api/types/xweather.d.ts +4 -4
  84. package/dist/api/utils.d.ts +1 -0
  85. package/dist/index.js +2446 -1048
  86. package/dist/index.js.map +1 -1
  87. package/dist/index.umd.cjs +1 -1
  88. package/dist/index.umd.cjs.map +1 -1
  89. package/dist/shared/types/components.d.ts +355 -36
  90. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  91. package/dist/shared/types/imagePlayer.d.ts +10 -3
  92. package/dist/shared/types/index.d.ts +3 -0
  93. package/dist/shared/types/observations.d.ts +25 -0
  94. package/dist/shared/types/rbac.d.ts +67 -0
  95. package/dist/shared/types/timeline.d.ts +2 -1
  96. package/package.json +6 -4
  97. package/dist/api/types/copilot.d.ts +0 -157
  98. package/dist/api/types/storageServers.d.ts +0 -4
  99. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,25 +1,56 @@
1
- import { AdminCamera, Camera, CameraExid, DateTime, DateType, EntityByExid, Exid, PaginationParams } from "@/types";
1
+ import { AdminCamera, Camera, CameraExid, DateType, EntityByExid, Exid, Operator, PaginationParams } from "@evercam/api/types";
2
2
  export type ProjectExid = Exid;
3
3
  export type ProjectsByExid = EntityByExid<Project>;
4
4
  export type Project = {
5
- id: string | number;
6
- exid: ProjectExid;
7
- name: string;
8
- status?: ProjectStatus;
9
- insertedAt?: string;
10
- startedAt?: string;
11
- timezone?: string;
12
- zohoId?: string;
13
- userId?: number;
5
+ archiveTier?: ProjectArchiveTier;
14
6
  cameras?: Array<Camera | AdminCamera>;
15
- unrestrictedCameras?: Array<Camera | AdminCamera>;
7
+ camerasCount?: number;
8
+ camerasRestrictionType?: string;
9
+ companyId: number;
10
+ endDate: string;
11
+ exid: ProjectExid;
16
12
  featureFlags: Array<ProjectFeatureFlag>;
13
+ geographicBounds?: unknown;
14
+ id: string | number;
15
+ insertedAt?: string;
16
+ name: string;
17
17
  owner?: {
18
18
  email?: string;
19
19
  };
20
20
  ownerEmail?: string;
21
21
  ownerName?: string;
22
- camerasRestrictionType?: string;
22
+ startedAt?: string;
23
+ status?: ProjectStatus;
24
+ timezone?: string;
25
+ unrestrictedCameras?: Camera[];
26
+ userId?: number;
27
+ zohoId?: string;
28
+ };
29
+ export type AdminProjectCameraRef = {
30
+ exid: string;
31
+ name: string;
32
+ };
33
+ export type AdminProjectListItem = {
34
+ id: number;
35
+ name: string;
36
+ status: ProjectStatus | string;
37
+ insertedAt: string;
38
+ timezone: string | null;
39
+ exid: ProjectExid;
40
+ endDate: string | null;
41
+ startDate: string | null;
42
+ archiveTier: ProjectArchiveTier | null;
43
+ featureFlags: Array<ProjectFeatureFlag | string>;
44
+ zohoId: string | null;
45
+ ownerEmail: string | null;
46
+ companyId: number | null;
47
+ companyName: string | null;
48
+ ownerName: string | null;
49
+ archived: boolean;
50
+ cameras?: AdminProjectCameraRef[];
51
+ };
52
+ export type AdminProjectDetail = AdminProjectListItem & {
53
+ userId: number;
23
54
  };
24
55
  export declare enum ProjectStatus {
25
56
  ToStart = "To Start",
@@ -31,15 +62,22 @@ export declare enum ProjectArchiveTier {
31
62
  Full = "Full",
32
63
  Partial = "Partial",
33
64
  Minimal = "Minimal",
34
- ScheduledForDeletion = "Scheduled for Deletion"
65
+ ScheduledForDeletion = "Scheduled for Deletion",
66
+ No = "No"
35
67
  }
36
- export type ProjectResponsePayload = {
37
- data?: Project[];
38
- };
39
68
  export type UpdateCameraRestrictionPayload = {
40
69
  isAccessRestricted?: boolean;
41
70
  };
71
+ export type CameraPosition = {
72
+ cameraExid: CameraExid;
73
+ position: number;
74
+ };
75
+ export type ReorderCamerasPayload = {
76
+ positions: CameraPosition[];
77
+ };
42
78
  export type Logo = {
79
+ id: number;
80
+ projectId: number;
43
81
  name: string;
44
82
  url: string;
45
83
  };
@@ -53,7 +91,6 @@ export declare enum ProjectFeatureFlag {
53
91
  ThreeSixtyView = "360_view",
54
92
  NdaMc = "NDA/MC",
55
93
  GateReport = "gate_report",
56
- GateReportAutoVerify = "auto_publish",
57
94
  GateReportMotionDetection = "motion_detection",
58
95
  FullEmpty = "full_empty",
59
96
  MediaHubSharing = "archives_sharing",
@@ -61,7 +98,9 @@ export declare enum ProjectFeatureFlag {
61
98
  NoLicensePlate = "no_license_plate",
62
99
  DefaultToProjectApp = "default_to_project_app",
63
100
  SmartSearch = "smart_search",
64
- PpeMonitoring = "ppe_monitoring"
101
+ PpeMonitoring = "ppe_monitoring",
102
+ NoGdpr = "no_gdpr",
103
+ Chat = "chat"
65
104
  }
66
105
  export type ProjectBatteryReading = {
67
106
  exid: number;
@@ -79,6 +118,7 @@ export type ProjectsQueryParams = PaginationParams & {
79
118
  status: ProjectStatus;
80
119
  cameras: string;
81
120
  featureFlags: Array<ProjectFeatureFlag>;
121
+ featureFlagsOperator?: Operator;
82
122
  archived: string;
83
123
  };
84
124
  export type ProjectCreateRequestPayload = {
@@ -117,7 +157,7 @@ export type ProjectUserProperty = {
117
157
  eventsCount: number;
118
158
  fullname: string;
119
159
  id: number;
120
- lastSeenAt: DateTime;
160
+ lastSeenAt: string;
121
161
  persona: string;
122
162
  };
123
163
  export type ProjectUsers = {
@@ -127,3 +167,94 @@ export type ProjectUsers = {
127
167
  }[];
128
168
  users: Record<string, ProjectUserProperty[]>;
129
169
  };
170
+ export type ProjectRole = {
171
+ id: number;
172
+ name: string;
173
+ };
174
+ export type ProjectMember = {
175
+ id: string;
176
+ key?: string;
177
+ email: string;
178
+ fullname: string;
179
+ lastSeenAt?: string;
180
+ role: ProjectRole;
181
+ permissions?: string[];
182
+ subRoles?: Array<{
183
+ resourceId: string;
184
+ roleId: number;
185
+ }>;
186
+ company?: {
187
+ name: string;
188
+ } | null;
189
+ };
190
+ export type ProjectInvite = {
191
+ id?: string;
192
+ email: string;
193
+ role?: ProjectRole;
194
+ permissions?: string[];
195
+ subRoles?: Array<{
196
+ resourceId: string;
197
+ roleId: number;
198
+ }>;
199
+ invitedAt?: string;
200
+ };
201
+ export type ProjectMembersResponsePayload = {
202
+ users: ProjectMember[];
203
+ invites: ProjectInvite[];
204
+ errors: ProjectUserError[];
205
+ };
206
+ export type ProjectMembersRequestPayload = {
207
+ roleId: number;
208
+ emails: string[];
209
+ message?: string;
210
+ overrideRole?: Partial<{
211
+ permissions?: string[];
212
+ subRoles?: Array<{
213
+ resourceId: string;
214
+ roleId: number;
215
+ }>;
216
+ }>;
217
+ };
218
+ export type ProjectInviteMembersResponsePayload = {
219
+ users: ProjectMember[];
220
+ invites: ProjectInvite[];
221
+ };
222
+ export type PlaceholderThumbnailData = {
223
+ placeholder: string;
224
+ };
225
+ export type ProjectUserError = {
226
+ email: string;
227
+ error: Record<string, string[]>;
228
+ };
229
+ export type ProjectUsersResponsePayload = {
230
+ users: ProjectMember[];
231
+ invites: ProjectInvite[];
232
+ errors: ProjectUserError[];
233
+ };
234
+ export type MentionableUser = {
235
+ id: number;
236
+ fullname: string;
237
+ email: string;
238
+ };
239
+ export type ProjectStorageQueryParams = PaginationParams & {
240
+ cameraName: string;
241
+ cameraExid: CameraExid;
242
+ status: ProjectStorageStatus;
243
+ };
244
+ export type ProjectStorage = {
245
+ id: number;
246
+ cameraExid: CameraExid;
247
+ cameraName: string;
248
+ projectExid: string;
249
+ projectName: string;
250
+ status: ProjectStorageStatus;
251
+ requestor: string;
252
+ created_at: DateType;
253
+ };
254
+ export declare enum ProjectStorageStatus {
255
+ New = "new",
256
+ Pending = "pending",
257
+ Processing = "processing",
258
+ Completed = "completed",
259
+ Failed = "failed"
260
+ }
@@ -1,21 +1,24 @@
1
- import { ApiCredentials } from "@/types";
1
+ import { ApiCredentials, PaginationParams } from "@evercam/api/types";
2
2
  import { CancelToken } from "axios";
3
3
  export type Snapshot = {
4
4
  createdAt: string;
5
5
  data: string;
6
6
  status?: string;
7
7
  };
8
- export type NearestSnapshotRequestPayload = {
8
+ export type SnapshotRequestPayload = {
9
9
  apiKey?: string;
10
10
  apiId?: string;
11
11
  token?: string;
12
12
  cancelToken?: object;
13
+ includeImage?: boolean;
14
+ view?: boolean;
13
15
  };
14
16
  export type AvailableDaysRequestPayload = {
15
17
  cameraId: string;
16
18
  year: string;
17
19
  month: string;
18
20
  payload?: ApiCredentials;
21
+ cancelToken?: CancelToken;
19
22
  };
20
23
  export type AvailableDaysResponsePayload = {
21
24
  days: Array<number>;
@@ -38,11 +41,9 @@ export type NearestSnapshotResponsePayload = {
38
41
  notes?: string;
39
42
  }>;
40
43
  };
41
- export type SnapshotRangeRequestPayload = {
44
+ export type SnapshotRangeRequestPayload = PaginationParams & {
42
45
  from: string;
43
46
  to: string;
44
- limit?: number;
45
- page?: number;
46
47
  schedule?: boolean;
47
48
  count?: number;
48
49
  };
@@ -55,8 +56,7 @@ export type SnapshotRangeResponsePayload = {
55
56
  snapshots: Array<SnapshotInstance>;
56
57
  };
57
58
  export declare enum BrainTool {
58
- Detections = "detections",
59
- Segmentation = "sam"
59
+ Detections = "detections"
60
60
  }
61
61
  export declare enum CloudRecordingFrequency {
62
62
  EverySecond = 60,
@@ -76,6 +76,7 @@ export declare enum CloudRecordingDuration {
76
76
  Month = 30,
77
77
  ThreeMonths = 90
78
78
  }
79
+ export declare const CloudRecordingDurationLabel: Record<CloudRecordingDuration, string>;
79
80
  export declare enum CloudRecordingStatus {
80
81
  On = "on",
81
82
  Off = "off",
@@ -103,13 +104,6 @@ export declare enum SnapshotExtractionInterval {
103
104
  }
104
105
  export declare enum VpnServer {
105
106
  None = "None",
106
- OpenVPN1 = "OpenVPN1",
107
- OpenVPN2 = "OpenVPN2",
108
- OpenVPN3 = "OpenVPN3",
109
- OpenVPN4 = "OpenVPN4",
110
- OpenVPN5 = "OpenVPN5",
111
- PPTP1 = "PPTP1",
112
- PPTP2 = "PPTP2",
113
107
  WireGuard1 = "WireGuard1",
114
108
  WireGuard2 = "WireGuard2",
115
109
  WireGuard3 = "WireGuard3",
@@ -119,5 +113,6 @@ export declare enum VpnServer {
119
113
  WireGuard7 = "WireGuard7",
120
114
  WireGuard8 = "WireGuard8",
121
115
  WireGuard9 = "WireGuard9",
122
- WireGuard10 = "WireGuard10"
116
+ WireGuard10 = "WireGuard10",
117
+ WgHub = "WgHub"
123
118
  }
@@ -1,4 +1,4 @@
1
- import type { DateType, PaginationParams } from "@/types";
1
+ import type { DateType, PaginationParams } from "@evercam/api/types";
2
2
  export type RecycleBin = {
3
3
  id?: number;
4
4
  exid: string;
@@ -0,0 +1,53 @@
1
+ export type RingCompleteLinkingPayload = {
2
+ nonce: string;
3
+ time: string;
4
+ };
5
+ /** The only auto-import status complete-linking returns today. */
6
+ export declare const RING_AUTO_IMPORT_QUEUED = "queued";
7
+ export type RingAutoImportStatus = typeof RING_AUTO_IMPORT_QUEUED;
8
+ export type RingCompleteLinkingResponsePayload = {
9
+ status: string;
10
+ /** Absent when the API did not schedule an import. */
11
+ autoImport?: RingAutoImportStatus;
12
+ };
13
+ export type RingDevice = {
14
+ deviceId: string;
15
+ name: string;
16
+ /** Resolved from Ring's `device-status`; null when Ring did not return it. */
17
+ online: boolean | null;
18
+ deviceType: string | null;
19
+ firmwareVersion: string | null;
20
+ /** Always null — Ring's API does not expose device power level. */
21
+ batteryLife: number | null;
22
+ location: string | null;
23
+ imported: boolean;
24
+ cameraExid?: string;
25
+ projectExid?: string;
26
+ projectName?: string;
27
+ };
28
+ export type RingDevicesResponsePayload = {
29
+ devices: RingDevice[];
30
+ };
31
+ export type RingMoveDevicePayload = {
32
+ projectExid: string;
33
+ };
34
+ export type RingMoveDeviceResponsePayload = {
35
+ status: string;
36
+ cameraExid: string;
37
+ projectExid: string;
38
+ };
39
+ export type RingLiveViewPayload = {
40
+ sdpOffer: string;
41
+ };
42
+ export type RingLiveViewResponse = {
43
+ sdpAnswer: string;
44
+ sessionUrl: string;
45
+ iceServers: Array<{
46
+ urls: string;
47
+ username?: string;
48
+ credential?: string;
49
+ }>;
50
+ };
51
+ export type RingStopLiveViewResponse = {
52
+ status: string;
53
+ };
@@ -3,23 +3,15 @@ export declare enum RoiType {
3
3
  AnprContext = "anpr_context",
4
4
  ExclusionZone = "exclusion_zone",
5
5
  WorkflowArea = "workflow_area",
6
- SiteAnalytics = "site_analytics"
6
+ SiteAnalytics = "site_analytics",
7
+ Ppe = "ppe_roi"
7
8
  }
8
9
  export declare enum RoiShapeType {
9
10
  Polygon = "polygon",
10
11
  Line = "line",
11
12
  Direction = "direction",
12
- Rectangle = "rectangle",
13
- ROIBox = "ROIBox"
13
+ Rectangle = "rectangle"
14
14
  }
15
- export type RoiShape = {
16
- id: number | null;
17
- name: string;
18
- x1: number;
19
- x2: number;
20
- y1: number;
21
- y2: number;
22
- };
23
15
  export declare enum RoiDirection {
24
16
  Arrived = "arrived",
25
17
  Left = "left",
@@ -1,6 +1,7 @@
1
1
  export type RouteParams = {
2
2
  projectExid?: string;
3
3
  cameraExid?: string;
4
+ mediaExid?: string;
4
5
  timestamp?: string;
5
6
  fromDate?: string;
6
7
  toDate?: string;
@@ -1,4 +1,4 @@
1
- import { Camera, PaginationParams, Project, Sim } from "@/types";
1
+ import { Camera, PaginationParams, Project, Sim } from "@evercam/api/types";
2
2
  export type RouterBillPayer = {
3
3
  name: string;
4
4
  };
@@ -47,6 +47,10 @@ export declare enum RouterStatus {
47
47
  Active = "active",
48
48
  Inactive = "inactive"
49
49
  }
50
+ export declare enum RouterScanInputMode {
51
+ Qr = "qr",
52
+ Manual = "manual"
53
+ }
50
54
  export type RouterQueryParams = PaginationParams & {
51
55
  routerType: string;
52
56
  vpnServer: string;
@@ -65,3 +69,18 @@ export type RouterCreatePayload = {
65
69
  vpnServer?: string;
66
70
  netbirdUrl?: string;
67
71
  };
72
+ export type RouterQRScanResult = {
73
+ raw: string;
74
+ timestamp: string;
75
+ sn?: string;
76
+ m?: string;
77
+ u?: string;
78
+ pw?: string;
79
+ t?: string;
80
+ s?: string;
81
+ p?: string;
82
+ i?: string;
83
+ b?: string;
84
+ boxId?: string;
85
+ isDuplicate?: boolean;
86
+ };
@@ -1,7 +1,17 @@
1
- import { DateType } from "@/types";
1
+ import { DateType } from "@evercam/api/types";
2
+ export declare enum Operator {
3
+ AND = "and",
4
+ OR = "or"
5
+ }
2
6
  type sortby = string;
3
7
  type sortDirection = "asc" | "desc";
4
8
  export type SortingUrlParam = `${sortby}|${sortDirection}`;
9
+ export type JsonPrimitive = string | number | boolean | null;
10
+ export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
11
+ export type JsonObject = {
12
+ [key: string]: JsonValue;
13
+ };
14
+ export type JsonArray = JsonValue[];
5
15
  export type BatteryReading = {
6
16
  id: number;
7
17
  voltage: number;
@@ -53,7 +63,7 @@ export declare enum UnitSystem {
53
63
  Metric = "metric"
54
64
  }
55
65
  export type Timestamp = string | number;
56
- export type Schedule = {
66
+ export type ScheduleUppercase = {
57
67
  Friday: string[];
58
68
  Monday: string[];
59
69
  Saturday: string[];
@@ -71,6 +81,7 @@ export type ScheduleLowercase = {
71
81
  tuesday: string[];
72
82
  wednesday: string[];
73
83
  };
84
+ export type Schedule = ScheduleUppercase | ScheduleLowercase;
74
85
  export type PaginationParams = {
75
86
  sort?: SortingUrlParam;
76
87
  page?: number;
@@ -105,18 +116,6 @@ export declare enum DownloadFileType {
105
116
  Pdf = "pdf",
106
117
  Csv = "csv"
107
118
  }
108
- export declare enum FeedbackContext {
109
- CopilotMessage = "copilot_message"
110
- }
111
- export type FeedbackPayload<T> = {
112
- id?: number;
113
- user: string;
114
- text: string;
115
- type: T;
116
- context: FeedbackContext;
117
- messageId?: number;
118
- conversationId?: number;
119
- };
120
119
  export type Stringified<T> = string & {
121
120
  [P in keyof T]: {
122
121
  "_ value": T[P];
@@ -126,6 +125,21 @@ export interface JSON {
126
125
  stringify<T>(value: T, replacer?: (key: string, value: unknown) => unknown, space?: string | number): string & Stringified<T>;
127
126
  parse<T>(text: Stringified<T>, reviver?: (key: unknown, value: unknown) => unknown): T;
128
127
  }
128
+ export type TuplePoint2D = [number, number];
129
+ export type TuplePoint3D = [number, number, number];
130
+ export type Point2D = {
131
+ x: number;
132
+ y: number;
133
+ };
134
+ export type Point3D = {
135
+ x: number;
136
+ y: number;
137
+ z: number;
138
+ };
139
+ export type GeoPoint = {
140
+ lat: number;
141
+ lng: number;
142
+ };
129
143
  export type Exid = string;
130
144
  export type EntityByExid<Entity extends unknown> = Record<Exid, Entity>;
131
145
  export type BatteryVoltage = {
@@ -152,16 +166,6 @@ export declare enum TimelinePrecision {
152
166
  Minute = "minute",
153
167
  Events = "events"
154
168
  }
155
- export type EntityStatsQueryParams = {
156
- period: "day" | "week" | "month";
157
- startDate: string;
158
- endDate: string;
159
- };
160
- export type EntityStat = {
161
- period: string;
162
- name: string;
163
- count: number;
164
- };
165
169
  export declare enum TaskStatus {
166
170
  Idle = "idle",
167
171
  Loading = "loading",
@@ -1,4 +1,4 @@
1
- import type { CameraExid, DateTime, DateType } from "@/types";
1
+ import type { DateType } from "@evercam/api/types";
2
2
  export type ShareRequest = {
3
3
  cameraId: string;
4
4
  createdAt: DateType | number;
@@ -24,19 +24,6 @@ export type Share = {
24
24
  userId: number;
25
25
  isUserAccessRestricted: boolean;
26
26
  };
27
- export type ShareRequestsResponsePayload = {
28
- shareRequests: ShareRequest[];
29
- };
30
- export type ShareOwner = {
31
- email: string;
32
- fullname: string;
33
- lastSeenAt: DateType;
34
- sessionCount: number;
35
- };
36
- export type SharesResponsePayload = {
37
- owner: ShareOwner;
38
- shares: Share[];
39
- };
40
27
  export type ShareDeletionRequestPayload = {
41
28
  email?: string;
42
29
  key?: string;
@@ -46,151 +33,13 @@ export type SharedUsersResponsePayload = Array<{
46
33
  email: string;
47
34
  name: string;
48
35
  }>;
49
- export type ShareCreateRequestPayload = {
50
- email: string[] | string;
51
- message?: string;
52
- permission?: string;
53
- rights: string;
54
- apiId?: string;
55
- apiKey?: string;
56
- };
57
- export type ShareProjectCamerasRequestPayload = {
58
- email: string[];
59
- cameraExids: CameraExid[];
60
- message: string;
61
- permission?: string;
62
- rights: string;
63
- };
64
- export type UpdateUserRestrictionPayload = {
65
- email: string[];
66
- isUserAccessRestricted: boolean;
67
- };
68
36
  export type ShareCreateResponsePayload = {
69
37
  shares: Share[];
70
38
  shareRequests: ShareRequest[];
71
39
  };
72
- export type ShareRequestByKeyResponsePayload = {
73
- shareRequests: Array<{
74
- id: string;
75
- email: string;
76
- rights: string;
77
- cameraId: string;
78
- sharerName: string;
79
- userId: string;
80
- sharerEmail: string;
81
- createdAt: DateType;
82
- }>;
83
- };
84
- export type ResendShareRequestPayload = {
85
- email: string;
86
- apiId?: string;
87
- apiKey?: string;
88
- };
89
- export declare enum SharePermission {
90
- Minimum = "minimum",
91
- Share = "minimal+share",
92
- Full = "full",
93
- Custom = "custom"
40
+ export declare enum InviteStatus {
41
+ Pending = 0,
42
+ Cancelled = -1,
43
+ Used = 1,
44
+ Failed = -2
94
45
  }
95
- export declare enum ShareType {
96
- Share = "share",
97
- Request = "request"
98
- }
99
- export declare enum ShareRequestStatus {
100
- Pending = -1,
101
- Cancelled = -2,
102
- Failed = -3,
103
- Used = 1
104
- }
105
- export declare enum ShareVisibility {
106
- PublicDiscoverable = "publicDiscoverable",
107
- PublicUndiscoverable = "publicUndiscoverable",
108
- Private = "private"
109
- }
110
- export type ProjectShare = {
111
- id: number;
112
- projectId: string;
113
- userId: number;
114
- email: string;
115
- fullname: string;
116
- sharerId: number;
117
- sharerEmail: string;
118
- sharerName: string;
119
- role: "member" | "admin";
120
- cameras: Record<string, string>;
121
- message: string | null;
122
- updatedAt: DateType;
123
- insertedAt: DateType;
124
- };
125
- export type ProjectShareRequest = ProjectShare;
126
- export type ProjectShareResponse = {
127
- projectShares: ProjectShare[];
128
- projectShareRequests: ProjectShareRequest[];
129
- };
130
- export type AdminShare = {
131
- sharerId: number;
132
- sharerFullname: string;
133
- sharerApiId: string;
134
- sharerApiKey: string;
135
- shareeId: number;
136
- shareeFullname: string;
137
- shareeApiId: string;
138
- shareeApiKey: string;
139
- shareeEmail: string;
140
- cameraId: number;
141
- exid: string;
142
- projectId: string;
143
- name: string;
144
- id: number;
145
- message: string;
146
- createdAt: DateType;
147
- };
148
- export type CameraShareRequestPayload = {
149
- email: string[];
150
- rights: string;
151
- message?: string;
152
- };
153
- export type ShareQueryParams = {
154
- exid: string;
155
- sharerFullname: string;
156
- shareeFullname: string;
157
- shareeEmail: string;
158
- };
159
- export type CameraShare = {
160
- sharerId: number;
161
- sharerFullname: string;
162
- sharerApiId: string;
163
- sharerApiKey: string;
164
- shareeId: number;
165
- shareeFullname: string;
166
- shareeApiId: string;
167
- shareeApiKey: string;
168
- shareeEmail: string;
169
- cameraId: number;
170
- exid: string;
171
- projectId: string;
172
- name: string;
173
- id: number;
174
- message: string;
175
- createdAt: DateTime;
176
- };
177
- export type CameraShareRequestsQueryParams = {
178
- shareeEmail: string;
179
- camera: string;
180
- sharer: string;
181
- status: string;
182
- };
183
- export type CameraShareRequest = {
184
- id: number;
185
- shareeEmail: string;
186
- camera: string;
187
- sharer: string;
188
- message: number;
189
- rights: string;
190
- status: number;
191
- projectId: string;
192
- cameraExid: string;
193
- apiId: string;
194
- apiKey: number;
195
- createdAt: DateTime;
196
- };