@adaptware/eagles-db 0.6.3 → 0.6.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.6.3",
3
+ "version": "0.6.6",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -86,33 +86,21 @@ model ConsentDocumentVersion {
86
86
  version_number Int
87
87
  content_hash String
88
88
  locale String @default("en")
89
- /// Legacy inline body; new versions use S3 template fields
90
- content String? @db.Text
91
89
  template_version_label String?
92
90
  s3_bucket String?
93
- /// Legacy single key; prefer s3_archive_key + s3_active_key
94
- s3_key String?
95
- s3_region String?
96
91
  /// Immutable snapshot path (audit binding)
97
92
  s3_archive_key String?
98
93
  /// Read-optimized current copy under active/
99
94
  s3_active_key String?
100
- /// Decision 6 — immutable archive row in shared Document catalog
95
+ /// Optional immutable archive row in shared Document catalog (org ingest)
101
96
  s3_document_id String?
102
97
  s3_document Document? @relation(fields: [s3_document_id], references: [id], onDelete: SetNull)
103
98
  status ConsentCatalogVersionStatus @default(PUBLISHED)
104
99
  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
100
  created_at DateTime @default(now())
112
101
  checkboxes ConsentCheckboxDefinition[]
113
102
  consent_records ConsentRecord[]
114
103
  system_consent_epochs SystemConsentEpoch[]
115
- version_approvals ConsentDocumentVersionApproval[]
116
104
 
117
105
  @@unique([document_id, version_number])
118
106
  @@index([document_id, published_at(sort: Desc)])
@@ -120,20 +108,6 @@ model ConsentDocumentVersion {
120
108
  @@schema("public")
121
109
  }
122
110
 
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)])
134
- @@schema("public")
135
- }
136
-
137
111
  model ConsentCheckboxDefinition {
138
112
  id String @id @default(uuid())
139
113
  document_version_id String
@@ -164,9 +138,6 @@ model ConsentRecord {
164
138
  ip_address String?
165
139
  user_agent String?
166
140
  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
141
  created_at DateTime @default(now())
171
142
 
172
143
  @@index([user_id, consent_type, created_at(sort: Desc)])
@@ -174,7 +145,8 @@ model ConsentRecord {
174
145
  @@schema("public")
175
146
  }
176
147
 
177
- /// Platform-wide re-consent watermark (complements per-interview consent_epoch_at).
148
+ // Platform-wide re-consent watermark (complements per-interview consent_epoch_at).
149
+ // epoch_at is the effective instant for platform re-consent (can differ from created_at when policy changes are backdated).
178
150
  model SystemConsentEpoch {
179
151
  id String @id @default(uuid())
180
152
  consent_type ConsentType
@@ -104,8 +104,6 @@ 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")
109
107
  erasure_requests_as_subject DataErasureRequest[] @relation("ErasureSubjectUser")
110
108
  erasure_requests_requested DataErasureRequest[] @relation("ErasureRequestedByUser")
111
109
 
package/prisma/.DS_Store DELETED
Binary file
Binary file
Binary file