@adaptware/eagles-db 0.5.63 → 0.5.65
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/client/edge.js +3 -7
- package/client/index-browser.js +0 -4
- package/client/index.d.ts +61 -1032
- package/client/index.js +3 -7
- package/client/package.json +1 -1
- package/client/schema.prisma +4 -14
- package/client/wasm.js +3 -7
- package/package.json +1 -1
- package/prisma/schema/migrations/20260918153000_add_is_proctored_fields/migration.sql +0 -3
- package/prisma/schema/migrations/20260925200000_proctoring_drop_stitch_cols_and_unique/migration.sql +37 -0
- package/prisma/schema/migrations/20260925210000_proctoring_drop_session_candidate_id/migration.sql +3 -0
- package/prisma/schema/proctoring.prisma +4 -11
- package/prisma/schema/user.prisma +0 -3
package/package.json
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
-- AlterTable: Add is_proctored to Interview
|
|
2
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;
|
package/prisma/schema/migrations/20260925200000_proctoring_drop_stitch_cols_and_unique/migration.sql
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
-- Dedup before unique (keep earliest row per session+index)
|
|
2
|
+
DELETE FROM "proctoring_analyses" a
|
|
3
|
+
USING "proctoring_analyses" b
|
|
4
|
+
WHERE a.session_id = b.session_id
|
|
5
|
+
AND a.chunk_index = b.chunk_index
|
|
6
|
+
AND a.created_at > b.created_at;
|
|
7
|
+
|
|
8
|
+
ALTER TABLE "proctoring_sessions"
|
|
9
|
+
DROP COLUMN IF EXISTS "full_video_key",
|
|
10
|
+
DROP COLUMN IF EXISTS "full_video_url";
|
|
11
|
+
|
|
12
|
+
ALTER TABLE "proctoring_analyses"
|
|
13
|
+
DROP COLUMN IF EXISTS "total_chunks";
|
|
14
|
+
|
|
15
|
+
DROP INDEX IF EXISTS "proctoring_analyses_session_id_chunk_index_idx";
|
|
16
|
+
|
|
17
|
+
ALTER TABLE "proctoring_analyses"
|
|
18
|
+
DROP CONSTRAINT IF EXISTS "proctoring_analyses_session_id_chunk_index_key";
|
|
19
|
+
|
|
20
|
+
ALTER TABLE "proctoring_analyses"
|
|
21
|
+
ADD CONSTRAINT "proctoring_analyses_session_id_chunk_index_key"
|
|
22
|
+
UNIQUE ("session_id", "chunk_index");
|
|
23
|
+
|
|
24
|
+
ALTER TABLE "proctoring_sessions"
|
|
25
|
+
ALTER COLUMN "face_detected_pct" DROP DEFAULT,
|
|
26
|
+
ALTER COLUMN "on_screen_gaze_pct" DROP DEFAULT;
|
|
27
|
+
|
|
28
|
+
ALTER TABLE "proctoring_sessions"
|
|
29
|
+
ALTER COLUMN "face_detected_pct" DROP NOT NULL,
|
|
30
|
+
ALTER COLUMN "on_screen_gaze_pct" DROP NOT NULL;
|
|
31
|
+
|
|
32
|
+
UPDATE "proctoring_sessions"
|
|
33
|
+
SET "face_detected_pct" = NULL, "on_screen_gaze_pct" = NULL
|
|
34
|
+
WHERE "total_duration_sec" <= 0;
|
|
35
|
+
|
|
36
|
+
ALTER TABLE "proctoring_sessions"
|
|
37
|
+
ALTER COLUMN "candidate_id" DROP NOT NULL;
|
|
@@ -44,14 +44,9 @@ model ProctoringSession {
|
|
|
44
44
|
interviewId String @unique @map("interview_id")
|
|
45
45
|
interview Interview @relation(fields: [interviewId], references: [id], onDelete: Cascade)
|
|
46
46
|
|
|
47
|
-
candidateId String @map("candidate_id")
|
|
48
|
-
candidate User @relation(fields: [candidateId], references: [id], onDelete: Cascade)
|
|
49
|
-
|
|
50
47
|
// Proctoring Lifecycle & Media
|
|
51
48
|
status ProctoringSessionStatus @default(NOT_STARTED) @map("status")
|
|
52
49
|
calibrationFeatures Json? @map("calibration_features")
|
|
53
|
-
fullVideoKey String? @map("full_video_key")
|
|
54
|
-
fullVideoUrl String? @map("full_video_url")
|
|
55
50
|
chunkCount Int @default(0) @map("chunk_count")
|
|
56
51
|
completedChunks Int @default(0) @map("completed_chunks")
|
|
57
52
|
|
|
@@ -59,9 +54,9 @@ model ProctoringSession {
|
|
|
59
54
|
overallRisk RiskLevel @default(LOW) @map("overall_risk")
|
|
60
55
|
integrityScore Float @default(100.0) @map("integrity_score")
|
|
61
56
|
|
|
62
|
-
totalDurationSec Float
|
|
63
|
-
faceDetectedPct Float @
|
|
64
|
-
onScreenGazePct Float @
|
|
57
|
+
totalDurationSec Float @default(0.0) @map("total_duration_sec")
|
|
58
|
+
faceDetectedPct Float? @map("face_detected_pct")
|
|
59
|
+
onScreenGazePct Float? @map("on_screen_gaze_pct")
|
|
65
60
|
|
|
66
61
|
// Event Counters
|
|
67
62
|
totalGazeEvents Int @default(0) @map("total_gaze_events")
|
|
@@ -75,7 +70,6 @@ model ProctoringSession {
|
|
|
75
70
|
analyses ProctoringAnalysis[]
|
|
76
71
|
events ProctoringEvent[]
|
|
77
72
|
|
|
78
|
-
@@index([candidateId])
|
|
79
73
|
@@map("proctoring_sessions")
|
|
80
74
|
@@schema("public")
|
|
81
75
|
}
|
|
@@ -88,7 +82,6 @@ model ProctoringAnalysis {
|
|
|
88
82
|
status AnalysisStatus @default(QUEUED)
|
|
89
83
|
|
|
90
84
|
chunkIndex Int @default(0) @map("chunk_index")
|
|
91
|
-
totalChunks Int @default(1) @map("total_chunks")
|
|
92
85
|
startTimeSec Float @default(0.0) @map("start_time_sec")
|
|
93
86
|
endTimeSec Float @default(0.0) @map("end_time_sec")
|
|
94
87
|
|
|
@@ -99,7 +92,7 @@ model ProctoringAnalysis {
|
|
|
99
92
|
createdAt DateTime @default(now()) @map("created_at")
|
|
100
93
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
101
94
|
|
|
102
|
-
@@
|
|
95
|
+
@@unique([sessionId, chunkIndex])
|
|
103
96
|
@@map("proctoring_analyses")
|
|
104
97
|
@@schema("public")
|
|
105
98
|
}
|
|
@@ -75,9 +75,6 @@ model User {
|
|
|
75
75
|
notes Notes[]
|
|
76
76
|
recruiter_applications Application[] @relation("ApplicationRecruiter")
|
|
77
77
|
|
|
78
|
-
// user proctoring
|
|
79
|
-
proctoringSessions ProctoringSession[]
|
|
80
|
-
|
|
81
78
|
name String?
|
|
82
79
|
phone String?
|
|
83
80
|
/// Contact email for interviews, assessments, and resume export. Login stays on `email`.
|