@adaptware/eagles-db 0.1.37 → 0.1.39
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.
- package/client/edge.js +8 -26
- package/client/index-browser.js +5 -15
- package/client/index.d.ts +918 -525
- package/client/index.js +8 -26
- package/client/package.json +1 -1
- package/client/schema.prisma +36 -67
- package/client/wasm.js +5 -15
- package/package.json +1 -1
- package/prisma/schema/activityLog.prisma +14 -36
- package/prisma/schema/applications.prisma +20 -22
- package/prisma/schema/assessmentLibrary.prisma +0 -1
- package/prisma/schema/assignmentLibrary.prisma +14 -15
- package/prisma/schema/interview.prisma +0 -1
- package/prisma/schema/interviewLibrary.prisma +0 -2
- package/prisma/schema/jobDescriptionData.prisma +0 -1
- package/prisma/schema/overallFeedback.prisma +0 -1
- package/prisma/schema/suggestion.prisma +0 -1
- package/prisma/schema/user.prisma +16 -16
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -83,45 +83,23 @@ enum ActivityActorType {
|
|
|
83
83
|
SYSTEM
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
enum ActivityActionType {
|
|
87
|
-
ROUND_COMPLETED
|
|
88
|
-
STAGE_CHANGED
|
|
89
|
-
AI_ANALYSIS_REFRESHED
|
|
90
|
-
FEEDBACK_ADDED
|
|
91
|
-
NOTE_ADDED
|
|
92
|
-
INTERVIEW_SCHEDULED
|
|
93
|
-
INTERVIEW_COMPLETED
|
|
94
|
-
STATUS_UPDATED
|
|
95
|
-
OTHER
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
enum ActivitySource {
|
|
99
|
-
SYSTEM_TRIGGER
|
|
100
|
-
MANUAL_ACTION
|
|
101
|
-
API
|
|
102
|
-
SCHEDULER
|
|
103
|
-
WEBHOOK
|
|
104
|
-
}
|
|
105
|
-
|
|
106
86
|
model ActivityLog {
|
|
107
|
-
id
|
|
108
|
-
|
|
109
|
-
actor_id
|
|
110
|
-
actor_type
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
87
|
+
id String @id @default(uuid())
|
|
88
|
+
application_id String
|
|
89
|
+
actor_id String?
|
|
90
|
+
actor_type ActivityActorType @default(USER)
|
|
91
|
+
message String
|
|
92
|
+
timestamp DateTime @default(now())
|
|
93
|
+
metadata Json?
|
|
94
|
+
created_at DateTime @default(now())
|
|
95
|
+
is_active Boolean @default(true)
|
|
117
96
|
// Relations
|
|
118
|
-
|
|
119
|
-
|
|
97
|
+
actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
98
|
+
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
99
|
+
user User? @relation(fields: [userId], references: [id])
|
|
100
|
+
userId String?
|
|
120
101
|
|
|
121
|
-
@@index([
|
|
122
|
-
@@index([timestamp])
|
|
123
|
-
@@index([candidate_id, timestamp])
|
|
124
|
-
@@index([action_type])
|
|
102
|
+
@@index([application_id])
|
|
125
103
|
}
|
|
126
104
|
|
|
127
105
|
// PENDING could be understood as unscreened
|
|
@@ -133,20 +111,19 @@ enum ApplicationStatus {
|
|
|
133
111
|
}
|
|
134
112
|
|
|
135
113
|
model Application {
|
|
136
|
-
id
|
|
137
|
-
candidate_id
|
|
138
|
-
resume_id
|
|
139
|
-
organisation_id
|
|
140
|
-
job_description_id
|
|
141
|
-
status
|
|
142
|
-
fit_check_score
|
|
143
|
-
fit_check_status
|
|
144
|
-
applied_at
|
|
145
|
-
evaluation_plan_id
|
|
146
|
-
evaluation_plan
|
|
147
|
-
fit_check_id
|
|
148
|
-
round_no
|
|
149
|
-
|
|
114
|
+
id String @id @default(uuid())
|
|
115
|
+
candidate_id String
|
|
116
|
+
resume_id String
|
|
117
|
+
organisation_id String
|
|
118
|
+
job_description_id String
|
|
119
|
+
status ApplicationStatus @default(PENDING)
|
|
120
|
+
fit_check_score Float?
|
|
121
|
+
fit_check_status FitCheckStatus?
|
|
122
|
+
applied_at DateTime @default(now())
|
|
123
|
+
evaluation_plan_id String?
|
|
124
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
|
|
125
|
+
fit_check_id String? @unique
|
|
126
|
+
round_no Int @default(0)
|
|
150
127
|
// Relations
|
|
151
128
|
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
152
129
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
@@ -155,18 +132,17 @@ model Application {
|
|
|
155
132
|
fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
156
133
|
interviews Interview[]
|
|
157
134
|
ongoing_evaluations OngoingEvaluation[]
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
135
|
+
activity_logs ActivityLog[]
|
|
136
|
+
// Audit fields
|
|
137
|
+
created_at DateTime @default(now())
|
|
138
|
+
updated_at DateTime @updatedAt
|
|
139
|
+
created_by String
|
|
140
|
+
updated_by String
|
|
141
|
+
is_active Boolean @default(true)
|
|
164
142
|
|
|
165
143
|
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
166
144
|
@@index([candidate_id])
|
|
167
145
|
@@index([job_description_id])
|
|
168
|
-
@@index([organisation_id])
|
|
169
|
-
@@index([resume_id])
|
|
170
146
|
}
|
|
171
147
|
|
|
172
148
|
model Approval {
|
|
@@ -256,7 +232,6 @@ model AssessmentLibrary {
|
|
|
256
232
|
evaluation_Plans EvaluationPlan[]
|
|
257
233
|
|
|
258
234
|
@@index([organisation_id])
|
|
259
|
-
@@index([created_at])
|
|
260
235
|
}
|
|
261
236
|
|
|
262
237
|
/**
|
|
@@ -295,7 +270,6 @@ model AssignmentLibrary {
|
|
|
295
270
|
evaluationPlan EvaluationPlan[]
|
|
296
271
|
|
|
297
272
|
@@index([job_description_id])
|
|
298
|
-
@@index([created_at])
|
|
299
273
|
}
|
|
300
274
|
|
|
301
275
|
enum JobType {
|
|
@@ -656,7 +630,6 @@ model Interview {
|
|
|
656
630
|
interviewNotes InterviewNotes[]
|
|
657
631
|
|
|
658
632
|
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
659
|
-
@@index([application_id])
|
|
660
633
|
@@index([candidate_id])
|
|
661
634
|
@@index([interviewer_id])
|
|
662
635
|
@@index([job_description_id])
|
|
@@ -692,8 +665,6 @@ model InterviewLibrary {
|
|
|
692
665
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
693
666
|
|
|
694
667
|
@@index([organisation_id])
|
|
695
|
-
@@index([category])
|
|
696
|
-
@@index([created_at])
|
|
697
668
|
}
|
|
698
669
|
|
|
699
670
|
model InterviewNotes {
|
|
@@ -774,7 +745,6 @@ model JobDescriptionData {
|
|
|
774
745
|
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
775
746
|
|
|
776
747
|
@@unique([job_description_id, key])
|
|
777
|
-
@@index([created_at])
|
|
778
748
|
}
|
|
779
749
|
|
|
780
750
|
model Message {
|
|
@@ -943,7 +913,6 @@ model OverallFeedback {
|
|
|
943
913
|
|
|
944
914
|
@@unique([interview_id, interviewer_id]) // 👈 updated uniqueness logic
|
|
945
915
|
@@index([interview_id])
|
|
946
|
-
@@index([interviewer_id])
|
|
947
916
|
}
|
|
948
917
|
|
|
949
918
|
model Panelist {
|
|
@@ -1073,6 +1042,7 @@ model Resume {
|
|
|
1073
1042
|
created_by String
|
|
1074
1043
|
updated_by String
|
|
1075
1044
|
is_active Boolean @default(true)
|
|
1045
|
+
name String?
|
|
1076
1046
|
user User? @relation(fields: [user_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
1077
1047
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
1078
1048
|
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
@@ -1141,7 +1111,6 @@ model Suggestion {
|
|
|
1141
1111
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
1142
1112
|
|
|
1143
1113
|
@@index([interview_id])
|
|
1144
|
-
@@index([transcript_id])
|
|
1145
1114
|
}
|
|
1146
1115
|
|
|
1147
1116
|
model Transcript {
|
|
@@ -1216,7 +1185,6 @@ model User {
|
|
|
1216
1185
|
candidateResponses CandidateQuestionResponse[]
|
|
1217
1186
|
questions Question[]
|
|
1218
1187
|
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
1219
|
-
candidate_activity_logs ActivityLog[] @relation("CandidateActivityLogs")
|
|
1220
1188
|
actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
|
|
1221
1189
|
actions Action[]
|
|
1222
1190
|
calendly Calendly?
|
|
@@ -1239,6 +1207,7 @@ model User {
|
|
|
1239
1207
|
ethnicity String?
|
|
1240
1208
|
veteran_status String?
|
|
1241
1209
|
disability_status String?
|
|
1210
|
+
activityLogs ActivityLog[]
|
|
1242
1211
|
|
|
1243
1212
|
@@index([role_id])
|
|
1244
1213
|
@@index([permission_id])
|
package/client/wasm.js
CHANGED
|
@@ -165,14 +165,15 @@ exports.Prisma.ActionScalarFieldEnum = {
|
|
|
165
165
|
|
|
166
166
|
exports.Prisma.ActivityLogScalarFieldEnum = {
|
|
167
167
|
id: 'id',
|
|
168
|
-
|
|
168
|
+
application_id: 'application_id',
|
|
169
169
|
actor_id: 'actor_id',
|
|
170
170
|
actor_type: 'actor_type',
|
|
171
|
-
action_type: 'action_type',
|
|
172
171
|
message: 'message',
|
|
173
172
|
timestamp: 'timestamp',
|
|
174
173
|
metadata: 'metadata',
|
|
175
|
-
created_at: 'created_at'
|
|
174
|
+
created_at: 'created_at',
|
|
175
|
+
is_active: 'is_active',
|
|
176
|
+
userId: 'userId'
|
|
176
177
|
};
|
|
177
178
|
|
|
178
179
|
exports.Prisma.ApplicationScalarFieldEnum = {
|
|
@@ -678,6 +679,7 @@ exports.Prisma.ResumeScalarFieldEnum = {
|
|
|
678
679
|
created_by: 'created_by',
|
|
679
680
|
updated_by: 'updated_by',
|
|
680
681
|
is_active: 'is_active',
|
|
682
|
+
name: 'name',
|
|
681
683
|
yearsOfExperience: 'yearsOfExperience'
|
|
682
684
|
};
|
|
683
685
|
|
|
@@ -821,18 +823,6 @@ exports.ActivityActorType = exports.$Enums.ActivityActorType = {
|
|
|
821
823
|
SYSTEM: 'SYSTEM'
|
|
822
824
|
};
|
|
823
825
|
|
|
824
|
-
exports.ActivityActionType = exports.$Enums.ActivityActionType = {
|
|
825
|
-
ROUND_COMPLETED: 'ROUND_COMPLETED',
|
|
826
|
-
STAGE_CHANGED: 'STAGE_CHANGED',
|
|
827
|
-
AI_ANALYSIS_REFRESHED: 'AI_ANALYSIS_REFRESHED',
|
|
828
|
-
FEEDBACK_ADDED: 'FEEDBACK_ADDED',
|
|
829
|
-
NOTE_ADDED: 'NOTE_ADDED',
|
|
830
|
-
INTERVIEW_SCHEDULED: 'INTERVIEW_SCHEDULED',
|
|
831
|
-
INTERVIEW_COMPLETED: 'INTERVIEW_COMPLETED',
|
|
832
|
-
STATUS_UPDATED: 'STATUS_UPDATED',
|
|
833
|
-
OTHER: 'OTHER'
|
|
834
|
-
};
|
|
835
|
-
|
|
836
826
|
exports.ApplicationStatus = exports.$Enums.ApplicationStatus = {
|
|
837
827
|
PENDING: 'PENDING',
|
|
838
828
|
IN_PROGRESS: 'IN_PROGRESS',
|
package/package.json
CHANGED
|
@@ -4,43 +4,21 @@ enum ActivityActorType {
|
|
|
4
4
|
SYSTEM
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
enum ActivityActionType {
|
|
8
|
-
ROUND_COMPLETED
|
|
9
|
-
STAGE_CHANGED
|
|
10
|
-
AI_ANALYSIS_REFRESHED
|
|
11
|
-
FEEDBACK_ADDED
|
|
12
|
-
NOTE_ADDED
|
|
13
|
-
INTERVIEW_SCHEDULED
|
|
14
|
-
INTERVIEW_COMPLETED
|
|
15
|
-
STATUS_UPDATED
|
|
16
|
-
OTHER
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
enum ActivitySource {
|
|
20
|
-
SYSTEM_TRIGGER
|
|
21
|
-
MANUAL_ACTION
|
|
22
|
-
API
|
|
23
|
-
SCHEDULER
|
|
24
|
-
WEBHOOK
|
|
25
|
-
}
|
|
26
|
-
|
|
27
7
|
model ActivityLog {
|
|
28
|
-
id
|
|
29
|
-
|
|
30
|
-
actor_id
|
|
31
|
-
actor_type
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
8
|
+
id String @id @default(uuid())
|
|
9
|
+
application_id String
|
|
10
|
+
actor_id String?
|
|
11
|
+
actor_type ActivityActorType @default(USER)
|
|
12
|
+
message String
|
|
13
|
+
timestamp DateTime @default(now())
|
|
14
|
+
metadata Json?
|
|
15
|
+
created_at DateTime @default(now())
|
|
16
|
+
is_active Boolean @default(true)
|
|
38
17
|
// Relations
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
19
|
+
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
20
|
+
user User? @relation(fields: [userId], references: [id])
|
|
21
|
+
userId String?
|
|
41
22
|
|
|
42
|
-
@@index([
|
|
43
|
-
@@index([timestamp])
|
|
44
|
-
@@index([candidate_id, timestamp])
|
|
45
|
-
@@index([action_type])
|
|
23
|
+
@@index([application_id])
|
|
46
24
|
}
|
|
@@ -7,20 +7,19 @@ enum ApplicationStatus {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
model Application {
|
|
10
|
-
id
|
|
11
|
-
candidate_id
|
|
12
|
-
resume_id
|
|
13
|
-
organisation_id
|
|
14
|
-
job_description_id
|
|
15
|
-
status
|
|
16
|
-
fit_check_score
|
|
17
|
-
fit_check_status
|
|
18
|
-
applied_at
|
|
19
|
-
evaluation_plan_id
|
|
20
|
-
evaluation_plan
|
|
21
|
-
fit_check_id
|
|
22
|
-
round_no
|
|
23
|
-
|
|
10
|
+
id String @id @default(uuid())
|
|
11
|
+
candidate_id String
|
|
12
|
+
resume_id String
|
|
13
|
+
organisation_id String
|
|
14
|
+
job_description_id String
|
|
15
|
+
status ApplicationStatus @default(PENDING)
|
|
16
|
+
fit_check_score Float?
|
|
17
|
+
fit_check_status FitCheckStatus?
|
|
18
|
+
applied_at DateTime @default(now())
|
|
19
|
+
evaluation_plan_id String?
|
|
20
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
|
|
21
|
+
fit_check_id String? @unique
|
|
22
|
+
round_no Int @default(0)
|
|
24
23
|
// Relations
|
|
25
24
|
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
26
25
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
@@ -29,16 +28,15 @@ model Application {
|
|
|
29
28
|
fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
30
29
|
interviews Interview[]
|
|
31
30
|
ongoing_evaluations OngoingEvaluation[]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
activity_logs ActivityLog[]
|
|
32
|
+
// Audit fields
|
|
33
|
+
created_at DateTime @default(now())
|
|
34
|
+
updated_at DateTime @updatedAt
|
|
35
|
+
created_by String
|
|
36
|
+
updated_by String
|
|
37
|
+
is_active Boolean @default(true)
|
|
38
38
|
|
|
39
39
|
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
40
40
|
@@index([candidate_id])
|
|
41
41
|
@@index([job_description_id])
|
|
42
|
-
@@index([organisation_id])
|
|
43
|
-
@@index([resume_id])
|
|
44
42
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
1
|
model AssignmentLibrary {
|
|
3
|
-
id
|
|
4
|
-
deadline
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
deadline Int
|
|
5
4
|
/// Flexible JSON for assignment-specific config (rubrics, instructions, criteria, etc.)
|
|
6
|
-
assignment
|
|
7
|
-
job_description_id
|
|
8
|
-
organisation_id
|
|
9
|
-
created_at
|
|
10
|
-
updated_at
|
|
11
|
-
created_by
|
|
12
|
-
updated_by
|
|
13
|
-
is_active
|
|
14
|
-
organisation
|
|
15
|
-
jobDescription
|
|
5
|
+
assignment Json?
|
|
6
|
+
job_description_id String
|
|
7
|
+
organisation_id String
|
|
8
|
+
created_at DateTime @default(now())
|
|
9
|
+
updated_at DateTime @updatedAt
|
|
10
|
+
created_by String
|
|
11
|
+
updated_by String
|
|
12
|
+
is_active Boolean @default(true)
|
|
13
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
14
|
+
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
16
15
|
/// Back-relation: one-to-one from EvaluationPlan (FK lives on EvaluationPlan.assignment_library_id)
|
|
17
|
-
evaluationPlan
|
|
16
|
+
evaluationPlan EvaluationPlan[]
|
|
17
|
+
|
|
18
18
|
@@index([job_description_id])
|
|
19
|
-
@@index([created_at])
|
|
20
19
|
}
|
|
@@ -43,29 +43,29 @@ model User {
|
|
|
43
43
|
candidateResponses CandidateQuestionResponse[]
|
|
44
44
|
questions Question[]
|
|
45
45
|
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
46
|
-
candidate_activity_logs ActivityLog[] @relation("CandidateActivityLogs")
|
|
47
46
|
actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
|
|
48
47
|
actions Action[]
|
|
49
48
|
calendly Calendly?
|
|
50
49
|
google Google?
|
|
51
50
|
fitChecks FitCheck[]
|
|
52
51
|
|
|
53
|
-
name
|
|
54
|
-
phone
|
|
55
|
-
description
|
|
56
|
-
date_of_birth
|
|
57
|
-
designation
|
|
58
|
-
location
|
|
59
|
-
salary
|
|
60
|
-
work_experience
|
|
61
|
-
education
|
|
62
|
-
skills
|
|
63
|
-
notice_period
|
|
52
|
+
name String?
|
|
53
|
+
phone String?
|
|
54
|
+
description String?
|
|
55
|
+
date_of_birth DateTime?
|
|
56
|
+
designation String?
|
|
57
|
+
location String?
|
|
58
|
+
salary String?
|
|
59
|
+
work_experience Json?
|
|
60
|
+
education Json?
|
|
61
|
+
skills Json?
|
|
62
|
+
notice_period String?
|
|
64
63
|
preferred_work_mode String?
|
|
65
|
-
gender
|
|
66
|
-
ethnicity
|
|
67
|
-
veteran_status
|
|
68
|
-
disability_status
|
|
64
|
+
gender String?
|
|
65
|
+
ethnicity String?
|
|
66
|
+
veteran_status String?
|
|
67
|
+
disability_status String?
|
|
68
|
+
activityLogs ActivityLog[]
|
|
69
69
|
|
|
70
70
|
@@index([role_id])
|
|
71
71
|
@@index([permission_id])
|