@evercam/api 1.0.0-000bac2be

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 (113) hide show
  1. package/README.md +7 -0
  2. package/dist/api/api/3dFirebaseApi.d.ts +215 -0
  3. package/dist/api/api/adminApi.d.ts +381 -0
  4. package/dist/api/api/aiApi.d.ts +251 -0
  5. package/dist/api/api/authzApi.d.ts +40 -0
  6. package/dist/api/api/client/axios.d.ts +14 -0
  7. package/dist/api/api/client/customErrors.d.ts +90 -0
  8. package/dist/api/api/client/index.d.ts +5 -0
  9. package/dist/api/api/client/interceptors.d.ts +10 -0
  10. package/dist/api/api/client/swr/Swr.d.ts +14 -0
  11. package/dist/api/api/client/swr/SwrStore.d.ts +10 -0
  12. package/dist/api/api/evercamApi.d.ts +365 -0
  13. package/dist/api/api/evercamLabsApi.d.ts +34 -0
  14. package/dist/api/api/exNvrApi.d.ts +43 -0
  15. package/dist/api/api/index.d.ts +14 -0
  16. package/dist/api/api/ingestApi.d.ts +161 -0
  17. package/dist/api/api/ptzApi.d.ts +45 -0
  18. package/dist/api/api/videoWallApi.d.ts +9 -0
  19. package/dist/api/api/weatherApi.d.ts +9 -0
  20. package/dist/api/api/webRtcApi.d.ts +22 -0
  21. package/dist/api/api/workflowsApi.d.ts +15 -0
  22. package/dist/api/index.d.ts +3 -0
  23. package/dist/api/types/360.d.ts +364 -0
  24. package/dist/api/types/aconex.d.ts +143 -0
  25. package/dist/api/types/admin.d.ts +51 -0
  26. package/dist/api/types/aiConfigs.d.ts +244 -0
  27. package/dist/api/types/analytics.d.ts +612 -0
  28. package/dist/api/types/anpr.d.ts +143 -0
  29. package/dist/api/types/auditLogs.d.ts +116 -0
  30. package/dist/api/types/authz.d.ts +132 -0
  31. package/dist/api/types/autodesk.d.ts +29 -0
  32. package/dist/api/types/automation.d.ts +123 -0
  33. package/dist/api/types/axios.d.ts +71 -0
  34. package/dist/api/types/bim.d.ts +176 -0
  35. package/dist/api/types/camera.d.ts +542 -0
  36. package/dist/api/types/comments.d.ts +64 -0
  37. package/dist/api/types/company.d.ts +115 -0
  38. package/dist/api/types/compare.d.ts +72 -0
  39. package/dist/api/types/connector.d.ts +21 -0
  40. package/dist/api/types/coolify.d.ts +36 -0
  41. package/dist/api/types/countries.d.ts +500 -0
  42. package/dist/api/types/credentials.d.ts +6 -0
  43. package/dist/api/types/detections.d.ts +117 -0
  44. package/dist/api/types/drone.d.ts +106 -0
  45. package/dist/api/types/errors.d.ts +61 -0
  46. package/dist/api/types/gateReport.d.ts +322 -0
  47. package/dist/api/types/gateReportManagement.d.ts +170 -0
  48. package/dist/api/types/hammertech.d.ts +98 -0
  49. package/dist/api/types/hdd.d.ts +88 -0
  50. package/dist/api/types/index.d.ts +71 -0
  51. package/dist/api/types/ingest.d.ts +234 -0
  52. package/dist/api/types/kit.d.ts +375 -0
  53. package/dist/api/types/map.d.ts +16 -0
  54. package/dist/api/types/media.d.ts +120 -0
  55. package/dist/api/types/notification.d.ts +107 -0
  56. package/dist/api/types/nvr.d.ts +36 -0
  57. package/dist/api/types/oauth.d.ts +62 -0
  58. package/dist/api/types/observationEvents.d.ts +141 -0
  59. package/dist/api/types/observations.d.ts +84 -0
  60. package/dist/api/types/planner.d.ts +125 -0
  61. package/dist/api/types/posthog.d.ts +53 -0
  62. package/dist/api/types/procore.d.ts +229 -0
  63. package/dist/api/types/progressPhoto.d.ts +78 -0
  64. package/dist/api/types/project.d.ts +259 -0
  65. package/dist/api/types/recording.d.ts +118 -0
  66. package/dist/api/types/recycleBin.d.ts +14 -0
  67. package/dist/api/types/ring.d.ts +53 -0
  68. package/dist/api/types/roi.d.ts +19 -0
  69. package/dist/api/types/routeParams.d.ts +53 -0
  70. package/dist/api/types/router.d.ts +86 -0
  71. package/dist/api/types/shared.d.ts +199 -0
  72. package/dist/api/types/shares.d.ts +45 -0
  73. package/dist/api/types/sim.d.ts +114 -0
  74. package/dist/api/types/siteAnalytics.d.ts +285 -0
  75. package/dist/api/types/siteAnalyticsManagement.d.ts +127 -0
  76. package/dist/api/types/siteView.d.ts +78 -0
  77. package/dist/api/types/smartSeach.d.ts +5 -0
  78. package/dist/api/types/snapshots.d.ts +104 -0
  79. package/dist/api/types/socket.d.ts +4 -0
  80. package/dist/api/types/sso.d.ts +55 -0
  81. package/dist/api/types/storageProvider.d.ts +19 -0
  82. package/dist/api/types/storyblok.d.ts +27 -0
  83. package/dist/api/types/streaming.d.ts +97 -0
  84. package/dist/api/types/systemCheck.d.ts +11 -0
  85. package/dist/api/types/tag.d.ts +12 -0
  86. package/dist/api/types/time.d.ts +7 -0
  87. package/dist/api/types/timelapse.d.ts +95 -0
  88. package/dist/api/types/user.d.ts +357 -0
  89. package/dist/api/types/videoWall.d.ts +66 -0
  90. package/dist/api/types/voyageControl.d.ts +6 -0
  91. package/dist/api/types/weather.d.ts +153 -0
  92. package/dist/api/types/widget.d.ts +252 -0
  93. package/dist/api/types/workflows.d.ts +108 -0
  94. package/dist/api/types/xweather.d.ts +12 -0
  95. package/dist/api/utils.d.ts +10 -0
  96. package/dist/index.d.ts +2 -0
  97. package/dist/index.js +4397 -0
  98. package/dist/index.js.map +1 -0
  99. package/dist/index.umd.cjs +2 -0
  100. package/dist/index.umd.cjs.map +1 -0
  101. package/dist/shared/api/index.d.ts +3 -0
  102. package/dist/shared/components/timelinePlayer/providers/index.d.ts +3 -0
  103. package/dist/shared/components/timelinePlayer/providers/timelineAnprProvider.d.ts +17 -0
  104. package/dist/shared/components/timelinePlayer/providers/timelineDataProvider.d.ts +13 -0
  105. package/dist/shared/components/timelinePlayer/providers/timelineLuminanceProvider.d.ts +16 -0
  106. package/dist/shared/types/components.d.ts +512 -0
  107. package/dist/shared/types/customDataTableFilters.d.ts +10 -0
  108. package/dist/shared/types/imagePlayer.d.ts +41 -0
  109. package/dist/shared/types/index.d.ts +7 -0
  110. package/dist/shared/types/observations.d.ts +25 -0
  111. package/dist/shared/types/rbac.d.ts +67 -0
  112. package/dist/shared/types/timeline.d.ts +10 -0
  113. package/package.json +52 -0
