@evercam/api 1.0.0-70861323c → 1.0.0-741727bc1

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 (69) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +26 -15
  2. package/dist/api/api/adminApi.d.ts +22 -8
  3. package/dist/api/api/aiApi.d.ts +85 -2
  4. package/dist/api/api/authzApi.d.ts +2 -2
  5. package/dist/api/api/evercamApi.d.ts +32 -18
  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 +44 -34
  9. package/dist/api/api/reportsApi.d.ts +15 -0
  10. package/dist/api/types/360.d.ts +29 -59
  11. package/dist/api/types/admin.d.ts +1 -1
  12. package/dist/api/types/aiConfigs.d.ts +102 -12
  13. package/dist/api/types/analytics.d.ts +30 -23
  14. package/dist/api/types/apiKey.d.ts +70 -0
  15. package/dist/api/types/auditLogs.d.ts +145 -20
  16. package/dist/api/types/authz.d.ts +34 -9
  17. package/dist/api/types/automation.d.ts +32 -4
  18. package/dist/api/types/axios.d.ts +2 -4
  19. package/dist/api/types/bim.d.ts +4 -6
  20. package/dist/api/types/camera.d.ts +34 -27
  21. package/dist/api/types/comments.d.ts +7 -1
  22. package/dist/api/types/company.d.ts +1 -2
  23. package/dist/api/types/compare.d.ts +1 -1
  24. package/dist/api/types/connector.d.ts +1 -0
  25. package/dist/api/types/detections.d.ts +1 -0
  26. package/dist/api/types/drone.d.ts +1 -2
  27. package/dist/api/types/errors.d.ts +7 -2
  28. package/dist/api/types/gateReport.d.ts +0 -11
  29. package/dist/api/types/gateReportManagement.d.ts +2 -7
  30. package/dist/api/types/hammertech.d.ts +98 -0
  31. package/dist/api/types/index.d.ts +6 -2
  32. package/dist/api/types/ingest.d.ts +169 -26
  33. package/dist/api/types/kit.d.ts +33 -99
  34. package/dist/api/types/media.d.ts +3 -3
  35. package/dist/api/types/notification.d.ts +52 -2
  36. package/dist/api/types/nvr.d.ts +8 -8
  37. package/dist/api/types/observationEvents.d.ts +141 -0
  38. package/dist/api/types/observations.d.ts +80 -0
  39. package/dist/api/types/planner.d.ts +1 -8
  40. package/dist/api/types/project.d.ts +15 -3
  41. package/dist/api/types/recording.d.ts +2 -4
  42. package/dist/api/types/reports.d.ts +108 -0
  43. package/dist/api/types/ring.d.ts +16 -16
  44. package/dist/api/types/roi.d.ts +0 -9
  45. package/dist/api/types/routeParams.d.ts +1 -0
  46. package/dist/api/types/shared.d.ts +14 -23
  47. package/dist/api/types/shares.d.ts +0 -13
  48. package/dist/api/types/siteAnalytics.d.ts +1 -3
  49. package/dist/api/types/siteAnalyticsManagement.d.ts +39 -4
  50. package/dist/api/types/siteView.d.ts +12 -7
  51. package/dist/api/types/socket.d.ts +4 -0
  52. package/dist/api/types/storyblok.d.ts +0 -13
  53. package/dist/api/types/timelapse.d.ts +1 -8
  54. package/dist/api/types/user.d.ts +15 -0
  55. package/dist/api/utils.d.ts +1 -0
  56. package/dist/index.js +1393 -907
  57. package/dist/index.js.map +1 -1
  58. package/dist/index.umd.cjs +1 -1
  59. package/dist/index.umd.cjs.map +1 -1
  60. package/dist/shared/types/components.d.ts +238 -44
  61. package/dist/shared/types/droneUpload.d.ts +93 -0
  62. package/dist/shared/types/index.d.ts +3 -0
  63. package/dist/shared/types/observations.d.ts +25 -0
  64. package/dist/shared/types/report.d.ts +107 -0
  65. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  66. package/dist/shared/utils/datePresets.d.ts +31 -0
  67. package/package.json +1 -1
  68. package/dist/api/types/copilot.d.ts +0 -162
  69. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -1,35 +1,36 @@
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";
4
- import { IngestVersions, IngestTypes } 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, DroneCreation, DroneCreated, DroneProcessingTarget, DroneUploadItem, DroneFileAllocation, DroneFileStates, DroneCompletion, DroneDeletion, DroneReprocessResponse, AerialAllocation, AerialUploadStates, AerialShotPage, IngestProcessingProgress, FlightImagesQueryParams, Generate360MapRequestPayload, GenerateFloorPayload, InspectionToolRequestPayload, JsonObject, _360WalkV2, _360FloorV2 } from "@evercam/api/types";
4
+ import { IngestTypes } from "@evercam/api/types";
5
5
  export declare const getIngestApiUrls: (type: string) => string[];
