@evercam/api 1.0.0-df2365728 → 1.0.0-df4ccc18e

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 (97) hide show
  1. package/README.md +4 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +203 -10
  3. package/dist/api/api/adminApi.d.ts +145 -101
  4. package/dist/api/api/aiApi.d.ts +190 -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 -103
  9. package/dist/api/api/evercamLabsApi.d.ts +9 -7
  10. package/dist/api/api/exNvrApi.d.ts +1 -1
  11. package/dist/api/api/ingestApi.d.ts +127 -34
  12. package/dist/api/api/ptzApi.d.ts +12 -3
  13. package/dist/api/api/videoWallApi.d.ts +7 -7
  14. package/dist/api/api/weatherApi.d.ts +2 -2
  15. package/dist/api/types/360.d.ts +291 -23
  16. package/dist/api/types/aconex.d.ts +104 -6
  17. package/dist/api/types/admin.d.ts +51 -0
  18. package/dist/api/types/aiConfigs.d.ts +244 -0
  19. package/dist/api/types/analytics.d.ts +177 -51
  20. package/dist/api/types/anpr.d.ts +53 -13
  21. package/dist/api/types/auditLogs.d.ts +19 -2
  22. package/dist/api/types/authz.d.ts +132 -0
  23. package/dist/api/types/autodesk.d.ts +7 -7
  24. package/dist/api/types/automation.d.ts +114 -1
  25. package/dist/api/types/axios.d.ts +19 -14
  26. package/dist/api/types/bim.d.ts +38 -9
  27. package/dist/api/types/camera.d.ts +133 -113
  28. package/dist/api/types/comments.d.ts +32 -11
  29. package/dist/api/types/company.d.ts +43 -2
  30. package/dist/api/types/compare.d.ts +20 -5
  31. package/dist/api/types/connector.d.ts +5 -5
  32. package/dist/api/types/coolify.d.ts +20 -2
  33. package/dist/api/types/copilot.d.ts +11 -9
  34. package/dist/api/types/credentials.d.ts +1 -0
  35. package/dist/api/types/detections.d.ts +23 -32
  36. package/dist/api/types/drone.d.ts +95 -6
  37. package/dist/api/types/errors.d.ts +14 -1
  38. package/dist/api/types/gateReport.d.ts +49 -168
  39. package/dist/api/types/gateReportManagement.d.ts +170 -0
  40. package/dist/api/types/hammertech.d.ts +98 -0
  41. package/dist/api/types/hdd.d.ts +26 -1
  42. package/dist/api/types/index.d.ts +17 -2
  43. package/dist/api/types/ingest.d.ts +191 -4
  44. package/dist/api/types/kit.d.ts +85 -57
  45. package/dist/api/types/map.d.ts +12 -0
  46. package/dist/api/types/media.d.ts +10 -3
  47. package/dist/api/types/notification.d.ts +83 -3
  48. package/dist/api/types/oauth.d.ts +62 -0
  49. package/dist/api/types/observationEvents.d.ts +141 -0
  50. package/dist/api/types/observations.d.ts +84 -0
  51. package/dist/api/types/planner.d.ts +102 -9
  52. package/dist/api/types/posthog.d.ts +35 -0
  53. package/dist/api/types/procore.d.ts +13 -6
  54. package/dist/api/types/progressPhoto.d.ts +6 -32
  55. package/dist/api/types/project.d.ts +149 -18
  56. package/dist/api/types/recording.d.ts +10 -15
  57. package/dist/api/types/recycleBin.d.ts +14 -0
  58. package/dist/api/types/ring.d.ts +53 -0
  59. package/dist/api/types/roi.d.ts +3 -11
  60. package/dist/api/types/routeParams.d.ts +3 -1
  61. package/dist/api/types/router.d.ts +20 -1
  62. package/dist/api/types/shared.d.ts +29 -27
  63. package/dist/api/types/shares.d.ts +6 -157
  64. package/dist/api/types/sim.d.ts +6 -6
  65. package/dist/api/types/siteAnalytics.d.ts +189 -46
  66. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  67. package/dist/api/types/siteView.d.ts +78 -0
  68. package/dist/api/types/smartSeach.d.ts +5 -0
  69. package/dist/api/types/snapshots.d.ts +55 -1
  70. package/dist/api/types/socket.d.ts +4 -0
  71. package/dist/api/types/sso.d.ts +55 -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 +96 -16
  82. package/dist/api/types/xweather.d.ts +4 -4
  83. package/dist/api/utils.d.ts +1 -0
  84. package/dist/index.js +2618 -1098
  85. package/dist/index.js.map +1 -1
  86. package/dist/index.umd.cjs +1 -1
  87. package/dist/index.umd.cjs.map +1 -1
  88. package/dist/shared/types/components.d.ts +237 -35
  89. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  90. package/dist/shared/types/imagePlayer.d.ts +10 -3
  91. package/dist/shared/types/index.d.ts +3 -0
  92. package/dist/shared/types/observations.d.ts +25 -0
  93. package/dist/shared/types/rbac.d.ts +67 -0
  94. package/dist/shared/types/timeline.d.ts +2 -1
  95. package/package.json +6 -4
  96. package/dist/api/types/storageServers.d.ts +0 -4
  97. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,4 +1,5 @@
