@evercam/api 1.0.0-eea993f14 → 1.0.0-eefb67c4d

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 (102) hide show
  1. package/README.md +1 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +209 -15
  3. package/dist/api/api/adminApi.d.ts +96 -56
  4. package/dist/api/api/aiApi.d.ts +182 -55
  5. package/dist/api/api/authzApi.d.ts +26 -16
  6. package/dist/api/api/client/axios.d.ts +1 -1
  7. package/dist/api/api/client/swr/Swr.d.ts +1 -1
  8. package/dist/api/api/evercamApi.d.ts +152 -90
  9. package/dist/api/api/evercamLabsApi.d.ts +6 -18
  10. package/dist/api/api/exNvrApi.d.ts +1 -1
  11. package/dist/api/api/index.d.ts +1 -0
  12. package/dist/api/api/ingestApi.d.ts +123 -58
  13. package/dist/api/api/ptzApi.d.ts +9 -4
  14. package/dist/api/api/videoWallApi.d.ts +2 -2
  15. package/dist/api/api/weatherApi.d.ts +2 -2
  16. package/dist/api/api/workflowsApi.d.ts +15 -0
  17. package/dist/api/types/360.d.ts +176 -85
  18. package/dist/api/types/aconex.d.ts +9 -9
  19. package/dist/api/types/admin.d.ts +51 -0
  20. package/dist/api/types/aiConfigs.d.ts +244 -0
  21. package/dist/api/types/analytics.d.ts +128 -74
  22. package/dist/api/types/anpr.d.ts +48 -2
  23. package/dist/api/types/auditLogs.d.ts +20 -5
  24. package/dist/api/types/authz.d.ts +116 -12
  25. package/dist/api/types/autodesk.d.ts +7 -7
  26. package/dist/api/types/automation.d.ts +65 -3
  27. package/dist/api/types/axios.d.ts +20 -15
  28. package/dist/api/types/bim.d.ts +39 -10
  29. package/dist/api/types/camera.d.ts +120 -115
  30. package/dist/api/types/comments.d.ts +16 -11
  31. package/dist/api/types/company.d.ts +43 -3
  32. package/dist/api/types/compare.d.ts +21 -6
  33. package/dist/api/types/connector.d.ts +5 -5
  34. package/dist/api/types/coolify.d.ts +18 -2
  35. package/dist/api/types/detections.d.ts +23 -18
  36. package/dist/api/types/drone.d.ts +95 -6
  37. package/dist/api/types/errors.d.ts +18 -2
  38. package/dist/api/types/gateReport.d.ts +46 -68
  39. package/dist/api/types/gateReportManagement.d.ts +170 -0
  40. package/dist/api/types/hammertech.d.ts +98 -0
  41. package/dist/api/types/hdd.d.ts +26 -1
  42. package/dist/api/types/index.d.ts +15 -3
  43. package/dist/api/types/ingest.d.ts +267 -17
  44. package/dist/api/types/kit.d.ts +55 -105
  45. package/dist/api/types/map.d.ts +12 -0
  46. package/dist/api/types/media.d.ts +9 -3
  47. package/dist/api/types/notification.d.ts +83 -3
  48. package/dist/api/types/oauth.d.ts +62 -0
  49. package/dist/api/types/observationEvents.d.ts +141 -0
  50. package/dist/api/types/observations.d.ts +84 -0
  51. package/dist/api/types/planner.d.ts +98 -8
  52. package/dist/api/types/posthog.d.ts +35 -0
  53. package/dist/api/types/procore.d.ts +13 -6
  54. package/dist/api/types/progressPhoto.d.ts +6 -2
  55. package/dist/api/types/project.d.ts +111 -25
  56. package/dist/api/types/recording.d.ts +9 -15
  57. package/dist/api/types/recycleBin.d.ts +1 -1
  58. package/dist/api/types/ring.d.ts +53 -0
  59. package/dist/api/types/roi.d.ts +3 -11
  60. package/dist/api/types/routeParams.d.ts +1 -0
  61. package/dist/api/types/router.d.ts +1 -1
  62. package/dist/api/types/shared.d.ts +33 -24
  63. package/dist/api/types/shares.d.ts +1 -14
  64. package/dist/api/types/sim.d.ts +6 -6
  65. package/dist/api/types/siteAnalytics.d.ts +81 -43
  66. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  67. package/dist/api/types/siteView.d.ts +78 -0
  68. package/dist/api/types/smartSeach.d.ts +5 -0
  69. package/dist/api/types/snapshots.d.ts +49 -4
  70. package/dist/api/types/socket.d.ts +4 -0
  71. package/dist/api/types/storageProvider.d.ts +19 -0
  72. package/dist/api/types/storyblok.d.ts +27 -0
  73. package/dist/api/types/streaming.d.ts +3 -3
  74. package/dist/api/types/tag.d.ts +1 -1
  75. package/dist/api/types/time.d.ts +0 -18
  76. package/dist/api/types/timelapse.d.ts +7 -11
  77. package/dist/api/types/user.d.ts +106 -37
  78. package/dist/api/types/videoWall.d.ts +21 -21
  79. package/dist/api/types/weather.d.ts +75 -11
  80. package/dist/api/types/widget.d.ts +71 -12
  81. package/dist/api/types/workflows.d.ts +108 -0
  82. package/dist/api/types/xweather.d.ts +4 -4
  83. package/dist/api/utils.d.ts +1 -1
  84. package/dist/index.js +2431 -965
  85. package/dist/index.js.map +1 -1
  86. package/dist/index.umd.cjs +1 -1
  87. package/dist/index.umd.cjs.map +1 -1
  88. package/dist/shared/types/components.d.ts +336 -34
  89. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  90. package/dist/shared/types/droneUpload.d.ts +67 -0
  91. package/dist/shared/types/imagePlayer.d.ts +9 -2
  92. package/dist/shared/types/index.d.ts +5 -0
  93. package/dist/shared/types/observations.d.ts +25 -0
  94. package/dist/shared/types/rbac.d.ts +67 -0
  95. package/dist/shared/types/report.d.ts +101 -0
  96. package/dist/shared/types/timeline.d.ts +2 -1
  97. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  98. package/dist/shared/utils/datePresets.d.ts +31 -0
  99. package/package.json +4 -2
  100. package/dist/api/types/copilot.d.ts +0 -157
  101. package/dist/api/types/storageServers.d.ts +0 -4
  102. package/dist/api/types/vendorModel.d.ts +0 -15
