@adaptware/eagles-db 0.4.17 → 0.4.18

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.
Files changed (32) hide show
  1. package/README.md +5 -105
  2. package/client/edge.js +102 -5
  3. package/client/index-browser.js +97 -0
  4. package/client/index.d.ts +19359 -5843
  5. package/client/index.js +102 -5
  6. package/client/package.json +1 -1
  7. package/client/schema.prisma +239 -75
  8. package/client/wasm.js +97 -0
  9. package/package.json +1 -1
  10. package/prisma/.DS_Store +0 -0
  11. package/prisma/schema/applications.prisma +6 -4
  12. package/prisma/schema/assignment.prisma +6 -0
  13. package/prisma/schema/document.prisma +37 -0
  14. package/prisma/schema/interview.prisma +3 -0
  15. package/prisma/schema/jobApplicationFields.prisma +37 -0
  16. package/prisma/schema/jobApplicationResponse.prisma +33 -0
  17. package/prisma/schema/jobApplicationTemplate.prisma +30 -0
  18. package/prisma/schema/jobDescription.prisma +15 -11
  19. package/prisma/schema/migrations/20260519120000_interview_deadline/migration.sql +2 -0
  20. package/prisma/schema/migrations/20260520120000_interview_duration_drop_deadline/migration.sql +30 -0
  21. package/prisma/schema/migrations/20260602120000_resume_file_hash_drop_unique/migration.sql +2 -0
  22. package/prisma/schema/migrations/20260603120000_job_application_field_is_mandatory/migration.sql +2 -0
  23. package/prisma/schema/migrations/20260604120000_job_application_response_updated_by_organisation/migration.sql +2 -0
  24. package/prisma/schema/migrations/20260605120000_drop_document_application_id/migration.sql +3 -0
  25. package/prisma/schema/migrations/20260610120000_jaf_template_model/migration.sql +70 -0
  26. package/prisma/schema/migrations/20260610130000_assignment_document_fks/migration.sql +15 -0
  27. package/prisma/schema/migrations/20260610140000_jaf_draft_activation/migration.sql +12 -0
  28. package/prisma/schema/organisation.prisma +30 -27
  29. package/prisma/schema/resume.prisma +5 -1
  30. package/prisma/schema/user.prisma +1 -0
  31. package/prisma/schema/migrations/20260610100000_add_communication/migration.sql +0 -131
  32. package/prisma/schema/migrations/20260610170000_add_communication_application_scope/migration.sql +0 -45
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-191b7e23829fd0fb9f0cd21a69a06794a22ae57f9d2bfbd84a0b335e373fb7bc",
2
+ "name": "prisma-client-3d70badd60095a1c4e09c64ac9eab10259b0340113526173ec137100d1ac59e3",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -112,45 +112,47 @@ enum ApplicationStatus {
112
112
  }
113
113
 
