@adaptware/eagles-db 0.5.37 → 0.5.40
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 -10
- package/client/index-browser.js +8 -3
- package/client/index.d.ts +1042 -12
- package/client/index.js +20 -15
- package/client/package.json +1 -1
- package/client/schema.prisma +68 -56
- package/client/wasm.js +15 -10
- 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/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/client/libquery_engine-darwin.dylib.node +0 -0
- package/prisma/migrations/20260519120000_migrate_shortlisted_to_selected/migration.sql +0 -2
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])
|
|
@@ -1401,6 +1406,7 @@ model Document {
|
|
|
1401
1406
|
offer_letters OfferLetter[] @relation("OfferLetterPdf")
|
|
1402
1407
|
offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
|
|
1403
1408
|
offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
|
|
1409
|
+
application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
|
|
1404
1410
|
|
|
1405
1411
|
// Indexes
|
|
1406
1412
|
@@index([candidate_id])
|
|
@@ -2364,30 +2370,34 @@ enum JobApplicationFieldType {
|
|
|
2364
2370
|
|
|
2365
2371
|
model JobApplicationField {
|
|
2366
2372
|
/// Primary key (UUID)
|
|
2367
|
-
id
|
|
2373
|
+
id String @id @default(uuid())
|
|
2368
2374
|
/// Foreign keys
|
|
2369
|
-
organisation_id
|
|
2370
|
-
template_id
|
|
2375
|
+
organisation_id String
|
|
2376
|
+
template_id String
|
|
2371
2377
|
/// Data fields
|
|
2372
|
-
field_type
|
|
2373
|
-
label
|
|
2374
|
-
description
|
|
2375
|
-
is_mandatory
|
|
2376
|
-
is_draft
|
|
2377
|
-
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[]
|
|
2378
2384
|
/// Audit fields
|
|
2379
|
-
is_active
|
|
2380
|
-
created_by
|
|
2381
|
-
updated_by
|
|
2382
|
-
created_at
|
|
2383
|
-
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
|
+
|
|
2384
2394
|
/// Relations
|
|
2385
2395
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2386
2396
|
job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2387
2397
|
job_application_responses JobApplicationResponse[]
|
|
2388
2398
|
|
|
2389
2399
|
/// Indexes
|
|
2390
|
-
@@index([organisation_id, template_id])
|
|
2400
|
+
@@index([organisation_id, template_id, order_no])
|
|
2391
2401
|
@@schema("public")
|
|
2392
2402
|
}
|
|
2393
2403
|
|
|
@@ -2415,13 +2425,15 @@ model JobApplicationResponse {
|
|
|
2415
2425
|
created_by String
|
|
2416
2426
|
updated_by String
|
|
2417
2427
|
is_active Boolean @default(true)
|
|
2428
|
+
order_no Int? //nullable for now to allow migration
|
|
2429
|
+
|
|
2418
2430
|
/// Relations
|
|
2419
|
-
application
|
|
2420
|
-
field
|
|
2421
|
-
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)
|
|
2422
2434
|
|
|
2423
|
-
|
|
2424
|
-
@@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])
|
|
2425
2437
|
@@index([job_application_field_id])
|
|
2426
2438
|
@@schema("public")
|
|
2427
2439
|
}
|