@trafficgroup/knex-rel 0.1.6 → 0.1.8

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