@trycompai/db 1.3.19-canary.3 → 1.3.20-canary.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.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,eAAO,MAAM,EAAE,gIAA+C,CAAC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,eAAO,MAAM,EAAE,gIAIX,CAAC"}
package/dist/client.js CHANGED
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.db = void 0;
4
4
  const client_1 = require("@prisma/client");
5
5
  const globalForPrisma = global;
6
- exports.db = globalForPrisma.prisma || new client_1.PrismaClient();
6
+ exports.db = globalForPrisma.prisma ||
7
+ new client_1.PrismaClient({
8
+ datasourceUrl: process.env.DATABASE_URL,
9
+ });
7
10
  if (process.env.NODE_ENV !== 'production')
8
11
  globalForPrisma.prisma = exports.db;
File without changes
@@ -7,7 +7,6 @@ generator client {
7
7
  datasource db {
8
8
  provider = "postgresql"
9
9
  url = env("DATABASE_URL")
10
- directUrl = env("DATABASE_URL")
11
10
  extensions = [pgcrypto]
12
11
  }
13
12
 
@@ -40,6 +39,7 @@ enum AttachmentEntityType {
40
39
  risk
41
40
  comment
42
41
  trust_nda
42
+ task_item
43
43
  }
44
44
 
45
45
  enum AttachmentType {
@@ -63,6 +63,7 @@ model User {
63
63
  lastLogin DateTime?
64
64
  emailNotificationsUnsubscribed Boolean @default(false)
65
65
  emailPreferences Json? @default("{\"policyNotifications\":true,\"taskReminders\":true,\"weeklyTaskDigest\":true,\"unassignedItemsNotifications\":true}")
66
+ isPlatformAdmin Boolean @default(false)
66
67
 
67
68
  accounts Account[]
68
69
  auditLog AuditLog[]
@@ -164,6 +165,9 @@ model Member {
164
165
  reviewedAccessRequests TrustAccessRequest[] @relation("TrustAccessRequestReviewer")
165
166
  issuedGrants TrustAccessGrant[] @relation("IssuedGrants")
166
167
  revokedGrants TrustAccessGrant[] @relation("RevokedGrants")
168
+ createdTaskItems TaskItem[] @relation("TaskItemCreator")
169
+ updatedTaskItems TaskItem[] @relation("TaskItemUpdater")
170
+ assignedTaskItems TaskItem[] @relation("TaskItemAssignee")
167
171
  }
168
172
 
169
173
  model Invitation {
@@ -298,6 +302,105 @@ model EvidenceAutomation {
298
302
  }
299
303
 
300
304
 
305
+ // ===== browserbase-context.prisma =====
306
+ /// Stores Browserbase context IDs for browser-based automation
307
+ /// One context per organization - shared like a normal browser
308
+ model BrowserbaseContext {
309
+ id String @id @default(dbgenerated("generate_prefixed_cuid('bbc'::text)"))
310
+
311
+ /// Organization that owns this browser context
312
+ organizationId String @unique
313
+ organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
314
+
315
+ /// Browserbase context ID from their API
316
+ contextId String
317
+
318
+ createdAt DateTime @default(now())
319
+ updatedAt DateTime @updatedAt
320
+
321
+ @@index([organizationId])
322
+ }
323
+
324
+ /// Browser automation configuration linked to a task
325
+ model BrowserAutomation {
326
+ id String @id @default(dbgenerated("generate_prefixed_cuid('bau'::text)"))
327
+ name String
328
+ description String?
329
+
330
+ /// Task this automation belongs to
331
+ taskId String
332
+ task Task @relation(fields: [taskId], references: [id], onDelete: Cascade)
333
+
334
+ /// Starting URL for the automation
335
+ targetUrl String
336
+
337
+ /// Natural language instruction for the AI agent
338
+ instruction String
339
+
340
+ /// Whether automation is enabled for scheduled runs
341
+ isEnabled Boolean @default(false)
342
+
343
+ /// Cron expression for scheduled runs (null = manual only)
344
+ schedule String?
345
+
346
+ createdAt DateTime @default(now())
347
+ updatedAt DateTime @updatedAt
348
+
349
+ runs BrowserAutomationRun[]
350
+
351
+ @@index([taskId])
352
+ }
353
+
354
+ /// Records of browser automation executions
355
+ model BrowserAutomationRun {
356
+ id String @id @default(dbgenerated("generate_prefixed_cuid('bar'::text)"))
357
+
358
+ /// Parent automation
359
+ automationId String
360
+ automation BrowserAutomation @relation(fields: [automationId], references: [id], onDelete: Cascade)
361
+
362
+ /// Execution status
363
+ status BrowserAutomationRunStatus @default(pending)
364
+
365
+ /// Timestamps
366
+ startedAt DateTime?
367
+ completedAt DateTime?
368
+
369
+ /// Duration in milliseconds
370
+ durationMs Int?
371
+
372
+ /// Screenshot URL in S3 (if successful)
373
+ screenshotUrl String?
374
+
375
+ /// Evaluation result - whether the automation fulfilled the task requirements
376
+ evaluationStatus BrowserAutomationEvaluationStatus?
377
+
378
+ /// AI explanation of why it passed or failed
379
+ evaluationReason String?
380
+
381
+ /// Error message (if failed)
382
+ error String?
383
+
384
+ createdAt DateTime @default(now())
385
+
386
+ @@index([automationId])
387
+ @@index([status])
388
+ @@index([createdAt])
389
+ }
390
+
391
+ enum BrowserAutomationEvaluationStatus {
392
+ pass
393
+ fail
394
+ }
395
+
396
+ enum BrowserAutomationRunStatus {
397
+ pending
398
+ running
399
+ completed
400
+ failed
401
+ }
402
+
403
+
301
404
  // ===== comment.prisma =====
302
405
  model Comment {
303
406
  id String @id @default(dbgenerated("generate_prefixed_cuid('cmt'::text)"))
@@ -491,6 +594,424 @@ model FrameworkInstance {
491
594
  }
492
595
 
493
596
 
597
+ // ===== integration-platform.prisma =====
598
+ // ===== Integration Platform =====
599
+ // New integration platform models for scalable, config-driven integrations
600
+
601
+ /// Stores metadata about available integration providers (synced from code manifests)
602
+ model IntegrationProvider {
603
+ id String @id @default(dbgenerated("generate_prefixed_cuid('prv'::text)"))
604
+ /// Unique slug matching manifest ID (e.g., "github", "slack")
605
+ slug String @unique
606
+ /// Display name
607
+ name String
608
+ /// Category for grouping
609
+ category String
610
+ /// Hash of manifest for detecting changes
611
+ manifestHash String?
612
+ /// Capabilities JSON array
613
+ capabilities Json @default("[]")
614
+ /// Whether provider is active
615
+ isActive Boolean @default(true)
616
+
617
+ createdAt DateTime @default(now())
618
+ updatedAt DateTime @updatedAt
619
+
620
+ connections IntegrationConnection[]
621
+
622
+ @@index([slug])
623
+ @@index([category])
624
+ }
625
+
626
+ /// Represents an organization's connection to an integration provider
627
+ model IntegrationConnection {
628
+ id String @id @default(dbgenerated("generate_prefixed_cuid('icn'::text)"))
629
+
630
+ /// Reference to the provider
631
+ providerId String
632
+ provider IntegrationProvider @relation(fields: [providerId], references: [id], onDelete: Cascade)
633
+
634
+ /// Organization that owns this connection
635
+ organizationId String
636
+ organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
637
+
638
+ /// Connection status
639
+ status IntegrationConnectionStatus @default(pending)
640
+
641
+ /// Auth strategy used (oauth2, api_key, basic, jwt, custom)
642
+ authStrategy String
643
+
644
+ /// Reference to active credential version
645
+ activeCredentialVersionId String?
646
+
647
+ /// Last successful sync timestamp
648
+ lastSyncAt DateTime?
649
+
650
+ /// Next scheduled sync timestamp
651
+ nextSyncAt DateTime?
652
+
653
+ /// Custom sync cadence (cron expression), null = use default
654
+ syncCadence String?
655
+
656
+ /// Additional metadata (e.g., connected account info)
657
+ metadata Json?
658
+
659
+ /// User-configured variables for checks (collected after OAuth)
660
+ variables Json?
661
+
662
+ /// Error message if status is error
663
+ errorMessage String?
664
+
665
+ createdAt DateTime @default(now())
666
+ updatedAt DateTime @updatedAt
667
+
668
+ credentialVersions IntegrationCredentialVersion[]
669
+ runs IntegrationRun[]
670
+ findings IntegrationPlatformFinding[]
671
+ checkRuns IntegrationCheckRun[]
672
+
673
+ @@unique([providerId, organizationId])
674
+ @@index([organizationId])
675
+ @@index([providerId])
676
+ @@index([status])
677
+ }
678
+
679
+ enum IntegrationConnectionStatus {
680
+ pending // Awaiting credential setup
681
+ active // Connected and operational
682
+ error // Connection has errors
683
+ paused // Manually paused by user
684
+ disconnected // User disconnected
685
+ }
686
+
687
+ /// Stores encrypted credentials with versioning for audit trail
688
+ model IntegrationCredentialVersion {
689
+ id String @id @default(dbgenerated("generate_prefixed_cuid('icv'::text)"))
690
+
691
+ /// Parent connection
692
+ connectionId String
693
+ connection IntegrationConnection @relation(fields: [connectionId], references: [id], onDelete: Cascade)
694
+
695
+ /// Encrypted credential payload (JSON with encrypted fields)
696
+ encryptedPayload Json
697
+
698
+ /// Version number (auto-increment per connection)
699
+ version Int
700
+
701
+ /// Token expiration (for OAuth tokens)
702
+ expiresAt DateTime?
703
+
704
+ /// When this version was rotated/replaced
705
+ rotatedAt DateTime?
706
+
707
+ createdAt DateTime @default(now())
708
+
709
+ @@unique([connectionId, version])
710
+ @@index([connectionId])
711
+ }
712
+
713
+ /// Records each sync/job execution for audit and debugging
714
+ model IntegrationRun {
715
+ id String @id @default(dbgenerated("generate_prefixed_cuid('irn'::text)"))
716
+
717
+ /// Parent connection
718
+ connectionId String
719
+ connection IntegrationConnection @relation(fields: [connectionId], references: [id], onDelete: Cascade)
720
+
721
+ /// Type of job
722
+ jobType IntegrationRunJobType
723
+
724
+ /// Execution status
725
+ status IntegrationRunStatus @default(pending)
726
+
727
+ /// Timestamps
728
+ startedAt DateTime?
729
+ completedAt DateTime?
730
+
731
+ /// Duration in milliseconds
732
+ durationMs Int?
733
+
734
+ /// Number of findings from this run
735
+ findingsCount Int @default(0)
736
+
737
+ /// Error details if failed
738
+ error Json?
739
+
740
+ /// Additional metadata (trigger source, cursor, etc.)
741
+ metadata Json?
742
+
743
+ createdAt DateTime @default(now())
744
+
745
+ findings IntegrationPlatformFinding[]
746
+
747
+ @@index([connectionId])
748
+ @@index([status])
749
+ @@index([createdAt])
750
+ }
751
+
752
+ enum IntegrationRunJobType {
753
+ full_sync
754
+ delta_sync
755
+ webhook
756
+ manual
757
+ test_connection
758
+ }
759
+
760
+ enum IntegrationRunStatus {
761
+ pending
762
+ running
763
+ success
764
+ failed
765
+ cancelled
766
+ }
767
+
768
+ /// Stores findings/results from integration syncs
769
+ model IntegrationPlatformFinding {
770
+ id String @id @default(dbgenerated("generate_prefixed_cuid('ipf'::text)"))
771
+
772
+ /// Parent run (optional - webhooks may not have runs)
773
+ runId String?
774
+ run IntegrationRun? @relation(fields: [runId], references: [id], onDelete: SetNull)
775
+
776
+ /// Parent connection
777
+ connectionId String
778
+ connection IntegrationConnection @relation(fields: [connectionId], references: [id], onDelete: Cascade)
779
+
780
+ /// Resource classification
781
+ resourceType String
782
+ resourceId String
783
+
784
+ /// Finding details
785
+ title String
786
+ description String?
787
+
788
+ /// Severity level
789
+ severity IntegrationFindingSeverity @default(info)
790
+
791
+ /// Finding status
792
+ status IntegrationFindingStatus @default(open)
793
+
794
+ /// Remediation guidance
795
+ remediation String?
796
+
797
+ /// Raw payload from provider
798
+ rawPayload Json?
799
+
800
+ createdAt DateTime @default(now())
801
+ updatedAt DateTime @updatedAt
802
+
803
+ @@index([connectionId])
804
+ @@index([runId])
805
+ @@index([resourceType, resourceId])
806
+ @@index([severity])
807
+ @@index([status])
808
+ }
809
+
810
+ enum IntegrationFindingSeverity {
811
+ info
812
+ low
813
+ medium
814
+ high
815
+ critical
816
+ }
817
+
818
+ enum IntegrationFindingStatus {
819
+ open
820
+ resolved
821
+ ignored
822
+ }
823
+
824
+ /// Stores OAuth state for CSRF protection during OAuth flow
825
+ model IntegrationOAuthState {
826
+ id String @id @default(dbgenerated("generate_prefixed_cuid('ios'::text)"))
827
+
828
+ /// Random state parameter
829
+ state String @unique
830
+
831
+ /// Provider slug
832
+ providerSlug String
833
+
834
+ /// Organization initiating the OAuth
835
+ organizationId String
836
+
837
+ /// User initiating the OAuth
838
+ userId String
839
+
840
+ /// PKCE code verifier (if using PKCE)
841
+ codeVerifier String?
842
+
843
+ /// Redirect URL after OAuth completes
844
+ redirectUrl String?
845
+
846
+ /// Expiration timestamp
847
+ expiresAt DateTime
848
+
849
+ createdAt DateTime @default(now())
850
+
851
+ @@index([state])
852
+ @@index([expiresAt])
853
+ }
854
+
855
+ /// Stores organization-level OAuth app credentials
856
+ /// Allows orgs (especially self-hosters) to use their own OAuth apps
857
+ model IntegrationOAuthApp {
858
+ id String @id @default(dbgenerated("generate_prefixed_cuid('ioa'::text)"))
859
+
860
+ /// Provider slug (e.g., "github", "slack")
861
+ providerSlug String
862
+
863
+ /// Organization that owns this OAuth app config
864
+ organizationId String
865
+ organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
866
+
867
+ /// Encrypted client ID
868
+ encryptedClientId Json
869
+
870
+ /// Encrypted client secret
871
+ encryptedClientSecret Json
872
+
873
+ /// Optional: custom scopes (overrides manifest defaults)
874
+ customScopes String[]
875
+
876
+ /// Provider-specific settings (e.g., Rippling app name for authorize URL)
877
+ /// Stored as JSON: { "appName": "compai533c" }
878
+ customSettings Json?
879
+
880
+ /// Whether this config is active
881
+ isActive Boolean @default(true)
882
+
883
+ createdAt DateTime @default(now())
884
+ updatedAt DateTime @updatedAt
885
+
886
+ @@unique([providerSlug, organizationId])
887
+ @@index([organizationId])
888
+ @@index([providerSlug])
889
+ }
890
+
891
+ /// Records check runs linked to tasks for compliance verification
892
+ model IntegrationCheckRun {
893
+ id String @id @default(dbgenerated("generate_prefixed_cuid('icr'::text)"))
894
+
895
+ /// Parent connection
896
+ connectionId String
897
+ connection IntegrationConnection @relation(fields: [connectionId], references: [id], onDelete: Cascade)
898
+
899
+ /// Task being verified (optional - checks can run without a task)
900
+ taskId String?
901
+ task Task? @relation(fields: [taskId], references: [id], onDelete: SetNull)
902
+
903
+ /// Check ID from the manifest
904
+ checkId String
905
+
906
+ /// Check name (denormalized for display)
907
+ checkName String
908
+
909
+ /// Execution status
910
+ status IntegrationRunStatus @default(pending)
911
+
912
+ /// Timestamps
913
+ startedAt DateTime?
914
+ completedAt DateTime?
915
+
916
+ /// Duration in milliseconds
917
+ durationMs Int?
918
+
919
+ /// Summary counts
920
+ totalChecked Int @default(0)
921
+ passedCount Int @default(0)
922
+ failedCount Int @default(0)
923
+
924
+ /// Error message if failed
925
+ errorMessage String?
926
+
927
+ /// Full execution logs (JSON array)
928
+ logs Json?
929
+
930
+ createdAt DateTime @default(now())
931
+
932
+ /// Results from this check run
933
+ results IntegrationCheckResult[]
934
+
935
+ @@index([connectionId])
936
+ @@index([taskId])
937
+ @@index([checkId])
938
+ @@index([status])
939
+ @@index([createdAt])
940
+ }
941
+
942
+ /// Stores individual results (pass/fail) from check runs
943
+ model IntegrationCheckResult {
944
+ id String @id @default(dbgenerated("generate_prefixed_cuid('icx'::text)"))
945
+
946
+ /// Parent check run
947
+ checkRunId String
948
+ checkRun IntegrationCheckRun @relation(fields: [checkRunId], references: [id], onDelete: Cascade)
949
+
950
+ /// Whether this result is a pass or fail
951
+ passed Boolean
952
+
953
+ /// Resource classification
954
+ resourceType String
955
+ resourceId String
956
+
957
+ /// Result details
958
+ title String
959
+ description String?
960
+
961
+ /// Severity (for failures)
962
+ severity IntegrationFindingSeverity?
963
+
964
+ /// Remediation guidance (for failures)
965
+ remediation String?
966
+
967
+ /// Evidence/proof (JSON - API response data)
968
+ evidence Json?
969
+
970
+ /// When this evidence was collected
971
+ collectedAt DateTime @default(now())
972
+
973
+ @@index([checkRunId])
974
+ @@index([passed])
975
+ @@index([resourceType, resourceId])
976
+ }
977
+
978
+ /// Stores platform-wide OAuth app credentials
979
+ /// Used by platform operators to provide default OAuth apps for all users
980
+ model IntegrationPlatformCredential {
981
+ id String @id @default(dbgenerated("generate_prefixed_cuid('ipc'::text)"))
982
+
983
+ /// Provider slug (e.g., "github", "slack") - unique per platform
984
+ providerSlug String @unique
985
+
986
+ /// Encrypted client ID
987
+ encryptedClientId Json
988
+
989
+ /// Encrypted client secret
990
+ encryptedClientSecret Json
991
+
992
+ /// Optional: custom scopes (overrides manifest defaults)
993
+ customScopes String[]
994
+
995
+ /// Provider-specific settings (e.g., Rippling app name for authorize URL)
996
+ /// Stored as JSON: { "appName": "compai533c" }
997
+ customSettings Json?
998
+
999
+ /// Whether this credential is active
1000
+ isActive Boolean @default(true)
1001
+
1002
+ /// Who created this credential
1003
+ createdById String?
1004
+
1005
+ /// Who last updated this credential
1006
+ updatedById String?
1007
+
1008
+ createdAt DateTime @default(now())
1009
+ updatedAt DateTime @updatedAt
1010
+
1011
+ @@index([providerSlug])
1012
+ }
1013
+
1014
+
494
1015
  // ===== integration.prisma =====
495
1016
  model Integration {
496
1017
  id String @id @default(dbgenerated("generate_prefixed_cuid('int'::text)"))
@@ -599,6 +1120,10 @@ model Organization {
599
1120
  fleetDmLabelId Int?
600
1121
  isFleetSetupCompleted Boolean @default(false)
601
1122
 
1123
+ // Employee sync provider (e.g., 'google-workspace', 'rippling')
1124
+ // When set, the scheduled sync will only use this provider
1125
+ employeeSyncProvider String?
1126
+
602
1127
  apiKeys ApiKey[]
603
1128
  auditLog AuditLog[]
604
1129
  controls Control[]
@@ -610,6 +1135,7 @@ model Organization {
610
1135
  risk Risk[]
611
1136
  vendors Vendor[]
612
1137
  tasks Task[]
1138
+ taskItems TaskItem[]
613
1139
  comments Comment[]
614
1140
  attachments Attachment[]
615
1141
  trust Trust[]
@@ -618,12 +1144,22 @@ model Organization {
618
1144
  trustAccessRequests TrustAccessRequest[]
619
1145
  trustNdaAgreements TrustNDAAgreement[]
620
1146
  trustDocuments TrustDocument[]
621
- trustResources TrustResource[] @relation("OrganizationTrustResources")
1147
+ trustResources TrustResource[] @relation("OrganizationTrustResources")
622
1148
  knowledgeBaseDocuments KnowledgeBaseDocument[]
623
1149
  questionnaires Questionnaire[]
624
1150
  securityQuestionnaireManualAnswers SecurityQuestionnaireManualAnswer[]
625
1151
  soaDocuments SOADocument[]
626
1152
  primaryColor String?
1153
+ trustPortalFaqs Json? // Array of { question: string, answer: string, order: number }
1154
+
1155
+
1156
+ // Integration Platform
1157
+ integrationConnections IntegrationConnection[]
1158
+ integrationOAuthApps IntegrationOAuthApp[]
1159
+
1160
+ // Browser Automation
1161
+ browserbaseContext BrowserbaseContext?
1162
+
627
1163
  @@index([slug])
628
1164
  }
629
1165
 
@@ -681,6 +1217,7 @@ model Questionnaire {
681
1217
  parsedAt DateTime? // When parsing completed
682
1218
  totalQuestions Int @default(0) // Total number of questions parsed
683
1219
  answeredQuestions Int @default(0) // Number of questions with answers
1220
+ source String @default("internal") // Source of the questionnaire: 'internal' (from app) or 'external' (from trust portal)
684
1221
 
685
1222
  // Dates
686
1223
  createdAt DateTime @default(now())
@@ -695,6 +1232,7 @@ model Questionnaire {
695
1232
  @@index([organizationId])
696
1233
  @@index([organizationId, createdAt])
697
1234
  @@index([status])
1235
+ @@index([source])
698
1236
  }
699
1237
 
700
1238
  model QuestionnaireQuestionAnswer {
@@ -1107,6 +1645,64 @@ enum SOAAnswerStatus {
1107
1645
  }
1108
1646
 
1109
1647
 
1648
+ // ===== task-item.prisma =====
1649
+ model TaskItem {
1650
+ id String @id @default(dbgenerated("generate_prefixed_cuid('tski'::text)"))
1651
+ title String
1652
+ description String?
1653
+ status TaskItemStatus @default(todo)
1654
+ priority TaskItemPriority @default(medium)
1655
+
1656
+ // Polymorphic relation (like Comment and Attachment)
1657
+ entityId String
1658
+ entityType TaskItemEntityType
1659
+
1660
+ // Assignment (nullable)
1661
+ assigneeId String?
1662
+ assignee Member? @relation("TaskItemAssignee", fields: [assigneeId], references: [id], onDelete: SetNull)
1663
+
1664
+ // Creator & Updater
1665
+ createdById String
1666
+ createdBy Member @relation("TaskItemCreator", fields: [createdById], references: [id])
1667
+ updatedById String?
1668
+ updatedBy Member? @relation("TaskItemUpdater", fields: [updatedById], references: [id])
1669
+
1670
+ // Relationships
1671
+ organizationId String
1672
+ organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
1673
+
1674
+ // Dates
1675
+ createdAt DateTime @default(now())
1676
+ updatedAt DateTime @updatedAt
1677
+
1678
+ @@index([entityId, entityType])
1679
+ @@index([organizationId])
1680
+ @@index([assigneeId])
1681
+ @@index([status])
1682
+ @@index([priority])
1683
+ }
1684
+
1685
+ enum TaskItemStatus {
1686
+ todo
1687
+ in_progress
1688
+ in_review
1689
+ done
1690
+ canceled
1691
+ }
1692
+
1693
+ enum TaskItemPriority {
1694
+ urgent
1695
+ high
1696
+ medium
1697
+ low
1698
+ }
1699
+
1700
+ enum TaskItemEntityType {
1701
+ vendor
1702
+ risk
1703
+ }
1704
+
1705
+
1110
1706
  // ===== task.prisma =====
1111
1707
  model Task {
1112
1708
  // Metadata
@@ -1135,8 +1731,10 @@ model Task {
1135
1731
  vendors Vendor[]
1136
1732
  risks Risk[]
1137
1733
  evidenceAutomations EvidenceAutomation[]
1734
+ browserAutomations BrowserAutomation[]
1138
1735
 
1139
1736
  EvidenceAutomationRun EvidenceAutomationRun[]
1737
+ integrationCheckRuns IntegrationCheckRun[]
1140
1738
  }
1141
1739
 
1142
1740
  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.19-canary.3",
4
+ "version": "1.3.20-canary.0",
5
5
  "dependencies": {
6
6
  "@prisma/client": "^6.13.0",
7
7
  "dotenv": "^16.4.5",
@@ -14,8 +14,16 @@
14
14
  "typescript": "^5.9.2"
15
15
  },
16
16
  "exports": {
17
- ".": "./dist/index.js",
18
- "./postinstall": "./dist/postinstall.js"
17
+ ".": {
18
+ "import": "./dist/index.js",
19
+ "types": "./src/index.ts",
20
+ "default": "./dist/index.js"
21
+ },
22
+ "./postinstall": {
23
+ "import": "./dist/postinstall.js",
24
+ "types": "./src/postinstall.ts",
25
+ "default": "./dist/postinstall.js"
26
+ }
19
27
  },
20
28
  "bin": {
21
29
  "comp-prisma-postinstall": "./dist/postinstall.js"
@@ -38,6 +46,7 @@
38
46
  "check-types": "tsc --noEmit",
39
47
  "db:generate": "prisma generate",
40
48
  "db:migrate": "prisma migrate dev",
49
+ "db:migrate:reset": "prisma migrate reset",
41
50
  "db:push": "prisma db push",
42
51
  "db:seed": "bun prisma/seed/seed.ts",
43
52
  "db:studio": "prisma studio",