@evercam/api 1.0.0-3bfceb83d → 1.0.0-3c7f69373

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 (40) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +8 -10
  2. package/dist/api/api/adminApi.d.ts +6 -6
  3. package/dist/api/api/aiApi.d.ts +38 -1
  4. package/dist/api/api/evercamApi.d.ts +10 -2
  5. package/dist/api/api/evercamLabsApi.d.ts +1 -12
  6. package/dist/api/api/index.d.ts +1 -0
  7. package/dist/api/api/ingestApi.d.ts +2 -3
  8. package/dist/api/api/workflowsApi.d.ts +15 -0
  9. package/dist/api/types/360.d.ts +5 -16
  10. package/dist/api/types/aiConfigs.d.ts +3 -1
  11. package/dist/api/types/analytics.d.ts +14 -16
  12. package/dist/api/types/auditLogs.d.ts +0 -1
  13. package/dist/api/types/automation.d.ts +9 -0
  14. package/dist/api/types/axios.d.ts +1 -0
  15. package/dist/api/types/camera.d.ts +24 -14
  16. package/dist/api/types/comments.d.ts +7 -1
  17. package/dist/api/types/company.d.ts +1 -2
  18. package/dist/api/types/drone.d.ts +0 -1
  19. package/dist/api/types/index.d.ts +1 -1
  20. package/dist/api/types/kit.d.ts +2 -0
  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/observationEvents.d.ts +81 -1
  24. package/dist/api/types/observations.d.ts +36 -37
  25. package/dist/api/types/planner.d.ts +1 -0
  26. package/dist/api/types/project.d.ts +7 -2
  27. package/dist/api/types/shared.d.ts +10 -12
  28. package/dist/api/types/siteAnalyticsManagement.d.ts +10 -0
  29. package/dist/api/types/siteView.d.ts +6 -1
  30. package/dist/api/types/user.d.ts +15 -0
  31. package/dist/api/types/workflows.d.ts +108 -0
  32. package/dist/api/utils.d.ts +1 -0
  33. package/dist/index.js +582 -518
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.umd.cjs +1 -1
  36. package/dist/index.umd.cjs.map +1 -1
  37. package/dist/shared/types/components.d.ts +149 -13
  38. package/dist/shared/types/observations.d.ts +4 -0
  39. package/package.json +1 -1
  40. package/dist/api/types/copilot.d.ts +0 -159
