@adaptware/eagles-db 0.6.12 → 0.6.14

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.6.12",
3
+ "version": "0.6.14",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,8 +15,6 @@ model EvaluationCriteria {
15
15
  key String
16
16
  criteria String?
17
17
  description String?
18
- weightage Float?
19
- is_elimination Boolean @default(false)
20
18
  metadata Json?
21
19
  /// Audit fields
22
20
  created_by String
@@ -20,41 +20,46 @@ enum CurrentEvaluation {
20
20
 
21
21
  model FitCheck {
22
22
  /// Primary key (UUID)
23
- id String @id @default(uuid())
23
+ id String @id @default(uuid())
24
24
  /// FK to organisations table
25
- organisation_id String?
26
- candidate_id String?
27
- resume_id String
28
- job_description_id String
29
- /// Owning application (inverted from Application.fit_check_id)
30
- application_id String? @unique
31
- skills_analysis Json?
32
- overall_analysis Json?
33
- /// Optional; new FitChecks from Orion omit a numeric score.
34
- overall_score Float?
35
- /// Free-text from Overall Analysis agent; preferred over recommendation Json.
36
- overall_recommendation String?
37
- /// Why `overall_score` is this value. Distinct from `overall_recommendation`.
38
- score_reasoning String?
25
+ organisation_id String?
26
+ candidate_id String?
27
+ resume_id String
28
+ job_description_id String
29
+ application_id String? @unique
30
+ skills_analysis Json?
31
+ /// Unused by new writes; scheduled for removal.
32
+ overall_analysis Json?
33
+ overall_score Float?
34
+ score_reasoning String?
35
+ overall_recommendation String?
36
+ overall_recommendation_reasoning String?
37
+ overall_recommendation_metadata Json?
38
+ // V2 recommendation — experimental evaluation.
39
+ overall_recommendation_v2 String?
40
+ overall_recommendation_reasoning_v2 String?
41
+ current_evaluation_v2 CurrentEvaluation?
39
42
  /// 5-level current evaluation (`CurrentEvaluation`). Independent of overall_score.
40
- current_evaluation CurrentEvaluation?
41
- short_match_analysis Json[]
42
- fit_comparison Json?
43
- recommendation Json?
44
- competencies_analysis Json?
45
- competencies_verdict Json?
43
+ current_evaluation CurrentEvaluation?
44
+ short_match_analysis Json[]
45
+ /// Unused by new writes; scheduled for removal.
46
+ fit_comparison Json?
47
+ /// Unused by new writes; scheduled for removal.
48
+ recommendation Json?
49
+ competencies_analysis Json?
50
+ competencies_verdict Json?
46
51
  /// Audit fields
47
- created_by String
48
- updated_by String
49
- is_active Boolean @default(true)
50
- created_at DateTime @default(now())
51
- updated_at DateTime @updatedAt
52
+ created_by String
53
+ updated_by String
54
+ is_active Boolean @default(true)
55
+ created_at DateTime @default(now())
56
+ updated_at DateTime @updatedAt
52
57
  /// Relations
53
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
54
- candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
55
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
56
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
57
- application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
58
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
59
+ candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
60
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
61
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
62
+ application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
58
63
 
59
64
  /// Ensure one FitCheck per (resume_id, job_description_id) pair
60
65
  @@unique([resume_id, job_description_id])
@@ -0,0 +1,2 @@
1
+ -- Algorithm standing JSON for FitCheck recommendation persist / backfill.
2
+ ALTER TABLE "FitCheck" ADD COLUMN IF NOT EXISTS "overall_recommendation_metadata" JSONB;
@@ -0,0 +1,2 @@
1
+ -- New FitChecks persist scalars only; overall_analysis is unused by new writes.
2
+ ALTER TABLE "FitCheck" ALTER COLUMN "overall_analysis" DROP NOT NULL;
@@ -0,0 +1,3 @@
1
+ -- EvaluationCriteria: drop unused weightage and is_elimination columns.
2
+ ALTER TABLE "EvaluationCriteria" DROP COLUMN IF EXISTS "weightage";
3
+ ALTER TABLE "EvaluationCriteria" DROP COLUMN IF EXISTS "is_elimination";