@evercam/api 1.0.0-51caa5700 → 1.0.0-557e15bf7

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 (70) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +5 -1
  2. package/dist/api/api/adminApi.d.ts +49 -57
  3. package/dist/api/api/aiApi.d.ts +56 -84
  4. package/dist/api/api/authzApi.d.ts +27 -17
  5. package/dist/api/api/client/axios.d.ts +2 -1
  6. package/dist/api/api/client/swr/Swr.d.ts +1 -1
  7. package/dist/api/api/evercamApi.d.ts +67 -93
  8. package/dist/api/api/evercamLabsApi.d.ts +4 -2
  9. package/dist/api/api/exNvrApi.d.ts +1 -1
  10. package/dist/api/api/ingestApi.d.ts +96 -44
  11. package/dist/api/api/ptzApi.d.ts +12 -3
  12. package/dist/api/api/videoWallApi.d.ts +2 -2
  13. package/dist/api/api/weatherApi.d.ts +2 -2
  14. package/dist/api/types/360.d.ts +134 -5
  15. package/dist/api/types/aconex.d.ts +9 -9
  16. package/dist/api/types/admin.d.ts +51 -0
  17. package/dist/api/types/analytics.d.ts +77 -46
  18. package/dist/api/types/anpr.d.ts +19 -2
  19. package/dist/api/types/auditLogs.d.ts +1 -1
  20. package/dist/api/types/authz.d.ts +44 -6
  21. package/dist/api/types/autodesk.d.ts +7 -7
  22. package/dist/api/types/automation.d.ts +37 -3
  23. package/dist/api/types/axios.d.ts +10 -4
  24. package/dist/api/types/bim.d.ts +11 -5
  25. package/dist/api/types/camera.d.ts +80 -72
  26. package/dist/api/types/comments.d.ts +4 -8
  27. package/dist/api/types/company.d.ts +42 -1
  28. package/dist/api/types/compare.d.ts +20 -5
  29. package/dist/api/types/connector.d.ts +2 -5
  30. package/dist/api/types/coolify.d.ts +18 -2
  31. package/dist/api/types/copilot.d.ts +11 -6
  32. package/dist/api/types/detections.d.ts +17 -8
  33. package/dist/api/types/gateReport.d.ts +46 -150
  34. package/dist/api/types/hdd.d.ts +26 -1
  35. package/dist/api/types/index.d.ts +3 -0
  36. package/dist/api/types/ingest.d.ts +85 -2
  37. package/dist/api/types/kit.d.ts +31 -5
  38. package/dist/api/types/media.d.ts +2 -1
  39. package/dist/api/types/notification.d.ts +32 -2
  40. package/dist/api/types/posthog.d.ts +15 -0
  41. package/dist/api/types/procore.d.ts +13 -6
  42. package/dist/api/types/progressPhoto.d.ts +6 -2
  43. package/dist/api/types/project.d.ts +95 -21
  44. package/dist/api/types/recording.d.ts +2 -3
  45. package/dist/api/types/recycleBin.d.ts +1 -1
  46. package/dist/api/types/router.d.ts +20 -1
  47. package/dist/api/types/shared.d.ts +11 -4
  48. package/dist/api/types/shares.d.ts +6 -144
  49. package/dist/api/types/sim.d.ts +6 -6
  50. package/dist/api/types/siteAnalytics.d.ts +170 -46
  51. package/dist/api/types/smartSeach.d.ts +5 -0
  52. package/dist/api/types/snapshots.d.ts +1 -1
  53. package/dist/api/types/storyblok.d.ts +40 -0
  54. package/dist/api/types/streaming.d.ts +3 -3
  55. package/dist/api/types/tag.d.ts +1 -1
  56. package/dist/api/types/time.d.ts +0 -18
  57. package/dist/api/types/timelapse.d.ts +3 -4
  58. package/dist/api/types/user.d.ts +101 -30
  59. package/dist/api/types/videoWall.d.ts +21 -21
  60. package/dist/api/types/weather.d.ts +75 -11
  61. package/dist/api/types/widget.d.ts +71 -12
  62. package/dist/api/types/xweather.d.ts +4 -4
  63. package/dist/index.js +722 -763
  64. package/dist/index.js.map +1 -1
  65. package/dist/index.umd.cjs +1 -1
  66. package/dist/index.umd.cjs.map +1 -1
  67. package/dist/shared/types/components.d.ts +80 -9
  68. package/dist/shared/types/imagePlayer.d.ts +1 -1
  69. package/dist/shared/types/timeline.d.ts +2 -1
  70. package/package.json +2 -2
