@adaptware/eagles-db 0.5.48 → 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 +25 -52
- package/client/index-browser.js +19 -45
- package/client/index.d.ts +2340 -2835
- package/client/index.js +25 -52
- package/client/libquery_engine-darwin.dylib.node +0 -0
- package/client/package.json +1 -1
- package/client/schema.prisma +70 -122
- package/client/wasm.js +25 -52
- 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/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
- package/prisma/schema/migrations/.DS_Store +0 -0
- package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/.DS_Store +0 -0
|
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
|
|
@@ -1967,7 +1978,6 @@ model Interview {
|
|
|
1967
1978
|
resume_id String
|
|
1968
1979
|
job_description_id String
|
|
1969
1980
|
calendar_event_id String?
|
|
1970
|
-
calendar_events Json?
|
|
1971
1981
|
/// Data
|
|
1972
1982
|
room_name String?
|
|
1973
1983
|
/// @deprecated Prefer `ai_feedback.feedback` (narrative string on AI feedback JSON).
|
|
@@ -2037,6 +2047,7 @@ model Interview {
|
|
|
2037
2047
|
ongoing_evaluation OngoingEvaluation?
|
|
2038
2048
|
transcripts Transcript[]
|
|
2039
2049
|
suggestions Suggestion[]
|
|
2050
|
+
feedback Feedback[]
|
|
2040
2051
|
interviewNotes InterviewNotes[]
|
|
2041
2052
|
liveAnalysis LiveAnalysis[]
|
|
2042
2053
|
zoom_meeting ZoomMeeting?
|
|
@@ -2370,15 +2381,13 @@ model JobApplicationField {
|
|
|
2370
2381
|
updated_by String
|
|
2371
2382
|
created_at DateTime @default(now())
|
|
2372
2383
|
updated_at DateTime @updatedAt
|
|
2373
|
-
/// order of question
|
|
2374
|
-
order_no Int? //nullable for now to allow migration
|
|
2375
2384
|
/// Relations
|
|
2376
2385
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2377
2386
|
job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2378
2387
|
job_application_responses JobApplicationResponse[]
|
|
2379
2388
|
|
|
2380
2389
|
/// Indexes
|
|
2381
|
-
@@index([organisation_id, template_id
|
|
2390
|
+
@@index([organisation_id, template_id])
|
|
2382
2391
|
@@schema("public")
|
|
2383
2392
|
}
|
|
2384
2393
|
|
|
@@ -2406,14 +2415,13 @@ model JobApplicationResponse {
|
|
|
2406
2415
|
created_by String
|
|
2407
2416
|
updated_by String
|
|
2408
2417
|
is_active Boolean @default(true)
|
|
2409
|
-
order_no Int? //nullable for now to allow migration
|
|
2410
2418
|
/// Relations
|
|
2411
2419
|
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2412
2420
|
field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
2413
2421
|
document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2414
2422
|
|
|
2415
|
-
|
|
2416
|
-
@@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])
|
|
2417
2425
|
@@index([job_application_field_id])
|
|
2418
2426
|
@@schema("public")
|
|
2419
2427
|
}
|
|
@@ -3708,24 +3716,12 @@ enum Difficulty {
|
|
|
3708
3716
|
@@schema("public")
|
|
3709
3717
|
}
|
|
3710
3718
|
|
|
3711
|
-
enum QuestionCategory {
|
|
3712
|
-
/// Aptitude, logical reasoning, numerical, verbal — non-domain general tests.
|
|
3713
|
-
GENERAL_APTITUDE
|
|
3714
|
-
/// Role/domain/technical knowledge (skills from JD and competencies).
|
|
3715
|
-
DOMAIN_KNOWLEDGE
|
|
3716
|
-
|
|
3717
|
-
@@schema("public")
|
|
3718
|
-
}
|
|
3719
|
-
|
|
3720
3719
|
model Question {
|
|
3721
3720
|
id String @id @default(uuid())
|
|
3722
3721
|
assessment_library_id String?
|
|
3723
3722
|
evaluation_plan_id String?
|
|
3724
3723
|
candidate_id String?
|
|
3725
3724
|
skill String?
|
|
3726
|
-
category QuestionCategory?
|
|
3727
|
-
/// Stable idempotency key for reusable bank rows: `{generationSeed}:{planSlot}`.
|
|
3728
|
-
bank_item_key String?
|
|
3729
3725
|
question String
|
|
3730
3726
|
answer String
|
|
3731
3727
|
options String[] // For MCQ's
|
|
@@ -3742,7 +3738,6 @@ model Question {
|
|
|
3742
3738
|
evaluationPlan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull)
|
|
3743
3739
|
candidateResponse CandidateQuestionResponse[]
|
|
3744
3740
|
|
|
3745
|
-
@@unique([assessment_library_id, bank_item_key])
|
|
3746
3741
|
@@schema("public")
|
|
3747
3742
|
}
|
|
3748
3743
|
|
|
@@ -3809,25 +3804,6 @@ model ReportingOverviewJobRecruiter {
|
|
|
3809
3804
|
@@schema("analytics")
|
|
3810
3805
|
}
|
|
3811
3806
|
|
|
3812
|
-
/// Lifecycle of an AI-authored resume. Legacy/uploaded rows leave this null.
|
|
3813
|
-
enum ResumeStatus {
|
|
3814
|
-
DRAFT
|
|
3815
|
-
GENERATING
|
|
3816
|
-
COMPLETED
|
|
3817
|
-
|
|
3818
|
-
@@schema("public")
|
|
3819
|
-
}
|
|
3820
|
-
|
|
3821
|
-
/// How a resume came to exist. Legacy rows leave this null (read as UPLOADED).
|
|
3822
|
-
enum ResumeOrigin {
|
|
3823
|
-
UPLOADED
|
|
3824
|
-
PARSED
|
|
3825
|
-
AI_GENERATED
|
|
3826
|
-
TAILORED
|
|
3827
|
-
|
|
3828
|
-
@@schema("public")
|
|
3829
|
-
}
|
|
3830
|
-
|
|
3831
3807
|
model Resume {
|
|
3832
3808
|
id String @id @default(uuid())
|
|
3833
3809
|
user_id String?
|
|
@@ -3864,34 +3840,8 @@ model Resume {
|
|
|
3864
3840
|
candidate_profile CandidateProfile? // one-to-one link
|
|
3865
3841
|
yearsOfExperience Int?
|
|
3866
3842
|
|
|
3867
|
-
/// Lifecycle for AI-authored resumes. Null for legacy/uploaded rows (treated as COMPLETED).
|
|
3868
|
-
status ResumeStatus?
|
|
3869
|
-
/// How this resume came to exist. Null for legacy rows (treated as UPLOADED).
|
|
3870
|
-
origin ResumeOrigin?
|
|
3871
|
-
/// Intake session id echoed to the client so a refresh can resume the conversation.
|
|
3872
|
-
intake_session_id String?
|
|
3873
|
-
/// Durable copy of the chat transcript for the AI intake; Redis is the hot path.
|
|
3874
|
-
conversation_history Json?
|
|
3875
|
-
/// Progress 0-100 reported by the ResumeIntake workflow.
|
|
3876
|
-
intake_progress Int?
|
|
3877
|
-
/// Last Orion execution id for the intake/generate workflow, for tracing.
|
|
3878
|
-
orion_execution_id String?
|
|
3879
|
-
|
|
3880
|
-
/// Raw job description text the candidate pasted to start a tailoring session.
|
|
3881
|
-
tailoring_jd_text String?
|
|
3882
|
-
/// Cached JobDescriptionParser output; computed once per tailoring session.
|
|
3883
|
-
tailoring_jd_parsed Json?
|
|
3884
|
-
/// Cached ResumeGapAnalysis output; computed once per tailoring session.
|
|
3885
|
-
tailoring_gap_analysis Json?
|
|
3886
|
-
/// Working tailoring state: the draft ResumeFormData, tailoring notes, the
|
|
3887
|
-
/// pending contradiction awaiting resolution, and the question counter.
|
|
3888
|
-
/// Scratch space only — the draft is materialised into `resume_data` when the
|
|
3889
|
-
/// candidate saves it.
|
|
3890
|
-
tailoring_draft Json?
|
|
3891
|
-
|
|
3892
3843
|
@@index([user_id])
|
|
3893
3844
|
@@index([file_hash])
|
|
3894
|
-
@@index([user_id, status])
|
|
3895
3845
|
@@schema("public")
|
|
3896
3846
|
}
|
|
3897
3847
|
|
|
@@ -4386,8 +4336,6 @@ model User {
|
|
|
4386
4336
|
created_by String
|
|
4387
4337
|
updated_by String
|
|
4388
4338
|
is_active Boolean @default(true)
|
|
4389
|
-
/// Set when removed from team (Delete); null for active/inactive-only users.
|
|
4390
|
-
deleted_at DateTime?
|
|
4391
4339
|
is_self_registered Boolean @default(true)
|
|
4392
4340
|
permission_id String? @unique
|
|
4393
4341
|
preferences Json? @default("{}")
|