@@ -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",
@@ -13,6 +14,13 @@ export interface ObservationEventStatusConfig {
13
14
  export declare const OBSERVATION_EVENT_STATUS_CONFIGS: Record<ObservationEventStatus, ObservationEventStatusConfig>;
14
15
  export interface SiteAnalyticsObservationEvent {
15
16
  id: number;
17
+ sourceType?: ObservationSourceType;
18
+ sessionId?: string | null;
19
+ markerId?: string | null;
20
+ drawingId?: string | null;
21
+ drawingName?: string | null;
22
+ walkName?: string | null;
23
+ sightings?: Array<Record<string, unknown>> | null;
16
24
  observationTypeId: number;
17
25
  observationName: string | null;
18
26
  observationCode: string | null;
@@ -27,7 +35,7 @@ export interface SiteAnalyticsObservationEvent {
27
35
  model: string | null;
28
36
  promptId: number | null;
29
37
  observationMetadata: Record<string, unknown> | null;
30
- trigger: string;
38
+ trigger: ObservationEventTrigger | string;
31
39
  reviewedBy: string | null;
32
40
  reviewedAt: string | null;
33
41
  insertedAt: string;
@@ -37,11 +45,17 @@ export type ObservationEventQueryParams = {
37
45
  projectExid?: string;
38
46
  observationTypeIds?: string;
39
47
  status?: ObservationEventStatus | string;
48
+ sourceType?: ObservationSourceType | string;
49
+ modelName?: string;
40
50
  sortBy?: string;
41
51
  sortDir?: "asc" | "desc";
42
52
  page?: number;
43
53
  limit?: number;
44
54
  };
55
+ export interface ObservationModelOption {
56
+ modelName: string;
57
+ total: number;
58
+ }
45
59
  export interface ObservationEventListResponse {
46
60
  items: SiteAnalyticsObservationEvent[];
47
61
  total: number;
@@ -59,3 +73,69 @@ export interface ObservationEventReviewResponse {
59
73
  id: number | string;
60
74
  message: string;
61
75
  }
76
+ export declare enum ObservationSourceType {
77
+ Camera = "camera",
78
+ Walk360 = "walk360",
79
+ Drone = "drone"
80
+ }
81
+ export declare enum ObservationEventTrigger {
82
+ CameraDetection = "camera_detection",
83
+ Walk = "walk"
84
+ }
85
+ export declare enum Walk360ProcessedSessionStatus {
86
+ Done = "done",
87
+ Processing = "processing",
88
+ Retryable = "retryable",
89
+ Error = "error"
90
+ }
91
+ export interface Walk360Activity {
92
+ observationTypeId: number;
93
+ }
94
+ export interface Walk360WorkerInfo {
95
+ coolifyAppId?: string | null;
96
+ workerStatus?: string | null;
97
+ workerIsRunning?: boolean;
98
+ appUrl?: string | null;
99
+ visionProvider?: VisionProvider;
100
+ }
101
+ export interface Walk360Config extends Walk360WorkerInfo {
102
+ projectExid: string;
103
+ enabled: boolean;
104
+ startDate: string | null;
105
+ activities: Walk360Activity[];
106
+ configured: boolean;
107
+ maxParallelWalks?: number;
108
+ }
109
+ export interface Walk360ConfigSummary extends Walk360WorkerInfo {
110
+ projectExid: string;
111
+ projectName?: string | null;
112
+ enabled: boolean;
113
+ startDate: string | null;
114
+ activities: Walk360Activity[];
115
+ maxParallelWalks: number;
116
+ walksDone: number;
117
+ walksProcessing: number;
118
+ walksRetryable: number;
119
+ eventsCreated: number;
120
+ lastProcessedAt: string | null;
121
+ updatedAt: string | null;
122
+ }
123
+ export interface Walk360WorkerAction {
124
+ projectExid: string;
125
+ appUuid: string | null;
126
+ message: string;
127
+ state: string;
128
+ }
129
+ export interface Walk360ProcessedSession {
130
+ id: number;
131
+ projectExid: string;
132
+ sourceType: ObservationSourceType;
133
+ sessionId: string;
134
+ status: Walk360ProcessedSessionStatus;
135
+ markersTotal: number | null;
136
+ markersProcessed: number | null;
137
+ eventsCreated: number | null;
138
+ error: string | null;
139
+ startedAt: string;
140
+ finishedAt: string | null;
141
+ }
@@ -1,42 +1,46 @@
1
- import { type ProjectExid, type CameraExid, type DateType, type BBox, PpeLabel, DownloadFileType } from "@evercam/api/types";
2
- export declare enum ObservationItemState {
3
- Absent = 0,
4
- Present = 1,
5
- NotVisible = 2
6
- }
7
- export type ObservationEventEquipment = {
8
- score: number;
9
- bbox: BBox;
10
- };
1
+ import { type ProjectExid, type CameraExid, type DateType, type BBox, AiObservationFeasibilityStatus, ObservationEventStatus, DownloadFileType } from "@evercam/api/types";
2
+ export type ObservationApproval = boolean | ObservationEventStatus.Unsure | null;
11
3
  export type ObservationEvent = {
12
4
  id: number;
5
+ observationTypeId: number;
6
+ observationCode: string | null;
13
7
  cameraExid: CameraExid;
14
- projectExid: ProjectExid;
8
+ projectExid: ProjectExid | null;
15
9
  capturedAt: DateType;
16
- personIndex: number;
17
- personBbox: BBox;
18
- personScore: number;
19
- ppe: Partial<Record<PpeLabel, ObservationEventEquipment>>;
20
- hasHelmet: ObservationItemState | null;
21
- hasHighVisVest: ObservationItemState | null;
22
- hasGloves: ObservationItemState | null;
23
- hasGlasses: ObservationItemState | null;
24
- modelVersion: string;
25
- createdAt: DateType;
26
- compliant: boolean;
10
+ endTime: DateType | null;
11
+ confidence: number | null;
12
+ status: ObservationEventStatus;
13
+ isApproved: ObservationApproval;
27
14
  reason: string | null;
28
- isApproved: boolean | null;
15
+ personBbox: BBox | null;
16
+ modelVersion: string | null;
17
+ observationMetadata: Record<string, unknown> | null;
18
+ trigger: string;
19
+ reviewedBy: string | null;
20
+ reviewedAt: DateType | null;
29
21
  };
22
+ export type ObservationType = {
23
+ id: number;
24
+ observationCode: string;
25
+ name: string;
26
+ description: string | null;
27
+ type: string;
28
+ severity: number | null;
29
+ feasibilityStatus: AiObservationFeasibilityStatus;
30
+ };
31
+ export declare enum ObservationMissingItem {
32
+ Helmet = "helmet",
33
+ HighVisVest = "high_vis_vest",
34
+ Gloves = "gloves",
35
+ Glasses = "glasses"
36
+ }
30
37
  export type ObservationEventsQueryParams = {
31
38
  cameraExid?: CameraExid;
39
+ observationCode?: string;
32
40
  fromDate?: string;
33
41
  toDate?: string;
34
- required?: string;
35
- compliant?: boolean;
36
- hasHelmet?: boolean;
37
- hasHighVisVest?: boolean;
38
- hasGloves?: boolean;
39
- hasGlasses?: boolean;
42
+ missingItems?: string;
43
+ status?: ObservationEventStatus;
40
44
  sort?: string;
41
45
  page?: number;
42
46
  limit?: number;
@@ -63,21 +67,16 @@ export declare enum ObservationCountsGranularity {
63
67
  }
64
68
  export type ObservationEventsCountsQueryParams = {
65
69
  cameraExid?: CameraExid;
70
+ observationCode?: string;
66
71
  fromDate?: string;
67
72
  toDate?: string;
68
- required?: string;
69
- compliant?: boolean;
70
- hasHelmet?: boolean;
71
- hasHighVisVest?: boolean;
72
- hasGloves?: boolean;
73
- hasGlasses?: boolean;
73
+ missingItems?: string;
74
+ status?: ObservationEventStatus;
74
75
  granularity?: ObservationCountsGranularity;
75
76
  };
76
77
  export type ObservationEventCount = {
77
78
  bucket: DateType;
78
79
  total: number;
79
- compliant: number;
80
- nonCompliant: number;
81
80
  };
82
81
  export declare enum ObservationRequiredItem {
83
82
  Helmet = "has_helmet",
@@ -29,6 +29,7 @@ export declare enum PlannerUrlParams {
29
29
  DealId = "deal_id"
30
30
  }
31
31
  export declare enum EDistortImageModes {
32
+ Edit = "edit",
32
33
  FreeRotate = "freeRotate",
33
34
  Lock = "lock",
34
35
  Rotate = "rotate",
@@ -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 declare enum FeedbackContext {
120
- CopilotMessage = "copilot_message"
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 = {
@@ -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
+ };
@@ -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;