@evercam/api 1.0.0-97ed1b3dd → 1.0.0-98c24a63e

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 (36) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +8 -2
  2. package/dist/api/api/adminApi.d.ts +2 -2
  3. package/dist/api/api/evercamApi.d.ts +8 -13
  4. package/dist/api/api/evercamLabsApi.d.ts +1 -12
  5. package/dist/api/api/index.d.ts +1 -0
  6. package/dist/api/api/ingestApi.d.ts +23 -25
  7. package/dist/api/api/workflowsApi.d.ts +15 -0
  8. package/dist/api/types/360.d.ts +5 -1
  9. package/dist/api/types/analytics.d.ts +12 -15
  10. package/dist/api/types/auditLogs.d.ts +1 -3
  11. package/dist/api/types/axios.d.ts +1 -0
  12. package/dist/api/types/bim.d.ts +1 -1
  13. package/dist/api/types/camera.d.ts +2 -0
  14. package/dist/api/types/comments.d.ts +7 -1
  15. package/dist/api/types/company.d.ts +1 -2
  16. package/dist/api/types/compare.d.ts +1 -1
  17. package/dist/api/types/errors.d.ts +4 -1
  18. package/dist/api/types/index.d.ts +1 -1
  19. package/dist/api/types/ingest.d.ts +88 -25
  20. package/dist/api/types/kit.d.ts +1 -50
  21. package/dist/api/types/media.d.ts +1 -2
  22. package/dist/api/types/notification.d.ts +12 -1
  23. package/dist/api/types/project.d.ts +7 -2
  24. package/dist/api/types/shared.d.ts +10 -12
  25. package/dist/api/types/siteView.d.ts +6 -1
  26. package/dist/api/types/workflows.d.ts +108 -0
  27. package/dist/api/utils.d.ts +1 -0
  28. package/dist/index.js +718 -661
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.umd.cjs +1 -1
  31. package/dist/index.umd.cjs.map +1 -1
  32. package/dist/shared/types/components.d.ts +144 -12
  33. package/dist/shared/types/droneUpload.d.ts +66 -0
  34. package/dist/shared/types/index.d.ts +1 -0
  35. package/package.json +1 -1
  36. package/dist/api/types/copilot.d.ts +0 -159
@@ -1,5 +1,5 @@
1
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 { AdminCamera, Camera, IngestUploadInitResponse } from "@evercam/api/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";
@@ -53,8 +53,128 @@ export declare enum IframeMessageType {
53
53
  ViewerLaunchFlags = "viewerLaunchFlags",
54
54
  Fetch360DrawingIds = "fetch360DrawingIds",
55
55
  DrawingIdsResponse = "drawingIdsResponse",
56
- CloseCameraMarkerPreview = "CloseCameraMarkerPreview"
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"
57
70
  }
