@adaptware/eagles-db 0.5.40 → 0.5.41
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 +21 -15
- package/client/index-browser.js +14 -9
- package/client/index.d.ts +248 -1046
- package/client/index.js +26 -20
- package/client/package.json +1 -1
- package/client/schema.prisma +80 -68
- package/client/wasm.js +21 -15
- package/package.json +1 -1
- package/prisma/schema/applications.prisma +29 -34
- package/prisma/schema/assessmentLibrary.prisma +2 -0
- package/prisma/schema/document.prisma +0 -1
- package/prisma/schema/evaluationPlan.prisma +9 -0
- package/prisma/schema/jobApplicationFields.prisma +15 -19
- package/prisma/schema/jobApplicationResponse.prisma +5 -7
- 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/20260710120000_add_resume_rendered_export_fields/migration.sql +9 -0
- package/prisma/schema/migrations/20260714120000_add_job_description_display_html_document/migration.sql +8 -0
- package/prisma/schema/migrations/20260716120000_add_offer_letters/migration.sql +183 -0
- package/prisma/schema/migrations/20260716140000_offer_schema_refinements/migration.sql +13 -0
- package/prisma/schema/migrations/20260716160000_offer_schema_hardening/migration.sql +95 -0
- package/prisma/schema/migrations/20260716180000_offer_letter_template_config/migration.sql +2 -0
- package/prisma/schema/migrations/20260716190000_add_evaluation_focus_areas/migration.sql +6 -0
- package/prisma/schema/migrations/20260717120000_offer_workflow_approval/migration.sql +30 -0
- package/prisma/schema/migrations/20260720120000_offer_letter_template_is_draft/migration.sql +5 -0
- package/prisma/schema/migrations/20260720140000_offer_status_split/migration.sql +51 -0
- package/prisma/schema/migrations/20260720140001_offer_status_split_backfill/migration.sql +37 -0
- package/prisma/schema/migrations/20260722120000_offer_draft_edited_html/migration.sql +13 -0
- package/prisma/schema/migrations/20260723150000_offer_withdraw_actor_no_show_reason/migration.sql +10 -0
- package/prisma/schema/migrations/20260724120000_open_job_offer_accepted_declined_counts/migration.sql +7 -0
- package/prisma/schema/migrations/20260811120000_add_integration_provider_razorpay/migration.sql +6 -0
- package/prisma/schema/migrations/20260812120000_add_billing_transactions/migration.sql +49 -0
- package/prisma/schema/migrations/20260812130000_drop_billing_transaction_gst_snapshots/migration.sql +3 -0
- package/prisma/schema/migrations/20260812180000_billing_transaction_invoice_number/migration.sql +5 -0
- package/prisma/schema/migrations/20260813120000_payment_webhooks_gst_refunds/migration.sql +79 -0
- package/prisma/schema/migrations/20260813140000_platform_gst_profiles/migration.sql +49 -0
- package/prisma/schema/migrations/20260813150000_rename_gst_profiles/migration.sql +53 -0
- package/prisma/schema/migrations/20260813160000_remove_gst_billing/migration.sql +16 -0
- package/prisma/schema/migrations/20260813170000_billing_licensing_unrecoverable/migration.sql +2 -0
- package/prisma/schema/migrations/20260813180000_billing_transaction_payment_method/migration.sql +2 -0
- package/prisma/schema/migrations/20260814090000_billing_transaction_purchaser_email/migration.sql +2 -0
- package/prisma/schema/migrations/20260816100000_billing_product_organisations/migration.sql +35 -0
- package/prisma/schema/migrations/20260816120000_merge_billing_product_organisations/migration.sql +25 -0
- package/prisma/schema/migrations/20260817120000_billing_payment_mismatch/migration.sql +7 -0
- package/prisma/schema/migrations/20260819120000_billing_product_prices/migration.sql +62 -0
- package/prisma/schema/migrations/20260819140000_billing_exchange_rates/migration.sql +25 -0
- package/prisma/schema/migrations/20260820120000_billing_transaction_failure_category/migration.sql +31 -0
- package/prisma/schema/migrations/20260820130000_backfill_billing_transaction_failure_details/migration.sql +23 -0
- package/prisma/schema/migrations/20260820140000_drop_billing_product_price_overrides/migration.sql +2 -0
- package/prisma/schema/migrations/20260821120000_drop_billing_product_and_mock_licensing/migration.sql +38 -0
- package/prisma/schema/migrations/20260824120000_billing_transaction_purchase_display_name/migration.sql +2 -0
- package/prisma/schema/migrations/20260831120000_user_communication_email/migration.sql +6 -0
- package/prisma/schema/migrations/20260901143000_assessment_question_bank_state/migration.sql +15 -0
- package/prisma/schema/migrations/20260902120000_question_category_two_values/migration.sql +16 -0
- package/prisma/schema/migrations/20260902143000_question_bank_item_key/migration.sql +17 -0
- package/prisma/schema/migrations/20260903120000_split_round_type_assessment/migration.sql +9 -0
- package/prisma/schema/migrations/20260904110000_restore_round_type_assessment_enum/migration.sql +5 -0
- package/prisma/schema/migrations/20260904120000_revert_wrong_split_assessment_round_types/migration.sql +42 -0
- package/prisma/schema/questions.prisma +13 -0
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/migrations/.DS_Store +0 -0
- package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/.DS_Store +0 -0
- package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/migration.sql +0 -13
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -414,53 +414,49 @@ 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("{}")
|
|
454
|
-
|
|
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)
|
|
455
451
|
/// Relations
|
|
456
|
-
evaluation_plan EvaluationPlan?
|
|
457
|
-
candidate User
|
|
458
|
-
organisation Organisation
|
|
459
|
-
resume Resume
|
|
460
|
-
job_description JobDescription
|
|
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)
|
|
461
457
|
fit_check FitCheck?
|
|
462
|
-
recruiter User?
|
|
463
|
-
source Source?
|
|
458
|
+
recruiter User? @relation("ApplicationRecruiter", fields: [recruiter_id], references: [id])
|
|
459
|
+
source Source? @relation(fields: [source_id], references: [id], onDelete: SetNull)
|
|
464
460
|
interviews Interview[]
|
|
465
461
|
assignments Assignment[]
|
|
466
462
|
ongoing_evaluations OngoingEvaluation[]
|
|
@@ -470,7 +466,6 @@ model Application {
|
|
|
470
466
|
communication_messages CommunicationMessage[]
|
|
471
467
|
job_application_responses JobApplicationResponse[]
|
|
472
468
|
offer Offer?
|
|
473
|
-
fit_check_report_document Document? @relation("ApplicationFitCheckReportDocument", fields: [fit_check_report_document_id], references: [id], onDelete: SetNull)
|
|
474
469
|
|
|
475
470
|
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
476
471
|
@@index([candidate_id])
|
|
@@ -557,6 +552,8 @@ model AssessmentLibrary {
|
|
|
557
552
|
created_by String
|
|
558
553
|
updated_by String
|
|
559
554
|
is_active Boolean @default(true)
|
|
555
|
+
/// Frozen question plan, batch cursor, and bank-generation status (JSON).
|
|
556
|
+
generation_state Json?
|
|
560
557
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
561
558
|
questions Question[] // One assessment → many questions
|
|
562
559
|
assessments Assessment[]
|
|
@@ -1406,7 +1403,6 @@ model Document {
|
|
|
1406
1403
|
offer_letters OfferLetter[] @relation("OfferLetterPdf")
|
|
1407
1404
|
offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
|
|
1408
1405
|
offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
|
|
1409
|
-
application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
|
|
1410
1406
|
|
|
1411
1407
|
// Indexes
|
|
1412
1408
|
@@index([candidate_id])
|
|
@@ -1449,8 +1445,17 @@ model EvaluationCriteria {
|
|
|
1449
1445
|
@@schema("public")
|
|
1450
1446
|
}
|
|
1451
1447
|
|
|
1448
|
+
/// MCQ / interview round classification on EvaluationPlan and analytics.
|
|
1449
|
+
/// ASSESSMENT is the legacy value kept for backward compatibility — do not drop it.
|
|
1450
|
+
/// GENERAL_APTITUDE_ASSESSMENT and DOMAIN_KNOWLEDGE_ASSESSMENT are explicit split
|
|
1451
|
+
/// types for new aptitude vs domain-knowledge MCQ rounds only.
|
|
1452
1452
|
enum RoundType {
|
|
1453
|
+
/// Legacy MCQ round type; existing plans and analytics may still use this.
|
|
1453
1454
|
ASSESSMENT
|
|
1455
|
+
/// New explicit general-aptitude MCQ round.
|
|
1456
|
+
GENERAL_APTITUDE_ASSESSMENT
|
|
1457
|
+
/// New explicit domain-knowledge MCQ round.
|
|
1458
|
+
DOMAIN_KNOWLEDGE_ASSESSMENT
|
|
1454
1459
|
INTERVIEW
|
|
1455
1460
|
ASSIGNMENT
|
|
1456
1461
|
SCREENING
|
|
@@ -2370,34 +2375,30 @@ enum JobApplicationFieldType {
|
|
|
2370
2375
|
|
|
2371
2376
|
model JobApplicationField {
|
|
2372
2377
|
/// Primary key (UUID)
|
|
2373
|
-
id
|
|
2378
|
+
id String @id @default(uuid())
|
|
2374
2379
|
/// Foreign keys
|
|
2375
|
-
organisation_id
|
|
2376
|
-
template_id
|
|
2380
|
+
organisation_id String
|
|
2381
|
+
template_id String
|
|
2377
2382
|
/// Data fields
|
|
2378
|
-
field_type
|
|
2379
|
-
label
|
|
2380
|
-
description
|
|
2381
|
-
is_mandatory
|
|
2382
|
-
is_draft
|
|
2383
|
-
options
|
|
2383
|
+
field_type JobApplicationFieldType
|
|
2384
|
+
label String
|
|
2385
|
+
description String?
|
|
2386
|
+
is_mandatory Boolean @default(false)
|
|
2387
|
+
is_draft Boolean @default(true)
|
|
2388
|
+
options String[]
|
|
2384
2389
|
/// Audit fields
|
|
2385
|
-
is_active
|
|
2386
|
-
created_by
|
|
2387
|
-
updated_by
|
|
2388
|
-
created_at
|
|
2389
|
-
updated_at
|
|
2390
|
-
|
|
2391
|
-
/// order of question
|
|
2392
|
-
order_no Int? //nullable for now to allow migration
|
|
2393
|
-
|
|
2390
|
+
is_active Boolean @default(true)
|
|
2391
|
+
created_by String
|
|
2392
|
+
updated_by String
|
|
2393
|
+
created_at DateTime @default(now())
|
|
2394
|
+
updated_at DateTime @updatedAt
|
|
2394
2395
|
/// Relations
|
|
2395
2396
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2396
2397
|
job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2397
2398
|
job_application_responses JobApplicationResponse[]
|
|
2398
2399
|
|
|
2399
2400
|
/// Indexes
|
|
2400
|
-
@@index([organisation_id, template_id
|
|
2401
|
+
@@index([organisation_id, template_id])
|
|
2401
2402
|
@@schema("public")
|
|
2402
2403
|
}
|
|
2403
2404
|
|
|
@@ -2425,15 +2426,13 @@ model JobApplicationResponse {
|
|
|
2425
2426
|
created_by String
|
|
2426
2427
|
updated_by String
|
|
2427
2428
|
is_active Boolean @default(true)
|
|
2428
|
-
order_no Int? //nullable for now to allow migration
|
|
2429
|
-
|
|
2430
2429
|
/// Relations
|
|
2431
|
-
application
|
|
2432
|
-
field
|
|
2433
|
-
document
|
|
2430
|
+
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2431
|
+
field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
2432
|
+
document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2434
2433
|
|
|
2435
|
-
|
|
2436
|
-
@@index([application_id
|
|
2434
|
+
/// Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
|
|
2435
|
+
@@index([application_id])
|
|
2437
2436
|
@@index([job_application_field_id])
|
|
2438
2437
|
@@schema("public")
|
|
2439
2438
|
}
|
|
@@ -3728,12 +3727,24 @@ enum Difficulty {
|
|
|
3728
3727
|
@@schema("public")
|
|
3729
3728
|
}
|
|
3730
3729
|
|
|
3730
|
+
enum QuestionCategory {
|
|
3731
|
+
/// Aptitude, logical reasoning, numerical, verbal — non-domain general tests.
|
|
3732
|
+
GENERAL_APTITUDE
|
|
3733
|
+
/// Role/domain/technical knowledge (skills from JD and competencies).
|
|
3734
|
+
DOMAIN_KNOWLEDGE
|
|
3735
|
+
|
|
3736
|
+
@@schema("public")
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3731
3739
|
model Question {
|
|
3732
3740
|
id String @id @default(uuid())
|
|
3733
3741
|
assessment_library_id String?
|
|
3734
3742
|
evaluation_plan_id String?
|
|
3735
3743
|
candidate_id String?
|
|
3736
3744
|
skill String?
|
|
3745
|
+
category QuestionCategory?
|
|
3746
|
+
/// Stable idempotency key for reusable bank rows: `{generationSeed}:{planSlot}`.
|
|
3747
|
+
bank_item_key String?
|
|
3737
3748
|
question String
|
|
3738
3749
|
answer String
|
|
3739
3750
|
options String[] // For MCQ's
|
|
@@ -3750,6 +3761,7 @@ model Question {
|
|
|
3750
3761
|
evaluationPlan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull)
|
|
3751
3762
|
candidateResponse CandidateQuestionResponse[]
|
|
3752
3763
|
|
|
3764
|
+
@@unique([assessment_library_id, bank_item_key])
|
|
3753
3765
|
@@schema("public")
|
|
3754
3766
|
}
|
|
3755
3767
|
|