@evercam/api 1.0.0-0ff26c649 → 1.0.0-112ba26f5

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 (106) hide show
  1. package/README.md +1 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +216 -15
  3. package/dist/api/api/adminApi.d.ts +154 -138
  4. package/dist/api/api/aiApi.d.ts +184 -62
  5. package/dist/api/api/authzApi.d.ts +29 -17
  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 +153 -118
  9. package/dist/api/api/evercamLabsApi.d.ts +10 -17
  10. package/dist/api/api/exNvrApi.d.ts +2 -2
  11. package/dist/api/api/index.d.ts +1 -0
  12. package/dist/api/api/ingestApi.d.ts +132 -57
  13. package/dist/api/api/ptzApi.d.ts +9 -4
  14. package/dist/api/api/reportsApi.d.ts +15 -0
  15. package/dist/api/api/videoWallApi.d.ts +2 -2
  16. package/dist/api/api/weatherApi.d.ts +2 -2
  17. package/dist/api/types/360.d.ts +269 -48
  18. package/dist/api/types/aconex.d.ts +9 -9
  19. package/dist/api/types/admin.d.ts +85 -0
  20. package/dist/api/types/aiConfigs.d.ts +244 -0
  21. package/dist/api/types/analytics.d.ts +135 -75
  22. package/dist/api/types/anpr.d.ts +49 -2
  23. package/dist/api/types/apiKey.d.ts +70 -0
  24. package/dist/api/types/auditLogs.d.ts +179 -21
  25. package/dist/api/types/authz.d.ts +116 -6
  26. package/dist/api/types/autodesk.d.ts +7 -7
  27. package/dist/api/types/automation.d.ts +65 -3
  28. package/dist/api/types/axios.d.ts +20 -14
  29. package/dist/api/types/bim.d.ts +65 -16
  30. package/dist/api/types/camera.d.ts +316 -193
  31. package/dist/api/types/comments.d.ts +68 -31
  32. package/dist/api/types/company.d.ts +53 -6
  33. package/dist/api/types/compare.d.ts +21 -6
  34. package/dist/api/types/connector.d.ts +5 -5
  35. package/dist/api/types/coolify.d.ts +18 -2
  36. package/dist/api/types/detections.d.ts +26 -18
  37. package/dist/api/types/drone.d.ts +95 -6
  38. package/dist/api/types/emailMessages.d.ts +27 -0
  39. package/dist/api/types/errors.d.ts +19 -2
  40. package/dist/api/types/gateReport.d.ts +51 -69
  41. package/dist/api/types/gateReportManagement.d.ts +170 -0
  42. package/dist/api/types/hammertech.d.ts +98 -0
  43. package/dist/api/types/hdd.d.ts +27 -2
  44. package/dist/api/types/index.d.ts +17 -3
  45. package/dist/api/types/ingest.d.ts +280 -17
  46. package/dist/api/types/kit.d.ts +121 -115
  47. package/dist/api/types/map.d.ts +12 -0
  48. package/dist/api/types/media.d.ts +33 -4
  49. package/dist/api/types/notification.d.ts +83 -3
  50. package/dist/api/types/nvr.d.ts +39 -8
  51. package/dist/api/types/oauth.d.ts +62 -0
  52. package/dist/api/types/observationEvents.d.ts +167 -0
  53. package/dist/api/types/observations.d.ts +89 -0
  54. package/dist/api/types/planner.d.ts +98 -8
  55. package/dist/api/types/posthog.d.ts +71 -0
  56. package/dist/api/types/procore.d.ts +13 -6
  57. package/dist/api/types/progressPhoto.d.ts +42 -25
  58. package/dist/api/types/project.d.ts +158 -32
  59. package/dist/api/types/recording.d.ts +9 -15
  60. package/dist/api/types/recycleBin.d.ts +9 -3
  61. package/dist/api/types/reports.d.ts +108 -0
  62. package/dist/api/types/ring.d.ts +53 -0
  63. package/dist/api/types/roi.d.ts +3 -11
  64. package/dist/api/types/routeParams.d.ts +1 -0
  65. package/dist/api/types/router.d.ts +34 -10
  66. package/dist/api/types/shared.d.ts +47 -30
  67. package/dist/api/types/shares.d.ts +6 -157
  68. package/dist/api/types/sim.d.ts +23 -11
  69. package/dist/api/types/siteAnalytics.d.ts +169 -47
  70. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  71. package/dist/api/types/siteView.d.ts +79 -0
  72. package/dist/api/types/smartSeach.d.ts +5 -0
  73. package/dist/api/types/snapshots.d.ts +99 -14
  74. package/dist/api/types/socket.d.ts +4 -0
  75. package/dist/api/types/sso.d.ts +11 -37
  76. package/dist/api/types/storageProvider.d.ts +30 -0
  77. package/dist/api/types/storyblok.d.ts +27 -0
  78. package/dist/api/types/streaming.d.ts +3 -3
  79. package/dist/api/types/tag.d.ts +1 -1
  80. package/dist/api/types/time.d.ts +0 -18
  81. package/dist/api/types/timelapse.d.ts +7 -11
  82. package/dist/api/types/user.d.ts +135 -54
  83. package/dist/api/types/videoWall.d.ts +21 -21
  84. package/dist/api/types/weather.d.ts +75 -11
  85. package/dist/api/types/widget.d.ts +83 -15
  86. package/dist/api/types/xweather.d.ts +4 -4
  87. package/dist/api/utils.d.ts +1 -1
  88. package/dist/index.js +2538 -1040
  89. package/dist/index.js.map +1 -1
  90. package/dist/index.umd.cjs +1 -1
  91. package/dist/index.umd.cjs.map +1 -1
  92. package/dist/shared/types/components.d.ts +592 -34
  93. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  94. package/dist/shared/types/droneUpload.d.ts +93 -0
  95. package/dist/shared/types/imagePlayer.d.ts +9 -2
  96. package/dist/shared/types/index.d.ts +5 -0
  97. package/dist/shared/types/observations.d.ts +25 -0
  98. package/dist/shared/types/rbac.d.ts +67 -0
  99. package/dist/shared/types/report.d.ts +107 -0
  100. package/dist/shared/types/timeline.d.ts +2 -1
  101. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  102. package/dist/shared/utils/datePresets.d.ts +31 -0
  103. package/package.json +4 -2
  104. package/dist/api/types/copilot.d.ts +0 -157
  105. package/dist/api/types/storageServers.d.ts +0 -4
  106. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,8 +1,9 @@
