@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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-9cd12895fc83544f1eb274541a2d65d3cdbd6e8f5f8d8a6f54ce5de255b139bc",
2
+ "name": "prisma-client-5ac043c7414ca642bbc8e7b02ef3040a50e4dc0f37a86e5bea0ddb8963dd11da",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -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 @id @default(uuid())
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 @default(now())
92
+ timestamp DateTime @default(now())
114
93
  metadata Json?
115
- created_at DateTime @default(now())
116
-
94
+ created_at DateTime @default(now())
95
+ is_active Boolean @default(true)
117
96
  // Relations
118
- candidate User @relation("CandidateActivityLogs", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
119
- actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
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 String @id @default(uuid())
137
- candidate_id String
138
- resume_id String
139
- organisation_id String
140
- job_description_id String
141
- status ApplicationStatus @default(PENDING)
142
- fit_check_score Float?
143
- fit_check_status FitCheckStatus?
144
- applied_at DateTime @default(now())
145
- evaluation_plan_id String?
146
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
147
- fit_check_id String? @unique
148
- round_no Int @default(0)
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 DateTime @default(now())
160
- updated_at DateTime @updatedAt
161
- created_by String
162
- updated_by String
163
- is_active Boolean @default(true)
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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 @id @default(uuid())
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 @default(now())
13
+ timestamp DateTime @default(now())
35
14
  metadata Json?
36
- created_at DateTime @default(now())
37
-
15
+ created_at DateTime @default(now())
16
+ is_active Boolean @default(true)
38
17
  // Relations
39
- candidate User @relation("CandidateActivityLogs", fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
40
- actor User? @relation("ActorActivityLogs", fields: [actor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
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 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)
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 DateTime @default(now())
34
- updated_at DateTime @updatedAt
35
- created_by String
36
- updated_by String
37
- is_active Boolean @default(true)
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
  }
@@ -29,5 +29,4 @@ model AssessmentLibrary {
29
29
  evaluation_Plans EvaluationPlan[]
30
30
 
31
31
  @@index([organisation_id])
32
- @@index([created_at])
33
32
  }
@@ -1,20 +1,19 @@
1
-
2
1
  model AssignmentLibrary {
3
- id String @id @default(uuid())
4
- deadline Int
2
+ id String @id @default(uuid())
3
+ deadline Int
5
4
  /// Flexible JSON for assignment-specific config (rubrics, instructions, criteria, etc.)
6
- assignment Json?
7
- job_description_id String
8
- organisation_id String
9
- created_at DateTime @default(now())
10
- updated_at DateTime @updatedAt
11
- created_by String
12
- updated_by String
13
- is_active Boolean @default(true)
14
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
15
- jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
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 EvaluationPlan[]
16
+ evaluationPlan EvaluationPlan[]
17
+
18
18
  @@index([job_description_id])
19
- @@index([created_at])
20
19
  }
@@ -58,7 +58,6 @@ model Interview {
58
58
  interviewNotes InterviewNotes[]
59
59
 
60
60
  @@unique([interviewer_id, candidate_id, evaluation_plan_id])
61
- @@index([application_id])
62
61
  @@index([candidate_id])
63
62
  @@index([interviewer_id])
64
63
  @@index([job_description_id])
@@ -28,6 +28,4 @@ model InterviewLibrary {
28
28
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
29
29
 
30
30
  @@index([organisation_id])
31
- @@index([category])
32
- @@index([created_at])
33
31
  }
@@ -12,5 +12,4 @@ model JobDescriptionData {
12
12
  jobDescription JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
13
13
 
14
14
  @@unique([job_description_id, key])
15
- @@index([created_at])
16
15
  }
@@ -31,5 +31,4 @@ model OverallFeedback {
31
31
 
32
32
  @@unique([interview_id, interviewer_id]) // 👈 updated uniqueness logic
33
33
  @@index([interview_id])
34
- @@index([interviewer_id])
35
34
  }
@@ -17,5 +17,4 @@ model Suggestion {
17
17
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
18
18
 
19
19
  @@index([interview_id])
20
- @@index([transcript_id])
21
20
  }