@adaptware/eagles-db 0.6.1 → 0.6.3
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 +249 -9
- package/client/index-browser.js +242 -3
- package/client/index.d.ts +80148 -54316
- package/client/index.js +249 -9
- package/client/package.json +1 -1
- package/client/schema.prisma +485 -124
- package/client/wasm.js +249 -9
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/consent.prisma +109 -34
- package/prisma/schema/document.prisma +1 -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/prisma/schema/migrations/20261006120000_add_jd_restrict_candidate_upload/migration.sql +2 -0
- package/prisma/schema/organisation.prisma +6 -0
- package/prisma/schema/user.prisma +2 -0
- package/client/libquery_engine-darwin.dylib.node +0 -0
- package/prisma/migrations/20260519120000_migrate_shortlisted_to_selected/migration.sql +0 -2
package/package.json
CHANGED
package/prisma/.DS_Store
CHANGED
|
Binary file
|
package/prisma/schema/.DS_Store
CHANGED
|
Binary file
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
enum ConsentType {
|
|
4
4
|
PLATFORM_TERMS
|
|
5
5
|
INTERVIEW_SESSION
|
|
6
|
+
/// Read-only catalog document; no ConsentRecord submit flow
|
|
7
|
+
PRIVACY_POLICY
|
|
6
8
|
|
|
7
9
|
@@schema("public")
|
|
8
10
|
}
|
|
@@ -47,34 +49,88 @@ enum DataErasureRequestStatus {
|
|
|
47
49
|
@@schema("public")
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
updated_at DateTime @updatedAt
|
|
58
|
-
versions ConsentDocumentVersion[]
|
|
52
|
+
/// Lifecycle for org-managed legal versions (platform seed publishes as PUBLISHED immediately).
|
|
53
|
+
enum ConsentCatalogVersionStatus {
|
|
54
|
+
DRAFT
|
|
55
|
+
PUBLISHED
|
|
56
|
+
ARCHIVED
|
|
57
|
+
/// Emergency takedown — grants blocked even during manifest grace window
|
|
58
|
+
REVOKED
|
|
59
59
|
|
|
60
60
|
@@schema("public")
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
model ConsentDocument {
|
|
64
|
+
id String @id @default(uuid())
|
|
65
|
+
/// Stable key within scope — platform: `platform_terms`, org interview: `interview_session`
|
|
66
|
+
slug String
|
|
67
|
+
consent_type ConsentType
|
|
68
|
+
/// Null = platform-wide catalog row; set = tenant-specific overlay (v1: interview session notice)
|
|
69
|
+
organisation_id String?
|
|
70
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
71
|
+
display_name String?
|
|
72
|
+
is_active Boolean @default(true)
|
|
73
|
+
created_at DateTime @default(now())
|
|
74
|
+
updated_at DateTime @updatedAt
|
|
75
|
+
versions ConsentDocumentVersion[]
|
|
76
|
+
|
|
77
|
+
@@unique([organisation_id, slug])
|
|
78
|
+
@@index([consent_type, organisation_id, is_active])
|
|
79
|
+
@@schema("public")
|
|
80
|
+
}
|
|
81
|
+
|
|
63
82
|
model ConsentDocumentVersion {
|
|
64
|
-
id
|
|
65
|
-
document_id
|
|
66
|
-
document
|
|
67
|
-
version_number
|
|
68
|
-
content_hash
|
|
69
|
-
locale
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
id String @id @default(uuid())
|
|
84
|
+
document_id String
|
|
85
|
+
document ConsentDocument @relation(fields: [document_id], references: [id], onDelete: Cascade)
|
|
86
|
+
version_number Int
|
|
87
|
+
content_hash String
|
|
88
|
+
locale String @default("en")
|
|
89
|
+
/// Legacy inline body; new versions use S3 template fields
|
|
90
|
+
content String? @db.Text
|
|
91
|
+
template_version_label String?
|
|
92
|
+
s3_bucket String?
|
|
93
|
+
/// Legacy single key; prefer s3_archive_key + s3_active_key
|
|
94
|
+
s3_key String?
|
|
95
|
+
s3_region String?
|
|
96
|
+
/// Immutable snapshot path (audit binding)
|
|
97
|
+
s3_archive_key String?
|
|
98
|
+
/// Read-optimized current copy under active/
|
|
99
|
+
s3_active_key String?
|
|
100
|
+
/// Decision 6 — immutable archive row in shared Document catalog
|
|
101
|
+
s3_document_id String?
|
|
102
|
+
s3_document Document? @relation(fields: [s3_document_id], references: [id], onDelete: SetNull)
|
|
103
|
+
status ConsentCatalogVersionStatus @default(PUBLISHED)
|
|
104
|
+
published_at DateTime?
|
|
105
|
+
published_by_id String?
|
|
106
|
+
published_by User? @relation("ConsentVersionPublishedBy", fields: [published_by_id], references: [id], onDelete: SetNull)
|
|
107
|
+
approval_notes String? @db.Text
|
|
108
|
+
supersedes_version_id String?
|
|
109
|
+
supersedes_version ConsentDocumentVersion? @relation("ConsentVersionSupersedes", fields: [supersedes_version_id], references: [id], onDelete: SetNull)
|
|
110
|
+
superseded_by ConsentDocumentVersion[] @relation("ConsentVersionSupersedes")
|
|
111
|
+
created_at DateTime @default(now())
|
|
112
|
+
checkboxes ConsentCheckboxDefinition[]
|
|
113
|
+
consent_records ConsentRecord[]
|
|
114
|
+
system_consent_epochs SystemConsentEpoch[]
|
|
115
|
+
version_approvals ConsentDocumentVersionApproval[]
|
|
75
116
|
|
|
76
117
|
@@unique([document_id, version_number])
|
|
77
118
|
@@index([document_id, published_at(sort: Desc)])
|
|
119
|
+
@@index([s3_document_id])
|
|
120
|
+
@@schema("public")
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
model ConsentDocumentVersionApproval {
|
|
124
|
+
id String @id @default(uuid())
|
|
125
|
+
document_version_id String
|
|
126
|
+
document_version ConsentDocumentVersion @relation(fields: [document_version_id], references: [id], onDelete: Cascade)
|
|
127
|
+
action String
|
|
128
|
+
actor_user_id String?
|
|
129
|
+
actor_user User? @relation("ConsentVersionApprovalActor", fields: [actor_user_id], references: [id], onDelete: SetNull)
|
|
130
|
+
notes String? @db.Text
|
|
131
|
+
created_at DateTime @default(now())
|
|
132
|
+
|
|
133
|
+
@@index([document_version_id, created_at(sort: Desc)])
|
|
78
134
|
@@schema("public")
|
|
79
135
|
}
|
|
80
136
|
|
|
@@ -93,26 +149,45 @@ model ConsentCheckboxDefinition {
|
|
|
93
149
|
}
|
|
94
150
|
|
|
95
151
|
model ConsentRecord {
|
|
96
|
-
id
|
|
97
|
-
user_id
|
|
98
|
-
user
|
|
99
|
-
consent_type
|
|
100
|
-
outcome
|
|
101
|
-
document_version_id
|
|
102
|
-
document_version
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
152
|
+
id String @id @default(uuid())
|
|
153
|
+
user_id String
|
|
154
|
+
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
|
155
|
+
consent_type ConsentType
|
|
156
|
+
outcome ConsentOutcome
|
|
157
|
+
document_version_id String
|
|
158
|
+
document_version ConsentDocumentVersion @relation(fields: [document_version_id], references: [id], onDelete: Restrict)
|
|
159
|
+
template_version_label String?
|
|
160
|
+
context_snapshot Json?
|
|
161
|
+
selections Json @default("{}")
|
|
162
|
+
reference_type ConsentReferenceType?
|
|
163
|
+
reference_id String?
|
|
164
|
+
ip_address String?
|
|
165
|
+
user_agent String?
|
|
166
|
+
decline_reason String?
|
|
167
|
+
/// Copy of version s3_archive_key (or legacy s3_key) at grant time
|
|
168
|
+
storage_snapshot_key String?
|
|
169
|
+
content_hash_at_grant String?
|
|
170
|
+
created_at DateTime @default(now())
|
|
110
171
|
|
|
111
172
|
@@index([user_id, consent_type, created_at(sort: Desc)])
|
|
112
173
|
@@index([reference_type, reference_id, consent_type, created_at(sort: Desc)])
|
|
113
174
|
@@schema("public")
|
|
114
175
|
}
|
|
115
176
|
|
|
177
|
+
/// Platform-wide re-consent watermark (complements per-interview consent_epoch_at).
|
|
178
|
+
model SystemConsentEpoch {
|
|
179
|
+
id String @id @default(uuid())
|
|
180
|
+
consent_type ConsentType
|
|
181
|
+
epoch_at DateTime @default(now())
|
|
182
|
+
document_version_id String?
|
|
183
|
+
document_version ConsentDocumentVersion? @relation(fields: [document_version_id], references: [id], onDelete: SetNull)
|
|
184
|
+
reason String?
|
|
185
|
+
created_at DateTime @default(now())
|
|
186
|
+
|
|
187
|
+
@@index([consent_type, epoch_at(sort: Desc)])
|
|
188
|
+
@@schema("public")
|
|
189
|
+
}
|
|
190
|
+
|
|
116
191
|
/// Append-only erasure plan snapshots (v1: DRY_RUN only in application code).
|
|
117
192
|
model DataErasureRequest {
|
|
118
193
|
id String @id @default(uuid())
|
|
@@ -38,6 +38,7 @@ model Document {
|
|
|
38
38
|
offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
|
|
39
39
|
offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
|
|
40
40
|
application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
|
|
41
|
+
consent_document_versions ConsentDocumentVersion[]
|
|
41
42
|
|
|
42
43
|
// Indexes
|
|
43
44
|
@@index([candidate_id])
|
|
Binary file
|
package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/.DS_Store
ADDED
|
Binary file
|
|
@@ -85,6 +85,12 @@ model Organisation {
|
|
|
85
85
|
licensing_ledger_entries LicensingLedgerEntry[]
|
|
86
86
|
license_package_organisations LicensePackageOrganisation[]
|
|
87
87
|
ai_cost_ledger_entries AiCostLedgerEntry[]
|
|
88
|
+
consent_documents ConsentDocument[]
|
|
89
|
+
/// Deprecated — migrate to org-scoped ConsentDocument; kept for legacy S3 fallback until backfill completes
|
|
90
|
+
has_custom_consent Boolean @default(false)
|
|
91
|
+
consent_s3_bucket String?
|
|
92
|
+
consent_s3_region String?
|
|
93
|
+
custom_interview_consent_s3_key_prefix String?
|
|
88
94
|
|
|
89
95
|
@@index([name])
|
|
90
96
|
@@schema("public")
|
|
@@ -104,6 +104,8 @@ model User {
|
|
|
104
104
|
department_members DepartmentMember[] @relation("DepartmentMemberships")
|
|
105
105
|
assigned_hiring_units PurchasedHiringUnit[] @relation("AssignedHiringUnits")
|
|
106
106
|
consent_records ConsentRecord[]
|
|
107
|
+
consent_versions_published ConsentDocumentVersion[] @relation("ConsentVersionPublishedBy")
|
|
108
|
+
consent_version_approval_actions ConsentDocumentVersionApproval[] @relation("ConsentVersionApprovalActor")
|
|
107
109
|
erasure_requests_as_subject DataErasureRequest[] @relation("ErasureSubjectUser")
|
|
108
110
|
erasure_requests_requested DataErasureRequest[] @relation("ErasureRequestedByUser")
|
|
109
111
|
|
|
Binary file
|