@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/package.json
CHANGED
package/prisma/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -23,6 +23,14 @@ enum ConsentOutcome {
|
|
|
23
23
|
@@schema("public")
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
enum ConsentCatalogVersionStatus {
|
|
27
|
+
DRAFT
|
|
28
|
+
PUBLISHED
|
|
29
|
+
ARCHIVED
|
|
30
|
+
|
|
31
|
+
@@schema("public")
|
|
32
|
+
}
|
|
33
|
+
|
|
26
34
|
enum DataErasureTrigger {
|
|
27
35
|
ADMIN
|
|
28
36
|
USER_REQUEST
|
|
@@ -49,114 +57,77 @@ enum DataErasureRequestStatus {
|
|
|
49
57
|
@@schema("public")
|
|
50
58
|
}
|
|
51
59
|
|
|
52
|
-
///
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
PUBLISHED
|
|
56
|
-
ARCHIVED
|
|
57
|
-
/// Emergency takedown — grants blocked even during manifest grace window
|
|
58
|
-
REVOKED
|
|
59
|
-
|
|
60
|
-
@@schema("public")
|
|
61
|
-
}
|
|
62
|
-
|
|
60
|
+
/// Catalog identity is (organisation_id, consent_type). Null organisation_id = platform default.
|
|
61
|
+
/// Platform rows also need a partial unique index on consent_type WHERE organisation_id IS NULL
|
|
62
|
+
/// (PostgreSQL treats NULLs as distinct in the composite unique below).
|
|
63
63
|
model ConsentDocument {
|
|
64
|
-
id String
|
|
65
|
-
/// Stable key within scope — platform: `platform_terms`, org interview: `interview_session`
|
|
66
|
-
slug String
|
|
64
|
+
id String @id @default(uuid())
|
|
67
65
|
consent_type ConsentType
|
|
68
|
-
/// Null = platform-wide catalog row; set = tenant-specific overlay (v1: interview session notice)
|
|
69
66
|
organisation_id String?
|
|
70
|
-
organisation Organisation?
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
created_at DateTime @default(now())
|
|
74
|
-
updated_at DateTime @updatedAt
|
|
67
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade)
|
|
68
|
+
created_at DateTime @default(now())
|
|
69
|
+
updated_at DateTime @updatedAt
|
|
75
70
|
versions ConsentDocumentVersion[]
|
|
76
71
|
|
|
77
|
-
@@unique([organisation_id,
|
|
78
|
-
@@index([consent_type, organisation_id
|
|
72
|
+
@@unique([organisation_id, consent_type])
|
|
73
|
+
@@index([consent_type, organisation_id])
|
|
79
74
|
@@schema("public")
|
|
80
75
|
}
|
|
81
76
|
|
|
77
|
+
/// One immutable markdown object per version; S3 location and hash live on the linked Document.
|
|
82
78
|
model ConsentDocumentVersion {
|
|
83
|
-
id
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
version_number
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
published_at DateTime?
|
|
100
|
-
created_at DateTime @default(now())
|
|
101
|
-
checkboxes ConsentCheckboxDefinition[]
|
|
102
|
-
consent_records ConsentRecord[]
|
|
103
|
-
system_consent_epochs SystemConsentEpoch[]
|
|
104
|
-
|
|
105
|
-
@@unique([document_id, version_number])
|
|
106
|
-
@@index([document_id, published_at(sort: Desc)])
|
|
107
|
-
@@index([s3_document_id])
|
|
79
|
+
id String @id @default(uuid())
|
|
80
|
+
consent_document_id String
|
|
81
|
+
consent_document ConsentDocument @relation(fields: [consent_document_id], references: [id], onDelete: Cascade)
|
|
82
|
+
version_number Int
|
|
83
|
+
document_id String?
|
|
84
|
+
document Document? @relation(fields: [document_id], references: [id], onDelete: Restrict)
|
|
85
|
+
status ConsentCatalogVersionStatus @default(DRAFT)
|
|
86
|
+
published_at DateTime?
|
|
87
|
+
created_at DateTime @default(now())
|
|
88
|
+
updated_at DateTime @updatedAt
|
|
89
|
+
checkboxes ConsentCheckboxDefinition[]
|
|
90
|
+
consent_records ConsentRecord[]
|
|
91
|
+
|
|
92
|
+
@@unique([consent_document_id, version_number])
|
|
93
|
+
@@index([consent_document_id, status, version_number(sort: Desc)])
|
|
94
|
+
@@index([document_id])
|
|
108
95
|
@@schema("public")
|
|
109
96
|
}
|
|
110
97
|
|
|
111
98
|
model ConsentCheckboxDefinition {
|
|
112
|
-
id
|
|
113
|
-
|
|
114
|
-
|
|
99
|
+
id String @id @default(uuid())
|
|
100
|
+
consent_document_version_id String
|
|
101
|
+
consent_document_version ConsentDocumentVersion @relation(fields: [consent_document_version_id], references: [id], onDelete: Cascade)
|
|
115
102
|
/// Stable machine key in ConsentRecord.selections JSON
|
|
116
|
-
checkbox_key
|
|
117
|
-
label
|
|
118
|
-
sort_order
|
|
119
|
-
default_required_hint
|
|
103
|
+
checkbox_key String
|
|
104
|
+
label String
|
|
105
|
+
sort_order Int @default(0)
|
|
106
|
+
default_required_hint Boolean @default(true)
|
|
120
107
|
|
|
121
|
-
@@unique([
|
|
108
|
+
@@unique([consent_document_version_id, checkbox_key])
|
|
122
109
|
@@schema("public")
|
|
123
110
|
}
|
|
124
111
|
|
|
112
|
+
/// Consent type is resolved via consent_document_version -> consent_document.consent_type.
|
|
125
113
|
model ConsentRecord {
|
|
126
|
-
id
|
|
127
|
-
user_id
|
|
128
|
-
user
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
created_at
|
|
142
|
-
|
|
143
|
-
@@index([user_id, consent_type, created_at(sort: Desc)])
|
|
144
|
-
@@index([reference_type, reference_id, consent_type, created_at(sort: Desc)])
|
|
145
|
-
@@schema("public")
|
|
146
|
-
}
|
|
147
|
-
|
|
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).
|
|
150
|
-
model SystemConsentEpoch {
|
|
151
|
-
id String @id @default(uuid())
|
|
152
|
-
consent_type ConsentType
|
|
153
|
-
epoch_at DateTime @default(now())
|
|
154
|
-
document_version_id String?
|
|
155
|
-
document_version ConsentDocumentVersion? @relation(fields: [document_version_id], references: [id], onDelete: SetNull)
|
|
156
|
-
reason String?
|
|
157
|
-
created_at DateTime @default(now())
|
|
158
|
-
|
|
159
|
-
@@index([consent_type, epoch_at(sort: Desc)])
|
|
114
|
+
id String @id @default(uuid())
|
|
115
|
+
user_id String
|
|
116
|
+
user User @relation(fields: [user_id], references: [id], onDelete: Cascade)
|
|
117
|
+
outcome ConsentOutcome
|
|
118
|
+
consent_document_version_id String
|
|
119
|
+
consent_document_version ConsentDocumentVersion @relation(fields: [consent_document_version_id], references: [id], onDelete: Restrict)
|
|
120
|
+
selections Json @default("{}")
|
|
121
|
+
reference_type ConsentReferenceType?
|
|
122
|
+
reference_id String?
|
|
123
|
+
ip_address String?
|
|
124
|
+
user_agent String?
|
|
125
|
+
decline_reason String?
|
|
126
|
+
created_at DateTime @default(now())
|
|
127
|
+
|
|
128
|
+
@@index([user_id, created_at(sort: Desc)])
|
|
129
|
+
@@index([reference_type, reference_id, created_at(sort: Desc)])
|
|
130
|
+
@@index([consent_document_version_id])
|
|
160
131
|
@@schema("public")
|
|
161
132
|
}
|
|
162
133
|
|
|
Binary file
|
package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/.DS_Store
ADDED
|
Binary file
|
|
@@ -86,11 +86,6 @@ model Organisation {
|
|
|
86
86
|
license_package_organisations LicensePackageOrganisation[]
|
|
87
87
|
ai_cost_ledger_entries AiCostLedgerEntry[]
|
|
88
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?
|
|
94
89
|
|
|
95
90
|
@@index([name])
|
|
96
91
|
@@schema("public")
|
|
@@ -63,6 +63,9 @@ model Resume {
|
|
|
63
63
|
conversation_history Json?
|
|
64
64
|
/// Progress 0-100 reported by the ResumeIntake workflow.
|
|
65
65
|
intake_progress Int?
|
|
66
|
+
/// Set when the candidate archives the resume; null = active. Archived
|
|
67
|
+
/// resumes are hidden from resume pickers (e.g. the apply flow).
|
|
68
|
+
archived_at DateTime?
|
|
66
69
|
/// Last Orion execution id for the intake/generate workflow, for tracing.
|
|
67
70
|
orion_execution_id String?
|
|
68
71
|
/// Snapshot of the candidate's own words, taken immediately before the
|