6
6
  export declare const IngestApi: {
7
7
  drone: {
8
- createUpload(projectId: string, params: {
9
- uploadedBy: string;
10
- }): Promise<IngestUploadInitResponse>;
11
- reprocessDrone(id: number, params?: JsonObject): Promise<void>;
8
+ createProcessing(ingestUrl: string, payload: DroneCreation, signal?: AbortSignal): Promise<DroneCreated>;
9
+ getProcessing({ ingestUrl, id }: DroneProcessingTarget, signal?: AbortSignal): Promise<DroneUploadItem>;
10
+ getFlightProcessing(projectId: string, date: string): Promise<DroneUploadItem>;
11
+ allocateFiles({ ingestUrl, id }: DroneProcessingTarget, files: DroneFileAllocation[], signal?: AbortSignal): Promise<DroneFileStates>;
12
+ acknowledgeFiles({ ingestUrl, id }: DroneProcessingTarget, filenames: string[], signal?: AbortSignal): Promise<DroneCompletion>;
13
+ completeProcessing({ ingestUrl, id }: DroneProcessingTarget, signal?: AbortSignal): Promise<DroneCompletion>;
14
+ deleteFiles(id: number, filenames?: string[]): Promise<DroneDeletion>;
15
+ allocateAerialShots({ ingestUrl, id }: DroneProcessingTarget, aerialShots: AerialAllocation[], signal?: AbortSignal): Promise<AerialUploadStates>;
16
+ acknowledgeAerialShots({ ingestUrl, id }: DroneProcessingTarget, filenames: string[], signal?: AbortSignal): Promise<AerialUploadStates>;
17
+ getAerialShots(id: number, params?: {
18
+ cursor?: string;
19
+ limit?: number;
20
+ processingStatus?: string;
21
+ }): Promise<AerialShotPage>;
22
+ deleteAerialShots(id: number, filenames?: string[]): Promise<DroneDeletion>;
23
+ reprocessDrone(id: number, params?: JsonObject): Promise<DroneReprocessResponse>;
12
24
  getDrones(params: {
13
25
  params: Partial<DronesQueryParams>;
14
26
  }): Promise<DroneUploadsResponse>;
27
+ getProcessingProgress(id: number): Promise<IngestProcessingProgress>;
15
28
  getArchive(id: number, params: {
16
29
  dataType: string;
17
- }): Promise<Blob>;
30
+ }): Promise<string>;
18
31
  deleteUpload(id: number): Promise<void>;
19
- prepareForUpload(projectId: string, params: {
20
- uploadedBy: string;
21
- token: string;
22
- }): Promise<void>;
23
- upload(projectId: string, params: {
24
- uploadedBy: string;
25
- token: string;
26
- }, payload: DroneUploadUpdateRequestPayload): Promise<void>;
27
- verifyToken(projectId: string, params: {
28
- token: string;
29
- }): Promise<JsonObject>;
30
32
  calculateMeasuringOperation(projectId: string, params: CalculateMeasuringOperationRequestPayload, ingestUrl?: string): Promise<JsonObject>;
31
33
  inspectionTool(projectId: string, params: InspectionToolRequestPayload): Promise<JsonObject>;
32
- isInspectionEnabled(projectId: string, params?: JsonObject): Promise<JsonObject>;
33
34
  getDroneQueueSize(droneUrl: string): Promise<DroneQueueResponse>;
34
35
  getFlightImages(projectId: string, params: FlightImagesQueryParams): Promise<JsonObject>;
