@adaptware/eagles-db 0.6.5 → 0.6.7

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-66790326d67a03b233e17eee296bab13c20421ee1fb6b7906bbe9c3f60ae7f64",
2
+ "name": "prisma-client-8dc903aa694e9855a3877274f128a16fd53d1332016b052a77ec811806b045f7",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -1253,8 +1253,6 @@ model CompetencyDictionary {
1253
1253
  enum ConsentType {
1254
1254
  PLATFORM_TERMS
1255
1255
  INTERVIEW_SESSION
1256
- /// Read-only catalog document; no ConsentRecord submit flow
1257
- PRIVACY_POLICY
1258
1256
 
1259
1257
  @@schema("public")
1260
1258
  }
@@ -1299,86 +1297,34 @@ enum DataErasureRequestStatus {
1299
1297
  @@schema("public")
1300
1298
  }
1301
1299
 
1302
- /// Lifecycle for org-managed legal versions (platform seed publishes as PUBLISHED immediately).
1303
- enum ConsentCatalogVersionStatus {
1304
- DRAFT
1305
- PUBLISHED
1306
- ARCHIVED
1307
- /// Emergency takedown — grants blocked even during manifest grace window
1308
- REVOKED
1309
-
1310
- @@schema("public")
1311
- }
1312
-
1313
1300
  model ConsentDocument {
1314
- id String @id @default(uuid())
1315
- /// Stable key within scope — platform: `platform_terms`, org interview: `interview_session`
1316
- slug String
1317
- consent_type ConsentType
1318
- /// Null = platform-wide catalog row; set = tenant-specific overlay (v1: interview session notice)
1319
- organisation_id String?
1320
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
1321
- display_name String?
1322
- is_active Boolean @default(true)
1323
- created_at DateTime @default(now())
1324
- updated_at DateTime @updatedAt
1325
- versions ConsentDocumentVersion[]
1301
+ id String @id @default(uuid())
1302
+ /// Stable key, e.g. PLATFORM_TERMS, INTERVIEW_SESSION_DEFAULT
1303
+ slug String @unique
1304
+ consent_type ConsentType
1305
+ is_active Boolean @default(true)
1306
+ created_at DateTime @default(now())
1307
+ updated_at DateTime @updatedAt
1308
+ versions ConsentDocumentVersion[]
1326
1309
 
1327
- @@unique([organisation_id, slug])
1328
- @@index([consent_type, organisation_id, is_active])
1329
1310
  @@schema("public")
1330
1311
  }
1331
1312
 
1332
1313
  model ConsentDocumentVersion {
1333
- id String @id @default(uuid())
1334
- document_id String
1335
- document ConsentDocument @relation(fields: [document_id], references: [id], onDelete: Cascade)
1336
- version_number Int
1337
- content_hash String
1338
- locale String @default("en")
1339
- template_version_label String?
1340
- s3_bucket String?
1341
- /// Legacy single key; prefer s3_archive_key + s3_active_key
1342
- s3_key String?
1343
- s3_region String?
1344
- /// Immutable snapshot path (audit binding)
1345
- s3_archive_key String?
1346
- /// Read-optimized current copy under active/
1347
- s3_active_key String?
1348
- /// Decision 6 — immutable archive row in shared Document catalog
1349
- s3_document_id String?
1350
- s3_document Document? @relation(fields: [s3_document_id], references: [id], onDelete: SetNull)
1351
- status ConsentCatalogVersionStatus @default(PUBLISHED)
1352
- published_at DateTime?
1353
- published_by_id String?
1354
- published_by User? @relation("ConsentVersionPublishedBy", fields: [published_by_id], references: [id], onDelete: SetNull)
1355
- approval_notes String? @db.Text
1356
- supersedes_version_id String?
1357
- supersedes_version ConsentDocumentVersion? @relation("ConsentVersionSupersedes", fields: [supersedes_version_id], references: [id], onDelete: SetNull)
1358
- superseded_by ConsentDocumentVersion[] @relation("ConsentVersionSupersedes")
1359
- created_at DateTime @default(now())
1360
- checkboxes ConsentCheckboxDefinition[]
1361
- consent_records ConsentRecord[]
1362
- system_consent_epochs SystemConsentEpoch[]
1363
- version_approvals ConsentDocumentVersionApproval[]
1314
+ id String @id @default(uuid())
1315
+ document_id String
1316
+ document ConsentDocument @relation(fields: [document_id], references: [id], onDelete: Cascade)
1317
+ version_number Int
1318
+ content_hash String
1319
+ locale String @default("en")
1320
+ content String @db.Text
1321
+ published_at DateTime?
1322
+ created_at DateTime @default(now())
1323
+ checkboxes ConsentCheckboxDefinition[]
1324
+ consent_records ConsentRecord[]
1364
1325
 
1365
1326
  @@unique([document_id, version_number])
1366
1327
  @@index([document_id, published_at(sort: Desc)])
1367
- @@index([s3_document_id])
1368
- @@schema("public")
1369
- }
1370
-
1371
- model ConsentDocumentVersionApproval {
1372
- id String @id @default(uuid())
1373
- document_version_id String
1374
- document_version ConsentDocumentVersion @relation(fields: [document_version_id], references: [id], onDelete: Cascade)
1375
- action String
1376
- actor_user_id String?
1377
- actor_user User? @relation("ConsentVersionApprovalActor", fields: [actor_user_id], references: [id], onDelete: SetNull)
1378
- notes String? @db.Text
1379
- created_at DateTime @default(now())
1380
-
1381
- @@index([document_version_id, created_at(sort: Desc)])
1382
1328
  @@schema("public")
1383
1329
  }
1384
1330
 
@@ -1397,46 +1343,26 @@ model ConsentCheckboxDefinition {
1397
1343
  }
1398
1344
 
1399
1345
  model ConsentRecord {
1400
- id String @id @default(uuid())
1401
- user_id String
1402
- user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
1403
- consent_type ConsentType
1404
- outcome ConsentOutcome
1405
- document_version_id String
1406
- document_version ConsentDocumentVersion @relation(fields: [document_version_id], references: [id], onDelete: Restrict)
1407
- template_version_label String?
1408
- context_snapshot Json?
1409
- selections Json @default("{}")
1410
- reference_type ConsentReferenceType?
1411
- reference_id String?
1412
- ip_address String?
1413
- user_agent String?
1414
- decline_reason String?
1415
- /// Copy of version s3_archive_key (or legacy s3_key) at grant time
1416
- storage_snapshot_key String?
1417
- content_hash_at_grant String?
1418
- created_at DateTime @default(now())
1346
+ id String @id @default(uuid())
1347
+ user_id String
1348
+ user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
1349
+ consent_type ConsentType
1350
+ outcome ConsentOutcome
1351
+ document_version_id String
1352
+ document_version ConsentDocumentVersion @relation(fields: [document_version_id], references: [id], onDelete: Restrict)
1353
+ selections Json @default("{}")
1354
+ reference_type ConsentReferenceType?
1355
+ reference_id String?
1356
+ ip_address String?
1357
+ user_agent String?
1358
+ decline_reason String?
1359
+ created_at DateTime @default(now())
1419
1360
 
1420
1361
  @@index([user_id, consent_type, created_at(sort: Desc)])
1421
1362
  @@index([reference_type, reference_id, consent_type, created_at(sort: Desc)])
1422
1363
  @@schema("public")
1423
1364
  }
1424
1365
 
1425
- // Platform-wide re-consent watermark (complements per-interview consent_epoch_at).
1426
- // epoch_at is the effective instant for platform re-consent (can differ from created_at when policy changes are backdated).
1427
- model SystemConsentEpoch {
1428
- id String @id @default(uuid())
1429
- consent_type ConsentType
1430
- epoch_at DateTime @default(now())
1431
- document_version_id String?
1432
- document_version ConsentDocumentVersion? @relation(fields: [document_version_id], references: [id], onDelete: SetNull)
1433
- reason String?
1434
- created_at DateTime @default(now())
1435
-
1436
- @@index([consent_type, epoch_at(sort: Desc)])
1437
- @@schema("public")
1438
- }
1439
-
1440
1366
  /// Append-only erasure plan snapshots (v1: DRY_RUN only in application code).
1441
1367
  model DataErasureRequest {
1442
1368
  id String @id @default(uuid())
@@ -1619,7 +1545,6 @@ model Document {
1619
1545
  offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
1620
1546
  offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
1621
1547
  application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
1622
- consent_document_versions ConsentDocumentVersion[]
1623
1548
 
1624
1549
  // Indexes
1625
1550
  @@index([candidate_id])
@@ -3760,79 +3685,73 @@ enum HiringUnitAssignmentScope {
3760
3685
  }
3761
3686
 
3762
3687
  model Organisation {
3763
- id String @id @default(uuid())
3764
- name String @unique
3765
- industry String
3766
- about String
3767
- website String
3768
- size OrganisationSize @default(ONE_TO_TEN)
3769
- phone String
3770
- address String
3771
- company_values Json[]
3772
- allowed_email_domains String[]
3773
- send_email Boolean @default(true)
3774
- interviewers User[]
3775
- created_at DateTime @default(now())
3776
- updated_at DateTime @updatedAt
3777
- created_by String
3778
- updated_by String
3779
- is_active Boolean @default(true)
3780
- alias String? @unique
3781
- logo String?
3782
- job_sequence Int @default(1)
3783
- employee_sequence Int @default(1)
3784
- applications Application[]
3785
- user_roles UserRole[]
3786
- job_descriptions JobDescription[]
3787
- job_profiles JobProfile[]
3788
- assessment_library AssessmentLibrary[]
3789
- assignment_library AssignmentLibrary[]
3790
- interviews Interview[]
3791
- assignments Assignment[]
3792
- fit_check FitCheck[] // one-to-many link
3793
- resumes Resume[] // one-to-many link
3794
- approvals Approval[] // one-to-many link
3795
- suggestions Suggestion[]
3796
- ongoing_evaluations OngoingEvaluation[] // optional one-to-many
3797
- actions Action[]
3798
- integration_credentials IntegrationCredential[]
3799
- zoho_sync_mappings ZohoSyncMapping[]
3800
- assessments Assessment[]
3801
- timezone String @default("Asia/Kolkata")
3688
+ id String @id @default(uuid())
3689
+ name String @unique
3690
+ industry String
3691
+ about String
3692
+ website String
3693
+ size OrganisationSize @default(ONE_TO_TEN)
3694
+ phone String
3695
+ address String
3696
+ company_values Json[]
3697
+ allowed_email_domains String[]
3698
+ send_email Boolean @default(true)
3699
+ interviewers User[]
3700
+ created_at DateTime @default(now())
3701
+ updated_at DateTime @updatedAt
3702
+ created_by String
3703
+ updated_by String
3704
+ is_active Boolean @default(true)
3705
+ alias String? @unique
3706
+ logo String?
3707
+ job_sequence Int @default(1)
3708
+ employee_sequence Int @default(1)
3709
+ applications Application[]
3710
+ user_roles UserRole[]
3711
+ job_descriptions JobDescription[]
3712
+ job_profiles JobProfile[]
3713
+ assessment_library AssessmentLibrary[]
3714
+ assignment_library AssignmentLibrary[]
3715
+ interviews Interview[]
3716
+ assignments Assignment[]
3717
+ fit_check FitCheck[] // one-to-many link
3718
+ resumes Resume[] // one-to-many link
3719
+ approvals Approval[] // one-to-many link
3720
+ suggestions Suggestion[]
3721
+ ongoing_evaluations OngoingEvaluation[] // optional one-to-many
3722
+ actions Action[]
3723
+ integration_credentials IntegrationCredential[]
3724
+ zoho_sync_mappings ZohoSyncMapping[]
3725
+ assessments Assessment[]
3726
+ timezone String @default("Asia/Kolkata")
3802
3727
  /// ISO 3166-1 alpha-2 (e.g. IN).
3803
- country_code String @default("IN")
3728
+ country_code String @default("IN")
3804
3729
  /// Who may consume unused hiring units. Does not rewrite unit rows when changed.
3805
- hiring_unit_assignment_scope HiringUnitAssignmentScope @default(DEPARTMENT)
3806
- organisation_configs OrganisationConfig[]
3807
- activity_events ActivityEvent[]
3808
- usage_ledger_entries UsageLedgerEntry[]
3809
- usage_aggregates UsageAggregate[]
3810
- channel_provider_configs ChannelProviderConfig[]
3811
- conversations Conversation[]
3812
- communication_messages CommunicationMessage[]
3813
- job_application_fields JobApplicationField[]
3814
- documents Document[]
3815
- job_application_templates JobApplicationTemplate[]
3816
- offer_letter_templates OfferLetterTemplate[]
3817
- offers Offer[]
3818
- sources Source[]
3819
- evaluation_criteria EvaluationCriteria[]
3820
- departments Department[]
3821
- hiring_plans HiringPlan[]
3822
- employees Employee[]
3823
- competency_dictionaries CompetencyDictionary[]
3824
- purchased_license_packages PurchasedLicensePackage[]
3825
- purchased_hiring_units PurchasedHiringUnit[]
3826
- purchased_top_ups PurchasedTopUp[]
3827
- licensing_ledger_entries LicensingLedgerEntry[]
3828
- license_package_organisations LicensePackageOrganisation[]
3829
- ai_cost_ledger_entries AiCostLedgerEntry[]
3830
- consent_documents ConsentDocument[]
3831
- /// Deprecated — migrate to org-scoped ConsentDocument; kept for legacy S3 fallback until backfill completes
3832
- has_custom_consent Boolean @default(false)
3833
- consent_s3_bucket String?
3834
- consent_s3_region String?
3835
- custom_interview_consent_s3_key_prefix String?
3730
+ hiring_unit_assignment_scope HiringUnitAssignmentScope @default(DEPARTMENT)
3731
+ organisation_configs OrganisationConfig[]
3732
+ activity_events ActivityEvent[]
3733
+ usage_ledger_entries UsageLedgerEntry[]
3734
+ usage_aggregates UsageAggregate[]
3735
+ channel_provider_configs ChannelProviderConfig[]
3736
+ conversations Conversation[]
3737
+ communication_messages CommunicationMessage[]
3738
+ job_application_fields JobApplicationField[]
3739
+ documents Document[]
3740
+ job_application_templates JobApplicationTemplate[]
3741
+ offer_letter_templates OfferLetterTemplate[]
3742
+ offers Offer[]
3743
+ sources Source[]
3744
+ evaluation_criteria EvaluationCriteria[]
3745
+ departments Department[]
3746
+ hiring_plans HiringPlan[]
3747
+ employees Employee[]
3748
+ competency_dictionaries CompetencyDictionary[]
3749
+ purchased_license_packages PurchasedLicensePackage[]
3750
+ purchased_hiring_units PurchasedHiringUnit[]
3751
+ purchased_top_ups PurchasedTopUp[]
3752
+ licensing_ledger_entries LicensingLedgerEntry[]
3753
+ license_package_organisations LicensePackageOrganisation[]
3754
+ ai_cost_ledger_entries AiCostLedgerEntry[]
3836
3755
 
3837
3756
  @@index([name])
3838
3757
  @@schema("public")
@@ -4274,6 +4193,9 @@ model Resume {
4274
4193
  conversation_history Json?
4275
4194
  /// Progress 0-100 reported by the ResumeIntake workflow.
4276
4195
  intake_progress Int?
4196
+ /// Set when the candidate archives the resume; null = active. Archived
4197
+ /// resumes are hidden from resume pickers (e.g. the apply flow).
4198
+ archived_at DateTime?
4277
4199
  /// Last Orion execution id for the intake/generate workflow, for tracing.
4278
4200
  orion_execution_id String?
4279
4201
  /// Snapshot of the candidate's own words, taken immediately before the
@@ -4865,13 +4787,11 @@ model User {
4865
4787
  employee_number Int?
4866
4788
  employee_code String? @unique
4867
4789
 
4868
- department_members DepartmentMember[] @relation("DepartmentMemberships")
4869
- assigned_hiring_units PurchasedHiringUnit[] @relation("AssignedHiringUnits")
4870
- consent_records ConsentRecord[]
4871
- consent_versions_published ConsentDocumentVersion[] @relation("ConsentVersionPublishedBy")
4872
- consent_version_approval_actions ConsentDocumentVersionApproval[] @relation("ConsentVersionApprovalActor")
4873
- erasure_requests_as_subject DataErasureRequest[] @relation("ErasureSubjectUser")
4874
- erasure_requests_requested DataErasureRequest[] @relation("ErasureRequestedByUser")
4790
+ department_members DepartmentMember[] @relation("DepartmentMemberships")
4791
+ assigned_hiring_units PurchasedHiringUnit[] @relation("AssignedHiringUnits")
4792
+ consent_records ConsentRecord[]
4793
+ erasure_requests_as_subject DataErasureRequest[] @relation("ErasureSubjectUser")
4794
+ erasure_requests_requested DataErasureRequest[] @relation("ErasureRequestedByUser")
4875
4795
 
4876
4796
  @@index([role_id])
4877
4797
  @@index([permission_id])