@adaptware/eagles-db 0.5.64 → 0.5.65

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.
Files changed (68) hide show
  1. package/client/edge.js +84 -76
  2. package/client/index-browser.js +80 -72
  3. package/client/index.d.ts +6965 -5411
  4. package/client/index.js +84 -76
  5. package/client/package.json +1 -1
  6. package/client/schema.prisma +150 -135
  7. package/client/wasm.js +84 -76
  8. package/package.json +1 -1
  9. package/prisma/.DS_Store +0 -0
  10. package/prisma/schema/.DS_Store +0 -0
  11. package/prisma/schema/integration.prisma +0 -1
  12. package/prisma/schema/interview.prisma +13 -0
  13. package/prisma/schema/migrations/.DS_Store +0 -0
  14. package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/.DS_Store +0 -0
  15. package/prisma/schema/migrations/20260918153000_add_is_proctored_fields/migration.sql +2 -0
  16. package/prisma/schema/migrations/20260925200000_proctoring_drop_stitch_cols_and_unique/migration.sql +37 -0
  17. package/prisma/schema/migrations/20260925210000_proctoring_drop_session_candidate_id/migration.sql +3 -0
  18. package/prisma/schema/organisation.prisma +0 -2
  19. package/prisma/schema/proctoring.prisma +118 -0
  20. package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +0 -25
  21. package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +0 -24
  22. package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +0 -2
  23. package/prisma/schema/migrations/20260710120000_add_resume_rendered_export_fields/migration.sql +0 -9
  24. package/prisma/schema/migrations/20260714120000_add_job_description_display_html_document/migration.sql +0 -8
  25. package/prisma/schema/migrations/20260716120000_add_offer_letters/migration.sql +0 -183
  26. package/prisma/schema/migrations/20260716140000_offer_schema_refinements/migration.sql +0 -13
  27. package/prisma/schema/migrations/20260716160000_offer_schema_hardening/migration.sql +0 -95
  28. package/prisma/schema/migrations/20260716180000_offer_letter_template_config/migration.sql +0 -2
  29. package/prisma/schema/migrations/20260716190000_add_evaluation_focus_areas/migration.sql +0 -6
  30. package/prisma/schema/migrations/20260717120000_offer_workflow_approval/migration.sql +0 -30
  31. package/prisma/schema/migrations/20260720120000_offer_letter_template_is_draft/migration.sql +0 -5
  32. package/prisma/schema/migrations/20260720140000_offer_status_split/migration.sql +0 -51
  33. package/prisma/schema/migrations/20260720140001_offer_status_split_backfill/migration.sql +0 -37
  34. package/prisma/schema/migrations/20260722120000_offer_draft_edited_html/migration.sql +0 -13
  35. package/prisma/schema/migrations/20260723150000_offer_withdraw_actor_no_show_reason/migration.sql +0 -10
  36. package/prisma/schema/migrations/20260724120000_open_job_offer_accepted_declined_counts/migration.sql +0 -7
  37. package/prisma/schema/migrations/20260811120000_add_integration_provider_razorpay/migration.sql +0 -6
  38. package/prisma/schema/migrations/20260812120000_add_billing_transactions/migration.sql +0 -49
  39. package/prisma/schema/migrations/20260812130000_drop_billing_transaction_gst_snapshots/migration.sql +0 -3
  40. package/prisma/schema/migrations/20260812180000_billing_transaction_invoice_number/migration.sql +0 -5
  41. package/prisma/schema/migrations/20260813120000_payment_webhooks_gst_refunds/migration.sql +0 -79
  42. package/prisma/schema/migrations/20260813140000_platform_gst_profiles/migration.sql +0 -49
  43. package/prisma/schema/migrations/20260813150000_rename_gst_profiles/migration.sql +0 -53
  44. package/prisma/schema/migrations/20260813160000_remove_gst_billing/migration.sql +0 -16
  45. package/prisma/schema/migrations/20260813170000_billing_licensing_unrecoverable/migration.sql +0 -2
  46. package/prisma/schema/migrations/20260813180000_billing_transaction_payment_method/migration.sql +0 -2
  47. package/prisma/schema/migrations/20260814090000_billing_transaction_purchaser_email/migration.sql +0 -2
  48. package/prisma/schema/migrations/20260816100000_billing_product_organisations/migration.sql +0 -35
  49. package/prisma/schema/migrations/20260816120000_merge_billing_product_organisations/migration.sql +0 -25
  50. package/prisma/schema/migrations/20260817120000_billing_payment_mismatch/migration.sql +0 -7
  51. package/prisma/schema/migrations/20260819120000_billing_product_prices/migration.sql +0 -62
  52. package/prisma/schema/migrations/20260819140000_billing_exchange_rates/migration.sql +0 -25
  53. package/prisma/schema/migrations/20260820120000_billing_transaction_failure_category/migration.sql +0 -31
  54. package/prisma/schema/migrations/20260820130000_backfill_billing_transaction_failure_details/migration.sql +0 -23
  55. package/prisma/schema/migrations/20260820140000_drop_billing_product_price_overrides/migration.sql +0 -2
  56. package/prisma/schema/migrations/20260821120000_drop_billing_product_and_mock_licensing/migration.sql +0 -38
  57. package/prisma/schema/migrations/20260824120000_billing_transaction_purchase_display_name/migration.sql +0 -2
  58. package/prisma/schema/migrations/20260831120000_user_communication_email/migration.sql +0 -6
  59. package/prisma/schema/migrations/20260901143000_assessment_question_bank_state/migration.sql +0 -15
  60. package/prisma/schema/migrations/20260902120000_question_category_two_values/migration.sql +0 -16
  61. package/prisma/schema/migrations/20260902143000_question_bank_item_key/migration.sql +0 -17
  62. package/prisma/schema/migrations/20260903120000_split_round_type_assessment/migration.sql +0 -9
  63. package/prisma/schema/migrations/20260904110000_restore_round_type_assessment_enum/migration.sql +0 -5
  64. package/prisma/schema/migrations/20260904120000_revert_wrong_split_assessment_round_types/migration.sql +0 -42
  65. package/prisma/schema/migrations/20260909140000_profile_interview_session/migration.sql +0 -99
  66. package/prisma/schema/migrations/20260911120000_unify_profile_interview_into_interview/migration.sql +0 -139
  67. package/prisma/schema/payment/billingTransaction.prisma +0 -83
  68. package/prisma/schema/payment/paymentWebhookEvent.prisma +0 -28
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-d74526f1a30c6d557bd44d4d7187069253b3e53a24475a87103f0b235fd0e520",
2
+ "name": "prisma-client-7a0bff641aa99f4ac157d936332ef861e95d9b3896928640a3ca4c145117aae7",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -1843,7 +1843,6 @@ enum IntegrationProvider {
1843
1843
  MICROSOFT
1844
1844
  ZOOM
1845
1845
  CALENDLY
1846
- RAZORPAY
1847
1846
 
1848
1847
  @@schema("public")
1849
1848
  }
