@adaptware/eagles-db 0.6.6 → 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.
- package/client/edge.js +10 -41
- package/client/index-browser.js +4 -34
- package/client/index.d.ts +141 -4152
- package/client/index.js +10 -41
- package/client/package.json +1 -1
- package/client/schema.prisma +101 -152
- package/client/wasm.js +10 -41
- package/package.json +1 -1
- package/prisma/schema/consent.prisma +34 -81
- package/prisma/schema/document.prisma +0 -1
- package/prisma/schema/migrations/20261009120000_add_resume_archived_at/migration.sql +2 -0
- package/prisma/schema/organisation.prisma +0 -6
- package/prisma/schema/resume.prisma +3 -0
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -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,62 +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
|
|
1315
|
-
/// Stable key
|
|
1316
|
-
slug
|
|
1317
|
-
consent_type
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
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
|
|
1334
|
-
document_id
|
|
1335
|
-
document
|
|
1336
|
-
version_number
|
|
1337
|
-
content_hash
|
|
1338
|
-
locale
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
s3_active_key String?
|
|
1345
|
-
/// Optional immutable archive row in shared Document catalog (org ingest)
|
|
1346
|
-
s3_document_id String?
|
|
1347
|
-
s3_document Document? @relation(fields: [s3_document_id], references: [id], onDelete: SetNull)
|
|
1348
|
-
status ConsentCatalogVersionStatus @default(PUBLISHED)
|
|
1349
|
-
published_at DateTime?
|
|
1350
|
-
created_at DateTime @default(now())
|
|
1351
|
-
checkboxes ConsentCheckboxDefinition[]
|
|
1352
|
-
consent_records ConsentRecord[]
|
|
1353
|
-
system_consent_epochs SystemConsentEpoch[]
|
|
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[]
|
|
1354
1325
|
|
|
1355
1326
|
@@unique([document_id, version_number])
|
|
1356
1327
|
@@index([document_id, published_at(sort: Desc)])
|
|
1357
|
-
@@index([s3_document_id])
|
|
1358
1328
|
@@schema("public")
|
|
1359
1329
|
}
|
|
1360
1330
|
|
|
@@ -1373,43 +1343,26 @@ model ConsentCheckboxDefinition {
|
|
|
1373
1343
|
}
|
|
1374
1344
|
|
|
1375
1345
|
model ConsentRecord {
|
|
1376
|
-
id
|
|
1377
|
-
user_id
|
|
1378
|
-
user
|
|
1379
|
-
consent_type
|
|
1380
|
-
outcome
|
|
1381
|
-
document_version_id
|
|
1382
|
-
document_version
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
decline_reason String?
|
|
1391
|
-
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())
|
|
1392
1360
|
|
|
1393
1361
|
@@index([user_id, consent_type, created_at(sort: Desc)])
|
|
1394
1362
|
@@index([reference_type, reference_id, consent_type, created_at(sort: Desc)])
|
|
1395
1363
|
@@schema("public")
|
|
1396
1364
|
}
|
|
1397
1365
|
|
|
1398
|
-
// Platform-wide re-consent watermark (complements per-interview consent_epoch_at).
|
|
1399
|
-
// epoch_at is the effective instant for platform re-consent (can differ from created_at when policy changes are backdated).
|
|
1400
|
-
model SystemConsentEpoch {
|
|
1401
|
-
id String @id @default(uuid())
|
|
1402
|
-
consent_type ConsentType
|
|
1403
|
-
epoch_at DateTime @default(now())
|
|
1404
|
-
document_version_id String?
|
|
1405
|
-
document_version ConsentDocumentVersion? @relation(fields: [document_version_id], references: [id], onDelete: SetNull)
|
|
1406
|
-
reason String?
|
|
1407
|
-
created_at DateTime @default(now())
|
|
1408
|
-
|
|
1409
|
-
@@index([consent_type, epoch_at(sort: Desc)])
|
|
1410
|
-
@@schema("public")
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
1366
|
/// Append-only erasure plan snapshots (v1: DRY_RUN only in application code).
|
|
1414
1367
|
model DataErasureRequest {
|
|
1415
1368
|
id String @id @default(uuid())
|
|
@@ -1592,7 +1545,6 @@ model Document {
|
|
|
1592
1545
|
offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
|
|
1593
1546
|
offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
|
|
1594
1547
|
application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
|
|
1595
|
-
consent_document_versions ConsentDocumentVersion[]
|
|
1596
1548
|
|
|
1597
1549
|
// Indexes
|
|
1598
1550
|
@@index([candidate_id])
|
|
@@ -3733,79 +3685,73 @@ enum HiringUnitAssignmentScope {
|
|
|
3733
3685
|
}
|
|
3734
3686
|
|
|
3735
3687
|
model Organisation {
|
|
3736
|
-
id
|
|
3737
|
-
name
|
|
3738
|
-
industry
|
|
3739
|
-
about
|
|
3740
|
-
website
|
|
3741
|
-
size
|
|
3742
|
-
phone
|
|
3743
|
-
address
|
|
3744
|
-
company_values
|
|
3745
|
-
allowed_email_domains
|
|
3746
|
-
send_email
|
|
3747
|
-
interviewers
|
|
3748
|
-
created_at
|
|
3749
|
-
updated_at
|
|
3750
|
-
created_by
|
|
3751
|
-
updated_by
|
|
3752
|
-
is_active
|
|
3753
|
-
alias
|
|
3754
|
-
logo
|
|
3755
|
-
job_sequence
|
|
3756
|
-
employee_sequence
|
|
3757
|
-
applications
|
|
3758
|
-
user_roles
|
|
3759
|
-
job_descriptions
|
|
3760
|
-
job_profiles
|
|
3761
|
-
assessment_library
|
|
3762
|
-
assignment_library
|
|
3763
|
-
interviews
|
|
3764
|
-
assignments
|
|
3765
|
-
fit_check
|
|
3766
|
-
resumes
|
|
3767
|
-
approvals
|
|
3768
|
-
suggestions
|
|
3769
|
-
ongoing_evaluations
|
|
3770
|
-
actions
|
|
3771
|
-
integration_credentials
|
|
3772
|
-
zoho_sync_mappings
|
|
3773
|
-
assessments
|
|
3774
|
-
timezone
|
|
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")
|
|
3775
3727
|
/// ISO 3166-1 alpha-2 (e.g. IN).
|
|
3776
|
-
country_code
|
|
3728
|
+
country_code String @default("IN")
|
|
3777
3729
|
/// Who may consume unused hiring units. Does not rewrite unit rows when changed.
|
|
3778
|
-
hiring_unit_assignment_scope
|
|
3779
|
-
organisation_configs
|
|
3780
|
-
activity_events
|
|
3781
|
-
usage_ledger_entries
|
|
3782
|
-
usage_aggregates
|
|
3783
|
-
channel_provider_configs
|
|
3784
|
-
conversations
|
|
3785
|
-
communication_messages
|
|
3786
|
-
job_application_fields
|
|
3787
|
-
documents
|
|
3788
|
-
job_application_templates
|
|
3789
|
-
offer_letter_templates
|
|
3790
|
-
offers
|
|
3791
|
-
sources
|
|
3792
|
-
evaluation_criteria
|
|
3793
|
-
departments
|
|
3794
|
-
hiring_plans
|
|
3795
|
-
employees
|
|
3796
|
-
competency_dictionaries
|
|
3797
|
-
purchased_license_packages
|
|
3798
|
-
purchased_hiring_units
|
|
3799
|
-
purchased_top_ups
|
|
3800
|
-
licensing_ledger_entries
|
|
3801
|
-
license_package_organisations
|
|
3802
|
-
ai_cost_ledger_entries
|
|
3803
|
-
consent_documents ConsentDocument[]
|
|
3804
|
-
/// Deprecated — migrate to org-scoped ConsentDocument; kept for legacy S3 fallback until backfill completes
|
|
3805
|
-
has_custom_consent Boolean @default(false)
|
|
3806
|
-
consent_s3_bucket String?
|
|
3807
|
-
consent_s3_region String?
|
|
3808
|
-
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[]
|
|
3809
3755
|
|
|
3810
3756
|
@@index([name])
|
|
3811
3757
|
@@schema("public")
|
|
@@ -4247,6 +4193,9 @@ model Resume {
|
|
|
4247
4193
|
conversation_history Json?
|
|
4248
4194
|
/// Progress 0-100 reported by the ResumeIntake workflow.
|
|
4249
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?
|
|
4250
4199
|
/// Last Orion execution id for the intake/generate workflow, for tracing.
|
|
4251
4200
|
orion_execution_id String?
|
|
4252
4201
|
/// Snapshot of the candidate's own words, taken immediately before the
|