@adaptware/eagles-db 0.4.6 → 0.4.7

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-88599a8e10ec108bcddab41b6c3b233339fd8a3988504481b1fa53a8526a6f6e",
2
+ "name": "prisma-client-94553ce9e384021d95cc00ceea7272654b17cfb4ed4079ec81e1f600517860b2",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -882,6 +882,8 @@ model JobDescription {
882
882
  summary Json?
883
883
  ai_insight Json?
884
884
  job_fit_comparison Json?
885
+ /// Per-job thresholds for AI round recommendation (interview vs work-sample routing).
886
+ recommendation_config Json?
885
887
  // Audit fields
886
888
  created_at DateTime @default(now())
887
889
  updated_at DateTime @updatedAt
@@ -1066,7 +1068,9 @@ model OngoingEvaluation {
1066
1068
  candidate_id String
1067
1069
  resume_id String
1068
1070
  job_description_id String
1069
- evaluation_plan_id String
1071
+ evaluation_plan_id String?
1072
+ /// null = legacy row; false = pre-Proceed draft; true = committed pipeline round
1073
+ is_committed Boolean?
1070
1074
  interview_id String? @unique
1071
1075
  assignment_id String? @unique
1072
1076
  assessment_id String? @unique
@@ -1075,7 +1079,6 @@ model OngoingEvaluation {
1075
1079
  round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
1076
1080
  comments String? @default("")
1077
1081
  completed_at DateTime?
1078
- is_committed Boolean?
1079
1082
  /// Evaluation Plan Fields Filled After Round Started
1080
1083
  title String?
1081
1084
  description String?
@@ -1103,13 +1106,14 @@ model OngoingEvaluation {
1103
1106
  candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1104
1107
  resume Resume? @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1105
1108
  organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1106
- evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1109
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1107
1110
  interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1108
1111
  assignment Assignment?
1109
1112
  assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
1110
1113
 
1111
1114
  @@unique([application_id, evaluation_plan_id])
1112
1115
  @@index([application_id])
1116
+ @@index([application_id, is_committed])
1113
1117
  @@index([evaluation_plan_id])
1114
1118
  }
1115
1119
 
package/client/wasm.js CHANGED
@@ -585,6 +585,7 @@ exports.Prisma.JobDescriptionScalarFieldEnum = {
585
585
  summary: 'summary',
586
586
  ai_insight: 'ai_insight',
587
587
  job_fit_comparison: 'job_fit_comparison',
588
+ recommendation_config: 'recommendation_config',
588
589
  created_at: 'created_at',
589
590
  updated_at: 'updated_at',
590
591
  created_by: 'created_by',
@@ -678,6 +679,7 @@ exports.Prisma.OngoingEvaluationScalarFieldEnum = {
678
679
  resume_id: 'resume_id',
679
680
  job_description_id: 'job_description_id',
680
681
  evaluation_plan_id: 'evaluation_plan_id',
682
+ is_committed: 'is_committed',
681
683
  interview_id: 'interview_id',
682
684
  assignment_id: 'assignment_id',
683
685
  assessment_id: 'assessment_id',
@@ -685,7 +687,6 @@ exports.Prisma.OngoingEvaluationScalarFieldEnum = {
685
687
  round_status: 'round_status',
686
688
  comments: 'comments',
687
689
  completed_at: 'completed_at',
688
- is_committed: 'is_committed',
689
690
  title: 'title',
690
691
  description: 'description',
691
692
  order_no: 'order_no',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,6 +16,7 @@ model Application {
16
16
  applied_at DateTime @default(now())
17
17
  evaluation_plan_id String?
18
18
  fit_check_id String? @unique
19
+ recruiter_id String?
19
20
  round_no Int @default(0)
20
21
  //Screening fields
21
22
  on_notice_period Boolean @default(false)
@@ -33,6 +34,7 @@ model Application {
33
34
  resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
34
35
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
35
36
  fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
37
+ recruiter User? @relation("ApplicationRecruiter", fields: [recruiter_id], references: [id])
36
38
  interviews Interview[]
37
39
  assignments Assignment[]
38
40
  ongoing_evaluations OngoingEvaluation[]
@@ -5,6 +5,14 @@ enum RoundType {
5
5
  SCREENING
6
6
  }
7
7
 
8
+ enum EvaluationCategory {
9
+ EXPERIENCE_SCREENING
10
+ TECHNICAL_SCREENING
11
+ TECHNICAL_INTERVIEW
12
+ BUSINESS_ROUND
13
+ BEHAVIORAL_ROUND
14
+ }
15
+
8
16
  enum EvaluationRoundFormat {
9
17
  // ────────────────
10
18
  // Screening formats
@@ -74,6 +82,7 @@ model EvaluationPlan {
74
82
  duration Int?
75
83
  duration_unit DurationUnit?
76
84
  deadline Int?
85
+ category EvaluationCategory?
77
86
  created_by String
78
87
  updated_by String
79
88
  created_at DateTime @default(now())
@@ -19,31 +19,36 @@ model JobDescription {
19
19
  summary Json?
20
20
  ai_insight Json?
21
21
  job_fit_comparison Json?
22
+ target_closing_date DateTime?
23
+ closing_date DateTime?
24
+
25
+ jobNumber Int
26
+ jobCode String? @unique
22
27
  // Audit fields
23
- created_at DateTime @default(now())
24
- updated_at DateTime @updatedAt
25
- created_by String
26
- updated_by String
27
- is_active Boolean @default(true)
28
- openings Int @default(1)
29
- job_profile_id String?
30
- job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
31
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
32
- applications Application[]
33
- interviews Interview[]
34
- assignments Assignment[]
35
- fit_check FitCheck[] // one-to-many link
36
- job_description_data JobDescriptionData[] // one-to-many link
37
- evaluationPlan EvaluationPlan[] // relation to evaluation methods
38
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
39
- assignment_library AssignmentLibrary[]
40
- approvals Approval[] // one-to-many relation
41
- resumes Resume[] // one-to-many link
42
- budget Budget?
43
- hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
44
- recruiters User[]
45
- transcripts Transcript[]
46
- integration_job_syncs IntegrationJobSync[]
28
+ created_at DateTime @default(now())
29
+ updated_at DateTime @updatedAt
30
+ created_by String
31
+ updated_by String
32
+ is_active Boolean @default(true)
33
+ openings Int @default(1)
34
+ job_profile_id String?
35
+ job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
36
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
37
+ applications Application[]
38
+ interviews Interview[]
39
+ assignments Assignment[]
40
+ fit_check FitCheck[] // one-to-many link
41
+ job_description_data JobDescriptionData[] // one-to-many link
42
+ evaluationPlan EvaluationPlan[] // relation to evaluation methods
43
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
44
+ assignment_library AssignmentLibrary[]
45
+ approvals Approval[] // one-to-many relation
46
+ resumes Resume[] // one-to-many link
47
+ budget Budget?
48
+ hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
49
+ recruiters User[]
50
+ transcripts Transcript[]
51
+ integration_job_syncs IntegrationJobSync[]
47
52
 
48
53
  @@index([organisation_id])
49
54
  @@index([hiring_manager_id])
@@ -26,6 +26,8 @@ model Organisation {
26
26
  is_active Boolean @default(true)
27
27
  alias String? @unique
28
28
  logo String?
29
+ org_code String? @unique
30
+ jobSequenc Int @default(1)
29
31
  applications Application[]
30
32
  user_roles UserRole[]
31
33
  job_descriptions JobDescription[]
@@ -67,6 +67,7 @@ model User {
67
67
  refresh_token_auth RefreshToken[] @relation("TokenRefresh")
68
68
  zoom_meeting_participants ZoomMeetingParticipant[]
69
69
  notes Notes[]
70
+ recruiter_applications Application[] @relation("ApplicationRecruiter")
70
71
 
71
72
  name String?
72
73
  phone String?
package/prisma/.DS_Store DELETED
Binary file
@@ -1,2 +0,0 @@
1
- -- Full AI interview completion window (calendar days); nullable for non–Full AI rows.
2
- ALTER TABLE "Interview" ADD COLUMN IF NOT EXISTS "deadline" INTEGER;
@@ -1,30 +0,0 @@
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;