@adaptware/eagles-db 0.1.37 → 0.1.38
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 +6 -25
- package/client/index-browser.js +3 -14
- package/client/index.d.ts +126 -140
- package/client/index.js +6 -25
- package/client/package.json +1 -1
- package/client/schema.prisma +27 -61
- package/client/wasm.js +3 -14
- package/package.json +1 -1
- package/prisma/schema/activityLog.prisma +7 -31
- package/prisma/schema/applications.prisma +19 -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/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -83,45 +83,21 @@ 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 String
|
|
87
|
+
id String @id @default(uuid())
|
|
108
88
|
candidate_id String
|
|
109
89
|
actor_id String?
|
|
110
|
-
actor_type ActivityActorType
|
|
111
|
-
action_type ActivityActionType
|
|
90
|
+
actor_type ActivityActorType @default(USER)
|
|
112
91
|
message String
|
|
113
|
-
timestamp DateTime
|
|
92
|
+
timestamp DateTime @default(now())
|
|
114
93
|
metadata Json?
|
|
115
|
-
created_at DateTime
|
|
116
|
-
|
|
94
|
+
created_at DateTime @default(now())
|
|
95
|
+
is_active Boolean @default(true)
|
|
117
96
|
// Relations
|
|
118
|
-
candidate
|
|
119
|
-
actor
|
|
97
|
+
candidate User @relation("CandidateActivityLogs", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
98
|
+
actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
120
99
|
|
|
121
100
|
@@index([candidate_id])
|
|
122
|
-
@@index([timestamp])
|
|
123
|
-
@@index([candidate_id, timestamp])
|
|
124
|
-
@@index([action_type])
|
|
125
101
|
}
|
|
126
102
|
|
|
127
103
|
// PENDING could be understood as unscreened
|
|
@@ -133,20 +109,19 @@ enum ApplicationStatus {
|
|
|
133
109
|
}
|
|
134
110
|
|
|
135
111
|
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
|
-
|
|
112
|
+
id String @id @default(uuid())
|
|
113
|
+
candidate_id String
|
|
114
|
+
resume_id String
|
|
115
|
+
organisation_id String
|
|
116
|
+
job_description_id String
|
|
117
|
+
status ApplicationStatus @default(PENDING)
|
|
118
|
+
fit_check_score Float?
|
|
119
|
+
fit_check_status FitCheckStatus?
|
|
120
|
+
applied_at DateTime @default(now())
|
|
121
|
+
evaluation_plan_id String?
|
|
122
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
|
|
123
|
+
fit_check_id String? @unique
|
|
124
|
+
round_no Int @default(0)
|
|
150
125
|
// Relations
|
|
151
126
|
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
152
127
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
@@ -155,18 +130,16 @@ model Application {
|
|
|
155
130
|
fit_check FitCheck? @relation(fields: [fit_check_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
156
131
|
interviews Interview[]
|
|
157
132
|
ongoing_evaluations OngoingEvaluation[]
|
|
158
|
-
|
|
159
|
-
created_at
|
|
160
|
-
updated_at
|
|
161
|
-
created_by
|
|
162
|
-
updated_by
|
|
163
|
-
is_active
|
|
133
|
+
// Audit fields
|
|
134
|
+
created_at DateTime @default(now())
|
|
135
|
+
updated_at DateTime @updatedAt
|
|
136
|
+
created_by String
|
|
137
|
+
updated_by String
|
|
138
|
+
is_active Boolean @default(true)
|
|
164
139
|
|
|
165
140
|
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
166
141
|
@@index([candidate_id])
|
|
167
142
|
@@index([job_description_id])
|
|
168
|
-
@@index([organisation_id])
|
|
169
|
-
@@index([resume_id])
|
|
170
143
|
}
|
|
171
144
|
|
|
172
145
|
model Approval {
|
|
@@ -256,7 +229,6 @@ model AssessmentLibrary {
|
|
|
256
229
|
evaluation_Plans EvaluationPlan[]
|
|
257
230
|
|
|
258
231
|
@@index([organisation_id])
|
|
259
|
-
@@index([created_at])
|
|
260
232
|
}
|
|
261
233
|
|
|
262
234
|
/**
|
|
@@ -295,7 +267,6 @@ model AssignmentLibrary {
|
|
|
295
267
|
evaluationPlan EvaluationPlan[]
|
|
296
268
|
|
|
297
269
|
@@index([job_description_id])
|
|
298
|
-
@@index([created_at])
|
|
299
270
|
}
|
|
300
271
|
|
|
301
272
|
enum JobType {
|
|
@@ -656,7 +627,6 @@ model Interview {
|
|
|
656
627
|
interviewNotes InterviewNotes[]
|
|
657
628
|
|
|
658
629
|
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
659
|
-
@@index([application_id])
|
|
660
630
|
@@index([candidate_id])
|
|
661
631
|
@@index([interviewer_id])
|
|
662
632
|
@@index([job_description_id])
|
|
@@ -692,8 +662,6 @@ model InterviewLibrary {
|
|
|
692
662
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
693
663
|
|
|
694
664
|
@@index([organisation_id])
|
|
695
|
-
@@index([category])
|
|
696
|
-
@@index([created_at])
|
|
697
665
|
}
|
|
698
666
|
|
|
699
667
|
model InterviewNotes {
|
|
@@ -774,7 +742,6 @@ model JobDescriptionData {
|
|
|
774
742
|
jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
775
743
|
|
|
776
744
|
@@unique([job_description_id, key])
|
|
777
|
-
@@index([created_at])
|
|
778
745
|
}
|
|
779
746
|
|
|
780
747
|
model Message {
|
|
@@ -943,7 +910,6 @@ model OverallFeedback {
|
|
|
943
910
|
|
|
944
911
|
@@unique([interview_id, interviewer_id]) // 👈 updated uniqueness logic
|
|
945
912
|
@@index([interview_id])
|
|
946
|
-
@@index([interviewer_id])
|
|
947
913
|
}
|
|
948
914
|
|
|
949
915
|
model Panelist {
|
|
@@ -1073,6 +1039,7 @@ model Resume {
|
|
|
1073
1039
|
created_by String
|
|
1074
1040
|
updated_by String
|
|
1075
1041
|
is_active Boolean @default(true)
|
|
1042
|
+
name String?
|
|
1076
1043
|
user User? @relation(fields: [user_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
1077
1044
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
1078
1045
|
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
@@ -1141,7 +1108,6 @@ model Suggestion {
|
|
|
1141
1108
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
1142
1109
|
|
|
1143
1110
|
@@index([interview_id])
|
|
1144
|
-
@@index([transcript_id])
|
|
1145
1111
|
}
|
|
1146
1112
|
|
|
1147
1113
|
model Transcript {
|
package/client/wasm.js
CHANGED
|
@@ -168,11 +168,11 @@ exports.Prisma.ActivityLogScalarFieldEnum = {
|
|
|
168
168
|
candidate_id: 'candidate_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
176
|
};
|
|
177
177
|
|
|
178
178
|
exports.Prisma.ApplicationScalarFieldEnum = {
|
|
@@ -678,6 +678,7 @@ exports.Prisma.ResumeScalarFieldEnum = {
|
|
|
678
678
|
created_by: 'created_by',
|
|
679
679
|
updated_by: 'updated_by',
|
|
680
680
|
is_active: 'is_active',
|
|
681
|
+
name: 'name',
|
|
681
682
|
yearsOfExperience: 'yearsOfExperience'
|
|
682
683
|
};
|
|
683
684
|
|
|
@@ -821,18 +822,6 @@ exports.ActivityActorType = exports.$Enums.ActivityActorType = {
|
|
|
821
822
|
SYSTEM: 'SYSTEM'
|
|
822
823
|
};
|
|
823
824
|
|
|
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
825
|
exports.ApplicationStatus = exports.$Enums.ApplicationStatus = {
|
|
837
826
|
PENDING: 'PENDING',
|
|
838
827
|
IN_PROGRESS: 'IN_PROGRESS',
|
package/package.json
CHANGED
|
@@ -4,43 +4,19 @@ 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 String
|
|
8
|
+
id String @id @default(uuid())
|
|
29
9
|
candidate_id String
|
|
30
10
|
actor_id String?
|
|
31
|
-
actor_type ActivityActorType
|
|
32
|
-
action_type ActivityActionType
|
|
11
|
+
actor_type ActivityActorType @default(USER)
|
|
33
12
|
message String
|
|
34
|
-
timestamp DateTime
|
|
13
|
+
timestamp DateTime @default(now())
|
|
35
14
|
metadata Json?
|
|
36
|
-
created_at DateTime
|
|
37
|
-
|
|
15
|
+
created_at DateTime @default(now())
|
|
16
|
+
is_active Boolean @default(true)
|
|
38
17
|
// Relations
|
|
39
|
-
candidate
|
|
40
|
-
actor
|
|
18
|
+
candidate User @relation("CandidateActivityLogs", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
19
|
+
actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
41
20
|
|
|
42
21
|
@@index([candidate_id])
|
|
43
|
-
@@index([timestamp])
|
|
44
|
-
@@index([candidate_id, timestamp])
|
|
45
|
-
@@index([action_type])
|
|
46
22
|
}
|
|
@@ -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,14 @@ 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
|
-
created_at
|
|
34
|
-
updated_at
|
|
35
|
-
created_by
|
|
36
|
-
updated_by
|
|
37
|
-
is_active
|
|
31
|
+
// Audit fields
|
|
32
|
+
created_at DateTime @default(now())
|
|
33
|
+
updated_at DateTime @updatedAt
|
|
34
|
+
created_by String
|
|
35
|
+
updated_by String
|
|
36
|
+
is_active Boolean @default(true)
|
|
38
37
|
|
|
39
38
|
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
40
39
|
@@index([candidate_id])
|
|
41
40
|
@@index([job_description_id])
|
|
42
|
-
@@index([organisation_id])
|
|
43
|
-
@@index([resume_id])
|
|
44
41
|
}
|
|
@@ -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
|
}
|