71
+ export declare enum ChatTheme {
72
+ Dark = "dark",
73
+ Light = "light"
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
+ };
58
178
  export declare enum NavigationArrow {
59
179
  Previous = "previous",
60
180
  Next = "next"
@@ -257,6 +377,12 @@ export type FormattedNotificationData = {
257
377
  link: string;
258
378
  thumbnail?: string;
259
379
  icon: string;
380
+ excerpt?: string;
381
+ commentTarget?: {
382
+ commentId: number;
383
+ dateId: string | number;
384
+ floorId: string;
385
+ };
260
386
  };
261
387
  export type FormattedNotification = FormattedNotificationData & {
262
388
  date: string;
@@ -361,16 +487,10 @@ 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;
369
- };
370
- export type DatePreset = {
371
- name: string;
372
- resolveRange?: (ctx: DatePresetContext) => [string, string];
373
- isHide?: (ctx: DatePresetContext) => boolean;
490
+ export type ThreeSixtyMediaDownloadOption = {
491
+ type: _360AssetType;
492
+ title: string;
493
+ icon: string;
374
494
  };
375
495
  export type DrawingSelection = {
376
496
  pageNumber: number;
@@ -378,3 +498,15 @@ export type DrawingSelection = {
378
498
  thumbnail: string | null;
379
499
  pageCount: number;
380
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;
512
+ };
@@ -0,0 +1,66 @@
1
+ import type { AerialAllocation, DroneFlightMetadata, DroneFileState, DroneFileError } from "@evercam/api/types";
2
+ export declare enum DroneUploadErrorCode {
3
+ Offline = "offline",
4
+ UploadStalled = "upload_stalled",
5
+ AuthorizationExpired = "upload_authorization_expired",
6
+ UploadRejected = "upload_rejected",
7
+ ConnectionLost = "connection_lost",
8
+ UploadStopped = "upload_stopped",
9
+ UploadCancelled = "upload_cancelled",
10
+ DuplicateFilenames = "duplicate_filenames",
11
+ DifferentFlight = "different_flight",
12
+ ProcessingClosed = "processing_closed",
13
+ PartialUploadFailed = "partial_upload_failed",
14
+ NotSubmitted = "not_submitted"
15
+ }
16
+ export type AerialUploadFile = {
17
+ file: File;
18
+ allocation: AerialAllocation;
19
+ };
20
+ export declare enum DroneUploadStatus {
21
+ Queued = "queued",
22
+ Uploading = "uploading",
23
+ Failed = "failed",
24
+ Completed = "completed"
25
+ }
26
+ export type DroneUploadProgress = {
27
+ status: DroneUploadStatus;
28
+ uploadedFiles: number;
29
+ totalFiles: number;
30
+ uploadedBytes: number;
31
+ totalBytes: number;
32
+ percentage: number;
33
+ startedAt: number;
34
+ initialBytes: number;
35
+ error?: Error;
36
+ };
37
+ export type DroneUploadOptions = {
38
+ label?: string;
39
+ projectId: string;
40
+ processingId?: number;
41
+ flightMetadata: DroneFlightMetadata;
42
+ files: File[];
43
+ aerialShots: AerialUploadFile[];
44
+ onProgress?: (progress: DroneUploadProgress) => void;
45
+ };
46
+ export type AerialUploadOptions = Pick<DroneUploadOptions, "label" | "aerialShots" | "onProgress"> & {
47
+ processingId: number;
48
+ };
49
+ export type DroneUploadJob = {
50
+ readonly projectId?: string;
51
+ readonly initialProcessingId?: number;
52
+ readonly label: string;
53
+ readonly aerialFilenames: string[];
54
+ processingId?: number;
55
+ progress: DroneUploadProgress;
56
+ run: () => Promise<void>;
57
+ cancel: () => Promise<void>;
58
+ };
59
+ export type UploadCollection = {
60
+ files: File[];
61
+ initialStates?: DroneFileState[];
62
+ allocate: (files: File[]) => Promise<DroneFileState[]>;
63
+ acknowledge: (filenames: string[]) => Promise<{
64
+ errors: DroneFileError[];
65
+ }>;
66
+ };
@@ -5,3 +5,4 @@ export * from "./imagePlayer";
5
5
  export * from "./timeline";
6
6
  export * from "./rbac";
7
7
  export * from "./observations";
8
+ export * from "./droneUpload";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evercam/api",
3
- "version": "1.0.0-97ed1b3dd",
3
+ "version": "1.0.0-98c24a63e",
4
4
  "description": "Evercam API client",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,159 +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 declare enum CopilotSocketEvent {
49
- ConversationStart = "conversation:start",
50
- ConversationCreated = "conversation:created",
51
- LLMMessageChunk = "llm:message:chunk",
52
- LLMMessageComplete = "llm:message:complete",
53
- LLMMessageLoading = "llm:message:loading",
54
- LLMRequestCancel = "llm:request:cancel",
55
- LLMRequestCanceled = "llm:request:canceled",
56
- UserMessage = "user:message",
57
- ContextError = "chat:contextError",
58
- ChatError = "chat:chatError",
59
- MissingFields = "chat:missingFields",
60
- MissingFieldsCompleted = "chat:missingFields:completed",
61
- SystemToolCallResponse = "system:toolCall:response",
62
- ChangeProvider = "chat:changeProvider"
63
- }
64
- export type CopilotConversation = {
65
- id: number;
66
- user: string;
67
- model: string;
68
- context: string;
69
- cameraExid: CameraExid;
70
- projectExid: ProjectExid;
71
- startDate: string;
72
- endDate: string;
73
- messagesCount: number;
74
- };
75
- export declare enum CopilotProvider {
76
- Gemini = "gemini",
77
- ChatGPT = "chatgpt"
78
- }
79
- export declare enum CopilotSuggestion {
80
- UserManual = "user_manual",
81
- GateReport = "gate_report",
82
- Weather = "weather",
83
- Clip = "clip",
84
- Timelapse = "timelapse",
85
- Chart = "chart",
86
- SmartSearch = "smart_search"
87
- }
88
- export declare enum CopilotChatProvider {
89
- Gemini = "gemini",
90
- ChatGpt = "chatGpt"
91
- }
92
- export declare enum CopilotLayout {
93
- Floating = "floating"
94
- }
95
- export declare enum CopilotToolId {
96
- GetReports = "getReports",
97
- GetVehiclesDetections = "getVehiclesDetections",
98
- GetVehiclesDetectionsCounts = "getVehiclesDetectionsCounts",
99
- GetWeather = "getWeather",
100
- CreateClip = "createClip",
101
- NavigateToPage = "navigateToPage",
102
- CreateTimelapse = "createTimelapse",
103
- RequestMissingFields = "requestMissingFields",
104
- RenderCharts = "renderCharts",
105
- SmartSearch = "smartSearch"
106
- }
107
- export type CopilotSystemToolCallResponse<I = unknown, O = unknown> = {
108
- toolId?: CopilotToolId;
109
- input?: I;
110
- output?: O;
111
- isAgent?: boolean;
112
- };
113
- export type CopilotCamera = {
114
- name: string;
115
- exid: CameraExid;
116
- status: CameraStatus;
117
- featureFlags?: CameraFeatureFlag[];
118
- };
119
- export type CopilotProject = {
120
- name: string;
121
- exid: ProjectExid;
122
- status: ProjectStatus;
123
- featureFlags?: ProjectFeatureFlag[];
124
- cameras?: CopilotCamera[];
125
- };
126
- export type CopilotMessageContext = {
127
- pageId?: AnalyticsEventPageId;
128
- selectedCamera?: CopilotCamera;
129
- selectedProject?: CopilotProject;
130
- };
131
- export type CopilotMessageStep = {
132
- args: string[];
133
- depth: number;
134
- id?: number;
135
- message_id?: number;
136
- step: CopilotStepId;
137
- timestamp: string;
138
- };
139
- export declare enum CopilotMissingFieldComponent {
140
- Select = "SelectField",
141
- DateTime = "DateTimeField",
142
- Schedule = "ScheduleField",
143
- MultiOptions = "MultiOptionsField",
144
- Switch = "SwitchField"
145
- }
146
- export declare enum CopilotMissingFieldName {
147
- ProjectExid = "projectExid",
148
- CameraExid = "cameraExid",
149
- FromDate = "fromDate",
150
- ToDate = "toDate",
151
- Schedule = "schedule",
152
- Duration = "duration"
153
- }
154
- export declare enum CopilotMissingFieldType {
155
- Boolean = "boolean",
156
- String = "string",
157
- Number = "number"
158
- }
159
- export type CopilotCompletedFields = Record<string, unknown>;