@adaptware/eagles-db 0.5.47 → 0.5.49
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 +24 -48
- package/client/index-browser.js +19 -43
- package/client/index.d.ts +2338 -2547
- package/client/index.js +24 -48
- package/client/libquery_engine-darwin.dylib.node +0 -0
- package/client/package.json +1 -1
- package/client/schema.prisma +70 -117
- package/client/wasm.js +24 -48
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/migrations/20260519120000_migrate_shortlisted_to_selected/migration.sql +2 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/interview.prisma +39 -38
- package/prisma/schema/licensing/assignmentHistory.prisma +3 -1
- package/prisma/schema/licensing/licensingEnums.prisma +2 -0
- package/prisma/schema/licensing/purchasedLicense.prisma +5 -0
- package/prisma/schema/migrations/20260911120000_hiring_unit_assignment_scope/migration.sql +38 -0
- package/prisma/schema/organisation.prisma +11 -0
- package/prisma/schema/user.prisma +2 -1
|
Binary file
|
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -414,62 +414,58 @@ enum ApplicationOfferSubstatus {
|
|
|
414
414
|
|
|
415
415
|
model Application {
|
|
416
416
|
/// Primary key
|
|
417
|
-
id
|
|
417
|
+
id String @id @default(uuid())
|
|
418
418
|
/// Foreign keys
|
|
419
|
-
organisation_id
|
|
420
|
-
candidate_id
|
|
421
|
-
resume_id
|
|
422
|
-
job_description_id
|
|
423
|
-
evaluation_plan_id
|
|
424
|
-
recruiter_id
|
|
425
|
-
source_id
|
|
419
|
+
organisation_id String
|
|
420
|
+
candidate_id String
|
|
421
|
+
resume_id String
|
|
422
|
+
job_description_id String
|
|
423
|
+
evaluation_plan_id String?
|
|
424
|
+
recruiter_id String?
|
|
425
|
+
source_id String?
|
|
426
426
|
/// Data fields
|
|
427
|
-
fit_check_score
|
|
428
|
-
applied_at
|
|
429
|
-
round_no
|
|
430
|
-
is_jaf_completed
|
|
431
|
-
proceed_to_next_round
|
|
432
|
-
evaluationComment
|
|
427
|
+
fit_check_score Float?
|
|
428
|
+
applied_at DateTime @default(now())
|
|
429
|
+
round_no Int @default(0)
|
|
430
|
+
is_jaf_completed Boolean @default(false)
|
|
431
|
+
proceed_to_next_round Boolean? @default(false)
|
|
432
|
+
evaluationComment String?
|
|
433
433
|
/// Candidate flag (orthogonal to ApplicationStatus). Latest actor/comment only.
|
|
434
|
-
is_flagged
|
|
435
|
-
flag_comment
|
|
436
|
-
flagged_at
|
|
437
|
-
flagged_by
|
|
438
|
-
unflag_comment
|
|
439
|
-
unflagged_at
|
|
440
|
-
unflagged_by
|
|
441
|
-
fit_check_status
|
|
442
|
-
status
|
|
434
|
+
is_flagged Boolean @default(false)
|
|
435
|
+
flag_comment String?
|
|
436
|
+
flagged_at DateTime?
|
|
437
|
+
flagged_by String?
|
|
438
|
+
unflag_comment String?
|
|
439
|
+
unflagged_at DateTime?
|
|
440
|
+
unflagged_by String?
|
|
441
|
+
fit_check_status FitCheckStatus?
|
|
442
|
+
status ApplicationStatus @default(PENDING)
|
|
443
443
|
/// Fine-grained offer-stage state. Meaningful only when status = OFFER (or was OFFER for a terminal-substatus that flipped to REJECTED / JOINED).
|
|
444
|
-
offer_substatus
|
|
444
|
+
offer_substatus ApplicationOfferSubstatus?
|
|
445
445
|
/// Audit fields
|
|
446
|
-
created_at
|
|
447
|
-
updated_at
|
|
448
|
-
created_by
|
|
449
|
-
updated_by
|
|
450
|
-
is_active
|
|
451
|
-
fit_check_report_document_id String? @unique
|
|
452
|
-
fit_check_report_updated_flag Boolean @default(false)
|
|
453
|
-
fit_check_report_data Json? @default("{}")
|
|
446
|
+
created_at DateTime @default(now())
|
|
447
|
+
updated_at DateTime @updatedAt
|
|
448
|
+
created_by String
|
|
449
|
+
updated_by String
|
|
450
|
+
is_active Boolean @default(true)
|
|
454
451
|
/// Relations
|
|
455
|
-
evaluation_plan
|
|
456
|
-
candidate
|
|
457
|
-
organisation
|
|
458
|
-
resume
|
|
459
|
-
job_description
|
|
460
|
-
fit_check
|
|
461
|
-
recruiter
|
|
462
|
-
source
|
|
463
|
-
interviews
|
|
464
|
-
assignments
|
|
465
|
-
ongoing_evaluations
|
|
466
|
-
activity_logs
|
|
467
|
-
notes
|
|
468
|
-
conversations
|
|
469
|
-
communication_messages
|
|
470
|
-
job_application_responses
|
|
471
|
-
offer
|
|
472
|
-
fit_check_report_document Document? @relation("ApplicationFitCheckReportDocument", fields: [fit_check_report_document_id], references: [id], onDelete: SetNull)
|
|
452
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
|
|
453
|
+
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
454
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
455
|
+
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
456
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
457
|
+
fit_check FitCheck?
|
|
458
|
+
recruiter User? @relation("ApplicationRecruiter", fields: [recruiter_id], references: [id])
|
|
459
|
+
source Source? @relation(fields: [source_id], references: [id], onDelete: SetNull)
|
|
460
|
+
interviews Interview[]
|
|
461
|
+
assignments Assignment[]
|
|
462
|
+
ongoing_evaluations OngoingEvaluation[]
|
|
463
|
+
activity_logs ActivityLog[]
|
|
464
|
+
notes Notes[]
|
|
465
|
+
conversations Conversation[]
|
|
466
|
+
communication_messages CommunicationMessage[]
|
|
467
|
+
job_application_responses JobApplicationResponse[]
|
|
468
|
+
offer Offer?
|
|
473
469
|
|
|
474
470
|
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
475
471
|
@@index([candidate_id])
|
|
@@ -556,8 +552,6 @@ model AssessmentLibrary {
|
|
|
556
552
|
created_by String
|
|
557
553
|
updated_by String
|
|
558
554
|
is_active Boolean @default(true)
|
|
559
|
-
/// Frozen question plan, batch cursor, and bank-generation status (JSON).
|
|
560
|
-
generation_state Json?
|
|
561
555
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
562
556
|
questions Question[] // One assessment → many questions
|
|
563
557
|
assessments Assessment[]
|
|
@@ -1407,7 +1401,6 @@ model Document {
|
|
|
1407
1401
|
offer_letters OfferLetter[] @relation("OfferLetterPdf")
|
|
1408
1402
|
offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
|
|
1409
1403
|
offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
|
|
1410
|
-
application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
|
|
1411
1404
|
|
|
1412
1405
|
// Indexes
|
|
1413
1406
|
@@index([candidate_id])
|
|
@@ -1452,8 +1445,6 @@ model EvaluationCriteria {
|
|
|
1452
1445
|
|
|
1453
1446
|
enum RoundType {
|
|
1454
1447
|
ASSESSMENT
|
|
1455
|
-
GENERAL_APTITUDE_ASSESSMENT
|
|
1456
|
-
DOMAIN_KNOWLEDGE_ASSESSMENT
|
|
1457
1448
|
INTERVIEW
|
|
1458
1449
|
ASSIGNMENT
|
|
1459
1450
|
SCREENING
|
|
@@ -1548,6 +1539,26 @@ model EvaluationPlan {
|
|
|
1548
1539
|
@@schema("public")
|
|
1549
1540
|
}
|
|
1550
1541
|
|
|
1542
|
+
model Feedback {
|
|
1543
|
+
id String @id @default(uuid())
|
|
1544
|
+
interview_id String
|
|
1545
|
+
order_no Int
|
|
1546
|
+
|
|
1547
|
+
ai_feedback Json?
|
|
1548
|
+
human_feedback Json?
|
|
1549
|
+
|
|
1550
|
+
created_at DateTime @default(now())
|
|
1551
|
+
updated_at DateTime @updatedAt
|
|
1552
|
+
created_by String
|
|
1553
|
+
updated_by String
|
|
1554
|
+
is_active Boolean @default(true)
|
|
1555
|
+
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1556
|
+
|
|
1557
|
+
@@unique([interview_id, order_no])
|
|
1558
|
+
@@index([interview_id])
|
|
1559
|
+
@@schema("public")
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1551
1562
|
enum FitCheckStatus {
|
|
1552
1563
|
RECOMMENDED
|
|
1553
1564
|
TO_REVIEW
|
|
@@ -2036,6 +2047,7 @@ model Interview {
|
|
|
2036
2047
|
ongoing_evaluation OngoingEvaluation?
|
|
2037
2048
|
transcripts Transcript[]
|
|
2038
2049
|
suggestions Suggestion[]
|
|
2050
|
+
feedback Feedback[]
|
|
2039
2051
|
interviewNotes InterviewNotes[]
|
|
2040
2052
|
liveAnalysis LiveAnalysis[]
|
|
2041
2053
|
zoom_meeting ZoomMeeting?
|
|
@@ -2369,15 +2381,13 @@ model JobApplicationField {
|
|
|
2369
2381
|
updated_by String
|
|
2370
2382
|
created_at DateTime @default(now())
|
|
2371
2383
|
updated_at DateTime @updatedAt
|
|
2372
|
-
/// order of question
|
|
2373
|
-
order_no Int? //nullable for now to allow migration
|
|
2374
2384
|
/// Relations
|
|
2375
2385
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2376
2386
|
job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2377
2387
|
job_application_responses JobApplicationResponse[]
|
|
2378
2388
|
|
|
2379
2389
|
/// Indexes
|
|
2380
|
-
@@index([organisation_id, template_id
|
|
2390
|
+
@@index([organisation_id, template_id])
|
|
2381
2391
|
@@schema("public")
|
|
2382
2392
|
}
|
|
2383
2393
|
|
|
@@ -2405,14 +2415,13 @@ model JobApplicationResponse {
|
|
|
2405
2415
|
created_by String
|
|
2406
2416
|
updated_by String
|
|
2407
2417
|
is_active Boolean @default(true)
|
|
2408
|
-
order_no Int? //nullable for now to allow migration
|
|
2409
2418
|
/// Relations
|
|
2410
2419
|
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2411
2420
|
field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
2412
2421
|
document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2413
2422
|
|
|
2414
|
-
|
|
2415
|
-
@@index([application_id
|
|
2423
|
+
/// Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
|
|
2424
|
+
@@index([application_id])
|
|
2416
2425
|
@@index([job_application_field_id])
|
|
2417
2426
|
@@schema("public")
|
|
2418
2427
|
}
|
|
@@ -3707,24 +3716,12 @@ enum Difficulty {
|
|
|
3707
3716
|
@@schema("public")
|
|
3708
3717
|
}
|
|
3709
3718
|
|
|
3710
|
-
enum QuestionCategory {
|
|
3711
|
-
/// Aptitude, logical reasoning, numerical, verbal — non-domain general tests.
|
|
3712
|
-
GENERAL_APTITUDE
|
|
3713
|
-
/// Role/domain/technical knowledge (skills from JD and competencies).
|
|
3714
|
-
DOMAIN_KNOWLEDGE
|
|
3715
|
-
|
|
3716
|
-
@@schema("public")
|
|
3717
|
-
}
|
|
3718
|
-
|
|
3719
3719
|
model Question {
|
|
3720
3720
|
id String @id @default(uuid())
|
|
3721
3721
|
assessment_library_id String?
|
|
3722
3722
|
evaluation_plan_id String?
|
|
3723
3723
|
candidate_id String?
|
|
3724
3724
|
skill String?
|
|
3725
|
-
category QuestionCategory?
|
|
3726
|
-
/// Stable idempotency key for reusable bank rows: `{generationSeed}:{planSlot}`.
|
|
3727
|
-
bank_item_key String?
|
|
3728
3725
|
question String
|
|
3729
3726
|
answer String
|
|
3730
3727
|
options String[] // For MCQ's
|
|
@@ -3741,7 +3738,6 @@ model Question {
|
|
|
3741
3738
|
evaluationPlan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull)
|
|
3742
3739
|
candidateResponse CandidateQuestionResponse[]
|
|
3743
3740
|
|
|
3744
|
-
@@unique([assessment_library_id, bank_item_key])
|
|
3745
3741
|
@@schema("public")
|
|
3746
3742
|
}
|
|
3747
3743
|
|
|
@@ -3808,25 +3804,6 @@ model ReportingOverviewJobRecruiter {
|
|
|
3808
3804
|
@@schema("analytics")
|
|
3809
3805
|
}
|
|
3810
3806
|
|
|
3811
|
-
/// Lifecycle of an AI-authored resume. Legacy/uploaded rows leave this null.
|
|
3812
|
-
enum ResumeStatus {
|
|
3813
|
-
DRAFT
|
|
3814
|
-
GENERATING
|
|
3815
|
-
COMPLETED
|
|
3816
|
-
|
|
3817
|
-
@@schema("public")
|
|
3818
|
-
}
|
|
3819
|
-
|
|
3820
|
-
/// How a resume came to exist. Legacy rows leave this null (read as UPLOADED).
|
|
3821
|
-
enum ResumeOrigin {
|
|
3822
|
-
UPLOADED
|
|
3823
|
-
PARSED
|
|
3824
|
-
AI_GENERATED
|
|
3825
|
-
TAILORED
|
|
3826
|
-
|
|
3827
|
-
@@schema("public")
|
|
3828
|
-
}
|
|
3829
|
-
|
|
3830
3807
|
model Resume {
|
|
3831
3808
|
id String @id @default(uuid())
|
|
3832
3809
|
user_id String?
|
|
@@ -3863,32 +3840,8 @@ model Resume {
|
|
|
3863
3840
|
candidate_profile CandidateProfile? // one-to-one link
|
|
3864
3841
|
yearsOfExperience Int?
|
|
3865
3842
|
|
|
3866
|
-
/// Lifecycle for AI-authored resumes. Null for legacy/uploaded rows (treated as COMPLETED).
|
|
3867
|
-
status ResumeStatus?
|
|
3868
|
-
/// How this resume came to exist. Null for legacy rows (treated as UPLOADED).
|
|
3869
|
-
origin ResumeOrigin?
|
|
3870
|
-
/// Intake session id echoed to the client so a refresh can resume the conversation.
|
|
3871
|
-
intake_session_id String?
|
|
3872
|
-
/// Durable copy of the chat transcript for the AI intake; Redis is the hot path.
|
|
3873
|
-
conversation_history Json?
|
|
3874
|
-
/// Progress 0-100 reported by the ResumeIntake workflow.
|
|
3875
|
-
intake_progress Int?
|
|
3876
|
-
/// Last Orion execution id for the intake/generate workflow, for tracing.
|
|
3877
|
-
orion_execution_id String?
|
|
3878
|
-
|
|
3879
|
-
/// Raw job description text the candidate pasted to start a tailoring session.
|
|
3880
|
-
tailoring_jd_text String?
|
|
3881
|
-
/// Cached JobDescriptionParser output; computed once per tailoring session.
|
|
3882
|
-
tailoring_jd_parsed Json?
|
|
3883
|
-
/// Cached ResumeGapAnalysis output; computed once per tailoring session.
|
|
3884
|
-
tailoring_gap_analysis Json?
|
|
3885
|
-
/// Working tailored ResumeFormData. Scratch space only — materialised into
|
|
3886
|
-
/// `resume_data` when the candidate saves the draft.
|
|
3887
|
-
tailoring_draft Json?
|
|
3888
|
-
|
|
3889
3843
|
@@index([user_id])
|
|
3890
3844
|
@@index([file_hash])
|
|
3891
|
-
@@index([user_id, status])
|
|
3892
3845
|
@@schema("public")
|
|
3893
3846
|
}
|
|
3894
3847
|
|