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