@adaptware/eagles-db 0.1.46 → 0.1.48

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-95e41a9407bdb0a6491bc324c19e7a0da21afab1ecf10c8bd9872d3ff8bdc1e3",
2
+ "name": "prisma-client-35cfee62f9f7fb85248f4ed4829c363129c53a10b3c5045176b6f02cf505b735",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -189,6 +189,8 @@ model Assessment {
189
189
  reviewer User? @relation("ReviewerAssessments", fields: [reviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
190
190
  questions AssessmentQuestion[] @relation("AssessmentToAssessmentQuestion")
191
191
  candidateResponse CandidateQuestionResponse[]
192
+ Panelist Panelist? @relation(fields: [panelistId], references: [id])
193
+ panelistId String?
192
194
  User User? @relation(fields: [userId], references: [id])
193
195
  userId String?
194
196
 
@@ -440,26 +442,22 @@ model EvaluationPlan {
440
442
  // Relations
441
443
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
442
444
  questions Question[] // One evaluation plan → many questions
445
+ panelists Panelist[]
446
+ interviews Interview[]
443
447
  applications Application[]
448
+ // New optional one-to-one relation with AssessmentLibrary
444
449
  assessment AssessmentLibrary? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
445
450
  assignment_library AssignmentLibrary? @relation(fields: [assignment_library_id], references: [id], onDelete: SetNull)
446
451
  ongoing_evaluations OngoingEvaluation[]
447
- interviews Interview[]
448
452
 
449
453
  @@unique([job_description_id, order_no])
450
454
  @@index([job_description_id])
451
455
  }
452
456
 
453
- enum FeedbackType {
454
- SECTION
455
- OVERALL
456
- }
457
-
458
457
  model Feedback {
459
- id String @id @default(uuid())
460
- interview_id String
461
- feedback_type FeedbackType
462
- order_no Int?
458
+ id String @id @default(uuid())
459
+ interview_id String
460
+ order_no Int
463
461
 
464
462
  ai_feedback Json?
465
463
  human_feedback Json?
@@ -551,6 +549,118 @@ model Google {
551
549
  is_active Boolean @default(true)
552
550
  }
553
551
 
552
+ enum IntegrationProvider {
553
+ NAUKRI
554
+ ZOHO_RECRUIT
555
+ }
556
+
557
+ enum IntegrationAuthType {
558
+ OAUTH2
559
+ API_KEY
560
+ }
561
+
562
+ enum SyncDirection {
563
+ PUSH
564
+ PULL
565
+ BIDIRECTIONAL
566
+ }
567
+
568
+ enum SyncEntityType {
569
+ CANDIDATE
570
+ JOB_OPENING
571
+ INTERVIEW
572
+ APPLICATION
573
+ }
574
+
575
+ enum SyncStatus {
576
+ SYNCED
577
+ PENDING
578
+ FAILED
579
+ }
580
+
581
+ model IntegrationCredential {
582
+ id String @id @default(uuid())
583
+ organisation_id String?
584
+ provider IntegrationProvider
585
+ auth_type IntegrationAuthType
586
+ access_token String?
587
+ refresh_token String?
588
+ token_expires_at DateTime?
589
+ api_key String?
590
+ api_secret String?
591
+ metadata Json @default("{}")
592
+ is_active Boolean @default(true)
593
+
594
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
595
+
596
+ created_at DateTime @default(now())
597
+ updated_at DateTime @updatedAt
598
+ created_by String
599
+ updated_by String
600
+
601
+ @@unique([organisation_id, provider])
602
+ @@index([provider])
603
+ }
604
+
605
+ model IntegrationJobSync {
606
+ id String @id @default(uuid())
607
+ job_description_id String
608
+ provider IntegrationProvider
609
+ external_id String?
610
+ sync_enabled Boolean @default(true)
611
+ last_synced_at DateTime?
612
+ sync_direction SyncDirection @default(PUSH)
613
+ metadata Json @default("{}")
614
+
615
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
616
+
617
+ created_at DateTime @default(now())
618
+ updated_at DateTime @updatedAt
619
+
620
+ @@unique([job_description_id, provider])
621
+ @@index([provider])
622
+ }
623
+
624
+ model ZohoSyncMapping {
625
+ id String @id @default(uuid())
626
+ organisation_id String
627
+ entity_type SyncEntityType
628
+ treadspace_id String
629
+ zoho_module String
630
+ zoho_record_id String
631
+ last_synced_at DateTime @default(now())
632
+ sync_status SyncStatus @default(PENDING)
633
+ error_message String?
634
+
635
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
636
+
637
+ created_at DateTime @default(now())
638
+ updated_at DateTime @updatedAt
639
+
640
+ @@unique([organisation_id, entity_type, treadspace_id])
641
+ @@index([zoho_record_id])
642
+ @@index([sync_status])
643
+ }
644
+
645
+ model IntermediateFeedback {
646
+ id String @id @default(uuid())
647
+ interview_id String
648
+ overall_feedback_id String?
649
+ intermediate_feedback Json
650
+ order_no Int @default(autoincrement())
651
+ created_at DateTime @default(now())
652
+ updated_at DateTime @updatedAt
653
+ created_by String
654
+ updated_by String
655
+ is_active Boolean @default(true)
656
+ // Relations
657
+ interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
658
+ OverallFeedback OverallFeedback? @relation(fields: [overall_feedback_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
659
+ transcripts Transcript[]
660
+
661
+ @@index([interview_id])
662
+ }
663
+
554
664
  enum InterviewStatus {
555
665
  INTERVIEW_REQUESTED
556
666
  SCHEDULED
@@ -561,45 +671,54 @@ enum InterviewStatus {
561
671
  EVALUATED // Feedback completed and locked
562
672
  }
563
673
 
674
+ enum InterviewFeedback {
675
+ STRONG_HIRE
676
+ HIRE
677
+ NO_HIRE
678
+ STRONG_NO_HIRE
679
+ }
680
+
564
681
  model Interview {
565
- id String @id @default(uuid())
566
- /// Foreign keys
567
- candidate_id String
568
- interviewer_id String?
569
- application_id String?
570
- evaluation_plan_id String?
571
- resume_id String
572
- job_description_id String
573
- organisation_id String
574
- /// Data
575
- room_name String?
576
- interview_summary String[]
577
- scheduled_start_time DateTime?
578
- scheduled_end_time DateTime?
579
- actual_start_time DateTime?
580
- actual_end_time DateTime?
581
- recording_url String?
582
- interview_status InterviewStatus @default(SCHEDULED)
583
- google_event_id String?
584
- /// Audit fields
585
- created_at DateTime @default(now())
586
- updated_at DateTime @updatedAt
587
- created_by String
588
- updated_by String
589
- is_active Boolean @default(true)
682
+ id String @id @default(uuid())
683
+ candidate_id String
684
+ interviewer_id String?
685
+ evaluation_plan_id String
686
+ application_id String?
687
+ resume_id String
688
+ job_description_id String
689
+ organisation_id String
690
+ room_name String?
691
+ interview_summary String[]
692
+ ai_interview_feedback InterviewFeedback?
693
+ interview_feedback InterviewFeedback?
694
+ interview_rating Float? // Overall rating out of 100 based on evaluation
695
+ scheduled_start_time DateTime?
696
+ scheduled_end_time DateTime?
697
+ actual_start_time DateTime?
698
+ actual_end_time DateTime?
699
+ recording_url String?
700
+ interview_status InterviewStatus @default(SCHEDULED)
701
+ google_event_id String?
702
+ created_at DateTime @default(now())
703
+ updated_at DateTime @updatedAt
704
+ created_by String
705
+ updated_by String
706
+ is_active Boolean @default(true)
590
707
  // Relations
591
- candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
592
- interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
593
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
594
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
595
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
596
- application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
597
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
598
- ongoing_evaluation OngoingEvaluation?
599
- transcripts Transcript[]
600
- suggestions Suggestion[]
601
- feedback Feedback[]
602
- interviewNotes InterviewNotes[]
708
+ candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
709
+ interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
710
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
711
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
712
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
713
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
714
+ application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
715
+ ongoing_evaluation OngoingEvaluation?
716
+ intermediateFeedbacks IntermediateFeedback[]
717
+ transcripts Transcript[]
718
+ suggestions Suggestion[]
719
+ overallFeedback OverallFeedback[]
720
+ feedback Feedback[]
721
+ interviewNotes InterviewNotes[]
603
722
 
604
723
  @@unique([interviewer_id, candidate_id, evaluation_plan_id])
605
724
  @@index([candidate_id])
@@ -607,6 +726,38 @@ model Interview {
607
726
  @@index([job_description_id])
608
727
  }
609
728
 
729
+ /// Defines the category or purpose of the interview, suitable for any job role.
730
+ enum InterviewCategory {
731
+ SCREENING // Initial screening interview
732
+ TECHNICAL // Skill or role-specific interview
733
+ BEHAVIORAL // Behavioral or situational round
734
+ CASE_STUDY // Case-based or analytical round
735
+ MANAGERIAL // Leadership or management-focused
736
+ CULTURAL_FIT // Checks alignment with company culture
737
+ FINAL_DISCUSSION // Final HR or offer discussion
738
+ GENERAL // Generic or flexible-purpose interview
739
+ }
740
+
741
+ /// Represents a reusable interview template applicable to any job type.
742
+ model InterviewLibrary {
743
+ id String @id @default(uuid())
744
+ title String
745
+ description String
746
+ organisation_id String
747
+ category InterviewCategory
748
+ evaluation_type EvaluationType
749
+ duration Float
750
+ passing_marks Float
751
+ is_active Boolean @default(true)
752
+ created_by String
753
+ updated_by String
754
+ created_at DateTime @default(now())
755
+ updated_at DateTime @updatedAt
756
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
757
+
758
+ @@index([organisation_id])
759
+ }
760
+
610
761
  model InterviewNotes {
611
762
  id String @id @default(uuid())
612
763
  interview_id String
@@ -666,6 +817,7 @@ model JobDescription {
666
817
  hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
667
818
  recruiters User[]
668
819
  transcripts Transcript[]
820
+ integration_job_syncs IntegrationJobSync[]
669
821
 
670
822
  @@index([organisation_id])
671
823
  @@index([hiring_manager_id])
@@ -794,30 +946,94 @@ model Organisation {
794
946
  address String
795
947
  company_values Json[]
796
948
 
797
- created_at DateTime @default(now())
798
- updated_at DateTime @updatedAt
799
- created_by String
800
- updated_by String
801
- is_active Boolean @default(true)
802
- alias String? @unique
803
- logo String?
804
- applications Application[]
805
- interviewers User[]
806
- user_roles UserRole[]
807
- job_descriptions JobDescription[]
808
- assessment_library AssessmentLibrary[]
809
- assignment_library AssignmentLibrary[]
810
- interviews Interview[]
811
- fit_check FitCheck[] // one-to-many link
812
- resumes Resume[] // one-to-many link
813
- approvals Approval[] // one-to-many link
814
- suggestions Suggestion[]
815
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
816
- actions Action[]
949
+ interviewers User[]
950
+ created_at DateTime @default(now())
951
+ updated_at DateTime @updatedAt
952
+ created_by String
953
+ updated_by String
954
+ is_active Boolean @default(true)
955
+ alias String? @unique
956
+ logo String?
957
+ applications Application[]
958
+ user_roles UserRole[]
959
+ job_descriptions JobDescription[]
960
+ assessment_library AssessmentLibrary[]
961
+ assignment_library AssignmentLibrary[]
962
+ interview_library InterviewLibrary[]
963
+ interviews Interview[]
964
+ fit_check FitCheck[] // one-to-many link
965
+ resumes Resume[] // one-to-many link
966
+ panelists Panelist[] // one-to-many link
967
+ approvals Approval[] // one-to-many link
968
+ suggestions Suggestion[]
969
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
970
+ actions Action[]
971
+ integration_credentials IntegrationCredential[]
972
+ zoho_sync_mappings ZohoSyncMapping[]
817
973
 
818
974
  @@index([name])
819
975
  }
820
976
 
977
+ enum FeedbackType {
978
+ HUMAN
979
+ AI
980
+ }
981
+
982
+ enum OverallRecommendation {
983
+ StrongHire
984
+ Hire
985
+ LeaningHire
986
+ NoHire
987
+ StrongNoHire
988
+ }
989
+
990
+ model OverallFeedback {
991
+ id String @id @default(uuid())
992
+ interview_id String
993
+ interviewer_id String? // 👈 optional field
994
+ feedback_type FeedbackType
995
+ overall_score Float
996
+ overall_recommendation OverallRecommendation
997
+ overall_feedback Json
998
+ created_at DateTime @default(now())
999
+ updated_at DateTime @updatedAt
1000
+ created_by String
1001
+ updated_by String
1002
+ is_active Boolean @default(true)
1003
+ // Relations
1004
+ interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1005
+ interviewer Panelist? @relation(fields: [interviewer_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1006
+ intermediateFeedbacks IntermediateFeedback[] // 👈 one-to-many relation added here
1007
+
1008
+ @@unique([interview_id, interviewer_id]) // 👈 updated uniqueness logic
1009
+ @@index([interview_id])
1010
+ }
1011
+
1012
+ model Panelist {
1013
+ id String @id @default(uuid())
1014
+ name String
1015
+ designation String
1016
+ experience String // e.g. "10+", keeping as String for flexibility
1017
+ expertise String // e.g. "Product Strategy, Figma..."
1018
+ suited_interview String // e.g. "Consulting, Customer understanding..."
1019
+ industry String // e.g. "Healthcare, Fintech"
1020
+ special_areas String? // Optional field
1021
+ organisation_id String
1022
+ user_id String @unique
1023
+
1024
+ user User @relation(fields: [user_id], references: [id])
1025
+ organisation Organisation @relation(fields: [organisation_id], references: [id])
1026
+ evaluationPlans EvaluationPlan[]
1027
+ overallFeedbacks OverallFeedback[]
1028
+ created_at DateTime @default(now())
1029
+ updated_at DateTime @updatedAt
1030
+ created_by String
1031
+ updated_by String
1032
+ is_active Boolean @default(true)
1033
+
1034
+ assessments Assessment[]
1035
+ }
1036
+
821
1037
  model Permission {
822
1038
  id String @id @default(uuid())
823
1039
  permissions String[] @default([])
@@ -992,7 +1208,7 @@ model Suggestion {
992
1208
  }
993
1209
 
994
1210
  model Transcript {
995
- id String @id @default(uuid())
1211
+ id String @id @default(uuid())
996
1212
  interview_id String?
997
1213
  suggestion_id String?
998
1214
  intermediate_feedback_id String?
@@ -1001,16 +1217,17 @@ model Transcript {
1001
1217
  candidate_timestamp DateTime?
1002
1218
  interviewer String
1003
1219
  candidate String
1004
- order_no Int @default(autoincrement())
1005
- created_at DateTime @default(now())
1006
- updated_at DateTime @updatedAt
1220
+ order_no Int @default(autoincrement())
1221
+ created_at DateTime @default(now())
1222
+ updated_at DateTime @updatedAt
1007
1223
  created_by String
1008
1224
  updated_by String
1009
- is_active Boolean @default(true)
1225
+ is_active Boolean @default(true)
1010
1226
  // Relations
1011
- interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
1012
- suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
1013
- job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1227
+ interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
1228
+ suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
1229
+ intermediate_feedback IntermediateFeedback? @relation(fields: [intermediate_feedback_id], references: [id], onDelete: SetNull)
1230
+ job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1014
1231
 
1015
1232
  @@unique([interview_id, order_no])
1016
1233
  @@index([interview_id])
@@ -1048,6 +1265,7 @@ model User {
1048
1265
  job_description JobDescription[]
1049
1266
  hiring_manager_job_descriptions JobDescription[] @relation("HiringManager")
1050
1267
  approvals Approval[]
1268
+ panelist Panelist?
1051
1269
  sent_messages Message[] @relation("Sent Messages")
1052
1270
  received_messages Message[] @relation("Received Messages")
1053
1271
  profile_created Boolean