@adaptware/eagles-db 0.4.10 → 0.4.11

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-94553ce9e384021d95cc00ceea7272654b17cfb4ed4079ec81e1f600517860b2",
2
+ "name": "prisma-client-3057ec88b47cc8f33a5e1c389c17b6a3cf353971bcd9ca2cc7d4354787f280f1",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -80,6 +80,108 @@ model Action {
80
80
  @@index([due_date])
81
81
  }
82
82
 
83
+ enum ActivityEventType {
84
+ APPLICATION_CREATED
85
+ APPLICATION_STARTED
86
+ APPLICATION_REJECTED
87
+ APPLICATION_SHORTLISTED
88
+
89
+ ROUND_ASSIGNED
90
+ ROUND_STARTED
91
+ ROUND_COMPLETED
92
+ ROUND_PASSED
93
+ ROUND_FAILED
94
+ ROUND_SKIPPED
95
+
96
+ INTERVIEW_SCHEDULED
97
+ INTERVIEW_RESCHEDULED
98
+ INTERVIEW_CANCELLED
99
+ INTERVIEW_COMPLETED
100
+ INTERVIEW_NO_SHOW
101
+ INTERVIEW_EVALUATION_PENDING
102
+ INTERVIEW_EVALUATED
103
+
104
+ FEEDBACK_SUBMITTED
105
+
106
+ JOB_CREATED
107
+ JOB_PUBLISHED
108
+ JOB_CLOSED
109
+ JOB_DEACTIVATED
110
+
111
+ EVALUATION_PLAN_CREATED
112
+ EVALUATION_PLAN_PUBLISHED
113
+ EVALUATION_PLAN_DELETED
114
+ EVALUATION_PLAN_UPDATED
115
+ STATUS_CHANGED
116
+
117
+ CUSTOM
118
+ }
119
+
120
+ enum ActivityEntityType {
121
+ APPLICATION
122
+
123
+ CANDIDATE
124
+
125
+ JOB
126
+
127
+ ONGOING_EVALUATION
128
+
129
+ EVALUATION_PLAN
130
+
131
+ INTERVIEW
132
+
133
+ ASSESSMENT
134
+
135
+ ORGANISATION
136
+
137
+ USER
138
+ }
139
+
140
+ enum ActivityEntityActorType {
141
+ USER
142
+
143
+ SYSTEM
144
+
145
+ AI_AGENT
146
+
147
+ WEBHOOK
148
+ }
149
+
150
+ model ActivityEvent {
151
+ id String @id @default(uuid())
152
+
153
+ organisation_id String?
154
+
155
+ event_type ActivityEventType
156
+
157
+ entity_type ActivityEntityType
158
+ entity_id String
159
+
160
+ actor_id String?
161
+ actor_type ActivityEntityActorType
162
+
163
+ related_entities Json?
164
+
165
+ snapshot Json?
166
+
167
+ payload Json?
168
+
169
+ schema_version Int @default(1)
170
+
171
+ occurred_at DateTime
172
+
173
+ created_at DateTime @default(now())
174
+
175
+ organisation Organisation? @relation(fields: [organisation_id], references: [id])
176
+
177
+ @@index([organisation_id, occurred_at])
178
+ @@index([organisation_id, event_type])
179
+ @@index([entity_type, entity_id])
180
+ @@index([actor_id])
181
+ @@index([occurred_at])
182
+ @@map("activity_events")
183
+ }
184
+
83
185
  enum ActivityActorType {
84
186
  USER
85
187
  AI
@@ -121,6 +223,7 @@ model Application {
121
223
  applied_at DateTime @default(now())
122
224
  evaluation_plan_id String?
123
225
  fit_check_id String? @unique
226
+ recruiter_id String?
124
227
  round_no Int @default(0)
125
228
  //Screening fields
126
229
  on_notice_period Boolean @default(false)
@@ -138,6 +241,7 @@ model Application {
138
241
  resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
139
242
  job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
140
243
  fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
244
+ recruiter User? @relation("ApplicationRecruiter", fields: [recruiter_id], references: [id])
141
245
  interviews Interview[]
142
246
  assignments Assignment[]
143
247
  ongoing_evaluations OngoingEvaluation[]
@@ -456,6 +560,14 @@ enum RoundType {
456
560
  SCREENING
457
561
  }
458
562
 
563
+ enum EvaluationCategory {
564
+ EXPERIENCE_SCREENING
565
+ TECHNICAL_SCREENING
566
+ TECHNICAL_INTERVIEW
567
+ BUSINESS_ROUND
568
+ BEHAVIORAL_ROUND
569
+ }
570
+
459
571
  enum EvaluationRoundFormat {
460
572
  // ────────────────
461
573
  // Screening formats
@@ -525,6 +637,7 @@ model EvaluationPlan {
525
637
  duration Int?
526
638
  duration_unit DurationUnit?
527
639
  deadline Int?
640
+ category EvaluationCategory?
528
641
  created_by String
529
642
  updated_by String
530
643
  created_at DateTime @default(now())
@@ -882,33 +995,36 @@ model JobDescription {
882
995
  summary Json?
883
996
  ai_insight Json?
884
997
  job_fit_comparison Json?
885
- /// Per-job thresholds for AI round recommendation (interview vs work-sample routing).
886
- recommendation_config Json?
998
+ target_closing_date DateTime?
999
+ closing_date DateTime?
1000
+
1001
+ job_number Int?
1002
+ job_code String? @unique
887
1003
  // Audit fields
888
- created_at DateTime @default(now())
889
- updated_at DateTime @updatedAt
890
- created_by String
891
- updated_by String
892
- is_active Boolean @default(true)
893
- openings Int @default(1)
894
- job_profile_id String?
895
- job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
896
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
897
- applications Application[]
898
- interviews Interview[]
899
- assignments Assignment[]
900
- fit_check FitCheck[] // one-to-many link
901
- job_description_data JobDescriptionData[] // one-to-many link
902
- evaluationPlan EvaluationPlan[] // relation to evaluation methods
903
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
904
- assignment_library AssignmentLibrary[]
905
- approvals Approval[] // one-to-many relation
906
- resumes Resume[] // one-to-many link
907
- budget Budget?
908
- hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
909
- recruiters User[]
910
- transcripts Transcript[]
911
- integration_job_syncs IntegrationJobSync[]
1004
+ created_at DateTime @default(now())
1005
+ updated_at DateTime @updatedAt
1006
+ created_by String
1007
+ updated_by String
1008
+ is_active Boolean @default(true)
1009
+ openings Int @default(1)
1010
+ job_profile_id String?
1011
+ job_profile JobProfile? @relation(fields: [job_profile_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1012
+ organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1013
+ applications Application[]
1014
+ interviews Interview[]
1015
+ assignments Assignment[]
1016
+ fit_check FitCheck[] // one-to-many link
1017
+ job_description_data JobDescriptionData[] // one-to-many link
1018
+ evaluationPlan EvaluationPlan[] // relation to evaluation methods
1019
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
1020
+ assignment_library AssignmentLibrary[]
1021
+ approvals Approval[] // one-to-many relation
1022
+ resumes Resume[] // one-to-many link
1023
+ budget Budget?
1024
+ hiring_manager User? @relation("HiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1025
+ recruiters User[]
1026
+ transcripts Transcript[]
1027
+ integration_job_syncs IntegrationJobSync[]
912
1028
 
913
1029
  @@index([organisation_id])
914
1030
  @@index([hiring_manager_id])
@@ -1068,9 +1184,7 @@ model OngoingEvaluation {
1068
1184
  candidate_id String
1069
1185
  resume_id String
1070
1186
  job_description_id String
1071
- evaluation_plan_id String?
1072
- /// null = legacy row; false = pre-Proceed draft; true = committed pipeline round
1073
- is_committed Boolean?
1187
+ evaluation_plan_id String
1074
1188
  interview_id String? @unique
1075
1189
  assignment_id String? @unique
1076
1190
  assessment_id String? @unique
@@ -1079,6 +1193,7 @@ model OngoingEvaluation {
1079
1193
  round_status OngoingEvaluationRoundStatus? @default(NOT_SCHEDULED)
1080
1194
  comments String? @default("")
1081
1195
  completed_at DateTime?
1196
+ is_committed Boolean?
1082
1197
  /// Evaluation Plan Fields Filled After Round Started
1083
1198
  title String?
1084
1199
  description String?
@@ -1106,14 +1221,13 @@ model OngoingEvaluation {
1106
1221
  candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1107
1222
  resume Resume? @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1108
1223
  organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1109
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1224
+ evaluation_plan EvaluationPlan @relation(fields: [evaluation_plan_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1110
1225
  interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
1111
1226
  assignment Assignment?
1112
1227
  assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
1113
1228
 
1114
1229
  @@unique([application_id, evaluation_plan_id])
1115
1230
  @@index([application_id])
1116
- @@index([application_id, is_committed])
1117
1231
  @@index([evaluation_plan_id])
1118
1232
  }
1119
1233
 
@@ -1145,6 +1259,8 @@ model Organisation {
1145
1259
  is_active Boolean @default(true)
1146
1260
  alias String? @unique
1147
1261
  logo String?
1262
+ org_code String? @unique
1263
+ job_sequence Int @default(1)
1148
1264
  applications Application[]
1149
1265
  user_roles UserRole[]
1150
1266
  job_descriptions JobDescription[]
@@ -1164,6 +1280,7 @@ model Organisation {
1164
1280
  assessments Assessment[]
1165
1281
  timezone String @default("Asia/Kolkata")
1166
1282
  organisation_configs OrganisationConfig[]
1283
+ activity_events ActivityEvent[]
1167
1284
 
1168
1285
  @@index([name])
1169
1286
  }
@@ -1455,6 +1572,7 @@ model User {
1455
1572
  refresh_token_auth RefreshToken[] @relation("TokenRefresh")
1456
1573
  zoom_meeting_participants ZoomMeetingParticipant[]
1457
1574
  notes Notes[]
1575
+ recruiter_applications Application[] @relation("ApplicationRecruiter")
1458
1576
 
1459
1577
  name String?
1460
1578
  phone String?
package/client/wasm.js CHANGED
@@ -163,6 +163,22 @@ exports.Prisma.ActionScalarFieldEnum = {
163
163
  is_active: 'is_active'
164
164
  };
165
165
 
166
+ exports.Prisma.ActivityEventScalarFieldEnum = {
167
+ id: 'id',
168
+ organisation_id: 'organisation_id',
169
+ event_type: 'event_type',
170
+ entity_type: 'entity_type',
171
+ entity_id: 'entity_id',
172
+ actor_id: 'actor_id',
173
+ actor_type: 'actor_type',
174
+ related_entities: 'related_entities',
175
+ snapshot: 'snapshot',
176
+ payload: 'payload',
177
+ schema_version: 'schema_version',
178
+ occurred_at: 'occurred_at',
179
+ created_at: 'created_at'
180
+ };
181
+
166
182
  exports.Prisma.ActivityLogScalarFieldEnum = {
167
183
  id: 'id',
168
184
  application_id: 'application_id',
@@ -185,6 +201,7 @@ exports.Prisma.ApplicationScalarFieldEnum = {
185
201
  applied_at: 'applied_at',
186
202
  evaluation_plan_id: 'evaluation_plan_id',
187
203
  fit_check_id: 'fit_check_id',
204
+ recruiter_id: 'recruiter_id',
188
205
  round_no: 'round_no',
189
206
  on_notice_period: 'on_notice_period',
190
207
  expected_joining_date: 'expected_joining_date',
@@ -402,6 +419,7 @@ exports.Prisma.EvaluationPlanScalarFieldEnum = {
402
419
  duration: 'duration',
403
420
  duration_unit: 'duration_unit',
404
421
  deadline: 'deadline',
422
+ category: 'category',
405
423
  created_by: 'created_by',
406
424
  updated_by: 'updated_by',
407
425
  created_at: 'created_at',
@@ -585,7 +603,10 @@ exports.Prisma.JobDescriptionScalarFieldEnum = {
585
603
  summary: 'summary',
586
604
  ai_insight: 'ai_insight',
587
605
  job_fit_comparison: 'job_fit_comparison',
588
- recommendation_config: 'recommendation_config',
606
+ target_closing_date: 'target_closing_date',
607
+ closing_date: 'closing_date',
608
+ job_number: 'job_number',
609
+ job_code: 'job_code',
589
610
  created_at: 'created_at',
590
611
  updated_at: 'updated_at',
591
612
  created_by: 'created_by',
@@ -679,7 +700,6 @@ exports.Prisma.OngoingEvaluationScalarFieldEnum = {
679
700
  resume_id: 'resume_id',
680
701
  job_description_id: 'job_description_id',
681
702
  evaluation_plan_id: 'evaluation_plan_id',
682
- is_committed: 'is_committed',
683
703
  interview_id: 'interview_id',
684
704
  assignment_id: 'assignment_id',
685
705
  assessment_id: 'assessment_id',
@@ -687,6 +707,7 @@ exports.Prisma.OngoingEvaluationScalarFieldEnum = {
687
707
  round_status: 'round_status',
688
708
  comments: 'comments',
689
709
  completed_at: 'completed_at',
710
+ is_committed: 'is_committed',
690
711
  title: 'title',
691
712
  description: 'description',
692
713
  order_no: 'order_no',
@@ -726,6 +747,8 @@ exports.Prisma.OrganisationScalarFieldEnum = {
726
747
  is_active: 'is_active',
727
748
  alias: 'alias',
728
749
  logo: 'logo',
750
+ org_code: 'org_code',
751
+ job_sequence: 'job_sequence',
729
752
  timezone: 'timezone'
730
753
  };
731
754
 
@@ -992,6 +1015,56 @@ exports.ActionStatus = exports.$Enums.ActionStatus = {
992
1015
  CANCELLED: 'CANCELLED'
993
1016
  };
994
1017
 
1018
+ exports.ActivityEventType = exports.$Enums.ActivityEventType = {
1019
+ APPLICATION_CREATED: 'APPLICATION_CREATED',
1020
+ APPLICATION_STARTED: 'APPLICATION_STARTED',
1021
+ APPLICATION_REJECTED: 'APPLICATION_REJECTED',
1022
+ APPLICATION_SHORTLISTED: 'APPLICATION_SHORTLISTED',
1023
+ ROUND_ASSIGNED: 'ROUND_ASSIGNED',
1024
+ ROUND_STARTED: 'ROUND_STARTED',
1025
+ ROUND_COMPLETED: 'ROUND_COMPLETED',
1026
+ ROUND_PASSED: 'ROUND_PASSED',
1027
+ ROUND_FAILED: 'ROUND_FAILED',
1028
+ ROUND_SKIPPED: 'ROUND_SKIPPED',
1029
+ INTERVIEW_SCHEDULED: 'INTERVIEW_SCHEDULED',
1030
+ INTERVIEW_RESCHEDULED: 'INTERVIEW_RESCHEDULED',
1031
+ INTERVIEW_CANCELLED: 'INTERVIEW_CANCELLED',
1032
+ INTERVIEW_COMPLETED: 'INTERVIEW_COMPLETED',
1033
+ INTERVIEW_NO_SHOW: 'INTERVIEW_NO_SHOW',
1034
+ INTERVIEW_EVALUATION_PENDING: 'INTERVIEW_EVALUATION_PENDING',
1035
+ INTERVIEW_EVALUATED: 'INTERVIEW_EVALUATED',
1036
+ FEEDBACK_SUBMITTED: 'FEEDBACK_SUBMITTED',
1037
+ JOB_CREATED: 'JOB_CREATED',
1038
+ JOB_PUBLISHED: 'JOB_PUBLISHED',
1039
+ JOB_CLOSED: 'JOB_CLOSED',
1040
+ JOB_DEACTIVATED: 'JOB_DEACTIVATED',
1041
+ EVALUATION_PLAN_CREATED: 'EVALUATION_PLAN_CREATED',
1042
+ EVALUATION_PLAN_PUBLISHED: 'EVALUATION_PLAN_PUBLISHED',
1043
+ EVALUATION_PLAN_DELETED: 'EVALUATION_PLAN_DELETED',
1044
+ EVALUATION_PLAN_UPDATED: 'EVALUATION_PLAN_UPDATED',
1045
+ STATUS_CHANGED: 'STATUS_CHANGED',
1046
+ CUSTOM: 'CUSTOM'
1047
+ };
1048
+
1049
+ exports.ActivityEntityType = exports.$Enums.ActivityEntityType = {
1050
+ APPLICATION: 'APPLICATION',
1051
+ CANDIDATE: 'CANDIDATE',
1052
+ JOB: 'JOB',
1053
+ ONGOING_EVALUATION: 'ONGOING_EVALUATION',
1054
+ EVALUATION_PLAN: 'EVALUATION_PLAN',
1055
+ INTERVIEW: 'INTERVIEW',
1056
+ ASSESSMENT: 'ASSESSMENT',
1057
+ ORGANISATION: 'ORGANISATION',
1058
+ USER: 'USER'
1059
+ };
1060
+
1061
+ exports.ActivityEntityActorType = exports.$Enums.ActivityEntityActorType = {
1062
+ USER: 'USER',
1063
+ SYSTEM: 'SYSTEM',
1064
+ AI_AGENT: 'AI_AGENT',
1065
+ WEBHOOK: 'WEBHOOK'
1066
+ };
1067
+
995
1068
  exports.ActivityActorType = exports.$Enums.ActivityActorType = {
996
1069
  USER: 'USER',
997
1070
  AI: 'AI',
@@ -1079,6 +1152,14 @@ exports.DurationUnit = exports.$Enums.DurationUnit = {
1079
1152
  DAYS: 'DAYS'
1080
1153
  };
1081
1154
 
1155
+ exports.EvaluationCategory = exports.$Enums.EvaluationCategory = {
1156
+ EXPERIENCE_SCREENING: 'EXPERIENCE_SCREENING',
1157
+ TECHNICAL_SCREENING: 'TECHNICAL_SCREENING',
1158
+ TECHNICAL_INTERVIEW: 'TECHNICAL_INTERVIEW',
1159
+ BUSINESS_ROUND: 'BUSINESS_ROUND',
1160
+ BEHAVIORAL_ROUND: 'BEHAVIORAL_ROUND'
1161
+ };
1162
+
1082
1163
  exports.IntegrationProvider = exports.$Enums.IntegrationProvider = {
1083
1164
  NAUKRI: 'NAUKRI',
1084
1165
  ZOHO_RECRUIT: 'ZOHO_RECRUIT',
@@ -1216,6 +1297,7 @@ exports.Prisma.ModelName = {
1216
1297
  CandidateQuestionResponse: 'CandidateQuestionResponse',
1217
1298
  UserRole: 'UserRole',
1218
1299
  Action: 'Action',
1300
+ ActivityEvent: 'ActivityEvent',
1219
1301
  ActivityLog: 'ActivityLog',
1220
1302
  Application: 'Application',
1221
1303
  Approval: 'Approval',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,101 @@
1
+ enum ActivityEventType {
2
+ APPLICATION_CREATED
3
+ APPLICATION_STARTED
4
+ APPLICATION_REJECTED
5
+ APPLICATION_SHORTLISTED
6
+
7
+ ROUND_ASSIGNED
8
+ ROUND_STARTED
9
+ ROUND_COMPLETED
10
+ ROUND_PASSED
11
+ ROUND_FAILED
12
+ ROUND_SKIPPED
13
+
14
+ INTERVIEW_SCHEDULED
15
+ INTERVIEW_RESCHEDULED
16
+ INTERVIEW_CANCELLED
17
+ INTERVIEW_COMPLETED
18
+ INTERVIEW_NO_SHOW
19
+ INTERVIEW_EVALUATION_PENDING
20
+ INTERVIEW_EVALUATED
21
+
22
+ FEEDBACK_SUBMITTED
23
+
24
+ JOB_CREATED
25
+ JOB_PUBLISHED
26
+ JOB_CLOSED
27
+ JOB_DEACTIVATED
28
+
29
+ EVALUATION_PLAN_CREATED
30
+ EVALUATION_PLAN_PUBLISHED
31
+ EVALUATION_PLAN_DELETED
32
+ EVALUATION_PLAN_UPDATED
33
+ STATUS_CHANGED
34
+
35
+ CUSTOM
36
+ }
37
+
38
+ enum ActivityEntityType {
39
+ APPLICATION
40
+
41
+ CANDIDATE
42
+
43
+ JOB
44
+
45
+ ONGOING_EVALUATION
46
+
47
+ EVALUATION_PLAN
48
+
49
+ INTERVIEW
50
+
51
+ ASSESSMENT
52
+
53
+ ORGANISATION
54
+
55
+ USER
56
+ }
57
+
58
+ enum ActivityEntityActorType {
59
+ USER
60
+
61
+ SYSTEM
62
+
63
+ AI_AGENT
64
+
65
+ WEBHOOK
66
+ }
67
+
68
+ model ActivityEvent {
69
+ id String @id @default(uuid())
70
+
71
+ organisation_id String?
72
+
73
+ event_type ActivityEventType
74
+
75
+ entity_type ActivityEntityType
76
+ entity_id String
77
+
78
+ actor_id String?
79
+ actor_type ActivityEntityActorType
80
+
81
+ related_entities Json?
82
+
83
+ snapshot Json?
84
+
85
+ payload Json?
86
+
87
+ schema_version Int @default(1)
88
+
89
+ occurred_at DateTime
90
+
91
+ created_at DateTime @default(now())
92
+
93
+ organisation Organisation? @relation(fields: [organisation_id], references: [id])
94
+
95
+ @@index([organisation_id, occurred_at])
96
+ @@index([organisation_id, event_type])
97
+ @@index([entity_type, entity_id])
98
+ @@index([actor_id])
99
+ @@index([occurred_at])
100
+ @@map("activity_events")
101
+ }
@@ -47,6 +47,7 @@ model Organisation {
47
47
  assessments Assessment[]
48
48
  timezone String @default("Asia/Kolkata")
49
49
  organisation_configs OrganisationConfig[]
50
+ activity_events ActivityEvent[]
50
51
 
51
52
  @@index([name])
52
53
  }