@evercam/api 1.0.0-964e29308 → 1.0.0-98fee43f2

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 (64) hide show
  1. package/README.md +1 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +204 -15
  3. package/dist/api/api/adminApi.d.ts +20 -15
  4. package/dist/api/api/aiApi.d.ts +90 -4
  5. package/dist/api/api/authzApi.d.ts +5 -3
  6. package/dist/api/api/evercamApi.d.ts +32 -12
  7. package/dist/api/api/evercamLabsApi.d.ts +5 -5
  8. package/dist/api/api/ingestApi.d.ts +19 -5
  9. package/dist/api/types/360.d.ts +175 -76
  10. package/dist/api/types/aiConfigs.d.ts +242 -0
  11. package/dist/api/types/analytics.d.ts +34 -15
  12. package/dist/api/types/anpr.d.ts +31 -2
  13. package/dist/api/types/auditLogs.d.ts +18 -0
  14. package/dist/api/types/authz.d.ts +71 -0
  15. package/dist/api/types/automation.d.ts +23 -4
  16. package/dist/api/types/axios.d.ts +9 -9
  17. package/dist/api/types/bim.d.ts +28 -5
  18. package/dist/api/types/camera.d.ts +13 -32
  19. package/dist/api/types/comments.d.ts +10 -7
  20. package/dist/api/types/connector.d.ts +2 -0
  21. package/dist/api/types/copilot.d.ts +0 -3
  22. package/dist/api/types/detections.d.ts +3 -10
  23. package/dist/api/types/drone.d.ts +95 -6
  24. package/dist/api/types/errors.d.ts +13 -1
  25. package/dist/api/types/gateReport.d.ts +7 -22
  26. package/dist/api/types/gateReportManagement.d.ts +170 -0
  27. package/dist/api/types/hammertech.d.ts +98 -0
  28. package/dist/api/types/index.d.ts +8 -1
  29. package/dist/api/types/ingest.d.ts +98 -3
  30. package/dist/api/types/kit.d.ts +41 -51
  31. package/dist/api/types/map.d.ts +12 -0
  32. package/dist/api/types/media.d.ts +8 -2
  33. package/dist/api/types/notification.d.ts +41 -2
  34. package/dist/api/types/observationEvents.d.ts +61 -0
  35. package/dist/api/types/observations.d.ts +85 -0
  36. package/dist/api/types/planner.d.ts +55 -10
  37. package/dist/api/types/posthog.d.ts +20 -0
  38. package/dist/api/types/project.d.ts +11 -2
  39. package/dist/api/types/recording.d.ts +8 -13
  40. package/dist/api/types/ring.d.ts +16 -16
  41. package/dist/api/types/roi.d.ts +3 -11
  42. package/dist/api/types/routeParams.d.ts +1 -0
  43. package/dist/api/types/shared.d.ts +18 -18
  44. package/dist/api/types/shares.d.ts +0 -13
  45. package/dist/api/types/siteAnalytics.d.ts +3 -5
  46. package/dist/api/types/siteAnalyticsManagement.d.ts +117 -0
  47. package/dist/api/types/siteView.d.ts +73 -0
  48. package/dist/api/types/snapshots.d.ts +13 -0
  49. package/dist/api/types/socket.d.ts +4 -0
  50. package/dist/api/types/storyblok.d.ts +0 -13
  51. package/dist/api/types/timelapse.d.ts +4 -8
  52. package/dist/api/types/user.d.ts +1 -4
  53. package/dist/api/utils.d.ts +0 -1
  54. package/dist/index.js +1781 -673
  55. package/dist/index.js.map +1 -1
  56. package/dist/index.umd.cjs +1 -1
  57. package/dist/index.umd.cjs.map +1 -1
  58. package/dist/shared/types/components.d.ts +103 -38
  59. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  60. package/dist/shared/types/imagePlayer.d.ts +8 -1
  61. package/dist/shared/types/index.d.ts +2 -0
  62. package/dist/shared/types/observations.d.ts +21 -0
  63. package/package.json +4 -2
  64. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,6 +1,6 @@
1
1
  import type { AxiosRequestConfig } from "axios";
2
2
  import type { SwrRequestConfig } from "@evercam/api/types";
