@adaptware/eagles-db 0.4.3 → 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-5be67eb696fd42d1991f2c34498399bfcdc4bffd797ccfe1e55a96b2bcad43d4",
2
+ "name": "prisma-client-94553ce9e384021d95cc00ceea7272654b17cfb4ed4079ec81e1f600517860b2",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -1068,7 +1068,9 @@ model OngoingEvaluation {
1068
1068
  candidate_id String
1069
1069
  resume_id String
1070
1070
  job_description_id String
1071
- 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?
1072
1074
  interview_id String? @unique
1073
1075
  assignment_id String? @unique
1074
1076
  assessment_id String? @unique
@@ -1104,13 +1106,14 @@ model OngoingEvaluation {
1104
1106
  candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1105
1107
  resume Resume? @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1106
1108
  organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1107
- 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)
1108
1110
  interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1109
1111
  assignment Assignment?
1110
1112
  assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
1111
1113
 
1112
1114
  @@unique([application_id, evaluation_plan_id])
1113
1115
  @@index([application_id])
1116
+ @@index([application_id, is_committed])
1114
1117
  @@index([evaluation_plan_id])
1115
1118
  }
1116
1119
 
package/client/wasm.js CHANGED
@@ -679,6 +679,7 @@ 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',
682
683
  interview_id: 'interview_id',
683
684
  assignment_id: 'assignment_id',
684
685
  assessment_id: 'assessment_id',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.4.3",
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,33 +19,36 @@ model JobDescription {
19
19
  summary Json?
20
20
  ai_insight Json?
21
21
  job_fit_comparison Json?
22
- /// Per-job thresholds for AI round recommendation (interview vs work-sample routing).
23
- recommendation_config Json?
22
+ target_closing_date DateTime?
23
+ closing_date DateTime?
24
+
25
+ jobNumber Int
26
+ jobCode String? @unique
24
27
  // Audit fields
25
- created_at DateTime @default(now())
26
- updated_at DateTime @updatedAt
27
- created_by String
28
- updated_by String
29
- is_active Boolean @default(true)
30
- openings Int @default(1)
31
- job_profile_id String?
32
- job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
33
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
34
- applications Application[]
35
- interviews Interview[]
36
- assignments Assignment[]
37
- fit_check FitCheck[] // one-to-many link
38
- job_description_data JobDescriptionData[] // one-to-many link
39
- evaluationPlan EvaluationPlan[] // relation to evaluation methods
40
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
41
- assignment_library AssignmentLibrary[]
42
- approvals Approval[] // one-to-many relation
43
- resumes Resume[] // one-to-many link
44
- budget Budget?
45
- hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
46
- recruiters User[]
47
- transcripts Transcript[]
48
- 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[]
49
52
 
50
53
  @@index([organisation_id])
51
54
  @@index([hiring_manager_id])
@@ -33,6 +33,7 @@ model OngoingEvaluation {
33
33
  round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
34
34
  comments String? @default("")
35
35
  completed_at DateTime?
36
+ is_committed Boolean?
36
37
  /// Evaluation Plan Fields Filled After Round Started
37
38
  title String?
38
39
  description String?
@@ -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;