@@ -0,0 +1,101 @@
1
+ import type Vue from "vue";
2
+ import type { CancelToken } from "axios";
3
+ import type { Operator } from "@evercam/api/types";
4
+ import type { DateRangeOption } from "@evercam/shared/utils/datePresets";
5
+ export type ReportTableHeaderParams<TItem = unknown> = {
6
+ value: string;
7
+ text: string;
8
+ align?: string;
9
+ sortable?: boolean;
10
+ visible?: boolean;
11
+ width?: number | string;
12
+ copyable?: boolean;
13
+ toStringFn?: (item: TItem, key: string) => string;
14
+ sort?(a: unknown, b: unknown): number;
15
+ togglable?: boolean;
16
+ filterable?: boolean;
17
+ };
18
+ export declare enum ReportSortDirection {
19
+ Asc = "asc",
20
+ Desc = "desc"
21
+ }
22
+ export declare enum ReportFilterComponent {
23
+ Text = "TextFieldSearchFilter",
24
+ Select = "SelectSearchFilter",
25
+ DatePicker = "DatePickerSearchFilter",
26
+ CountField = "CountFieldSearchFilter",
27
+ Tag = "TagSearchFilter"
28
+ }
29
+ export type ReportFilterCell = {
30
+ header: ReportTableHeaderParams;
31
+ field?: ReportFilterField;
32
+ };
33
+ export type OfflineCamerasReportContext = Vue & {
34
+ report: string;
35
+ };
36
+ export type ReportFilterItem = {
37
+ name?: string;
38
+ value: string | number | boolean | null;
39
+ };
40
+ export type ReportSearchParamValue = string | number | boolean | null | undefined | (string | number | boolean | null)[];
41
+ export type ReportSearchParams = Record<string, ReportSearchParamValue>;
42
+ export type ReportItem = Record<string, unknown>;
43
+ export type ReportProviderResponse<TItem = ReportItem> = {
44
+ total?: number;
45
+ [dataField: string]: TItem[] | number | undefined;
46
+ };
47
+ export type ReportTableProvider<TItem = ReportItem> = (request: {
48
+ cancelToken: CancelToken;
49
+ params: ReportSearchParams;
50
+ }) => Promise<ReportProviderResponse<TItem>>;
51
+ export type ReportTableOptions = {
52
+ page?: number;
53
+ itemsPerPage?: number | string;
54
+ sortBy?: string[];
55
+ sortDesc?: boolean[];
56
+ };
57
+ export type ReportFilterFieldNamesMap = {
58
+ fromField: string;
59
+ toField: string;
60
+ };
61
+ export type ReportFilterOperatorItem = {
62
+ value: Operator;
63
+ label: string;
64
+ };
65
+ export type ReportFilterAttributes = {
66
+ items?: ReportFilterItem[];
67
+ multiple?: boolean;
68
+ isAutocomplete?: boolean;
69
+ value?: string | number | string[];
70
+ label?: string;
71
+ textFieldAttrs?: {
72
+ placeholder?: string;
73
+ };
74
+ isRange?: boolean;
75
+ convertToIso?: boolean;
76
+ minDate?: string;
77
+ maxDate?: string;
78
+ options?: DateRangeOption[];
79
+ withOperator?: boolean;
80
+ operatorFieldName?: string;
81
+ operatorLabel?: string;
82
+ operatorItems?: ReportFilterOperatorItem[];
83
+ showToolTip?: boolean;
84
+ toolTipText?: string;
85
+ "menu-props"?: {
86
+ offsetY?: boolean;
87
+ };
88
+ };
89
+ export type ReportFilterField<TItem = ReportItem> = {
90
+ component: ReportFilterComponent;
91
+ name?: string;
92
+ width?: number;
93
+ attributes?: ReportFilterAttributes;
94
+ listeners?: {
95
+ keypress?: (event: KeyboardEvent) => boolean | void;
96
+ };
97
+ fieldNamesMap?: ReportFilterFieldNamesMap;
98
+ isGlobalFilter?: boolean;
99
+ offline?: boolean;
100
+ customFilter?: (item: TItem, fieldName: string, search: ReportSearchParamValue) => boolean;
101
+ };
@@ -1,4 +1,4 @@
1
- import { TimelineGroupId, type TimelinePlayerGroupConfig } from "@evercam/shared/types/components";
1
+ import { TimelineGroupId, type TimelinePlayerGroupConfig } from "./components";
2
2
  export interface TimelineGroup {
3
3
  id: TimelineGroupId;
4
4
  timelineConfig: TimelinePlayerGroupConfig | Record<string, TimelinePlayerGroupConfig>;
@@ -6,4 +6,5 @@ export interface TimelineGroup {
6
6
  isDisabled: boolean;
7
7
  isRestricted?: boolean;
8
8
  hasMultipleGroups?: boolean;
9
+ isPersistent?: boolean;
9
10
  }
@@ -0,0 +1,36 @@
1
+ import type { DateRange, DayMeta } from "@evercam/ui";
2
+ /**
3
+ * EDatePicker works in plain local `Date`s; this app stores dates as
4
+ * "YYYY-MM-DD" strings. Both helpers carry the wall-clock reading across that
5
+ * boundary — never the instant — so a date never shifts by a day.
6
+ */
7
+ export declare function toCalendarDate(value?: string | number | Date | null, { timezone, withHour }?: {
8
+ timezone?: string;
9
+ withHour?: boolean;
10
+ }): Date | undefined;
11
+ export declare function toIsoDay(date?: Date | null): string;
12
+ export declare function toCalendarDayEnd(value?: string | number | Date | null, timezone?: string): Date | undefined;
13
+ export declare function toCalendarRange(value?: string[] | null): DateRange;
14
+ export declare function fromCalendarRange(range?: DateRange | null): string[];
15
+ export declare function toCssColor(color?: string): string | undefined;
16
+ export declare function toDayMeta({ date, events, eventColor, }: {
17
+ date: Date;
18
+ events?: string[] | ((day: string) => boolean);
19
+ eventColor?: string | ((day: string) => string | undefined);
20
+ }): DayMeta | undefined;
21
+ /**
22
+ * Days inside the current selection carry no marker; everything else keeps the
23
+ * "available footage" dot. An empty or half-made selection marks every day.
24
+ */
25
+ export declare function getOutsideRangeColor(day: string, range?: string[] | null, color?: string): string | undefined;
26
+ export declare function orderDayRange(range?: string[] | null): {
27
+ fromDate: string;
28
+ toDate: string;
29
+ } | null;
30
+ export declare function toDayBounds({ fromDate, toDate, }: {
31
+ fromDate: string;
32
+ toDate: string;
33
+ }): {
34
+ fromDate: string;
35
+ toDate: string;
36
+ };
@@ -0,0 +1,31 @@
1
+ import type { DatePreset as EDatePickerPreset, WeekStart } from "@evercam/ui";
2
+ export declare enum DateRangeOption {
3
+ Today = 0,
4
+ Yesterday = -1,
5
+ Last7Days = -7,
6
+ Last30Days = -30,
7
+ Last90Days = -90,
8
+ Last365Days = -365,
9
+ Next7Days = 7,
10
+ Next30Days = 30,
11
+ Next60Days = 60,
12
+ ThisMonth = "__thisMonth__",
13
+ LastCalendarMonth = "__lastCalendarMonth__",
14
+ DataRange = "__dataRange__",
15
+ CalendarRange = "__calendarRange__"
16
+ }
17
+ export declare const DefaultDateRangeOptions: DateRangeOption[];
18
+ export type DateRangePresetOptions = {
19
+ min?: Date;
20
+ max?: Date;
21
+ dataRangeLabel?: string;
22
+ weekStartsOn?: WeekStart;
23
+ };
24
+ export declare function toDateRangePresets(options: DateRangeOption[], $t: (key: string) => string, { min, max, dataRangeLabel, weekStartsOn }?: DateRangePresetOptions): EDatePickerPreset[];
25
+ export declare function matchDateRangePreset({ range, presets, min, max, weekStartsOn, }: {
26
+ range?: string[] | null;
27
+ presets: EDatePickerPreset[];
28
+ min?: Date;
29
+ max?: Date;
30
+ weekStartsOn?: WeekStart;
31
+ }): EDatePickerPreset | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evercam/api",
3
- "version": "1.0.0-eea993f14",
3
+ "version": "1.0.0-eefb67c4d",
4
4
  "description": "Evercam API client",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,6 +28,8 @@
28
28
  },
