@adaptware/eagles-db 0.6.8 → 0.6.9
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 -23
- package/client/index-browser.js +11 -16
- package/client/index.d.ts +559 -1694
- package/client/index.js +17 -23
- package/client/package.json +1 -1
- package/client/schema.prisma +47 -67
- package/client/wasm.js +17 -23
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/migrations/.DS_Store +0 -0
- package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/.DS_Store +0 -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
|
}
|
|
@@ -1273,14 +1271,6 @@ enum ConsentOutcome {
|
|
|
1273
1271
|
@@schema("public")
|
|
1274
1272
|
}
|
|
1275
1273
|
|
|
1276
|
-
enum ConsentCatalogVersionStatus {
|
|
1277
|
-
DRAFT
|
|
1278
|
-
PUBLISHED
|
|
1279
|
-
ARCHIVED
|
|
1280
|
-
|
|
1281
|
-
@@schema("public")
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
1274
|
enum DataErasureTrigger {
|
|
1285
1275
|
ADMIN
|
|
1286
1276
|
USER_REQUEST
|
|
@@ -1307,77 +1297,69 @@ enum DataErasureRequestStatus {
|
|
|
1307
1297
|
@@schema("public")
|
|
1308
1298
|
}
|
|
1309
1299
|
|
|
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
1300
|
model ConsentDocument {
|
|
1314
|
-
id
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
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[]
|
|
1321
1309
|
|
|
1322
|
-
@@unique([organisation_id, consent_type])
|
|
1323
|
-
@@index([consent_type, organisation_id])
|
|
1324
1310
|
@@schema("public")
|
|
1325
1311
|
}
|
|
1326
1312
|
|
|
1327
|
-
/// One immutable markdown object per version; S3 location and hash live on the linked Document.
|
|
1328
1313
|
model ConsentDocumentVersion {
|
|
1329
|
-
id
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
version_number
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
published_at
|
|
1337
|
-
created_at
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
@@
|
|
1343
|
-
@@index([consent_document_id, status, version_number(sort: Desc)])
|
|
1344
|
-
@@index([document_id])
|
|
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[]
|
|
1325
|
+
|
|
1326
|
+
@@unique([document_id, version_number])
|
|
1327
|
+
@@index([document_id, published_at(sort: Desc)])
|
|
1345
1328
|
@@schema("public")
|
|
1346
1329
|
}
|
|
1347
1330
|
|
|
1348
1331
|
model ConsentCheckboxDefinition {
|
|
1349
|
-
id
|
|
1350
|
-
|
|
1351
|
-
|
|
1332
|
+
id String @id @default(uuid())
|
|
1333
|
+
document_version_id String
|
|
1334
|
+
document_version ConsentDocumentVersion @relation(fields: [document_version_id], references: [id], onDelete: Cascade)
|
|
1352
1335
|
/// Stable machine key in ConsentRecord.selections JSON
|
|
1353
|
-
checkbox_key
|
|
1354
|
-
label
|
|
1355
|
-
sort_order
|
|
1356
|
-
default_required_hint
|
|
1336
|
+
checkbox_key String
|
|
1337
|
+
label String
|
|
1338
|
+
sort_order Int @default(0)
|
|
1339
|
+
default_required_hint Boolean @default(true)
|
|
1357
1340
|
|
|
1358
|
-
@@unique([
|
|
1341
|
+
@@unique([document_version_id, checkbox_key])
|
|
1359
1342
|
@@schema("public")
|
|
1360
1343
|
}
|
|
1361
1344
|
|
|
1362
|
-
/// Consent type is resolved via consent_document_version -> consent_document.consent_type.
|
|
1363
1345
|
model ConsentRecord {
|
|
1364
|
-
id
|
|
1365
|
-
user_id
|
|
1366
|
-
user
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
@@index([
|
|
1380
|
-
@@index([
|
|
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())
|
|
1360
|
+
|
|
1361
|
+
@@index([user_id, consent_type, created_at(sort: Desc)])
|
|
1362
|
+
@@index([reference_type, reference_id, consent_type, created_at(sort: Desc)])
|
|
1381
1363
|
@@schema("public")
|
|
1382
1364
|
}
|
|
1383
1365
|
|
|
@@ -1563,7 +1545,6 @@ model Document {
|
|
|
1563
1545
|
offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
|
|
1564
1546
|
offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
|
|
1565
1547
|
application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
|
|
1566
|
-
consent_document_versions ConsentDocumentVersion[]
|
|
1567
1548
|
|
|
1568
1549
|
// Indexes
|
|
1569
1550
|
@@index([candidate_id])
|
|
@@ -3771,7 +3752,6 @@ model Organisation {
|
|
|
3771
3752
|
licensing_ledger_entries LicensingLedgerEntry[]
|
|
3772
3753
|
license_package_organisations LicensePackageOrganisation[]
|
|
3773
3754
|
ai_cost_ledger_entries AiCostLedgerEntry[]
|
|
3774
|
-
consent_documents ConsentDocument[]
|
|
3775
3755
|
|
|
3776
3756
|
@@index([name])
|
|
3777
3757
|
@@schema("public")
|