@trycompai/db 1.3.8 → 1.3.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.
Files changed (2) hide show
  1. package/dist/schema.prisma +77 -9
  2. package/package.json +1 -1
@@ -186,6 +186,70 @@ enum PolicyStatus {
186
186
  }
187
187
 
188
188
 
189
+ // ===== automation-run.prisma =====
190
+ model EvidenceAutomationRun {
191
+ id String @id @default(dbgenerated("generate_prefixed_cuid('ear'::text)"))
192
+ createdAt DateTime @default(now())
193
+ updatedAt DateTime @updatedAt
194
+
195
+ // Relations
196
+ evidenceAutomationId String
197
+ evidenceAutomation EvidenceAutomation @relation(fields: [evidenceAutomationId], references: [id], onDelete: Cascade)
198
+
199
+ // Run details
200
+ status EvidenceAutomationRunStatus @default(pending)
201
+ startedAt DateTime?
202
+ completedAt DateTime?
203
+
204
+ // Results
205
+ success Boolean?
206
+ error String?
207
+ logs Json?
208
+ output Json?
209
+
210
+ // Metadata
211
+ triggeredBy EvidenceAutomationTrigger @default(scheduled)
212
+ runDuration Int? // in milliseconds
213
+ Task Task? @relation(fields: [taskId], references: [id])
214
+ taskId String?
215
+
216
+ @@index([evidenceAutomationId])
217
+ @@index([status])
218
+ @@index([createdAt])
219
+ }
220
+
221
+ enum EvidenceAutomationRunStatus {
222
+ pending
223
+ running
224
+ completed
225
+ failed
226
+ cancelled
227
+ }
228
+
229
+ enum EvidenceAutomationTrigger {
230
+ manual
231
+ scheduled
232
+ api
233
+ }
234
+
235
+
236
+ // ===== automation.prisma =====
237
+ model EvidenceAutomation {
238
+ id String @id @default(dbgenerated("generate_prefixed_cuid('aut'::text)"))
239
+ name String
240
+ description String?
241
+ createdAt DateTime @default(now())
242
+
243
+ taskId String
244
+ task Task @relation(fields: [taskId], references: [id], onDelete: Cascade)
245
+
246
+ // Relations
247
+ runs EvidenceAutomationRun[]
248
+
249
+ @@index([taskId])
250
+ }
251
+
252
+
189
253
  // ===== comment.prisma =====
190
254
  model Comment {
191
255
  id String @id @default(dbgenerated("generate_prefixed_cuid('cmt'::text)"))
@@ -573,6 +637,7 @@ enum RiskTreatmentType {
573
637
 
574
638
  enum RiskCategory {
575
639
  customer
640
+ fraud
576
641
  governance
577
642
  operations
578
643
  other
@@ -736,15 +801,18 @@ model Task {
736
801
  reviewDate DateTime?
737
802
 
738
803
  // Relationships
739
- controls Control[]
740
- vendors Vendor[]
741
- risks Risk[]
742
- assigneeId String?
743
- assignee Member? @relation(fields: [assigneeId], references: [id])
744
- organizationId String
745
- organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
746
- taskTemplateId String?
747
- taskTemplate FrameworkEditorTaskTemplate? @relation(fields: [taskTemplateId], references: [id])
804
+ assigneeId String?
805
+ assignee Member? @relation(fields: [assigneeId], references: [id])
806
+ organizationId String
807
+ organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
808
+ taskTemplateId String?
809
+ taskTemplate FrameworkEditorTaskTemplate? @relation(fields: [taskTemplateId], references: [id])
810
+ controls Control[]
811
+ vendors Vendor[]
812
+ risks Risk[]
813
+ evidenceAutomations EvidenceAutomation[]
814
+
815
+ EvidenceAutomationRun EvidenceAutomationRun[]
748
816
  }
749
817
 
750
818
  enum TaskStatus {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@trycompai/db",
3
3
  "description": "Database package with Prisma client and schema for Comp AI",
4
- "version": "1.3.8",
4
+ "version": "1.3.10",
5
5
  "dependencies": {
6
6
  "@prisma/client": "^6.13.0",
7
7
  "dotenv": "^16.4.5"