114
114
  model Application {
115
- id String @id @default(uuid())
116
- candidate_id String
117
- resume_id String
118
- organisation_id String
119
- job_description_id String
120
- fit_check_score Float?
121
- applied_at DateTime @default(now())
122
- evaluation_plan_id String?
123
- fit_check_id String? @unique
124
- round_no Int @default(0)
115
+ id String @id @default(uuid())
116
+ candidate_id String
117
+ resume_id String
118
+ organisation_id String
119
+ job_description_id String
120
+ fit_check_score Float?
121
+ applied_at DateTime @default(now())
122
+ evaluation_plan_id String?
123
+ fit_check_id String? @unique
124
+ round_no Int @default(0)
125
+ is_jaf_completed Boolean @default(false)
125
126
  //Screening fields
126
- on_notice_period Boolean @default(false)
127
- expected_joining_date DateTime?
128
- current_ctc String?
129
- expected_ctc String?
130
- notice_period Int?
131
- preferred_location String?
127
+ on_notice_period Boolean @default(false)
128
+ expected_joining_date DateTime?
129
+ current_ctc String?
130
+ expected_ctc String?
131
+ notice_period Int?
132
+ preferred_location String?
132
133
  // Relations
133
- fit_check_status FitCheckStatus?
134
- status ApplicationStatus @default(PENDING)
135
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
136
- candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
137
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
138
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
139
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
140
- fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
141
- interviews Interview[]
142
- assignments Assignment[]
143
- ongoing_evaluations OngoingEvaluation[]
144
- activity_logs ActivityLog[]
145
- notes Notes[]
146
- conversations Conversation[]
147
- communication_messages CommunicationMessage[]
134
+ fit_check_status FitCheckStatus?
135
+ status ApplicationStatus @default(PENDING)
136
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
137
+ candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
138
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
139
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
140
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
141
+ fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
142
+ interviews Interview[]
143
+ assignments Assignment[]
144
+ ongoing_evaluations OngoingEvaluation[]
145
+ activity_logs ActivityLog[]
146
+ notes Notes[]
147
+ job_application_responses JobApplicationResponse[]
148
+ conversations Conversation[]
149
+ communication_messages CommunicationMessage[]
148
150
  // Audit fields
149
- created_at DateTime @default(now())
150
- updated_at DateTime @updatedAt
151
- created_by String
152
- updated_by String
153
- is_active Boolean @default(true)
151
+ created_at DateTime @default(now())
152
+ updated_at DateTime @updatedAt
153
+ created_by String
154
+ updated_by String
155
+ is_active Boolean @default(true)
154
156
 
155
157
  @@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
156
158
  @@index([candidate_id])
@@ -271,8 +273,12 @@ model Assignment {
271
273
  feedback Json?
272
274
  status AssignmentStatus @default(AVAILABLE)
273
275
  cancel_reason String?
276
+ /// @deprecated Prefer `solution_document_id` + `Document`.
274
277
  solution_url String?
278
+ /// @deprecated Prefer `zip_document_id` + `Document`.
275
279
  zip_url String?
280
+ solution_document_id String? @unique
281
+ zip_document_id String? @unique
276
282
  scheduled_start_time DateTime?
277
283
  scheduled_end_time DateTime?
278
284
  created_at DateTime @default(now())
@@ -288,6 +294,8 @@ model Assignment {
288
294
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
289
295
  application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
290
296
  ongoing_evaluation OngoingEvaluation? @relation(fields: [ongoing_evaluation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
297
+ solution_document Document? @relation("AssignmentSolutionDocument", fields: [solution_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
298
+ zip_document Document? @relation("AssignmentZipDocument", fields: [zip_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
291
299
 
292
300
  @@unique([candidate_id, ongoing_evaluation_id])
293
301
  @@index([candidate_id])
@@ -608,6 +616,44 @@ model ContactUs {
608
616
  is_active Boolean @default(true)
609
617
  }
610
618
 
619
+ model Document {
620
+ // Primary key
621
+ id String @id @default(uuid())
622
+ // Foreign keys
623
+ organisation_id String?
624
+ candidate_id String?
625
+ // Data fields
626
+ original_file_name String
627
+ stored_file_name String
628
+ file_extension String?
629
+ s3_bucket String?
630
+ s3_key String?
631
+ mime_type String?
632
+ file_size BigInt?
633
+ file_hash String?
634
+ metadata Json?
635
+ // Audit fields
636
+ created_at DateTime @default(now())
637
+ updated_at DateTime @updatedAt
638
+ created_by String
639
+ updated_by String
640
+ is_active Boolean @default(true)
641
+ // Relations
642
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
643
+ candidate User? @relation(fields: [candidate_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
644
+ resume Resume?
645
+ job_description_source JobDescription?
646
+ interview_recording Interview?
647
+ job_application_responses JobApplicationResponse[]
648
+ assignment_solution Assignment? @relation("AssignmentSolutionDocument")
649
+ assignment_zip Assignment? @relation("AssignmentZipDocument")
650
+
651
+ // Indexes
652
+ @@index([candidate_id])
653
+ @@index([organisation_id, candidate_id])
654
+ @@index([file_hash])
655
+ }
656
+
611
657
  enum RoundType {
612
658
  ASSESSMENT
613
659
  INTERVIEW
@@ -943,7 +989,9 @@ model Interview {
943
989
  actual_end_time DateTime?
944
990
  /// Interview length in minutes (source of truth; not derived from schedule window).
945
991
  duration Int?
992
+ /// @deprecated Prefer `recording_document_id` + `Document` (type INTERVIEW_RECORDING).
946
993
  recording_url String?
994
+ recording_document_id String? @unique
947
995
  evaluation_type EvaluationType? @default(TREADSPACE_AI_ASSISTED)
948
996
  ai_assistance_mode AiAssistanceMode? @default(ASSISTED)
949
997
  interview_status InterviewStatus @default(SCHEDULED)
@@ -983,6 +1031,7 @@ model Interview {
983
1031
  candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
984
1032
  interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
985
1033
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1034
+ recording_document Document? @relation(fields: [recording_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
986
1035
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
987
1036
  resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
988
1037
  evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
@@ -1020,6 +1069,109 @@ model InterviewNotes {
1020
1069
  @@index([interview_id])
1021
1070
  }
1022
1071
 
1072
+ enum JobApplicationFieldType {
1073
+ TEXT
1074
+ NUMBER
1075
+ DATE
1076
+ BOOLEAN
1077
+ MULTI_SELECT
1078
+ FILE
1079
+ DROP_DOWN
1080
+ }
1081
+
1082
+ model JobApplicationField {
1083
+ /// Primary key (UUID)
1084
+ id String @id @default(uuid())
1085
+ /// Foreign keys
1086
+ organisation_id String
1087
+ template_id String
1088
+ /// Data fields
1089
+ field_type JobApplicationFieldType
1090
+ label String
1091
+ description String?
1092
+ is_mandatory Boolean @default(false)
1093
+ is_draft Boolean @default(true)
1094
+ options String[]
1095
+ /// Audit fields
1096
+ is_active Boolean @default(true)
1097
+ created_by String
1098
+ updated_by String
1099
+ created_at DateTime @default(now())
1100
+ updated_at DateTime @updatedAt
1101
+ /// Relations
1102
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1103
+ job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1104
+ job_application_responses JobApplicationResponse[]
1105
+
1106
+ /// Indexes
1107
+ @@index([organisation_id, template_id])
1108
+ }
1109
+
1110
+ model JobApplicationResponse {
1111
+ /// Primary key
1112
+ id String @id @default(uuid())
1113
+ /// Foreign keys
1114
+ application_id String
1115
+ job_application_field_id String?
1116
+ document_id String?
1117
+ /// Answer payload
1118
+ response Json?
1119
+ /// Denormalized question snapshot (immutable on candidate save)
1120
+ field_type JobApplicationFieldType?
1121
+ label String?
1122
+ description String?
1123
+ is_mandatory Boolean?
1124
+ is_draft Boolean?
1125
+ is_submitted Boolean @default(false)
1126
+ options String[]
1127
+ updated_by_organisation Boolean @default(false)
1128
+ /// Audit fields
1129
+ created_at DateTime @default(now())
1130
+ updated_at DateTime @updatedAt
1131
+ created_by String
1132
+ updated_by String
1133
+ is_active Boolean @default(true)
1134
+ /// Relations
1135
+ application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1136
+ field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
1137
+ document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1138
+
1139
+ /// Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
1140
+ @@index([application_id])
1141
+ @@index([job_application_field_id])
1142
+ }
1143
+
1144
+ enum JobApplicationTemplateScope {
1145
+ ORGANIZATION
1146
+ JOB
1147
+ }
1148
+
1149
+ model JobApplicationTemplate {
1150
+ /// Primary key
1151
+ id String @id @default(uuid())
1152
+ /// Foreign keys
1153
+ organisation_id String
1154
+ job_description_id String? @unique
1155
+ /// Data fields
1156
+ name String
1157
+ description String?
1158
+ scope JobApplicationTemplateScope @default(ORGANIZATION)
1159
+ /// Audit fields
1160
+ is_active Boolean @default(true)
1161
+ created_by String
1162
+ updated_by String
1163
+ created_at DateTime @default(now())
1164
+ updated_at DateTime @updatedAt
1165
+ /// Relations
1166
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1167
+ job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1168
+ fields JobApplicationField[]
1169
+
1170
+ /// Indexes
1171
+ @@index([organisation_id, scope])
1172
+ @@index([job_description_id])
1173
+ }
1174
+
1023
1175
  enum JobDescriptionStatus {
1024
1176
  CREATED
1025
1177
  DRAFT
@@ -1029,28 +1181,31 @@ enum JobDescriptionStatus {
1029
1181
  }
1030
1182
 
1031
1183
  model JobDescription {
1032
- id String @id @default(uuid())
1184
+ id String @id @default(uuid())
1033
1185
  organisation_id String
1034
1186
  hiring_manager_id String?
1035
- status JobDescriptionStatus @default(DRAFT)
1187
+ status JobDescriptionStatus @default(DRAFT)
1036
1188
  screeningQuestions String[]
1037
1189
  recommendedQuestions Json[]
1190
+ /// @deprecated Prefer `source_document_id` + `Document` (type JOB_DESCRIPTION).
1038
1191
  uploaded_job_description_path String?
1039
- is_plan_published Boolean @default(false)
1040
- is_posted Boolean @default(false)
1192
+ source_document_id String? @unique
1193
+ is_plan_published Boolean @default(false)
1194
+ is_posted Boolean @default(false)
1041
1195
  summary Json?
1042
1196
  ai_insight Json?
1043
1197
  job_fit_comparison Json?
1044
1198
  // Audit fields
1045
- created_at DateTime @default(now())
1046
- updated_at DateTime @updatedAt
1199
+ created_at DateTime @default(now())
1200
+ updated_at DateTime @updatedAt
1047
1201
  created_by String
1048
1202
  updated_by String
1049
- is_active Boolean @default(true)
1050
- openings Int @default(1)
1203
+ is_active Boolean @default(true)
1204
+ openings Int @default(1)
1051
1205
  job_profile_id String?
1052
- job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1053
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1206
+ job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1207
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1208
+ source_document Document? @relation(fields: [source_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1054
1209
  applications Application[]
1055
1210
  interviews Interview[]
1056
1211
  assignments Assignment[]
@@ -1062,10 +1217,11 @@ model JobDescription {
1062
1217
  approvals Approval[] // one-to-many relation
1063
1218
  resumes Resume[] // one-to-many link
1064
1219
  budget Budget?
1065
- hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1220
+ hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1066
1221
  recruiters User[]
1067
1222
  transcripts Transcript[]
1068
1223
  integration_job_syncs IntegrationJobSync[]
1224
+ job_application_template JobApplicationTemplate?
1069
1225
  conversations Conversation[]
1070
1226
  communication_messages CommunicationMessage[]
1071
1227
 
@@ -1294,33 +1450,36 @@ model Organisation {
1294
1450
  company_values Json[]
1295
1451
  allowed_email_domains String[]
1296
1452
 
1297
- interviewers User[]
1298
- created_at DateTime @default(now())
1299
- updated_at DateTime @updatedAt
1300
- created_by String
1301
- updated_by String
1302
- is_active Boolean @default(true)
1303
- alias String? @unique
1304
- logo String?
1305
- applications Application[]
1306
- user_roles UserRole[]
1307
- job_descriptions JobDescription[]
1308
- job_profiles JobProfile[]
1309
- assessment_library AssessmentLibrary[]
1310
- assignment_library AssignmentLibrary[]
1311
- interviews Interview[]
1312
- assignments Assignment[]
1313
- fit_check FitCheck[] // one-to-many link
1314
- resumes Resume[] // one-to-many link
1315
- approvals Approval[] // one-to-many link
1316
- suggestions Suggestion[]
1317
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
1318
- actions Action[]
1319
- integration_credentials IntegrationCredential[]
1320
- zoho_sync_mappings ZohoSyncMapping[]
1321
- assessments Assessment[]
1322
- timezone String @default("Asia/Kolkata")
1323
- organisation_configs OrganisationConfig[]
1453
+ interviewers User[]
1454
+ created_at DateTime @default(now())
1455
+ updated_at DateTime @updatedAt
1456
+ created_by String
1457
+ updated_by String
1458
+ is_active Boolean @default(true)
1459
+ alias String? @unique
1460
+ logo String?
1461
+ applications Application[]
1462
+ user_roles UserRole[]
1463
+ job_descriptions JobDescription[]
1464
+ job_profiles JobProfile[]
1465
+ assessment_library AssessmentLibrary[]
1466
+ assignment_library AssignmentLibrary[]
1467
+ interviews Interview[]
1468
+ assignments Assignment[]
1469
+ fit_check FitCheck[] // one-to-many link
1470
+ resumes Resume[] // one-to-many link
1471
+ approvals Approval[] // one-to-many link
1472
+ suggestions Suggestion[]
1473
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
1474
+ actions Action[]
1475
+ integration_credentials IntegrationCredential[]
1476
+ zoho_sync_mappings ZohoSyncMapping[]
1477
+ assessments Assessment[]
1478
+ timezone String @default("Asia/Kolkata")
1479
+ organisation_configs OrganisationConfig[]
1480
+ job_application_fields JobApplicationField[]
1481
+ documents Document[]
1482
+ job_application_templates JobApplicationTemplate[]
1324
1483
 
1325
1484
  channel_provider_configs ChannelProviderConfig[]
1326
1485
  conversations Conversation[]
@@ -1441,8 +1600,11 @@ model Resume {
1441
1600
  user_id String?
1442
1601
  organisation_id String?
1443
1602
  job_description_id String?
1603
+ /// @deprecated Prefer `document_id` + `Document`. Kept until backfill completes.
1444
1604
  uploaded_resume_path String?
1445
- file_hash String? @unique
1605
+ document_id String? @unique
1606
+ /// @deprecated Prefer `Document.file_hash`. Kept for legacy read fallback.
1607
+ file_hash String?
1446
1608
  summary Json?
1447
1609
  created_at DateTime @default(now())
1448
1610
  updated_at DateTime @updatedAt
@@ -1453,6 +1615,7 @@ model Resume {
1453
1615
  user User? @relation(fields: [user_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1454
1616
  organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1455
1617
  job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1618
+ document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1456
1619
  applications Application[]
1457
1620
  interviews Interview[]
1458
1621
  ongoing_evaluations OngoingEvaluation[] // optional one-to-many
@@ -1634,6 +1797,7 @@ model User {
1634
1797
  veteran_status String?
1635
1798
  disability_status String?
1636
1799
  professional_expertise String?
1800
+ documents Document[]
1637
1801
 
1638
1802
  @@index([role_id])
1639
1803
  @@index([permission_id])
package/client/wasm.js CHANGED
@@ -186,6 +186,7 @@ exports.Prisma.ApplicationScalarFieldEnum = {
186
186
  evaluation_plan_id: 'evaluation_plan_id',
187
187
  fit_check_id: 'fit_check_id',
188
188
  round_no: 'round_no',
189
+ is_jaf_completed: 'is_jaf_completed',
189
190
  on_notice_period: 'on_notice_period',
190
191
  expected_joining_date: 'expected_joining_date',
191
192
  current_ctc: 'current_ctc',
@@ -270,6 +271,8 @@ exports.Prisma.AssignmentScalarFieldEnum = {
270
271
  cancel_reason: 'cancel_reason',
271
272
  solution_url: 'solution_url',
272
273
  zip_url: 'zip_url',
274
+ solution_document_id: 'solution_document_id',
275
+ zip_document_id: 'zip_document_id',
273
276
  scheduled_start_time: 'scheduled_start_time',
274
277
  scheduled_end_time: 'scheduled_end_time',
275
278
  created_at: 'created_at',
@@ -446,6 +449,26 @@ exports.Prisma.ContactUsScalarFieldEnum = {
446
449
  is_active: 'is_active'
447
450
  };
448
451
 
452
+ exports.Prisma.DocumentScalarFieldEnum = {
453
+ id: 'id',
454
+ organisation_id: 'organisation_id',
455
+ candidate_id: 'candidate_id',
456
+ original_file_name: 'original_file_name',
457
+ stored_file_name: 'stored_file_name',
458
+ file_extension: 'file_extension',
459
+ s3_bucket: 's3_bucket',
460
+ s3_key: 's3_key',
461
+ mime_type: 'mime_type',
462
+ file_size: 'file_size',
463
+ file_hash: 'file_hash',
464
+ metadata: 'metadata',
465
+ created_at: 'created_at',
466
+ updated_at: 'updated_at',
467
+ created_by: 'created_by',
468
+ updated_by: 'updated_by',
469
+ is_active: 'is_active'
470
+ };
471
+
449
472
  exports.Prisma.EvaluationPlanScalarFieldEnum = {
450
473
  id: 'id',
451
474
  job_description_id: 'job_description_id',
@@ -596,6 +619,7 @@ exports.Prisma.InterviewScalarFieldEnum = {
596
619
  actual_end_time: 'actual_end_time',
597
620
  duration: 'duration',
598
621
  recording_url: 'recording_url',
622
+ recording_document_id: 'recording_document_id',
599
623
  evaluation_type: 'evaluation_type',
600
624
  ai_assistance_mode: 'ai_assistance_mode',
601
625
  interview_status: 'interview_status',
@@ -636,6 +660,58 @@ exports.Prisma.InterviewNotesScalarFieldEnum = {
636
660
  is_active: 'is_active'
637
661
  };
638
662
 
663
+ exports.Prisma.JobApplicationFieldScalarFieldEnum = {
664
+ id: 'id',
665
+ organisation_id: 'organisation_id',
666
+ template_id: 'template_id',
667
+ field_type: 'field_type',
668
+ label: 'label',
669
+ description: 'description',
670
+ is_mandatory: 'is_mandatory',
671
+ is_draft: 'is_draft',
672
+ options: 'options',
673
+ is_active: 'is_active',
674
+ created_by: 'created_by',
675
+ updated_by: 'updated_by',
676
+ created_at: 'created_at',
677
+ updated_at: 'updated_at'
678
+ };
679
+
680
+ exports.Prisma.JobApplicationResponseScalarFieldEnum = {
681
+ id: 'id',
682
+ application_id: 'application_id',
683
+ job_application_field_id: 'job_application_field_id',
684
+ document_id: 'document_id',
685
+ response: 'response',
686
+ field_type: 'field_type',
687
+ label: 'label',
688
+ description: 'description',
689
+ is_mandatory: 'is_mandatory',
690
+ is_draft: 'is_draft',
691
+ is_submitted: 'is_submitted',
692
+ options: 'options',
693
+ updated_by_organisation: 'updated_by_organisation',
694
+ created_at: 'created_at',
695
+ updated_at: 'updated_at',
696
+ created_by: 'created_by',
697
+ updated_by: 'updated_by',
698
+ is_active: 'is_active'
699
+ };
700
+
701
+ exports.Prisma.JobApplicationTemplateScalarFieldEnum = {
702
+ id: 'id',
703
+ organisation_id: 'organisation_id',
704
+ job_description_id: 'job_description_id',
705
+ name: 'name',
706
+ description: 'description',
707
+ scope: 'scope',
708
+ is_active: 'is_active',
709
+ created_by: 'created_by',
710
+ updated_by: 'updated_by',
711
+ created_at: 'created_at',
712
+ updated_at: 'updated_at'
713
+ };
714
+
639
715
  exports.Prisma.JobDescriptionScalarFieldEnum = {
640
716
  id: 'id',
641
717
  organisation_id: 'organisation_id',
@@ -644,6 +720,7 @@ exports.Prisma.JobDescriptionScalarFieldEnum = {
644
720
  screeningQuestions: 'screeningQuestions',
645
721
  recommendedQuestions: 'recommendedQuestions',
646
722
  uploaded_job_description_path: 'uploaded_job_description_path',
723
+ source_document_id: 'source_document_id',
647
724
  is_plan_published: 'is_plan_published',
648
725
  is_posted: 'is_posted',
649
726
  summary: 'summary',
@@ -865,6 +942,7 @@ exports.Prisma.ResumeScalarFieldEnum = {
865
942
  organisation_id: 'organisation_id',
866
943
  job_description_id: 'job_description_id',
867
944
  uploaded_resume_path: 'uploaded_resume_path',
945
+ document_id: 'document_id',
868
946
  file_hash: 'file_hash',
869
947
  summary: 'summary',
870
948
  created_at: 'created_at',
@@ -1237,6 +1315,21 @@ exports.InterviewFeedback = exports.$Enums.InterviewFeedback = {
1237
1315
  STRONG_NO_HIRE: 'STRONG_NO_HIRE'
1238
1316
  };
1239
1317
 
1318
+ exports.JobApplicationFieldType = exports.$Enums.JobApplicationFieldType = {
1319
+ TEXT: 'TEXT',
1320
+ NUMBER: 'NUMBER',
1321
+ DATE: 'DATE',
1322
+ BOOLEAN: 'BOOLEAN',
1323
+ MULTI_SELECT: 'MULTI_SELECT',
1324
+ FILE: 'FILE',
1325
+ DROP_DOWN: 'DROP_DOWN'
1326
+ };
1327
+
1328
+ exports.JobApplicationTemplateScope = exports.$Enums.JobApplicationTemplateScope = {
1329
+ ORGANIZATION: 'ORGANIZATION',
1330
+ JOB: 'JOB'
1331
+ };
1332
+
1240
1333
  exports.JobDescriptionStatus = exports.$Enums.JobDescriptionStatus = {
1241
1334
  CREATED: 'CREATED',
1242
1335
  DRAFT: 'DRAFT',
@@ -1328,6 +1421,7 @@ exports.Prisma.ModelName = {
1328
1421
  Conversation: 'Conversation',
1329
1422
  CommunicationMessage: 'CommunicationMessage',
1330
1423
  ContactUs: 'ContactUs',
1424
+ Document: 'Document',
1331
1425
  EvaluationPlan: 'EvaluationPlan',
1332
1426
  Feedback: 'Feedback',
1333
1427
  FitCheck: 'FitCheck',
@@ -1337,6 +1431,9 @@ exports.Prisma.ModelName = {
1337
1431
  ZohoSyncMapping: 'ZohoSyncMapping',
1338
1432
  Interview: 'Interview',
1339
1433
  InterviewNotes: 'InterviewNotes',
1434
+ JobApplicationField: 'JobApplicationField',
1435
+ JobApplicationResponse: 'JobApplicationResponse',
1436
+ JobApplicationTemplate: 'JobApplicationTemplate',
1340
1437
  JobDescription: 'JobDescription',
1341
1438
  JobDescriptionData: 'JobDescriptionData',
1342
1439
  JobProfile: 'JobProfile',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.4.17",
3
+ "version": "0.4.18",
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
@@ -17,6 +17,7 @@ model Application {
17
17
  evaluation_plan_id String?
18
18
  fit_check_id String? @unique
19
19
  round_no Int @default(0)
20
+ is_jaf_completed Boolean @default(false)
20
21
  //Screening fields
21
22
  on_notice_period Boolean @default(false)
22
23
  expected_joining_date DateTime?
@@ -36,10 +37,11 @@ model Application {
36
37
  interviews Interview[]
37
38
  assignments Assignment[]
38
39
  ongoing_evaluations OngoingEvaluation[]
39
- activity_logs ActivityLog[]
40
- notes Notes[]
41
- conversations Conversation[]
42
- communication_messages CommunicationMessage[]
40
+ activity_logs ActivityLog[]
41
+ notes Notes[]
42
+ job_application_responses JobApplicationResponse[]
43
+ conversations Conversation[]
44
+ communication_messages CommunicationMessage[]
43
45
  // Audit fields
44
46
  created_at DateTime @default(now())
45
47
  updated_at DateTime @updatedAt
@@ -17,8 +17,12 @@ model Assignment {
17
17
  feedback Json?
18
18
  status AssignmentStatus @default(AVAILABLE)
19
19
  cancel_reason String?
20
+ /// @deprecated Prefer `solution_document_id` + `Document`.
20
21
  solution_url String?
22
+ /// @deprecated Prefer `zip_document_id` + `Document`.
21
23
  zip_url String?
24
+ solution_document_id String? @unique
25
+ zip_document_id String? @unique
22
26
  scheduled_start_time DateTime?
23
27
  scheduled_end_time DateTime?
24
28
  created_at DateTime @default(now())
@@ -34,6 +38,8 @@ model Assignment {
34
38
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
35
39
  application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
36
40
  ongoing_evaluation OngoingEvaluation? @relation(fields: [ongoing_evaluation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
41
+ solution_document Document? @relation("AssignmentSolutionDocument", fields: [solution_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
42
+ zip_document Document? @relation("AssignmentZipDocument", fields: [zip_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
37
43
 
38
44
  @@unique([candidate_id, ongoing_evaluation_id])
39
45
  @@index([candidate_id])