@evercam/api 1.0.0-9c3cd2ae7 → 1.0.0-9c7d9f97f

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 (56) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +13 -14
  2. package/dist/api/api/adminApi.d.ts +7 -6
  3. package/dist/api/api/aiApi.d.ts +67 -2
  4. package/dist/api/api/authzApi.d.ts +2 -2
  5. package/dist/api/api/evercamApi.d.ts +13 -6
  6. package/dist/api/api/evercamLabsApi.d.ts +1 -12
  7. package/dist/api/api/index.d.ts +1 -0
  8. package/dist/api/api/ingestApi.d.ts +11 -8
  9. package/dist/api/api/workflowsApi.d.ts +15 -0
  10. package/dist/api/types/360.d.ts +26 -81
  11. package/dist/api/types/aiConfigs.d.ts +102 -12
  12. package/dist/api/types/analytics.d.ts +15 -23
  13. package/dist/api/types/auditLogs.d.ts +0 -1
  14. package/dist/api/types/authz.d.ts +34 -9
  15. package/dist/api/types/automation.d.ts +32 -4
  16. package/dist/api/types/axios.d.ts +1 -4
  17. package/dist/api/types/bim.d.ts +3 -5
  18. package/dist/api/types/camera.d.ts +26 -21
  19. package/dist/api/types/comments.d.ts +7 -1
  20. package/dist/api/types/company.d.ts +1 -2
  21. package/dist/api/types/compare.d.ts +1 -1
  22. package/dist/api/types/drone.d.ts +1 -2
  23. package/dist/api/types/errors.d.ts +2 -1
  24. package/dist/api/types/gateReport.d.ts +0 -11
  25. package/dist/api/types/gateReportManagement.d.ts +2 -7
  26. package/dist/api/types/index.d.ts +2 -2
  27. package/dist/api/types/ingest.d.ts +75 -0
  28. package/dist/api/types/kit.d.ts +6 -50
  29. package/dist/api/types/media.d.ts +1 -2
  30. package/dist/api/types/notification.d.ts +42 -2
  31. package/dist/api/types/observationEvents.d.ts +141 -0
  32. package/dist/api/types/observations.d.ts +36 -37
  33. package/dist/api/types/planner.d.ts +1 -8
  34. package/dist/api/types/project.d.ts +14 -2
  35. package/dist/api/types/recording.d.ts +2 -4
  36. package/dist/api/types/ring.d.ts +16 -16
  37. package/dist/api/types/roi.d.ts +0 -9
  38. package/dist/api/types/shared.d.ts +2 -23
  39. package/dist/api/types/shares.d.ts +0 -13
  40. package/dist/api/types/siteAnalytics.d.ts +1 -3
  41. package/dist/api/types/siteAnalyticsManagement.d.ts +39 -4
  42. package/dist/api/types/siteView.d.ts +6 -1
  43. package/dist/api/types/storyblok.d.ts +0 -13
  44. package/dist/api/types/timelapse.d.ts +1 -8
  45. package/dist/api/types/user.d.ts +15 -0
  46. package/dist/api/types/workflows.d.ts +108 -0
  47. package/dist/api/utils.d.ts +1 -0
  48. package/dist/index.js +1037 -810
  49. package/dist/index.js.map +1 -1
  50. package/dist/index.umd.cjs +1 -1
  51. package/dist/index.umd.cjs.map +1 -1
  52. package/dist/shared/types/components.d.ts +180 -42
  53. package/dist/shared/types/observations.d.ts +4 -0
  54. package/package.json +1 -1
  55. package/dist/api/types/copilot.d.ts +0 -162
  56. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,8 +1,17 @@
1
- import { type _360Scene, type Media, type DroneModel, type MobileCaptureSnapshot, type TimelineDateInterval, type TimelinePrecision, type Comment, type ProcoreUserProject, type ProcoreProjectAlbum, type ProcoreObservationType, type AconexUserProject, type AutodeskUserHub, type AutodeskProject, type AutodeskFolder, type ProcoreType, type HammertechProject, type HammertechIssueType, type HammertechPriority, type HammertechClassification, type HammertechFileFieldValue, TaskStatus, Tag, TuplePoint2D } from "@evercam/shared/types";
2
- import type { AdminCamera, IngestUploadInitResponse } from "@evercam/api/types";
1
+ import { type _360Scene, type Media, type DroneModel, type MobileCaptureSnapshot, type TimelineDateInterval, type TimelinePrecision, type Comment, type ProcoreUserProject, type ProcoreProjectAlbum, type ProcoreObservationType, type AconexUserProject, type AutodeskUserHub, type AutodeskProject, type AutodeskFolder, type ProcoreType, type HammertechProject, type HammertechIssueType, type HammertechPriority, type HammertechClassification, type HammertechFileFieldValue, Tag, TuplePoint2D, CameraStatus } from "@evercam/shared/types";
2
+ import type { _360AssetType, AdminCamera, Camera, IngestUploadInitResponse } from "@evercam/api/types";
3
3
  import type { TimelineChartType, TimelineEvent, TimelineEventsGroup } from "@evercam/ui";
