@evercam/api 1.0.0-4656f3be4 → 1.0.0-47847a4fe

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 (62) hide show
  1. package/dist/api/api/3dFirebaseApi.d.ts +18 -3
  2. package/dist/api/api/adminApi.d.ts +82 -84
  3. package/dist/api/api/aiApi.d.ts +4 -4
  4. package/dist/api/api/evercamApi.d.ts +19 -27
  5. package/dist/api/api/evercamLabsApi.d.ts +5 -13
  6. package/dist/api/api/exNvrApi.d.ts +1 -1
  7. package/dist/api/api/index.d.ts +1 -0
  8. package/dist/api/api/ingestApi.d.ts +38 -30
  9. package/dist/api/api/reportsApi.d.ts +15 -0
  10. package/dist/api/types/360.d.ts +17 -9
  11. package/dist/api/types/admin.d.ts +37 -3
  12. package/dist/api/types/analytics.d.ts +49 -15
  13. package/dist/api/types/anpr.d.ts +5 -4
  14. package/dist/api/types/apiKey.d.ts +70 -0
  15. package/dist/api/types/auditLogs.d.ts +161 -21
  16. package/dist/api/types/automation.d.ts +9 -0
  17. package/dist/api/types/axios.d.ts +1 -0
  18. package/dist/api/types/bim.d.ts +27 -7
  19. package/dist/api/types/camera.d.ts +224 -96
  20. package/dist/api/types/comments.d.ts +63 -25
  21. package/dist/api/types/company.d.ts +11 -5
  22. package/dist/api/types/compare.d.ts +1 -1
  23. package/dist/api/types/detections.d.ts +3 -0
  24. package/dist/api/types/emailMessages.d.ts +27 -0
  25. package/dist/api/types/errors.d.ts +7 -2
  26. package/dist/api/types/gateReport.d.ts +2 -1
  27. package/dist/api/types/hdd.d.ts +1 -1
  28. package/dist/api/types/index.d.ts +3 -1
  29. package/dist/api/types/ingest.d.ts +105 -25
  30. package/dist/api/types/kit.d.ts +56 -68
  31. package/dist/api/types/media.d.ts +25 -3
  32. package/dist/api/types/notification.d.ts +12 -1
  33. package/dist/api/types/nvr.d.ts +39 -8
  34. package/dist/api/types/observationEvents.d.ts +26 -0
  35. package/dist/api/types/observations.d.ts +14 -9
  36. package/dist/api/types/posthog.d.ts +36 -0
  37. package/dist/api/types/progressPhoto.d.ts +38 -25
  38. package/dist/api/types/project.d.ts +61 -22
  39. package/dist/api/types/recycleBin.d.ts +8 -2
  40. package/dist/api/types/reports.d.ts +109 -0
  41. package/dist/api/types/router.d.ts +15 -10
  42. package/dist/api/types/shared.d.ts +29 -19
  43. package/dist/api/types/sim.d.ts +18 -6
  44. package/dist/api/types/siteView.d.ts +14 -8
  45. package/dist/api/types/snapshots.d.ts +52 -12
  46. package/dist/api/types/sso.d.ts +11 -37
  47. package/dist/api/types/storageProvider.d.ts +16 -5
  48. package/dist/api/types/user.d.ts +32 -29
  49. package/dist/api/types/widget.d.ts +13 -4
  50. package/dist/api/utils.d.ts +1 -0
  51. package/dist/index.js +840 -691
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.umd.cjs +1 -1
  54. package/dist/index.umd.cjs.map +1 -1
  55. package/dist/shared/types/components.d.ts +406 -23
  56. package/dist/shared/types/droneUpload.d.ts +93 -0
  57. package/dist/shared/types/index.d.ts +2 -0
  58. package/dist/shared/types/report.d.ts +107 -0
  59. package/dist/shared/utils/datePickerValue.d.ts +36 -0
  60. package/dist/shared/utils/datePresets.d.ts +31 -0
  61. package/package.json +1 -1
  62. package/dist/api/types/copilot.d.ts +0 -159
@@ -1,8 +1,12 @@
1
1
  import { CameraExid, DateType, PaginationParams, Schedule } from "@evercam/api/types";