35
36
  checkFlightAvailableFeatures(projectId: string, params: JsonObject): Promise<JsonObject>;
@@ -41,15 +42,17 @@ 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
45
  update360(id: number, payload: _360AssetsRequestPayload): Promise<_360WalkV2>;
46
- update360ByProjectDateName(projectId: string, date: string, floor: string, payload: _360AssetsRequestPayload): Promise<_360WalkV2>;
46
+ update360ByProjectDateName(projectId: string, date: string, floor: string, payload: Partial<_360AssetsRequestPayload> & {
47
+ drawingId?: number;
48
+ }): Promise<_360WalkV2>;
47
49
  deleteUpload(id: number): Promise<void>;
48
50
  getArchive(id: number, params: {
49
- dateType: string;
50
- }): Promise<Blob>;
51
+ dataType: string;
52
+ }): Promise<string>;
53
+ get360Progress(id: number): Promise<IngestProcessingProgress>;
51
54
  createUpload(projectId: string, params: _360AssetsRequestPayload): Promise<IngestUploadInitResponse>;
52
- upload(id: number, params: JsonObject, payload: _360AssetsUploadPayload): Promise<_360WalkV2>;
55
+ upload(id: number, params: JsonObject, payload: _360AssetsUploadPayload, ingestUrlOverride?: string): Promise<_360WalkV2>;
53
56
  reprocess360(id: number): Promise<void>;
54
57
  drawingExists(payload: {
55
58
  params: {
@@ -61,7 +64,9 @@ export declare const IngestApi: {
61
64
  params: DrawingsRequestPayload;
62
65
  config?: SwrRequestConfig<_360FloorsResponse>;
63
66
  }): Promise<_360FloorsResponse>;
64
- getDrawingById(id: number, projectExid: string): Promise<_360FloorV2>;
67
+ getDrawingById(id: number, projectExid: string, { assetSummary }?: {
68
+ assetSummary?: boolean;
69
+ }): Promise<_360FloorV2>;
65
70
  updateDrawing(id: number, projectExid: string, payload: GenerateFloorPayload): Promise<_360FloorV2>;
66
71
  deleteDrawing(id: number): Promise<void>;
67
72
  restoreDrawing(id: number): Promise<void>;
@@ -70,7 +75,10 @@ export declare const IngestApi: {
70
75
  fetchDrawingOverlay(id: number, params: {
71
76
  view: boolean;
72
77
  thumbnail?: boolean;
73
- }, onDownloadProgress?: (progress: ProgressEvent) => void): Promise<string>;
78
+ }, onDownloadProgress?: (progress: ProgressEvent) => void, extraConfig?: AxiosRequestConfig): Promise<string>;
79
+ fetchDrawingOverlayBlob(id: number, params?: {
80
+ thumbnail?: boolean;
81
+ }, extraConfig?: AxiosRequestConfig): Promise<Blob>;
74
82
  getFloorArchive(id: number): Promise<string>;
75
83
  generate360map(projectId: string, params: Generate360MapRequestPayload): Promise<JsonObject>;
76
84
  get360QueueSize(ingestUrl: string, params?: _360QueueQueryParams): Promise<_360QueueResponse>;
@@ -107,8 +115,6 @@ export declare const IngestApi: {
107
115
  ingestVersion: string;
108
116
  id: number;
109
117
  projectId: string;
110
- consumed: boolean;
111
- token: string;
112
118
  flightDate: string;
113
119
  flightGeolocation: string;
114
120
  modelZip: string;
@@ -119,14 +125,16 @@ export declare const IngestApi: {
119
125
  processingStatus: import("@evercam/api/types").IngestProcessingStatus | string;
120
126
  modelCesiumAssetId: string;
121
127
  updatedAt: string;
122
- hasTusLinks: boolean;
123
- aerialShots: import("@evercam/api/types").AerialShotItem[];
128
+ canDelete: boolean;
129
+ canReprocess: boolean;
130
+ hasSteps: boolean;
131
+ aerialShotsCount: number;
124
132
  } | {
125
133
  ingestVersion: string;
126
134
  archive: string;
127
135
  date: string;
128
136
  deviceSerial: string | null;
129
- endPosition: unknown | null;
137
+ endPosition: string | null;
130
138
  floor: string;
131
139
  floorId: number;
132
140
  id: number;
@@ -142,15 +150,17 @@ export declare const IngestApi: {
142
150
  projectId: string;
143
151
  report: string;
144
152
  processingLog: string;
153
+ hasSteps?: boolean;
145
154
  route: unknown | null;
146
- startPosition: unknown | null;
155
+ startPosition: string | null;
147
156
  tusLinks: unknown | null;
148
157
  updatedAt: string;
149
158
  uploadedBy: string;
150
159
  videoArchive: string;
151
160
  videos: string[];
152
161
  })[]>;
153
- getIngestVersion(ingestUrl: string): IngestVersions;
154
- chooseIngestApiUrl(type: IngestTypes): Promise<string>;
162
+ getIngestNumber(ingestUrl: string): number;
163
+ getIngestVersion(ingestUrl: string): string;
164
+ chooseIngestApiUrl(type: IngestTypes, isTieToNewest?: boolean): Promise<string>;
155
165
  };
156
166
  };
