@adaptware/eagles-db 0.5.60 → 0.5.63

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.60",
3
+ "version": "0.5.63",
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)
@@ -82,6 +83,13 @@ model Interview {
82
83
  /// When final human feedback was submitted.
83
84
  evaluated_at DateTime?
84
85
 
86
+ /// Candidate Acceptance & DPDP Consent
87
+ candidate_status String? @default("INVITED")
88
+ dpdp_consent_given Boolean @default(false)
89
+ dpdp_consent_given_at DateTime?
90
+ candidate_responded_at DateTime?
91
+ decline_reason String?
92
+
85
93
  /// Self-scheduling
86
94
  reschedule_count Int @default(0)
87
95
  last_rescheduled_at DateTime?
@@ -97,6 +105,11 @@ model Interview {
97
105
  created_by String
98
106
  updated_by String
99
107
  is_active Boolean @default(true)
108
+
109
+
110
+ //interview proctoring
111
+ proctoringSession ProctoringSession?
112
+
100
113
  // Relations
101
114
  candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
102
115
  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,125 @@
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
+ status ProctoringSessionStatus @default(NOT_STARTED) @map("status")
52
+ calibrationFeatures Json? @map("calibration_features")
53
+ fullVideoKey String? @map("full_video_key")
54
+ fullVideoUrl String? @map("full_video_url")
55
+ chunkCount Int @default(0) @map("chunk_count")
56
+ completedChunks Int @default(0) @map("completed_chunks")
57
+
58
+ // High-Level Aggregated Metrics for Downstream AI Evaluation
59
+ overallRisk RiskLevel @default(LOW) @map("overall_risk")
60
+ integrityScore Float @default(100.0) @map("integrity_score")
61
+
62
+ totalDurationSec Float @default(0.0) @map("total_duration_sec")
63
+ faceDetectedPct Float @default(100.0) @map("face_detected_pct")
64
+ onScreenGazePct Float @default(100.0) @map("on_screen_gaze_pct")
65
+
66
+ // Event Counters
67
+ totalGazeEvents Int @default(0) @map("total_gaze_events")
68
+ totalObjectEvents Int @default(0) @map("total_object_events")
69
+ totalFaceEvents Int @default(0) @map("total_face_events")
70
+ totalBrowserEvents Int @default(0) @map("total_browser_events")
71
+
72
+ createdAt DateTime @default(now()) @map("created_at")
73
+ updatedAt DateTime @updatedAt @map("updated_at")
74
+
75
+ analyses ProctoringAnalysis[]
76
+ events ProctoringEvent[]
77
+
78
+ @@index([candidateId])
79
+ @@map("proctoring_sessions")
80
+ @@schema("public")
81
+ }
82
+
83
+ model ProctoringAnalysis {
84
+ id String @id @default(uuid()) @map("id")
85
+ sessionId String @map("session_id")
86
+ session ProctoringSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
87
+
88
+ status AnalysisStatus @default(QUEUED)
89
+
90
+ chunkIndex Int @default(0) @map("chunk_index")
91
+ totalChunks Int @default(1) @map("total_chunks")
92
+ startTimeSec Float @default(0.0) @map("start_time_sec")
93
+ endTimeSec Float @default(0.0) @map("end_time_sec")
94
+
95
+ videoKey String? @map("video_key")
96
+ annotatedKey String? @map("annotated_key")
97
+
98
+ error String?
99
+ createdAt DateTime @default(now()) @map("created_at")
100
+ updatedAt DateTime @updatedAt @map("updated_at")
101
+
102
+ @@index([sessionId, chunkIndex])
103
+ @@map("proctoring_analyses")
104
+ @@schema("public")
105
+ }
106
+
107
+ model ProctoringEvent {
108
+ id String @id @default(uuid()) @map("id")
109
+ sessionId String @map("session_id")
110
+ session ProctoringSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
111
+
112
+ eventType ProctoringEventType @map("event_type")
113
+ timestampSec Float @map("timestamp_sec")
114
+ timestampStr String @map("timestamp_str")
115
+
116
+ risk RiskLevel @default(LOW)
117
+ metadata Json?
118
+
119
+ createdAt DateTime @default(now()) @map("created_at")
120
+
121
+ @@index([sessionId, timestampSec])
122
+ @@index([sessionId, eventType])
123
+ @@map("proctoring_events")
124
+ @@schema("public")
125
+ }
@@ -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';