3
- import type { _360AssetsQueryParams, _360AssetsRequestPayload, _360QueueQueryParams, _360AssetsUploadPayload, _360AssetsResponse, _360AssetsCountsResponse, _360QueueResponse, _360FloorsResponse, DroneQueueResponse, DroneUploadsResponse, IngestUploadInitResponse, BimUploadsResponse, MobileAssetsQueryParams, MobileCaptureAssetsResponse, BimUploadPayload, BimUploadsQueryParams, CalculateMeasuringOperationRequestPayload, DrawingsRequestPayload, DronesQueryParams, DroneUploadUpdateRequestPayload, FlightImagesQueryParams, Generate360MapRequestPayload, GenerateFloorPayload, InspectionToolRequestPayload, JsonObject, _360WalkV2, _360FloorV2 } from "@evercam/api/types";
3
+ import type { _360AssetsQueryParams, _360AssetsRequestPayload, _360QueueQueryParams, _360AssetsUploadPayload, _360AssetsResponse, _360AssetsCountsResponse, _360QueueResponse, _360FloorsResponse, DroneQueueResponse, DroneUploadsResponse, IngestUploadInitResponse, BimUploadsResponse, MobileAssetsQueryParams, MobileCaptureAssetsResponse, BimUploadPayload, BimUploadsQueryParams, CalculateMeasuringOperationRequestPayload, DrawingsRequestPayload, DronesQueryParams, DroneUploadUpdateRequestPayload, IngestProcessingProgress, FlightImagesQueryParams, Generate360MapRequestPayload, GenerateFloorPayload, InspectionToolRequestPayload, JsonObject, _360WalkV2, _360FloorV2 } from "@evercam/api/types";
4
4
  import { IngestVersions, IngestTypes } from "@evercam/api/types";
5
5
  export declare const getIngestApiUrls: (type: string) => string[];
