@adaptware/eagles-db 0.1.81 → 0.1.83
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 +67 -8
- package/client/index-browser.js +64 -5
- package/client/index.d.ts +6326 -410
- package/client/index.js +67 -8
- package/client/package.json +1 -1
- package/client/schema.prisma +103 -6
- package/client/wasm.js +64 -5
- package/package.json +1 -1
- package/prisma/schema/authModule.prisma +10 -5
- package/prisma/schema/integration.prisma +14 -10
- package/prisma/schema/interview.prisma +27 -19
- package/prisma/schema/user.prisma +1 -0
- package/prisma/schema/zoomMeeting.prisma +79 -0
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -324,14 +324,13 @@ model AssignmentLibrary {
|
|
|
324
324
|
enum AuthProvider {
|
|
325
325
|
GOOGLE
|
|
326
326
|
MICROSOFT
|
|
327
|
+
ZOOM
|
|
327
328
|
}
|
|
328
329
|
|
|
329
330
|
model AuthModule {
|
|
330
|
-
id
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
user User @relation("UserAuthModule", fields: [user_id], references: [id], onDelete: Cascade)
|
|
334
|
-
|
|
331
|
+
id String @id @default(uuid())
|
|
332
|
+
user_id String
|
|
333
|
+
/// The provider of the authentication module
|
|
335
334
|
provider AuthProvider
|
|
336
335
|
provider_account_id String? @db.Text
|
|
337
336
|
|
|
@@ -345,9 +344,15 @@ model AuthModule {
|
|
|
345
344
|
scope String?
|
|
346
345
|
is_active Boolean @default(true)
|
|
347
346
|
|
|
347
|
+
/// Provider-specific JSON (e.g. Zoom: email, display); tokens remain in encrypted columns.
|
|
348
|
+
metadata Json @default("{}")
|
|
349
|
+
|
|
348
350
|
created_at DateTime @default(now())
|
|
349
351
|
updated_at DateTime @updatedAt
|
|
350
352
|
|
|
353
|
+
user User @relation("UserAuthModule", fields: [user_id], references: [id], onDelete: Cascade)
|
|
354
|
+
|
|
355
|
+
@@unique([user_id, provider])
|
|
351
356
|
@@unique([provider, provider_account_id])
|
|
352
357
|
@@index([user_id])
|
|
353
358
|
}
|
|
@@ -643,11 +648,15 @@ enum IntegrationProvider {
|
|
|
643
648
|
NAUKRI
|
|
644
649
|
ZOHO_RECRUIT
|
|
645
650
|
LINKEDIN
|
|
651
|
+
GOOGLE
|
|
652
|
+
MICROSOFT
|
|
653
|
+
ZOOM
|
|
646
654
|
}
|
|
647
655
|
|
|
648
656
|
enum IntegrationAuthType {
|
|
649
657
|
OAUTH2
|
|
650
658
|
API_KEY
|
|
659
|
+
SSO
|
|
651
660
|
}
|
|
652
661
|
|
|
653
662
|
enum SyncDirection {
|
|
@@ -750,6 +759,11 @@ enum InterviewFeedback {
|
|
|
750
759
|
STRONG_NO_HIRE
|
|
751
760
|
}
|
|
752
761
|
|
|
762
|
+
enum InterviewPlatform {
|
|
763
|
+
TREADSPACE
|
|
764
|
+
ZOOM
|
|
765
|
+
}
|
|
766
|
+
|
|
753
767
|
model Interview {
|
|
754
768
|
id String @id @default(uuid())
|
|
755
769
|
/// Foreign keys
|
|
@@ -760,6 +774,7 @@ model Interview {
|
|
|
760
774
|
application_id String?
|
|
761
775
|
resume_id String
|
|
762
776
|
job_description_id String
|
|
777
|
+
calendar_event_id String?
|
|
763
778
|
/// Data
|
|
764
779
|
room_name String?
|
|
765
780
|
interview_summary String[]
|
|
@@ -769,7 +784,7 @@ model Interview {
|
|
|
769
784
|
actual_end_time DateTime?
|
|
770
785
|
recording_url String?
|
|
771
786
|
interview_status InterviewStatus @default(SCHEDULED)
|
|
772
|
-
|
|
787
|
+
interview_platform InterviewPlatform @default(TREADSPACE)
|
|
773
788
|
/// Old Feedback fields will be deprecated soon
|
|
774
789
|
ai_interview_feedback InterviewFeedback?
|
|
775
790
|
interview_feedback InterviewFeedback?
|
|
@@ -803,6 +818,7 @@ model Interview {
|
|
|
803
818
|
feedback Feedback[]
|
|
804
819
|
interviewNotes InterviewNotes[]
|
|
805
820
|
liveAnalysis LiveAnalysis[]
|
|
821
|
+
zoom_meeting ZoomMeeting?
|
|
806
822
|
|
|
807
823
|
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
808
824
|
@@index([candidate_id])
|
|
@@ -1401,6 +1417,7 @@ model User {
|
|
|
1401
1417
|
assigned_job_profiles JobProfile[] @relation("ProfileAssignee")
|
|
1402
1418
|
user_auth_modules AuthModule[] @relation("UserAuthModule")
|
|
1403
1419
|
refresh_token_auth RefreshToken[] @relation("TokenRefresh")
|
|
1420
|
+
zoom_meeting_participants ZoomMeetingParticipant[]
|
|
1404
1421
|
notes Notes[]
|
|
1405
1422
|
|
|
1406
1423
|
name String?
|
|
@@ -1440,3 +1457,83 @@ model UserProfile {
|
|
|
1440
1457
|
|
|
1441
1458
|
work_experience Json?
|
|
1442
1459
|
}
|
|
1460
|
+
|
|
1461
|
+
/// Expected attendee slot when persisting interview-linked Zoom participants (`CANDIDATE` | `INTERVIEWER`).
|
|
1462
|
+
enum ZoomMeetingParticipantRole {
|
|
1463
|
+
CANDIDATE
|
|
1464
|
+
INTERVIEWER
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
/// Zoom meeting linked 1:1 to an interview; Zoom REST host is `zoom_host_user_id`.
|
|
1468
|
+
model ZoomMeeting {
|
|
1469
|
+
id String @id @default(uuid())
|
|
1470
|
+
/// One Zoom row per interview.
|
|
1471
|
+
interview_id String @unique
|
|
1472
|
+
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1473
|
+
|
|
1474
|
+
/// Treadspace user id whose Zoom User-OAuth token created this meeting; required for PATCH/DELETE on Zoom REST.
|
|
1475
|
+
/// Set from the Zoom host `userId` in `ZoomMeetingDAO.upsertZoomParticipants` (same user as `POST /users/me/meetings`).
|
|
1476
|
+
zoom_host_user_id String
|
|
1477
|
+
|
|
1478
|
+
/// Zoom REST/API meeting id (same value used as Meeting SDK `meetingNumber` / JWT `mn`).
|
|
1479
|
+
zoom_meeting_id String
|
|
1480
|
+
/// Zoom meeting **instance** UUID from REST create (`uuid`) and RTMS/webhooks (`meeting_uuid`).
|
|
1481
|
+
zoom_meeting_uuid String?
|
|
1482
|
+
join_url String
|
|
1483
|
+
start_url String?
|
|
1484
|
+
password String?
|
|
1485
|
+
topic String?
|
|
1486
|
+
|
|
1487
|
+
scheduled_start_time DateTime?
|
|
1488
|
+
scheduled_end_time DateTime?
|
|
1489
|
+
|
|
1490
|
+
is_active Boolean @default(true)
|
|
1491
|
+
|
|
1492
|
+
created_at DateTime @default(now())
|
|
1493
|
+
updated_at DateTime @updatedAt
|
|
1494
|
+
/// Audit; kept aligned with `zoom_host_user_id` when the meeting is recreated under a new host.
|
|
1495
|
+
created_by String
|
|
1496
|
+
updated_by String
|
|
1497
|
+
|
|
1498
|
+
participants ZoomMeetingParticipant[]
|
|
1499
|
+
|
|
1500
|
+
@@index([interview_id])
|
|
1501
|
+
@@index([zoom_meeting_id])
|
|
1502
|
+
@@index([zoom_meeting_uuid])
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
/// Expected participants for a `ZoomMeeting`: links to `User` (candidate / interviewer). Replaced on each meeting upsert.
|
|
1506
|
+
model ZoomMeetingParticipant {
|
|
1507
|
+
id String @id @default(uuid())
|
|
1508
|
+
zoom_meeting_row_id String
|
|
1509
|
+
zoom_meeting ZoomMeeting @relation(fields: [zoom_meeting_row_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1510
|
+
user_id String
|
|
1511
|
+
user User @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1512
|
+
/// Zoom account id (`AuthModule.provider_account_id`) when this `user_id` has linked Zoom; usually set for interviewer, often null for candidate.
|
|
1513
|
+
zoom_participant_id String?
|
|
1514
|
+
role ZoomMeetingParticipantRole
|
|
1515
|
+
|
|
1516
|
+
is_active Boolean @default(true)
|
|
1517
|
+
|
|
1518
|
+
created_at DateTime @default(now())
|
|
1519
|
+
updated_at DateTime @updatedAt
|
|
1520
|
+
created_by String
|
|
1521
|
+
updated_by String
|
|
1522
|
+
|
|
1523
|
+
@@index([zoom_meeting_row_id])
|
|
1524
|
+
@@index([user_id])
|
|
1525
|
+
@@index([zoom_participant_id])
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
/// Ledger of processed Zoom webhook deliveries: one row per `dedupe_key` (request id or body hash).
|
|
1529
|
+
/// Stops double-handling when Zoom retries the same notification (e.g. RTMS, `meeting.started`).
|
|
1530
|
+
model ZoomWebhookEvent {
|
|
1531
|
+
id String @id @default(uuid())
|
|
1532
|
+
/// Stable key: SHA-256 of raw request body, or `x-zm-trackingid` when present.
|
|
1533
|
+
dedupe_key String @unique
|
|
1534
|
+
event String
|
|
1535
|
+
created_at DateTime @default(now())
|
|
1536
|
+
|
|
1537
|
+
@@index([event])
|
|
1538
|
+
@@index([created_at])
|
|
1539
|
+
}
|
package/client/wasm.js
CHANGED
|
@@ -307,6 +307,7 @@ exports.Prisma.AuthModuleScalarFieldEnum = {
|
|
|
307
307
|
token_type: 'token_type',
|
|
308
308
|
scope: 'scope',
|
|
309
309
|
is_active: 'is_active',
|
|
310
|
+
metadata: 'metadata',
|
|
310
311
|
created_at: 'created_at',
|
|
311
312
|
updated_at: 'updated_at'
|
|
312
313
|
};
|
|
@@ -525,6 +526,7 @@ exports.Prisma.InterviewScalarFieldEnum = {
|
|
|
525
526
|
application_id: 'application_id',
|
|
526
527
|
resume_id: 'resume_id',
|
|
527
528
|
job_description_id: 'job_description_id',
|
|
529
|
+
calendar_event_id: 'calendar_event_id',
|
|
528
530
|
room_name: 'room_name',
|
|
529
531
|
interview_summary: 'interview_summary',
|
|
530
532
|
scheduled_start_time: 'scheduled_start_time',
|
|
@@ -533,7 +535,7 @@ exports.Prisma.InterviewScalarFieldEnum = {
|
|
|
533
535
|
actual_end_time: 'actual_end_time',
|
|
534
536
|
recording_url: 'recording_url',
|
|
535
537
|
interview_status: 'interview_status',
|
|
536
|
-
|
|
538
|
+
interview_platform: 'interview_platform',
|
|
537
539
|
ai_interview_feedback: 'ai_interview_feedback',
|
|
538
540
|
interview_feedback: 'interview_feedback',
|
|
539
541
|
overall_feedback: 'overall_feedback',
|
|
@@ -885,6 +887,45 @@ exports.Prisma.UserProfileScalarFieldEnum = {
|
|
|
885
887
|
work_experience: 'work_experience'
|
|
886
888
|
};
|
|
887
889
|
|
|
890
|
+
exports.Prisma.ZoomMeetingScalarFieldEnum = {
|
|
891
|
+
id: 'id',
|
|
892
|
+
interview_id: 'interview_id',
|
|
893
|
+
zoom_host_user_id: 'zoom_host_user_id',
|
|
894
|
+
zoom_meeting_id: 'zoom_meeting_id',
|
|
895
|
+
zoom_meeting_uuid: 'zoom_meeting_uuid',
|
|
896
|
+
join_url: 'join_url',
|
|
897
|
+
start_url: 'start_url',
|
|
898
|
+
password: 'password',
|
|
899
|
+
topic: 'topic',
|
|
900
|
+
scheduled_start_time: 'scheduled_start_time',
|
|
901
|
+
scheduled_end_time: 'scheduled_end_time',
|
|
902
|
+
is_active: 'is_active',
|
|
903
|
+
created_at: 'created_at',
|
|
904
|
+
updated_at: 'updated_at',
|
|
905
|
+
created_by: 'created_by',
|
|
906
|
+
updated_by: 'updated_by'
|
|
907
|
+
};
|
|
908
|
+
|
|
909
|
+
exports.Prisma.ZoomMeetingParticipantScalarFieldEnum = {
|
|
910
|
+
id: 'id',
|
|
911
|
+
zoom_meeting_row_id: 'zoom_meeting_row_id',
|
|
912
|
+
user_id: 'user_id',
|
|
913
|
+
zoom_participant_id: 'zoom_participant_id',
|
|
914
|
+
role: 'role',
|
|
915
|
+
is_active: 'is_active',
|
|
916
|
+
created_at: 'created_at',
|
|
917
|
+
updated_at: 'updated_at',
|
|
918
|
+
created_by: 'created_by',
|
|
919
|
+
updated_by: 'updated_by'
|
|
920
|
+
};
|
|
921
|
+
|
|
922
|
+
exports.Prisma.ZoomWebhookEventScalarFieldEnum = {
|
|
923
|
+
id: 'id',
|
|
924
|
+
dedupe_key: 'dedupe_key',
|
|
925
|
+
event: 'event',
|
|
926
|
+
created_at: 'created_at'
|
|
927
|
+
};
|
|
928
|
+
|
|
888
929
|
exports.Prisma.SortOrder = {
|
|
889
930
|
asc: 'asc',
|
|
890
931
|
desc: 'desc'
|
|
@@ -960,7 +1001,8 @@ exports.AssignmentStatus = exports.$Enums.AssignmentStatus = {
|
|
|
960
1001
|
|
|
961
1002
|
exports.AuthProvider = exports.$Enums.AuthProvider = {
|
|
962
1003
|
GOOGLE: 'GOOGLE',
|
|
963
|
-
MICROSOFT: 'MICROSOFT'
|
|
1004
|
+
MICROSOFT: 'MICROSOFT',
|
|
1005
|
+
ZOOM: 'ZOOM'
|
|
964
1006
|
};
|
|
965
1007
|
|
|
966
1008
|
exports.JobType = exports.$Enums.JobType = {
|
|
@@ -1020,12 +1062,16 @@ exports.DurationUnit = exports.$Enums.DurationUnit = {
|
|
|
1020
1062
|
exports.IntegrationProvider = exports.$Enums.IntegrationProvider = {
|
|
1021
1063
|
NAUKRI: 'NAUKRI',
|
|
1022
1064
|
ZOHO_RECRUIT: 'ZOHO_RECRUIT',
|
|
1023
|
-
LINKEDIN: 'LINKEDIN'
|
|
1065
|
+
LINKEDIN: 'LINKEDIN',
|
|
1066
|
+
GOOGLE: 'GOOGLE',
|
|
1067
|
+
MICROSOFT: 'MICROSOFT',
|
|
1068
|
+
ZOOM: 'ZOOM'
|
|
1024
1069
|
};
|
|
1025
1070
|
|
|
1026
1071
|
exports.IntegrationAuthType = exports.$Enums.IntegrationAuthType = {
|
|
1027
1072
|
OAUTH2: 'OAUTH2',
|
|
1028
|
-
API_KEY: 'API_KEY'
|
|
1073
|
+
API_KEY: 'API_KEY',
|
|
1074
|
+
SSO: 'SSO'
|
|
1029
1075
|
};
|
|
1030
1076
|
|
|
1031
1077
|
exports.SyncDirection = exports.$Enums.SyncDirection = {
|
|
@@ -1057,6 +1103,11 @@ exports.InterviewStatus = exports.$Enums.InterviewStatus = {
|
|
|
1057
1103
|
EVALUATED: 'EVALUATED'
|
|
1058
1104
|
};
|
|
1059
1105
|
|
|
1106
|
+
exports.InterviewPlatform = exports.$Enums.InterviewPlatform = {
|
|
1107
|
+
TREADSPACE: 'TREADSPACE',
|
|
1108
|
+
ZOOM: 'ZOOM'
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1060
1111
|
exports.InterviewFeedback = exports.$Enums.InterviewFeedback = {
|
|
1061
1112
|
STRONG_HIRE: 'STRONG_HIRE',
|
|
1062
1113
|
HIRE: 'HIRE',
|
|
@@ -1141,6 +1192,11 @@ exports.FirstLoginStatus = exports.$Enums.FirstLoginStatus = {
|
|
|
1141
1192
|
COMPLETED: 'COMPLETED'
|
|
1142
1193
|
};
|
|
1143
1194
|
|
|
1195
|
+
exports.ZoomMeetingParticipantRole = exports.$Enums.ZoomMeetingParticipantRole = {
|
|
1196
|
+
CANDIDATE: 'CANDIDATE',
|
|
1197
|
+
INTERVIEWER: 'INTERVIEWER'
|
|
1198
|
+
};
|
|
1199
|
+
|
|
1144
1200
|
exports.Prisma.ModelName = {
|
|
1145
1201
|
CandidateQuestionResponse: 'CandidateQuestionResponse',
|
|
1146
1202
|
UserRole: 'UserRole',
|
|
@@ -1184,7 +1240,10 @@ exports.Prisma.ModelName = {
|
|
|
1184
1240
|
Suggestion: 'Suggestion',
|
|
1185
1241
|
Transcript: 'Transcript',
|
|
1186
1242
|
User: 'User',
|
|
1187
|
-
UserProfile: 'UserProfile'
|
|
1243
|
+
UserProfile: 'UserProfile',
|
|
1244
|
+
ZoomMeeting: 'ZoomMeeting',
|
|
1245
|
+
ZoomMeetingParticipant: 'ZoomMeetingParticipant',
|
|
1246
|
+
ZoomWebhookEvent: 'ZoomWebhookEvent'
|
|
1188
1247
|
};
|
|
1189
1248
|
|
|
1190
1249
|
/**
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
enum AuthProvider {
|
|
2
2
|
GOOGLE
|
|
3
3
|
MICROSOFT
|
|
4
|
+
ZOOM
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
model AuthModule {
|
|
7
|
-
id
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
user User @relation("UserAuthModule", fields: [user_id], references: [id], onDelete: Cascade)
|
|
11
|
-
|
|
8
|
+
id String @id @default(uuid())
|
|
9
|
+
user_id String
|
|
10
|
+
/// The provider of the authentication module
|
|
12
11
|
provider AuthProvider
|
|
13
12
|
provider_account_id String? @db.Text
|
|
14
13
|
|
|
@@ -22,9 +21,15 @@ model AuthModule {
|
|
|
22
21
|
scope String?
|
|
23
22
|
is_active Boolean @default(true)
|
|
24
23
|
|
|
24
|
+
/// Provider-specific JSON (e.g. Zoom: email, display); tokens remain in encrypted columns.
|
|
25
|
+
metadata Json @default("{}")
|
|
26
|
+
|
|
25
27
|
created_at DateTime @default(now())
|
|
26
28
|
updated_at DateTime @updatedAt
|
|
27
29
|
|
|
30
|
+
user User @relation("UserAuthModule", fields: [user_id], references: [id], onDelete: Cascade)
|
|
31
|
+
|
|
32
|
+
@@unique([user_id, provider])
|
|
28
33
|
@@unique([provider, provider_account_id])
|
|
29
34
|
@@index([user_id])
|
|
30
35
|
}
|
|
@@ -2,11 +2,15 @@ enum IntegrationProvider {
|
|
|
2
2
|
NAUKRI
|
|
3
3
|
ZOHO_RECRUIT
|
|
4
4
|
LINKEDIN
|
|
5
|
+
GOOGLE
|
|
6
|
+
MICROSOFT
|
|
7
|
+
ZOOM
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
enum IntegrationAuthType {
|
|
8
11
|
OAUTH2
|
|
9
12
|
API_KEY
|
|
13
|
+
SSO
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
enum SyncDirection {
|
|
@@ -29,17 +33,17 @@ enum SyncStatus {
|
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
model IntegrationCredential {
|
|
32
|
-
id
|
|
33
|
-
organisation_id
|
|
34
|
-
provider
|
|
35
|
-
auth_type
|
|
36
|
-
access_token
|
|
37
|
-
refresh_token
|
|
36
|
+
id String @id @default(uuid())
|
|
37
|
+
organisation_id String?
|
|
38
|
+
provider IntegrationProvider
|
|
39
|
+
auth_type IntegrationAuthType
|
|
40
|
+
access_token String?
|
|
41
|
+
refresh_token String?
|
|
38
42
|
token_expires_at DateTime?
|
|
39
|
-
api_key
|
|
40
|
-
api_secret
|
|
41
|
-
metadata
|
|
42
|
-
is_active
|
|
43
|
+
api_key String?
|
|
44
|
+
api_secret String?
|
|
45
|
+
metadata Json @default("{}")
|
|
46
|
+
is_active Boolean @default(true)
|
|
43
47
|
|
|
44
48
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
45
49
|
|
|
@@ -15,6 +15,11 @@ enum InterviewFeedback {
|
|
|
15
15
|
STRONG_NO_HIRE
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
enum InterviewPlatform {
|
|
19
|
+
TREADSPACE
|
|
20
|
+
ZOOM
|
|
21
|
+
}
|
|
22
|
+
|
|
18
23
|
model Interview {
|
|
19
24
|
id String @id @default(uuid())
|
|
20
25
|
/// Foreign keys
|
|
@@ -25,6 +30,7 @@ model Interview {
|
|
|
25
30
|
application_id String?
|
|
26
31
|
resume_id String
|
|
27
32
|
job_description_id String
|
|
33
|
+
calendar_event_id String?
|
|
28
34
|
/// Data
|
|
29
35
|
room_name String?
|
|
30
36
|
interview_summary String[]
|
|
@@ -34,7 +40,7 @@ model Interview {
|
|
|
34
40
|
actual_end_time DateTime?
|
|
35
41
|
recording_url String?
|
|
36
42
|
interview_status InterviewStatus @default(SCHEDULED)
|
|
37
|
-
|
|
43
|
+
interview_platform InterviewPlatform @default(TREADSPACE)
|
|
38
44
|
/// Old Feedback fields will be deprecated soon
|
|
39
45
|
ai_interview_feedback InterviewFeedback?
|
|
40
46
|
interview_feedback InterviewFeedback?
|
|
@@ -49,25 +55,27 @@ model Interview {
|
|
|
49
55
|
final_feedback Json?
|
|
50
56
|
|
|
51
57
|
/// Audit fields
|
|
52
|
-
created_at
|
|
53
|
-
updated_at
|
|
54
|
-
created_by
|
|
55
|
-
updated_by
|
|
56
|
-
is_active
|
|
58
|
+
created_at DateTime @default(now())
|
|
59
|
+
updated_at DateTime @updatedAt
|
|
60
|
+
created_by String
|
|
61
|
+
updated_by String
|
|
62
|
+
is_active Boolean @default(true)
|
|
57
63
|
// Relations
|
|
58
|
-
candidate
|
|
59
|
-
interviewer
|
|
60
|
-
organisation
|
|
61
|
-
job_description
|
|
62
|
-
resume
|
|
63
|
-
evaluation_plan
|
|
64
|
-
application
|
|
65
|
-
ongoing_evaluation
|
|
66
|
-
transcripts
|
|
67
|
-
suggestions
|
|
68
|
-
feedback
|
|
69
|
-
interviewNotes
|
|
70
|
-
liveAnalysis
|
|
64
|
+
candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
|
|
65
|
+
interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
|
|
66
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
67
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
68
|
+
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
69
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
70
|
+
application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
71
|
+
ongoing_evaluation OngoingEvaluation?
|
|
72
|
+
transcripts Transcript[]
|
|
73
|
+
suggestions Suggestion[]
|
|
74
|
+
feedback Feedback[]
|
|
75
|
+
interviewNotes InterviewNotes[]
|
|
76
|
+
liveAnalysis LiveAnalysis[]
|
|
77
|
+
zoom_meeting ZoomMeeting?
|
|
78
|
+
|
|
71
79
|
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
72
80
|
@@index([candidate_id])
|
|
73
81
|
@@index([interviewer_id])
|
|
@@ -54,6 +54,7 @@ model User {
|
|
|
54
54
|
assigned_job_profiles JobProfile[] @relation("ProfileAssignee")
|
|
55
55
|
user_auth_modules AuthModule[] @relation("UserAuthModule")
|
|
56
56
|
refresh_token_auth RefreshToken[] @relation("TokenRefresh")
|
|
57
|
+
zoom_meeting_participants ZoomMeetingParticipant[]
|
|
57
58
|
notes Notes[]
|
|
58
59
|
|
|
59
60
|
name String?
|
|
@@ -0,0 +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
|
+
}
|