29
29
  "readme": "README.md",
30
30
  "scripts": {
31
+ "preinstall": "node ../shared/ci-scripts/check-bootstrap.js",
32
+ "bootstrap": "node ../shared/ci-scripts/bootstrap.js",
31
33
  "clean": "rimraf dist",
32
34
  "typecheck": "tsc --noEmit",
33
35
  "build:types": "tsc --declaration --emitDeclarationOnly",
@@ -36,7 +38,7 @@
36
38
  "publish-api": "cd ../.. && yarn publish-api"
37
39
  },
38
40
  "devDependencies": {
39
- "@types/node": "^25.2.3",
41
+ "@types/node": "^25.9.1",
40
42
  "vite": "latest",
41
43
  "vite-plugin-commonjs": "^0.10.3",
42
44
  "vite-plugin-dts": "^4.5.4"
@@ -1,157 +0,0 @@
1
- import type { AnalyticsEventPageId, CameraExid, CameraFeatureFlag, CameraStatus, ProjectExid, ProjectFeatureFlag, ProjectStatus } from "@/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
- }
31
- export declare enum CopilotMissingFieldsLabels {
32
- ProjectExid = "Project",
33
- CameraExid = "Camera",
34
- FromDate = "Start date",
35
- ToDate = "End date"
36
- }
37
- export type CopilotMissingField<T = any> = {
38
- name: string;
39
- label: string;
40
- value: any;
41
- type: string;
42
- toolId: string;
43
- error?: T;
44
- };
45
- export type CopilotMissingFields = Record<number, CopilotMissingField[]>;
46
- export type UserConversations = CopilotConversation & {
47
- Message: CopilotMessage[];
48
- };
49
- export declare enum CopilotSocketEvent {
50
- ConversationStart = "conversation:start",
51
- ConversationCreated = "conversation:created",
52
- LLMMessageChunk = "llm:message:chunk",
53
- LLMMessageComplete = "llm:message:complete",
54
- LLMMessageLoading = "llm:message:loading",
55
- LLMRequestCancel = "llm:request:cancel",
56
- LLMRequestCanceled = "llm:request:canceled",
57
- UserMessage = "user:message",
58
- ContextError = "chat:contextError",
59
- ChatError = "chat:chatError",
60
- MissingFields = "chat:missingFields",
61
- MissingFieldsCompleted = "chat:missingFields:completed",
62
- SystemToolCallResponse = "system:toolCall:response",
63
- ChangeProvider = "chat:changeProvider"
64
- }
65
- export type CopilotConversation = {
66
- id: number;
67
- user: string;
68
- model: string;
69
- context: string;
70
- cameraExid: CameraExid;
71
- projectExid: ProjectExid;
72
- startDate: string;
73
- endDate: string;
74
- messagesCount: number;
75
- };
76
- export declare enum CopilotProvider {
77
- Gemini = "gemini",
78
- ChatGPT = "chatgpt"
79
- }
80
- export declare enum CopilotSuggestion {
81
- UserManual = "user_manual",
82
- GateReport = "gate_report",
83
- Weather = "weather",
84
- Clip = "clip",
85
- Timelapse = "timelapse",
86
- Chart = "chart"
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
- }
106
- export type CopilotSystemToolCallResponse<I = unknown, O = unknown> = {
107
- toolId?: CopilotToolId;
108
- input?: I;
109
- output?: O;
110
- };
111
- export type CopilotCamera = {
112
- name: string;
113
- exid: CameraExid;
114
- status: CameraStatus;
115
- featureFlags?: CameraFeatureFlag[];
116
- };
117
- export type CopilotProject = {
118
- name: string;
119
- exid: ProjectExid;
120
- status: ProjectStatus;
121
- featureFlags?: ProjectFeatureFlag[];
122
- cameras?: CopilotCamera[];
123
- };
124
- export type CopilotMessageContext = {
125
- pageId?: AnalyticsEventPageId;
126
- selectedCamera?: CopilotCamera;
127
- selectedProject?: CopilotProject;
128
- };
129
- export type CopilotMessageStep = {
130
- args: string[];
131
- depth: number;
132
- id?: number;
133
- message_id?: number;
134
- step: CopilotStepId;
135
- timestamp: string;
136
- };
137
- export declare enum CopilotMissingFieldComponent {
138
- Select = "SelectField",
139
- DateTime = "DateTimeField",
140
- Schedule = "ScheduleField",
141
- MultiOptions = "MultiOptionsField",
142
- Switch = "SwitchField"
143
- }
144
- export declare enum CopilotMissingFieldName {
145
- ProjectExid = "projectExid",
146
- CameraExid = "cameraExid",
147
- FromDate = "fromDate",
148
- ToDate = "toDate",
149
- Schedule = "schedule",
150
- Duration = "duration"
151
- }
152
- export declare enum CopilotMissingFieldType {
153
- Boolean = "boolean",
154
- String = "string",
155
- Number = "number"
156
- }
157
- export type CopilotCompletedFields = Record<string, unknown>;
@@ -1,4 +0,0 @@
1
- export type StorageServer = string;
2
- export type StorageServersResponsePayload = {
3
- servers: StorageServer[];
4
- };
@@ -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
- };