@@ -1,34 +1,61 @@
1
- import type { BBox, BoundingBox, DateType, Schedule, CameraExid, DateTime, DetectionModel, PaginationParams, PpeLabel, ProjectExid, CameraDateRangeFilter } from "@evercam/api/types";
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
2
  import { DetectionLabel, DownloadFileType } from "@evercam/api/types";
3
3
  export declare enum SiteAnalyticsMode {
4
4
  Detections = "detections",
5
5
  Segments = "segments"
6
6
  }
7
- export type SmartSearchQueryPartData = {
7
+ export type SmartSearchObjectPart = {
8
8
  id?: string;
9
- type: SmartSearchQueryPartType;
10
- value: DetectionLabel | SmartSearchOperatorType | SmartSearchConditionData | SmartSearchCondition | SmartSearchDateRange | string;
9
+ type: SmartSearchComponentType.Object;
10
+ value: DetectionLabel;
11
11
  };
12
- export type SmartSearchQueryPart = SmartSearchQueryPartData | SmartSearchQueryPartData[];
13
- export declare enum SmartSearchQueryComponentType {
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 {
14
45
  Condition = "condition",
15
46
  Object = "object",
16
47
  Area = "in_area",
17
48
  Time = "time",
18
49
  Operator = "operator",
19
- Camera = "camera",
50
+ View = "view",
20
51
  DateRange = "date_range",
21
52
  Heatmap = "heatmap"
22
53
  }
23
- export type SmartSearchQueryPartType = SmartSearchQueryComponentType | SmartSearchCondition;
24
- export type SmartSearchDateRange = {
25
- start: DateType;
26
- end: DateType;
27
- };
28
- export type SmartSearchQueryComponentData = {
54
+ export type SmartSearchPartType = SmartSearchComponentType | SmartSearchCondition;
55
+ export type SmartSearchComponentData = {
29
56
  id: string;
30
- type: SmartSearchQueryComponentType;
31
- parts: SmartSearchQueryPart;
57
+ type: SmartSearchComponentType;
58
+ parts: SmartSearchPartOrGroup[];
32
59
  };
33
60
  export declare enum SmartSearchCondition {
34
61
  InArea = "in_area",
@@ -39,33 +66,50 @@ export type SmartSearchConditionData = {
39
66
  condition: SmartSearchCondition;
40
67
  value: string | BoundingBox | DetectionLabel | Date;
41
68
  };
42
- export type SmartSearchQueryCondition = {
43
- type: SmartSearchQueryConditionTypes;
44
- target: SmartSearchQueryTargets;
45
- operator?: SmartSearchQueryOperators;
46
- attribute?: string;
69
+ type SmartSearchBackendConditionBase = {
70
+ target: SmartSearchTargets;
71
+ };
72
+ export type SmartSearchSelectionCondition = SmartSearchBackendConditionBase & {
73
+ type: SmartSearchConditionTypes.Selection;
74
+ operator: SmartSearchOperators;
75
+ attribute: string;
47
76
  value: string | number | string[];
48
- reference?: {
49
- target: SmartSearchQueryTargets;
77
+ };
78
+ export type SmartSearchSpatialCondition = SmartSearchBackendConditionBase & {
79
+ type: SmartSearchConditionTypes.Spatial;
80
+ operator: SmartSearchOperators;
81
+ reference: {
82
+ target: SmartSearchTargets;
50
83
  attribute: string;
51
84
  value: string | number | string[];
52
85
  };
53
- polygon?: BBox;
54
86
  };
55
- export type SmartSearchQuery = {
56
- returnTargets: SmartSearchQueryTargets[];
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[];
57
100
  rulesLogic: SmartSearchOperatorType;
58
101
  rules: {
59
102
  logic: SmartSearchOperatorType;
60
- conditions: SmartSearchQueryCondition[];
103
+ conditions: SmartSearchBackendQueryCondition[];
61
104
  }[];
62
- returnType: SmartSearchQueryReturnType;
105
+ returnType: SmartSearchReturnType;
106
+ timeSchedule?: Schedule;
63
107
  };
64
- export declare enum SmartSearchQueryTargets {
108
+ export declare enum SmartSearchTargets {
65
109
  Tracking = "tracking",
66
110
  Segments = "segments"
67
111
  }
68
- export declare enum SmartSearchQueryReturnType {
112
+ export declare enum SmartSearchReturnType {
69
113
  All = "all",
70
114
  FirstLastSeen = "first_last_seen"
71
115
  }
@@ -73,7 +117,7 @@ export declare enum SmartSearchOperatorType {
73
117
  And = "AND",
74
118
  Or = "OR"
75
119
  }
76
- export declare enum SmartSearchQueryOperators {
120
+ export declare enum SmartSearchOperators {
77
121
  Near = "near",
78
122
  Far = "far",
79
123
  Intersects = "intersects",
@@ -85,38 +129,35 @@ export declare enum SmartSearchQueryOperators {
85
129
  Area = "in_area",
86
130
  Equal = "="
87
131
  }
88
- export declare enum SmartSearchQueryConditionTypes {
132
+ export declare enum SmartSearchConditionTypes {
89
133
  Selection = "selection",
90
134
  Spatial = "spatial",
91
135
  Area = "area",
136
+ GeoArea = "in_geo_area",
92
137
  Iou = "iou",
93
138
  Near = "near",
94
139
  Far = "far"
95
140
  }
96
- export type SmartSearchOptionValue = DetectionLabel | SmartSearchOperatorType | SmartSearchConditionData;
97
- export type SmartSearchQueryParams = {
98
- cameraExid: string;
141
+ export type SmartSearchOptionValue = DetectionLabel | SmartSearchOperatorType | SmartSearchConditionData | DateRangeFilter | SiteAnalyticsView;
142
+ export type SmartSearchBackendQueryPayload = {
99
143
  name: string;
100
144
  description: string;
101
- query: {
102
- req: SmartSearchQuery;
103
- timeSchedule?: Schedule | undefined;
104
- };
145
+ query: SmartSearchBackendQuery;
105
146
  fromDate?: DateType;
106
147
  toDate?: DateType;
107
148
  author: string;
108
149
  createdAt: DateType;
109
- params?: Record<string, unknown>;
150
+ params?: {
151
+ start: string;
152
+ end: string;
153
+ };
110
154
  };
111
155
  export type SavedQuery = {
112
156
  description: string;
113
157
  id: number;
114
- query: {
115
- req: SmartSearchQuery;
116
- timeSchedule?: Schedule | undefined;
117
- };
158
+ query: SmartSearchBackendQuery;
118
159
  params: Record<string, string>;
119
- components?: Omit<SmartSearchQueryPartData, "id">[];
160
+ components?: Omit<SmartSearchPart, "id">[];
120
161
  toDate?: DateType;
121
162
  createdAt?: DateType;
122
163
  cameraExid: string;
@@ -127,8 +168,8 @@ export type SavedQuery = {
127
168
  export type DetectionsRequestParams = {
128
169
  projectExid: ProjectExid;
129
170
  cameraExids: CameraExid[];
130
- fromDate?: DateTime;
131
- toDate?: DateTime;
171
+ fromDate?: string;
172
+ toDate?: string;
132
173
  labels?: Array<DetectionLabel | PpeLabel>;
133
174
  modelId?: DetectionModel;
134
175
  trackId?: number;
@@ -161,3 +202,86 @@ export type SmartSearchSidebarItem = {
161
202
  data: SmartSearchHeatmapData;
162
203
  imagePath?: string;
163
204
  };
205
+ export declare enum SiteAnalyticsViewType {
206
+ Camera = "camera",
207
+ ThreeSixty = "360"
208
+ }
209
+ export type SiteAnalyticsCameraView = {
210
+ type: SiteAnalyticsViewType.Camera;
211
+ id: CameraExid;
212
+ value: Camera | AdminCamera;
213
+ };
214
+ export type SiteAnalytics360View = {
215
+ type: SiteAnalyticsViewType.ThreeSixty;
216
+ id: _360FloorId;
217
+ value: _360FloorV2;
218
+ };
219
+ export type SiteAnalyticsView = SiteAnalyticsCameraView | SiteAnalytics360View;
220
+ export type SiteAnalyticsProcessingStatusPayload = {
221
+ projectExid?: ProjectExid;
222
+ fromDate?: DateType;
223
+ toDate?: DateType;
224
+ cameraExid?: CameraExid;
225
+ drawingId?: string;
226
+ features?: CameraFeatureFlag[];
227
+ };
228
+ export type SiteAnalyticsProcessingStatus = {
229
+ projectExid: ProjectExid;
230
+ viewType: SiteAnalyticsViewType;
231
+ viewId: string;
232
+ feature: CameraFeatureFlag;
233
+ processedIntervals: TimelineDateInterval[];
234
+ };
235
+ export type SmartSearchRequestPayload = {
236
+ cameraExids?: CameraExid[];
237
+ drawingIds?: _360FloorId[];
238
+ walkIds?: string[];
239
+ markerIds?: string[];
240
+ payload: SmartSearchBackendQuery;
241
+ fromDate?: string;
242
+ toDate?: string;
243
+ page?: number;
244
+ pageSize?: number;
245
+ threshold?: number;
246
+ };
247
+ type SmartSearchResultItemBase = {
248
+ area: number;
249
+ bbox: BBox;
250
+ cameraExid?: CameraExid;
251
+ centroid: number[];
252
+ confidenceScore: number;
253
+ drawingId?: _360FloorId;
254
+ label: DetectionLabel;
255
+ modelId: DetectionModel;
256
+ projectExid: ProjectExid;
257
+ segmentId?: number;
258
+ trackId: number;
259
+ walkId?: string | number;
260
+ };
261
+ export type SmartSearchResultItemFirstLastSeen = SmartSearchResultItemBase & {
262
+ firstSeen: DateType;
263
+ firstSeenMarkerId?: string | number;
264
+ lastSeen: DateType;
265
+ lastSeenMarkerId?: string | number;
266
+ };
267
+ export type SmartSearchResultItemAll = SmartSearchResultItemBase & {
268
+ walkId?: string | number;
269
+ markerId?: string | number;
270
+ geolocation?: number[];
271
+ mask?: number[][];
272
+ timestamp: DateType;
273
+ };
274
+ type SmartSearchResultItemByType = {
275
+ [SmartSearchReturnType.FirstLastSeen]: SmartSearchResultItemFirstLastSeen;
276
+ [SmartSearchReturnType.All]: SmartSearchResultItemAll;
277
+ };
278
+ export type SmartSearchResponse<R extends SmartSearchReturnType = SmartSearchReturnType.FirstLastSeen> = PaginatedItems<SmartSearchResultItemByType[R]>;
279
+ export type SmartSearchMinifiedPart = {
280
+ t: SmartSearchComponentType;
281
+ v: unknown;
282
+ };
283
+ export type SmartSearchMinifiedComponent = {
284
+ t: SmartSearchComponentType;
285
+ p: SmartSearchMinifiedPart[];
286
+ };
287
+ export {};
@@ -0,0 +1,5 @@
1
+ import { CameraExid } from "@evercam/api/types";
2
+ export type SmartSearchQueriesRequestPayload = {
3
+ camerasExid: CameraExid[];
4
+ name?: string;
5
+ };
@@ -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;
@@ -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;
@@ -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;
@@ -1,25 +1,7 @@
1
1
  import { Moment } from "moment-timezone";
2
2
  export type DateType = Date | string | number;
3
3
  export type ExtendedDateType = Moment | DateType;
4
- type YYYY = number;
5
- type MM = number;
6
- type DD = number;
7
- type HH = number;
8
- type mm = number;
9
- type ss = number;
10
- type microS = number;
11
- export type Date_YYYY = `${YYYY}` | string;
12
- export type Date_YYYY_MM = `${YYYY}-${MM}` | string;
13
- export type Date_YYYY_MM_DD = `${YYYY}-${MM}-${DD}` | string;
14
- export type Time_HH_mm_ss = `${HH}:${mm}:${ss}` | string;
15
- export type Date_HH = `${HH}` | string;
16
- export type DateTime = `${Date_YYYY_MM_DD}T${Time_HH_mm_ss}` | string;
17
- export type DateTime_tz = `${Date_YYYY_MM_DD}T${Time_HH_mm_ss}${"+" | "-"}${HH}:${mm}` | string;
18
- export type DateTime_Z = `${Date_YYYY_MM_DD}T${Time_HH_mm_ss}Z` | string;
19
- export type DateTime_Z_micros = `${Date_YYYY_MM_DD}T${Time_HH_mm_ss}.${microS}Z` | string;
20
- export type DateTimeSpaceSeparated = `${Date_YYYY_MM_DD} ${Time_HH_mm_ss}` | string;
21
4
  export type DateRangeFilter = {
22
5
  fromDate: DateType;
23
6
  toDate: DateType;
24
7
  };
25
- export {};
@@ -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,9 +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
- lastSeenAt: DateTime;
44
+ lastSeenAt: string;
38
45
  lastLoginAt: string;
39
46
  lastname: string;
40
47
  persona: string;
@@ -89,26 +96,44 @@ export type RemotePasswordUpdateRequestPayload = {
89
96
  currentPassword: string;
90
97
  newPassword: string;
91
98
  };
92
- export type LoginResponsePayload = {
93
- confirmedAt?: string;
94
- country?: string;
95
- createdAt?: string;
96
- email?: string;
97
- firstname?: string;
98
- id?: string;
99
- isAdmin?: boolean;
100
- lastLoginAt?: string;
101
- lastname?: string;
102
- persona?: Persona;
103
- telephone?: string;
104
- token?: string;
105
- updatedAt?: string;
106
- 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;
107
126
  };
108
127
  export type LogoutParams = {
109
128
  token: string;
110
129
  fromAdmin?: boolean;
111
130
  };
131
+ export type ConfirmUserRequestPayload = {
132
+ c: string;
133
+ };
134
+ export type DeleteActiveSessionRequestPayload = {
135
+ authorization: string;
136
+ };
112
137
  export type UserSession = {
113
138
  browser: string;
114
139
  createdAt: string;
@@ -177,6 +202,16 @@ export type GoogleAuthRequestPayload = {
177
202
  code: string;
178
203
  redirectUri: string;
179
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
+ };
180
215
  export type UserStatsResponse = {
181
216
  data: {
182
217
  userStats: AdminUser;
@@ -197,7 +232,7 @@ export type UserProject = {
197
232
  id: number;
198
233
  exid: string;
199
234
  name: string;
200
- startedAt: DateTime;
235
+ startedAt: string;
201
236
  };
202
237
  export type UserProjectResponse = {
203
238
  data: UserProject[];
@@ -217,9 +252,9 @@ export type Admin = {
217
252
  id: number;
218
253
  fullname: string;
219
254
  email: string;
220
- createdAt: DateTime;
221
- updatedAt: DateTime;
222
- lastSignInAt: DateTime;
255
+ createdAt: string;
256
+ updatedAt: string;
257
+ lastSignInAt: string;
223
258
  signInCount: number;
224
259
  lastSignInIp: string;
225
260
  apiId: string;
@@ -231,17 +266,17 @@ export type ImpersonateUserResponse = {
231
266
  lastname: string;
232
267
  telephone: string;
233
268
  email: string;
234
- is_admin: boolean;
269
+ isAdmin: boolean;
235
270
  persona: Persona;
236
271
  country: string;
237
272
  companyId: number;
238
273
  companyExid: string;
239
274
  companyName: string;
240
275
  evercamAccount: boolean;
241
- createdAt: DateTime;
242
- updatedAt: DateTime;
243
- confirmedAt: DateTime;
244
- last_loginAt: DateTime;
276
+ createdAt: string;
277
+ updatedAt: string;
278
+ confirmedAt: string;
279
+ lastLoginAt: string;
245
280
  features: UserFeatureFlag[];
246
281
  token: string;
247
282
  };
@@ -270,6 +305,42 @@ export type Suppression = {
270
305
  id: number;
271
306
  email: string;
272
307
  source: string;
273
- insertedAt: DateTime;
274
- 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[];
275
345
  };
346
+ export {};