@adaptware/eagles-db 0.4.1 → 0.4.3
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 +5 -6
- package/client/index-browser.js +0 -1
- package/client/index.d.ts +103 -200
- package/client/index.js +5 -6
- package/client/package.json +1 -1
- package/client/schema.prisma +2 -5
- package/client/wasm.js +0 -1
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/migrations/20260519120000_interview_deadline/migration.sql +2 -0
- package/prisma/schema/migrations/20260520120000_interview_duration_drop_deadline/migration.sql +30 -0
- package/prisma/schema/ongoingEvaluation.prisma +2 -5
- package/client/libquery_engine-darwin.dylib.node +0 -0
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -1068,9 +1068,7 @@ model OngoingEvaluation {
|
|
|
1068
1068
|
candidate_id String
|
|
1069
1069
|
resume_id String
|
|
1070
1070
|
job_description_id String
|
|
1071
|
-
evaluation_plan_id String
|
|
1072
|
-
/// null = legacy row; false = pre-Proceed draft; true = committed pipeline round
|
|
1073
|
-
is_committed Boolean?
|
|
1071
|
+
evaluation_plan_id String
|
|
1074
1072
|
interview_id String? @unique
|
|
1075
1073
|
assignment_id String? @unique
|
|
1076
1074
|
assessment_id String? @unique
|
|
@@ -1106,14 +1104,13 @@ model OngoingEvaluation {
|
|
|
1106
1104
|
candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1107
1105
|
resume Resume? @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1108
1106
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1109
|
-
evaluation_plan EvaluationPlan
|
|
1107
|
+
evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1110
1108
|
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
1111
1109
|
assignment Assignment?
|
|
1112
1110
|
assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
|
|
1113
1111
|
|
|
1114
1112
|
@@unique([application_id, evaluation_plan_id])
|
|
1115
1113
|
@@index([application_id])
|
|
1116
|
-
@@index([application_id, is_committed])
|
|
1117
1114
|
@@index([evaluation_plan_id])
|
|
1118
1115
|
}
|
|
1119
1116
|
|
package/client/wasm.js
CHANGED
|
@@ -679,7 +679,6 @@ exports.Prisma.OngoingEvaluationScalarFieldEnum = {
|
|
|
679
679
|
resume_id: 'resume_id',
|
|
680
680
|
job_description_id: 'job_description_id',
|
|
681
681
|
evaluation_plan_id: 'evaluation_plan_id',
|
|
682
|
-
is_committed: 'is_committed',
|
|
683
682
|
interview_id: 'interview_id',
|
|
684
683
|
assignment_id: 'assignment_id',
|
|
685
684
|
assessment_id: 'assessment_id',
|
package/package.json
CHANGED
package/prisma/.DS_Store
ADDED
|
Binary file
|
package/prisma/schema/migrations/20260520120000_interview_duration_drop_deadline/migration.sql
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
-- Interview.duration (minutes) replaces timestamp-derived length; Interview.deadline removed (window = scheduled_end_time).
|
|
2
|
+
ALTER TABLE "Interview" ADD COLUMN IF NOT EXISTS "duration" INTEGER;
|
|
3
|
+
|
|
4
|
+
ALTER TABLE "Interview" DROP COLUMN IF EXISTS "deadline";
|
|
5
|
+
|
|
6
|
+
-- Best-effort inline backfill (Full AI rows may be wrong until backfill-interview-duration.ts runs).
|
|
7
|
+
UPDATE "Interview" i
|
|
8
|
+
SET "duration" = GREATEST(
|
|
9
|
+
1,
|
|
10
|
+
ROUND(
|
|
11
|
+
EXTRACT(EPOCH FROM (i."scheduled_end_time" - i."scheduled_start_time")) / 60
|
|
12
|
+
)::integer
|
|
13
|
+
)
|
|
14
|
+
WHERE i."duration" IS NULL
|
|
15
|
+
AND i."scheduled_start_time" IS NOT NULL
|
|
16
|
+
AND i."scheduled_end_time" IS NOT NULL
|
|
17
|
+
AND i."scheduled_end_time" > i."scheduled_start_time"
|
|
18
|
+
AND (i."evaluation_type" IS NULL OR i."evaluation_type"::text <> 'TREADSPACE_FULL_AI');
|
|
19
|
+
|
|
20
|
+
UPDATE "Interview" i
|
|
21
|
+
SET "duration" = oe."duration"
|
|
22
|
+
FROM "OngoingEvaluation" oe
|
|
23
|
+
WHERE oe."interview_id" = i."id"
|
|
24
|
+
AND i."duration" IS NULL
|
|
25
|
+
AND oe."duration" IS NOT NULL
|
|
26
|
+
AND oe."duration_unit" = 'MINUTES';
|
|
27
|
+
|
|
28
|
+
UPDATE "Interview"
|
|
29
|
+
SET "duration" = 45
|
|
30
|
+
WHERE "duration" IS NULL;
|
|
@@ -24,9 +24,7 @@ model OngoingEvaluation {
|
|
|
24
24
|
candidate_id String
|
|
25
25
|
resume_id String
|
|
26
26
|
job_description_id String
|
|
27
|
-
evaluation_plan_id String
|
|
28
|
-
/// null = legacy row; false = pre-Proceed draft; true = committed pipeline round
|
|
29
|
-
is_committed Boolean?
|
|
27
|
+
evaluation_plan_id String
|
|
30
28
|
interview_id String? @unique
|
|
31
29
|
assignment_id String? @unique
|
|
32
30
|
assessment_id String? @unique
|
|
@@ -62,13 +60,12 @@ model OngoingEvaluation {
|
|
|
62
60
|
candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
63
61
|
resume Resume? @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
64
62
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
65
|
-
evaluation_plan EvaluationPlan
|
|
63
|
+
evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
66
64
|
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
67
65
|
assignment Assignment?
|
|
68
66
|
assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
|
|
69
67
|
|
|
70
68
|
@@unique([application_id, evaluation_plan_id])
|
|
71
69
|
@@index([application_id])
|
|
72
|
-
@@index([application_id, is_committed])
|
|
73
70
|
@@index([evaluation_plan_id])
|
|
74
71
|
}
|
|
Binary file
|