@evercam/api 1.0.0-c55f6a67c → 1.0.0-c5a9f7fda

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 (115) hide show
  1. package/README.md +3 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +27 -0
  3. package/dist/api/{adminApi.d.ts → api/adminApi.d.ts} +104 -62
  4. package/dist/api/{aiApi.d.ts → api/aiApi.d.ts} +33 -47
  5. package/dist/api/api/authzApi.d.ts +38 -0
  6. package/dist/api/{client → api/client}/axios.d.ts +2 -1
  7. package/dist/api/{client → api/client}/interceptors.d.ts +1 -1
  8. package/dist/api/api/client/swr/Swr.d.ts +14 -0
  9. package/dist/api/api/client/swr/SwrStore.d.ts +10 -0
  10. package/dist/api/{evercamApi.d.ts → api/evercamApi.d.ts} +97 -96
  11. package/dist/api/{evercamLabsApi.d.ts → api/evercamLabsApi.d.ts} +7 -3
  12. package/dist/api/api/index.d.ts +13 -0
  13. package/dist/api/api/ingestApi.d.ts +145 -0
  14. package/dist/api/{ptzApi.d.ts → api/ptzApi.d.ts} +12 -3
  15. package/dist/api/api/videoWallApi.d.ts +9 -0
  16. package/dist/api/{weatherApi.d.ts → api/weatherApi.d.ts} +2 -2
  17. package/dist/api/index.d.ts +3 -13
  18. package/dist/api/types/360.d.ts +276 -0
  19. package/dist/api/types/aconex.d.ts +143 -0
  20. package/dist/api/types/admin.d.ts +51 -0
  21. package/dist/{types → api/types}/analytics.d.ts +130 -9
  22. package/dist/{types → api/types}/anpr.d.ts +15 -13
  23. package/dist/{types → api/types}/auditLogs.d.ts +1 -1
  24. package/dist/api/types/authz.d.ts +60 -0
  25. package/dist/{types → api/types}/autodesk.d.ts +7 -7
  26. package/dist/api/types/automation.d.ts +86 -0
  27. package/dist/{types → api/types}/axios.d.ts +21 -1
  28. package/dist/{types → api/types}/bim.d.ts +11 -5
  29. package/dist/{types → api/types}/camera.d.ts +97 -72
  30. package/dist/{types → api/types}/comments.d.ts +21 -9
  31. package/dist/api/types/company.d.ts +115 -0
  32. package/dist/{types → api/types}/compare.d.ts +20 -5
  33. package/dist/{types → api/types}/connector.d.ts +2 -5
  34. package/dist/{types → api/types}/coolify.d.ts +3 -1
  35. package/dist/{types → api/types}/copilot.d.ts +1 -1
  36. package/dist/{types → api/types}/countries.d.ts +0 -7
  37. package/dist/{types → api/types}/credentials.d.ts +1 -0
  38. package/dist/{types → api/types}/detections.d.ts +17 -23
  39. package/dist/{types → api/types}/errors.d.ts +13 -0
  40. package/dist/{types → api/types}/gateReport.d.ts +32 -128
  41. package/dist/{types → api/types}/hdd.d.ts +26 -1
  42. package/dist/{types → api/types}/index.d.ts +6 -0
  43. package/dist/api/types/ingest.d.ts +132 -0
  44. package/dist/{types → api/types}/kit.d.ts +64 -9
  45. package/dist/{types → api/types}/media.d.ts +1 -1
  46. package/dist/api/types/notification.d.ts +57 -0
  47. package/dist/{types → api/types}/planner.d.ts +7 -0
  48. package/dist/api/types/posthog.d.ts +33 -0
  49. package/dist/{types → api/types}/procore.d.ts +26 -16
  50. package/dist/{types → api/types}/progressPhoto.d.ts +10 -23
  51. package/dist/api/types/project.d.ts +241 -0
  52. package/dist/{types → api/types}/recording.d.ts +3 -3
  53. package/dist/api/types/recycleBin.d.ts +14 -0
  54. package/dist/{types → api/types}/routeParams.d.ts +4 -2
  55. package/dist/{types → api/types}/router.d.ts +20 -1
  56. package/dist/{types → api/types}/shared.d.ts +12 -10
  57. package/dist/api/types/shares.d.ts +58 -0
  58. package/dist/{types → api/types}/sim.d.ts +6 -6
  59. package/dist/api/types/siteAnalytics.d.ts +297 -0
  60. package/dist/{types → api/types}/snapshots.d.ts +10 -1
  61. package/dist/api/types/sso.d.ts +55 -0
  62. package/dist/api/types/storyblok.d.ts +40 -0
  63. package/dist/{types → api/types}/streaming.d.ts +4 -5
  64. package/dist/{types → api/types}/tag.d.ts +1 -1
  65. package/dist/api/types/time.d.ts +7 -0
  66. package/dist/{types → api/types}/timelapse.d.ts +3 -4
  67. package/dist/{types → api/types}/user.d.ts +105 -35
  68. package/dist/api/types/videoWall.d.ts +66 -0
  69. package/dist/api/types/weather.d.ts +153 -0
  70. package/dist/{types → api/types}/widget.d.ts +96 -16
  71. package/dist/{types → api/types}/xweather.d.ts +4 -4
  72. package/dist/{utils.d.ts → api/utils.d.ts} +1 -0
  73. package/dist/index.d.ts +2 -3
  74. package/dist/index.js +1279 -864
  75. package/dist/index.js.map +1 -1
  76. package/dist/index.umd.cjs +1 -1
  77. package/dist/index.umd.cjs.map +1 -1
  78. package/dist/shared/api/index.d.ts +3 -0
  79. package/dist/shared/components/timelinePlayer/providers/index.d.ts +3 -0
  80. package/dist/shared/components/timelinePlayer/providers/timelineAnprProvider.d.ts +17 -0
  81. package/dist/shared/components/timelinePlayer/providers/timelineDataProvider.d.ts +13 -0
  82. package/dist/shared/components/timelinePlayer/providers/timelineLuminanceProvider.d.ts +16 -0
  83. package/dist/shared/types/components.d.ts +270 -0
  84. package/dist/shared/types/imagePlayer.d.ts +34 -0
  85. package/dist/shared/types/index.d.ts +4 -0
  86. package/dist/shared/types/timeline.d.ts +10 -0
  87. package/package.json +5 -4
  88. package/dist/api/3dFirebaseApi.d.ts +0 -10
  89. package/dist/api/authzApi.d.ts +0 -21
  90. package/dist/api/ingestApi.d.ts +0 -68
  91. package/dist/api/videoWallApi.d.ts +0 -9
  92. package/dist/types/360.d.ts +0 -87
  93. package/dist/types/aconex.d.ts +0 -45
  94. package/dist/types/automation.d.ts +0 -6
  95. package/dist/types/company.d.ts +0 -46
  96. package/dist/types/ingest.d.ts +0 -43
  97. package/dist/types/notification.d.ts +0 -27
  98. package/dist/types/project.d.ts +0 -127
  99. package/dist/types/shares.d.ts +0 -196
  100. package/dist/types/siteAnalytics.d.ts +0 -141
  101. package/dist/types/time.d.ts +0 -21
  102. package/dist/types/videoWall.d.ts +0 -33
  103. package/dist/types/weather.d.ts +0 -87
  104. /package/dist/api/{client → api/client}/customErrors.d.ts +0 -0
  105. /package/dist/api/{client → api/client}/index.d.ts +0 -0
  106. /package/dist/api/{exNvrApi.d.ts → api/exNvrApi.d.ts} +0 -0
  107. /package/dist/api/{webRtcApi.d.ts → api/webRtcApi.d.ts} +0 -0
  108. /package/dist/{types → api/types}/drone.d.ts +0 -0
  109. /package/dist/{types → api/types}/map.d.ts +0 -0
  110. /package/dist/{types → api/types}/nvr.d.ts +0 -0
  111. /package/dist/{types → api/types}/roi.d.ts +0 -0
  112. /package/dist/{types → api/types}/storageServers.d.ts +0 -0
  113. /package/dist/{types → api/types}/systemCheck.d.ts +0 -0
  114. /package/dist/{types → api/types}/vendorModel.d.ts +0 -0
  115. /package/dist/{types → api/types}/voyageControl.d.ts +0 -0
