@adaptware/eagles-db 0.6.6 → 0.6.8
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 +17 -42
- package/client/index-browser.js +9 -34
- package/client/index.d.ts +803 -3679
- package/client/index.js +17 -42
- package/client/package.json +1 -1
- package/client/schema.prisma +125 -156
- package/client/wasm.js +17 -42
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/consent.prisma +60 -89
- 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/20261009120000_add_resume_archived_at/migration.sql +2 -0
- package/prisma/schema/organisation.prisma +0 -5
- package/prisma/schema/resume.prisma +3 -0
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -1273,6 +1273,14 @@ enum ConsentOutcome {
|
|
|
1273
1273
|
@@schema("public")
|
|
1274
1274
|
}
|
|
1275
1275
|
|
|
1276
|
+
enum ConsentCatalogVersionStatus {
|
|
1277
|
+
DRAFT
|
|
1278
|
+
PUBLISHED
|
|
1279
|
+
ARCHIVED
|
|
1280
|
+
|
|
1281
|
+
@@schema("public")
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1276
1284
|
enum DataErasureTrigger {
|
|
1277
1285
|
ADMIN
|
|
1278
1286
|
USER_REQUEST
|
|
@@ -1299,114 +1307,77 @@ enum DataErasureRequestStatus {
|
|
|
1299
1307
|
@@schema("public")
|
|
1300
1308
|
}
|
|
1301
1309
|
|
|
1302
|
-
///
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
PUBLISHED
|
|
1306
|
-
ARCHIVED
|
|
1307
|
-
/// Emergency takedown — grants blocked even during manifest grace window
|
|
1308
|
-
REVOKED
|
|
1309
|
-
|
|
1310
|
-
@@schema("public")
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1310
|
+
/// Catalog identity is (organisation_id, consent_type). Null organisation_id = platform default.
|
|
1311
|
+
/// Platform rows also need a partial unique index on consent_type WHERE organisation_id IS NULL
|
|
1312
|
+
/// (PostgreSQL treats NULLs as distinct in the composite unique below).
|
|
1313
1313
|
model ConsentDocument {
|
|
1314
1314
|
id String @id @default(uuid())
|
|
1315
|
-
/// Stable key within scope — platform: `platform_terms`, org interview: `interview_session`
|
|
1316
|
-
slug String
|
|
1317
1315
|
consent_type ConsentType
|
|
1318
|
-
/// Null = platform-wide catalog row; set = tenant-specific overlay (v1: interview session notice)
|
|
1319
1316
|
organisation_id String?
|
|
1320
1317
|
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
1321
|
-
display_name String?
|
|
1322
|
-
is_active Boolean @default(true)
|
|
1323
1318
|
created_at DateTime @default(now())
|
|
1324
1319
|
updated_at DateTime @updatedAt
|
|
1325
1320
|
versions ConsentDocumentVersion[]
|
|
1326
1321
|
|
|
1327
|
-
@@unique([organisation_id,
|
|
1328
|
-
@@index([consent_type, organisation_id
|
|
1322
|
+
@@unique([organisation_id, consent_type])
|
|
1323
|
+
@@index([consent_type, organisation_id])
|
|
1329
1324
|
@@schema("public")
|
|
1330
1325
|
}
|
|
1331
1326
|
|
|
1327
|
+
/// One immutable markdown object per version; S3 location and hash live on the linked Document.
|
|
1332
1328
|
model ConsentDocumentVersion {
|
|
1333
|
-
id
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
version_number
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
published_at DateTime?
|
|
1350
|
-
created_at DateTime @default(now())
|
|
1351
|
-
checkboxes ConsentCheckboxDefinition[]
|
|
1352
|
-
consent_records ConsentRecord[]
|
|
1353
|
-
system_consent_epochs SystemConsentEpoch[]
|
|
1354
|
-
|
|
1355
|
-
@@unique([document_id, version_number])
|
|
1356
|
-
@@index([document_id, published_at(sort: Desc)])
|
|
1357
|
-
@@index([s3_document_id])
|
|
1329
|
+
id String @id @default(uuid())
|
|
1330
|
+
consent_document_id String
|
|
1331
|
+
consent_document ConsentDocument @relation(fields: [consent_document_id], references: [id], onDelete: Cascade)
|
|
1332
|
+
version_number Int
|
|
1333
|
+
document_id String?
|
|
1334
|
+
document Document? @relation(fields: [document_id], references: [id], onDelete: Restrict)
|
|
1335
|
+
status ConsentCatalogVersionStatus @default(DRAFT)
|
|
1336
|
+
published_at DateTime?
|
|
1337
|
+
created_at DateTime @default(now())
|
|
1338
|
+
updated_at DateTime @updatedAt
|
|
1339
|
+
checkboxes ConsentCheckboxDefinition[]
|
|
1340
|
+
consent_records ConsentRecord[]
|
|
1341
|
+
|
|
1342
|
+
@@unique([consent_document_id, version_number])
|
|
1343
|
+
@@index([consent_document_id, status, version_number(sort: Desc)])
|
|
1344
|
+
@@index([document_id])
|
|
1358
1345
|
@@schema("public")
|
|
1359
1346
|
}
|
|
1360
1347
|
|
|
1361
1348
|
model ConsentCheckboxDefinition {
|
|
1362
|
-
id
|
|
1363
|
-
|
|
1364
|
-
|
|
1349
|
+
id String @id @default(uuid())
|
|
1350
|
+
consent_document_version_id String
|
|
1351
|
+
consent_document_version ConsentDocumentVersion @relation(fields: [consent_document_version_id], references: [id], onDelete: Cascade)
|
|
1365
1352
|
/// Stable machine key in ConsentRecord.selections JSON
|
|
1366
|
-
checkbox_key
|
|
1367
|
-
label
|
|
1368
|
-
sort_order
|
|
1369
|
-
default_required_hint
|
|
1353
|
+
checkbox_key String
|
|
1354
|
+
label String
|
|
1355
|
+
sort_order Int @default(0)
|
|
1356
|
+
default_required_hint Boolean @default(true)
|
|
1370
1357
|
|
|
1371
|
-
@@unique([
|
|
1358
|
+
@@unique([consent_document_version_id, checkbox_key])
|
|
1372
1359
|
@@schema("public")
|
|
1373
1360
|
}
|
|
1374
1361
|
|
|
1362
|
+
/// Consent type is resolved via consent_document_version -> consent_document.consent_type.
|
|
1375
1363
|
model ConsentRecord {
|
|
1376
|
-
id
|
|
1377
|
-
user_id
|
|
1378
|
-
user
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
created_at
|
|
1392
|
-
|
|
1393
|
-
@@index([user_id, consent_type, created_at(sort: Desc)])
|
|
1394
|
-
@@index([reference_type, reference_id, consent_type, created_at(sort: Desc)])
|
|
1395
|
-
@@schema("public")
|
|
1396
|
-
}
|
|
1397
|
-
|
|
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)])
|
|
1364
|
+
id String @id @default(uuid())
|
|
1365
|
+
user_id String
|
|
1366
|
+
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
|
1367
|
+
outcome ConsentOutcome
|
|
1368
|
+
consent_document_version_id String
|
|
1369
|
+
consent_document_version ConsentDocumentVersion @relation(fields: [consent_document_version_id], references: [id], onDelete: Restrict)
|
|
1370
|
+
selections Json @default("{}")
|
|
1371
|
+
reference_type ConsentReferenceType?
|
|
1372
|
+
reference_id String?
|
|
1373
|
+
ip_address String?
|
|
1374
|
+
user_agent String?
|
|
1375
|
+
decline_reason String?
|
|
1376
|
+
created_at DateTime @default(now())
|
|
1377
|
+
|
|
1378
|
+
@@index([user_id, created_at(sort: Desc)])
|
|
1379
|
+
@@index([reference_type, reference_id, created_at(sort: Desc)])
|
|
1380
|
+
@@index([consent_document_version_id])
|
|
1410
1381
|
@@schema("public")
|
|
1411
1382
|
}
|
|
1412
1383
|
|
|
@@ -3733,79 +3704,74 @@ enum HiringUnitAssignmentScope {
|
|
|
3733
3704
|
}
|
|
3734
3705
|
|
|
3735
3706
|
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
|
|
3707
|
+
id String @id @default(uuid())
|
|
3708
|
+
name String @unique
|
|
3709
|
+
industry String
|
|
3710
|
+
about String
|
|
3711
|
+
website String
|
|
3712
|
+
size OrganisationSize @default(ONE_TO_TEN)
|
|
3713
|
+
phone String
|
|
3714
|
+
address String
|
|
3715
|
+
company_values Json[]
|
|
3716
|
+
allowed_email_domains String[]
|
|
3717
|
+
send_email Boolean @default(true)
|
|
3718
|
+
interviewers User[]
|
|
3719
|
+
created_at DateTime @default(now())
|
|
3720
|
+
updated_at DateTime @updatedAt
|
|
3721
|
+
created_by String
|
|
3722
|
+
updated_by String
|
|
3723
|
+
is_active Boolean @default(true)
|
|
3724
|
+
alias String? @unique
|
|
3725
|
+
logo String?
|
|
3726
|
+
job_sequence Int @default(1)
|
|
3727
|
+
employee_sequence Int @default(1)
|
|
3728
|
+
applications Application[]
|
|
3729
|
+
user_roles UserRole[]
|
|
3730
|
+
job_descriptions JobDescription[]
|
|
3731
|
+
job_profiles JobProfile[]
|
|
3732
|
+
assessment_library AssessmentLibrary[]
|
|
3733
|
+
assignment_library AssignmentLibrary[]
|
|
3734
|
+
interviews Interview[]
|
|
3735
|
+
assignments Assignment[]
|
|
3736
|
+
fit_check FitCheck[] // one-to-many link
|
|
3737
|
+
resumes Resume[] // one-to-many link
|
|
3738
|
+
approvals Approval[] // one-to-many link
|
|
3739
|
+
suggestions Suggestion[]
|
|
3740
|
+
ongoing_evaluations OngoingEvaluation[] // optional one-to-many
|
|
3741
|
+
actions Action[]
|
|
3742
|
+
integration_credentials IntegrationCredential[]
|
|
3743
|
+
zoho_sync_mappings ZohoSyncMapping[]
|
|
3744
|
+
assessments Assessment[]
|
|
3745
|
+
timezone String @default("Asia/Kolkata")
|
|
3775
3746
|
/// ISO 3166-1 alpha-2 (e.g. IN).
|
|
3776
|
-
country_code
|
|
3747
|
+
country_code String @default("IN")
|
|
3777
3748
|
/// 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
|
|
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?
|
|
3749
|
+
hiring_unit_assignment_scope HiringUnitAssignmentScope @default(DEPARTMENT)
|
|
3750
|
+
organisation_configs OrganisationConfig[]
|
|
3751
|
+
activity_events ActivityEvent[]
|
|
3752
|
+
usage_ledger_entries UsageLedgerEntry[]
|
|
3753
|
+
usage_aggregates UsageAggregate[]
|
|
3754
|
+
channel_provider_configs ChannelProviderConfig[]
|
|
3755
|
+
conversations Conversation[]
|
|
3756
|
+
communication_messages CommunicationMessage[]
|
|
3757
|
+
job_application_fields JobApplicationField[]
|
|
3758
|
+
documents Document[]
|
|
3759
|
+
job_application_templates JobApplicationTemplate[]
|
|
3760
|
+
offer_letter_templates OfferLetterTemplate[]
|
|
3761
|
+
offers Offer[]
|
|
3762
|
+
sources Source[]
|
|
3763
|
+
evaluation_criteria EvaluationCriteria[]
|
|
3764
|
+
departments Department[]
|
|
3765
|
+
hiring_plans HiringPlan[]
|
|
3766
|
+
employees Employee[]
|
|
3767
|
+
competency_dictionaries CompetencyDictionary[]
|
|
3768
|
+
purchased_license_packages PurchasedLicensePackage[]
|
|
3769
|
+
purchased_hiring_units PurchasedHiringUnit[]
|
|
3770
|
+
purchased_top_ups PurchasedTopUp[]
|
|
3771
|
+
licensing_ledger_entries LicensingLedgerEntry[]
|
|
3772
|
+
license_package_organisations LicensePackageOrganisation[]
|
|
3773
|
+
ai_cost_ledger_entries AiCostLedgerEntry[]
|
|
3774
|
+
consent_documents ConsentDocument[]
|
|
3809
3775
|
|
|
3810
3776
|
@@index([name])
|
|
3811
3777
|
@@schema("public")
|
|
@@ -4247,6 +4213,9 @@ model Resume {
|
|
|
4247
4213
|
conversation_history Json?
|
|
4248
4214
|
/// Progress 0-100 reported by the ResumeIntake workflow.
|
|
4249
4215
|
intake_progress Int?
|
|
4216
|
+
/// Set when the candidate archives the resume; null = active. Archived
|
|
4217
|
+
/// resumes are hidden from resume pickers (e.g. the apply flow).
|
|
4218
|
+
archived_at DateTime?
|
|
4250
4219
|
/// Last Orion execution id for the intake/generate workflow, for tracing.
|
|
4251
4220
|
orion_execution_id String?
|
|
4252
4221
|
/// Snapshot of the candidate's own words, taken immediately before the
|