@@ -2002,6 +2001,7 @@ model Interview {
2002
2001
  recording_url String?
2003
2002
  recording_document_id String? @unique
2004
2003
  evaluation_type EvaluationType? @default(TREADSPACE_AI_ASSISTED)
2004
+ is_proctored Boolean @default(true) @map("is_proctored")
2005
2005
  ai_assistance_mode AiAssistanceMode? @default(ASSISTED)
2006
2006
  interview_status InterviewStatus @default(SCHEDULED)
2007
2007
  interview_platform InterviewPlatform @default(TREADSPACE)
@@ -2032,36 +2032,47 @@ model Interview {
2032
2032
  /// When final human feedback was submitted.
2033
2033
  evaluated_at DateTime?
2034
2034
 
2035
+ /// Candidate Acceptance & DPDP Consent
2036
+ candidate_status String? @default("INVITED")
2037
+ dpdp_consent_given Boolean @default(false)
2038
+ dpdp_consent_given_at DateTime?
2039
+ candidate_responded_at DateTime?
2040
+ decline_reason String?
2041
+
2035
2042
  /// Self-scheduling
2036
- reschedule_count Int @default(0)
2043
+ reschedule_count Int @default(0)
2037
2044
  last_rescheduled_at DateTime?
2038
2045
  first_assigned_at DateTime?
2039
2046
  /// True while the candidate is waiting on recruiter action (typically a
2040
2047
  /// reassign) after they submitted alternate slots via "None match" /
2041
2048
  /// "Suggest times". Cleared whenever the recruiter routes a fresh
2042
2049
  /// request via `upsertInterviewRequestRecord`.
2043
- awaiting_recruiter_action Boolean @default(false)
2050
+ awaiting_recruiter_action Boolean @default(false)
2044
2051
  /// Audit fields
2045
- created_at DateTime @default(now())
2046
- updated_at DateTime @updatedAt
2052
+ created_at DateTime @default(now())
2053
+ updated_at DateTime @updatedAt
2047
2054
  created_by String
2048
2055
  updated_by String
2049
- is_active Boolean @default(true)
2056
+ is_active Boolean @default(true)
2057
+
2058
+ //interview proctoring
2059
+ proctoringSession ProctoringSession?
2060
+
2050
2061
  // Relations
2051
- candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
2052
- interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
2053
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2054
- recording_document Document? @relation(fields: [recording_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2055
- job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2056
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
2057
- evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2058
- application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2059
- ongoing_evaluation OngoingEvaluation?
2060
- transcripts Transcript[]
2061
- suggestions Suggestion[]
2062
- interviewNotes InterviewNotes[]
2063
- liveAnalysis LiveAnalysis[]
2064
- zoom_meeting ZoomMeeting?
2062
+ candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
2063
+ interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
2064
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2065
+ recording_document Document? @relation(fields: [recording_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2066
+ job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2067
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
2068
+ evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2069
+ application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
2070
+ ongoing_evaluation OngoingEvaluation?
2071
+ transcripts Transcript[]
2072
+ suggestions Suggestion[]
2073
+ interviewNotes InterviewNotes[]
2074
+ liveAnalysis LiveAnalysis[]
2075
+ zoom_meeting ZoomMeeting?
2065
2076
 
2066
2077
  // Indexes
2067
2078
  @@index([candidate_id])
@@ -3598,8 +3609,6 @@ model Organisation {
3598
3609
  licensing_ledger_entries LicensingLedgerEntry[]
3599
3610
  license_package_organisations LicensePackageOrganisation[]
3600
3611
  ai_cost_ledger_entries AiCostLedgerEntry[]
3601
- billing_transactions BillingTransaction[]
3602
- payment_webhook_events PaymentWebhookEvent[]
3603
3612
 
3604
3613
  @@index([name])
3605
3614
  @@schema("public")
@@ -3619,119 +3628,6 @@ model OrganisationConfig {
3619
3628
  @@schema("public")
3620
3629
  }
3621
3630
 
3622
- // PAYMENT SERVICE boundary — portable payment microservice owns these enums/columns.
3623
-
3624
- enum BillingTransactionStatus {
3625
- INITIATED
3626
- ORDER_CREATED
3627
- PAYMENT_PENDING
3628
- SUCCESS
3629
- FAILED
3630
- CANCELLED
3631
- REFUND_PENDING
3632
- REFUND_FAILED
3633
- REFUNDED
3634
-
3635
- @@schema("public")
3636
- }
3637
-
3638
- enum BillingTransactionType {
3639
- PURCHASE
3640
- TOP_UP
3641
- REFUND
3642
-
3643
- @@schema("public")
3644
- }
3645
-
3646
- enum BillingTransactionFailureCategory {
3647
- RAZORPAY_ORDER
3648
- RAZORPAY_PAYMENT
3649
- REFUND
3650
- INTERNAL
3651
-
3652
- @@schema("public")
3653
- }
3654
-
3655
- /// Payment reconciliation state when Treadspace status is FAILED but Razorpay captured payment.
3656
- enum BillingPaymentMismatchStatus {
3657
- DETECTED
3658
- UNFULFILLED
3659
-
3660
- @@schema("public")
3661
- }
3662
-
3663
- /// Financial transaction lifecycle for organisation billing purchases.
3664
- model BillingTransaction {
3665
- id String @id @default(uuid())
3666
- organisation_id String
3667
- /// Opaque plan/product identity supplied at checkout. Not a catalog FK.
3668
- purchase_reference String
3669
- /// Human-readable snapshot captured at checkout for invoices and receipts.
3670
- purchase_display_name String?
3671
- transaction_type BillingTransactionType
3672
- status BillingTransactionStatus @default(INITIATED)
3673
- failure_category BillingTransactionFailureCategory?
3674
- /// Human-readable or provider detail (e.g. Razorpay error_description).
3675
- failure_reason String?
3676
- amount Int
3677
- currency String @default("INR")
3678
- razorpay_order_id String?
3679
- razorpay_payment_id String? @unique
3680
- /// Razorpay payment method at capture (card, netbanking, upi, wallet, etc.).
3681
- payment_method String?
3682
- razorpay_subscription_id String?
3683
- razorpay_refund_id String?
3684
- refund_reason String?
3685
- refund_amount Int?
3686
- idempotency_key String @unique
3687
- invoice_number String? @unique
3688
- /// Email of the org Admin who initiated checkout (bill-to).
3689
- purchaser_email String?
3690
- /// Set when FAILED but Razorpay order/payment is captured (reconciliation path).
3691
- payment_mismatch_status BillingPaymentMismatchStatus?
3692
- /// Strict same-intent SUCCESS transaction that fulfilled the purchase (UNFULFILLED only).
3693
- payment_mismatch_fulfilled_by_id String?
3694
- created_at DateTime @default(now())
3695
- updated_at DateTime @updatedAt
3696
-
3697
- organisation Organisation @relation(fields: [organisation_id], references: [id])
3698
-
3699
- @@index([organisation_id, status])
3700
- @@index([purchase_reference])
3701
- @@index([razorpay_order_id])
3702
- @@map("billing_transactions")
3703
- @@schema("public")
3704
- }
3705
-
3706
- enum PaymentWebhookEventStatus {
3707
- RECEIVED
3708
- PROCESSED
3709
- FAILED
3710
-
3711
- @@schema("public")
3712
- }
3713
-
3714
- /// Idempotent record of payment provider webhook deliveries.
3715
- model PaymentWebhookEvent {
3716
- id String @id @default(uuid())
3717
- organisation_id String?
3718
- provider String
3719
- provider_event_id String
3720
- event_type String
3721
- status PaymentWebhookEventStatus @default(RECEIVED)
3722
- billing_transaction_id String?
3723
- error_message String?
3724
- processed_at DateTime?
3725
- created_at DateTime @default(now())
3726
-
3727
- organisation Organisation? @relation(fields: [organisation_id], references: [id])
3728
-
3729
- @@unique([provider, provider_event_id])
3730
- @@index([status, created_at])
3731
- @@map("payment_webhook_events")
3732
- @@schema("public")
3733
- }
3734
-
3735
3631
  model Permission {
3736
3632
  id String @id @default(uuid())
3737
3633
  permissions String[] @default([])
@@ -3818,6 +3714,125 @@ model PipelineDistributionAnalyticsDaily {
3818
3714
  @@schema("analytics")
3819
3715
  }
3820
3716
 
3717
+ enum RiskLevel {
3718
+ LOW
3719
+ MEDIUM
3720
+ HIGH
3721
+ CRITICAL
3722
+
3723
+ @@schema("public")
3724
+ }
3725
+
3726
+ enum AnalysisStatus {
3727
+ QUEUED
3728
+ RUNNING
3729
+ COMPLETED
3730
+ FAILED
3731
+
3732
+ @@schema("public")
3733
+ }
3734
+
3735
+ enum ProctoringEventType {
3736
+ GAZE_DISRUPTION
3737
+ OBJECT_DETECTED
3738
+ FACE_MISSING
3739
+ MULTIPLE_FACES
3740
+ BROWSER_TAB_SWITCH
3741
+ BROWSER_BLUR
3742
+ FULLSCREEN_EXIT
3743
+
3744
+ @@schema("public")
3745
+ }
3746
+
3747
+ enum ProctoringSessionStatus {
3748
+ NOT_STARTED
3749
+ CALIBRATING
3750
+ CALIBRATED
3751
+ PROCESSING
3752
+ COMPLETED
3753
+ FAILED
3754
+
3755
+ @@schema("public")
3756
+ }
3757
+
3758
+ model ProctoringSession {
3759
+ id String @id @default(uuid()) @map("id")
3760
+ interviewId String @unique @map("interview_id")
3761
+ interview Interview @relation(fields: [interviewId], references: [id], onDelete: Cascade)
3762
+
3763
+ // Proctoring Lifecycle & Media
3764
+ status ProctoringSessionStatus @default(NOT_STARTED) @map("status")
3765
+ calibrationFeatures Json? @map("calibration_features")
3766
+ chunkCount Int @default(0) @map("chunk_count")
3767
+ completedChunks Int @default(0) @map("completed_chunks")
3768
+
3769
+ // High-Level Aggregated Metrics for Downstream AI Evaluation
3770
+ overallRisk RiskLevel @default(LOW) @map("overall_risk")
3771
+ integrityScore Float @default(100.0) @map("integrity_score")
3772
+
3773
+ totalDurationSec Float @default(0.0) @map("total_duration_sec")
3774
+ faceDetectedPct Float? @map("face_detected_pct")
3775
+ onScreenGazePct Float? @map("on_screen_gaze_pct")
3776
+
3777
+ // Event Counters
3778
+ totalGazeEvents Int @default(0) @map("total_gaze_events")
3779
+ totalObjectEvents Int @default(0) @map("total_object_events")
3780
+ totalFaceEvents Int @default(0) @map("total_face_events")
3781
+ totalBrowserEvents Int @default(0) @map("total_browser_events")
3782
+
3783
+ createdAt DateTime @default(now()) @map("created_at")
3784
+ updatedAt DateTime @updatedAt @map("updated_at")
3785
+
3786
+ analyses ProctoringAnalysis[]
3787
+ events ProctoringEvent[]
3788
+
3789
+ @@map("proctoring_sessions")
3790
+ @@schema("public")
3791
+ }
3792
+
3793
+ model ProctoringAnalysis {
3794
+ id String @id @default(uuid()) @map("id")
3795
+ sessionId String @map("session_id")
3796
+ session ProctoringSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
3797
+
3798
+ status AnalysisStatus @default(QUEUED)
3799
+
3800
+ chunkIndex Int @default(0) @map("chunk_index")
3801
+ startTimeSec Float @default(0.0) @map("start_time_sec")
3802
+ endTimeSec Float @default(0.0) @map("end_time_sec")
3803
+
3804
+ videoKey String? @map("video_key")
3805
+ annotatedKey String? @map("annotated_key")
3806
+
3807
+ error String?
3808
+ createdAt DateTime @default(now()) @map("created_at")
3809
+ updatedAt DateTime @updatedAt @map("updated_at")
3810
+
3811
+ @@unique([sessionId, chunkIndex])
3812
+ @@map("proctoring_analyses")
3813
+ @@schema("public")
3814
+ }
3815
+
3816
+ model ProctoringEvent {
3817
+ id String @id @default(uuid()) @map("id")
3818
+ sessionId String @map("session_id")
3819
+ session ProctoringSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
3820
+
3821
+ eventType ProctoringEventType @map("event_type")
3822
+ timestampSec Float @map("timestamp_sec")
3823
+ timestampStr String @map("timestamp_str")
3824
+
3825
+ risk RiskLevel @default(LOW)
3826
+ metadata Json?
3827
+
3828
+ createdAt DateTime @default(now()) @map("created_at")
3829
+
3830
+ @@index([sessionId, timestampSec])
3831
+ @@index([sessionId, eventType])
3832
+ @@map("proctoring_events")
3833
+ @@schema("public")
3834
+ }
3835
+
3821
3836
  enum AsyncOperationStatus {
3822
3837
  PENDING
3823
3838
  IN_PROGRESS