@adaptware/eagles-db 0.6.8 → 0.6.10
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 +16 -7
- package/client/index-browser.js +10 -1
- package/client/index.d.ts +935 -224
- package/client/index.js +16 -7
- package/client/package.json +1 -1
- package/client/schema.prisma +51 -24
- package/client/wasm.js +16 -7
- package/package.json +1 -1
- package/prisma/schema/consent.prisma +42 -16
- package/prisma/schema/document.prisma +2 -1
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -1259,9 +1259,9 @@ enum ConsentType {
|
|
|
1259
1259
|
@@schema("public")
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
1262
|
-
enum
|
|
1263
|
-
|
|
1264
|
-
|
|
1262
|
+
enum ConsentGrantStatus {
|
|
1263
|
+
GRANTED
|
|
1264
|
+
DECLINED
|
|
1265
1265
|
|
|
1266
1266
|
@@schema("public")
|
|
1267
1267
|
}
|
|
@@ -1273,6 +1273,13 @@ enum ConsentOutcome {
|
|
|
1273
1273
|
@@schema("public")
|
|
1274
1274
|
}
|
|
1275
1275
|
|
|
1276
|
+
enum ConsentReferenceType {
|
|
1277
|
+
INTERVIEW
|
|
1278
|
+
ASSESSMENT
|
|
1279
|
+
|
|
1280
|
+
@@schema("public")
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1276
1283
|
enum ConsentCatalogVersionStatus {
|
|
1277
1284
|
DRAFT
|
|
1278
1285
|
PUBLISHED
|
|
@@ -1326,22 +1333,32 @@ model ConsentDocument {
|
|
|
1326
1333
|
|
|
1327
1334
|
/// One immutable markdown object per version; S3 location and hash live on the linked Document.
|
|
1328
1335
|
model ConsentDocumentVersion {
|
|
1329
|
-
id String
|
|
1336
|
+
id String @id @default(uuid())
|
|
1330
1337
|
consent_document_id String
|
|
1331
|
-
consent_document ConsentDocument
|
|
1338
|
+
consent_document ConsentDocument @relation(fields: [consent_document_id], references: [id], onDelete: Cascade)
|
|
1332
1339
|
version_number Int
|
|
1333
|
-
|
|
1334
|
-
document
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1340
|
+
|
|
1341
|
+
// Dual document linkage for Platform Terms & Privacy Policy
|
|
1342
|
+
document_id String?
|
|
1343
|
+
document Document? @relation("TermsDocument", fields: [document_id], references: [id], onDelete: Restrict)
|
|
1344
|
+
privacy_policy_id String?
|
|
1345
|
+
privacy_policy Document? @relation("PrivacyPolicyDocument", fields: [privacy_policy_id], references: [id], onDelete: Restrict)
|
|
1346
|
+
|
|
1347
|
+
status ConsentCatalogVersionStatus @default(DRAFT)
|
|
1348
|
+
published_at DateTime?
|
|
1349
|
+
created_at DateTime @default(now())
|
|
1350
|
+
updated_at DateTime @updatedAt
|
|
1351
|
+
|
|
1352
|
+
// Embedded checkboxes JSON array (ConsentCheckboxDefinition preserved in schema to prevent drop)
|
|
1353
|
+
checkboxes Json? @default("[]")
|
|
1354
|
+
checkbox_definitions ConsentCheckboxDefinition[]
|
|
1355
|
+
|
|
1356
|
+
consent_records ConsentRecord[]
|
|
1341
1357
|
|
|
1342
1358
|
@@unique([consent_document_id, version_number])
|
|
1343
1359
|
@@index([consent_document_id, status, version_number(sort: Desc)])
|
|
1344
1360
|
@@index([document_id])
|
|
1361
|
+
@@index([privacy_policy_id])
|
|
1345
1362
|
@@schema("public")
|
|
1346
1363
|
}
|
|
1347
1364
|
|
|
@@ -1361,22 +1378,31 @@ model ConsentCheckboxDefinition {
|
|
|
1361
1378
|
|
|
1362
1379
|
/// Consent type is resolved via consent_document_version -> consent_document.consent_type.
|
|
1363
1380
|
model ConsentRecord {
|
|
1364
|
-
id
|
|
1365
|
-
user_id
|
|
1366
|
-
user
|
|
1367
|
-
|
|
1381
|
+
id String @id @default(uuid())
|
|
1382
|
+
user_id String
|
|
1383
|
+
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
|
1384
|
+
|
|
1385
|
+
// Dual-existence for non-breaking migration
|
|
1386
|
+
outcome ConsentOutcome?
|
|
1387
|
+
grant_status ConsentGrantStatus?
|
|
1388
|
+
|
|
1368
1389
|
consent_document_version_id String
|
|
1369
1390
|
consent_document_version ConsentDocumentVersion @relation(fields: [consent_document_version_id], references: [id], onDelete: Restrict)
|
|
1370
1391
|
selections Json @default("{}")
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1392
|
+
|
|
1393
|
+
// Dual-existence for non-breaking migration
|
|
1394
|
+
reference_type ConsentReferenceType?
|
|
1395
|
+
reference_id String?
|
|
1396
|
+
evaluation_id String?
|
|
1397
|
+
|
|
1398
|
+
ip_address String?
|
|
1399
|
+
user_agent String?
|
|
1400
|
+
decline_reason String?
|
|
1401
|
+
created_at DateTime @default(now())
|
|
1377
1402
|
|
|
1378
1403
|
@@index([user_id, created_at(sort: Desc)])
|
|
1379
1404
|
@@index([reference_type, reference_id, created_at(sort: Desc)])
|
|
1405
|
+
@@index([evaluation_id, created_at(sort: Desc)])
|
|
1380
1406
|
@@index([consent_document_version_id])
|
|
1381
1407
|
@@schema("public")
|
|
1382
1408
|
}
|
|
@@ -1563,7 +1589,8 @@ model Document {
|
|
|
1563
1589
|
offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
|
|
1564
1590
|
offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
|
|
1565
1591
|
application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
|
|
1566
|
-
|
|
1592
|
+
terms_consent_versions ConsentDocumentVersion[] @relation("TermsDocument")
|
|
1593
|
+
privacy_policy_consent_versions ConsentDocumentVersion[] @relation("PrivacyPolicyDocument")
|
|
1567
1594
|
|
|
1568
1595
|
// Indexes
|
|
1569
1596
|
@@index([candidate_id])
|