1
- import { PaginationParams, DateType } from "@/types";
1
+ import { PaginationParams, DateType, JsonValue, TuplePoint2D } from "@evercam/api/types";
2
+ import type { _360FloorV2, _360WalkV2 } from "@evercam/api/types/360";
2
3
  export declare enum IngestProcessingStatus {
3
4
  Completed = "completed",
4
5
  Uploading = "uploading",
@@ -7,11 +8,23 @@ export declare enum IngestProcessingStatus {
7
8
  Aborted = "aborted",
8
9
  Paused = "paused",
9
10
  InProgress = "inprogress",
10
- Pending = "pending"
11
+ Pending = "pending",
12
+ Downloading = "downloading"
13
+ }
14
+ export declare enum MobileAssetsType {
15
+ Audio = "mobile_audios",
16
+ Photo = "mobile_photos"
11
17
  }
12
18
  export declare enum IngestVersions {
13
19
  V1 = "v1",
14
- V2 = "v2"
20
+ V2 = "v2",
21
+ V3 = "v3",
22
+ V4 = "v4",
23
+ V5 = "v5"
24
+ }
25
+ export declare enum IngestTypes {
26
+ Drone = "drone",
27
+ ThreeSixty = "360"
15
28
  }
16
29
  export type DronesQueryParams = Omit<PaginationParams, "sort"> & {
17
30
  projectId: string;
@@ -19,6 +32,111 @@ export type DronesQueryParams = Omit<PaginationParams, "sort"> & {
19
32
  token: string;
20
33
  processingStatus: IngestProcessingStatus;
21
34
  };
35
+ export type IngestPaginatedResponse<T> = {
36
+ items: T[];
37
+ page: number;
38
+ limit: number;
39
+ total: number;
40
+ pageCount?: number;
41
+ };
42
+ export declare enum IngestProcessingStepStatus {
43
+ Running = "running",
44
+ Completed = "completed",
45
+ Failed = "failed",
46
+ Skipped = "skipped"
47
+ }
48
+ export declare enum IngestProcessingRunStatus {
49
+ Processing = "processing",
50
+ Completed = "completed",
51
+ Failed = "failed"
52
+ }
53
+ export type IngestProcessingMetricStat = {
54
+ avg?: number;
55
+ peak?: number;
56
+ };
57
+ export type IngestProcessingStepMetrics = {
58
+ cpu?: IngestProcessingMetricStat;
59
+ ram?: IngestProcessingMetricStat;
60
+ gpuUtil?: IngestProcessingMetricStat;
61
+ gpuMemDevice?: IngestProcessingMetricStat;
62
+ gpuMemStep?: IngestProcessingMetricStat;
63
+ ramTotalMb?: number;
64
+ diskTotalMb?: number;
65
+ };
66
+ export type IngestProcessingStepDetail = {
67
+ input?: Record<string, JsonValue>;
68
+ params?: Record<string, JsonValue>;
69
+ output?: Record<string, JsonValue>;
70
+ metrics?: IngestProcessingStepMetrics;
71
+ error?: string;
72
+ };
73
+ export type IngestProcessingStep = {
74
+ name: string;
75
+ tool?: string;
76
+ status: IngestProcessingStepStatus | string;
77
+ startedAt?: string;
78
+ endedAt?: string;
79
+ durationSec?: number;
80
+ durationPct?: number;
81
+ detail?: IngestProcessingStepDetail;
82
+ };
83
+ export type IngestProcessingDiskUsage = {
84
+ sourceMb?: number;
85
+ framesMb?: number;
86
+ resultMb?: number;
87
+ totalMb?: number;
88
+ };
89
+ export type IngestProcessingPeakUsage = {
90
+ cpu?: number;
91
+ ram?: number;
92
+ gpuUtil?: number;
93
+ gpuMemDevice?: number;
94
+ gpuMemStep?: number;
95
+ };
96
+ export type IngestProcessingFootprint = {
97
+ disk?: IngestProcessingDiskUsage;
98
+ peak?: IngestProcessingPeakUsage;
99
+ };
100
+ export type IngestProcessingProgress = {
101
+ available: boolean;
102
+ status?: IngestProcessingRunStatus | string;
103
+ processingStatus?: IngestProcessingStatus | string;
104
+ currentStep?: string | null;
105
+ error?: string | null;
106
+ startedAt?: string;
107
+ steps: IngestProcessingStep[];
108
+ footprint?: IngestProcessingFootprint;
109
+ };
110
+ export type IngestTrackedAsset = {
111
+ id: number;
112
+ projectId: string;
113
+ name?: string;
114
+ processingStatus?: IngestProcessingStatus | string;
115
+ };
116
+ export type DroneUploadItem = {
117
+ id: number;
118
+ projectId: string;
119
+ consumed: boolean;
120
+ token: string;
121
+ flightDate: string;
122
+ flightGeolocation: string;
123
+ modelZip: string;
124
+ orthomosaicZip: string;
125
+ reportPdf: string;
126
+ processingLog: string;
127
+ uploadedBy: string;
128
+ processingStatus: IngestProcessingStatus | string;
129
+ modelCesiumAssetId: string;
130
+ updatedAt: string;
131
+ hasTusLinks: boolean;
132
+ hasSteps: boolean;
133
+ aerialShots: AerialShotItem[];
134
+ };
135
+ export type DroneUploadsResponse = IngestPaginatedResponse<DroneUploadItem>;
136
+ export type DroneQueueResponse = {
137
+ size: number;
138
+ assetsDrone: DroneUploadItem[];
139
+ };
22
140
  export type DroneUploadUpdateRequestPayload = {
23
141
  flightMetadata: {
24
142
  dateTime: string;
@@ -30,18 +148,87 @@ export type DroneUploadUpdateRequestPayload = {
30
148
  title: string;
31
149
  fileExtension: string;
32
150
  }[];
151
+ aerialShots: {
152
+ url: string;
153
+ title: string;
154
+ fileExtension: string;
155
+ gpsLatitude: string;
156
+ gpsLongitude: string;
157
+ gpsAltitude: string;
158
+ }[];
33
159
  projectName: string;
34
160
  };
35
161
  export type CalculateMeasuringOperationRequestPayload = {
36
162
  date: DateType;
37
- points: [number, number][];
163
+ points: TuplePoint2D[];
38
164
  operation: string;
39
165
  };
40
166
  export type FlightImagesQueryParams = Partial<Omit<PaginationParams, "sort">> & {
41
167
  date: DateType;
42
168
  };
169
+ export type AerialShotItem = {
170
+ id: number;
171
+ droneUploadId: number;
172
+ fileLink: string;
173
+ thumbnailLink: string;
174
+ gpsLatitude: string;
175
+ gpsLongitude: string;
176
+ gpsAltitude: string;
177
+ };
43
178
  export type InspectionToolRequestPayload = {
44
179
  date: DateType;
45
180
  gpsAltitude: string;
46
181
  gpsCoordinates: string;
47
182
  };
183
+ export type _360AssetsResponse = IngestPaginatedResponse<_360WalkV2>;
184
+ export type _360AssetsCountsDay = {
185
+ day: number;
186
+ walks?: number;
187
+ mobilePhotos?: number;
188
+ [key: string]: JsonValue | undefined;
189
+ };
190
+ export type _360AssetsCountsResponse = {
191
+ days: _360AssetsCountsDay[];
192
+ };
193
+ export type _360QueueResponse = {
194
+ size: number;
195
+ assets360: _360WalkV2[];
196
+ };
197
+ export type _360FloorsResponse = IngestPaginatedResponse<_360FloorV2>;
198
+ export type BimUploadItem = {
199
+ id: number;
200
+ projectId: string;
201
+ uploadedBy: string;
202
+ files: string[];
203
+ updatedAt: string;
204
+ archive?: string | null;
205
+ };
206
+ export type BimUploadsResponse = IngestPaginatedResponse<BimUploadItem>;
207
+ export type IngestUploadInitResponse = {
208
+ id: number;
209
+ projectId: string;
210
+ token?: string;
211
+ projectName?: string;
212
+ };
213
+ export type MobileAssetsQueryParams = Partial<Omit<PaginationParams, "sort">> & {
214
+ projectId?: string;
215
+ project_id?: string;
216
+ assetType?: MobileAssetsType | string;
217
+ date?: DateType;
218
+ isPaginated?: boolean;
219
+ };
220
+ export type MobileCaptureAssetsResponse = IngestPaginatedResponse<{
221
+ id: string;
222
+ projectId?: string;
223
+ uploadedBy: string;
224
+ updatedAt: string;
225
+ assetType: string;
226
+ thumbnailUrl: string;
227
+ }> | Array<{
228
+ id: string;
229
+ projectId?: string;
230
+ uploadedBy: string;
231
+ updatedAt: string;
232
+ assetType: string;
233
+ thumbnailUrl: string;
234
+ }>;
@@ -1,4 +1,4 @@
1
- import { CameraExid, CountryCode, CountryId, DateTime, DateType, Nvr, PaginationParams, PowerType, Project, Router, Schedule, Tag } from "@/types";
1
+ import { CameraExid, CountryCode, CountryId, DateType, Nvr, PaginationParams, PowerType, Project, Router, Schedule, Tag } from "@evercam/api/types";
2
2
  export type Kit = {
3
3
  alarms: KitAlarm[];
4
4
  countryCode: CountryCode;
@@ -16,8 +16,43 @@ export type Kit = {
16
16
  serial: string;
17
17
  status: KitStatus;
18
18
  powerSchedule: Schedule;
19
+ ups: boolean;
20
+ boxId: string;
19
21
  tags: Tag[];
20
22
  storages: KitStorage[];
23
+ createdAt: string;
24
+ decommissionedAt?: string;
25
+ deletedAt?: string;
26
+ };
27
+ export declare enum KitSupportCheckId {
28
+ RouterSmsRoundTrip = "router_sms_round_trip",
29
+ NvrRecordingAllCameras = "nvr_recording_all_cameras",
30
+ NvrRecordingThirdStream = "nvr_recording_third_stream",
31
+ CamerasHaveDeviceId = "cameras_have_device_id",
32
+ CamerasRecording = "cameras_recording",
33
+ CamerasSdCardMounted = "cameras_sd_card_mounted",
34
+ BatteryReadings = "battery_readings"
35
+ }
36
+ export declare enum KitSupportCheckStatus {
37
+ Passed = "passed",
38
+ Failed = "failed",
39
+ Skipped = "skipped"
40
+ }
41
+ export type KitSupportCheck = {
42
+ id: KitSupportCheckId;
43
+ name: string;
44
+ status: KitSupportCheckStatus;
45
+ error: string | null;
46
+ };
47
+ export type KitSupportChecklist = {
48
+ checks: KitSupportCheck[];
49
+ };
50
+ export type KitDiagnosticRun = {
51
+ kitId: number;
52
+ kitSerial: string;
53
+ checks: KitSupportCheck[];
54
+ ranAt: string;
55
+ isSeen: boolean;
21
56
  };
22
57
  export declare enum KitStatus {
23
58
  New = "new",
@@ -33,20 +68,23 @@ export declare enum KitRegion {
33
68
  }
34
69
  export declare enum KitAlarm {
35
70
  NvrOffline = "nvr_offline",
71
+ OfflineScheduled = "offline_scheduled",
36
72
  UnknownCamera = "unknown_camera",
37
73
  NotRecordingCamera = "not_recording_camera",
38
- OfflineScheduled = "offline_scheduled",
39
74
  FullSD = "full_sd",
40
75
  FullStorage = "full_storage",
41
76
  HddUnmounted = "hdd_unmounted",
42
77
  NoHdd = "no_hdd",
43
78
  MissingRouterInfo = "missing_router_info",
44
- PowerLost = "ac_failure",
45
- UpsLowBattery = "low_battery"
79
+ AcFailure = "ac_failure",
80
+ LowBattery = "low_battery",
81
+ GeneratorOff = "generator_off"
46
82
  }
47
83
  export declare enum KitMetricId {
48
84
  SolarCharger = "solar_charger",
49
- PanelPower = "panel_power"
85
+ PanelPower = "panel_power",
86
+ Fan = "fan",
87
+ FanTemperature = "fan_temperature"
50
88
  }
51
89
  export declare enum KitMetricPeriod {
52
90
  Last15Minutes = "now-15m",
@@ -112,55 +150,6 @@ export declare enum KitChartType {
112
150
  TimeSeries = "timeseries",
113
151
  BarChart = "barchart"
114
152
  }
115
- export type GrafanaDataSource = {
116
- type: string;
117
- uid: string;
118
- };
119
- export type GrafanaTarget = {
120
- expr: string;
121
- refId: string;
122
- datasourceId?: string;
123
- intervalMs?: number;
124
- maxDataPoints?: number;
125
- };
126
- export type GrafanaPanel = {
127
- [key: string]: unknown;
128
- id: GrafanaMetricId;
129
- name: keyof GrafanaMetricId;
130
- title: string;
131
- description: string;
132
- type: KitChartType;
133
- datasource: GrafanaDataSource;
134
- targets: GrafanaTarget[];
135
- maxDataPoints?: number;
136
- interval?: string;
137
- timeFrom?: string;
138
- timeShift?: string;
139
- options?: {
140
- maxDataPoints?: number;
141
- interval?: string;
142
- };
143
- };
144
- export type GrafanaDashboard = {
145
- [key: string]: unknown;
146
- panels: GrafanaPanel[];
147
- time?: {
148
- from: string;
149
- to: string;
150
- };
151
- timepicker?: {
152
- refresh_intervals: string[];
153
- time_options: string[];
154
- };
155
- };
156
- export type GrafanaQueryOptions = {
157
- metricId: GrafanaMetricId;
158
- host: string;
159
- job?: string;
160
- from?: string;
161
- to?: string;
162
- variables?: Record<string, string>;
163
- };
164
153
  export type GrafanaTimeSeriesValue = number | string | null;
165
154
  export type GrafanaTimeSeriesValues = GrafanaTimeSeriesValue[][];
166
155
  export type GrafanaFieldConfig = {
@@ -302,6 +291,19 @@ export type KitCreatePayload = {
302
291
  region: KitRegion;
303
292
  };
304
293
  };
294
+ export type KitMetricStatsEntry = {
295
+ timestamp: string;
296
+ voltage: number;
297
+ current: number;
298
+ panelVoltage: number;
299
+ panelPower: number;
300
+ };
301
+ export type KitFanStatsEntry = {
302
+ timestamp: string;
303
+ speed: number;
304
+ internalTemperature: number;
305
+ externalTemperature: number | null;
306
+ };
305
307
  export type KitUpdatePayload = {
306
308
  countryId: number;
307
309
  name: string;
@@ -326,8 +328,8 @@ export type KitStorage = {
326
328
  formFactor: string;
327
329
  };
328
330
  model: string;
329
- insertedAt: DateTime;
330
- updatedAt: DateTime;
331
+ insertedAt: string;
332
+ updatedAt: string;
331
333
  vendor: string;
332
334
  kitId: number;
333
335
  capacity: number;
@@ -338,10 +340,36 @@ export type KitFootageRequestPayload = {
338
340
  cameraId: CameraExid;
339
341
  storageId: number;
340
342
  };
341
- export type KitFootageResponsePayload = {
343
+ export type KitFootage = {
342
344
  id: number;
343
345
  startDate: string;
344
346
  endDate: string;
345
347
  cameraId: number;
346
348
  storageId: number;
347
349
  };
350
+ export type KitAlarmItem = {
351
+ id: number;
352
+ kitId: number;
353
+ alarm: KitAlarm;
354
+ startDate: string;
355
+ endDate: string | null;
356
+ };
357
+ export type KitBox = {
358
+ id: string;
359
+ gatewaySerial: string;
360
+ gatewayMac: string;
361
+ gatewayConfig: Record<string, unknown> | null;
362
+ insertedAt: string;
363
+ updatedAt: string;
364
+ };
365
+ export type KitBoxCreatePayload = {
366
+ id?: string;
367
+ gatewaySerial: string;
368
+ gatewayMac: string;
369
+ gatewayConfig?: Record<string, unknown>;
370
+ };
371
+ export type KitBoxQueryParams = PaginationParams & {
372
+ id: string;
373
+ gatewaySerial: string;
374
+ gatewayMac: string;
375
+ };
@@ -2,3 +2,15 @@ export declare enum MapType {
2
2
  Hybrid = "hybrid",
3
3
  Terrain = "terrain"
4
4
  }
5
+ export type MapView = {
6
+ east?: number;
7
+ floorID?: string;
8
+ image?: string;
9
+ mapStyle?: MapType;
10
+ name: string;
11
+ north?: number;
12
+ projectId: string;
13
+ projectName: string;
14
+ south?: number;
15
+ west?: number;
16
+ };
@@ -1,4 +1,4 @@
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
4
  project_exid?: string;
@@ -25,6 +25,7 @@ export type Media = {
25
25
  projectExid?: string;
26
26
  thumbnailUrl?: string;
27
27
  mediaUrl?: string;
28
+ camera?: string;
28
29
  };
29
30
  export declare enum MediaType {
30
31
  EditedImage = "edit",
@@ -42,7 +43,8 @@ export declare enum MediaFileType {
42
43
  Mp4 = "mp4",
43
44
  Png = "png",
44
45
  Pdf = "pdf",
45
- Jpeg = "jpeg"
46
+ Jpeg = "jpeg",
47
+ Csv = "csv"
46
48
  }
47
49
  export declare enum MediaStatus {
48
50
  Pending = "Pending",
@@ -92,7 +94,7 @@ export type MediaCreateRequestPayload = {
92
94
  cameraExid?: string;
93
95
  requestedBy?: string;
94
96
  notes?: string;
95
- category?: ClipsCategory;
97
+ category?: MediaCategory | ClipsCategory;
96
98
  isUrgent?: boolean;
97
99
  storeAsType?: MediaType;
98
100
  };
@@ -107,6 +109,11 @@ export declare enum ClipsCategory {
107
109
  Marketing = "marketing",
108
110
  BestPracticies = "best_practices"
109
111
  }
112
+ export declare enum MediaCategory {
113
+ Weather = "weather",
114
+ SmartSearch = "smart_search",
115
+ Copilot = "copilot"
116
+ }
110
117
  export type MediaDeleteRequestPayload = {
111
118
  timelapseIds: (string | number)[];
112
119
  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
  };
@@ -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
+ };