4
4
  import { TimelineDataProvider } from "@evercam/shared/components/timelinePlayer/providers";
5
5
  import { SeriesOptionsType } from "highcharts";
6
+ export type ReorderableCamera = Camera & {
7
+ thumbnailSrc?: string;
8
+ batteryLevel?: {
9
+ voltage: number;
10
+ level: string;
11
+ icon: string;
12
+ color: string;
13
+ } | null;
14
+ };
6
15
  export type SelectItem = {
7
16
  text: string;
8
17
  value: string | number;
@@ -42,8 +51,130 @@ export declare enum IframeMessageType {
42
51
  ForgeTokenResponse = "ForgeTokenResponse",
43
52
  ShowBimUploadChoice = "showBimUploadChoice",
44
53
  ViewerLaunchFlags = "viewerLaunchFlags",
45
- CloseCameraMarkerPreview = "CloseCameraMarkerPreview"
54
+ Fetch360DrawingIds = "fetch360DrawingIds",
55
+ DrawingIdsResponse = "drawingIdsResponse",
56
+ CloseCameraMarkerPreview = "CloseCameraMarkerPreview",
57
+ ChatInit = "chatInit",
58
+ ChatToken = "chatToken",
59
+ ChatContext = "chatContext",
60
+ ChatTheme = "chatTheme",
61
+ ChatNavigate = "chatNavigate",
62
+ ChatConversations = "chatConversations",
63
+ ChatOpenConversation = "chatOpenConversation",
64
+ ChatNewConversation = "chatNewConversation",
65
+ ChatRenameConversation = "chatRenameConversation",
66
+ ChatDeleteConversation = "chatDeleteConversation",
67
+ ChatOpenWalkMarker = "chatOpenWalkMarker",
68
+ ProjectMembers = "projectMembers",
69
+ FocusComment = "focusComment"
70
+ }
71
+ export declare enum ChatTheme {
72
+ Dark = "dark",
73
+ Light = "light"
46
74
  }
75
+ export type ChatUser = {
76
+ email: string;
77
+ name: string;
78
+ };
79
+ /**
80
+ * The dashboard's answer to the frame's `Ready`.
81
+ *
82
+ * The token travels here and nowhere else — never in the iframe URL, which
83
+ * would land it in history, referrers and logs.
84
+ */
85
+ export type ChatInitPayload = {
86
+ token: string;
87
+ user: ChatUser;
88
+ theme: ChatTheme;
89
+ timezone: string;
90
+ };
91
+ /** Pushed on rotation. A frame holding a mount-time token 401s the moment it changes. */
92
+ export type ChatTokenPayload = {
93
+ token: string;
94
+ };
95
+ /** Pushed on every dashboard route change. */
96
+ export type ChatContextPayload = {
97
+ pageId: string;
98
+ projectExid: string | null;
99
+ projectName: string | null;
100
+ cameraExid: string | null;
101
+ timezone: string;
102
+ /**
103
+ * A conversation to open, from `?chat=` on the dashboard's URL.
104
+ *
105
+ * Deep-linking lives in the *context* rather than in a message of its own
106
+ * because it is exactly that — a fact about where the host currently is, sent
107
+ * on every route change alongside the project and page. `null` means "no
108
+ * opinion", which is what every other page sends.
109
+ */
110
+ chatId: string | null;
111
+ };
112
+ export type ChatThemePayload = {
113
+ theme: ChatTheme;
114
+ };
115
+ /**
116
+ * A page id plus params, never a route string — the dashboard owns the
117
+ * id → route mapping.
118
+ */
119
+ export type ChatNavigatePayload = {
120
+ pageId: string;
121
+ params: Record<string, string>;
122
+ };
123
+ /**
124
+ * Open a 360-walk marker in the 360 viewer, facing one view.
125
+ *
126
+ * Sent by Chat when a `WalkView` in an answer is clicked. The dashboard opens the
127
+ * 360 app in its own dialog (`Walk360Preview`), outside the chat frame, so the
128
+ * viewer gets the whole screen. `walkName` and `walkDate` are how the 360 app
129
+ * knows a walk (its `floor` and `date` URL params); `camera` is the viewer's own
130
+ * azimuth/polar angles for that view, or null to open at the marker's default.
131
+ */
132
+ export type ChatOpenWalkMarkerPayload = {
133
+ projectExid: string;
134
+ walkId: string;
135
+ walkName: string;
136
+ walkDate: string;
137
+ markerId: string;
138
+ view: string;
139
+ camera: {
140
+ azimuthAngle: number;
141
+ polarAngle: number;
142
+ } | null;
143
+ };
144
+ /**
145
+ * One conversation, as the dashboard's sidebar needs it.
146
+ *
147
+ * A deliberate projection of the engine's `ChatSession` — a label and a
148
+ * timestamp, nothing else. The transcript stays in the frame: mirroring `turns`
149
+ * would put every message of every conversation on the bridge each time the list
150
+ * changed, to render a row that shows neither.
151
+ */
152
+ export type ChatSessionSummary = {
153
+ id: string;
154
+ title: string | null;
155
+ updatedAt: string;
156
+ };
157
+ /**
158
+ * The frame's conversation list, mirrored up for the left sidebar to draw.
159
+ *
160
+ * The frame stays the single owner of this data — it holds the engine client and
161
+ * the bearer. The host renders and sends intent back; it never fetches.
162
+ */
163
+ export type ChatConversationsPayload = {
164
+ sessions: ChatSessionSummary[];
165
+ openId: string | null;
166
+ isLoading: boolean;
167
+ };
168
+ export type ChatOpenConversationPayload = {
169
+ id: string;
170
+ };
171
+ export type ChatRenameConversationPayload = {
172
+ id: string;
173
+ title: string;
174
+ };
175
+ export type ChatDeleteConversationPayload = {
176
+ id: string;
177
+ };
47
178
  export declare enum NavigationArrow {
48
179
  Previous = "previous",
49
180
  Next = "next"
@@ -59,24 +190,6 @@ export declare enum PlayerMode {
59
190
  Video = "video",
60
191
  Jpegs = "jpegs"
61
192
  }
62
- export type TasksStatusMap = {
63
- [key: string]: TaskStatus;
64
- };
65
- export type TaskProgressItem = {
66
- status: TaskStatus;
67
- description: string;
68
- percentDone?: number;
69
- duration?: number;
70
- };
71
- export type GlobalSearchMatch = {
72
- path: Array<string>;
73
- value: string | number | boolean;
74
- };
75
- export type GlobalSearchResult = {
76
- index: number;
77
- matches: Array<GlobalSearchMatch>;
78
- };
79
- export type GlobalSearchResultInput = Array<Record<any, any> | Array<any>>;
80
193
  export type TimelineProviderRequestParams = TimelineDateInterval & {
81
194
  precision?: TimelinePrecision;
82
195
  labels?: string[];
@@ -251,14 +364,6 @@ export type SnapshotCardItem = {
251
364
  placeholderThumbnailUrl?: string;
252
365
  fallbackThumbnailUrl?: string;
253
366
  };
254
- export type DocumentExtended = Document & {
255
- webkitIsFullScreen?: boolean;
256
- mozFullScreen?: boolean;
257
- msFullscreenElement?: Element | null;
258
- fullscreenElement?: Element;
259
- webkitFullscreenElement?: Element;
260
- mozFullScreenElement?: Element;
261
- };
262
367
  export type HighchartsSeriesWithData<T extends number = number> = SeriesOptionsType & {
263
368
  data: T[];
264
369
  };
@@ -271,9 +376,13 @@ export type FormattedNotificationData = {
271
376
  titleSegments?: NotificationTitleSegment[];
272
377
  link: string;
273
378
  thumbnail?: string;
274
- icon?: string;
275
- drone?: boolean;
276
- is360?: boolean;
379
+ icon: string;
380
+ excerpt?: string;
381
+ commentTarget?: {
382
+ commentId: number;
383
+ dateId: string | number;
384
+ floorId: string;
385
+ };
277
386
  };
278
387
  export type FormattedNotification = FormattedNotificationData & {
279
388
  date: string;
@@ -332,7 +441,6 @@ export interface MediaHubSortParameter {
332
441
  export type TableHeaderParams<TItem = unknown> = {
333
442
  value: string;
334
443
  text: string;
335
- cellClass?: string;
336
444
  align?: string;
337
445
  sortable?: boolean;
338
446
  visible?: boolean;
@@ -349,26 +457,56 @@ export type BimUploadFileResult = {
349
457
  title: string;
350
458
  fileExtension: string;
351
459
  };
460
+ export type CameraCardItem = {
461
+ thumbnail: string;
462
+ title: string;
463
+ exid: string;
464
+ status: CameraStatus;
465
+ disabled: boolean;
466
+ to: string;
467
+ isOffline: boolean;
468
+ isWaiting: boolean;
469
+ isUnderNda: boolean;
470
+ isAdmin: boolean;
471
+ batteryVoltage: number | null;
472
+ };
473
+ export type ThreeSixtyGalleryView = "drawings" | "walks";
352
474
  export interface ThreeSixtyWalk {
353
475
  id: string;
354
476
  name: string;
355
477
  date: string;
478
+ monthKey: string;
356
479
  color: string;
357
480
  dateId: string;
358
481
  floorId: string;
482
+ commentCount: number;
483
+ hasBim: boolean;
484
+ hasMinimodel: boolean;
359
485
  }
360
486
  export interface ThreeSixtyWalkGroup {
361
487
  date: string;
362
488
  walks: ThreeSixtyWalk[];
363
489
  }
364
- export type DatePresetContext = {
365
- minDate?: string;
366
- maxDate: string;
367
- effectiveMinDate?: string;
368
- effectiveMaxDate: string;
490
+ export type ThreeSixtyMediaDownloadOption = {
491
+ type: _360AssetType;
492
+ title: string;
493
+ icon: string;
369
494
  };
370
- export type DatePreset = {
371
- name: string;
372
- resolveRange?: (ctx: DatePresetContext) => [string, string];
373
- isHide?: (ctx: DatePresetContext) => boolean;
495
+ export type DrawingSelection = {
496
+ pageNumber: number;
497
+ size: number;
498
+ thumbnail: string | null;
499
+ pageCount: number;
500
+ };
501
+ export type CommentCardComment = {
502
+ id?: number | string;
503
+ content?: string;
504
+ createdAt?: string;
505
+ archivedAt?: string;
506
+ creatorName?: string;
507
+ label?: string;
508
+ timestamp?: string;
509
+ cameraExid?: string;
510
+ position3d?: number[];
511
+ canDelete?: boolean;
374
512
  };
@@ -19,3 +19,7 @@ export type ObservationsTableOptionsUpdate = {
19
19
  export type ObservationsEventsTableState = {
20
20
  height: number | string;
21
21
  };
22
+ export type ObservationTypeOption = {
23
+ value: string;
24
+ label: string;
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evercam/api",
3
- "version": "1.0.0-9c3cd2ae7",
3
+ "version": "1.0.0-9c7d9f97f",
4
4
  "description": "Evercam API client",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,162 +0,0 @@
1
- import type { AnalyticsEventPageId, CameraExid, CameraFeatureFlag, CameraStatus, ProjectExid, ProjectFeatureFlag, ProjectStatus } from "@evercam/api/types";
2
- export declare enum CopilotMessageAuthor {
3
- Copilot = "copilot",
4
- User = "user",
5
- System = "system"
6
- }
7
- export declare enum CopilotMessageType {
8
- Text = "text",
9
- Progress = "progress",
10
- Error = "error",
11
- Json = "json"
12
- }
13
- export type CopilotMessage = {
14
- content: string;
15
- url?: string;
16
- type: CopilotMessageType;
17
- id?: number;
18
- conversationId?: number;
19
- };
20
- export declare enum CopilotStepId {
21
- SendToLLM = "send_to_llm",
22
- FunctionCallRequest = "function_call_request",
23
- ExecFunctionCall = "exec_function_call",
24
- SendToUser = "send_to_user",
25
- RequestMissingFields = "request_missing_fields",
26
- CompletedFieldsResponse = "completed_fields_response",
27
- SendRawToolCallResponse = "send_raw_tool_call_response",
28
- SubmitToolOutputsToLLM = "submit_tool_outputs_to_llm",
29
- CancelCall = "cancel_call",
30
- RequestAgentCall = "request_agent_call",
31
- ExecAgentCall = "exec_agent_call"
32
- }
33
- export declare enum CopilotMissingFieldsLabels {
34
- ProjectExid = "Project",
35
- CameraExid = "Camera",
36
- FromDate = "Start date",
37
- ToDate = "End date"
38
- }
39
- export type CopilotMissingField<T = unknown> = {
40
- name: string;
41
- label: string;
42
- value: unknown;
43
- type: string;
44
- toolId: string;
45
- error?: T;
46
- };
47
- export type CopilotMissingFields = Record<number, CopilotMissingField[]>;
48
- export type UserConversations = CopilotConversation & {
49
- Message: CopilotMessage[];
50
- };
51
- export declare enum CopilotSocketEvent {
52
- ConversationStart = "conversation:start",
53
- ConversationCreated = "conversation:created",
54
- LLMMessageChunk = "llm:message:chunk",
55
- LLMMessageComplete = "llm:message:complete",
56
- LLMMessageLoading = "llm:message:loading",
57
- LLMRequestCancel = "llm:request:cancel",
58
- LLMRequestCanceled = "llm:request:canceled",
59
- UserMessage = "user:message",
60
- ContextError = "chat:contextError",
61
- ChatError = "chat:chatError",
62
- MissingFields = "chat:missingFields",
63
- MissingFieldsCompleted = "chat:missingFields:completed",
64
- SystemToolCallResponse = "system:toolCall:response",
65
- ChangeProvider = "chat:changeProvider"
66
- }
67
- export type CopilotConversation = {
68
- id: number;
69
- user: string;
70
- model: string;
71
- context: string;
72
- cameraExid: CameraExid;
73
- projectExid: ProjectExid;
74
- startDate: string;
75
- endDate: string;
76
- messagesCount: number;
77
- };
78
- export declare enum CopilotProvider {
79
- Gemini = "gemini",
80
- ChatGPT = "chatgpt"
81
- }
82
- export declare enum CopilotSuggestion {
83
- UserManual = "user_manual",
84
- GateReport = "gate_report",
85
- Weather = "weather",
86
- Clip = "clip",
87
- Timelapse = "timelapse",
88
- Chart = "chart",
89
- SmartSearch = "smart_search"
90
- }
91
- export declare enum CopilotChatProvider {
92
- Gemini = "gemini",
93
- ChatGpt = "chatGpt"
94
- }
95
- export declare enum CopilotLayout {
96
- Floating = "floating"
97
- }
98
- export declare enum CopilotToolId {
99
- GetReports = "getReports",
100
- GetVehiclesDetections = "getVehiclesDetections",
101
- GetVehiclesDetectionsCounts = "getVehiclesDetectionsCounts",
102
- GetWeather = "getWeather",
103
- CreateClip = "createClip",
104
- NavigateToPage = "navigateToPage",
105
- CreateTimelapse = "createTimelapse",
106
- RequestMissingFields = "requestMissingFields",
107
- RenderCharts = "renderCharts",
108
- SmartSearch = "smartSearch"
109
- }
110
- export type CopilotSystemToolCallResponse<I = unknown, O = unknown> = {
111
- toolId?: CopilotToolId;
112
- input?: I;
113
- output?: O;
114
- isAgent?: boolean;
115
- };
116
- export type CopilotCamera = {
117
- name: string;
118
- exid: CameraExid;
119
- status: CameraStatus;
120
- featureFlags?: CameraFeatureFlag[];
121
- };
122
- export type CopilotProject = {
123
- name: string;
124
- exid: ProjectExid;
125
- status: ProjectStatus;
126
- featureFlags?: ProjectFeatureFlag[];
127
- cameras?: CopilotCamera[];
128
- };
129
- export type CopilotMessageContext = {
130
- pageId?: AnalyticsEventPageId;
131
- selectedCamera?: CopilotCamera;
132
- selectedProject?: CopilotProject;
133
- };
134
- export type CopilotMessageStep = {
135
- args: string[];
136
- depth: number;
137
- id?: number;
138
- message_id?: number;
139
- step: CopilotStepId;
140
- timestamp: string;
141
- };
142
- export declare enum CopilotMissingFieldComponent {
143
- Select = "SelectField",
144
- DateTime = "DateTimeField",
145
- Schedule = "ScheduleField",
146
- MultiOptions = "MultiOptionsField",
147
- Switch = "SwitchField"
148
- }
149
- export declare enum CopilotMissingFieldName {
150
- ProjectExid = "projectExid",
151
- CameraExid = "cameraExid",
152
- FromDate = "fromDate",
153
- ToDate = "toDate",
154
- Schedule = "schedule",
155
- Duration = "duration"
156
- }
157
- export declare enum CopilotMissingFieldType {
158
- Boolean = "boolean",
159
- String = "string",
160
- Number = "number"
161
- }
162
- export type CopilotCompletedFields = Record<string, unknown>;
@@ -1,15 +0,0 @@
1
- export type VendorModel = {
2
- cameraCount: number;
3
- exid: string;
4
- h264Url: string;
5
- jpgUrl: string;
6
- name: string;
7
- online: number;
8
- playbackUrl: string;
9
- };
10
- export type VendorModelRequestPayload = {
11
- sort: string;
12
- };
13
- export type VendorModelResponsePayload = {
14
- data: VendorModel[];
15
- };