@trafficgroup/knex-rel 0.1.7 → 0.1.9

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 (51) hide show
  1. package/dist/dao/VideoMinuteResultDAO.d.ts +40 -0
  2. package/dist/dao/VideoMinuteResultDAO.js +149 -0
  3. package/dist/dao/VideoMinuteResultDAO.js.map +1 -1
  4. package/dist/dao/batch/batch.dao.d.ts +27 -0
  5. package/dist/dao/batch/batch.dao.js +135 -0
  6. package/dist/dao/batch/batch.dao.js.map +1 -0
  7. package/dist/dao/camera/camera.dao.d.ts +17 -7
  8. package/dist/dao/camera/camera.dao.js +33 -48
  9. package/dist/dao/camera/camera.dao.js.map +1 -1
  10. package/dist/dao/folder/folder.dao.js +2 -1
  11. package/dist/dao/folder/folder.dao.js.map +1 -1
  12. package/dist/dao/location/location.dao.d.ts +17 -0
  13. package/dist/dao/location/location.dao.js +123 -0
  14. package/dist/dao/location/location.dao.js.map +1 -0
  15. package/dist/dao/study/study.dao.d.ts +1 -1
  16. package/dist/dao/study/study.dao.js +10 -10
  17. package/dist/dao/study/study.dao.js.map +1 -1
  18. package/dist/dao/video/video.dao.d.ts +30 -0
  19. package/dist/dao/video/video.dao.js +113 -1
  20. package/dist/dao/video/video.dao.js.map +1 -1
  21. package/dist/index.d.ts +6 -1
  22. package/dist/index.js +5 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/interfaces/batch/batch.interfaces.d.ts +13 -0
  25. package/dist/interfaces/batch/batch.interfaces.js +3 -0
  26. package/dist/interfaces/batch/batch.interfaces.js.map +1 -0
  27. package/dist/interfaces/camera/camera.interfaces.d.ts +4 -2
  28. package/dist/interfaces/location/location.interfaces.d.ts +9 -0
  29. package/dist/interfaces/location/location.interfaces.js +3 -0
  30. package/dist/interfaces/location/location.interfaces.js.map +1 -0
  31. package/dist/interfaces/study/study.interfaces.d.ts +4 -3
  32. package/dist/interfaces/video/video.interfaces.d.ts +9 -0
  33. package/migrations/20251020225758_migration.ts +135 -0
  34. package/migrations/20251112120000_migration.ts +89 -0
  35. package/migrations/20251112120100_migration.ts +21 -0
  36. package/migrations/20251112120200_migration.ts +50 -0
  37. package/migrations/20251112120300_migration.ts +27 -0
  38. package/package.json +1 -1
  39. package/src/dao/VideoMinuteResultDAO.ts +237 -0
  40. package/src/dao/batch/batch.dao.ts +121 -0
  41. package/src/dao/camera/camera.dao.ts +44 -61
  42. package/src/dao/folder/folder.dao.ts +7 -1
  43. package/src/dao/location/location.dao.ts +123 -0
  44. package/src/dao/study/study.dao.ts +10 -10
  45. package/src/dao/video/video.dao.ts +135 -1
  46. package/src/index.ts +13 -1
  47. package/src/interfaces/batch/batch.interfaces.ts +14 -0
  48. package/src/interfaces/camera/camera.interfaces.ts +4 -2
  49. package/src/interfaces/location/location.interfaces.ts +9 -0
  50. package/src/interfaces/study/study.interfaces.ts +4 -3
  51. package/src/interfaces/video/video.interfaces.ts +13 -1
@@ -0,0 +1,9 @@
1
+ export interface ILocation {
2
+ id: number;
3
+ uuid: string;
4
+ name: string;
5
+ longitude: number;
6
+ latitude: number;
7
+ created_at: string;
8
+ updated_at: string;
9
+ }
@@ -1,5 +1,5 @@
1
1
  import type { IUser } from "../user/user.interfaces";
2
- import type { ICamera } from "../camera/camera.interfaces";
2
+ import type { ILocation } from "../location/location.interfaces";
3
3
 
4
4
  export interface IStudy {
5
5
  id: number;
@@ -8,10 +8,11 @@ export interface IStudy {
8
8
  description?: string;
9
9
  type: "TMC" | "ATR";
10
10
  createdBy: number;
11
- cameraId?: number;
11
+ locationId?: number;
12
+ isMultiCamera: boolean;
12
13
  status: "COMPLETE" | "IN PROGRESS" | "FAILED";
13
14
  created_at: string;
14
15
  updated_at: string;
15
16
  user?: IUser;
16
- camera?: ICamera;
17
+ location?: ILocation;
17
18
  }
@@ -1,10 +1,16 @@
1
1
  import type { IFolder } from "../folder/folder.interfaces";
2
2
 
3
+ export interface ITrimPeriod {
4
+ startTime: string;
5
+ endTime: string;
6
+ }
7
+
3
8
  export interface IVideo {
4
9
  id: number;
5
10
  uuid: string;
6
11
  folderId: number;
7
12
  annotationSourceId?: number;
13
+ cameraId?: number;
8
14
  name: string;
9
15
  videoLocation: string;
10
16
  videoOutputLocation: string | null;
@@ -16,7 +22,7 @@ export interface IVideo {
16
22
  progress: number;
17
23
  remainingTime: string;
18
24
  results: Record<string, any>;
19
- durationSeconds?: number; // Add optional duration field
25
+ durationSeconds?: number;
20
26
 
21
27
  // HLS streaming support
22
28
  isHlsEnabled: boolean;
@@ -26,6 +32,12 @@ export interface IVideo {
26
32
  // Enhanced metadata for hybrid streaming
27
33
  streamingMetadata: Record<string, any> | null;
28
34
 
35
+ // Recording start time and video trimming support
36
+ recordingStartedAt?: Date;
37
+ trimEnabled?: boolean;
38
+ trimPeriods?: ITrimPeriod[] | null;
39
+ batchId?: number | null;
40
+
29
41
  created_at: string;
30
42
  updated_at: string;
31
43
  folder?: IFolder;