@evercam/api 1.0.0-a59703ab2 → 1.0.0-a5ed7fc12

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 (104) hide show
  1. package/README.md +1 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +209 -15
  3. package/dist/api/api/adminApi.d.ts +104 -57
  4. package/dist/api/api/aiApi.d.ts +182 -55
  5. package/dist/api/api/authzApi.d.ts +26 -16
  6. package/dist/api/api/client/axios.d.ts +1 -1
  7. package/dist/api/api/client/swr/Swr.d.ts +1 -1
  8. package/dist/api/api/evercamApi.d.ts +152 -90
  9. package/dist/api/api/evercamLabsApi.d.ts +6 -18
  10. package/dist/api/api/exNvrApi.d.ts +1 -1
  11. package/dist/api/api/index.d.ts +1 -0
  12. package/dist/api/api/ingestApi.d.ts +128 -58
  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 +176 -85
  18. package/dist/api/types/aconex.d.ts +9 -9
  19. package/dist/api/types/admin.d.ts +51 -0
  20. package/dist/api/types/aiConfigs.d.ts +244 -0
  21. package/dist/api/types/analytics.d.ts +134 -74
  22. package/dist/api/types/anpr.d.ts +48 -2
  23. package/dist/api/types/apiKey.d.ts +70 -0
  24. package/dist/api/types/auditLogs.d.ts +163 -20
  25. package/dist/api/types/authz.d.ts +116 -12
  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 -15
  29. package/dist/api/types/bim.d.ts +39 -10
  30. package/dist/api/types/camera.d.ts +127 -120
  31. package/dist/api/types/comments.d.ts +16 -11
  32. package/dist/api/types/company.d.ts +43 -3
  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 +23 -18
  37. package/dist/api/types/drone.d.ts +95 -6
  38. package/dist/api/types/errors.d.ts +18 -2
  39. package/dist/api/types/gateReport.d.ts +46 -68
  40. package/dist/api/types/gateReportManagement.d.ts +170 -0
  41. package/dist/api/types/hammertech.d.ts +98 -0
  42. package/dist/api/types/hdd.d.ts +26 -1
  43. package/dist/api/types/index.d.ts +16 -3
  44. package/dist/api/types/ingest.d.ts +267 -17
  45. package/dist/api/types/kit.d.ts +55 -105
  46. package/dist/api/types/map.d.ts +12 -0
  47. package/dist/api/types/media.d.ts +9 -3
  48. package/dist/api/types/notification.d.ts +83 -3
  49. package/dist/api/types/nvr.d.ts +8 -8
  50. package/dist/api/types/oauth.d.ts +62 -0
  51. package/dist/api/types/observationEvents.d.ts +141 -0
  52. package/dist/api/types/observations.d.ts +80 -0
  53. package/dist/api/types/planner.d.ts +98 -8
  54. package/dist/api/types/posthog.d.ts +35 -0
  55. package/dist/api/types/procore.d.ts +13 -6
  56. package/dist/api/types/progressPhoto.d.ts +6 -2
  57. package/dist/api/types/project.d.ts +111 -25
  58. package/dist/api/types/recording.d.ts +9 -15
  59. package/dist/api/types/recycleBin.d.ts +1 -1
  60. package/dist/api/types/reports.d.ts +108 -0
  61. package/dist/api/types/ring.d.ts +53 -0
  62. package/dist/api/types/roi.d.ts +3 -11
  63. package/dist/api/types/routeParams.d.ts +1 -0
  64. package/dist/api/types/router.d.ts +1 -1
  65. package/dist/api/types/shared.d.ts +42 -25
  66. package/dist/api/types/shares.d.ts +1 -14
  67. package/dist/api/types/sim.d.ts +6 -6
  68. package/dist/api/types/siteAnalytics.d.ts +81 -43
  69. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  70. package/dist/api/types/siteView.d.ts +78 -0
  71. package/dist/api/types/smartSeach.d.ts +5 -0
  72. package/dist/api/types/snapshots.d.ts +49 -4
  73. package/dist/api/types/socket.d.ts +4 -0
  74. package/dist/api/types/storageProvider.d.ts +19 -0
  75. package/dist/api/types/storyblok.d.ts +27 -0
  76. package/dist/api/types/streaming.d.ts +3 -3
  77. package/dist/api/types/tag.d.ts +1 -1
  78. package/dist/api/types/time.d.ts +0 -18
  79. package/dist/api/types/timelapse.d.ts +7 -11
  80. package/dist/api/types/user.d.ts +106 -37
  81. package/dist/api/types/videoWall.d.ts +21 -21
  82. package/dist/api/types/weather.d.ts +75 -11
  83. package/dist/api/types/widget.d.ts +71 -12
  84. package/dist/api/types/xweather.d.ts +4 -4
  85. package/dist/api/utils.d.ts +1 -1
  86. package/dist/index.js +2453 -962
  87. package/dist/index.js.map +1 -1
  88. package/dist/index.umd.cjs +1 -1
  89. package/dist/index.umd.cjs.map +1 -1
  90. package/dist/shared/types/components.d.ts +375 -34
  91. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  92. package/dist/shared/types/droneUpload.d.ts +93 -0
  93. package/dist/shared/types/imagePlayer.d.ts +9 -2
  94. package/dist/shared/types/index.d.ts +5 -0
  95. package/dist/shared/types/observations.d.ts +25 -0
  96. package/dist/shared/types/rbac.d.ts +67 -0
  97. package/dist/shared/types/report.d.ts +107 -0
  98. package/dist/shared/types/timeline.d.ts +2 -1
  99. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  100. package/dist/shared/utils/datePresets.d.ts +31 -0
  101. package/package.json +4 -2
  102. package/dist/api/types/copilot.d.ts +0 -157
  103. package/dist/api/types/storageServers.d.ts +0 -4
  104. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -0,0 +1,53 @@
