@adaptware/eagles-db 0.5.57 → 0.5.59

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.5.57",
3
+ "version": "0.5.59",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/prisma/.DS_Store CHANGED
Binary file
Binary file
@@ -52,6 +52,7 @@ model Interview {
52
52
  recording_url String?
53
53
  recording_document_id String? @unique
54
54
  evaluation_type EvaluationType? @default(TREADSPACE_AI_ASSISTED)
55
+ is_proctored Boolean @default(true) @map("is_proctored")
55
56
  ai_assistance_mode AiAssistanceMode? @default(ASSISTED)
56
57
  interview_status InterviewStatus @default(SCHEDULED)
57
58
  interview_platform InterviewPlatform @default(TREADSPACE)
@@ -97,6 +98,11 @@ model Interview {
97
98
  created_by String
98
99
  updated_by String
99
100
  is_active Boolean @default(true)
101
+
102
+
103
+ //interview proctoring
104
+ proctoringSession ProctoringSession?
105
+
100
106
  // Relations
101
107
  candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
102
108
  interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
@@ -0,0 +1,5 @@
1
+ -- AlterTable: Add is_proctored to Interview
2
+ ALTER TABLE "Interview" ADD COLUMN IF NOT EXISTS "is_proctored" BOOLEAN NOT NULL DEFAULT true;
3
+
4
+ -- AlterTable: Add is_proctored to proctoring_sessions
5
+ ALTER TABLE "proctoring_sessions" ADD COLUMN IF NOT EXISTS "is_proctored" BOOLEAN NOT NULL DEFAULT true;
@@ -0,0 +1,126 @@
1
+ enum RiskLevel {
2
+ LOW
3
+ MEDIUM
4
+ HIGH
5
+ CRITICAL
6
+
7
+ @@schema("public")
8
+ }
9
+
10
+ enum AnalysisStatus {
11
+ QUEUED
12
+ RUNNING
13
+ COMPLETED
14
+ FAILED
15
+
16
+ @@schema("public")
17
+ }
18
+
19
+ enum ProctoringEventType {
20
+ GAZE_DISRUPTION
21
+ OBJECT_DETECTED
22
+ FACE_MISSING
23
+ MULTIPLE_FACES
24
+ BROWSER_TAB_SWITCH
25
+ BROWSER_BLUR
26
+ FULLSCREEN_EXIT
27
+
28
+ @@schema("public")
29
+ }
30
+
31
+ enum ProctoringSessionStatus {
32
+ NOT_STARTED
33
+ CALIBRATING
34
+ CALIBRATED
35
+ PROCESSING
36
+ COMPLETED
37
+ FAILED
38
+
39
+ @@schema("public")
40
+ }
41
+
42
+ model ProctoringSession {
43
+ id String @id @default(uuid()) @map("id")
44
+ interviewId String @unique @map("interview_id")
45
+ interview Interview @relation(fields: [interviewId], references: [id], onDelete: Cascade)
46
+
47
+ candidateId String @map("candidate_id")
48
+ candidate User @relation(fields: [candidateId], references: [id], onDelete: Cascade)
49
+
50
+ // Proctoring Lifecycle & Media
51
+ isProctored Boolean @default(true) @map("is_proctored")
52
+ status ProctoringSessionStatus @default(NOT_STARTED) @map("status")
53
+ calibrationFeatures Json? @map("calibration_features")
54
+ fullVideoKey String? @map("full_video_key")
55
+ fullVideoUrl String? @map("full_video_url")
56
+ chunkCount Int @default(0) @map("chunk_count")
57
+ completedChunks Int @default(0) @map("completed_chunks")
58
+
59
+ // High-Level Aggregated Metrics for Downstream AI Evaluation
60
+ overallRisk RiskLevel @default(LOW) @map("overall_risk")
61
+ integrityScore Float @default(100.0) @map("integrity_score")
62
+
63
+ totalDurationSec Float @default(0.0) @map("total_duration_sec")
64
+ faceDetectedPct Float @default(100.0) @map("face_detected_pct")
65
+ onScreenGazePct Float @default(100.0) @map("on_screen_gaze_pct")
66
+
67
+ // Event Counters
68
+ totalGazeEvents Int @default(0) @map("total_gaze_events")
69
+ totalObjectEvents Int @default(0) @map("total_object_events")
70
+ totalFaceEvents Int @default(0) @map("total_face_events")
71
+ totalBrowserEvents Int @default(0) @map("total_browser_events")
72
+
73
+ createdAt DateTime @default(now()) @map("created_at")
74
+ updatedAt DateTime @updatedAt @map("updated_at")
75
+
76
+ analyses ProctoringAnalysis[]
77
+ events ProctoringEvent[]
78
+
79
+ @@index([candidateId])
80
+ @@map("proctoring_sessions")
81
+ @@schema("public")
82
+ }
83
+
84
+ model ProctoringAnalysis {
85
+ id String @id @default(uuid()) @map("id")
86
+ sessionId String @map("session_id")
87
+ session ProctoringSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
88
+
89
+ status AnalysisStatus @default(QUEUED)
90
+
91
+ chunkIndex Int @default(0) @map("chunk_index")
92
+ totalChunks Int @default(1) @map("total_chunks")
93
+ startTimeSec Float @default(0.0) @map("start_time_sec")
94
+ endTimeSec Float @default(0.0) @map("end_time_sec")
95
+
96
+ videoKey String? @map("video_key")
97
+ annotatedKey String? @map("annotated_key")
98
+
99
+ error String?
100
+ createdAt DateTime @default(now()) @map("created_at")
101
+ updatedAt DateTime @updatedAt @map("updated_at")
102
+
103
+ @@index([sessionId, chunkIndex])
104
+ @@map("proctoring_analyses")
105
+ @@schema("public")
106
+ }
107
+
108
+ model ProctoringEvent {
109
+ id String @id @default(uuid()) @map("id")
110
+ sessionId String @map("session_id")
111
+ session ProctoringSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
112
+
113
+ eventType ProctoringEventType @map("event_type")
114
+ timestampSec Float @map("timestamp_sec")
115
+ timestampStr String @map("timestamp_str")
116
+
117
+ risk RiskLevel @default(LOW)
118
+ metadata Json?
119
+
120
+ createdAt DateTime @default(now()) @map("created_at")
121
+
122
+ @@index([sessionId, timestampSec])
123
+ @@index([sessionId, eventType])
124
+ @@map("proctoring_events")
125
+ @@schema("public")
126
+ }
@@ -75,6 +75,9 @@ model User {
75
75
  notes Notes[]
76
76
  recruiter_applications Application[] @relation("ApplicationRecruiter")
77
77
 
78
+ // user proctoring
79
+ proctoringSessions ProctoringSession[]
80
+
78
81
  name String?
79
82
  phone String?
80
83
  /// Contact email for interviews, assessments, and resume export. Login stays on `email`.
@@ -1,2 +0,0 @@
1
- -- Migrate legacy terminal-positive status to SELECTED (SHORTLISTED enum value retained but unused).
2
- UPDATE applications SET status = 'SELECTED' WHERE status = 'SHORTLISTED';