@adaptware/eagles-db 0.1.48 → 0.1.49

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-35cfee62f9f7fb85248f4ed4829c363129c53a10b3c5045176b6f02cf505b735",
2
+ "name": "prisma-client-ac25e53c631512d142143ca345948068fd0d76aac704e94cec32263f9b75393a",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -189,8 +189,6 @@ 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?
194
192
  User User? @relation(fields: [userId], references: [id])
195
193
  userId String?
196
194
 
@@ -442,10 +440,7 @@ model EvaluationPlan {
442
440
  // Relations
443
441
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade)
444
442
  questions Question[] // One evaluation plan → many questions
445
- panelists Panelist[]
446
- interviews Interview[]
447
443
  applications Application[]
448
- // New optional one-to-one relation with AssessmentLibrary
449
444
  assessment AssessmentLibrary? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
450
445
  assignment_library AssignmentLibrary? @relation(fields: [assignment_library_id], references: [id], onDelete: SetNull)
451
446
  ongoing_evaluations OngoingEvaluation[]
@@ -454,10 +449,16 @@ model EvaluationPlan {
454
449
  @@index([job_description_id])
455
450
  }
456
451
 
452
+ enum FeedbackType {
453
+ SECTION
454
+ OVERALL
455
+ }
456
+
457
457
  model Feedback {
458
- id String @id @default(uuid())
459
- interview_id String
460
- order_no Int
458
+ id String @id @default(uuid())
459
+ interview_id String
460
+ feedback_type FeedbackType
461
+ order_no Int?
461
462
 
462
463
  ai_feedback Json?
463
464
  human_feedback Json?
@@ -549,118 +550,6 @@ model Google {
549
550
  is_active Boolean @default(true)
550
551
  }
551
552
 
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
-
664
553
  enum InterviewStatus {
665
554
  INTERVIEW_REQUESTED
666
555
  SCHEDULED
@@ -671,93 +560,47 @@ enum InterviewStatus {
671
560
  EVALUATED // Feedback completed and locked
672
561
  }
673
562
 
674
- enum InterviewFeedback {
675
- STRONG_HIRE
676
- HIRE
677
- NO_HIRE
678
- STRONG_NO_HIRE
679
- }
680
-
681
563
  model Interview {
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)
564
+ id String @id @default(uuid())
565
+ candidate_id String
566
+ interviewer_id String?
567
+ application_id String?
568
+ resume_id String
569
+ job_description_id String
570
+ organisation_id String
571
+ room_name String?
572
+ interview_summary String[]
573
+ scheduled_start_time DateTime?
574
+ scheduled_end_time DateTime?
575
+ actual_start_time DateTime?
576
+ actual_end_time DateTime?
577
+ recording_url String?
578
+ interview_status InterviewStatus @default(SCHEDULED)
579
+ google_event_id String?
580
+ /// Audit fields
581
+ created_at DateTime @default(now())
582
+ updated_at DateTime @updatedAt
583
+ created_by String
584
+ updated_by String
585
+ is_active Boolean @default(true)
707
586
  // Relations
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[]
722
-
723
- @@unique([interviewer_id, candidate_id, evaluation_plan_id])
587
+ candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
588
+ interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
589
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
590
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
591
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
592
+ application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
593
+ ongoing_evaluation OngoingEvaluation?
594
+ transcripts Transcript[]
595
+ suggestions Suggestion[]
596
+ feedback Feedback[]
597
+ interviewNotes InterviewNotes[]
598
+
724
599
  @@index([candidate_id])
725
600
  @@index([interviewer_id])
726
601
  @@index([job_description_id])
727
602
  }
728
603
 
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
-
761
604
  model InterviewNotes {
762
605
  id String @id @default(uuid())
763
606
  interview_id String
@@ -817,7 +660,6 @@ model JobDescription {
817
660
  hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
818
661
  recruiters User[]
819
662
  transcripts Transcript[]
820
- integration_job_syncs IntegrationJobSync[]
821
663
 
822
664
  @@index([organisation_id])
823
665
  @@index([hiring_manager_id])
@@ -946,94 +788,30 @@ model Organisation {
946
788
  address String
947
789
  company_values Json[]
948
790
 
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[]
791
+ created_at DateTime @default(now())
792
+ updated_at DateTime @updatedAt
793
+ created_by String
794
+ updated_by String
795
+ is_active Boolean @default(true)
796
+ alias String? @unique
797
+ logo String?
798
+ applications Application[]
799
+ interviewers User[]
800
+ user_roles UserRole[]
801
+ job_descriptions JobDescription[]
802
+ assessment_library AssessmentLibrary[]
803
+ assignment_library AssignmentLibrary[]
804
+ interviews Interview[]
805
+ fit_check FitCheck[] // one-to-many link
806
+ resumes Resume[] // one-to-many link
807
+ approvals Approval[] // one-to-many link
808
+ suggestions Suggestion[]
809
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
810
+ actions Action[]
973
811
 
974
812
  @@index([name])
975
813
  }
976
814
 
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
-
1037
815
  model Permission {
1038
816
  id String @id @default(uuid())
1039
817
  permissions String[] @default([])
@@ -1208,7 +986,7 @@ model Suggestion {
1208
986
  }
1209
987
 
1210
988
  model Transcript {
1211
- id String @id @default(uuid())
989
+ id String @id @default(uuid())
1212
990
  interview_id String?
1213
991
  suggestion_id String?
1214
992
  intermediate_feedback_id String?
@@ -1217,17 +995,16 @@ model Transcript {
1217
995
  candidate_timestamp DateTime?
1218
996
  interviewer String
1219
997
  candidate String
1220
- order_no Int @default(autoincrement())
1221
- created_at DateTime @default(now())
1222
- updated_at DateTime @updatedAt
998
+ order_no Int @default(autoincrement())
999
+ created_at DateTime @default(now())
1000
+ updated_at DateTime @updatedAt
1223
1001
  created_by String
1224
1002
  updated_by String
1225
- is_active Boolean @default(true)
1003
+ is_active Boolean @default(true)
1226
1004
  // Relations
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)
1005
+ interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
1006
+ suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
1007
+ job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1231
1008
 
1232
1009
  @@unique([interview_id, order_no])
1233
1010
  @@index([interview_id])
@@ -1265,7 +1042,6 @@ model User {
1265
1042
  job_description JobDescription[]
1266
1043
  hiring_manager_job_descriptions JobDescription[] @relation("HiringManager")
1267
1044
  approvals Approval[]
1268
- panelist Panelist?
1269
1045
  sent_messages Message[] @relation("Sent Messages")
1270
1046
  received_messages Message[] @relation("Received Messages")
1271
1047
  profile_created Boolean