6
6
  export declare const IngestApi: {
@@ -12,6 +12,7 @@ export declare const IngestApi: {
12
12
  getDrones(params: {
13
13
  params: Partial<DronesQueryParams>;
14
14
  }): Promise<DroneUploadsResponse>;
15
+ getProcessingProgress(id: number): Promise<IngestProcessingProgress>;
15
16
  getArchive(id: number, params: {
16
17
  dataType: string;
17
18
  }): Promise<Blob>;
@@ -27,7 +28,7 @@ export declare const IngestApi: {
27
28
  verifyToken(projectId: string, params: {
28
29
  token: string;
29
30
  }): Promise<JsonObject>;
30
- calculateMeasuringOperation(projectId: string, params: CalculateMeasuringOperationRequestPayload): Promise<JsonObject>;
31
+ calculateMeasuringOperation(projectId: string, params: CalculateMeasuringOperationRequestPayload, ingestUrl?: string): Promise<JsonObject>;
31
32
  inspectionTool(projectId: string, params: InspectionToolRequestPayload): Promise<JsonObject>;
32
33
  isInspectionEnabled(projectId: string, params?: JsonObject): Promise<JsonObject>;
33
34
  getDroneQueueSize(droneUrl: string): Promise<DroneQueueResponse>;
@@ -41,13 +42,16 @@ export declare const IngestApi: {
41
42
  get360AssetsCounts(projectId: string, params: {
42
43
  uploadedBy: string;
43
44
  }): Promise<_360AssetsCountsResponse>;
44
- get360AssetLink(projectId: string, date: string, floor: string, assetType: string, drawingId: string, marker: string | null): Promise<string>;
45
+ get360AssetLink(projectId: string, date: string, floor: string | number, assetType: string, drawingId: string | number, marker: string | null): Promise<string | string[]>;
45
46
  update360(id: number, payload: _360AssetsRequestPayload): Promise<_360WalkV2>;
46
- update360ByProjectDateName(projectId: string, date: string, floor: string, payload: _360AssetsRequestPayload): Promise<_360WalkV2>;
47
+ update360ByProjectDateName(projectId: string, date: string, floor: string, payload: Partial<_360AssetsRequestPayload> & {
48
+ drawingId?: number;
49
+ }): Promise<_360WalkV2>;
47
50
  deleteUpload(id: number): Promise<void>;
48
51
  getArchive(id: number, params: {
49
52
  dateType: string;
50
53
  }): Promise<Blob>;
54
+ get360Progress(id: number): Promise<IngestProcessingProgress>;
51
55
  createUpload(projectId: string, params: _360AssetsRequestPayload): Promise<IngestUploadInitResponse>;
52
56
  upload(id: number, params: JsonObject, payload: _360AssetsUploadPayload): Promise<_360WalkV2>;
53
57
  reprocess360(id: number): Promise<void>;
@@ -64,11 +68,13 @@ export declare const IngestApi: {
64
68
  getDrawingById(id: number, projectExid: string): Promise<_360FloorV2>;
65
69
  updateDrawing(id: number, projectExid: string, payload: GenerateFloorPayload): Promise<_360FloorV2>;
66
70
  deleteDrawing(id: number): Promise<void>;
71
+ restoreDrawing(id: number): Promise<void>;
67
72
  transferWalks(sourceId: number, targetId: number, projectExid: string): Promise<void>;
68
73
  createDrawing(projectExid: string, payload: GenerateFloorPayload, createdBy: string): Promise<_360FloorV2>;
69
74
  fetchDrawingOverlay(id: number, params: {
70
75
  view: boolean;
71
- }, onDownloadProgress: (progress: ProgressEvent) => void): Promise<Blob>;
76
+ thumbnail?: boolean;
77
+ }, onDownloadProgress?: (progress: ProgressEvent) => void, extraConfig?: AxiosRequestConfig): Promise<string>;
72
78
  getFloorArchive(id: number): Promise<string>;
73
79
  generate360map(projectId: string, params: Generate360MapRequestPayload): Promise<JsonObject>;
74
80
  get360QueueSize(ingestUrl: string, params?: _360QueueQueryParams): Promise<_360QueueResponse>;
@@ -87,6 +93,9 @@ export declare const IngestApi: {
87
93
  name: string;
88
94
  }, payload: BimUploadPayload): Promise<void>;
89
95
  };
96
+ webhook: {
97
+ notifyBimUpdated(projectId: string, bimIdentifier: string): Promise<void>;
98
+ };
90
99
  mobileCapture: {
91
100
  getProjectMobileAssets(params: MobileAssetsQueryParams, extraConfig?: AxiosRequestConfig): Promise<MobileCaptureAssetsResponse>;
92
101
  getMobileAssetPhoto(assetId: string | number, params: {
@@ -109,11 +118,14 @@ export declare const IngestApi: {
109
118
  modelZip: string;
110
119
  orthomosaicZip: string;
111
120
  reportPdf: string;
121
+ processingLog: string;
112
122
  uploadedBy: string;
113
123
  processingStatus: import("@evercam/api/types").IngestProcessingStatus | string;
114
124
  modelCesiumAssetId: string;
115
125
  updatedAt: string;
116
126
  hasTusLinks: boolean;
127
+ hasSteps: boolean;
128
+ aerialShots: import("@evercam/api/types").AerialShotItem[];
117
129
  } | {
118
130
  ingestVersion: string;
119
131
  archive: string;
@@ -134,6 +146,8 @@ export declare const IngestApi: {
134
146
  processingStatus: string;
135
147
  projectId: string;
136
148
  report: string;
149
+ processingLog: string;
150
+ hasSteps?: boolean;
137
151
  route: unknown | null;
138
152
  startPosition: unknown | null;
139
153
  tusLinks: unknown | null;
@@ -1,26 +1,35 @@
1
1
  import { DateType } from "@evercam/api/types/time";
2
- export type _360CameraParams = {
3
- azimuthAngle: number;
4
- polarAngle: number;
2
+ import { GeoPoint, PaginationParams, Point3D } from "@evercam/api/types/shared";
3
+ export type _360OverlayPosition = {
4
+ northEast: GeoPoint;
5
+ northWest: GeoPoint;
6
+ southEast: GeoPoint;
7
+ southWest: GeoPoint;
5
8
  };
6
- export type _360Vector3D = {
7
- x: number;
8
- y: number;
9
- z: number;
9
+ export type ForgeViewport = {
10
+ name: string;
11
+ eye: number[];
12
+ target: number[];
13
+ worldUpVector?: number[];
10
14
  };
11
- export type _360Geolocation = {
12
- latitude: number;
13
- longitude: number;
15
+ export type ForgeView = {
16
+ name: string;
17
+ viewport: ForgeViewport;
18
+ timestamp: string;
14
19
  };
15
20
  export type _360CameraRotation = {
16
21
  azimuthAngle: number;
17
22
  polarAngle: number;
18
23
  };
24
+ export type _360Geolocation = {
25
+ latitude: number;
26
+ longitude: number;
27
+ };
19
28
  export type _360Marker3D = {
20
- cameraPosition: _360Vector3D;
29
+ cameraPosition: Point3D;
21
30
  geolocation: _360Geolocation;
22
31
  nextRoomId: _360MakerId;
23
- position: _360Vector3D;
32
+ position: Point3D;
24
33
  rotation: {
25
34
  _order: "XYZ" | string;
26
35
  _x: number;
@@ -35,7 +44,7 @@ export type _360Tag = {
35
44
  comment: string;
36
45
  creationDate: number;
37
46
  currentRoom: _360MakerId;
38
- position: _360Vector3D;
47
+ position: Point3D;
39
48
  cameraRotation: _360CameraRotation;
40
49
  };
41
50
  export type _360FloorId = string | number;
@@ -45,8 +54,16 @@ export type _360Floor = {
45
54
  _3DMarkers: _360Marker3D[];
46
55
  cameraRotation: _360CameraRotation;
47
56
  fbxModel: string;
57
+ fbxModelHQ?: string;
58
+ pointCloudModelHQ?: string;
48
59
  initialMarker: _360MakerId;
49
60
  modelViewerFeatureFlag: boolean;
61
+ imagesOnlyFeatureFlag?: boolean;
62
+ forgeBIMFeatureFlag?: boolean;
63
+ isForgeGravityEnabled?: boolean;
64
+ initialForgeView?: ForgeView | null;
65
+ enhancedLightFeatureFlag?: boolean;
66
+ calibrationDetails?: Record<string, unknown>;
50
67
  route: {
51
68
  cameraHeadingOffset: string;
52
69
  overlayID: number;
@@ -54,7 +71,7 @@ export type _360Floor = {
54
71
  };
55
72
  sceneScale: number;
56
73
  steps: number;
57
- tags: Record<string, _360Tag>;
74
+ tags?: Record<string, _360Tag>;
58
75
  };
59
76
  export type _360WalkV2 = {
60
77
  archive: string;
@@ -75,6 +92,8 @@ export type _360WalkV2 = {
75
92
  processingStatus: string;
76
93
  projectId: string;
77
94
  report: string;
95
+ processingLog: string;
96
+ hasSteps?: boolean;
78
97
  route: unknown | null;
79
98
  startPosition: unknown | null;
80
99
  tusLinks: unknown | null;
@@ -92,44 +111,40 @@ export type _360FloorV2 = {
92
111
  hasOverlay: boolean;
93
112
  isCalibrated: boolean;
94
113
  createdBy: string | null;
95
- overlayPosition: {
96
- northEast: {
97
- lat: number;
98
- lng: number;
99
- };
100
- northWest: {
101
- lat: number;
102
- lng: number;
103
- };
104
- southEast: {
105
- lat: number;
106
- lng: number;
107
- };
108
- southWest: {
109
- lat: number;
110
- lng: number;
111
- };
112
- };
114
+ overlayPosition: _360OverlayPosition;
113
115
  insertedAt: string;
114
116
  updatedAt: string;
117
+ deletedAt: string | null;
115
118
  };
116
119
  export type _360Scene = {
117
120
  date: string;
118
- dateID: number;
121
+ dateID: string | number;
119
122
  floors: {
120
123
  floorID: _360FloorId;
121
124
  name: string;
125
+ isValidated?: boolean;
122
126
  }[];
123
127
  polarAngle: number;
124
128
  azimuthAngle: number;
125
129
  };
130
+ export declare enum _360PinType {
131
+ Default = "Default"
132
+ }
133
+ export type _360Pin = {
134
+ position: Point3D;
135
+ pinType: _360PinType;
136
+ pinId?: string;
137
+ cameraExid?: string;
138
+ name: string;
139
+ currentRoom?: _360MakerId;
140
+ cameraRotation?: _360CameraRotation;
141
+ };
126
142
  export type _360SceneRoute = {
127
143
  cameraHeadingOffset?: number;
128
144
  overlayID?: number;
129
145
  track?: string;
130
146
  };
131
- export type _360FullProject = {
132
- dates: _360SceneWithFloors[];
147
+ export type _360ProjectListItem = {
133
148
  integrationType: string;
134
149
  projectId: string;
135
150
  projectName: string;
@@ -138,13 +153,7 @@ export type _360FullProject = {
138
153
  providerSuffix: string;
139
154
  timeline: string;
140
155
  uniqueId: string;
141
- };
142
- export type _360FullFloor = _360Floor & {
143
- id: _360FloorId;
144
- name: string;
145
- };
146
- export type _360SceneWithFloors = _360Scene & {
147
- floors: _360FullFloor[];
156
+ requiresValidation?: boolean;
148
157
  };
149
158
  export type _360ProjectJsonResponse = {
150
159
  dates: _360Scene[];
@@ -159,12 +168,24 @@ export type MobileCaptureSnapshot = {
159
168
  thumbnailUrl: string;
160
169
  };
161
170
  export declare enum _360UrlParams {
162
- DateId = "date_id",
171
+ DateId = "dateId",
163
172
  Date = "date",
164
173
  Floor = "floor",
165
174
  Marker = "marker",
166
175
  PolarAngle = "polarAngle",
167
- AzimuthAngle = "azimuthAngle"
176
+ AzimuthAngle = "azimuthAngle",
177
+ Zoom = "zoom",
178
+ User = "user",
179
+ ViewerMode = "viewer_mode",
180
+ ProjectId = "projectId",
181
+ Unit = "unit",
182
+ LockDate = "lockDate",
183
+ LockFloor = "lockFloor",
184
+ LockMarker = "lockMarker",
185
+ IsWidget = "isWidget",
186
+ MediaLocked = "mediaLocked",
187
+ Debug = "debug",
188
+ RequiresValidation = "requires_validation"
168
189
  }
169
190
  export declare enum _360AssetType {
170
191
  Video = "video",
@@ -178,11 +199,6 @@ export declare enum _360AssetLabel {
178
199
  Walks = "walks",
179
200
  MobilePhotos = "mobilePhotos"
180
201
  }
181
- export declare enum _360Feature {
182
- BIM = "BIM",
183
- Minimap = "Minimap",
184
- Minimodel = "Minimodel"
185
- }
186
202
  export declare enum _360IntergrationType {
187
203
  Evercam = "Evercam",
188
204
  Matterport = "Matterport",
@@ -195,10 +211,8 @@ export declare enum PathMarkerColor {
195
211
  End = "#fd7567",
196
212
  Default = "#2196F3"
197
213
  }
198
- export type _360AssetsQueryParams = {
199
- page: number;
200
- limit: number;
201
- projectID: string;
214
+ export type _360AssetsQueryParams = PaginationParams & {
215
+ projectId: string;
202
216
  date: DateType;
203
217
  floor: string;
204
218
  id: string;
@@ -209,7 +223,7 @@ export type _360AssetsRequestPayload = {
209
223
  floor: string;
210
224
  uploadedBy?: string;
211
225
  };
212
- export type DrawingsRequestPayload = {
226
+ export type DrawingsRequestPayload = PaginationParams & {
213
227
  projectId?: string;
214
228
  name?: string;
215
229
  changedBy?: string;
@@ -217,10 +231,9 @@ export type DrawingsRequestPayload = {
217
231
  startDate?: string;
218
232
  endDate?: string;
219
233
  id?: number;
220
- page?: number;
221
- limit?: number;
222
234
  paginate?: boolean;
223
235
  withAsset?: boolean;
236
+ includeDeleted?: boolean;
224
237
  };
225
238
  export type GenerateFloorPayload = {
226
239
  overlay?: {
@@ -231,24 +244,7 @@ export type GenerateFloorPayload = {
231
244
  changedBy: string;
232
245
  name?: string;
233
246
  mapStyle?: string;
234
- overlayPositionCorners: {
235
- northEast: {
236
- lat: number;
237
- lng: number;
238
- };
239
- northWest: {
240
- lat: number;
241
- lng: number;
242
- };
243
- southWest: {
244
- lat: number;
245
- lng: number;
246
- };
247
- southEast: {
248
- lat: number;
249
- lng: number;
250
- };
251
- };
247
+ overlayPositionCorners: _360OverlayPosition;
252
248
  };
253
249
  export type _360QueueQueryParams = {
254
250
  projectId?: string;
@@ -268,9 +264,112 @@ export type _360AssetsUploadPayload = {
268
264
  isImagesOnly: boolean;
269
265
  };
270
266
  export type Generate360MapRequestPayload = {
271
- dateId: string;
267
+ dateId: string | number;
272
268
  floorId: string;
273
- cameraOffset: string;
269
+ cameraOffset: string | number;
274
270
  startPoint: string;
275
271
  endPoint: string;
272
+ drawingId?: number;
273
+ markers?: Array<{
274
+ position: {
275
+ x: number;
276
+ y: number;
277
+ z: number;
278
+ };
279
+ }>;
280
+ startPointIndex?: number;
281
+ endPointIndex?: number;
282
+ };
283
+ export declare enum EModelsType {
284
+ FBX = "FBX",
285
+ PointCloud = "PLY"
286
+ }
287
+ export type _360FloorRef = {
288
+ projectID: string;
289
+ dateID: string | number;
290
+ floorID: _360FloorId;
291
+ };
292
+ export type _360Vector3 = {
293
+ x: number;
294
+ y: number;
295
+ z: number;
296
+ };
297
+ export type _360MarkerData = {
298
+ cameraPosition: _360Vector3;
299
+ nextRoomId: string;
300
+ position: _360Vector3;
301
+ geolocation?: {
302
+ latitude: number;
303
+ longitude: number;
304
+ };
305
+ rotation: {
306
+ _order: string;
307
+ _x: number;
308
+ _y: number;
309
+ _z: number;
310
+ isEuler: boolean;
311
+ x?: number;
312
+ y?: number;
313
+ z?: number;
314
+ };
315
+ };
316
+ export type _360Route = {
317
+ overlayID?: number;
318
+ track?: string;
319
+ cameraHeadingOffset?: number;
320
+ };
321
+ export type _360CalibrationDetails = {
322
+ baseOriginOf360Viewer?: _360Vector3;
323
+ baseOriginOfForgeViewer?: _360Vector3;
324
+ rotationMatrix?: {
325
+ elements: number[];
326
+ };
327
+ scaleMatrix?: {
328
+ elements: number[];
329
+ };
330
+ };
331
+ export type _360FloorData = {
332
+ _3DMarkers: _360MarkerData[];
333
+ fbxModel: string | null;
334
+ fbxModelHQ: string | null;
335
+ pointCloudModelHQ: string | null;
336
+ initialMarker: string;
337
+ cameraRotation: _360CameraRotation;
338
+ steps: number;
339
+ route: _360Route | null;
340
+ sceneScale: number;
341
+ modelViewerFeatureFlag: boolean;
342
+ imagesOnlyFeatureFlag: boolean;
343
+ forgeBIMFeatureFlag: boolean;
344
+ isForgeGravityEnabled: boolean;
345
+ initialForgeView: ForgeView | null;
346
+ calibrationDetails: _360CalibrationDetails;
347
+ enhancedLightFeatureFlag: boolean;
348
+ };
349
+ export type _360PinData = {
350
+ position: _360Vector3;
351
+ pinType: string;
352
+ name: string;
353
+ pinId?: string;
354
+ cameraExid?: string;
355
+ currentRoom?: string;
356
+ cameraRotation?: {
357
+ polarAngle: number;
358
+ azimuthAngle: number;
359
+ };
360
+ };
361
+ export type _360ForgeTimelineItem = {
362
+ taskNumber: number;
363
+ taskID: string;
364
+ actualStartDate: string;
365
+ actualEndDate: string;
366
+ plannedStartDate: string;
367
+ plannedEndDate: string;
368
+ objectIDs: number[];
369
+ };
370
+ export type _360ForgeProject = {
371
+ urns?: Array<{
372
+ urn: string;
373
+ }>;
374
+ timeline?: _360ForgeTimelineItem[];
276
375
  };
@@ -0,0 +1,242 @@
1
+ import { PaginatedItems, PaginationParams } from "@evercam/api/types";
2
+ export declare enum AiApp {
3
+ GateReport = "gate_report",
4
+ Ppe = "ppe",
5
+ SiteAnalytics = "site_analytics"
6
+ }
7
+ export declare enum AiProvider {
8
+ Gemini = "gemini",
9
+ OpenAi = "openai",
10
+ Anthropic = "anthropic"
11
+ }
12
+ export declare enum AiConfigsPromptDialogMode {
13
+ Create = "create",
14
+ Edit = "edit",
15
+ View = "view",
16
+ Subprompt = "subprompt"
17
+ }
18
+ export declare enum AiConfigsKeyDialogMode {
19
+ Create = "create",
20
+ Rotate = "rotate",
21
+ Rename = "rename"
22
+ }
23
+ export interface AiAppConfig {
24
+ bg: string;
25
+ fg: string;
26
+ border: string;
27
+ icon: string;
28
+ }
29
+ export declare const AI_APP_CONFIGS: Record<AiApp | "generic", AiAppConfig>;
30
+ export interface AiProviderConfig {
31
+ bg: string;
32
+ fg: string;
33
+ icon: string;
34
+ }
35
+ export declare const AI_PROVIDER_CONFIGS: Record<AiProvider, AiProviderConfig>;
36
+ export declare enum AiPromptModel {
37
+ Gemini3Pro = "gemini-3-pro",
38
+ Gemini3FlashPreview = "gemini-3-flash-preview",
39
+ Gemini25Pro = "gemini-2.5-pro",
40
+ Gemini25Flash = "gemini-2.5-flash",
41
+ Gemini20Flash = "gemini-2.0-flash",
42
+ Gpt5 = "gpt-5",
43
+ Gpt5Mini = "gpt-5-mini",
44
+ Gpt4o = "gpt-4o",
45
+ Gpt4oMini = "gpt-4o-mini",
46
+ ClaudeOpus45 = "claude-opus-4-5",
47
+ ClaudeSonnet46 = "claude-sonnet-4-6",
48
+ ClaudeHaiku45 = "claude-haiku-4-5"
49
+ }
50
+ export declare enum AiPromptType {
51
+ Prompt = "prompt",
52
+ Parent = "parent",
53
+ Subprompt = "subprompt"
54
+ }
55
+ export interface AiPrompt {
56
+ id: number;
57
+ title: string | null;
58
+ purpose: string | null;
59
+ app: string | null;
60
+ model: string | null;
61
+ prompt: string;
62
+ outputSchema: Record<string, unknown> | null;
63
+ createdBy: string;
64
+ createdAt: string;
65
+ updatedAt: string;
66
+ promptType: AiPromptType;
67
+ parentId: number | null;
68
+ subpromptCount: number;
69
+ }
70
+ export interface AiPromptCreatePayload {
71
+ title?: string | null;
72
+ purpose: string;
73
+ app: string;
74
+ model?: string | null;
75
+ prompt: string;
76
+ outputSchema?: Record<string, unknown> | null;
77
+ promptType?: AiPromptType.Prompt | AiPromptType.Parent;
78
+ }
79
+ export interface AiPromptUpdatePayload {
80
+ title?: string | null;
81
+ purpose?: string;
82
+ app?: string;
83
+ model?: string | null;
84
+ prompt?: string;
85
+ outputSchema?: Record<string, unknown> | null;
86
+ }
87
+ export type AiPromptQueryParams = PaginationParams & {
88
+ app?: string;
89
+ purpose?: string;
90
+ model?: string;
91
+ search?: string;
92
+ createdBy?: string;
93
+ promptType?: AiPromptType;
94
+ includeSubprompts?: boolean;
95
+ };
96
+ export interface AiSubpromptCreatePayload {
97
+ title?: string | null;
98
+ purpose: string;
99
+ model?: string | null;
100
+ prompt: string;
101
+ outputSchema?: Record<string, unknown> | null;
102
+ }
103
+ export type AiPromptListResponse = PaginatedItems<AiPrompt>;
104
+ export interface AiPromptCreateResponse {
105
+ created: boolean;
106
+ data: AiPrompt;
107
+ message: string;
108
+ }
109
+ export interface AiPromptUpdateResponse {
110
+ updated: boolean;
111
+ id: number | string;
112
+ message: string;
113
+ }
114
+ export interface AiPromptDeleteResponse {
115
+ deleted: boolean;
116
+ count: number;
117
+ message: string;
118
+ }
119
+ export interface AiApiKey {
120
+ id: number;
121
+ projectExid: string;
122
+ provider: string;
123
+ name: string;
124
+ purpose: string;
125
+ enabled: boolean;
126
+ autoGenerated: boolean;
127
+ firstUsedAt: string | null;
128
+ lastUsedAt: string | null;
129
+ insertedAt: string;
130
+ updatedAt: string;
131
+ }
132
+ export interface AiApiKeyCreatePayload {
133
+ projectExid: string;
134
+ provider: string;
135
+ name?: string;
136
+ purpose?: string;
137
+ apiKey?: string;
138
+ enabled?: boolean;
139
+ }
140
+ export interface AiApiKeyUpdatePayload {
141
+ name?: string;
142
+ enabled?: boolean;
143
+ apiKey?: string;
144
+ }
145
+ export type AiApiKeyQueryParams = {
146
+ projectExid?: string;
147
+ provider?: string;
148
+ purpose?: string;
149
+ enabled?: boolean;
150
+ };
151
+ export interface AiApiKeyCreateResponse {
152
+ created: boolean;
153
+ data: AiApiKey;
154
+ message: string;
155
+ }
156
+ export interface AiApiKeyUpdateResponse {
157
+ updated: boolean;
158
+ id: number | string;
159
+ message: string;
160
+ }
161
+ export interface AiApiKeyDeleteResponse {
162
+ deleted: boolean;
163
+ count: number;
164
+ message: string;
165
+ }
166
+ export declare enum AiObservationFeasibilityStatus {
167
+ Prod = "prod",
168
+ Beta = "beta",
169
+ Parked = "parked"
170
+ }
171
+ export declare enum AiObservationTimeDetection {
172
+ PerSecond = "per_second",
173
+ PerMinute = "per_minute",
174
+ Hourly = "hourly",
175
+ Daily = "daily"
176
+ }
177
+ export interface AiObservationFeasibilityConfig {
178
+ bg: string;
179
+ fg: string;
180
+ border: string;
181
+ label: string;
182
+ }
183
+ export declare const AI_OBSERVATION_FEASIBILITY_CONFIGS: Record<AiObservationFeasibilityStatus, AiObservationFeasibilityConfig>;
184
+ export interface AiObservationType {
185
+ id: number;
186
+ observationCode: string;
187
+ name: string;
188
+ description: string | null;
189
+ type: string;
190
+ rules: Record<string, unknown> | null;
191
+ timeDetection: string | null;
192
+ every: number | null;
193
+ severity: number | null;
194
+ feasibilityStatus: AiObservationFeasibilityStatus;
195
+ promptId: number | null;
196
+ promptName: string | null;
197
+ insertedAt: string;
198
+ updatedAt: string;
199
+ }
200
+ export interface AiObservationTypeCreatePayload {
201
+ observationCode: string;
202
+ name: string;
203
+ description?: string | null;
204
+ type: string;
205
+ rules?: Record<string, unknown> | null;
206
+ timeDetection?: string | null;
207
+ every?: number | null;
208
+ severity?: number | null;
209
+ feasibilityStatus: AiObservationFeasibilityStatus;
210
+ promptId?: number | null;
211
+ }
212
+ export type AiObservationTypeUpdatePayload = Partial<Omit<AiObservationTypeCreatePayload, "observationCode">>;
213
+ export type AiObservationTypeQueryParams = {
214
+ search?: string;
215
+ feasibilityStatus?: string;
216
+ type?: string;
217
+ page?: number;
218
+ limit?: number;
219
+ };
220
+ export interface AiObservationTypeListResponse {
221
+ items: AiObservationType[];
222
+ total: number;
223
+ page: number;
224
+ limit: number;
225
+ from: number;
226
+ to: number;
227
+ }
228
+ export interface AiObservationTypeCreateResponse {
229
+ created: boolean;
230
+ data: AiObservationType;
231
+ message: string;
232
+ }
233
+ export interface AiObservationTypeUpdateResponse {
234
+ updated: boolean;
235
+ id: number | string;
236
+ message: string;
237
+ }
238
+ export interface AiObservationTypeDeleteResponse {
239
+ deleted: boolean;
240
+ count: number;
241
+ message: string;
242
+ }