1
+ export type RingCompleteLinkingPayload = {
2
+ nonce: string;
3
+ time: string;
4
+ };
5
+ /** The only auto-import status complete-linking returns today. */
6
+ export declare const RING_AUTO_IMPORT_QUEUED = "queued";
7
+ export type RingAutoImportStatus = typeof RING_AUTO_IMPORT_QUEUED;
8
+ export type RingCompleteLinkingResponsePayload = {
9
+ status: string;
10
+ /** Absent when the API did not schedule an import. */
11
+ autoImport?: RingAutoImportStatus;
12
+ };
13
+ export type RingDevice = {
14
+ deviceId: string;
15
+ name: string;
16
+ /** Resolved from Ring's `device-status`; null when Ring did not return it. */
17
+ online: boolean | null;
18
+ deviceType: string | null;
19
+ firmwareVersion: string | null;
20
+ /** Always null — Ring's API does not expose device power level. */
21
+ batteryLife: number | null;
22
+ location: string | null;
23
+ imported: boolean;
24
+ cameraExid?: string;
25
+ projectExid?: string;
26
+ projectName?: string;
27
+ };
28
+ export type RingDevicesResponsePayload = {
29
+ devices: RingDevice[];
30
+ };
31
+ export type RingMoveDevicePayload = {
32
+ projectExid: string;
33
+ };
34
+ export type RingMoveDeviceResponsePayload = {
35
+ status: string;
36
+ cameraExid: string;
37
+ projectExid: string;
38
+ };
39
+ export type RingLiveViewPayload = {
40
+ sdpOffer: string;
41
+ };
42
+ export type RingLiveViewResponse = {
43
+ sdpAnswer: string;
44
+ sessionUrl: string;
45
+ iceServers: Array<{
46
+ urls: string;
47
+ username?: string;
48
+ credential?: string;
49
+ }>;
50
+ };
51
+ export type RingStopLiveViewResponse = {
52
+ status: string;
53
+ };
@@ -3,23 +3,15 @@ export declare enum RoiType {
3
3
  AnprContext = "anpr_context",
4
4
  ExclusionZone = "exclusion_zone",
5
5
  WorkflowArea = "workflow_area",
6
- SiteAnalytics = "site_analytics"
6
+ SiteAnalytics = "site_analytics",
7
+ Ppe = "ppe_roi"
7
8
  }
