@adaptware/eagles-db 0.5.75 → 0.6.1

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.75",
3
+ "version": "0.6.1",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
Binary file
@@ -0,0 +1,2 @@
1
+ -- Migrate legacy terminal-positive status to SELECTED (SHORTLISTED enum value retained but unused).
2
+ UPDATE applications SET status = 'SELECTED' WHERE status = 'SHORTLISTED';
Binary file
@@ -4,42 +4,44 @@ enum CompetencyCategory {
4
4
  AI
5
5
  /// FitCheck analysis only — not a dictionary / job-profile catalog category.
6
6
  EXPERIENCE_RELEVANCE
7
+ SOFT_SKILLS
8
+ CULTURE_FIT
7
9
 
8
10
  @@schema("public")
9
11
  }
10
12
 
11
13
  model CompetencyDictionary {
12
14
  /// Primary key
13
- id String @id @default(uuid())
15
+ id String @id @default(uuid())
14
16
  /// Foreign keys
15
- organisation_id String?
17
+ organisation_id String?
16
18
  /// Data fields
17
- category CompetencyCategory
19
+ category CompetencyCategory
18
20
  /// Optional department catalog value (DepartmentType in app code; not linked to Department model).
19
- department String?
21
+ department String?
20
22
  /// Optional free-text job role / job profile title (not a FK).
21
- jobRole String?
23
+ jobRole String?
22
24
  /// Optional free-text provenance / source label (not an enum).
23
25
  dictionary_source String?
24
26
  /// Industry catalog value (Industry enum in app code).
25
- industry String
26
- name String
27
- description String?
27
+ industry String
28
+ name String
29
+ description String?
28
30
  /// Proficiency ladder definitions (competency-specific text)
29
- level1 String?
30
- level2 String?
31
- level3 String?
32
- level4 String?
33
- level5 String?
34
- metadata Json?
31
+ level1 String?
32
+ level2 String?
33
+ level3 String?
34
+ level4 String?
35
+ level5 String?
36
+ metadata Json?
35
37
  /// Audit fields
36
- created_by String
37
- updated_by String
38
- created_at DateTime @default(now())
39
- updated_at DateTime @updatedAt
40
- is_active Boolean @default(true)
38
+ created_by String
39
+ updated_by String
40
+ created_at DateTime @default(now())
41
+ updated_at DateTime @updatedAt
42
+ is_active Boolean @default(true)
41
43
  /// Relations
42
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
44
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
43
45
 
44
46
  @@index([organisation_id])
45
47
  @@index([organisation_id, category])
@@ -30,7 +30,8 @@ model FitCheck {
30
30
  application_id String? @unique
31
31
  skills_analysis Json?
32
32
  overall_analysis Json?
33
- overall_score Float
33
+ /// Optional; new FitChecks from Orion omit a numeric score.
34
+ overall_score Float?
34
35
  /// Free-text from Overall Analysis agent; preferred over recommendation Json.
35
36
  overall_recommendation String?
36
37
  /// Why `overall_score` is this value. Distinct from `overall_recommendation`.
@@ -33,46 +33,47 @@ model JobDescription {
33
33
  closing_date DateTime?
34
34
  opened_at DateTime?
35
35
 
36
- job_number Int?
37
- job_code String? @unique
36
+ job_number Int?
37
+ job_code String? @unique
38
38
  // Audit fields
39
- created_at DateTime @default(now())
40
- updated_at DateTime @updatedAt
41
- created_by String
42
- updated_by String
43
- is_active Boolean @default(true)
44
- openings Int @default(1)
45
- job_profile_id String?
46
- job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
47
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
48
- department Department? @relation(fields: [department_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
49
- source_document Document? @relation("SourceDocument", fields: [source_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
50
- applications Application[]
51
- interviews Interview[]
52
- assignments Assignment[]
53
- fit_check FitCheck[] // one-to-many link
54
- job_description_data JobDescriptionData[] // one-to-many link
55
- evaluationPlan EvaluationPlan[] // relation to evaluation methods
56
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
57
- assignment_library AssignmentLibrary[]
58
- approvals Approval[] // one-to-many relation
59
- resumes Resume[] // one-to-many link
60
- budget Budget?
61
- hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
62
- recruiters User[]
63
- transcripts Transcript[]
64
- integration_job_syncs IntegrationJobSync[]
65
- job_application_template JobApplicationTemplate?
66
- offer_letter_templates OfferLetterTemplate[]
67
- offers Offer[]
68
- conversations Conversation[]
69
- communication_messages CommunicationMessage[]
39
+ created_at DateTime @default(now())
40
+ updated_at DateTime @updatedAt
41
+ created_by String
42
+ updated_by String
43
+ is_active Boolean @default(true)
44
+ openings Int @default(1)
45
+ restrict_candidate_upload_to_assigned_recruiters Boolean?
46
+ job_profile_id String?
47
+ job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
48
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
49
+ department Department? @relation(fields: [department_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
50
+ source_document Document? @relation("SourceDocument", fields: [source_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
51
+ applications Application[]
52
+ interviews Interview[]
53
+ assignments Assignment[]
54
+ fit_check FitCheck[] // one-to-many link
55
+ job_description_data JobDescriptionData[] // one-to-many link
56
+ evaluationPlan EvaluationPlan[] // relation to evaluation methods
57
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
58
+ assignment_library AssignmentLibrary[]
59
+ approvals Approval[] // one-to-many relation
60
+ resumes Resume[] // one-to-many link
61
+ budget Budget?
62
+ hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
63
+ recruiters User[]
64
+ transcripts Transcript[]
65
+ integration_job_syncs IntegrationJobSync[]
66
+ job_application_template JobApplicationTemplate?
67
+ offer_letter_templates OfferLetterTemplate[]
68
+ offers Offer[]
69
+ conversations Conversation[]
70
+ communication_messages CommunicationMessage[]
70
71
  /// Plan line this opening is committed against (requisition → plan).
71
- hiring_plan_line_id String?
72
- hiring_plan_line HiringPlanLine? @relation("PlanLineRequisitions", fields: [hiring_plan_line_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
72
+ hiring_plan_line_id String?
73
+ hiring_plan_line HiringPlanLine? @relation("PlanLineRequisitions", fields: [hiring_plan_line_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
73
74
  /// Plan lines that use this JD as the role template/reference.
74
- referenced_by_plan_lines HiringPlanLine[] @relation("PlanLineTemplateJd")
75
- linked_hiring_units PurchasedHiringUnit[]
75
+ referenced_by_plan_lines HiringPlanLine[] @relation("PlanLineTemplateJd")
76
+ linked_hiring_units PurchasedHiringUnit[]
76
77
 
77
78
  @@index([organisation_id])
78
79
  @@index([hiring_manager_id])
@@ -0,0 +1,2 @@
1
+ -- New FitChecks persist current_evaluation without a numeric overall_score.
2
+ ALTER TABLE "FitCheck" ALTER COLUMN "overall_score" DROP NOT NULL;
@@ -0,0 +1,3 @@
1
+ -- AlterEnum: add SOFT_SKILLS and CULTURE_FIT to CompetencyCategory (additive; do not recreate type)
2
+ ALTER TYPE "CompetencyCategory" ADD VALUE IF NOT EXISTS 'SOFT_SKILLS';
3
+ ALTER TYPE "CompetencyCategory" ADD VALUE IF NOT EXISTS 'CULTURE_FIT';