@@ -0,0 +1,297 @@
1
+ import { BBox, BoundingBox, DateType, Schedule, ScheduleLowercase, CameraExid, DetectionModel, PaginationParams, PpeLabel, ProjectExid, CameraDateRangeFilter, CameraFeatureFlag, TimelineDateInterval, Camera, AdminCamera, _360FloorV2, _360FloorId, PaginatedItems, DateRangeFilter } from "@evercam/api/types";
2
+ import { DetectionLabel, DownloadFileType } from "@evercam/api/types";
3
+ export declare enum SiteAnalyticsMode {
4
+ Detections = "detections",
5
+ Segments = "segments"
6
+ }
7
+ export type SmartSearchObjectPart = {
8
+ id?: string;
9
+ type: SmartSearchComponentType.Object;
10
+ value: DetectionLabel;
11
+ };
12
+ export type SmartSearchOperatorPart = {
13
+ id?: string;
14
+ type: SmartSearchComponentType.Operator;
15
+ value: SmartSearchOperatorType;
16
+ };
17
+ export type SmartSearchConditionPart = {
18
+ id?: string;
19
+ type: SmartSearchComponentType.Condition;
20
+ value: SmartSearchCondition | SmartSearchConditionData;
21
+ };
22
+ export type SmartSearchViewPart = {
23
+ id?: string;
24
+ type: SmartSearchComponentType.View;
25
+ value: SiteAnalyticsView;
26
+ };
27
+ export type SmartSearchAreaPart = {
28
+ id?: string;
29
+ type: SmartSearchComponentType.Area;
30
+ value: BBox;
31
+ };
32
+ export type SmartSearchTimePart = {
33
+ id?: string;
34
+ type: SmartSearchComponentType.Time;
35
+ value: Schedule | ScheduleLowercase;
36
+ };
37
+ export type SmartSearchDateRangePart = {
38
+ id?: string;
39
+ type: SmartSearchComponentType.DateRange;
40
+ value: DateRangeFilter;
41
+ };
42
+ export type SmartSearchPart = SmartSearchObjectPart | SmartSearchOperatorPart | SmartSearchConditionPart | SmartSearchViewPart | SmartSearchAreaPart | SmartSearchTimePart | SmartSearchDateRangePart;
43
+ export type SmartSearchPartOrGroup = SmartSearchPart | SmartSearchPart[];
44
+ export declare enum SmartSearchComponentType {
45
+ Condition = "condition",
46
+ Object = "object",
47
+ Area = "in_area",
48
+ Time = "time",
49
+ Operator = "operator",
50
+ View = "view",
51
+ DateRange = "date_range",
52
+ Heatmap = "heatmap"
53
+ }
54
+ export type SmartSearchPartType = SmartSearchComponentType | SmartSearchCondition;
55
+ export type SmartSearchComponentData = {
56
+ id: string;
57
+ type: SmartSearchComponentType;
58
+ parts: SmartSearchPartOrGroup[];
59
+ };
60
+ export declare enum SmartSearchCondition {
61
+ InArea = "in_area",
62
+ Intersects = "intersects",
63
+ Time = "time"
64
+ }
65
+ export type SmartSearchConditionData = {
66
+ condition: SmartSearchCondition;
67
+ value: string | BoundingBox | DetectionLabel | Date;
68
+ };
69
+ type SmartSearchBackendConditionBase = {
70
+ target: SmartSearchTargets;
71
+ };
72
+ export type SmartSearchSelectionCondition = SmartSearchBackendConditionBase & {
73
+ type: SmartSearchConditionTypes.Selection;
74
+ operator: SmartSearchOperators;
75
+ attribute: string;
76
+ value: string | number | string[];
77
+ };
78
+ export type SmartSearchSpatialCondition = SmartSearchBackendConditionBase & {
79
+ type: SmartSearchConditionTypes.Spatial;
80
+ operator: SmartSearchOperators;
81
+ reference: {
82
+ target: SmartSearchTargets;
83
+ attribute: string;
84
+ value: string | number | string[];
85
+ };
86
+ };
87
+ export type SmartSearchAreaCondition = SmartSearchBackendConditionBase & {
88
+ type: SmartSearchConditionTypes.Area;
89
+ operator: SmartSearchOperators;
90
+ polygon: BBox;
91
+ };
92
+ export type SmartSearchGeoAreaCondition = SmartSearchBackendConditionBase & {
93
+ type: SmartSearchConditionTypes.GeoArea;
94
+ operator: SmartSearchOperators;
95
+ polygon: BBox;
96
+ };
97
+ export type SmartSearchBackendQueryCondition = SmartSearchSelectionCondition | SmartSearchSpatialCondition | SmartSearchAreaCondition | SmartSearchGeoAreaCondition;
98
+ export type SmartSearchBackendQuery = {
99
+ returnTargets: SmartSearchTargets[];
100
+ rulesLogic: SmartSearchOperatorType;
101
+ rules: {
102
+ logic: SmartSearchOperatorType;
103
+ conditions: SmartSearchBackendQueryCondition[];
104
+ }[];
105
+ returnType: SmartSearchReturnType;
106
+ };
107
+ export declare enum SmartSearchTargets {
108
+ Tracking = "tracking",
109
+ Segments = "segments"
110
+ }
111
+ export declare enum SmartSearchReturnType {
112
+ All = "all",
113
+ FirstLastSeen = "first_last_seen"
114
+ }
115
+ export declare enum SmartSearchOperatorType {
116
+ And = "AND",
117
+ Or = "OR"
118
+ }
119
+ export declare enum SmartSearchOperators {
120
+ Near = "near",
121
+ Far = "far",
122
+ Intersects = "intersects",
123
+ DoesNotIntersect = "does_not_intersect",
124
+ Inside = "inside",
125
+ Outside = "outside",
126
+ DistanceBelow = "distance_below",
127
+ DistanceAbove = "distance_above",
128
+ Area = "in_area",
129
+ Equal = "="
130
+ }
131
+ export declare enum SmartSearchConditionTypes {
132
+ Selection = "selection",
133
+ Spatial = "spatial",
134
+ Area = "area",
135
+ GeoArea = "in_geo_area",
136
+ Iou = "iou",
137
+ Near = "near",
138
+ Far = "far"
139
+ }
140
+ export type SmartSearchOptionValue = DetectionLabel | SmartSearchOperatorType | SmartSearchConditionData | DateRangeFilter | SiteAnalyticsView;
141
+ export type SmartSearchBackendQueryPayload = {
142
+ cameraExid: string;
143
+ name: string;
144
+ description: string;
145
+ query: {
146
+ req: SmartSearchBackendQuery;
147
+ timeSchedule?: Schedule | undefined;
148
+ };
149
+ fromDate?: DateType;
150
+ toDate?: DateType;
151
+ author: string;
152
+ createdAt: DateType;
153
+ params?: {
154
+ start: string;
155
+ end: string;
156
+ };
157
+ };
158
+ export type SavedQuery = {
159
+ description: string;
160
+ id: number;
161
+ query: {
162
+ req: SmartSearchBackendQuery;
163
+ timeSchedule?: Schedule | undefined;
164
+ };
165
+ params: Record<string, string>;
166
+ components?: Omit<SmartSearchPart, "id">[];
167
+ toDate?: DateType;
168
+ createdAt?: DateType;
169
+ cameraExid: string;
170
+ name: string;
171
+ fromDate?: DateType;
172
+ author?: string;
173
+ };
174
+ export type DetectionsRequestParams = {
175
+ projectExid: ProjectExid;
176
+ cameraExids: CameraExid[];
177
+ fromDate?: string;
178
+ toDate?: string;
179
+ labels?: Array<DetectionLabel | PpeLabel>;
180
+ modelId?: DetectionModel;
181
+ trackId?: number;
182
+ thresholds?: string[];
183
+ excludeLabels?: Array<DetectionLabel | PpeLabel>;
184
+ mergedClasses?: Array<string>;
185
+ confidenceThreshold?: number;
186
+ } & PaginationParams;
187
+ export type DetectionsExportRequestParams = DetectionsRequestParams & {
188
+ fileType: DownloadFileType;
189
+ columns?: string[];
190
+ directDownload?: boolean;
191
+ };
192
+ export type SmartSearchHeatmapPoint = {
193
+ coordinates: [number, number];
194
+ detectionsCount: number;
195
+ };
196
+ export type SmartSearchHeatmapData = {
197
+ label: string;
198
+ points: SmartSearchHeatmapPoint[];
199
+ };
200
+ export type SmartSearchNearConfig = {
201
+ sourceLabels: DetectionLabel[];
202
+ targetLabel?: DetectionLabel;
203
+ };
204
+ export type HeatmapIntersectionsRequestParams = CameraDateRangeFilter & SmartSearchNearConfig;
205
+ export type SmartSearchSidebarItem = {
206
+ key: string;
207
+ displayLabel: string;
208
+ data: SmartSearchHeatmapData;
209
+ imagePath?: string;
210
+ };
211
+ export declare enum SiteAnalyticsViewType {
212
+ Camera = "camera",
213
+ ThreeSixty = "360"
214
+ }
215
+ export type SiteAnalyticsCameraView = {
216
+ type: SiteAnalyticsViewType.Camera;
217
+ id: CameraExid;
218
+ value: Camera | AdminCamera;
219
+ };
220
+ export type SiteAnalytics360View = {
221
+ type: SiteAnalyticsViewType.ThreeSixty;
222
+ id: _360FloorId;
223
+ value: _360FloorV2;
224
+ };
225
+ export type SiteAnalyticsView = SiteAnalyticsCameraView | SiteAnalytics360View;
226
+ export type SiteAnalyticsProcessingStatusPayload = {
227
+ projectExid?: ProjectExid;
228
+ fromDate?: DateType;
229
+ toDate?: DateType;
230
+ cameraExid?: CameraExid;
231
+ drawingId?: string;
232
+ features?: CameraFeatureFlag[];
233
+ };
234
+ export type SiteAnalyticsProcessingStatus = {
235
+ projectExid: ProjectExid;
236
+ viewType: SiteAnalyticsViewType;
237
+ viewId: string;
238
+ feature: CameraFeatureFlag;
239
+ processedIntervals: TimelineDateInterval[];
240
+ };
241
+ export type SmartSearchRequestPayload = {
242
+ cameraExids?: CameraExid[];
243
+ drawingIds?: _360FloorId[];
244
+ walkIds?: string[];
245
+ markerIds?: string[];
246
+ payload: SmartSearchBackendQuery;
247
+ fromDate?: string;
248
+ toDate?: string;
249
+ page?: number;
250
+ pageSize?: number;
251
+ threshold?: number;
252
+ };
253
+ type SmartSearchResultItemBase = {
254
+ area: number;
255
+ bbox: BBox;
256
+ cameraExid?: CameraExid;
257
+ centroid: number[];
258
+ confidenceScore: number;
259
+ drawingId?: _360FloorId;
260
+ label: DetectionLabel;
261
+ modelId: DetectionModel;
262
+ projectExid: ProjectExid;
263
+ segmentId?: number;
264
+ trackId: number;
265
+ walkId?: string | number;
266
+ };
267
+ export type SmartSearchResultItemFirstLastSeen = SmartSearchResultItemBase & {
268
+ firstSeen: DateType;
269
+ firstSeenMarkerId?: string | number;
270
+ lastSeen: DateType;
271
+ lastSeenMarkerId?: string | number;
272
+ };
273
+ export type SmartSearchResultItemAll = SmartSearchResultItemBase & {
274
+ walkId?: string | number;
275
+ markerId?: string | number;
276
+ geolocation?: number[];
277
+ mask?: number[][];
278
+ timestamp: DateType;
279
+ };
280
+ type SmartSearchResultItemByType = {
281
+ [SmartSearchReturnType.FirstLastSeen]: SmartSearchResultItemFirstLastSeen;
282
+ [SmartSearchReturnType.All]: SmartSearchResultItemAll;
283
+ };
284
+ export type SmartSearchResponse<R extends SmartSearchReturnType = SmartSearchReturnType.FirstLastSeen> = {
285
+ data: PaginatedItems<SmartSearchResultItemByType[R]>;
286
+ message?: string;
287
+ success: boolean;
288
+ };
289
+ export type SmartSearchMinifiedPart = {
290
+ t: SmartSearchComponentType;
291
+ v: unknown;
292
+ };
293
+ export type SmartSearchMinifiedComponent = {
294
+ t: SmartSearchComponentType;
295
+ p: SmartSearchMinifiedPart[];
296
+ };
297
+ export {};
@@ -1,4 +1,4 @@
1
- import { CameraExid, DateType, PaginationParams, Schedule } from "@/types";
1
+ import { CameraExid, DateType, PaginationParams, Schedule } from "@evercam/api/types";
2
2
  export type SnapshotExtractionQyeryParams = PaginationParams & {
3
3
  camera: string;
4
4
  cameraExid: CameraExid;
@@ -48,3 +48,12 @@ export type DeleteSnapshotQueryParams = {
48
48
  adminEmail: string;
49
49
  adminFullname: string;
50
50
  };
51
+ export type TransferCloudRecordingsQueryParams = {
52
+ targetCameraExid: CameraExid;
53
+ fromDate: DateType;
54
+ toDate: DateType;
55
+ overwriteExistingSnapshots?: boolean;
56
+ keepSourceSnapshots?: boolean;
57
+ adminEmail?: string;
58
+ adminFullname?: string;
59
+ };
@@ -0,0 +1,55 @@
1
+ export type SsoProvider = {
2
+ id: number;
3
+ name: string;
4
+ exid: string;
5
+ clientId: string;
6
+ clientSecret: string;
7
+ scope: string;
8
+ responseType: string;
9
+ loginUrl: string;
10
+ iconUrl: string;
11
+ options: {
12
+ showOnLogin: boolean;
13
+ showOnSignup: boolean;
14
+ };
15
+ tokenUri: string;
16
+ tokenIntrospectionUri: string;
17
+ userInfoUri: string;
18
+ enabled: boolean;
19
+ };
20
+ export type SsoUpdatePayload = {
21
+ name: string;
22
+ exid: string;
23
+ clientId: string;
24
+ clientSecret: string;
25
+ scope: string;
26
+ responseType: string;
27
+ loginUrl: string;
28
+ iconUrl: string;
29
+ options: {
30
+ showOnLogin: boolean;
31
+ showOnSignup: boolean;
32
+ };
33
+ tokenUri: string;
34
+ tokenIntrospectionUri: string;
35
+ userInfoUri: string;
36
+ enabled: boolean;
37
+ };
38
+ export type SsoCreatePayload = {
39
+ name: string;
40
+ exid: string;
41
+ clientId: string;
42
+ clientSecret: string;
43
+ scope: string;
44
+ responseType: string;
45
+ loginUrl: string;
46
+ iconUrl: string;
47
+ options: {
48
+ showOnLogin: boolean;
49
+ showOnSignup: boolean;
50
+ };
51
+ tokenUri: string;
52
+ tokenIntrospectionUri: string;
53
+ userInfoUri: string;
54
+ enabled: boolean;
55
+ };
@@ -0,0 +1,40 @@
1
+ import type { JsonObject, JsonValue } from "@evercam/api/types";
2
+ export type StoryblokAsset = {
3
+ id: number | null;
4
+ alt: string | null;
5
+ name: string;
6
+ focus: string | null;
7
+ title: string | null;
8
+ filename: string;
9
+ copyright: string | null;
10
+ fieldtype: "asset";
11
+ source?: string;
12
+ metaData?: JsonObject;
13
+ isExternalUrl?: boolean;
14
+ };
15
+ export type StoryblokStory<TContent extends JsonObject = JsonObject> = {
16
+ id: number;
17
+ uuid: string;
18
+ name: string;
19
+ slug: string;
20
+ fullSlug: string;
21
+ content: TContent;
22
+ createdAt: string;
23
+ publishedAt: string | null;
24
+ updatedAt: string;
25
+ position: number;
26
+ tagList: string[];
27
+ isStartpage: boolean;
28
+ parentId: number | null;
29
+ groupId: string;
30
+ firstPublishedAt: string | null;
31
+ releaseId: number | null;
32
+ lang: string;
33
+ path: string;
34
+ };
35
+ export type StoryblokResponse<TContent extends JsonObject = JsonObject> = {
36
+ story: StoryblokStory<TContent>;
37
+ cv: number;
38
+ rels: JsonValue[];
39
+ links: JsonValue[];
40
+ };
@@ -1,11 +1,11 @@
1
- import { DateTime_Z_micros, KitMetricData } from "@/types";
1
+ import { KitMetricData } from "@evercam/api/types";
2
2
  export type ExNvrLoginResponse = {
3
3
  accessToken: string;
4
4
  };
5
5
  export type ExNvrRecordingInterval = {
6
6
  active: boolean;
7
- startDate: DateTime_Z_micros;
8
- endDate: DateTime_Z_micros;
7
+ startDate: string;
8
+ endDate: string;
9
9
  };
10
10
  export type ExNvrDeviceConfig = {
11
11
  id: string;
@@ -39,8 +39,7 @@ export type ExNvrDeviceConfig = {
39
39
  timezone: string;
40
40
  };
41
41
  export declare enum ExNvrFootageAvailableStatus {
42
- Active = "Active",
43
- NotActive = "Not Active",
42
+ Available = "Available",
44
43
  NotAvailable = "Not Available"
45
44
  }
46
45
  export declare enum ExNvrDeviceState {
@@ -1,4 +1,4 @@
1
- import { Kit } from "@/types/kit";
1
+ import { Kit } from "@evercam/api/types/kit";
2
2
  export type Tag<T = string> = {
3
3
  id?: number;
4
4
  name: T;
@@ -0,0 +1,7 @@
1
+ import { Moment } from "moment-timezone";
2
+ export type DateType = Date | string | number;
3
+ export type ExtendedDateType = Moment | DateType;
4
+ export type DateRangeFilter = {
5
+ fromDate: DateType;
6
+ toDate: DateType;
7
+ };
@@ -1,4 +1,4 @@
1
- import { DateType, Schedule } from "@/types";
1
+ import { DateType, Schedule } from "@evercam/api/types";
2
2
  export declare enum TimelapseStatus {
3
3
  Pending = 11,
4
4
  Completed = 5,
@@ -24,13 +24,12 @@ export type TimestampPositionCoordinates = {
24
24
  h: number;
25
25
  };
26
26
  export type TimelapseLogoOptions = {
27
- id: number;
27
+ id?: number;
28
28
  x: number;
29
29
  y: number;
30
30
  width: number;
31
31
  height: number;
32
32
  };
33
- export type TimelapseSchedules = string | Schedule;
34
33
  export declare enum TimelapseScheduleType {
35
34
  Continuous = "continuous",
36
35
  WorkingHours = "workingHours",
@@ -56,7 +55,7 @@ export type TimelapseFilterQueryParams = {
56
55
  to?: DateType;
57
56
  period?: TimelapsePeriod;
58
57
  duration?: number;
59
- schedule?: TimelapseSchedules;
58
+ schedule?: Schedule;
60
59
  };
61
60
  export type TimelapseCreationRequestPayload = {
62
61
  title: string;
@@ -1,4 +1,5 @@
1
- import type { DateTime, PaginationParams } from "@/types";
1
+ import type { CameraExid, PaginationParams } from "@evercam/api/types";
2
+ import { Role, RoleSubRole } from "@evercam/api/types/authz";
2
3
  export type User = {
3
4
  id?: number;
4
5
  fullname?: string;
@@ -9,10 +10,16 @@ export type User = {
9
10
  country: string;
10
11
  isAdmin: boolean;
11
12
  persona: Persona;
12
- companyId?: string;
13
+ companyId?: string | number;
13
14
  companyName?: string;
14
15
  companyExid?: string;
15
16
  features?: Array<UserFeatureFlag>;
17
+ confirmedAt?: string;
18
+ createdAt?: string;
19
+ lastLoginAt?: string;
20
+ token?: string;
21
+ updatedAt?: string;
22
+ evercamAccount?: boolean;
16
23
  };
17
24
  export type AdminUser = {
18
25
  id: number;
@@ -32,14 +39,9 @@ export type AdminUser = {
32
39
  camerasOwned: number;
33
40
  countryId: number;
34
41
  countryName: string;
35
- createdAt: DateTime;
42
+ createdAt: string;
36
43
  integrations: string[];
37
- lastEventBrowser: string;
38
- lastEvenCreatedAt: DateTime;
39
- lastEventId: number;
40
- lastEventIpAddress: string;
41
- lastEventName: string;
42
- lastEventOs: string;
44
+ lastSeenAt: string;
43
45
  lastLoginAt: string;
44
46
  lastname: string;
45
47
  persona: string;
@@ -64,6 +66,10 @@ export type ProjectUser = User & {
64
66
  cameraExid: string;
65
67
  cameraRights: string;
66
68
  };
69
+ export declare enum ContactRole {
70
+ SalesExecutive = "Sales Executive",
71
+ CustomerSuccessManager = "Customer Success Manager"
72
+ }
67
73
  export declare enum Persona {
68
74
  HQ = "HQ",
69
75
  PM = "PM",
@@ -90,26 +96,44 @@ export type RemotePasswordUpdateRequestPayload = {
90
96
  currentPassword: string;
91
97
  newPassword: string;
92
98
  };
93
- export type LoginResponsePayload = {
94
- confirmedAt?: string;
95
- country?: string;
96
- createdAt?: string;
97
- email?: string;
98
- firstname?: string;
99
- id?: string;
100
- isAdmin?: boolean;
101
- lastLoginAt?: string;
102
- lastname?: string;
103
- persona?: Persona;
104
- telephone?: string;
105
- token?: string;
106
- updatedAt?: string;
107
- evercamAccount?: string;
99
+ export type AuthPasswordOption = {
100
+ type: "password";
101
+ };
102
+ export type AuthSsoOption = {
103
+ type: "sso";
104
+ name: string;
105
+ scope: string;
106
+ prompt: string | null;
107
+ exid: string;
108
+ clientId: string;
109
+ iconUrl: string;
110
+ loginUrl: string;
111
+ responseType: string;
112
+ };
113
+ export type AuthOption = AuthPasswordOption | AuthSsoOption;
114
+ export type AuthOptionsResponsePayload = {
115
+ options: AuthOption[];
116
+ };
117
+ export type AuthProviderConfigPayload = {
118
+ name: string;
119
+ scope: string;
120
+ prompt: string | null;
121
+ exid: string;
122
+ clientId: string;
123
+ iconUrl: string;
124
+ loginUrl: string;
125
+ responseType: string;
108
126
  };
109
127
  export type LogoutParams = {
110
128
  token: string;
111
129
  fromAdmin?: boolean;
112
130
  };
131
+ export type ConfirmUserRequestPayload = {
132
+ c: string;
133
+ };
134
+ export type DeleteActiveSessionRequestPayload = {
135
+ authorization: string;
136
+ };
113
137
  export type UserSession = {
114
138
  browser: string;
115
139
  createdAt: string;
@@ -178,6 +202,16 @@ export type GoogleAuthRequestPayload = {
178
202
  code: string;
179
203
  redirectUri: string;
180
204
  };
205
+ export type ProjectContact = {
206
+ name: string;
207
+ role: ContactRole | string;
208
+ email?: string;
209
+ phone?: string;
210
+ photo?: string;
211
+ };
212
+ export type ProjectContactsResponsePayload = {
213
+ data: ProjectContact[];
214
+ };
181
215
  export type UserStatsResponse = {
182
216
  data: {
183
217
  userStats: AdminUser;
@@ -198,7 +232,7 @@ export type UserProject = {
198
232
  id: number;
199
233
  exid: string;
200
234
  name: string;
201
- startedAt: DateTime;
235
+ startedAt: string;
202
236
  };
203
237
  export type UserProjectResponse = {
204
238
  data: UserProject[];
@@ -218,9 +252,9 @@ export type Admin = {
218
252
  id: number;
219
253
  fullname: string;
220
254
  email: string;
221
- createdAt: DateTime;
222
- updatedAt: DateTime;
223
- lastSignInAt: DateTime;
255
+ createdAt: string;
256
+ updatedAt: string;
257
+ lastSignInAt: string;
224
258
  signInCount: number;
225
259
  lastSignInIp: string;
226
260
  apiId: string;
@@ -232,17 +266,17 @@ export type ImpersonateUserResponse = {
232
266
  lastname: string;
233
267
  telephone: string;
234
268
  email: string;
235
- is_admin: boolean;
269
+ isAdmin: boolean;
236
270
  persona: Persona;
237
271
  country: string;
238
272
  companyId: number;
239
273
  companyExid: string;
240
274
  companyName: string;
241
275
  evercamAccount: boolean;
242
- createdAt: DateTime;
243
- updatedAt: DateTime;
244
- confirmedAt: DateTime;
245
- last_loginAt: DateTime;
276
+ createdAt: string;
277
+ updatedAt: string;
278
+ confirmedAt: string;
279
+ lastLoginAt: string;
246
280
  features: UserFeatureFlag[];
247
281
  token: string;
248
282
  };
@@ -271,6 +305,42 @@ export type Suppression = {
271
305
  id: number;
272
306
  email: string;
273
307
  source: string;
274
- insertedAt: DateTime;
275
- updatedAt: DateTime;
308
+ insertedAt: string;
309
+ updatedAt: string;
310
+ };
311
+ type Email = string;
312
+ export type WsAccessRestrictionUpdate = {
313
+ camera_id: CameraExid;
314
+ is_access_restricted: boolean;
315
+ };
316
+ export type WsUserRestrictionItem = {
317
+ user_id: number;
318
+ camera_id: CameraExid;
319
+ is_user_access_restricted: boolean;
320
+ };
321
+ export type WsUserRestrictionUpdate = WsUserRestrictionItem[];
322
+ /**
323
+ * Backend WebSocket event payload:
324
+ * {
325
+ * user: {
326
+ * "someone@domain.com": {camera_id, is_access_restricted} OR [{...}, {...}]
327
+ * }
328
+ * }
329
+ */
330
+ export type WsRestrictionChangedPayload = {
331
+ user: Record<Email, WsAccessRestrictionUpdate | WsUserRestrictionUpdate>;
332
+ };
333
+ export type ProjectUserWithRole = {
334
+ id: number;
335
+ email: string;
336
+ fullname: string;
337
+ company: {
338
+ id: number;
339
+ name: string;
340
+ exid: string;
341
+ };
342
+ permissions: string[];
343
+ role: Role;
344
+ subRoles: RoleSubRole[];
276
345
  };
346
+ export {};