@evercam/api 1.0.0-97bd6ccd7 → 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.
- package/dist/api/api/3dFirebaseApi.d.ts +8 -2
- package/dist/api/api/adminApi.d.ts +7 -7
- package/dist/api/api/aiApi.d.ts +3 -1
- package/dist/api/api/evercamApi.d.ts +13 -14
- package/dist/api/api/evercamLabsApi.d.ts +1 -12
- package/dist/api/api/index.d.ts +1 -0
- package/dist/api/api/ingestApi.d.ts +23 -25
- package/dist/api/api/workflowsApi.d.ts +15 -0
- package/dist/api/types/360.d.ts +5 -1
- package/dist/api/types/analytics.d.ts +13 -15
- package/dist/api/types/auditLogs.d.ts +1 -4
- package/dist/api/types/automation.d.ts +9 -0
- package/dist/api/types/axios.d.ts +1 -0
- package/dist/api/types/bim.d.ts +1 -1
- package/dist/api/types/camera.d.ts +24 -14
- package/dist/api/types/comments.d.ts +7 -1
- package/dist/api/types/company.d.ts +1 -2
- package/dist/api/types/compare.d.ts +1 -1
- package/dist/api/types/errors.d.ts +4 -1
- package/dist/api/types/index.d.ts +1 -1
- package/dist/api/types/ingest.d.ts +88 -25
- package/dist/api/types/kit.d.ts +3 -50
- package/dist/api/types/media.d.ts +1 -2
- package/dist/api/types/notification.d.ts +12 -1
- package/dist/api/types/observationEvents.d.ts +7 -1
- package/dist/api/types/project.d.ts +7 -2
- package/dist/api/types/shared.d.ts +10 -12
- package/dist/api/types/siteAnalyticsManagement.d.ts +10 -0
- package/dist/api/types/siteView.d.ts +6 -1
- package/dist/api/types/user.d.ts +15 -0
- package/dist/api/types/workflows.d.ts +108 -0
- package/dist/api/utils.d.ts +1 -0
- package/dist/index.js +758 -671
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/shared/types/components.d.ts +149 -13
- package/dist/shared/types/droneUpload.d.ts +66 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/api/types/copilot.d.ts +0 -159
|
@@ -28,8 +28,6 @@ export declare enum IngestTypes {
|
|
|
28
28
|
}
|
|
29
29
|
export type DronesQueryParams = Omit<PaginationParams, "sort"> & {
|
|
30
30
|
projectId: string;
|
|
31
|
-
consumed: string;
|
|
32
|
-
token: string;
|
|
33
31
|
processingStatus: IngestProcessingStatus;
|
|
34
32
|
};
|
|
35
33
|
export type IngestPaginatedResponse<T> = {
|
|
@@ -116,8 +114,6 @@ export type IngestTrackedAsset = {
|
|
|
116
114
|
export type DroneUploadItem = {
|
|
117
115
|
id: number;
|
|
118
116
|
projectId: string;
|
|
119
|
-
consumed: boolean;
|
|
120
|
-
token: string;
|
|
121
117
|
flightDate: string;
|
|
122
118
|
flightGeolocation: string;
|
|
123
119
|
modelZip: string;
|
|
@@ -128,35 +124,102 @@ export type DroneUploadItem = {
|
|
|
128
124
|
processingStatus: IngestProcessingStatus | string;
|
|
129
125
|
modelCesiumAssetId: string;
|
|
130
126
|
updatedAt: string;
|
|
131
|
-
|
|
127
|
+
canDelete: boolean;
|
|
128
|
+
canReprocess: boolean;
|
|
132
129
|
hasSteps: boolean;
|
|
133
|
-
|
|
130
|
+
aerialShotsCount: number;
|
|
134
131
|
};
|
|
135
132
|
export type DroneUploadsResponse = IngestPaginatedResponse<DroneUploadItem>;
|
|
136
133
|
export type DroneQueueResponse = {
|
|
137
134
|
size: number;
|
|
138
135
|
assetsDrone: DroneUploadItem[];
|
|
139
136
|
};
|
|
140
|
-
export type
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
137
|
+
export type DroneFlightMetadata = {
|
|
138
|
+
dateTime: string;
|
|
139
|
+
gpsAltitude: string;
|
|
140
|
+
gpsCoordinates: string;
|
|
141
|
+
};
|
|
142
|
+
export type DroneFileAllocation = {
|
|
143
|
+
filename: string;
|
|
144
|
+
contentType: string;
|
|
145
|
+
};
|
|
146
|
+
export declare enum UploadFileStatus {
|
|
147
|
+
Allocated = "allocated",
|
|
148
|
+
Acknowledged = "acknowledged"
|
|
149
|
+
}
|
|
150
|
+
export type DroneFileState = DroneFileAllocation & {
|
|
151
|
+
status: UploadFileStatus;
|
|
152
|
+
uploadUrl?: string;
|
|
153
|
+
};
|
|
154
|
+
export type DroneFileError = {
|
|
155
|
+
filename?: string;
|
|
156
|
+
id?: number;
|
|
157
|
+
code: string;
|
|
158
|
+
detail: string;
|
|
159
|
+
retryable: boolean;
|
|
160
|
+
};
|
|
161
|
+
export type DroneFileStates = {
|
|
162
|
+
files: DroneFileState[];
|
|
163
|
+
errors: DroneFileError[];
|
|
164
|
+
nextCursor?: string | null;
|
|
165
|
+
};
|
|
166
|
+
export type DroneCompletion = DroneFileStates & {
|
|
167
|
+
processingId: number;
|
|
168
|
+
processingStatus: IngestProcessingStatus;
|
|
169
|
+
};
|
|
170
|
+
export type DroneReprocessResponse = Pick<DroneCompletion, "processingId" | "processingStatus">;
|
|
171
|
+
export type AerialAllocation = DroneFileAllocation & {
|
|
172
|
+
gpsLatitude: string;
|
|
173
|
+
gpsLongitude: string;
|
|
174
|
+
gpsAltitude: string;
|
|
175
|
+
};
|
|
176
|
+
export type AerialUploadState = AerialAllocation & {
|
|
177
|
+
id: number;
|
|
178
|
+
status: UploadFileStatus;
|
|
179
|
+
processingStatus: IngestProcessingStatus;
|
|
180
|
+
uploadUrl?: string;
|
|
181
|
+
fileLink?: string;
|
|
182
|
+
thumbnailLink?: string;
|
|
183
|
+
};
|
|
184
|
+
export type AerialUploadStates = {
|
|
185
|
+
aerialShots: AerialUploadState[];
|
|
186
|
+
errors: DroneFileError[];
|
|
187
|
+
nextCursor?: string | null;
|
|
188
|
+
complete: boolean;
|
|
189
|
+
};
|
|
190
|
+
export type AerialShotState = {
|
|
191
|
+
id: number;
|
|
192
|
+
filename?: string | null;
|
|
193
|
+
status?: UploadFileStatus | null;
|
|
194
|
+
contentType?: string | null;
|
|
195
|
+
processingStatus?: AerialUploadState["processingStatus"] | null;
|
|
196
|
+
gpsLatitude: string;
|
|
197
|
+
gpsLongitude: string;
|
|
198
|
+
gpsAltitude: string;
|
|
199
|
+
fileLink?: string | null;
|
|
200
|
+
thumbnailLink?: string | null;
|
|
201
|
+
};
|
|
202
|
+
export type AerialShotPage = Omit<AerialUploadStates, "aerialShots"> & {
|
|
203
|
+
aerialShots: AerialShotState[];
|
|
204
|
+
};
|
|
205
|
+
export type DroneCreation = {
|
|
206
|
+
projectId: string;
|
|
207
|
+
flightMetadata: DroneFlightMetadata;
|
|
208
|
+
aerialShots?: AerialAllocation[];
|
|
209
|
+
};
|
|
210
|
+
export type DroneCreated = {
|
|
211
|
+
id: number;
|
|
212
|
+
projectId: string;
|
|
213
|
+
processingStatus: IngestProcessingStatus;
|
|
214
|
+
aerialShots: AerialUploadState[];
|
|
215
|
+
errors: DroneFileError[];
|
|
216
|
+
};
|
|
217
|
+
export type DroneDeletion = {
|
|
218
|
+
deleted: {
|
|
219
|
+
filename: string;
|
|
220
|
+
id?: number;
|
|
158
221
|
}[];
|
|
159
|
-
|
|
222
|
+
errors: DroneFileError[];
|
|
160
223
|
};
|
|
161
224
|
export type CalculateMeasuringOperationRequestPayload = {
|
|
162
225
|
date: DateType;
|
package/dist/api/types/kit.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CameraExid, CountryCode, CountryId,
|
|
1
|
+
import { CameraExid, CountryCode, CountryId, Nvr, PaginationParams, PowerType, Project, Router, Schedule, Tag } from "@evercam/api/types";
|
|
2
2
|
export type Kit = {
|
|
3
3
|
alarms: KitAlarm[];
|
|
4
4
|
countryCode: CountryCode;
|
|
@@ -21,6 +21,8 @@ export type Kit = {
|
|
|
21
21
|
tags: Tag[];
|
|
22
22
|
storages: KitStorage[];
|
|
23
23
|
createdAt: string;
|
|
24
|
+
decommissionedAt?: string;
|
|
25
|
+
deletedAt?: string;
|
|
24
26
|
};
|
|
25
27
|
export declare enum KitSupportCheckId {
|
|
26
28
|
RouterSmsRoundTrip = "router_sms_round_trip",
|
|
@@ -240,55 +242,6 @@ export type KitQueryParams = PaginationParams & {
|
|
|
240
242
|
status: KitStatus;
|
|
241
243
|
tagId: number | number[];
|
|
242
244
|
};
|
|
243
|
-
export type AdminKit = {
|
|
244
|
-
id: number;
|
|
245
|
-
name: string;
|
|
246
|
-
serial: string;
|
|
247
|
-
status: string;
|
|
248
|
-
powerType: PowerType;
|
|
249
|
-
location: string;
|
|
250
|
-
countryId: number;
|
|
251
|
-
countryName: string;
|
|
252
|
-
countryRegion: string;
|
|
253
|
-
nvr: Nvr;
|
|
254
|
-
router: {
|
|
255
|
-
id: number;
|
|
256
|
-
serialNumber: number;
|
|
257
|
-
vpnUserId: string;
|
|
258
|
-
vpnPassword: string;
|
|
259
|
-
routerType: string;
|
|
260
|
-
routerUserId: string;
|
|
261
|
-
routerPassword: string;
|
|
262
|
-
routerHttpPort: number;
|
|
263
|
-
powerType: PowerType;
|
|
264
|
-
powerSchedule: Schedule;
|
|
265
|
-
vpnServer: string;
|
|
266
|
-
netbirdUrl: string;
|
|
267
|
-
sims: {
|
|
268
|
-
id: number;
|
|
269
|
-
number: string;
|
|
270
|
-
}[];
|
|
271
|
-
};
|
|
272
|
-
project: {
|
|
273
|
-
id: number;
|
|
274
|
-
exid: string;
|
|
275
|
-
name: string;
|
|
276
|
-
timezone: string;
|
|
277
|
-
status: string;
|
|
278
|
-
zohoId: string;
|
|
279
|
-
insertedAt: DateType;
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
|
-
export type KitCreatePayload = {
|
|
283
|
-
projectId?: number;
|
|
284
|
-
countryCode?: string;
|
|
285
|
-
name: string;
|
|
286
|
-
status: KitStatus;
|
|
287
|
-
powerType: PowerType;
|
|
288
|
-
config: {
|
|
289
|
-
region: KitRegion;
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
245
|
export type KitMetricStatsEntry = {
|
|
293
246
|
timestamp: string;
|
|
294
247
|
voltage: number;
|
|
@@ -111,8 +111,7 @@ export declare enum ClipsCategory {
|
|
|
111
111
|
}
|
|
112
112
|
export declare enum MediaCategory {
|
|
113
113
|
Weather = "weather",
|
|
114
|
-
SmartSearch = "smart_search"
|
|
115
|
-
Copilot = "copilot"
|
|
114
|
+
SmartSearch = "smart_search"
|
|
116
115
|
}
|
|
117
116
|
export type MediaDeleteRequestPayload = {
|
|
118
117
|
timelapseIds: (string | number)[];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { CommentsScope, CommentThreeSixtyContext } from "./comments";
|
|
1
2
|
export declare enum NotificationType {
|
|
2
3
|
CameraShare = "camera_share",
|
|
3
4
|
CameraStatusChange = "camera_status_changed",
|
|
4
5
|
Mention = "mention",
|
|
6
|
+
CommentMention = "comment_mention",
|
|
5
7
|
TimelapseCreated = "timelapse_created",
|
|
6
8
|
TimelapseFailed = "timelapse_failed",
|
|
7
9
|
DroneProcessing = "drone_processing_done",
|
|
@@ -80,7 +82,16 @@ export interface StorageWarningContext extends NotificationContextBase {
|
|
|
80
82
|
projectExid: string;
|
|
81
83
|
cameraName: string;
|
|
82
84
|
}
|
|
83
|
-
export
|
|
85
|
+
export interface CommentMentionContext extends NotificationContextBase {
|
|
86
|
+
projectExid: string;
|
|
87
|
+
commentId: number;
|
|
88
|
+
scope: CommentsScope;
|
|
89
|
+
commentContext: CommentThreeSixtyContext;
|
|
90
|
+
content?: string;
|
|
91
|
+
label?: string;
|
|
92
|
+
projectName?: string;
|
|
93
|
+
}
|
|
94
|
+
export type NotificationContext = CameraShareContext | CameraStatusChangeContext | MentionContext | TimelapseCreatedContext | TimelapseFailedContext | DroneProcessingContext | Processing360Context | ExportNotificationContext | UploadNotificationContext | RingCamerasImportedContext | StorageWarningContext | CommentMentionContext;
|
|
84
95
|
export type Notification = {
|
|
85
96
|
id: number;
|
|
86
97
|
type: NotificationType;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { VisionProvider } from "@evercam/api/types";
|
|
1
2
|
export declare enum ObservationEventStatus {
|
|
2
3
|
Detected = "detected",
|
|
3
4
|
Approved = "approved",
|
|
@@ -45,11 +46,16 @@ export type ObservationEventQueryParams = {
|
|
|
45
46
|
observationTypeIds?: string;
|
|
46
47
|
status?: ObservationEventStatus | string;
|
|
47
48
|
sourceType?: ObservationSourceType | string;
|
|
49
|
+
modelName?: string;
|
|
48
50
|
sortBy?: string;
|
|
49
51
|
sortDir?: "asc" | "desc";
|
|
50
52
|
page?: number;
|
|
51
53
|
limit?: number;
|
|
52
54
|
};
|
|
55
|
+
export interface ObservationModelOption {
|
|
56
|
+
modelName: string;
|
|
57
|
+
total: number;
|
|
58
|
+
}
|
|
53
59
|
export interface ObservationEventListResponse {
|
|
54
60
|
items: SiteAnalyticsObservationEvent[];
|
|
55
61
|
total: number;
|
|
@@ -90,7 +96,7 @@ export interface Walk360WorkerInfo {
|
|
|
90
96
|
workerStatus?: string | null;
|
|
91
97
|
workerIsRunning?: boolean;
|
|
92
98
|
appUrl?: string | null;
|
|
93
|
-
visionProvider?:
|
|
99
|
+
visionProvider?: VisionProvider;
|
|
94
100
|
}
|
|
95
101
|
export interface Walk360Config extends Walk360WorkerInfo {
|
|
96
102
|
projectExid: string;
|
|
@@ -96,10 +96,10 @@ export declare enum ProjectFeatureFlag {
|
|
|
96
96
|
MediaHubSharing = "archives_sharing",
|
|
97
97
|
GateReportAnprBased = "anpr_sourced",
|
|
98
98
|
NoLicensePlate = "no_license_plate",
|
|
99
|
-
DefaultToProjectApp = "default_to_project_app",
|
|
100
99
|
SmartSearch = "smart_search",
|
|
101
100
|
PpeMonitoring = "ppe_monitoring",
|
|
102
|
-
NoGdpr = "no_gdpr"
|
|
101
|
+
NoGdpr = "no_gdpr",
|
|
102
|
+
Chat = "chat"
|
|
103
103
|
}
|
|
104
104
|
export type ProjectBatteryReading = {
|
|
105
105
|
exid: number;
|
|
@@ -230,6 +230,11 @@ export type ProjectUsersResponsePayload = {
|
|
|
230
230
|
invites: ProjectInvite[];
|
|
231
231
|
errors: ProjectUserError[];
|
|
232
232
|
};
|
|
233
|
+
export type MentionableUser = {
|
|
234
|
+
id: number;
|
|
235
|
+
fullname: string;
|
|
236
|
+
email: string;
|
|
237
|
+
};
|
|
233
238
|
export type ProjectStorageQueryParams = PaginationParams & {
|
|
234
239
|
cameraName: string;
|
|
235
240
|
cameraExid: CameraExid;
|
|
@@ -109,25 +109,23 @@ export declare enum InfoPage {
|
|
|
109
109
|
DroneView = "drone-view",
|
|
110
110
|
Compare = "compare",
|
|
111
111
|
Timeline = "timeline",
|
|
112
|
-
WeatherReport = "weather-report"
|
|
112
|
+
WeatherReport = "weather-report",
|
|
113
|
+
Cameras = "cameras"
|
|
113
114
|
}
|
|
114
115
|
export declare enum DownloadFileType {
|
|
115
116
|
Jpeg = "jpeg",
|
|
116
117
|
Pdf = "pdf",
|
|
117
118
|
Csv = "csv"
|
|
118
119
|
}
|
|
119
|
-
export
|
|
120
|
-
|
|
120
|
+
export type Stringified<T> = string & {
|
|
121
|
+
[P in keyof T]: {
|
|
122
|
+
"_ value": T[P];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export interface JSON {
|
|
126
|
+
stringify<T>(value: T, replacer?: (key: string, value: unknown) => unknown, space?: string | number): string & Stringified<T>;
|
|
127
|
+
parse<T>(text: Stringified<T>, reviver?: (key: unknown, value: unknown) => unknown): T;
|
|
121
128
|
}
|
|
122
|
-
export type FeedbackPayload = {
|
|
123
|
-
id?: number;
|
|
124
|
-
user: string;
|
|
125
|
-
text: string;
|
|
126
|
-
type: string;
|
|
127
|
-
context: FeedbackContext;
|
|
128
|
-
messageId?: number;
|
|
129
|
-
conversationId?: number;
|
|
130
|
-
};
|
|
131
129
|
export type TuplePoint2D = [number, number];
|
|
132
130
|
export type TuplePoint3D = [number, number, number];
|
|
133
131
|
export type Point2D = {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
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
|
+
}[];
|
|
2
10
|
export type SiteAnalyticsCoolifyStatus = {
|
|
3
11
|
appUuid: string | null;
|
|
4
12
|
name: string | null;
|
|
@@ -38,6 +46,7 @@ export type SiteAnalyticsManagedApp = {
|
|
|
38
46
|
skipWeekends: boolean;
|
|
39
47
|
tracking: boolean;
|
|
40
48
|
observations: boolean;
|
|
49
|
+
visionProvider?: VisionProvider | null;
|
|
41
50
|
insertedAt: DateType | null;
|
|
42
51
|
updatedAt: DateType | null;
|
|
43
52
|
coolify: SiteAnalyticsCoolifyStatus | null;
|
|
@@ -62,6 +71,7 @@ export type CreateSiteAnalyticsAppPayload = {
|
|
|
62
71
|
tracking?: boolean;
|
|
63
72
|
observations?: boolean;
|
|
64
73
|
observationPromptId?: number | null;
|
|
74
|
+
visionProvider?: VisionProvider;
|
|
65
75
|
};
|
|
66
76
|
export type UpdateSiteAnalyticsAppPayload = Partial<Omit<CreateSiteAnalyticsAppPayload, "projectExid" | "cameraExid" | "coolifyServerUuid">>;
|
|
67
77
|
export type ModelOption = {
|
|
@@ -23,6 +23,7 @@ export type ForgeUrn = {
|
|
|
23
23
|
displayName: string;
|
|
24
24
|
urn: string;
|
|
25
25
|
isModelHostedByEvercamACC?: boolean;
|
|
26
|
+
savedViews?: Record<string, ForgeView>;
|
|
26
27
|
};
|
|
27
28
|
export type ForgeAccAlignmentData = {
|
|
28
29
|
bbox: {
|
|
@@ -30,6 +31,11 @@ export type ForgeAccAlignmentData = {
|
|
|
30
31
|
max: Point2D;
|
|
31
32
|
};
|
|
32
33
|
transform: number[];
|
|
34
|
+
coordinateSystem?: {
|
|
35
|
+
context?: {
|
|
36
|
+
type?: string;
|
|
37
|
+
};
|
|
38
|
+
} | null;
|
|
33
39
|
};
|
|
34
40
|
export type TimelineItem = {
|
|
35
41
|
taskNumber: number;
|
|
@@ -55,7 +61,6 @@ export type ForgeProjectData = {
|
|
|
55
61
|
urns?: ForgeUrn[];
|
|
56
62
|
accDrawingsAlignments?: Record<string, ForgeAccAlignmentData>;
|
|
57
63
|
timeline?: TimelineItem[];
|
|
58
|
-
savedView?: ForgeView;
|
|
59
64
|
markers?: ForgeMarker[];
|
|
60
65
|
};
|
|
61
66
|
export type ItwinModel = {
|
package/dist/api/types/user.d.ts
CHANGED
|
@@ -151,6 +151,21 @@ export type SessionsListRequestPayload = {
|
|
|
151
151
|
limit: number;
|
|
152
152
|
page: number;
|
|
153
153
|
};
|
|
154
|
+
export type AuthorizedApp = {
|
|
155
|
+
id: number;
|
|
156
|
+
clientId: string;
|
|
157
|
+
clientName: string;
|
|
158
|
+
clientDescription: string | null;
|
|
159
|
+
logoUrl: string | null;
|
|
160
|
+
scopes: string[];
|
|
161
|
+
grantedAt: string;
|
|
162
|
+
};
|
|
163
|
+
export type AuthorizedAppsListRequestPayload = {
|
|
164
|
+
search?: string;
|
|
165
|
+
sort?: string;
|
|
166
|
+
limit?: number;
|
|
167
|
+
page?: number;
|
|
168
|
+
};
|
|
154
169
|
export type SessionActivityCamSettingsDetail = {
|
|
155
170
|
new: any;
|
|
156
171
|
old: any;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Evercam Workflows engine (evercam-agent-kit), as the admin app sees it.
|
|
3
|
+
*
|
|
4
|
+
* These mirror `evercam_workflows/api/schemas.py`. The engine speaks camelCase over
|
|
5
|
+
* the wire, so the admin client reads it with `preserveCasing: true` and these are
|
|
6
|
+
* the shapes as received. Named `Chat*`, after the product; the Vue 3 agent app's
|
|
7
|
+
* own workflow types live in `packages/agent`, unreachable here.
|
|
8
|
+
*/
|
|
9
|
+
/** What kind of conversation this is. Chat only ever opens `chat`. */
|
|
10
|
+
export declare enum ChatMode {
|
|
11
|
+
Workflow = "workflow",
|
|
12
|
+
Chat = "chat"
|
|
13
|
+
}
|
|
14
|
+
/** Whose conversations a list covers. Only an admin is ever given `all`. */
|
|
15
|
+
export declare enum ChatScope {
|
|
16
|
+
Mine = "mine",
|
|
17
|
+
Account = "account",
|
|
18
|
+
All = "all"
|
|
19
|
+
}
|
|
20
|
+
/** A flat token tally, as the engine reports it. */
|
|
21
|
+
export type ChatUsage = {
|
|
22
|
+
inputTokens?: number;
|
|
23
|
+
outputTokens?: number;
|
|
24
|
+
cacheCreationInputTokens?: number;
|
|
25
|
+
cacheReadInputTokens?: number;
|
|
26
|
+
};
|
|
27
|
+
/** One recorded tool step in a turn's trace, compacted by the engine. */
|
|
28
|
+
export type ChatTraceStep = {
|
|
29
|
+
step?: number | null;
|
|
30
|
+
tool?: string | null;
|
|
31
|
+
result?: string | null;
|
|
32
|
+
durationMs?: number | null;
|
|
33
|
+
usage?: ChatUsage | null;
|
|
34
|
+
args?: unknown;
|
|
35
|
+
};
|
|
36
|
+
/** One stored turn, as the engine returns it inside a conversation. */
|
|
37
|
+
export type ChatTurn = {
|
|
38
|
+
id: string;
|
|
39
|
+
userText?: string | null;
|
|
40
|
+
assistantText?: string | null;
|
|
41
|
+
thinkingSummary?: string | null;
|
|
42
|
+
artifact?: unknown;
|
|
43
|
+
/** The agent's tool steps for this answer. Absent on turns stored before traces. */
|
|
44
|
+
trace?: ChatTraceStep[] | null;
|
|
45
|
+
/** This turn's own token usage. */
|
|
46
|
+
usage?: ChatUsage | null;
|
|
47
|
+
runId?: string | null;
|
|
48
|
+
at?: string | null;
|
|
49
|
+
};
|
|
50
|
+
/** A conversation in full, with its transcript, cost ledger and per-turn traces. */
|
|
51
|
+
export type ChatSession = {
|
|
52
|
+
id: string;
|
|
53
|
+
environment: string;
|
|
54
|
+
mode: string;
|
|
55
|
+
title: string | null;
|
|
56
|
+
projectExid: string | null;
|
|
57
|
+
projectName: string | null;
|
|
58
|
+
cameraExids: string[] | null;
|
|
59
|
+
turns: ChatTurn[];
|
|
60
|
+
savedWorkflowId: string | null;
|
|
61
|
+
createdBy: string | null;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
64
|
+
usage?: ChatUsage | null;
|
|
65
|
+
usageByModel?: Record<string, ChatUsage> | null;
|
|
66
|
+
model?: string | null;
|
|
67
|
+
/** Money as a string, or `null` (never `0`) when the conversation is unpriced. */
|
|
68
|
+
costUsd?: string | null;
|
|
69
|
+
priceBasis?: Record<string, unknown> | null;
|
|
70
|
+
};
|
|
71
|
+
/** One conversation as a list row — metadata and cost, without the transcript. */
|
|
72
|
+
export type ChatSummary = {
|
|
73
|
+
id: string;
|
|
74
|
+
environment: string;
|
|
75
|
+
mode: string;
|
|
76
|
+
title: string | null;
|
|
77
|
+
projectExid: string | null;
|
|
78
|
+
projectName: string | null;
|
|
79
|
+
cameraExids: string[] | null;
|
|
80
|
+
createdBy: string | null;
|
|
81
|
+
createdAt: string;
|
|
82
|
+
updatedAt: string;
|
|
83
|
+
turnCount: number;
|
|
84
|
+
usage?: ChatUsage | null;
|
|
85
|
+
model?: string | null;
|
|
86
|
+
costUsd?: string | null;
|
|
87
|
+
};
|
|
88
|
+
/** A page of conversations for the admin viewer. */
|
|
89
|
+
export type ChatListPage = {
|
|
90
|
+
chats: ChatSummary[];
|
|
91
|
+
total: number;
|
|
92
|
+
/** The scope the engine actually applied. */
|
|
93
|
+
scope: ChatScope;
|
|
94
|
+
};
|
|
95
|
+
/** Query params the admin conversations list accepts. */
|
|
96
|
+
export type ChatListParams = {
|
|
97
|
+
scope?: ChatScope;
|
|
98
|
+
mode?: ChatMode;
|
|
99
|
+
projectExid?: string;
|
|
100
|
+
createdBy?: string;
|
|
101
|
+
q?: string;
|
|
102
|
+
from?: string;
|
|
103
|
+
to?: string;
|
|
104
|
+
sort?: string;
|
|
105
|
+
direction?: "asc" | "desc";
|
|
106
|
+
offset?: number;
|
|
107
|
+
limit?: number;
|
|
108
|
+
};
|
package/dist/api/utils.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export declare const toQueryString: <T extends Record<string, unknown>>(paramsOb
|
|
|
7
7
|
forceArrayBrackets?: boolean | undefined;
|
|
8
8
|
}) => string | undefined;
|
|
9
9
|
export declare function queryStringToObject(queryString?: string): QueryParams;
|
|
10
|
+
export declare function getMediaApiPreviewName(url?: string | null): string | null;
|