8
9
  export declare enum RoiShapeType {
9
10
  Polygon = "polygon",
10
11
  Line = "line",
11
12
  Direction = "direction",
12
- Rectangle = "rectangle",
13
- ROIBox = "ROIBox"
13
+ Rectangle = "rectangle"
14
14
  }
15
- export type RoiShape = {
16
- id: number | null;
17
- name: string;
18
- x1: number;
19
- x2: number;
20
- y1: number;
21
- y2: number;
22
- };
23
15
  export declare enum RoiDirection {
24
16
  Arrived = "arrived",
25
17
  Left = "left",
@@ -1,6 +1,7 @@
1
1
  export type RouteParams = {
2
2
  projectExid?: string;
3
3
  cameraExid?: string;
4
+ mediaExid?: string;
4
5
  timestamp?: string;
5
6
  fromDate?: string;
6
7
  toDate?: string;
@@ -1,4 +1,4 @@
1
- import { Camera, PaginationParams, Project, Sim } from "@/types";
1
+ import { Camera, PaginationParams, Project, Sim } from "@evercam/api/types";
2
2
  export type RouterBillPayer = {
3
3
  name: string;
4
4
  };
@@ -1,7 +1,17 @@
1
- import { DateType } from "@/types";
1
+ import { DateType } from "@evercam/api/types";
2
+ export declare enum Operator {
3
+ AND = "and",
4
+ OR = "or"
5
+ }
2
6
  type sortby = string;
3
7
  type sortDirection = "asc" | "desc";
4
8
  export type SortingUrlParam = `${sortby}|${sortDirection}`;
9
+ export type JsonPrimitive = string | number | boolean | null;
10
+ export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
11
+ export type JsonObject = {
12
+ [key: string]: JsonValue;
13
+ };
14
+ export type JsonArray = JsonValue[];
5
15
  export type BatteryReading = {
6
16
  id: number;
7
17
  voltage: number;
@@ -53,7 +63,7 @@ export declare enum UnitSystem {
53
63
  Metric = "metric"
54
64
  }
55
65
  export type Timestamp = string | number;
56
- export type Schedule = {
66
+ export type ScheduleUppercase = {
57
67
  Friday: string[];
58
68
  Monday: string[];
59
69
  Saturday: string[];
@@ -71,6 +81,7 @@ export type ScheduleLowercase = {
71
81
  tuesday: string[];
72
82
  wednesday: string[];
73
83
  };
84
+ export type Schedule = ScheduleUppercase | ScheduleLowercase;
74
85
  export type PaginationParams = {
75
86
  sort?: SortingUrlParam;
76
87
  page?: number;
@@ -98,25 +109,18 @@ export declare enum InfoPage {
98
109
  DroneView = "drone-view",
99
110
  Compare = "compare",
100
111
  Timeline = "timeline",
101
- WeatherReport = "weather-report"
112
+ WeatherReport = "weather-report",
113
+ Cameras = "cameras"
102
114
  }
103
115
  export declare enum DownloadFileType {
104
116
  Jpeg = "jpeg",
105
117
  Pdf = "pdf",
106
118
  Csv = "csv"
107
119
  }
108
- export declare enum FeedbackContext {
109
- CopilotMessage = "copilot_message"
120
+ export declare enum PromiseSettledStatus {
121
+ Fulfilled = "fulfilled",
122
+ Rejected = "rejected"
110
123
  }
111
- export type FeedbackPayload<T> = {
112
- id?: number;
113
- user: string;
114
- text: string;
115
- type: T;
116
- context: FeedbackContext;
117
- messageId?: number;
118
- conversationId?: number;
119
- };
120
124
  export type Stringified<T> = string & {
121
125
  [P in keyof T]: {
122
126
  "_ value": T[P];
@@ -126,6 +130,21 @@ export interface JSON {
126
130
  stringify<T>(value: T, replacer?: (key: string, value: unknown) => unknown, space?: string | number): string & Stringified<T>;
127
131
  parse<T>(text: Stringified<T>, reviver?: (key: unknown, value: unknown) => unknown): T;
128
132
  }
133
+ export type TuplePoint2D = [number, number];
134
+ export type TuplePoint3D = [number, number, number];
135
+ export type Point2D = {
136
+ x: number;
137
+ y: number;
138
+ };
139
+ export type Point3D = {
140
+ x: number;
141
+ y: number;
142
+ z: number;
143
+ };
144
+ export type GeoPoint = {
145
+ lat: number;
146
+ lng: number;
147
+ };
129
148
  export type Exid = string;
130
149
  export type EntityByExid<Entity extends unknown> = Record<Exid, Entity>;
131
150
  export type BatteryVoltage = {
@@ -133,8 +152,16 @@ export type BatteryVoltage = {
133
152
  max_value: number;
134
153
  min_value: number;
135
154
  };
155
+ export declare enum GlobalSearchResource {
156
+ Projects = "projects",
157
+ Users = "users",
158
+ Cameras = "cameras",
159
+ Companies = "companies",
160
+ Sims = "sims",
161
+ Routers = "routers"
162
+ }
136
163
  export type GlobalSearchQueryParams = PaginationParams & {
137
- resource: "projects" | "users" | "cameras" | "companies" | "sims" | "routers";
164
+ resource: GlobalSearchResource;
138
165
  term: string;
139
166
  email: string;
140
167
  featureFlag: string;
@@ -152,16 +179,6 @@ export declare enum TimelinePrecision {
152
179
  Minute = "minute",
153
180
  Events = "events"
154
181
  }
155
- export type EntityStatsQueryParams = {
156
- period: "day" | "week" | "month";
157
- startDate: string;
158
- endDate: string;
159
- };
160
- export type EntityStat = {
161
- period: string;
162
- name: string;
163
- count: number;
164
- };
165
182
  export declare enum TaskStatus {
166
183
  Idle = "idle",
167
184
  Loading = "loading",
@@ -1,4 +1,4 @@
1
- import type { DateType } from "@/types";
1
+ import type { DateType } from "@evercam/api/types";
2
2
  export type ShareRequest = {
3
3
  cameraId: string;
4
4
  createdAt: DateType | number;
@@ -33,14 +33,6 @@ export type SharedUsersResponsePayload = Array<{
33
33
  email: string;
34
34
  name: string;
35
35
  }>;
36
- export type ShareCreateRequestPayload = {
37
- email: string[] | string;
38
- message?: string;
39
- permission?: string;
40
- rights: string;
41
- apiId?: string;
42
- apiKey?: string;
43
- };
44
36
  export type ShareCreateResponsePayload = {
45
37
  shares: Share[];
46
38
  shareRequests: ShareRequest[];
@@ -51,8 +43,3 @@ export declare enum InviteStatus {
51
43
  Used = 1,
52
44
  Failed = -2
53
45
  }
54
- export declare enum ShareVisibility {
55
- PublicDiscoverable = "publicDiscoverable",
56
- PublicUndiscoverable = "publicUndiscoverable",
57
- Private = "private"
58
- }
@@ -1,4 +1,4 @@
1
- import { DateTime, PaginationParams } from "@/types";
1
+ import { PaginationParams } from "@evercam/api/types";
2
2
  export declare enum SmsCommands {
3
3
  Cellular = "cellular",
4
4
  Gpson = "gpson",
@@ -63,7 +63,7 @@ export type Sim = {
63
63
  puk: string;
64
64
  iccid: string;
65
65
  description: string;
66
- lastSmsAt: DateTime;
66
+ lastSmsAt: string;
67
67
  cameras: {
68
68
  name: string;
69
69
  exid: string;
@@ -79,11 +79,11 @@ export type SendSmsResponse = {
79
79
  errorText: string;
80
80
  };
81
81
  export type SmsHistory = {
82
- insertedAt: DateTime;
82
+ insertedAt: string;
83
83
  type: string;
84
84
  status: string;
85
85
  text: string;
86
- deliveryDatetime: DateTime;
86
+ deliveryDatetime: string;
87
87
  };
88
88
  export type SmsHistoryResponse = {
89
89
  singleSimSms: SmsHistory[];
@@ -98,8 +98,8 @@ export type Sms = {
98
98
  status: string;
99
99
  text: string;
100
100
  type: string;
101
- insertedAt: DateTime;
102
- deliveryDatetime: DateTime;
101
+ insertedAt: string;
102
+ deliveryDatetime: string;
103
103
  };
104
104
  export type SmsQueryParams = PaginationParams & {
105
105
  dateRange: string;
@@ -1,14 +1,46 @@
1
- import { BBox, BoundingBox, DateType, Schedule, CameraExid, DateTime, DetectionModel, PaginationParams, PpeLabel, ProjectExid, CameraDateRangeFilter, CameraFeatureFlag, TimelineDateInterval, Camera, AdminCamera, _360FullProject, _360FloorId, PaginatedItems } 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, TuplePoint2D } 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 SmartSearchPart = {
7
+ export type SmartSearchObjectPart = {
8
8
  id?: string;
9
- type: SmartSearchPartType;
10
- value: DetectionLabel | SmartSearchOperatorType | SmartSearchConditionData | SmartSearchCondition | SmartSearchDateRange | string;
9
+ type: SmartSearchComponentType.Object;
10
+ value: DetectionLabel;
11
11
  };
12
+ export type SmartSearchOperatorPart = {
13
+ id?: string;
14
+ type: SmartSearchComponentType.Operator;
15
+ value: SmartSearchOperatorType;
16
+ };
17
+ export type SmartSearchConditionPart = {
18
+ id?: string;
19
+ type: SmartSearchComponentType.Condition;
20
+ value: SmartSearchCondition | SmartSearchConditionData;
21
+ };
22
+ export type SmartSearchViewPart = {
23
+ id?: string;
24
+ type: SmartSearchComponentType.View;
25
+ value: SiteAnalyticsView;
26
+ };
27
+ export type SmartSearchAreaPart = {
28
+ id?: string;
29
+ type: SmartSearchComponentType.Area;
30
+ value: BBox;
31
+ };
32
+ export type SmartSearchTimePart = {
33
+ id?: string;
34
+ type: SmartSearchComponentType.Time;
35
+ value: Schedule | ScheduleLowercase;
36
+ };
37
+ export type SmartSearchDateRangePart = {
38
+ id?: string;
39
+ type: SmartSearchComponentType.DateRange;
40
+ value: DateRangeFilter;
41
+ };
42
+ export type SmartSearchPart = SmartSearchObjectPart | SmartSearchOperatorPart | SmartSearchConditionPart | SmartSearchViewPart | SmartSearchAreaPart | SmartSearchTimePart | SmartSearchDateRangePart;
43
+ export type SmartSearchPartOrGroup = SmartSearchPart | SmartSearchPart[];
12
44
  export declare enum SmartSearchComponentType {
13
45
  Condition = "condition",
14
46
  Object = "object",
@@ -20,14 +52,10 @@ export declare enum SmartSearchComponentType {
20
52
  Heatmap = "heatmap"
21
53
  }
22
54
  export type SmartSearchPartType = SmartSearchComponentType | SmartSearchCondition;
23
- export type SmartSearchDateRange = {
24
- start: DateType;
25
- end: DateType;
26
- };
27
55
  export type SmartSearchComponentData = {
28
56
  id: string;
29
57
  type: SmartSearchComponentType;
30
- parts: SmartSearchPart[];
58
+ parts: SmartSearchPartOrGroup[];
31
59
  };
32
60
  export declare enum SmartSearchCondition {
33
61
  InArea = "in_area",
@@ -38,19 +66,35 @@ export type SmartSearchConditionData = {
38
66
  condition: SmartSearchCondition;
39
67
  value: string | BoundingBox | DetectionLabel | Date;
40
68
  };
41
- export type SmartSearchBackendQueryCondition = {
42
- type: SmartSearchConditionTypes;
69
+ type SmartSearchBackendConditionBase = {
43
70
  target: SmartSearchTargets;
44
- operator?: SmartSearchOperators;
45
- attribute?: string;
71
+ };
72
+ export type SmartSearchSelectionCondition = SmartSearchBackendConditionBase & {
73
+ type: SmartSearchConditionTypes.Selection;
74
+ operator: SmartSearchOperators;
75
+ attribute: string;
46
76
  value: string | number | string[];
47
- reference?: {
77
+ };
78
+ export type SmartSearchSpatialCondition = SmartSearchBackendConditionBase & {
79
+ type: SmartSearchConditionTypes.Spatial;
80
+ operator: SmartSearchOperators;
81
+ reference: {
48
82
  target: SmartSearchTargets;
49
83
  attribute: string;
50
84
  value: string | number | string[];
51
85
  };
52
- polygon?: BBox;
53
86
  };
87
+ export type SmartSearchAreaCondition = SmartSearchBackendConditionBase & {
88
+ type: SmartSearchConditionTypes.Area;
89
+ operator: SmartSearchOperators;
90
+ polygon: BBox;
91
+ };
92
+ export type SmartSearchGeoAreaCondition = SmartSearchBackendConditionBase & {
93
+ type: SmartSearchConditionTypes.GeoArea;
94
+ operator: SmartSearchOperators;
95
+ polygon: BBox;
96
+ };
97
+ export type SmartSearchBackendQueryCondition = SmartSearchSelectionCondition | SmartSearchSpatialCondition | SmartSearchAreaCondition | SmartSearchGeoAreaCondition;
54
98
  export type SmartSearchBackendQuery = {
55
99
  returnTargets: SmartSearchTargets[];
56
100
  rulesLogic: SmartSearchOperatorType;
@@ -59,6 +103,7 @@ export type SmartSearchBackendQuery = {
59
103
  conditions: SmartSearchBackendQueryCondition[];
60
104
  }[];
61
105
  returnType: SmartSearchReturnType;
106
+ timeSchedule?: Schedule;
62
107
  };
63
108
  export declare enum SmartSearchTargets {
64
109
  Tracking = "tracking",
@@ -93,28 +138,24 @@ export declare enum SmartSearchConditionTypes {
93
138
  Near = "near",
94
139
  Far = "far"
95
140
  }
96
- export type SmartSearchOptionValue = DetectionLabel | SmartSearchOperatorType | SmartSearchConditionData;
141
+ export type SmartSearchOptionValue = DetectionLabel | SmartSearchOperatorType | SmartSearchConditionData | DateRangeFilter | SiteAnalyticsView;
97
142
  export type SmartSearchBackendQueryPayload = {
98
- cameraExid: string;
99
143
  name: string;
100
144
  description: string;
101
- query: {
102
- req: SmartSearchBackendQuery;
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: SmartSearchBackendQuery;
116
- timeSchedule?: Schedule | undefined;
117
- };
158
+ query: SmartSearchBackendQuery;
118
159
  params: Record<string, string>;
119
160
  components?: Omit<SmartSearchPart, "id">[];
120
161
  toDate?: DateType;
@@ -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;
@@ -143,7 +184,7 @@ export type DetectionsExportRequestParams = DetectionsRequestParams & {
143
184
  directDownload?: boolean;
144
185
  };
145
186
  export type SmartSearchHeatmapPoint = {
146
- coordinates: [number, number];
187
+ coordinates: TuplePoint2D;
147
188
  detectionsCount: number;
148
189
  };
149
190
  export type SmartSearchHeatmapData = {
@@ -165,14 +206,17 @@ export declare enum SiteAnalyticsViewType {
165
206
  Camera = "camera",
166
207
  ThreeSixty = "360"
167
208
  }
168
- type SiteAnalyticsViewByType = {
169
- [SiteAnalyticsViewType.Camera]: Camera | AdminCamera;
170
- [SiteAnalyticsViewType.ThreeSixty]: _360FullProject;
209
+ export type SiteAnalyticsCameraView = {
210
+ type: SiteAnalyticsViewType.Camera;
211
+ id: CameraExid;
212
+ value: Camera | AdminCamera;
171
213
  };
172
- export type SiteAnalyticsView<T extends SiteAnalyticsViewType = SiteAnalyticsViewType.Camera> = {
173
- type: SiteAnalyticsViewType;
174
- value: SiteAnalyticsViewByType[T];
214
+ export type SiteAnalytics360View = {
215
+ type: SiteAnalyticsViewType.ThreeSixty;
216
+ id: _360FloorId;
217
+ value: _360FloorV2;
175
218
  };
219
+ export type SiteAnalyticsView = SiteAnalyticsCameraView | SiteAnalytics360View;
176
220
  export type SiteAnalyticsProcessingStatusPayload = {
177
221
  projectExid?: ProjectExid;
178
222
  fromDate?: DateType;
@@ -188,7 +232,7 @@ export type SiteAnalyticsProcessingStatus = {
188
232
  feature: CameraFeatureFlag;
189
233
  processedIntervals: TimelineDateInterval[];
190
234
  };
191
- export type SmartSearchRequestPayload = {
235
+ export type SmartSearchRequestPayload = PaginationParams & {
192
236
  cameraExids?: CameraExid[];
193
237
  drawingIds?: _360FloorId[];
194
238
  walkIds?: string[];
@@ -196,8 +240,6 @@ export type SmartSearchRequestPayload = {
196
240
  payload: SmartSearchBackendQuery;
197
241
  fromDate?: string;
198
242
  toDate?: string;
199
- page?: number;
200
- pageSize?: number;
201
243
  threshold?: number;
202
244
  };
203
245
  type SmartSearchResultItemBase = {
@@ -231,11 +273,7 @@ type SmartSearchResultItemByType = {
231
273
  [SmartSearchReturnType.FirstLastSeen]: SmartSearchResultItemFirstLastSeen;
232
274
  [SmartSearchReturnType.All]: SmartSearchResultItemAll;
233
275
  };
234
- export type SmartSearchResponse<R extends SmartSearchReturnType = SmartSearchReturnType.FirstLastSeen> = {
235
- data: PaginatedItems<SmartSearchResultItemByType[R]>;
236
- message?: string;
237
- success: boolean;
238
- };
276
+ export type SmartSearchResponse<R extends SmartSearchReturnType = SmartSearchReturnType.FirstLastSeen> = PaginatedItems<SmartSearchResultItemByType[R]>;
239
277
  export type SmartSearchMinifiedPart = {
240
278
  t: SmartSearchComponentType;
241
279
  v: unknown;
@@ -0,0 +1,127 @@
1
+ import { CameraExid, DateType, PaginationParams, ProjectExid } from "@evercam/api/types";
2
+ export declare enum VisionProvider {
3
+ Gemini = "gemini",
4
+ Gemma = "gemma"
5
+ }
6
+ export declare const VISION_PROVIDER_OPTIONS: {
7
+ text: string;
8
+ value: VisionProvider;
9
+ }[];
10
+ export type SiteAnalyticsCoolifyStatus = {
11
+ appUuid: string | null;
12
+ name: string | null;
13
+ serverUuid: string | null;
14
+ serverName: string | null;
15
+ appUrl: string | null;
16
+ status: string | null;
17
+ isRunning: boolean;
18
+ updatedAt: string | null;
19
+ };
20
+ export type SiteAnalyticsProjectMeta = {
21
+ exid: ProjectExid;
22
+ name: string | null;
23
+ timezone: string | null;
24
+ featureFlags: string[] | null;
25
+ };
26
+ export type SiteAnalyticsCameraMeta = {
27
+ exid: CameraExid;
28
+ name: string | null;
29
+ status: string | null;
30
+ featureFlags: string[] | null;
31
+ };
32
+ export type SiteAnalyticsManagedApp = {
33
+ id: number;
34
+ projectExid: ProjectExid;
35
+ cameraExid: CameraExid;
36
+ coolifyAppId: string | null;
37
+ appVersion: string;
38
+ modelId: number | null;
39
+ startDate: DateType | null;
40
+ endDate: DateType | null;
41
+ startHour: number;
42
+ endHour: number;
43
+ source: string;
44
+ override: boolean;
45
+ timeIncreaseFrequency: number;
46
+ skipWeekends: boolean;
47
+ tracking: boolean;
48
+ observations: boolean;
49
+ visionProvider?: VisionProvider | null;
50
+ insertedAt: DateType | null;
51
+ updatedAt: DateType | null;
52
+ coolify: SiteAnalyticsCoolifyStatus | null;
53
+ project: SiteAnalyticsProjectMeta | null;
54
+ camera: SiteAnalyticsCameraMeta | null;
55
+ lastTrackingAt: DateType | null;
56
+ };
57
+ export type CreateSiteAnalyticsAppPayload = {
58
+ projectExid: ProjectExid;
59
+ cameraExid: CameraExid;
60
+ coolifyServerUuid: string;
61
+ appVersion?: string;
62
+ modelId?: number | null;
63
+ startDate?: DateType | null;
64
+ endDate?: DateType | null;
65
+ startHour?: number;
66
+ endHour?: number;
67
+ source?: string;
68
+ override?: boolean;
69
+ skipWeekends?: boolean;
70
+ timeIncreaseFrequency?: number;
71
+ tracking?: boolean;
72
+ observations?: boolean;
73
+ observationPromptId?: number | null;
74
+ visionProvider?: VisionProvider;
75
+ };
76
+ export type UpdateSiteAnalyticsAppPayload = Partial<Omit<CreateSiteAnalyticsAppPayload, "projectExid" | "cameraExid" | "coolifyServerUuid">>;
77
+ export type ModelOption = {
78
+ modelId: number;
79
+ version: string;
80
+ };
81
+ export type SiteAnalyticsAppConfigFormValue = {
82
+ appVersion: string;
83
+ modelId: number | null;
84
+ startDate: string | null;
85
+ endDate: string | null;
86
+ startHour: number;
87
+ endHour: number;
88
+ source: string;
89
+ override: boolean;
90
+ timeIncreaseFrequency: number;
91
+ skipWeekends: boolean;
92
+ };
93
+ export type SiteAnalyticsManagementListParams = PaginationParams & {
94
+ projectExid?: ProjectExid;
95
+ includeStatus?: boolean;
96
+ };
97
+ export type CreateSiteAnalyticsAppResponse = {
98
+ created: boolean;
99
+ id: number | null;
100
+ data: SiteAnalyticsManagedApp | null;
101
+ count: number | null;
102
+ message: string;
103
+ };
104
+ export type DeleteSiteAnalyticsAppResponse = {
105
+ deleted: boolean;
106
+ count: number;
107
+ message: string;
108
+ };
109
+ export type ObservationConfigActivity = {
110
+ observationTypeId: number;
111
+ every: number | null;
112
+ };
113
+ export type ObservationConfig = {
114
+ id: number;
115
+ cameraExid: CameraExid;
116
+ projectExid: ProjectExid | null;
117
+ enabled: boolean;
118
+ activities: ObservationConfigActivity[];
119
+ createdBy: string | null;
120
+ insertedAt: DateType | null;
121
+ updatedAt: DateType | null;
122
+ };
123
+ export type UpsertObservationConfigPayload = {
124
+ projectExid?: ProjectExid;
125
+ enabled: boolean;
126
+ activities: ObservationConfigActivity[];
127
+ };