@adaptware/eagles-db 0.5.59 → 0.5.62

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.59",
3
+ "version": "0.5.62",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,39 +6,54 @@ enum FitCheckStatus {
6
6
  @@schema("public")
7
7
  }
8
8
 
9
+ /// 5-level current evaluation. LEVEL_1 is weakest, LEVEL_5 is strongest.
10
+ /// Display copy and numeric rank live in backend `CurrentEvaluationMapper`.
11
+ enum CurrentEvaluation {
12
+ LEVEL_1
13
+ LEVEL_2
14
+ LEVEL_3
15
+ LEVEL_4
16
+ LEVEL_5
17
+
18
+ @@schema("public")
19
+ }
20
+
9
21
  model FitCheck {
10
22
  /// Primary key (UUID)
11
- id String @id @default(uuid())
23
+ id String @id @default(uuid())
12
24
  /// FK to organisations table
13
- organisation_id String?
14
- candidate_id String?
15
- resume_id String
16
- job_description_id String
25
+ organisation_id String?
26
+ candidate_id String?
27
+ resume_id String
28
+ job_description_id String
17
29
  /// Owning application (inverted from Application.fit_check_id)
18
- application_id String? @unique
19
- skills_analysis Json?
20
- overall_analysis Json?
21
- overall_score Float
30
+ application_id String? @unique
31
+ skills_analysis Json?
32
+ overall_analysis Json?
33
+ overall_score Float
22
34
  /// Free-text from Overall Analysis agent; preferred over recommendation Json.
23
35
  overall_recommendation String?
24
36
  /// Why `overall_score` is this value. Distinct from `overall_recommendation`.
25
- score_reasoning String?
26
- short_match_analysis Json[]
27
- fit_comparison Json?
28
- recommendation Json?
29
- competencies_analysis Json?
37
+ score_reasoning String?
38
+ /// 5-level current evaluation (`CurrentEvaluation`). Independent of overall_score.
39
+ current_evaluation CurrentEvaluation?
40
+ short_match_analysis Json[]
41
+ fit_comparison Json?
42
+ recommendation Json?
43
+ competencies_analysis Json?
44
+ competencies_verdict Json?
30
45
  /// Audit fields
31
- created_by String
32
- updated_by String
33
- is_active Boolean @default(true)
34
- created_at DateTime @default(now())
35
- updated_at DateTime @updatedAt
46
+ created_by String
47
+ updated_by String
48
+ is_active Boolean @default(true)
49
+ created_at DateTime @default(now())
50
+ updated_at DateTime @updatedAt
36
51
  /// Relations
37
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
38
- candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
39
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
40
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
41
- application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
52
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
53
+ candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
54
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
55
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
56
+ application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
42
57
 
43
58
  /// Ensure one FitCheck per (resume_id, job_description_id) pair
44
59
  @@unique([resume_id, job_description_id])
@@ -83,6 +83,13 @@ model Interview {
83
83
  /// When final human feedback was submitted.
84
84
  evaluated_at DateTime?
85
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
+
86
93
  /// Self-scheduling
87
94
  reschedule_count Int @default(0)
88
95
  last_rescheduled_at DateTime?
@@ -0,0 +1,3 @@
1
+ -- 5-level current evaluation label (string, not enum) and numeric sort rank.
2
+ ALTER TABLE "FitCheck" ADD COLUMN IF NOT EXISTS "current_evaluation" TEXT;
3
+ ALTER TABLE "FitCheck" ADD COLUMN IF NOT EXISTS "current_evaluation_score" DOUBLE PRECISION;
@@ -0,0 +1,16 @@
1
+ -- Replace unused TEXT + score columns with a single CurrentEvaluation enum.
2
+ -- LEVEL_1 is weakest, LEVEL_5 is strongest (Postgres enum order; ORDER BY DESC = strongest first).
3
+
4
+ CREATE TYPE "public"."CurrentEvaluation" AS ENUM (
5
+ 'LEVEL_1',
6
+ 'LEVEL_2',
7
+ 'LEVEL_3',
8
+ 'LEVEL_4',
9
+ 'LEVEL_5'
10
+ );
11
+
12
+ ALTER TABLE "FitCheck" DROP COLUMN IF EXISTS "current_evaluation_score";
13
+
14
+ ALTER TABLE "FitCheck" DROP COLUMN IF EXISTS "current_evaluation";
15
+
16
+ ALTER TABLE "FitCheck" ADD COLUMN "current_evaluation" "public"."CurrentEvaluation";
@@ -0,0 +1,2 @@
1
+ -- Category-level competency verdict summaries from FitCheck Competency Verdict agent.
2
+ ALTER TABLE "FitCheck" ADD COLUMN IF NOT EXISTS "competencies_verdict" JSONB;