@@ -0,0 +1,15 @@
1
+ import { type ChatListPage, type ChatListParams, type ChatSession } from "@evercam/api/types";
2
+ /**
3
+ * The Evercam Reports engine, for the admin Chat conversations viewer.
4
+ *
5
+ * The engine speaks camelCase natively, so every call preserves casing rather than
6
+ * running the snake conversion the media API needs. The admin's bearer is attached
7
+ * by the shared request interceptor — an admin resolves `is_admin` on the engine, so
8
+ * `scope=all` returns every user's conversations.
9
+ */
10
+ export declare const ReportsApi: {
11
+ chat: {
12
+ listConversations(params?: ChatListParams): Promise<ChatListPage>;
13
+ getConversation(id: string): Promise<ChatSession>;
14
+ };
15
+ };
@@ -1,5 +1,5 @@
1
1
  import { DateType } from "@evercam/api/types/time";
2
- import { GeoPoint, Point3D } from "@evercam/api/types/shared";
2
+ import { GeoPoint, PaginationParams, Point3D } from "@evercam/api/types/shared";
3
3
  export type _360OverlayPosition = {
4
4
  northEast: GeoPoint;
5
5
  northWest: GeoPoint;
@@ -61,6 +61,7 @@ export type _360Floor = {
61
61
  imagesOnlyFeatureFlag?: boolean;
62
62
  forgeBIMFeatureFlag?: boolean;
63
63
  isForgeGravityEnabled?: boolean;
64
+ bimHeight?: number;
64
65
  initialForgeView?: ForgeView | null;
65
66
  enhancedLightFeatureFlag?: boolean;
66
67
  calibrationDetails?: Record<string, unknown>;
@@ -77,7 +78,7 @@ export type _360WalkV2 = {
77
78
  archive: string;
78
79
  date: string;
79
80
  deviceSerial: string | null;
80
- endPosition: unknown | null;
81
+ endPosition: string | null;
81
82
  floor: string;
82
83
  floorId: number;
83
84
  id: number;
@@ -93,8 +94,9 @@ export type _360WalkV2 = {
93
94
  projectId: string;
94
95
  report: string;
95
96
  processingLog: string;
97
+ hasSteps?: boolean;
96
98
  route: unknown | null;
97
- startPosition: unknown | null;
99
+ startPosition: string | null;
98
100
  tusLinks: unknown | null;
99
101
  updatedAt: string;
100
102
  uploadedBy: string;
@@ -121,6 +123,7 @@ export type _360Scene = {
121
123
  floors: {
122
124
  floorID: _360FloorId;
123
125
  name: string;
126
+ isValidated?: boolean;
124
127
  }[];
125
128
  polarAngle: number;
126
129
  azimuthAngle: number;
@@ -151,24 +154,7 @@ export type _360ProjectListItem = {
151
154
  providerSuffix: string;
152
155
  timeline: string;
153
156
  uniqueId: string;
154
- };
155
- export type _360FullProject = {
156
- dates: _360SceneWithFloors[];
157
- integrationType: string;
158
- projectId: string;
159
- projectName: string;
160
- providerID: string;
161
- providerPrefix: string;
162
- providerSuffix: string;
163
- timeline: string;
164
- uniqueId: string;
165
- };
166
- export type _360FullFloor = _360Floor & {
167
- id: _360FloorId;
168
- name: string;
169
- };
170
- export type _360SceneWithFloors = _360Scene & {
171
- floors: _360FullFloor[];
157
+ requiresValidation?: boolean;
172
158
  };
173
159
  export type _360ProjectJsonResponse = {
174
160
  dates: _360Scene[];
@@ -199,7 +185,9 @@ export declare enum _360UrlParams {
199
185
  LockMarker = "lockMarker",
200
186
  IsWidget = "isWidget",
201
187
  MediaLocked = "mediaLocked",
202
- Debug = "debug"
188
+ Debug = "debug",
189
+ RequiresValidation = "requires_validation",
190
+ CommentId = "comment_id"
203
191
  }
204
192
  export declare enum _360AssetType {
205
193
  Video = "video",
@@ -213,11 +201,6 @@ export declare enum _360AssetLabel {
213
201
  Walks = "walks",
214
202
  MobilePhotos = "mobilePhotos"
215
203
  }
216
- export declare enum _360Feature {
217
- BIM = "BIM",
218
- Minimap = "Minimap",
219
- Minimodel = "Minimodel"
220
- }
221
204
  export declare enum _360IntergrationType {
222
205
  Evercam = "Evercam",
223
206
  Matterport = "Matterport",
@@ -228,14 +211,14 @@ export declare enum _360IntergrationType {
228
211
  export declare enum PathMarkerColor {
229
212
  Start = "#00e74c",
230
213
  End = "#fd7567",
214
+ Anchor = "#ffb300",
231
215
  Default = "#2196F3"
232
216
  }
233
- export type _360AssetsQueryParams = {
234
- page: number;
235
- limit: number;
217
+ export type _360AssetsQueryParams = PaginationParams & {
236
218
  projectId: string;
237
219
  date: DateType;
238
220
  floor: string;
221
+ name: string;
239
222
  id: string;
240
223
  };
241
224
  export type _360AssetsRequestPayload = {
@@ -244,7 +227,7 @@ export type _360AssetsRequestPayload = {
244
227
  floor: string;
245
228
  uploadedBy?: string;
246
229
  };
247
- export type DrawingsRequestPayload = {
230
+ export type DrawingsRequestPayload = PaginationParams & {
248
231
  projectId?: string;
249
232
  name?: string;
250
233
  changedBy?: string;
@@ -252,8 +235,6 @@ export type DrawingsRequestPayload = {
252
235
  startDate?: string;
253
236
  endDate?: string;
254
237
  id?: number;
255
- page?: number;
256
- limit?: number;
257
238
  paginate?: boolean;
258
239
  withAsset?: boolean;
259
240
  includeDeleted?: boolean;
@@ -280,16 +261,16 @@ export type _360AssetsUploadPayload = {
280
261
  title: string;
281
262
  fileExtension: string;
282
263
  }[];
283
- deviceSerial: string;
284
- startPosition: string;
285
- endPosition: string;
286
- isTimelapse: boolean;
287
- isImagesOnly: boolean;
264
+ deviceSerial?: string;
265
+ startPosition?: string;
266
+ endPosition?: string;
267
+ isTimelapse?: boolean;
268
+ isImagesOnly?: boolean;
288
269
  };
289
270
  export type Generate360MapRequestPayload = {
290
- dateId: string;
271
+ dateId: string | number;
291
272
  floorId: string;
292
- cameraOffset: string;
273
+ cameraOffset: string | number;
293
274
  startPoint: string;
294
275
  endPoint: string;
295
276
  drawingId?: number;
@@ -309,8 +290,8 @@ export declare enum EModelsType {
309
290
  }
310
291
  export type _360FloorRef = {
311
292
  projectID: string;
312
- dateID: string;
313
- floorID: string;
293
+ dateID: string | number;
294
+ floorID: _360FloorId;
314
295
  };
315
296
  export type _360Vector3 = {
316
297
  x: number;
@@ -321,7 +302,7 @@ export type _360MarkerData = {
321
302
  cameraPosition: _360Vector3;
322
303
  nextRoomId: string;
323
304
  position: _360Vector3;
324
- geolocation: {
305
+ geolocation?: {
325
306
  latitude: number;
326
307
  longitude: number;
327
308
  };
@@ -331,6 +312,9 @@ export type _360MarkerData = {
331
312
  _y: number;
332
313
  _z: number;
333
314
  isEuler: boolean;
315
+ x?: number;
316
+ y?: number;
317
+ z?: number;
334
318
  };
335
319
  };
336
320
  export type _360Route = {
@@ -362,7 +346,8 @@ export type _360FloorData = {
362
346
  imagesOnlyFeatureFlag: boolean;
363
347
  forgeBIMFeatureFlag: boolean;
364
348
  isForgeGravityEnabled: boolean;
365
- initialForgeView: Record<string, unknown> | null;
349
+ bimHeight?: number | null;
350
+ initialForgeView: ForgeView | null;
366
351
  calibrationDetails: _360CalibrationDetails;
367
352
  enhancedLightFeatureFlag: boolean;
368
353
  };
@@ -378,18 +363,3 @@ export type _360PinData = {
378
363
  azimuthAngle: number;
379
364
  };
380
365
  };
381
- export type _360ForgeTimelineItem = {
382
- taskNumber: number;
383
- taskID: string;
384
- actualStartDate: string;
385
- actualEndDate: string;
386
- plannedStartDate: string;
387
- plannedEndDate: string;
388
- objectIDs: number[];
389
- };
390
- export type _360ForgeProject = {
391
- urns?: Array<{
392
- urn: string;
393
- }>;
394
- timeline?: _360ForgeTimelineItem[];
395
- };
@@ -41,7 +41,7 @@ export type AdminInvite = {
41
41
  resourceId: string;
42
42
  assigner: AdminInviteAssigner;
43
43
  sentCount: number;
44
- lastSentAt: string;
44
+ lastSentAt: string | null;
45
45
  authContext: AdminInviteAuthContext;
46
46
  statusName: string;
47
47
  };
@@ -1,7 +1,9 @@
1
+ import { PaginatedItems, PaginationParams } from "@evercam/api/types";
1
2
  export declare enum AiApp {
2
3
  GateReport = "gate_report",
3
4
  Ppe = "ppe",
4
- SiteAnalytics = "site_analytics"
5
+ SiteAnalytics = "site_analytics",
6
+ Observations360 = "observations_360"
5
7
  }
6
8
  export declare enum AiProvider {
7
9
  Gemini = "gemini",
@@ -11,7 +13,8 @@ export declare enum AiProvider {
11
13
  export declare enum AiConfigsPromptDialogMode {
12
14
  Create = "create",
13
15
  Edit = "edit",
14
- View = "view"
16
+ View = "view",
17
+ Subprompt = "subprompt"
15
18
  }
16
19
  export declare enum AiConfigsKeyDialogMode {
17
20
  Create = "create",
@@ -45,6 +48,11 @@ export declare enum AiPromptModel {
45
48
  ClaudeSonnet46 = "claude-sonnet-4-6",
46
49
  ClaudeHaiku45 = "claude-haiku-4-5"
47
50
  }
51
+ export declare enum AiPromptType {
52
+ Prompt = "prompt",
53
+ Parent = "parent",
54
+ Subprompt = "subprompt"
55
+ }
48
56
  export interface AiPrompt {
49
57
  id: number;
50
58
  title: string | null;
@@ -56,6 +64,9 @@ export interface AiPrompt {
56
64
  createdBy: string;
57
65
  createdAt: string;
58
66
  updatedAt: string;
67
+ promptType: AiPromptType;
68
+ parentId: number | null;
69
+ subpromptCount: number;
59
70
  }
60
71
  export interface AiPromptCreatePayload {
61
72
  title?: string | null;
@@ -64,6 +75,7 @@ export interface AiPromptCreatePayload {
64
75
  model?: string | null;
65
76
  prompt: string;
66
77
  outputSchema?: Record<string, unknown> | null;
78
+ promptType?: AiPromptType.Prompt | AiPromptType.Parent;
67
79
  }
68
80
  export interface AiPromptUpdatePayload {
69
81
  title?: string | null;
@@ -73,23 +85,23 @@ export interface AiPromptUpdatePayload {
73
85
  prompt?: string;
74
86
  outputSchema?: Record<string, unknown> | null;
75
87
  }
76
- export type AiPromptQueryParams = {
88
+ export type AiPromptQueryParams = PaginationParams & {
77
89
  app?: string;
78
90
  purpose?: string;
79
91
  model?: string;
80
92
  search?: string;
81
93
  createdBy?: string;
82
- page?: number;
83
- limit?: number;
94
+ promptType?: AiPromptType;
95
+ includeSubprompts?: boolean;
84
96
  };
85
- export interface AiPromptListResponse {
86
- items: AiPrompt[];
87
- total: number;
88
- page: number;
89
- limit: number;
90
- from: number;
91
- to: number;
97
+ export interface AiSubpromptCreatePayload {
98
+ title?: string | null;
99
+ purpose: string;
100
+ model?: string | null;
101
+ prompt: string;
102
+ outputSchema?: Record<string, unknown> | null;
92
103
  }
104
+ export type AiPromptListResponse = PaginatedItems<AiPrompt>;
93
105
  export interface AiPromptCreateResponse {
94
106
  created: boolean;
95
107
  data: AiPrompt;
@@ -152,3 +164,81 @@ export interface AiApiKeyDeleteResponse {
152
164
  count: number;
153
165
  message: string;
154
166
  }
167
+ export declare enum AiObservationFeasibilityStatus {
168
+ Prod = "prod",
169
+ Beta = "beta",
170
+ Parked = "parked"
171
+ }
172
+ export declare enum AiObservationTimeDetection {
173
+ PerSecond = "per_second",
174
+ PerMinute = "per_minute",
175
+ Hourly = "hourly",
176
+ Daily = "daily"
177
+ }
178
+ export interface AiObservationFeasibilityConfig {
179
+ bg: string;
180
+ fg: string;
181
+ border: string;
182
+ label: string;
183
+ }
184
+ export declare const AI_OBSERVATION_FEASIBILITY_CONFIGS: Record<AiObservationFeasibilityStatus, AiObservationFeasibilityConfig>;
185
+ export interface AiObservationType {
186
+ id: number;
187
+ observationCode: string;
188
+ name: string;
189
+ description: string | null;
190
+ type: string;
191
+ rules: Record<string, unknown> | null;
192
+ timeDetection: string | null;
193
+ every: number | null;
194
+ severity: number | null;
195
+ feasibilityStatus: AiObservationFeasibilityStatus;
196
+ promptId: number | null;
197
+ promptName: string | null;
198
+ insertedAt: string;
199
+ updatedAt: string;
200
+ }
201
+ export interface AiObservationTypeCreatePayload {
202
+ observationCode: string;
203
+ name: string;
204
+ description?: string | null;
205
+ type: string;
206
+ rules?: Record<string, unknown> | null;
207
+ timeDetection?: string | null;
208
+ every?: number | null;
209
+ severity?: number | null;
210
+ feasibilityStatus: AiObservationFeasibilityStatus;
211
+ promptId?: number | null;
212
+ }
213
+ export type AiObservationTypeUpdatePayload = Partial<Omit<AiObservationTypeCreatePayload, "observationCode">>;
214
+ export type AiObservationTypeQueryParams = {
215
+ search?: string;
216
+ feasibilityStatus?: string;
217
+ sourceType?: string;
218
+ type?: string;
219
+ page?: number;
220
+ limit?: number;
221
+ };
222
+ export interface AiObservationTypeListResponse {
223
+ items: AiObservationType[];
224
+ total: number;
225
+ page: number;
226
+ limit: number;
227
+ from: number;
228
+ to: number;
229
+ }
230
+ export interface AiObservationTypeCreateResponse {
231
+ created: boolean;
232
+ data: AiObservationType;
233
+ message: string;
234
+ }
235
+ export interface AiObservationTypeUpdateResponse {
236
+ updated: boolean;
237
+ id: number | string;
238
+ message: string;
239
+ }
240
+ export interface AiObservationTypeDeleteResponse {
241
+ deleted: boolean;
242
+ count: number;
243
+ message: string;
244
+ }