2
- export type SnapshotExtractionQyeryParams = PaginationParams & {
2
+ export type SnapshotExtractionQueryParams = PaginationParams & {
3
3
  camera: string;
4
4
  cameraExid: CameraExid;
5
5
  status: SnapshotExtractionStatus;
6
+ requestor: string;
7
+ type: SnapshotExtractionType;
8
+ from: string;
9
+ to: string;
6
10
  };
7
11
  export declare enum SnapshotExtractionStatus {
8
12
  Cancelling = "canceling",
@@ -25,16 +29,48 @@ export type SnapshotExtraction = {
25
29
  fromDate: DateType;
26
30
  toDate: DateType;
27
31
  type: SnapshotExtractionType;
28
- notes: string;
32
+ notes: string | null;
29
33
  status: SnapshotExtractionStatus;
30
34
  interval: number;
31
- requestor: string;
32
- jpegsToDropbox: boolean;
33
- injectTo_cr: Boolean;
35
+ requestor: string | null;
36
+ jpegsToDropbox: boolean | null;
37
+ injectToCr: boolean | null;
38
+ schedule: Schedule;
39
+ createdAt: DateType;
40
+ jpegCount: number;
41
+ expectedCount: number;
42
+ uploadCounts: Record<string, number>;
43
+ obanJobId: number | null;
44
+ };
45
+ export type CreatedSnapshotExtraction = {
46
+ id: number;
47
+ cameraExid: CameraExid;
48
+ cameraName: string;
49
+ cameraTimezone: string;
50
+ fromDate: DateType;
51
+ toDate: DateType;
52
+ type: SnapshotExtractionType;
53
+ status: SnapshotExtractionStatus;
54
+ interval: number;
55
+ requestor: string | null;
34
56
  schedule: Schedule;
35
- created_at: DateType;
36
- jpegCount?: number;
37
- obanJobId?: number;
57
+ createdAt: DateType;
58
+ updatedAt: DateType;
59
+ jpegCount: number;
60
+ expectedCount: number;
61
+ uploadCounts: Record<string, number>;
62
+ };
63
+ export type SnapshotExtractionCreatePayload = {
64
+ camera: string;
65
+ fromDate: DateType;
66
+ toDate: DateType;
67
+ schedule: Schedule | string;
68
+ interval: number;
69
+ jpegsToDropbox: boolean;
70
+ injectToCr: boolean;
71
+ requestor: string;
72
+ type: SnapshotExtractionType;
73
+ ignoreCasingFromParams?: string[];
38
74
  };
39
75
  export type SnapshotTestPayload = {
40
76
  cameraExid?: CameraExid;
@@ -42,6 +78,7 @@ export type SnapshotTestPayload = {
42
78
  camPassword: string;
43
79
  externalUrl: string;
44
80
  jpgUrl: string;
81
+ model?: string | null;
45
82
  };
46
83
  export type SnapshotTestResponse = {
47
84
  status: string;
@@ -58,8 +95,6 @@ export type SnapshotEmailDeliveryResponsePayload = {
58
95
  export type DeleteSnapshotQueryParams = {
59
96
  fromDate: DateType;
60
97
  toDate: DateType;
61
- adminEmail: string;
62
- adminFullname: string;
63
98
  };
64
99
  export type SnapshotTransfer = {
65
100
  id: number;
@@ -82,6 +117,7 @@ export type SnapshotTransferCamera = {
82
117
  name: string;
83
118
  };
84
119
  export type SnapshotTransferRequestor = {
120
+ id: number;
85
121
  email: string;
86
122
  firstname: string;
87
123
  lastname: string;
@@ -99,6 +135,10 @@ export type TransferCloudRecordingsQueryParams = PaginationParams & {
99
135
  toDate: DateType;
100
136
  overwriteExisting?: boolean;
101
137
  deleteSource?: boolean;
102
- adminEmail?: string;
103
- adminFullname?: string;
138
+ };
139
+ export type SnapshotTransfersQueryParams = PaginationParams & {
140
+ sourceCamera?: string;
141
+ targetCamera?: string;
142
+ requestor?: string;
143
+ status?: string;
104
144
  };
@@ -1,3 +1,9 @@
1
+ export type SsoUserInfoMappings = {
2
+ id: string;
3
+ email: string;
4
+ firstname: string;
5
+ lastname: string;
6
+ };
1
7
  export type SsoProvider = {
2
8
  id: number;
3
9
  name: string;
@@ -15,41 +21,9 @@ export type SsoProvider = {
15
21
  tokenUri: string;
16
22
  tokenIntrospectionUri: string;
17
23
  userInfoUri: string;
18
- enabled: boolean;
19
- };
20
- export type SsoUpdatePayload = {
21
- name: string;
22
- exid: string;
23
- clientId: string;
24
- clientSecret: string;
25
- scope: string;
26
- responseType: string;
27
- loginUrl: string;
28
- iconUrl: string;
29
- options: {
30
- showOnLogin: boolean;
31
- showOnSignup: boolean;
32
- };
33
- tokenUri: string;
34
- tokenIntrospectionUri: string;
35
- userInfoUri: string;
36
- enabled: boolean;
37
- };
38
- export type SsoCreatePayload = {
39
- name: string;
40
- exid: string;
41
- clientId: string;
42
- clientSecret: string;
43
- scope: string;
44
- responseType: string;
45
- loginUrl: string;
46
- iconUrl: string;
47
- options: {
48
- showOnLogin: boolean;
49
- showOnSignup: boolean;
50
- };
51
- tokenUri: string;
52
- tokenIntrospectionUri: string;
53
- userInfoUri: string;
54
- enabled: boolean;
24
+ prompt: string;
25
+ userInfoMappings: SsoUserInfoMappings;
26
+ createdAt: string;
55
27
  };
28
+ export type SsoUpdatePayload = Omit<SsoProvider, "id" | "createdAt">;
29
+ export type SsoCreatePayload = Omit<SsoProvider, "id" | "createdAt">;
@@ -1,17 +1,28 @@
1
1
  import type { DateType } from "@evercam/api/types";
2
+ import type { CameraExid } from "@evercam/api/types/camera";
3
+ export type StorageProviderS3Config = {
4
+ bucket?: string;
5
+ accessKeyId?: string;
6
+ secretAccessKey?: string;
7
+ region?: string;
8
+ vendor?: string;
9
+ };
10
+ export type StorageProviderSeaweedfsConfig = {
11
+ jwtSigningKey?: string;
12
+ jwtReadSigningKey?: string;
13
+ };
14
+ export type StorageProviderConfig = StorageProviderS3Config & StorageProviderSeaweedfsConfig;
2
15
  export type StorageProvider = {
3
16
  id?: number;
4
- cameraId: number;
17
+ cameraId: number | CameraExid;
5
18
  type: string;
6
19
  provider: string;
7
20
  url: string;
8
21
  startDate: DateType;
9
22
  endDate: DateType;
10
- config: Record<string, any>;
23
+ config: StorageProviderConfig;
11
24
  insertedAt?: DateType;
12
- };
13
- export type StorageProvidersResponsePayload = {
14
- providers: StorageProvider[];
25
+ updatedAt?: DateType;
15
26
  };
16
27
  export declare enum ProjectStorageProvider {
17
28
  Seaweedfs = "seaweedfs",
@@ -1,4 +1,4 @@
1
- import type { CameraExid, PaginationParams } from "@evercam/api/types";
1
+ import type { CameraExid, JsonValue, PaginationParams } from "@evercam/api/types";
2
2
  import { Role, RoleSubRole } from "@evercam/api/types/authz";
3
3
  export type User = {
4
4
  id?: number;
@@ -28,10 +28,8 @@ export type AdminUser = {
28
28
  email: string;
29
29
  telephone: string;
30
30
  country: string;
31
- isAdmin: boolean;
32
31
  companyId: string;
33
32
  companyName: string;
34
- companyExid: string;
35
33
  features: Array<UserFeatureFlag>;
36
34
  active: boolean;
37
35
  cameraShares: number;
@@ -95,11 +93,15 @@ export type RemotePasswordUpdateRequestPayload = {
95
93
  currentPassword: string;
96
94
  newPassword: string;
97
95
  };
96
+ export declare enum AuthOptionType {
97
+ Password = "password",
98
+ Sso = "sso"
99
+ }
98
100
  export type AuthPasswordOption = {
99
- type: "password";
101
+ type: AuthOptionType.Password;
100
102
  };
101
103
  export type AuthSsoOption = {
102
- type: "sso";
104
+ type: AuthOptionType.Sso;
103
105
  name: string;
104
106
  scope: string;
105
107
  prompt: string | null;
@@ -167,8 +169,8 @@ export type AuthorizedAppsListRequestPayload = {
167
169
  page?: number;
168
170
  };
169
171
  export type SessionActivityCamSettingsDetail = {
170
- new: any;
171
- old: any;
172
+ new: Record<string, JsonValue>;
173
+ old: Record<string, JsonValue>;
172
174
  };
173
175
  export type SessionActivityDetail = {
174
176
  agent: string;
@@ -222,6 +224,19 @@ export type ProjectContact = {
222
224
  export type ProjectContactsResponsePayload = {
223
225
  data: ProjectContact[];
224
226
  };
227
+ export type EmailCcRule = {
228
+ csmEmail: string;
229
+ cc: string[];
230
+ };
231
+ export type EmailToRule = {
232
+ projectExid: string;
233
+ to: string[];
234
+ };
235
+ export type EmailingSettings = {
236
+ ccByCsm?: EmailCcRule[];
237
+ defaultCc?: string[];
238
+ toByProject?: EmailToRule[];
239
+ };
225
240
  export type UserStatsResponse = {
226
241
  data: {
227
242
  userStats: AdminUser;
@@ -230,10 +245,12 @@ export type UserStatsResponse = {
230
245
  export type UserCamera = {
231
246
  id: number;
232
247
  exid: string;
248
+ name: string;
233
249
  ownerFullname: string;
234
250
  ownerEmail: string;
235
251
  apiId: string;
236
252
  apiKey: string;
253
+ projectId: string;
237
254
  };
238
255
  export type UserCameraResponse = {
239
256
  data: UserCamera[];
@@ -264,30 +281,14 @@ export type Admin = {
264
281
  email: string;
265
282
  createdAt: string;
266
283
  updatedAt: string;
267
- lastSignInAt: string;
284
+ lastLoginAt: string;
268
285
  signInCount: number;
269
286
  lastSignInIp: string;
270
287
  apiId: string;
271
288
  apiKey: string;
289
+ roles?: string[];
272
290
  };
273
291
  export type ImpersonateUserResponse = {
274
- id: string;
275
- firstname: string;
276
- lastname: string;
277
- telephone: string;
278
- email: string;
279
- isAdmin: boolean;
280
- persona: Persona;
281
- country: string;
282
- companyId: number;
283
- companyExid: string;
284
- companyName: string;
285
- evercamAccount: boolean;
286
- createdAt: string;
287
- updatedAt: string;
288
- confirmedAt: string;
289
- lastLoginAt: string;
290
- features: UserFeatureFlag[];
291
292
  token: string;
292
293
  };
293
294
  export type AdminUserQueryParams = PaginationParams & {
@@ -296,13 +297,13 @@ export type AdminUserQueryParams = PaginationParams & {
296
297
  telephone: string;
297
298
  persona: Persona;
298
299
  companyName: string;
300
+ countryName: string;
301
+ countryId: number;
302
+ sessionCount: string;
299
303
  camerasCount: string;
300
304
  projectsCount: string;
301
305
  snapmailCount: string;
302
306
  camerasOwned: string;
303
- cameraShares: string;
304
- createdAtDate: string;
305
- lastLoginAtDate: string;
306
307
  integrations: "procore" | "aconex" | "autodesk";
307
308
  features: UserFeatureFlag.ProjectSharing | UserFeatureFlag.VideoWalls;
308
309
  };
@@ -348,10 +349,12 @@ export type ProjectUserWithRole = {
348
349
  id: number;
349
350
  name: string;
350
351
  exid: string;
351
- };
352
+ } | null;
352
353
  persona: Persona;
353
354
  permissions: string[];
354
355
  role: Role;
355
356
  subRoles: RoleSubRole[];
357
+ lastSeenAt: string | null;
358
+ telephone: string | null;
356
359
  };
357
360
  export {};
@@ -1,4 +1,4 @@
1
- import { CameraExid, PaginationParams } from "@evercam/api/types";
1
+ import { CameraExid, CameraStatus, PaginationParams } from "@evercam/api/types";
2
2
  import type { JsonObject } from "@evercam/api/types";
3
3
  import { VideoWallPresetGridConfig } from "@evercam/api/types/videoWall";
4
4
  export declare enum DelayUnit {
@@ -126,7 +126,6 @@ export type WidgetsListRequestPayload = PaginationParams & {
126
126
  projectId: number;
127
127
  cameraId: number;
128
128
  active: boolean;
129
- settings: WidgetSettings;
130
129
  widgetType: WidgetType;
131
130
  domainRestricted: boolean;
132
131
  allowedOrigin: string;
@@ -195,6 +194,7 @@ export type AdminWidgetResourceCamera = {
195
194
  id: number;
196
195
  exid: string;
197
196
  name: string;
197
+ status: CameraStatus;
198
198
  };
199
199
  export type AdminWidgetResourceProject = {
200
200
  id: number;
@@ -221,6 +221,7 @@ export type AdminWidgetUser = {
221
221
  };
222
222
  export type AdminWidget = {
223
223
  id: number;
224
+ name: string;
224
225
  active: boolean;
225
226
  public: boolean;
226
227
  user: AdminWidgetUser;
@@ -238,11 +239,19 @@ export type AdminWidget = {
238
239
  export type AdminWidgetFull = AdminWidget & {
239
240
  widgetKey: string;
240
241
  widgetId: string;
242
+ sessionSettings: JsonObject | null;
241
243
  };
242
244
  export type WidgetPayload = {
243
245
  ressources: {
244
- cameraId?: number;
245
- projectId?: number;
246
+ camera?: string | {
247
+ exid: string;
248
+ };
249
+ project?: string | {
250
+ exid: string;
251
+ };
252
+ preset?: string | {
253
+ exid: string;
254
+ };
246
255
  };
247
256
  widgetType: WidgetType;
248
257
  active: boolean;
@@ -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;