@adaptware/eagles-db 0.4.23 → 0.4.25
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/README.md +15 -15
- package/bin/db-cli.js +91 -91
- package/client/edge.js +9 -15
- package/client/index-browser.js +1 -8
- package/client/index.d.ts +565 -234
- package/client/index.js +15 -21
- package/client/{query_engine-windows.dll.node → libquery_engine-darwin-arm64.dylib.node} +0 -0
- package/client/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/client/package.json +1 -1
- package/client/schema.prisma +15 -22
- package/client/wasm.js +9 -15
- package/package.json +58 -58
- package/prisma/schema/CandidateQuestionResponse.prisma +24 -24
- package/prisma/schema/UserRole.prisma +20 -20
- package/prisma/schema/action.prisma +35 -35
- package/prisma/schema/activityLog.prisma +22 -22
- package/prisma/schema/applications.prisma +56 -57
- package/prisma/schema/approval.prisma +14 -14
- package/prisma/schema/assessment.prisma +39 -39
- package/prisma/schema/assessmentLibrary.prisma +21 -21
- package/prisma/schema/assessmentQuestion.prisma +17 -17
- package/prisma/schema/assignment.prisma +48 -48
- package/prisma/schema/assignmentLibrary.prisma +20 -20
- package/prisma/schema/authModule.prisma +36 -36
- package/prisma/schema/budget.prisma +38 -38
- package/prisma/schema/calendly.prisma +18 -18
- package/prisma/schema/candidateProfile.prisma +26 -26
- package/prisma/schema/communication.prisma +156 -156
- package/prisma/schema/contactUs.prisma +12 -12
- package/prisma/schema/document.prisma +38 -37
- package/prisma/schema/evaluationPlan.prisma +74 -83
- package/prisma/schema/feedback.prisma +18 -18
- package/prisma/schema/fitCheck.prisma +58 -58
- package/prisma/schema/google.prisma +16 -16
- package/prisma/schema/integration.prisma +98 -98
- package/prisma/schema/interview.prisma +112 -112
- package/prisma/schema/interviewNotes.prisma +17 -17
- package/prisma/schema/jobApplicationFields.prisma +37 -37
- package/prisma/schema/jobApplicationResponse.prisma +33 -33
- package/prisma/schema/jobApplicationTemplate.prisma +30 -30
- package/prisma/schema/jobDescription.prisma +59 -57
- package/prisma/schema/jobDescriptionData.prisma +15 -15
- package/prisma/schema/jobProfile.prisma +56 -56
- package/prisma/schema/liveAnalysis.prisma +17 -17
- package/prisma/schema/message.prisma +15 -15
- package/prisma/schema/migrations/20260415120000_remove_job_profile_current_phase/migration.sql +2 -2
- package/prisma/schema/migrations/20260422120000_add_integration_provider_zoom/migration.sql +2 -2
- package/prisma/schema/migrations/20260422140000_add_zoom_meeting_tables/migration.sql +57 -57
- package/prisma/schema/migrations/20260422180000_add_zoom_webhook_event/migration.sql +18 -18
- package/prisma/schema/migrations/20260423140000_add_interview_platform/migration.sql +6 -6
- package/prisma/schema/migrations/20260423150000_remove_interview_zoom_topic/migration.sql +2 -2
- package/prisma/schema/migrations/20260423160000_zoom_meeting_uuid/migration.sql +4 -4
- package/prisma/schema/migrations/20260423170000_zoom_meeting_uuid_prisma_sync/migration.sql +2 -2
- package/prisma/schema/migrations/20260424120000_auth_module_user_provider_unique/migration.sql +5 -5
- package/prisma/schema/migrations/20260424130000_zoom_meeting_zoom_host_user_id/migration.sql +6 -6
- package/prisma/schema/migrations/20260425100000_zoom_participant_user_enum/migration.sql +22 -22
- package/prisma/schema/migrations/20260425110000_zoom_participant_zoom_id_required/migration.sql +13 -13
- package/prisma/schema/migrations/20260425120000_zoom_participant_id_nullable/migration.sql +4 -4
- package/prisma/schema/migrations/20260429140000_drop_evaluation_plan_job_order_unique/migration.sql +5 -5
- package/prisma/schema/migrations/20260429180000_eval_plan_timeline_optional_ongoing_duration/migration.sql +15 -15
- package/prisma/schema/migrations/20260430120000_drop_assessment_library_metadata_fields/migration.sql +8 -8
- package/prisma/schema/migrations/20260430140000_drop_question_question_type/migration.sql +5 -5
- package/prisma/schema/migrations/20260513120000_add_organisation_config/migration.sql +56 -56
- package/prisma/schema/migrations/20260514120000_dedupe_organisation_config/migration.sql +20 -20
- package/prisma/schema/migrations/20260515120000_add_interview_ai_assistance_mode/migration.sql +5 -5
- package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +25 -0
- package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +24 -0
- package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +2 -0
- package/prisma/schema/migrations/migration_lock.toml +3 -3
- package/prisma/schema/notes.prisma +19 -19
- package/prisma/schema/ongoingEvaluation.prisma +72 -72
- package/prisma/schema/organisation.prisma +57 -57
- package/prisma/schema/organisationConfig.prisma +12 -12
- package/prisma/schema/permission.prisma +13 -13
- package/prisma/schema/promise.prisma +39 -39
- package/prisma/schema/questions.prisma +28 -28
- package/prisma/schema/refreshToken.prisma +10 -10
- package/prisma/schema/resume.prisma +34 -34
- package/prisma/schema/resumeData.prisma +15 -15
- package/prisma/schema/schema.prisma +16 -16
- package/prisma/schema/suggestion.prisma +20 -20
- package/prisma/schema/transcript.prisma +25 -25
- package/prisma/schema/user.prisma +93 -93
- package/prisma/schema/userProfile.prisma +15 -15
- package/prisma/schema/zoomMeeting.prisma +79 -79
- package/prisma/schema/migrations/20260626120000_add_evaluation_plan_share_scope/migration.sql +0 -14
- package/prisma/schema/migrations/20260626140000_add_evaluation_comment/migration.sql +0 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
model Suggestion {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
interview_id String?
|
|
4
|
-
transcript_id String? @unique // ✅ ensures one-to-one
|
|
5
|
-
organisation_id String
|
|
6
|
-
suggestion String?
|
|
7
|
-
question 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
|
-
|
|
14
|
-
// Relations
|
|
15
|
-
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull)
|
|
16
|
-
transcripts Transcript[]
|
|
17
|
-
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
18
|
-
|
|
19
|
-
@@index([interview_id])
|
|
20
|
-
}
|
|
1
|
+
model Suggestion {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
interview_id String?
|
|
4
|
+
transcript_id String? @unique // ✅ ensures one-to-one
|
|
5
|
+
organisation_id String
|
|
6
|
+
suggestion String?
|
|
7
|
+
question 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
|
+
|
|
14
|
+
// Relations
|
|
15
|
+
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull)
|
|
16
|
+
transcripts Transcript[]
|
|
17
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
18
|
+
|
|
19
|
+
@@index([interview_id])
|
|
20
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
model Transcript {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
interview_id String?
|
|
4
|
-
suggestion_id String?
|
|
5
|
-
intermediate_feedback_id String?
|
|
6
|
-
job_description_id String?
|
|
7
|
-
interviewer_timestamp DateTime?
|
|
8
|
-
candidate_timestamp DateTime?
|
|
9
|
-
interviewer String
|
|
10
|
-
candidate String
|
|
11
|
-
order_no Int @default(autoincrement())
|
|
12
|
-
created_at DateTime @default(now())
|
|
13
|
-
updated_at DateTime @updatedAt
|
|
14
|
-
created_by String
|
|
15
|
-
updated_by String
|
|
16
|
-
is_active Boolean @default(true)
|
|
17
|
-
// Relations
|
|
18
|
-
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
|
|
19
|
-
suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
|
|
20
|
-
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
21
|
-
|
|
22
|
-
@@unique([interview_id, order_no])
|
|
23
|
-
@@index([interview_id])
|
|
24
|
-
@@index([job_description_id])
|
|
25
|
-
}
|
|
1
|
+
model Transcript {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
interview_id String?
|
|
4
|
+
suggestion_id String?
|
|
5
|
+
intermediate_feedback_id String?
|
|
6
|
+
job_description_id String?
|
|
7
|
+
interviewer_timestamp DateTime?
|
|
8
|
+
candidate_timestamp DateTime?
|
|
9
|
+
interviewer String
|
|
10
|
+
candidate String
|
|
11
|
+
order_no Int @default(autoincrement())
|
|
12
|
+
created_at DateTime @default(now())
|
|
13
|
+
updated_at DateTime @updatedAt
|
|
14
|
+
created_by String
|
|
15
|
+
updated_by String
|
|
16
|
+
is_active Boolean @default(true)
|
|
17
|
+
// Relations
|
|
18
|
+
interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: SetNull)
|
|
19
|
+
suggestion Suggestion? @relation(fields: [suggestion_id], references: [id], onDelete: SetNull)
|
|
20
|
+
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
21
|
+
|
|
22
|
+
@@unique([interview_id, order_no])
|
|
23
|
+
@@index([interview_id])
|
|
24
|
+
@@index([job_description_id])
|
|
25
|
+
}
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
enum FirstLoginStatus {
|
|
2
|
-
PENDING
|
|
3
|
-
COMPLETED
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
enum UserInvitationStatus {
|
|
7
|
-
INVITED
|
|
8
|
-
ACCEPTED
|
|
9
|
-
EXPIRED
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
model User {
|
|
13
|
-
id String @id @default(uuid())
|
|
14
|
-
email String @unique
|
|
15
|
-
password String
|
|
16
|
-
role_id String
|
|
17
|
-
role UserRole @relation(fields: [role_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
18
|
-
organisation_id String?
|
|
19
|
-
// Back-relations are defined from Resume side via user_id
|
|
20
|
-
google_id String? @unique
|
|
21
|
-
refresh_token String?
|
|
22
|
-
created_at DateTime @default(now())
|
|
23
|
-
updated_at DateTime @updatedAt
|
|
24
|
-
created_by String
|
|
25
|
-
updated_by String
|
|
26
|
-
is_active Boolean @default(true)
|
|
27
|
-
is_self_registered Boolean @default(true)
|
|
28
|
-
permission_id String? @unique
|
|
29
|
-
preferences Json? @default("{}")
|
|
30
|
-
invitation_status UserInvitationStatus @default(INVITED)
|
|
31
|
-
invited_at DateTime? @default(now())
|
|
32
|
-
invitation_expires_at DateTime?
|
|
33
|
-
invitation_accepted_at DateTime?
|
|
34
|
-
permission Permission? @relation(fields: [permission_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
35
|
-
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
36
|
-
applications Application[]
|
|
37
|
-
resume Resume[]
|
|
38
|
-
candidate_profile CandidateProfile?
|
|
39
|
-
user_profile UserProfile?
|
|
40
|
-
job_description JobDescription[]
|
|
41
|
-
hiring_manager_job_descriptions JobDescription[] @relation("HiringManager")
|
|
42
|
-
hiring_manager_job_profiles JobProfile[] @relation("JobProfileHiringManager")
|
|
43
|
-
approvals Approval[]
|
|
44
|
-
sent_messages Message[] @relation("Sent Messages")
|
|
45
|
-
received_messages Message[] @relation("Received Messages")
|
|
46
|
-
profile_created Boolean
|
|
47
|
-
first_login_status FirstLoginStatus @default(PENDING)
|
|
48
|
-
// Back-relations for interviews (optional but recommended for clarity)
|
|
49
|
-
candidate_interviews Interview[] @relation("CandidateInterviews")
|
|
50
|
-
interviewer_interviews Interview[] @relation("InterviewerInterviews")
|
|
51
|
-
assessment_results Assessment[]
|
|
52
|
-
candidate_assessments Assessment[] @relation("CandidateAssessments")
|
|
53
|
-
reviewer_assessments Assessment[] @relation("ReviewerAssessments")
|
|
54
|
-
candidate_assignments Assignment[] @relation("CandidateAssignments")
|
|
55
|
-
reviewer_assignments Assignment[] @relation("AssignmentReviewer")
|
|
56
|
-
candidateResponses CandidateQuestionResponse[]
|
|
57
|
-
questions Question[]
|
|
58
|
-
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
59
|
-
actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
|
|
60
|
-
actions Action[]
|
|
61
|
-
calendly Calendly?
|
|
62
|
-
google Google?
|
|
63
|
-
fitChecks FitCheck[]
|
|
64
|
-
created_job_profiles JobProfile[] @relation("ProfileCreator")
|
|
65
|
-
assigned_job_profiles JobProfile[] @relation("ProfileAssignee")
|
|
66
|
-
user_auth_modules AuthModule[] @relation("UserAuthModule")
|
|
67
|
-
refresh_token_auth RefreshToken[] @relation("TokenRefresh")
|
|
68
|
-
zoom_meeting_participants ZoomMeetingParticipant[]
|
|
69
|
-
notes Notes[]
|
|
70
|
-
|
|
71
|
-
name String?
|
|
72
|
-
phone String?
|
|
73
|
-
description String?
|
|
74
|
-
date_of_birth DateTime?
|
|
75
|
-
designation String?
|
|
76
|
-
location String?
|
|
77
|
-
salary String?
|
|
78
|
-
work_experience Json?
|
|
79
|
-
education Json?
|
|
80
|
-
skills Json?
|
|
81
|
-
notice_period String?
|
|
82
|
-
preferred_work_mode String?
|
|
83
|
-
gender String?
|
|
84
|
-
ethnicity String?
|
|
85
|
-
veteran_status String?
|
|
86
|
-
disability_status String?
|
|
87
|
-
professional_expertise String?
|
|
88
|
-
documents Document[]
|
|
89
|
-
|
|
90
|
-
@@index([role_id])
|
|
91
|
-
@@index([permission_id])
|
|
92
|
-
@@index([organisation_id])
|
|
93
|
-
}
|
|
1
|
+
enum FirstLoginStatus {
|
|
2
|
+
PENDING
|
|
3
|
+
COMPLETED
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
enum UserInvitationStatus {
|
|
7
|
+
INVITED
|
|
8
|
+
ACCEPTED
|
|
9
|
+
EXPIRED
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
model User {
|
|
13
|
+
id String @id @default(uuid())
|
|
14
|
+
email String @unique
|
|
15
|
+
password String
|
|
16
|
+
role_id String
|
|
17
|
+
role UserRole @relation(fields: [role_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
18
|
+
organisation_id String?
|
|
19
|
+
// Back-relations are defined from Resume side via user_id
|
|
20
|
+
google_id String? @unique
|
|
21
|
+
refresh_token String?
|
|
22
|
+
created_at DateTime @default(now())
|
|
23
|
+
updated_at DateTime @updatedAt
|
|
24
|
+
created_by String
|
|
25
|
+
updated_by String
|
|
26
|
+
is_active Boolean @default(true)
|
|
27
|
+
is_self_registered Boolean @default(true)
|
|
28
|
+
permission_id String? @unique
|
|
29
|
+
preferences Json? @default("{}")
|
|
30
|
+
invitation_status UserInvitationStatus @default(INVITED)
|
|
31
|
+
invited_at DateTime? @default(now())
|
|
32
|
+
invitation_expires_at DateTime?
|
|
33
|
+
invitation_accepted_at DateTime?
|
|
34
|
+
permission Permission? @relation(fields: [permission_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
35
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
36
|
+
applications Application[]
|
|
37
|
+
resume Resume[]
|
|
38
|
+
candidate_profile CandidateProfile?
|
|
39
|
+
user_profile UserProfile?
|
|
40
|
+
job_description JobDescription[]
|
|
41
|
+
hiring_manager_job_descriptions JobDescription[] @relation("HiringManager")
|
|
42
|
+
hiring_manager_job_profiles JobProfile[] @relation("JobProfileHiringManager")
|
|
43
|
+
approvals Approval[]
|
|
44
|
+
sent_messages Message[] @relation("Sent Messages")
|
|
45
|
+
received_messages Message[] @relation("Received Messages")
|
|
46
|
+
profile_created Boolean
|
|
47
|
+
first_login_status FirstLoginStatus @default(PENDING)
|
|
48
|
+
// Back-relations for interviews (optional but recommended for clarity)
|
|
49
|
+
candidate_interviews Interview[] @relation("CandidateInterviews")
|
|
50
|
+
interviewer_interviews Interview[] @relation("InterviewerInterviews")
|
|
51
|
+
assessment_results Assessment[]
|
|
52
|
+
candidate_assessments Assessment[] @relation("CandidateAssessments")
|
|
53
|
+
reviewer_assessments Assessment[] @relation("ReviewerAssessments")
|
|
54
|
+
candidate_assignments Assignment[] @relation("CandidateAssignments")
|
|
55
|
+
reviewer_assignments Assignment[] @relation("AssignmentReviewer")
|
|
56
|
+
candidateResponses CandidateQuestionResponse[]
|
|
57
|
+
questions Question[]
|
|
58
|
+
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
59
|
+
actor_activity_logs ActivityLog[] @relation("ActorActivityLogs")
|
|
60
|
+
actions Action[]
|
|
61
|
+
calendly Calendly?
|
|
62
|
+
google Google?
|
|
63
|
+
fitChecks FitCheck[]
|
|
64
|
+
created_job_profiles JobProfile[] @relation("ProfileCreator")
|
|
65
|
+
assigned_job_profiles JobProfile[] @relation("ProfileAssignee")
|
|
66
|
+
user_auth_modules AuthModule[] @relation("UserAuthModule")
|
|
67
|
+
refresh_token_auth RefreshToken[] @relation("TokenRefresh")
|
|
68
|
+
zoom_meeting_participants ZoomMeetingParticipant[]
|
|
69
|
+
notes Notes[]
|
|
70
|
+
|
|
71
|
+
name String?
|
|
72
|
+
phone String?
|
|
73
|
+
description String?
|
|
74
|
+
date_of_birth DateTime?
|
|
75
|
+
designation String?
|
|
76
|
+
location String?
|
|
77
|
+
salary String?
|
|
78
|
+
work_experience Json?
|
|
79
|
+
education Json?
|
|
80
|
+
skills Json?
|
|
81
|
+
notice_period String?
|
|
82
|
+
preferred_work_mode String?
|
|
83
|
+
gender String?
|
|
84
|
+
ethnicity String?
|
|
85
|
+
veteran_status String?
|
|
86
|
+
disability_status String?
|
|
87
|
+
professional_expertise String?
|
|
88
|
+
documents Document[]
|
|
89
|
+
|
|
90
|
+
@@index([role_id])
|
|
91
|
+
@@index([permission_id])
|
|
92
|
+
@@index([organisation_id])
|
|
93
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
model UserProfile {
|
|
2
|
-
id String @id @default(uuid())
|
|
3
|
-
created_at DateTime @default(now())
|
|
4
|
-
updated_at DateTime @updatedAt
|
|
5
|
-
name String
|
|
6
|
-
phone String
|
|
7
|
-
description String
|
|
8
|
-
date_of_birth String
|
|
9
|
-
designation String
|
|
10
|
-
is_active Boolean @default(true)
|
|
11
|
-
user User? @relation(fields: [user_id], references: [id])
|
|
12
|
-
user_id String? @unique
|
|
13
|
-
|
|
14
|
-
work_experience Json?
|
|
15
|
-
}
|
|
1
|
+
model UserProfile {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
created_at DateTime @default(now())
|
|
4
|
+
updated_at DateTime @updatedAt
|
|
5
|
+
name String
|
|
6
|
+
phone String
|
|
7
|
+
description String
|
|
8
|
+
date_of_birth String
|
|
9
|
+
designation String
|
|
10
|
+
is_active Boolean @default(true)
|
|
11
|
+
user User? @relation(fields: [user_id], references: [id])
|
|
12
|
+
user_id String? @unique
|
|
13
|
+
|
|
14
|
+
work_experience Json?
|
|
15
|
+
}
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
/// Expected attendee slot when persisting interview-linked Zoom participants (`CANDIDATE` | `INTERVIEWER`).
|
|
2
|
-
enum ZoomMeetingParticipantRole {
|
|
3
|
-
CANDIDATE
|
|
4
|
-
INTERVIEWER
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/// Zoom meeting linked 1:1 to an interview; Zoom REST host is `zoom_host_user_id`.
|
|
8
|
-
model ZoomMeeting {
|
|
9
|
-
id String @id @default(uuid())
|
|
10
|
-
/// One Zoom row per interview.
|
|
11
|
-
interview_id String @unique
|
|
12
|
-
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
13
|
-
|
|
14
|
-
/// Treadspace user id whose Zoom User-OAuth token created this meeting; required for PATCH/DELETE on Zoom REST.
|
|
15
|
-
/// Set from the Zoom host `userId` in `ZoomMeetingDAO.upsertZoomParticipants` (same user as `POST /users/me/meetings`).
|
|
16
|
-
zoom_host_user_id String
|
|
17
|
-
|
|
18
|
-
/// Zoom REST/API meeting id (same value used as Meeting SDK `meetingNumber` / JWT `mn`).
|
|
19
|
-
zoom_meeting_id String
|
|
20
|
-
/// Zoom meeting **instance** UUID from REST create (`uuid`) and RTMS/webhooks (`meeting_uuid`).
|
|
21
|
-
zoom_meeting_uuid String?
|
|
22
|
-
join_url String
|
|
23
|
-
start_url String?
|
|
24
|
-
password String?
|
|
25
|
-
topic String?
|
|
26
|
-
|
|
27
|
-
scheduled_start_time DateTime?
|
|
28
|
-
scheduled_end_time DateTime?
|
|
29
|
-
|
|
30
|
-
is_active Boolean @default(true)
|
|
31
|
-
|
|
32
|
-
created_at DateTime @default(now())
|
|
33
|
-
updated_at DateTime @updatedAt
|
|
34
|
-
/// Audit; kept aligned with `zoom_host_user_id` when the meeting is recreated under a new host.
|
|
35
|
-
created_by String
|
|
36
|
-
updated_by String
|
|
37
|
-
|
|
38
|
-
participants ZoomMeetingParticipant[]
|
|
39
|
-
|
|
40
|
-
@@index([interview_id])
|
|
41
|
-
@@index([zoom_meeting_id])
|
|
42
|
-
@@index([zoom_meeting_uuid])
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/// Expected participants for a `ZoomMeeting`: links to `User` (candidate / interviewer). Replaced on each meeting upsert.
|
|
46
|
-
model ZoomMeetingParticipant {
|
|
47
|
-
id String @id @default(uuid())
|
|
48
|
-
zoom_meeting_row_id String
|
|
49
|
-
zoom_meeting ZoomMeeting @relation(fields: [zoom_meeting_row_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
50
|
-
user_id String
|
|
51
|
-
user User @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
52
|
-
/// Zoom account id (`AuthModule.provider_account_id`) when this `user_id` has linked Zoom; usually set for interviewer, often null for candidate.
|
|
53
|
-
zoom_participant_id String?
|
|
54
|
-
role ZoomMeetingParticipantRole
|
|
55
|
-
|
|
56
|
-
is_active Boolean @default(true)
|
|
57
|
-
|
|
58
|
-
created_at DateTime @default(now())
|
|
59
|
-
updated_at DateTime @updatedAt
|
|
60
|
-
created_by String
|
|
61
|
-
updated_by String
|
|
62
|
-
|
|
63
|
-
@@index([zoom_meeting_row_id])
|
|
64
|
-
@@index([user_id])
|
|
65
|
-
@@index([zoom_participant_id])
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/// Ledger of processed Zoom webhook deliveries: one row per `dedupe_key` (request id or body hash).
|
|
69
|
-
/// Stops double-handling when Zoom retries the same notification (e.g. RTMS, `meeting.started`).
|
|
70
|
-
model ZoomWebhookEvent {
|
|
71
|
-
id String @id @default(uuid())
|
|
72
|
-
/// Stable key: SHA-256 of raw request body, or `x-zm-trackingid` when present.
|
|
73
|
-
dedupe_key String @unique
|
|
74
|
-
event String
|
|
75
|
-
created_at DateTime @default(now())
|
|
76
|
-
|
|
77
|
-
@@index([event])
|
|
78
|
-
@@index([created_at])
|
|
79
|
-
}
|
|
1
|
+
/// Expected attendee slot when persisting interview-linked Zoom participants (`CANDIDATE` | `INTERVIEWER`).
|
|
2
|
+
enum ZoomMeetingParticipantRole {
|
|
3
|
+
CANDIDATE
|
|
4
|
+
INTERVIEWER
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/// Zoom meeting linked 1:1 to an interview; Zoom REST host is `zoom_host_user_id`.
|
|
8
|
+
model ZoomMeeting {
|
|
9
|
+
id String @id @default(uuid())
|
|
10
|
+
/// One Zoom row per interview.
|
|
11
|
+
interview_id String @unique
|
|
12
|
+
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
13
|
+
|
|
14
|
+
/// Treadspace user id whose Zoom User-OAuth token created this meeting; required for PATCH/DELETE on Zoom REST.
|
|
15
|
+
/// Set from the Zoom host `userId` in `ZoomMeetingDAO.upsertZoomParticipants` (same user as `POST /users/me/meetings`).
|
|
16
|
+
zoom_host_user_id String
|
|
17
|
+
|
|
18
|
+
/// Zoom REST/API meeting id (same value used as Meeting SDK `meetingNumber` / JWT `mn`).
|
|
19
|
+
zoom_meeting_id String
|
|
20
|
+
/// Zoom meeting **instance** UUID from REST create (`uuid`) and RTMS/webhooks (`meeting_uuid`).
|
|
21
|
+
zoom_meeting_uuid String?
|
|
22
|
+
join_url String
|
|
23
|
+
start_url String?
|
|
24
|
+
password String?
|
|
25
|
+
topic String?
|
|
26
|
+
|
|
27
|
+
scheduled_start_time DateTime?
|
|
28
|
+
scheduled_end_time DateTime?
|
|
29
|
+
|
|
30
|
+
is_active Boolean @default(true)
|
|
31
|
+
|
|
32
|
+
created_at DateTime @default(now())
|
|
33
|
+
updated_at DateTime @updatedAt
|
|
34
|
+
/// Audit; kept aligned with `zoom_host_user_id` when the meeting is recreated under a new host.
|
|
35
|
+
created_by String
|
|
36
|
+
updated_by String
|
|
37
|
+
|
|
38
|
+
participants ZoomMeetingParticipant[]
|
|
39
|
+
|
|
40
|
+
@@index([interview_id])
|
|
41
|
+
@@index([zoom_meeting_id])
|
|
42
|
+
@@index([zoom_meeting_uuid])
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/// Expected participants for a `ZoomMeeting`: links to `User` (candidate / interviewer). Replaced on each meeting upsert.
|
|
46
|
+
model ZoomMeetingParticipant {
|
|
47
|
+
id String @id @default(uuid())
|
|
48
|
+
zoom_meeting_row_id String
|
|
49
|
+
zoom_meeting ZoomMeeting @relation(fields: [zoom_meeting_row_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
50
|
+
user_id String
|
|
51
|
+
user User @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
52
|
+
/// Zoom account id (`AuthModule.provider_account_id`) when this `user_id` has linked Zoom; usually set for interviewer, often null for candidate.
|
|
53
|
+
zoom_participant_id String?
|
|
54
|
+
role ZoomMeetingParticipantRole
|
|
55
|
+
|
|
56
|
+
is_active Boolean @default(true)
|
|
57
|
+
|
|
58
|
+
created_at DateTime @default(now())
|
|
59
|
+
updated_at DateTime @updatedAt
|
|
60
|
+
created_by String
|
|
61
|
+
updated_by String
|
|
62
|
+
|
|
63
|
+
@@index([zoom_meeting_row_id])
|
|
64
|
+
@@index([user_id])
|
|
65
|
+
@@index([zoom_participant_id])
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// Ledger of processed Zoom webhook deliveries: one row per `dedupe_key` (request id or body hash).
|
|
69
|
+
/// Stops double-handling when Zoom retries the same notification (e.g. RTMS, `meeting.started`).
|
|
70
|
+
model ZoomWebhookEvent {
|
|
71
|
+
id String @id @default(uuid())
|
|
72
|
+
/// Stable key: SHA-256 of raw request body, or `x-zm-trackingid` when present.
|
|
73
|
+
dedupe_key String @unique
|
|
74
|
+
event String
|
|
75
|
+
created_at DateTime @default(now())
|
|
76
|
+
|
|
77
|
+
@@index([event])
|
|
78
|
+
@@index([created_at])
|
|
79
|
+
}
|
package/prisma/schema/migrations/20260626120000_add_evaluation_plan_share_scope/migration.sql
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
CREATE TYPE "EvaluationPlanShareScope" AS ENUM (
|
|
2
|
-
'PRIVATE',
|
|
3
|
-
'CREATOR',
|
|
4
|
-
'ORGANIZATION'
|
|
5
|
-
);
|
|
6
|
-
|
|
7
|
-
ALTER TABLE "EvaluationPlan"
|
|
8
|
-
ADD COLUMN "share_scope" "EvaluationPlanShareScope" NOT NULL DEFAULT 'PRIVATE';
|
|
9
|
-
|
|
10
|
-
CREATE INDEX "EvaluationPlan_job_description_id_plan_type_share_scope_idx"
|
|
11
|
-
ON "EvaluationPlan"("job_description_id", "plan_type", "share_scope");
|
|
12
|
-
|
|
13
|
-
CREATE INDEX "EvaluationPlan_created_by_share_scope_idx"
|
|
14
|
-
ON "EvaluationPlan"("created_by", "share_scope");
|