Auto-commit 2026-05-02 09:37

This commit is contained in:
2026-05-02 09:37:34 -04:00
parent b7600fa937
commit 35d004cde3
3809 changed files with 2315945 additions and 106 deletions

1
node_modules/.prisma/client/default.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from "./index"

1
node_modules/.prisma/client/default.js generated vendored Normal file
View File

@@ -0,0 +1 @@
module.exports = { ...require('.') }

9
node_modules/.prisma/client/deno/edge.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
class PrismaClient {
constructor() {
throw new Error(
'@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.',
)
}
}
export { PrismaClient }

1
node_modules/.prisma/client/edge.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from "./default"

480
node_modules/.prisma/client/edge.js generated vendored Normal file

File diff suppressed because one or more lines are too long

473
node_modules/.prisma/client/index-browser.js generated vendored Normal file
View File

@@ -0,0 +1,473 @@
Object.defineProperty(exports, "__esModule", { value: true });
const {
Decimal,
objectEnumValues,
makeStrictEnum,
Public,
getRuntime,
skip
} = require('@prisma/client/runtime/index-browser.js')
const Prisma = {}
exports.Prisma = Prisma
exports.$Enums = {}
/**
* Prisma Client JS version: 5.22.0
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
*/
Prisma.prismaVersion = {
client: "5.22.0",
engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
}
Prisma.PrismaClientKnownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.NotFoundError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal
/**
* Re-export of sql-template-tag
*/
Prisma.sql = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator
/**
* Extensions
*/
Prisma.getExtensionContext = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull
Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}
/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
});
exports.Prisma.UserScalarFieldEnum = {
id: 'id',
email: 'email',
emailVerified: 'emailVerified',
name: 'name',
image: 'image',
role: 'role',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.AccountScalarFieldEnum = {
id: 'id',
userId: 'userId',
provider: 'provider',
providerAccountId: 'providerAccountId',
access_token: 'access_token',
refresh_token: 'refresh_token',
expires_at: 'expires_at',
token_type: 'token_type',
scope: 'scope',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.SessionScalarFieldEnum = {
id: 'id',
userId: 'userId',
sessionToken: 'sessionToken',
expires: 'expires',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.FamilyGroupScalarFieldEnum = {
id: 'id',
name: 'name',
ownerId: 'ownerId',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.FamilyGroupMemberScalarFieldEnum = {
id: 'id',
groupId: 'groupId',
userId: 'userId',
role: 'role',
joinedAt: 'joinedAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.SubscriptionScalarFieldEnum = {
id: 'id',
userId: 'userId',
familyGroupId: 'familyGroupId',
stripeId: 'stripeId',
tier: 'tier',
status: 'status',
currentPeriodStart: 'currentPeriodStart',
currentPeriodEnd: 'currentPeriodEnd',
cancelAtPeriodEnd: 'cancelAtPeriodEnd',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.WatchlistItemScalarFieldEnum = {
id: 'id',
subscriptionId: 'subscriptionId',
type: 'type',
value: 'value',
hash: 'hash',
isActive: 'isActive',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.ExposureScalarFieldEnum = {
id: 'id',
subscriptionId: 'subscriptionId',
watchlistItemId: 'watchlistItemId',
source: 'source',
dataType: 'dataType',
identifier: 'identifier',
identifierHash: 'identifierHash',
severity: 'severity',
metadata: 'metadata',
isFirstTime: 'isFirstTime',
detectedAt: 'detectedAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.AlertScalarFieldEnum = {
id: 'id',
subscriptionId: 'subscriptionId',
userId: 'userId',
exposureId: 'exposureId',
type: 'type',
title: 'title',
message: 'message',
severity: 'severity',
isRead: 'isRead',
readAt: 'readAt',
channel: 'channel',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.VoiceEnrollmentScalarFieldEnum = {
id: 'id',
userId: 'userId',
name: 'name',
voiceHash: 'voiceHash',
audioMetadata: 'audioMetadata',
isActive: 'isActive',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.VoiceAnalysisScalarFieldEnum = {
id: 'id',
enrollmentId: 'enrollmentId',
userId: 'userId',
audioHash: 'audioHash',
isSynthetic: 'isSynthetic',
confidence: 'confidence',
analysisResult: 'analysisResult',
audioUrl: 'audioUrl',
createdAt: 'createdAt'
};
exports.Prisma.SpamFeedbackScalarFieldEnum = {
id: 'id',
userId: 'userId',
phoneNumber: 'phoneNumber',
phoneNumberHash: 'phoneNumberHash',
isSpam: 'isSpam',
confidence: 'confidence',
feedbackType: 'feedbackType',
metadata: 'metadata',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.SpamRuleScalarFieldEnum = {
id: 'id',
userId: 'userId',
isGlobal: 'isGlobal',
ruleType: 'ruleType',
pattern: 'pattern',
action: 'action',
priority: 'priority',
isActive: 'isActive',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.AuditLogScalarFieldEnum = {
id: 'id',
userId: 'userId',
action: 'action',
resource: 'resource',
resourceId: 'resourceId',
changes: 'changes',
metadata: 'metadata',
ipAddress: 'ipAddress',
userAgent: 'userAgent',
createdAt: 'createdAt'
};
exports.Prisma.KPISnapshotScalarFieldEnum = {
id: 'id',
date: 'date',
metricName: 'metricName',
metricValue: 'metricValue',
metadata: 'metadata',
createdAt: 'createdAt'
};
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
exports.Prisma.NullableJsonNullValueInput = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull
};
exports.Prisma.JsonNullValueInput = {
JsonNull: Prisma.JsonNull
};
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
};
exports.Prisma.NullsOrder = {
first: 'first',
last: 'last'
};
exports.Prisma.JsonNullValueFilter = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull,
AnyNull: Prisma.AnyNull
};
exports.UserRole = exports.$Enums.UserRole = {
user: 'user',
family_admin: 'family_admin',
family_member: 'family_member',
support: 'support'
};
exports.FamilyMemberRole = exports.$Enums.FamilyMemberRole = {
owner: 'owner',
admin: 'admin',
member: 'member'
};
exports.SubscriptionTier = exports.$Enums.SubscriptionTier = {
basic: 'basic',
plus: 'plus',
premium: 'premium'
};
exports.SubscriptionStatus = exports.$Enums.SubscriptionStatus = {
active: 'active',
past_due: 'past_due',
canceled: 'canceled',
unpaid: 'unpaid',
trialing: 'trialing'
};
exports.WatchlistType = exports.$Enums.WatchlistType = {
email: 'email',
phoneNumber: 'phoneNumber',
ssn: 'ssn',
address: 'address',
domain: 'domain'
};
exports.ExposureSource = exports.$Enums.ExposureSource = {
hibp: 'hibp',
securityTrails: 'securityTrails',
censys: 'censys',
darkWebForum: 'darkWebForum',
shodan: 'shodan',
honeypot: 'honeypot'
};
exports.ExposureSeverity = exports.$Enums.ExposureSeverity = {
info: 'info',
warning: 'warning',
critical: 'critical'
};
exports.AlertType = exports.$Enums.AlertType = {
exposure_detected: 'exposure_detected',
exposure_resolved: 'exposure_resolved',
scan_complete: 'scan_complete',
subscription_changed: 'subscription_changed',
system_warning: 'system_warning'
};
exports.AlertSeverity = exports.$Enums.AlertSeverity = {
info: 'info',
warning: 'warning',
critical: 'critical'
};
exports.AlertChannel = exports.$Enums.AlertChannel = {
email: 'email',
push: 'push',
sms: 'sms'
};
exports.FeedbackType = exports.$Enums.FeedbackType = {
initial_detection: 'initial_detection',
user_confirmation: 'user_confirmation',
user_rejection: 'user_rejection',
auto_learned: 'auto_learned'
};
exports.RuleType = exports.$Enums.RuleType = {
phoneNumber: 'phoneNumber',
areaCode: 'areaCode',
prefix: 'prefix',
pattern: 'pattern',
reputation: 'reputation'
};
exports.RuleAction = exports.$Enums.RuleAction = {
block: 'block',
flag: 'flag',
allow: 'allow',
challenge: 'challenge'
};
exports.Prisma.ModelName = {
User: 'User',
Account: 'Account',
Session: 'Session',
FamilyGroup: 'FamilyGroup',
FamilyGroupMember: 'FamilyGroupMember',
Subscription: 'Subscription',
WatchlistItem: 'WatchlistItem',
Exposure: 'Exposure',
Alert: 'Alert',
VoiceEnrollment: 'VoiceEnrollment',
VoiceAnalysis: 'VoiceAnalysis',
SpamFeedback: 'SpamFeedback',
SpamRule: 'SpamRule',
AuditLog: 'AuditLog',
KPISnapshot: 'KPISnapshot'
};
/**
* This is a stub Prisma Client that will error at runtime if called.
*/
class PrismaClient {
constructor() {
return new Proxy(this, {
get(target, prop) {
let message
const runtime = getRuntime()
if (runtime.isEdge) {
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
} else {
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
}
message += `
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
throw new Error(message)
}
})
}
}
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)

27360
node_modules/.prisma/client/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

501
node_modules/.prisma/client/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

97
node_modules/.prisma/client/package.json generated vendored Normal file
View File

@@ -0,0 +1,97 @@
{
"name": "prisma-client-b29a2b3f0e1bc12b2fa9d0bdeb99b39a26c72b924071cafc26aa54f77bbfbddd",
"main": "index.js",
"types": "index.d.ts",
"browser": "index-browser.js",
"exports": {
"./package.json": "./package.json",
".": {
"require": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"import": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"default": "./index.js"
},
"./edge": {
"types": "./edge.d.ts",
"require": "./edge.js",
"import": "./edge.js",
"default": "./edge.js"
},
"./react-native": {
"types": "./react-native.d.ts",
"require": "./react-native.js",
"import": "./react-native.js",
"default": "./react-native.js"
},
"./extension": {
"types": "./extension.d.ts",
"require": "./extension.js",
"import": "./extension.js",
"default": "./extension.js"
},
"./index-browser": {
"types": "./index.d.ts",
"require": "./index-browser.js",
"import": "./index-browser.js",
"default": "./index-browser.js"
},
"./index": {
"types": "./index.d.ts",
"require": "./index.js",
"import": "./index.js",
"default": "./index.js"
},
"./wasm": {
"types": "./wasm.d.ts",
"require": "./wasm.js",
"import": "./wasm.js",
"default": "./wasm.js"
},
"./runtime/library": {
"types": "./runtime/library.d.ts",
"require": "./runtime/library.js",
"import": "./runtime/library.js",
"default": "./runtime/library.js"
},
"./runtime/binary": {
"types": "./runtime/binary.d.ts",
"require": "./runtime/binary.js",
"import": "./runtime/binary.js",
"default": "./runtime/binary.js"
},
"./generator-build": {
"require": "./generator-build/index.js",
"import": "./generator-build/index.js",
"default": "./generator-build/index.js"
},
"./sql": {
"require": {
"types": "./sql.d.ts",
"node": "./sql.js",
"default": "./sql.js"
},
"import": {
"types": "./sql.d.ts",
"node": "./sql.mjs",
"default": "./sql.mjs"
},
"default": "./sql.js"
},
"./*": "./*"
},
"version": "5.22.0",
"sideEffects": false
}

437
node_modules/.prisma/client/schema.prisma generated vendored Normal file
View File

@@ -0,0 +1,437 @@
// Prisma schema for ShieldAI
// All models for the multi-service SaaS platform
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
// ============================================
// User & Authentication Models
// ============================================
model User {
id String @id @default(uuid())
email String @unique
emailVerified DateTime?
name String?
image String?
role UserRole @default(user)
// Relationships
accounts Account[]
sessions Session[]
familyGroups FamilyGroupMember[]
familyGroupOwned FamilyGroup[] @relation("FamilyGroupOwner")
subscriptions Subscription[]
alerts Alert[]
voiceEnrollments VoiceEnrollment[]
voiceAnalyses VoiceAnalysis[]
spamFeedback SpamFeedback[]
spamRules SpamRule[]
// Audit
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([email])
@@index([role])
}
enum UserRole {
user
family_admin
family_member
support
}
model Account {
id String @id @default(uuid())
userId String
provider String
providerAccountId String
access_token String?
refresh_token String?
expires_at Int?
token_type String?
scope String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([userId, provider, providerAccountId])
@@index([userId])
}
model Session {
id String @id @default(uuid())
userId String
sessionToken String @unique
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([sessionToken])
@@index([userId])
}
// ============================================
// Family & Subscription Models
// ============================================
model FamilyGroup {
id String @id @default(uuid())
name String
ownerId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
owner User @relation("FamilyGroupOwner", fields: [ownerId], references: [id])
members FamilyGroupMember[]
subscriptions Subscription[]
@@index([ownerId])
@@index([name])
}
model FamilyGroupMember {
id String @id @default(uuid())
groupId String
userId String
role FamilyMemberRole @default(member)
joinedAt DateTime @default(now())
group FamilyGroup @relation(fields: [groupId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([groupId, userId])
@@index([groupId])
@@index([userId])
}
enum FamilyMemberRole {
owner
admin
member
}
model Subscription {
id String @id @default(uuid())
userId String
familyGroupId String?
stripeId String? @unique
tier SubscriptionTier @default(basic)
status SubscriptionStatus @default(active)
currentPeriodStart DateTime
currentPeriodEnd DateTime
cancelAtPeriodEnd Boolean @default(false)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
familyGroup FamilyGroup? @relation(fields: [familyGroupId], references: [id])
watchlistItems WatchlistItem[]
exposures Exposure[]
alerts Alert[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([userId])
@@index([familyGroupId])
@@index([stripeId])
@@index([tier])
}
enum SubscriptionTier {
basic
plus
premium
}
enum SubscriptionStatus {
active
past_due
canceled
unpaid
trialing
}
// ============================================
// DarkWatch Models (Dark Web Monitoring)
// ============================================
model WatchlistItem {
id String @id @default(uuid())
subscriptionId String
type WatchlistType
value String
hash String // SHA-256 hash for deduplication
isActive Boolean @default(true)
subscription Subscription @relation(fields: [subscriptionId], references: [id], onDelete: Cascade)
exposures Exposure[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([subscriptionId, type, hash])
@@index([subscriptionId])
@@index([type])
@@index([hash])
}
enum WatchlistType {
email
phoneNumber
ssn
address
domain
}
model Exposure {
id String @id @default(uuid())
subscriptionId String
watchlistItemId String?
source ExposureSource
dataType WatchlistType
identifier String
identifierHash String
severity ExposureSeverity @default(info)
metadata Json? // Additional source-specific data
isFirstTime Boolean @default(false)
subscription Subscription @relation(fields: [subscriptionId], references: [id], onDelete: Cascade)
watchlistItem WatchlistItem? @relation(fields: [watchlistItemId], references: [id])
alerts Alert[]
detectedAt DateTime
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([subscriptionId])
@@index([watchlistItemId])
@@index([source])
@@index([severity])
@@index([detectedAt])
}
enum ExposureSource {
hibp // Have I Been Pwned
securityTrails
censys
darkWebForum
shodan
honeypot
}
enum ExposureSeverity {
info
warning
critical
}
// ============================================
// Notification & Alert Models
// ============================================
model Alert {
id String @id @default(uuid())
subscriptionId String
userId String
exposureId String?
type AlertType
title String
message String
severity AlertSeverity @default(info)
isRead Boolean @default(false)
readAt DateTime?
channel AlertChannel[] // Array of notification channels
subscription Subscription @relation(fields: [subscriptionId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
exposure Exposure? @relation(fields: [exposureId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([subscriptionId])
@@index([userId])
@@index([isRead])
@@index([createdAt])
}
enum AlertType {
exposure_detected
exposure_resolved
scan_complete
subscription_changed
system_warning
}
enum AlertSeverity {
info
warning
critical
}
enum AlertChannel {
email
push
sms
}
// ============================================
// VoicePrint Models (Voice Cloning Detection)
// ============================================
model VoiceEnrollment {
id String @id @default(uuid())
userId String
name String
voiceHash String // FAISS embedding hash
audioMetadata Json? // Sample rate, duration, etc.
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
analyses VoiceAnalysis[]
isActive Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([userId])
@@index([voiceHash])
}
model VoiceAnalysis {
id String @id @default(uuid())
enrollmentId String?
userId String
audioHash String // Content hash of audio file
isSynthetic Boolean
confidence Float // 0.0 to 1.0
analysisResult Json // Full ML analysis results
audioUrl String // S3 storage URL
enrollment VoiceEnrollment? @relation(fields: [enrollmentId], references: [id])
user User @relation(fields: [userId], references: [id])
createdAt DateTime @default(now())
@@index([userId])
@@index([enrollmentId])
@@index([audioHash])
}
// ============================================
// SpamShield Models (Spam Detection)
// ============================================
model SpamFeedback {
id String @id @default(uuid())
userId String
phoneNumber String
phoneNumberHash String // SHA-256 hash
isSpam Boolean
confidence Float? // ML model confidence
feedbackType FeedbackType
metadata Json? // Call duration, time, etc.
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([userId])
@@index([phoneNumberHash])
@@index([isSpam])
}
enum FeedbackType {
initial_detection
user_confirmation
user_rejection
auto_learned
}
model SpamRule {
id String @id @default(uuid())
userId String?
isGlobal Boolean @default(false)
ruleType RuleType
pattern String
action RuleAction
priority Int @default(0)
isActive Boolean @default(true)
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([userId])
@@index([isGlobal])
@@index([ruleType])
}
enum RuleType {
phoneNumber
areaCode
prefix
pattern
reputation
}
enum RuleAction {
block
flag
allow
challenge
}
// ============================================
// Audit & Analytics Models
// ============================================
model AuditLog {
id String @id @default(uuid())
userId String?
action String
resource String
resourceId String?
changes Json? // Before/after values
metadata Json?
ipAddress String?
userAgent String?
createdAt DateTime @default(now())
@@index([userId])
@@index([action])
@@index([resource])
@@index([createdAt])
}
model KPISnapshot {
id String @id @default(uuid())
date DateTime @unique
metricName String
metricValue Float
metadata Json?
createdAt DateTime @default(now())
@@index([metricName])
@@index([date])
}

1
node_modules/.prisma/client/wasm.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from "./index"

473
node_modules/.prisma/client/wasm.js generated vendored Normal file
View File

@@ -0,0 +1,473 @@
Object.defineProperty(exports, "__esModule", { value: true });
const {
Decimal,
objectEnumValues,
makeStrictEnum,
Public,
getRuntime,
skip
} = require('@prisma/client/runtime/index-browser.js')
const Prisma = {}
exports.Prisma = Prisma
exports.$Enums = {}
/**
* Prisma Client JS version: 5.22.0
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
*/
Prisma.prismaVersion = {
client: "5.22.0",
engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
}
Prisma.PrismaClientKnownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.NotFoundError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal
/**
* Re-export of sql-template-tag
*/
Prisma.sql = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator
/**
* Extensions
*/
Prisma.getExtensionContext = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull
Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}
/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
});
exports.Prisma.UserScalarFieldEnum = {
id: 'id',
email: 'email',
emailVerified: 'emailVerified',
name: 'name',
image: 'image',
role: 'role',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.AccountScalarFieldEnum = {
id: 'id',
userId: 'userId',
provider: 'provider',
providerAccountId: 'providerAccountId',
access_token: 'access_token',
refresh_token: 'refresh_token',
expires_at: 'expires_at',
token_type: 'token_type',
scope: 'scope',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.SessionScalarFieldEnum = {
id: 'id',
userId: 'userId',
sessionToken: 'sessionToken',
expires: 'expires',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.FamilyGroupScalarFieldEnum = {
id: 'id',
name: 'name',
ownerId: 'ownerId',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.FamilyGroupMemberScalarFieldEnum = {
id: 'id',
groupId: 'groupId',
userId: 'userId',
role: 'role',
joinedAt: 'joinedAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.SubscriptionScalarFieldEnum = {
id: 'id',
userId: 'userId',
familyGroupId: 'familyGroupId',
stripeId: 'stripeId',
tier: 'tier',
status: 'status',
currentPeriodStart: 'currentPeriodStart',
currentPeriodEnd: 'currentPeriodEnd',
cancelAtPeriodEnd: 'cancelAtPeriodEnd',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.WatchlistItemScalarFieldEnum = {
id: 'id',
subscriptionId: 'subscriptionId',
type: 'type',
value: 'value',
hash: 'hash',
isActive: 'isActive',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.ExposureScalarFieldEnum = {
id: 'id',
subscriptionId: 'subscriptionId',
watchlistItemId: 'watchlistItemId',
source: 'source',
dataType: 'dataType',
identifier: 'identifier',
identifierHash: 'identifierHash',
severity: 'severity',
metadata: 'metadata',
isFirstTime: 'isFirstTime',
detectedAt: 'detectedAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.AlertScalarFieldEnum = {
id: 'id',
subscriptionId: 'subscriptionId',
userId: 'userId',
exposureId: 'exposureId',
type: 'type',
title: 'title',
message: 'message',
severity: 'severity',
isRead: 'isRead',
readAt: 'readAt',
channel: 'channel',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.VoiceEnrollmentScalarFieldEnum = {
id: 'id',
userId: 'userId',
name: 'name',
voiceHash: 'voiceHash',
audioMetadata: 'audioMetadata',
isActive: 'isActive',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.VoiceAnalysisScalarFieldEnum = {
id: 'id',
enrollmentId: 'enrollmentId',
userId: 'userId',
audioHash: 'audioHash',
isSynthetic: 'isSynthetic',
confidence: 'confidence',
analysisResult: 'analysisResult',
audioUrl: 'audioUrl',
createdAt: 'createdAt'
};
exports.Prisma.SpamFeedbackScalarFieldEnum = {
id: 'id',
userId: 'userId',
phoneNumber: 'phoneNumber',
phoneNumberHash: 'phoneNumberHash',
isSpam: 'isSpam',
confidence: 'confidence',
feedbackType: 'feedbackType',
metadata: 'metadata',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.SpamRuleScalarFieldEnum = {
id: 'id',
userId: 'userId',
isGlobal: 'isGlobal',
ruleType: 'ruleType',
pattern: 'pattern',
action: 'action',
priority: 'priority',
isActive: 'isActive',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.AuditLogScalarFieldEnum = {
id: 'id',
userId: 'userId',
action: 'action',
resource: 'resource',
resourceId: 'resourceId',
changes: 'changes',
metadata: 'metadata',
ipAddress: 'ipAddress',
userAgent: 'userAgent',
createdAt: 'createdAt'
};
exports.Prisma.KPISnapshotScalarFieldEnum = {
id: 'id',
date: 'date',
metricName: 'metricName',
metricValue: 'metricValue',
metadata: 'metadata',
createdAt: 'createdAt'
};
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
exports.Prisma.NullableJsonNullValueInput = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull
};
exports.Prisma.JsonNullValueInput = {
JsonNull: Prisma.JsonNull
};
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
};
exports.Prisma.NullsOrder = {
first: 'first',
last: 'last'
};
exports.Prisma.JsonNullValueFilter = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull,
AnyNull: Prisma.AnyNull
};
exports.UserRole = exports.$Enums.UserRole = {
user: 'user',
family_admin: 'family_admin',
family_member: 'family_member',
support: 'support'
};
exports.FamilyMemberRole = exports.$Enums.FamilyMemberRole = {
owner: 'owner',
admin: 'admin',
member: 'member'
};
exports.SubscriptionTier = exports.$Enums.SubscriptionTier = {
basic: 'basic',
plus: 'plus',
premium: 'premium'
};
exports.SubscriptionStatus = exports.$Enums.SubscriptionStatus = {
active: 'active',
past_due: 'past_due',
canceled: 'canceled',
unpaid: 'unpaid',
trialing: 'trialing'
};
exports.WatchlistType = exports.$Enums.WatchlistType = {
email: 'email',
phoneNumber: 'phoneNumber',
ssn: 'ssn',
address: 'address',
domain: 'domain'
};
exports.ExposureSource = exports.$Enums.ExposureSource = {
hibp: 'hibp',
securityTrails: 'securityTrails',
censys: 'censys',
darkWebForum: 'darkWebForum',
shodan: 'shodan',
honeypot: 'honeypot'
};
exports.ExposureSeverity = exports.$Enums.ExposureSeverity = {
info: 'info',
warning: 'warning',
critical: 'critical'
};
exports.AlertType = exports.$Enums.AlertType = {
exposure_detected: 'exposure_detected',
exposure_resolved: 'exposure_resolved',
scan_complete: 'scan_complete',
subscription_changed: 'subscription_changed',
system_warning: 'system_warning'
};
exports.AlertSeverity = exports.$Enums.AlertSeverity = {
info: 'info',
warning: 'warning',
critical: 'critical'
};
exports.AlertChannel = exports.$Enums.AlertChannel = {
email: 'email',
push: 'push',
sms: 'sms'
};
exports.FeedbackType = exports.$Enums.FeedbackType = {
initial_detection: 'initial_detection',
user_confirmation: 'user_confirmation',
user_rejection: 'user_rejection',
auto_learned: 'auto_learned'
};
exports.RuleType = exports.$Enums.RuleType = {
phoneNumber: 'phoneNumber',
areaCode: 'areaCode',
prefix: 'prefix',
pattern: 'pattern',
reputation: 'reputation'
};
exports.RuleAction = exports.$Enums.RuleAction = {
block: 'block',
flag: 'flag',
allow: 'allow',
challenge: 'challenge'
};
exports.Prisma.ModelName = {
User: 'User',
Account: 'Account',
Session: 'Session',
FamilyGroup: 'FamilyGroup',
FamilyGroupMember: 'FamilyGroupMember',
Subscription: 'Subscription',
WatchlistItem: 'WatchlistItem',
Exposure: 'Exposure',
Alert: 'Alert',
VoiceEnrollment: 'VoiceEnrollment',
VoiceAnalysis: 'VoiceAnalysis',
SpamFeedback: 'SpamFeedback',
SpamRule: 'SpamRule',
AuditLog: 'AuditLog',
KPISnapshot: 'KPISnapshot'
};
/**
* This is a stub Prisma Client that will error at runtime if called.
*/
class PrismaClient {
constructor() {
return new Proxy(this, {
get(target, prop) {
let message
const runtime = getRuntime()
if (runtime.isEdge) {
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
} else {
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
}
message += `
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
throw new Error(message)
}
})
}
}
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)