@trycompai/db 2.0.2 → 2.1.0
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/dist/schema.prisma +25 -1
- package/package.json +1 -1
package/dist/schema.prisma
CHANGED
|
@@ -2037,6 +2037,20 @@ model Risk {
|
|
|
2037
2037
|
residualImpact Impact @default(insignificant)
|
|
2038
2038
|
treatmentStrategyDescription String?
|
|
2039
2039
|
treatmentStrategy RiskTreatmentType @default(accept)
|
|
2040
|
+
// Per-strategy text store. When the user switches strategies, the current
|
|
2041
|
+
// `treatmentStrategyDescription` is moved into this map under the OLD
|
|
2042
|
+
// strategy key, and the NEW strategy's saved value is loaded back into the
|
|
2043
|
+
// active field. Lets users keep an independent Mitigate plan + Accept
|
|
2044
|
+
// rationale + Transfer rationale on the same risk.
|
|
2045
|
+
// Shape: { mitigate?: string, accept?: string, transfer?: string, avoid?: string }
|
|
2046
|
+
strategyDescriptions Json?
|
|
2047
|
+
|
|
2048
|
+
// Active auto-link suggestion run (trigger.dev). Set when the user kicks
|
|
2049
|
+
// off an AI suggest scan; cleared when the user applies or discards. Lets
|
|
2050
|
+
// the UI resume an in-flight or completed-but-unreviewed scan after a
|
|
2051
|
+
// page reload so progress isn't lost.
|
|
2052
|
+
autoLinkRunId String?
|
|
2053
|
+
autoLinkRunStartedAt DateTime?
|
|
2040
2054
|
|
|
2041
2055
|
// Dates
|
|
2042
2056
|
createdAt DateTime @default(now())
|
|
@@ -2333,7 +2347,7 @@ model SOADocument {
|
|
|
2333
2347
|
isLatest Boolean @default(true) // Whether this is the latest version
|
|
2334
2348
|
|
|
2335
2349
|
// Document status
|
|
2336
|
-
status SOADocumentStatus @default(draft) // draft, in_progress, completed
|
|
2350
|
+
status SOADocumentStatus @default(draft) // draft, in_progress, needs_review, completed
|
|
2337
2351
|
|
|
2338
2352
|
// Document metadata
|
|
2339
2353
|
totalQuestions Int @default(0) // Total number of questions in this document
|
|
@@ -2344,6 +2358,7 @@ model SOADocument {
|
|
|
2344
2358
|
approverId String? // Member ID who will approve this document (set when submitted for approval)
|
|
2345
2359
|
approver Member? @relation("SOADocumentApprover", fields: [approverId], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2346
2360
|
approvedAt DateTime? // When document was approved
|
|
2361
|
+
declinedAt DateTime? // When document was declined
|
|
2347
2362
|
|
|
2348
2363
|
// Dates
|
|
2349
2364
|
completedAt DateTime? // When document was completed
|
|
@@ -2928,6 +2943,10 @@ model Vendor {
|
|
|
2928
2943
|
inherentImpact Impact @default(insignificant)
|
|
2929
2944
|
residualProbability Likelihood @default(very_unlikely)
|
|
2930
2945
|
residualImpact Impact @default(insignificant)
|
|
2946
|
+
treatmentStrategy RiskTreatmentType @default(accept)
|
|
2947
|
+
treatmentStrategyDescription String?
|
|
2948
|
+
// See `Risk.strategyDescriptions`.
|
|
2949
|
+
strategyDescriptions Json?
|
|
2931
2950
|
website String?
|
|
2932
2951
|
isSubProcessor Boolean @default(false)
|
|
2933
2952
|
|
|
@@ -2937,6 +2956,11 @@ model Vendor {
|
|
|
2937
2956
|
trustPortalOrder Int?
|
|
2938
2957
|
complianceBadges Json? // Array of { type: 'soc2' | 'iso27001' | etc, verified: boolean }
|
|
2939
2958
|
|
|
2959
|
+
// Active auto-link suggestion run (trigger.dev). Same semantics as
|
|
2960
|
+
// Risk.autoLinkRunId — lets the UI resume an in-flight scan on reload.
|
|
2961
|
+
autoLinkRunId String?
|
|
2962
|
+
autoLinkRunStartedAt DateTime?
|
|
2963
|
+
|
|
2940
2964
|
createdAt DateTime @default(now())
|
|
2941
2965
|
updatedAt DateTime @updatedAt
|
|
2942
2966
|
|