1
- import type { CameraExid, Exid, DateType } from "@/types";
1
+ import type { CameraExid, Exid, DateType } from "@evercam/api/types";
2
2
  export type MediaExid = Exid;
3
3
  export type Media = {
4
- project_exid?: string;
5
4
  cameraExid?: CameraExid;
5
+ cameraId?: number;
6
+ projectId?: number;
6
7
  cameraName: string;
7
8
  cameraTimezone: string;
8
9
  createdAt: string;
@@ -25,6 +26,13 @@ export type Media = {
25
26
  projectExid?: string;
26
27
  thumbnailUrl?: string;
27
28
  mediaUrl?: string;
29
+ camera?: string;
30
+ notes?: string;
31
+ category?: MediaCategory | ClipsCategory;
32
+ isUrgent?: boolean;
33
+ bucket?: string;
34
+ sourceProduct?: string;
35
+ featureType?: string;
28
36
  };
29
37
  export declare enum MediaType {
30
38
  EditedImage = "edit",
@@ -42,7 +50,8 @@ export declare enum MediaFileType {
42
50
  Mp4 = "mp4",
43
51
  Png = "png",
44
52
  Pdf = "pdf",
45
- Jpeg = "jpeg"
53
+ Jpeg = "jpeg",
54
+ Csv = "csv"
46
55
  }
47
56
  export declare enum MediaStatus {
48
57
  Pending = "Pending",
@@ -75,6 +84,22 @@ export type MediaFilterQueryParams = {
75
84
  limit?: number;
76
85
  camera?: string;
77
86
  };
87
+ export type AdminMediaFilterQueryParams = Partial<{
88
+ title: string;
89
+ sort: string;
90
+ cameraName: string;
91
+ cameraExid: string;
92
+ requesterName: string;
93
+ type: MediaType;
94
+ projectExid: string;
95
+ projectName: string;
96
+ status: MediaStatus;
97
+ notes: string;
98
+ category: MediaCategory | ClipsCategory;
99
+ isUrgent: boolean;
100
+ page: number;
101
+ limit: number;
102
+ }>;
78
103
  export type MediaUpdateRequestPayload = {
79
104
  name?: string;
80
105
  title?: string;
@@ -92,7 +117,7 @@ export type MediaCreateRequestPayload = {
92
117
  cameraExid?: string;
93
118
  requestedBy?: string;
94
119
  notes?: string;
95
- category?: ClipsCategory;
120
+ category?: MediaCategory | ClipsCategory;
96
121
  isUrgent?: boolean;
97
122
  storeAsType?: MediaType;
98
123
  };
@@ -107,6 +132,10 @@ export declare enum ClipsCategory {
107
132
  Marketing = "marketing",
108
133
  BestPracticies = "best_practices"
109
134
  }
135
+ export declare enum MediaCategory {
136
+ Weather = "weather",
137
+ SmartSearch = "smart_search"
138
+ }
110
139
  export type MediaDeleteRequestPayload = {
111
140
  timelapseIds: (string | number)[];
112
141
  compareIds: (string | number)[];
@@ -1,17 +1,97 @@
1
+ import { CommentsScope, CommentThreeSixtyContext } from "./comments";
1
2
  export declare enum NotificationType {
2
3
  CameraShare = "camera_share",
3
4
  CameraStatusChange = "camera_status_changed",
4
5
  Mention = "mention",
6
+ CommentMention = "comment_mention",
5
7
  TimelapseCreated = "timelapse_created",
6
8
  TimelapseFailed = "timelapse_failed",
7
9
  DroneProcessing = "drone_processing_done",
8
- Processing360 = "three_sixty_done"
10
+ Processing360 = "three_sixty_done",
11
+ SmartSearchExportReady = "smart_search_export_ready",
12
+ SmartSearchExportFailed = "smart_search_export_failed",
13
+ GateReportExportReady = "gate_report_export_ready",
14
+ GateReportExportFailed = "gate_report_export_failed",
15
+ PpeExportReady = "ppe_export_ready",
16
+ PpeExportFailed = "ppe_export_failed",
17
+ WeatherExportReady = "weather_export_ready",
18
+ WeatherExportFailed = "weather_export_failed",
19
+ CompareReady = "compare_ready",
20
+ CompareFailed = "compare_failed",
21
+ ClipExportReady = "clip_export_ready",
22
+ ClipExportFailed = "clip_export_failed",
23
+ NvrClipReady = "nvr_clip_ready",
24
+ NvrClipFailed = "nvr_clip_failed",
25
+ UploadComplete = "upload_complete",
26
+ UploadFailed = "upload_failed",
27
+ RingCamerasImported = "ring_cameras_imported",
28
+ StorageWarning = "storage_warning",
29
+ Other = "other"
9
30
  }
10
- export interface CameraShareContext {
31
+ export interface NotificationContextBase {
32
+ cameraExid?: string;
33
+ projectExid?: string;
34
+ }
35
+ export interface CameraShareContext extends NotificationContextBase {
11
36
  cameraExid: string;
12
37
  projectExid: string;
13
38
  shareId: number;
14
39
  }
40
+ export interface CameraStatusChangeContext extends NotificationContextBase {
41
+ cameraExid: string;
42
+ projectExid: string;
43
+ newStatus: string;
44
+ }
45
+ export interface MentionContext extends NotificationContextBase {
46
+ }
47
+ export interface TimelapseCreatedContext extends NotificationContextBase {
48
+ cameraExid: string;
49
+ projectExid: string;
50
+ archiveExid: string;
51
+ }
52
+ export interface TimelapseFailedContext extends NotificationContextBase {
53
+ cameraExid: string;
54
+ projectExid: string;
55
+ }
56
+ export interface DroneProcessingContext extends NotificationContextBase {
57
+ projectExid: string;
58
+ droneDate: string;
59
+ }
60
+ export interface Processing360Context extends NotificationContextBase {
61
+ projectExid: string;
62
+ date: string;
63
+ floor: string;
64
+ }
65
+ export interface ExportNotificationContext extends NotificationContextBase {
66
+ projectExid: string;
67
+ archiveExid?: string;
68
+ compareExid?: string;
69
+ }
70
+ export interface UploadNotificationContext extends NotificationContextBase {
71
+ projectExid: string;
72
+ }
73
+ export interface RingCamerasImportedContext extends NotificationContextBase {
74
+ projectExid: string;
75
+ projectName: string;
76
+ cameras: Array<{
77
+ exid: string;
78
+ name: string;
79
+ }>;
80
+ }
81
+ export interface StorageWarningContext extends NotificationContextBase {
82
+ projectExid: string;
83
+ cameraName: string;
84
+ }
85
+ export interface CommentMentionContext extends NotificationContextBase {
86
+ projectExid: string;
87
+ commentId: number;
88
+ scope: CommentsScope;
89
+ commentContext: CommentThreeSixtyContext;
90
+ content?: string;
91
+ label?: string;
92
+ projectName?: string;
93
+ }
94
+ export type NotificationContext = CameraShareContext | CameraStatusChangeContext | MentionContext | TimelapseCreatedContext | TimelapseFailedContext | DroneProcessingContext | Processing360Context | ExportNotificationContext | UploadNotificationContext | RingCamerasImportedContext | StorageWarningContext | CommentMentionContext;
15
95
  export type Notification = {
16
96
  id: number;
17
97
  type: NotificationType;
@@ -23,5 +103,5 @@ export type Notification = {
23
103
  targetFullname: string;
24
104
  targetEmail: string;
25
105
  readTimestamp: string | null;
26
- context: CameraShareContext;
106
+ context: NotificationContext;
27
107
  };
@@ -1,15 +1,17 @@
1
1
  import type { NvrModel } from "@evercam/api/types";
2
2
  export type Nvr = {
3
3
  id?: number;
4
+ kitId?: number;
4
5
  deviceType: NvrDeviceType;
5
6
  serial: string;
6
7
  model: NvrModel;
7
- httpUrl: string;
8
- rtspUrl: string;
8
+ httpUrl: string | null;
9
+ rtspUrl: string | null;
9
10
  macAddress: string;
10
- username: string;
11
- password: string;
11
+ username: string | null;
12
+ password: string | null;
12
13
  nerves: boolean;
14
+ version?: string;
13
15
  };
14
16
  export declare enum NvrDeviceType {
15
17
  Rpi4 = "rpi4",
@@ -26,11 +28,40 @@ export declare enum NvrHddStatus {
26
28
  }
27
29
  export type NvrCreatePayload = {
28
30
  serial?: string;
29
- httpUrl: string;
30
- rtspUrl?: string;
31
+ httpUrl?: string | null;
32
+ rtspUrl?: string | null;
31
33
  deviceType?: NvrDeviceType;
32
34
  model: NvrModel;
33
- username: string;
34
- password: string;
35
+ username?: string | null;
36
+ password?: string | null;
35
37
  kitId?: number;
36
38
  };
39
+ export type NvrConnectionFields = Pick<NvrCreatePayload, "username" | "password" | "httpUrl" | "rtspUrl">;
40
+ export type AdminNvr = {
41
+ name: string;
42
+ exid: string;
43
+ externalHost: string | null;
44
+ model: string | null;
45
+ deviceName: string | null;
46
+ macAddress: string | null;
47
+ firmwareVersion: string | null;
48
+ resolution: string | null;
49
+ bitrateType: string | null;
50
+ videoQuality: string | null;
51
+ frameRate: number | null;
52
+ bitrate: string | null;
53
+ videoEncoding: string | null;
54
+ hddName: string | null;
55
+ hddCapacity: string | null;
56
+ freeSpace: string | null;
57
+ hddStatus: string | null;
58
+ hddProperty: string | null;
59
+ nvrStatus: string;
60
+ timeMode: string | null;
61
+ localTime: string | null;
62
+ timezone: string | null;
63
+ addressingFormatType: string | null;
64
+ hostName: string | null;
65
+ portNo: string | null;
66
+ synchronizeInterval: string | null;
67
+ };
@@ -0,0 +1,62 @@
1
+ export type OAuthClient = {
2
+ id: number;
3
+ name: string;
4
+ clientId: string;
5
+ redirectUris: string[];
6
+ logoUrl: string | null;
7
+ scopes: string[];
8
+ active: boolean;
9
+ description: string | null;
10
+ owner: {
11
+ id: number;
12
+ name: string;
13
+ email: string;
14
+ } | null;
15
+ createdAt: string;
16
+ updatedAt: string;
17
+ };
18
+ export type OAuthClientWithSecret = OAuthClient & {
19
+ clientSecret: string;
20
+ };
21
+ export type CreateOAuthClientPayload = {
22
+ name: string;
23
+ redirectUris: string[];
24
+ scopes?: string[];
25
+ description?: string;
26
+ logoUrl?: string;
27
+ };
28
+ export type AdminCreateOAuthClientPayload = CreateOAuthClientPayload & {
29
+ clientId?: string;
30
+ clientSecret?: string;
31
+ };
32
+ export type UpdateOAuthClientPayload = {
33
+ name?: string;
34
+ redirectUris?: string[];
35
+ scopes?: string[];
36
+ description?: string;
37
+ logoUrl?: string;
38
+ active?: boolean;
39
+ };
40
+ export type OAuthScopeDetail = {
41
+ scope: string;
42
+ description: string;
43
+ group: string;
44
+ };
45
+ export type OAuthConsentInfo = {
46
+ client: {
47
+ name: string;
48
+ logoUrl: string | null;
49
+ description: string | null;
50
+ };
51
+ scopes: OAuthScopeDetail[];
52
+ };
53
+ export type OAuthConsentPayload = {
54
+ clientId: string;
55
+ scope: string;
56
+ redirectUri: string;
57
+ state: string;
58
+ decision: "allow" | "deny";
59
+ };
60
+ export type OAuthConsentResponse = {
61
+ redirectUrl: string;
62
+ };
@@ -0,0 +1,167 @@
1
+ import type { VisionProvider } from "@evercam/api/types";
2
+ export declare enum ObservationEventStatus {
3
+ Detected = "detected",
4
+ Approved = "approved",
5
+ Disapproved = "disapproved",
6
+ Unsure = "unsure"
7
+ }
8
+ export interface ObservationEventStatusConfig {
9
+ bg: string;
10
+ fg: string;
11
+ border: string;
12
+ label: string;
13
+ }
14
+ export declare const OBSERVATION_EVENT_STATUS_CONFIGS: Record<ObservationEventStatus, ObservationEventStatusConfig>;
15
+ export interface SiteAnalyticsObservationEvent {
16
+ id: number;
17
+ sourceType?: ObservationSourceType;
18
+ sessionId?: string | null;
19
+ markerId?: string | null;
20
+ drawingId?: string | null;
21
+ drawingName?: string | null;
22
+ walkName?: string | null;
23
+ sightings?: Array<Record<string, unknown>> | null;
24
+ observationTypeId: number;
25
+ observationName: string | null;
26
+ observationCode: string | null;
27
+ cameraExid: string;
28
+ projectExid: string | null;
29
+ startTime: string;
30
+ endTime: string | null;
31
+ confidence: number | null;
32
+ status: ObservationEventStatus;
33
+ aiEvidence: string | null;
34
+ bbox: number[] | null;
35
+ model: string | null;
36
+ promptId: number | null;
37
+ observationMetadata: Record<string, unknown> | null;
38
+ trigger: ObservationEventTrigger | string;
39
+ reviewedBy: string | null;
40
+ reviewedAt: string | null;
41
+ insertedAt: string;
42
+ }
43
+ export type ObservationEventQueryParams = {
44
+ cameraExid?: string;
45
+ projectExid?: string;
46
+ observationTypeIds?: string;
47
+ status?: ObservationEventStatus | string;
48
+ sourceType?: ObservationSourceType | string;
49
+ modelName?: string;
50
+ sortBy?: string;
51
+ sortDir?: "asc" | "desc";
52
+ page?: number;
53
+ limit?: number;
54
+ };
55
+ export interface ObservationModelOption {
56
+ modelName: string;
57
+ total: number;
58
+ }
59
+ export interface ObservationEventListResponse {
60
+ items: SiteAnalyticsObservationEvent[];
61
+ total: number;
62
+ page: number;
63
+ limit: number;
64
+ from: number;
65
+ to: number;
66
+ }
67
+ export interface SiteAnalyticsObservationEventRaw {
68
+ id: number;
69
+ observationTypeId: number;
70
+ observationCode: string | null;
71
+ cameraExid: string;
72
+ projectExid: string | null;
73
+ capturedAt: string;
74
+ endTime: string | null;
75
+ confidence: number | null;
76
+ status: ObservationEventStatus;
77
+ reason: string | null;
78
+ personBbox: number[] | null;
79
+ modelVersion: string | null;
80
+ observationMetadata: Record<string, unknown> | null;
81
+ trigger: string;
82
+ reviewedBy: string | null;
83
+ reviewedAt: string | null;
84
+ }
85
+ export interface ObservationEventListResponseRaw {
86
+ items: SiteAnalyticsObservationEventRaw[];
87
+ total: number;
88
+ page: number;
89
+ limit: number;
90
+ from: number;
91
+ to: number;
92
+ }
93
+ export type ObservationEventVerdict = ObservationEventStatus.Approved | ObservationEventStatus.Disapproved | ObservationEventStatus.Unsure;
94
+ export interface ObservationEventReviewPayload {
95
+ status: ObservationEventVerdict;
96
+ }
97
+ export interface ObservationEventReviewResponse {
98
+ updated: boolean;
99
+ id: number | string;
100
+ message: string;
101
+ }
102
+ export declare enum ObservationSourceType {
103
+ Camera = "camera",
104
+ Walk360 = "walk360",
105
+ Drone = "drone"
106
+ }
107
+ export declare enum ObservationEventTrigger {
108
+ CameraDetection = "camera_detection",
109
+ Walk = "walk"
110
+ }
111
+ export declare enum Walk360ProcessedSessionStatus {
112
+ Done = "done",
113
+ Processing = "processing",
114
+ Retryable = "retryable",
115
+ Error = "error"
116
+ }
117
+ export interface Walk360Activity {
118
+ observationTypeId: number;
119
+ }
120
+ export interface Walk360WorkerInfo {
121
+ coolifyAppId?: string | null;
122
+ workerStatus?: string | null;
123
+ workerIsRunning?: boolean;
124
+ appUrl?: string | null;
125
+ visionProvider?: VisionProvider;
126
+ }
127
+ export interface Walk360Config extends Walk360WorkerInfo {
128
+ projectExid: string;
129
+ enabled: boolean;
130
+ startDate: string | null;
131
+ activities: Walk360Activity[];
132
+ configured: boolean;
133
+ maxParallelWalks?: number;
134
+ }
135
+ export interface Walk360ConfigSummary extends Walk360WorkerInfo {
136
+ projectExid: string;
137
+ projectName?: string | null;
138
+ enabled: boolean;
139
+ startDate: string | null;
140
+ activities: Walk360Activity[];
141
+ maxParallelWalks: number;
142
+ walksDone: number;
143
+ walksProcessing: number;
144
+ walksRetryable: number;
145
+ eventsCreated: number;
146
+ lastProcessedAt: string | null;
147
+ updatedAt: string | null;
148
+ }
149
+ export interface Walk360WorkerAction {
150
+ projectExid: string;
151
+ appUuid: string | null;
152
+ message: string;
153
+ state: string;
154
+ }
155
+ export interface Walk360ProcessedSession {
156
+ id: number;
157
+ projectExid: string;
158
+ sourceType: ObservationSourceType;
159
+ sessionId: string;
160
+ status: Walk360ProcessedSessionStatus;
161
+ markersTotal: number | null;
162
+ markersProcessed: number | null;
163
+ eventsCreated: number | null;
164
+ error: string | null;
165
+ startedAt: string;
166
+ finishedAt: string | null;
167
+ }
@@ -0,0 +1,89 @@
1
+ import { type ProjectExid, type CameraExid, type DateType, type BBox, AiObservationFeasibilityStatus, ObservationEventStatus, ObservationSourceType, DownloadFileType } from "@evercam/api/types";
2
+ export type ObservationApproval = boolean | ObservationEventStatus.Unsure | null;
3
+ export type ObservationEvent = {
4
+ id: number;
5
+ observationTypeId: number;
6
+ observationCode: string | null;
7
+ cameraExid: CameraExid | null;
8
+ projectExid: ProjectExid | null;
9
+ sourceType: ObservationSourceType;
10
+ sessionId?: string | null;
11
+ markerId?: string | null;
12
+ drawingId?: string | null;
13
+ drawingName?: string | null;
14
+ walkName?: string | null;
15
+ capturedAt: DateType;
16
+ endTime: DateType | null;
17
+ confidence: number | null;
18
+ status: ObservationEventStatus;
19
+ isApproved: ObservationApproval;
20
+ reason: string | null;
21
+ personBbox: BBox | null;
22
+ modelVersion: string | null;
23
+ observationMetadata: Record<string, unknown> | null;
24
+ trigger: string;
25
+ reviewedBy: string | null;
26
+ reviewedAt: DateType | null;
27
+ };
28
+ export type ObservationType = {
29
+ id: number;
30
+ observationCode: string;
31
+ name: string;
32
+ description: string | null;
33
+ type: string;
34
+ severity: number | null;
35
+ feasibilityStatus: AiObservationFeasibilityStatus;
36
+ };
37
+ export declare enum ObservationMissingItem {
38
+ Helmet = "helmet",
39
+ HighVisVest = "high_vis_vest",
40
+ Gloves = "gloves",
41
+ Glasses = "glasses"
42
+ }
43
+ export type ObservationEventsQueryParams = {
44
+ cameraExid?: CameraExid;
45
+ observationCode?: string;
46
+ type?: string;
47
+ fromDate?: string;
48
+ toDate?: string;
49
+ missingItems?: string;
50
+ status?: ObservationEventStatus;
51
+ sort?: string;
52
+ page?: number;
53
+ limit?: number;
54
+ };
55
+ export type ObservationEventsExportQueryParams = {
56
+ cameraExid?: CameraExid;
57
+ observationCode?: string;
58
+ type?: string;
59
+ missingItems?: string;
60
+ status?: ObservationEventStatus;
61
+ fromDate: string;
62
+ toDate: string;
63
+ fileType: DownloadFileType;
64
+ directDownload?: boolean;
65
+ };
66
+ export type ObservationApprovalUpdateResponse = {
67
+ updated: boolean;
68
+ id: number | string | null;
69
+ message: string;
70
+ };
71
+ export declare enum ObservationCountsGranularity {
72
+ Day = "day",
73
+ Week = "week",
74
+ Month = "month"
75
+ }
76
+ export type ObservationEventsCountsQueryParams = {
77
+ cameraExid?: CameraExid;
78
+ observationCode?: string;
79
+ type?: string;
80
+ fromDate?: string;
81
+ toDate?: string;
82
+ missingItems?: string;
83
+ status?: ObservationEventStatus;
84
+ granularity?: ObservationCountsGranularity;
85
+ };
86
+ export type ObservationEventCount = {
87
+ bucket: DateType;
88
+ total: number;
89
+ };
@@ -1,4 +1,35 @@
1
+ import { GeoPoint, TuplePoint2D } from "./shared";
2
+ import { MapType } from "./map";
3
+ export type PlannerListItem = {
4
+ id: string;
5
+ projectId: string;
6
+ projectName: string;
7
+ projectLocation: string;
8
+ createdDate: string;
9
+ updatedDate: string;
10
+ owner?: string;
11
+ lastUpdatedBy?: string;
12
+ camerasCount?: number;
13
+ hasPlan?: boolean;
14
+ thumbnailUrl?: string;
15
+ projectMapType?: MapType;
16
+ sessionId?: string;
17
+ };
18
+ export type PolygonPath = TuplePoint2D[];
19
+ export type PolygonCoordinates = PolygonPath[];
20
+ export interface GeoJSONPolygon {
21
+ type: "Polygon";
22
+ coordinates: PolygonCoordinates;
23
+ }
24
+ export declare enum PlannerUrlParams {
25
+ SitePlanId = "site_plan_id",
26
+ IsNewSitePlan = "is_new_site_plan",
27
+ IsBoundsMode = "is_bounds_mode",
28
+ ProjectPosition = "project_position",
29
+ DealId = "deal_id"
30
+ }
1
31
  export declare enum EDistortImageModes {
32
+ Edit = "edit",
2
33
  FreeRotate = "freeRotate",
3
34
  Lock = "lock",
4
35
  Rotate = "rotate",
@@ -21,15 +52,74 @@ export declare enum EPageType {
21
52
  List = "list",
22
53
  Item = "item"
23
54
  }
24
- export declare enum EPaths {
25
- Home = "/",
26
- Session = "/session"
27
- }
28
- export declare enum EProjectItems {
29
- Camera = "camera",
30
- Overlay = "overlay"
31
- }
32
55
  export declare enum ERoles {
33
56
  Admin = "admin",
34
57
  User = "user"
35
58
  }
59
+ export type PlannerOverlay = {
60
+ imageUrl?: string;
61
+ corners?: {
62
+ topLeft: GeoPoint;
63
+ topRight: GeoPoint;
64
+ bottomLeft: GeoPoint;
65
+ bottomRight: GeoPoint;
66
+ } | null;
67
+ };
68
+ export type PlannerCameraMarker = {
69
+ name?: string;
70
+ location?: GeoPoint;
71
+ heading?: number;
72
+ fovAngle?: number;
73
+ fovRadius?: number;
74
+ isVisible?: boolean;
75
+ color?: string;
76
+ };
77
+ export type SitePlanBounds = {
78
+ northEast: GeoPoint;
79
+ southWest: GeoPoint;
80
+ };
81
+ export type SitePlan = {
82
+ id?: string;
83
+ projectId?: string;
84
+ owner?: string;
85
+ lastUpdatedBy?: string;
86
+ projectName?: string;
87
+ projectLocation?: string;
88
+ projectMapType?: EMapTypes;
89
+ projectBounds?: SitePlanBounds;
90
+ overlay?: PlannerOverlay;
91
+ markers?: PlannerCameraMarker[];
92
+ thumbnailUrl?: string;
93
+ createdDate?: string;
94
+ updatedDate?: string;
95
+ };
96
+ export interface IDrawControl {
97
+ _toolbars: {
98
+ draw: {
99
+ _activeMode: {
100
+ handler: {
101
+ disable(): void;
102
+ completeShape(): void;
103
+ };
104
+ };
105
+ _modes: {
106
+ polygon: {
107
+ handler: {
108
+ enable(): void;
109
+ };
110
+ };
111
+ };
112
+ };
113
+ edit: {
114
+ _modes: {
115
+ edit: {
116
+ handler: {
117
+ enable(): void;
118
+ disable(): void;
119
+ save(): void;
120
+ };
121
+ };
122
+ };
123
+ };
124
+ };
125
+ }