@@ -0,0 +1,143 @@
1
+ import { BoundingBox, CameraExid, DateType, GateReportVehicleType, TimelinePrecision } from "@evercam/api/types";
2
+ export type AnprQueryParams = {
3
+ page?: number;
4
+ limit?: number;
5
+ direction?: {
6
+ eq?: string;
7
+ } | string;
8
+ plateNumber?: {
9
+ eq?: string;
10
+ } | string;
11
+ sort?: string;
12
+ fromDate?: DateType;
13
+ toDate?: DateType;
14
+ camerasExid?: CameraExid[];
15
+ vehicleTypes?: GateReportVehicleType[];
16
+ isDuplicate?: boolean;
17
+ isPostprocessed?: boolean;
18
+ isPlate?: boolean;
19
+ };
20
+ export type AnprCountsQueryParams = {
21
+ precision: TimelinePrecision;
22
+ fromDate?: string;
23
+ toDate?: string;
24
+ isPublic?: boolean;
25
+ cameras?: CameraExid[];
26
+ direction?: AnprDirection;
27
+ isPlate?: boolean;
28
+ isDuplicate?: boolean;
29
+ vehicleTypes?: GateReportVehicleType[];
30
+ camerasExid?: CameraExid[];
31
+ };
32
+ export declare enum AnprDirection {
33
+ Left = "reverse",
34
+ Arrived = "forward",
35
+ Unknown = "unknown"
36
+ }
37
+ export type AnprEvent = {
38
+ id: number;
39
+ plateNumber: string;
40
+ cameraExid: CameraExid;
41
+ cameraex: CameraExid;
42
+ picName: string;
43
+ eventTime: string;
44
+ insertedAt: string;
45
+ isDuplicate: boolean;
46
+ direction: AnprDirection;
47
+ updatedAt: string;
48
+ edited?: boolean;
49
+ isPlate: boolean;
50
+ isPostprocessed: boolean;
51
+ vehicleType?: GateReportVehicleType;
52
+ contextVehicleType?: GateReportVehicleType;
53
+ anprVehicleType?: string;
54
+ anprVehicleModel?: string;
55
+ anprVehicleMake?: string;
56
+ anprVehicleColor?: string;
57
+ anprVehicleSpeed?: number;
58
+ anprSnapshotLink: string;
59
+ contextSnapshotLink: string;
60
+ mainSnapshotLink: string;
61
+ contextCamera: string;
62
+ votedVehicleType: GateReportVehicleType | string;
63
+ roiId?: number;
64
+ captureTime: DateType;
65
+ contextThumbnailUrl: string;
66
+ isPublic: boolean;
67
+ label: string;
68
+ mp4Url: string;
69
+ plateThumbnailUrl: string;
70
+ thumbnailUrl: string;
71
+ metadata: {
72
+ evercamMetadata?: {
73
+ anpr?: {
74
+ bbox: BoundingBox;
75
+ label: string;
76
+ score: number;
77
+ };
78
+ context?: {
79
+ bbox: BoundingBox;
80
+ label: string;
81
+ score: number;
82
+ };
83
+ };
84
+ plateRecognizerMetadata?: {
85
+ plateNumber?: string;
86
+ vehicleMake?: string;
87
+ vehicleType?: string;
88
+ vehicleColor?: string;
89
+ vehicleModel?: string;
90
+ vehicleOrientation?: string;
91
+ };
92
+ };
93
+ };
94
+ export type AnprCount = {
95
+ date: string;
96
+ counts: Record<AnprDirection, number>;
97
+ };
98
+ export declare enum AnprEventStatus {
99
+ IsPlate = "is_plate",
100
+ NotPlate = "not_plate",
101
+ IsDuplicate = "is_duplicate",
102
+ NotDuplicate = "not_duplicate"
103
+ }
104
+ export type AnprBulkUpdateRequestPayload = {
105
+ anprEventsIds: number[];
106
+ action: AnprEventStatus;
107
+ };
108
+ export type AnprUpdateRequestPayload = {
109
+ plateNumber: string;
110
+ vehicleType: GateReportVehicleType;
111
+ direction: AnprDirection;
112
+ };
113
+ export declare enum AnprExtractionStatus {
114
+ Pending = "pending",
115
+ Running = "running",
116
+ Completed = "completed",
117
+ Failed = "failed"
118
+ }
119
+ export declare enum AnprExtractionSaveMode {
120
+ All = "all",
121
+ AiDbOnly = "ai_db_only",
122
+ ImagesOnly = "images_only"
123
+ }
124
+ export type AnprExtraction = {
125
+ id: number;
126
+ cameraId: number;
127
+ userId: number | null;
128
+ startDate: string;
129
+ endDate: string;
130
+ status: AnprExtractionStatus;
131
+ totalRecords: number;
132
+ error: string | null;
133
+ saveMode: AnprExtractionSaveMode;
134
+ startedAt: string | null;
135
+ completedAt: string | null;
136
+ insertedAt: string;
137
+ updatedAt: string;
138
+ };
139
+ export type AnprExtractionCreatePayload = {
140
+ startDate: string;
141
+ endDate: string;
142
+ saveMode?: AnprExtractionSaveMode;
143
+ };
@@ -0,0 +1,116 @@
1
+ import { CameraStatus, DateType, PaginationParams } from "@evercam/api/types";
2
+ export declare enum AuditLogActionType {
3
+ VH_STATUS = "vh_status",
4
+ CR_UPDATED = "cr_updated",
5
+ CR_CREATED = "cr_created",
6
+ ONLINE = "online",
7
+ OFFLINE = "offline",
8
+ ON_HOLD = "on_hold",
9
+ WAITING = "waiting",
10
+ DECOMMISSIONED = "decommissioned",
11
+ UNDER_MAINTENANCE = "under_maintenance",
12
+ WAITING_FOR_SITE_VISIT = "waiting_for_site_visit",
13
+ SMS = "sms",
14
+ CUSTOM = "custom",
15
+ SIM = "sim",
16
+ LOGIN = "login",
17
+ LOGOUT = "logout",
18
+ CREATE = "create",
19
+ UPDATE = "update",
20
+ DELETE = "delete",
21
+ DEVICE_SETTINGS = "device_settings",
22
+ LINK_SIM_WITH_ROUTER = "link_sim_with_router",
23
+ UNLINK_SIM_FROM_ROUTER = "unlink_sim_from_router",
24
+ LINK_CAMERA_WITH_ROUTER = "link_camera_with_router",
25
+ UNLINK_CAMERA_FROM_ROUTER = "unlink_camera_from_router",
26
+ SHARE = "share",
27
+ UPDATE_SHARE = "update_share",
28
+ DELETE_SHARE = "delete_share",
29
+ SHARE_REQUEST = "share_request",
30
+ DELETE_SHARE_REQUEST = "delete_share_request",
31
+ TRANSFER_OWNERSHIP = "transfer_ownership",
32
+ BIM_NOTE = "bim_note",
33
+ GATE_REPORT_NOTE = "gate_report_note"
34
+ }
35
+ export declare enum AuditLogEntity {
36
+ Cameras = "cameras",
37
+ Projects = "projects",
38
+ Layers = "layers",
39
+ Routers = "routers",
40
+ Sims = "sims",
41
+ Hdds = "hdds",
42
+ Nvr = "nvr",
43
+ Archives = "archives",
44
+ Users = "users",
45
+ Rois = "rois",
46
+ Kits = "kits",
47
+ Roles = "roles",
48
+ Tags = "tags",
49
+ KitsTags = "kits_tags",
50
+ Oauth = "oauth",
51
+ StorageProviders = "storage_providers"
52
+ }
53
+ export type AuditLog = {
54
+ id: number;
55
+ action: AuditLogActionType;
56
+ details: Record<string, any>;
57
+ insertedAt: DateType;
58
+ entity: string;
59
+ user_details: {
60
+ browser: string;
61
+ country: string;
62
+ countryCode: string;
63
+ device: string | null;
64
+ ip: string;
65
+ os: string | null;
66
+ };
67
+ who: string;
68
+ };
69
+ export type AuditLogsParams = PaginationParams & {
70
+ routerId: number;
71
+ cameraId: number;
72
+ entity: string;
73
+ byRouter: boolean;
74
+ byCamera: boolean;
75
+ byProject: boolean;
76
+ action: string;
77
+ };
78
+ export type CameraLogsQueryParams = {
79
+ historyDays: number;
80
+ accountId?: string;
81
+ status: CameraStatus[];
82
+ };
83
+ export type CameraLogItem = {
84
+ start: DateType;
85
+ state: CameraStatus;
86
+ end: DateType;
87
+ };
88
+ export type CameraLog = {
89
+ data: CameraLogItem[];
90
+ measure: string;
91
+ };
92
+ export type CameraAuditLog = {
93
+ id: number;
94
+ action: AuditLogActionType;
95
+ details: {
96
+ error_body?: string;
97
+ exid: string;
98
+ id: number;
99
+ name: string;
100
+ reason?: string;
101
+ };
102
+ insertedAt: DateType;
103
+ entity: string;
104
+ user_details: {
105
+ ip: string;
106
+ country: string;
107
+ countryCode: string;
108
+ agent: string;
109
+ };
110
+ who: string;
111
+ };
112
+ export type CameraAuditLogsQueryParams = PaginationParams & {
113
+ from: string;
114
+ to: string;
115
+ action: AuditLogActionType[];
116
+ };
@@ -0,0 +1,132 @@
1
+ export declare enum RoleResourceType {
2
+ App = "app",
3
+ Camera = "camera",
4
+ Project = "project"
5
+ }
6
+ export declare enum RoleAssignmentLogAction {
7
+ Assign = "assign",
8
+ Unassign = "unassign"
9
+ }
10
+ export type RoleSubRole = {
11
+ resourceId: string;
12
+ roleId: number;
13
+ roleName?: string;
14
+ permissions?: string[];
15
+ };
16
+ export type Role = {
17
+ id: number;
18
+ name: string;
19
+ description?: string | null;
20
+ resource?: string;
21
+ resourceType: RoleResourceType;
22
+ resourceId?: string | null;
23
+ permissions: string[];
24
+ subRoles?: RoleSubRole[];
25
+ isDefault?: boolean;
26
+ };
27
+ export type ProjectResourceRole = Role & {
28
+ resourceType: RoleResourceType.Project;
29
+ };
30
+ export type CameraResourceRole = Omit<Role, "subRoles"> & {
31
+ resourceType: RoleResourceType.Camera;
32
+ };
33
+ export type ProjectRoleRequestPayload = {
34
+ name: string;
35
+ permissions: string[];
36
+ subRoles?: RoleSubRole[];
37
+ };
38
+ export type AuthzRoleUser = {
39
+ email: string;
40
+ resourceId: string;
41
+ };
42
+ export type AuthzUserRolesResponse = {
43
+ roles: Role[];
44
+ };
45
+ export type AuthzScopePermission = {
46
+ id: number;
47
+ action: string;
48
+ exid: string;
49
+ };
50
+ export type AuthzScope = {
51
+ id: number;
52
+ name: string;
53
+ description: string | null;
54
+ permissions: AuthzScopePermission[];
55
+ app: string;
56
+ exid: string;
57
+ };
58
+ export type AuthzScopeCreatePayload = {
59
+ name: string;
60
+ description?: string;
61
+ permissions: string[];
62
+ };
63
+ export type AuthzScopeUpdatePayload = Partial<AuthzScopeCreatePayload>;
64
+ export declare function isProjectRole(role: Role): role is ProjectResourceRole;
65
+ export declare function isCameraRole(role: Role): role is CameraResourceRole;
66
+ export type RoleAssignmentUserDetails = {
67
+ browser?: string | null;
68
+ device?: string | null;
69
+ os?: string | null;
70
+ country?: string | null;
71
+ countryCode?: string | null;
72
+ ip?: string | null;
73
+ impersonatedBy?: string | null;
74
+ };
75
+ export type RoleAssignmentRowUserDetails = RoleAssignmentUserDetails & {
76
+ via?: string | null;
77
+ inviteId?: number | null;
78
+ inviteEmail?: string | null;
79
+ };
80
+ export type RoleAssignmentLog = {
81
+ id: number;
82
+ action: RoleAssignmentLogAction;
83
+ assignerId: number | null;
84
+ assignerEmail: string | null;
85
+ assigneeId: number | null;
86
+ assigneeEmail: string;
87
+ roleId: number | null;
88
+ roleName: string | null;
89
+ previousRoleId: number | null;
90
+ previousRoleName: string | null;
91
+ scope: RoleResourceType;
92
+ projectExid: string | null;
93
+ cameraExid: string | null;
94
+ cameraName: string | null;
95
+ projectName: string | null;
96
+ ip: string | null;
97
+ userDetails: RoleAssignmentRowUserDetails | null;
98
+ insertedAt: string;
99
+ };
100
+ export type RoleAssignmentResourceRef = {
101
+ exid: string;
102
+ name: string | null;
103
+ };
104
+ export type RoleAssignmentLogBatch = {
105
+ groupId: string;
106
+ batchId: string | null;
107
+ batchSize: number;
108
+ assigneeId: number | null;
109
+ assigneeEmail: string;
110
+ actions: RoleAssignmentLogAction[];
111
+ projects: RoleAssignmentResourceRef[];
112
+ ip: string | null;
113
+ userDetails: RoleAssignmentUserDetails | null;
114
+ insertedAt: string;
115
+ children: RoleAssignmentLog[];
116
+ };
117
+ export type RoleAssignmentLogsParams = {
118
+ page?: number;
119
+ limit?: number;
120
+ sort?: string;
121
+ action?: RoleAssignmentLogAction;
122
+ roleId?: number;
123
+ roleName?: string;
124
+ assigneeEmail?: string;
125
+ assignerEmail?: string;
126
+ scope?: RoleResourceType;
127
+ projectExid?: string;
128
+ cameraExid?: string;
129
+ ip?: string;
130
+ from?: string;
131
+ to?: string;
132
+ };
@@ -0,0 +1,29 @@
1
+ export type AutodeskUserHub = {
2
+ text: string;
3
+ value: string;
4
+ };
5
+ export type AutodeskProject = {
6
+ text: string;
7
+ value: string;
8
+ };
9
+ export type AutodeskFolder = {
10
+ text: string;
11
+ value: string;
12
+ allowedFileType: string;
13
+ allowedFolderType: string;
14
+ children: Array<AutodeskFolder>;
15
+ parentName?: string;
16
+ };
17
+ export type AutodeskSnapshot = {
18
+ projectId: string;
19
+ folderId: string;
20
+ accFileType: string;
21
+ accFolderType: string;
22
+ projectExid: string;
23
+ snapshot: string;
24
+ };
25
+ export type AutodeskTokenResponsePayload = {
26
+ token: string;
27
+ expiresAt: string;
28
+ login: string;
29
+ };
@@ -0,0 +1,123 @@
1
+ import { AconexIdentifiers, CameraExid } from "@evercam/api/types";
2
+ export declare enum AutomationProvider {
3
+ Aconex = "aconex",
4
+ Procore = "procore",
5
+ Autodesk = "autodesk",
6
+ Email = "email"
7
+ }
8
+ export declare enum AutomationType {
9
+ Photo = "photo",
10
+ Compare = "compare",
11
+ GateReport = "gate_report",
12
+ Weather = "weather"
13
+ }
14
+ export declare enum AutomationWeatherReportType {
15
+ Forecast = "forecast",
16
+ History = "history"
17
+ }
18
+ export declare enum AutomationExportFormat {
19
+ Pdf = "pdf",
20
+ Csv = "csv"
21
+ }
22
+ export declare enum AutomationWeatherDataGranularity {
23
+ Daily = "daily",
24
+ Hourly = "hourly"
25
+ }
26
+ export type AutomationWeatherConfig = {
27
+ reportType: AutomationWeatherReportType;
28
+ exportFormat: AutomationExportFormat;
29
+ dataGranularity?: AutomationWeatherDataGranularity;
30
+ selectedColumns?: string[];
31
+ forecastDays?: number;
32
+ };
33
+ export type AutomationCompareConfig = {
34
+ compareDelay: number;
35
+ };
36
+ export type AutomationEmailRecipient = string | {
37
+ email: string;
38
+ };
39
+ export type AutomationGateReportConfig = {
40
+ projectExid: string;
41
+ vehicleTypes: string[];
42
+ fileType: string;
43
+ period: number;
44
+ columns: string[];
45
+ };
46
+ export type AutomationEmailProviderConfig = {
47
+ cameraExids?: CameraExid[];
48
+ recipients: string | AutomationEmailRecipient[];
49
+ };
50
+ export type AutomationProcoreProviderConfig = {
51
+ companyId: number;
52
+ companyName: string;
53
+ projectId: number;
54
+ projectName: string;
55
+ categoryId: number;
56
+ categoryName: string;
57
+ };
58
+ export type AutomationAconexProviderConfig = {
59
+ projectId: number;
60
+ projectName: string;
61
+ } & Partial<Record<AconexIdentifiers, string | number | boolean>>;
62
+ export type AutomationAutodeskProviderConfig = {
63
+ hubId: number;
64
+ hubName: string;
65
+ projectId: number;
66
+ projectName: string;
67
+ folderId: number;
68
+ accFileType: string;
69
+ accFolderType: string;
70
+ folderName: string;
71
+ };
72
+ export type AutomationProviderConfig = AutomationEmailProviderConfig | AutomationProcoreProviderConfig | AutomationAconexProviderConfig | AutomationAutodeskProviderConfig;
73
+ export type AutomationOptionsConfig = AutomationCompareConfig | AutomationGateReportConfig | AutomationWeatherConfig | {};
74
+ export type AutomationConfig = AutomationProviderConfig & AutomationOptionsConfig;
75
+ export type Automation = {
76
+ id?: number;
77
+ cameraExids: CameraExid[];
78
+ name: string;
79
+ subject?: string;
80
+ provider: AutomationProvider;
81
+ type: AutomationType;
82
+ config: AutomationConfig;
83
+ notifyDays: string[];
84
+ notifyTime: string;
85
+ timezone: string;
86
+ isPaused: boolean;
87
+ restrictedCameraExids?: string[];
88
+ };
89
+ export declare enum AutomationConfigStep {
90
+ Type = "type",
91
+ Cameras = "cameras",
92
+ Settings = "settings",
93
+ Destination = "destination"
94
+ }
95
+ export type AutomationProviderOption = {
96
+ labelTranslationKey: string;
97
+ descriptionTranslationKey: string;
98
+ value: AutomationProvider;
99
+ icon: string;
100
+ iconSize?: string;
101
+ requiresConnection: boolean;
102
+ };
103
+ export type AutomationTypeOption = {
104
+ labelTranslationKey: string;
105
+ descriptionTranslationKey: string;
106
+ label?: string;
107
+ description?: string;
108
+ value: AutomationType;
109
+ icon: string;
110
+ iconType?: string;
111
+ };
112
+ export type FormattedAutomation = {
113
+ cameraExids?: string;
114
+ name: string;
115
+ subject: string;
116
+ provider: AutomationProvider;
117
+ type: AutomationType;
118
+ config: Partial<AutomationProviderConfig> & Partial<AutomationOptionsConfig>;
119
+ notifyDays: string;
120
+ notifyTime: string;
121
+ timezone: string;
122
+ isPaused: boolean;
123
+ };
@@ -0,0 +1,71 @@
1
+ import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource, CancelTokenStatic } from "axios";
2
+ import { Swr } from "@evercam/api/api/client/swr/Swr";
3
+ export type AxiosEnvironment = {
4
+ baseUrl?: string | null;
5
+ stagingAiApiUrl?: string | null;
6
+ aiApiUrl?: string | null;
7
+ ingestDroneApi?: string | null;
8
+ ingest360Api?: string | null;
9
+ ingestGpuApiUrl?: string | null;
10
+ posthogApiUrl?: string | null;
11
+ posthogProjectId?: string | null;
12
+ firebaseVideowallUrl?: string | null;
13
+ weatherApiBaseUrl?: string | null;
14
+ evercamLabsUrl?: string | null;
15
+ isLabsStaging?: boolean;
16
+ workflowsApiUrl?: string | null;
17
+ firebaseDbLink?: string | null;
18
+ firebaseStorageUrl?: string | null;
19
+ firebaseStorageToken?: string | null;
20
+ forgeTokenServerUrl?: string | null;
21
+ snapshotsURL?: string | null;
22
+ app?: string | null;
23
+ getAuthToken?: () => string | null;
24
+ errorLogger?: (error: AxiosError) => void;
25
+ swrKey?: string;
26
+ };
27
+ export type RequestInterceptor = (req: AxiosRequestConfig, env: AxiosEnvironment) => AxiosRequestConfig & any;
28
+ export type ResponseInterceptor = (res: AxiosResponse, env: AxiosEnvironment) => AxiosResponse & any;
29
+ export type ErrorInterceptor = (error: any, env: AxiosEnvironment) => any;
30
+ export type RequestManager = {
31
+ createToken: (key: string) => CancelTokenSource["token"];
32
+ cancelToken: (key: string) => void;
33
+ cancelAll: () => void;
34
+ };
35
+ export interface ExtendedAxiosInstance extends AxiosInstance {
36
+ CancelToken: CancelTokenStatic;
37
+ isCancel: (value: AxiosResponse | AxiosError | unknown) => boolean;
38
+ setToken: (token: string) => void;
39
+ setHeader: (headerName: string, value: any) => void;
40
+ createRequestManager: () => RequestManager;
41
+ requestManager: RequestManager;
42
+ env: AxiosEnvironment;
43
+ addEnvironmentVariables: (vars: Record<string, any>) => void;
44
+ addRequestInterceptor: (interceptor: RequestInterceptor, errorInterceptor?: ErrorInterceptor) => void;
45
+ addResponseInterceptor: (interceptor: ResponseInterceptor, errorInterceptor?: ErrorInterceptor) => void;
46
+ addErrorInterceptor: (interceptor: ErrorInterceptor) => void;
47
+ swr: Swr;
48
+ }
49
+ export type ResponseValue<T> = T | undefined;
50
+ export type SwrResponse<T> = {
51
+ cachedValue: ResponseValue<T>;
52
+ freshPromise: Promise<ResponseValue<T>>;
53
+ };
54
+ export type SwrRequestConfig<T> = Omit<AxiosRequestConfig, "onSwrHit" | "onSwrRefresh"> & {
55
+ onSwrHit?: (data: T) => unknown;
56
+ onSwrRefresh?: (data: T) => unknown;
57
+ };
58
+ declare module "axios" {
59
+ interface AxiosRequestConfig {
60
+ raw?: boolean;
61
+ preserveCasing?: boolean;
62
+ timing?: boolean;
63
+ _metadata?: {
64
+ startTime: number;
65
+ };
66
+ swr?: boolean;
67
+ onSwrHit?: (data: any) => unknown;
68
+ onSwrRefresh?: (data: any) => unknown;
69
+ onSwrError?: (error: Error) => unknown;
70
+ }
71
+ }