@danielcok17/prisma-db 1.0.0 → 1.0.2
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/README.md +34 -19
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/utils.d.ts +4 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +7 -4
- package/dist/utils.js.map +1 -1
- package/package.json +8 -7
- package/prisma/{schema.prisma → app.prisma} +5 -0
- package/prisma/generated/app/client.d.ts +1 -0
- package/prisma/generated/app/client.js +4 -0
- package/prisma/generated/app/default.d.ts +1 -0
- package/prisma/generated/app/default.js +4 -0
- package/prisma/generated/app/edge.d.ts +1 -0
- package/prisma/generated/app/edge.js +393 -0
- package/prisma/generated/app/index-browser.js +379 -0
- package/prisma/generated/app/index.d.ts +22559 -0
- package/prisma/generated/app/index.js +414 -0
- package/prisma/generated/app/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/prisma/generated/app/package.json +150 -0
- package/prisma/generated/app/runtime/edge-esm.js +34 -0
- package/prisma/generated/app/runtime/edge.js +34 -0
- package/prisma/generated/app/runtime/index-browser.d.ts +370 -0
- package/prisma/generated/app/runtime/index-browser.js +16 -0
- package/prisma/generated/app/runtime/library.d.ts +4002 -0
- package/prisma/generated/app/runtime/library.js +146 -0
- package/prisma/generated/app/runtime/react-native.js +83 -0
- package/prisma/generated/app/runtime/wasm-compiler-edge.js +83 -0
- package/prisma/generated/app/runtime/wasm-engine-edge.js +35 -0
- package/prisma/generated/app/schema.prisma +286 -0
- package/prisma/generated/app/wasm.d.ts +1 -0
- package/prisma/generated/app/wasm.js +379 -0
- package/prisma/generated/law/client.d.ts +1 -0
- package/prisma/generated/law/client.js +4 -0
- package/prisma/generated/law/default.d.ts +1 -0
- package/prisma/generated/law/default.js +4 -0
- package/prisma/generated/law/edge.d.ts +1 -0
- package/prisma/generated/law/edge.js +251 -0
- package/prisma/generated/law/index-browser.js +237 -0
- package/prisma/generated/law/index.d.ts +6827 -0
- package/prisma/generated/law/index.js +272 -0
- package/prisma/generated/law/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/prisma/generated/law/package.json +150 -0
- package/prisma/generated/law/runtime/edge-esm.js +34 -0
- package/prisma/generated/law/runtime/edge.js +34 -0
- package/prisma/generated/law/runtime/index-browser.d.ts +370 -0
- package/prisma/generated/law/runtime/index-browser.js +16 -0
- package/prisma/generated/law/runtime/library.d.ts +4002 -0
- package/prisma/generated/law/runtime/library.js +146 -0
- package/prisma/generated/law/runtime/react-native.js +83 -0
- package/prisma/generated/law/runtime/wasm-compiler-edge.js +83 -0
- package/prisma/generated/law/runtime/wasm-engine-edge.js +35 -0
- package/prisma/generated/law/schema.prisma +80 -0
- package/prisma/generated/law/wasm.d.ts +1 -0
- package/prisma/generated/law/wasm.js +237 -0
- package/prisma/law.prisma +82 -0
- package/prisma/migrations/20250818134929_init/migration.sql +374 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/seed.ts +0 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
generator client {
|
|
2
|
+
provider = "prisma-client-js"
|
|
3
|
+
output = "./generated/app"
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
datasource db {
|
|
7
|
+
provider = "postgresql"
|
|
8
|
+
url = env("POSTGRES_PRISMA_URL")
|
|
9
|
+
directUrl = env("POSTGRES_URL_NON_POOLING")
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
model Account {
|
|
13
|
+
id String @id @default(cuid())
|
|
14
|
+
userId String
|
|
15
|
+
type String
|
|
16
|
+
provider String
|
|
17
|
+
providerAccountId String
|
|
18
|
+
refresh_token String?
|
|
19
|
+
access_token String?
|
|
20
|
+
expires_at Int?
|
|
21
|
+
token_type String?
|
|
22
|
+
scope String?
|
|
23
|
+
id_token String?
|
|
24
|
+
session_state String?
|
|
25
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
26
|
+
|
|
27
|
+
@@unique([provider, providerAccountId])
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
model User {
|
|
31
|
+
id String @id @default(cuid())
|
|
32
|
+
name String?
|
|
33
|
+
email String? @unique
|
|
34
|
+
emailVerified DateTime?
|
|
35
|
+
image String?
|
|
36
|
+
createdAt DateTime @default(now())
|
|
37
|
+
messageCount Int @default(100)
|
|
38
|
+
agreedToTerms Boolean @default(false)
|
|
39
|
+
practiceArea String[]
|
|
40
|
+
lawFirm String?
|
|
41
|
+
yearsOfExperience Int?
|
|
42
|
+
// Nové polia pre schvalovanie používateľov
|
|
43
|
+
isApproved Boolean @default(false) // Či je používateľ schválený
|
|
44
|
+
isRejected Boolean @default(false) // Či je používateľ zamietnutý
|
|
45
|
+
approvedAt DateTime? // Kedy bol schválený
|
|
46
|
+
rejectedAt DateTime? // Kedy bol zamietnutý
|
|
47
|
+
approvedBy String? // ID admina, ktorý schválil
|
|
48
|
+
rejectedBy String? // ID admina, ktorý zamietol
|
|
49
|
+
rejectionReason String? // Dôvod zamietnutia
|
|
50
|
+
// Nové polia pre tracking a žiadosť
|
|
51
|
+
referralSource String? // Odkiaľ sa o nás dozvedel (Google, Facebook, LinkedIn, etc.)
|
|
52
|
+
applicationText String? // Text žiadosti o prihlásenie
|
|
53
|
+
approvalRequest UserApprovalRequest?
|
|
54
|
+
accounts Account[]
|
|
55
|
+
answers Answer[]
|
|
56
|
+
conversations Conversation[]
|
|
57
|
+
feedbacks Feedback[]
|
|
58
|
+
pageViews PageView[]
|
|
59
|
+
sessions Session[]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Nový model pre žiadosti o schválenie
|
|
63
|
+
model UserApprovalRequest {
|
|
64
|
+
id String @id @default(cuid())
|
|
65
|
+
userId String @unique
|
|
66
|
+
status ApprovalStatus @default(PENDING)
|
|
67
|
+
submittedAt DateTime @default(now())
|
|
68
|
+
reviewedAt DateTime?
|
|
69
|
+
reviewedBy String? // ID admina, ktorý preskúmal žiadosť
|
|
70
|
+
notes String? // Poznámky admina
|
|
71
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
72
|
+
|
|
73
|
+
@@index([status])
|
|
74
|
+
@@index([submittedAt])
|
|
75
|
+
@@index([reviewedAt])
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ZJEDNODUŠENÝ Conversation - len metadata, bez duplikátov
|
|
79
|
+
model Conversation {
|
|
80
|
+
id String @id @default(cuid())
|
|
81
|
+
name String
|
|
82
|
+
userId String
|
|
83
|
+
isShareable Boolean @default(false)
|
|
84
|
+
shareUrl String? @unique
|
|
85
|
+
sharedAt DateTime?
|
|
86
|
+
createdAt DateTime @default(now())
|
|
87
|
+
updatedAt DateTime @updatedAt
|
|
88
|
+
summary String?
|
|
89
|
+
messagesSinceLastSummary Int? @default(0)
|
|
90
|
+
// Relácie
|
|
91
|
+
answers Answer[]
|
|
92
|
+
user User @relation(fields: [userId], references: [id])
|
|
93
|
+
|
|
94
|
+
@@index([userId])
|
|
95
|
+
@@index([createdAt])
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Hlavný model - všetky správy, bez duplikátov
|
|
99
|
+
model Answer {
|
|
100
|
+
id String @id @default(cuid())
|
|
101
|
+
conversationId String
|
|
102
|
+
messageId String @unique
|
|
103
|
+
role Role
|
|
104
|
+
content String
|
|
105
|
+
question String?
|
|
106
|
+
answer String?
|
|
107
|
+
evaluation String?
|
|
108
|
+
isWelcome Boolean @default(false)
|
|
109
|
+
processingTime Int?
|
|
110
|
+
model String?
|
|
111
|
+
userId String?
|
|
112
|
+
createdAt DateTime @default(now())
|
|
113
|
+
updatedAt DateTime @updatedAt
|
|
114
|
+
// Relácie
|
|
115
|
+
conversation Conversation @relation(fields: [conversationId], references: [id], onDelete: Cascade)
|
|
116
|
+
user User? @relation(fields: [userId], references: [id])
|
|
117
|
+
feedback Feedback?
|
|
118
|
+
references Reference[]
|
|
119
|
+
metrics AnswerMetrics?
|
|
120
|
+
|
|
121
|
+
@@index([conversationId])
|
|
122
|
+
@@index([messageId])
|
|
123
|
+
@@index([role])
|
|
124
|
+
@@index([userId])
|
|
125
|
+
@@index([createdAt])
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Nová tabuľka pre metriky odpovedí
|
|
129
|
+
model AnswerMetrics {
|
|
130
|
+
id String @id @default(cuid())
|
|
131
|
+
answerId String @unique
|
|
132
|
+
// Náklady
|
|
133
|
+
apiCost Float? // Celkové náklady (ai_cost + rag_cost)
|
|
134
|
+
aiCost Float? // Náklady len na AI provider volania
|
|
135
|
+
ragCost Float? // Náklady na RAG operácie
|
|
136
|
+
// Volania
|
|
137
|
+
apiCalls Int? // Celkový počet volaní
|
|
138
|
+
aiCalls Int? // Počet AI provider volaní
|
|
139
|
+
ragCalls Int? // Počet RAG operácií
|
|
140
|
+
// Čas a výkon
|
|
141
|
+
apiDuration Int? // Doba spracovania v ms
|
|
142
|
+
// AI Provider a Model
|
|
143
|
+
aiProvider String? // Hlavný AI provider
|
|
144
|
+
aiModel String? // Hlavný AI model
|
|
145
|
+
aiProvidersUsed String[] // Všetky použité AI providery
|
|
146
|
+
aiModelsUsed String[] // Všetky použité AI modely
|
|
147
|
+
// Timestamps
|
|
148
|
+
createdAt DateTime @default(now())
|
|
149
|
+
updatedAt DateTime @updatedAt
|
|
150
|
+
// Relations
|
|
151
|
+
answer Answer @relation(fields: [answerId], references: [id], onDelete: Cascade)
|
|
152
|
+
|
|
153
|
+
@@index([answerId])
|
|
154
|
+
@@index([apiCost])
|
|
155
|
+
@@index([apiDuration])
|
|
156
|
+
@@index([aiProvider])
|
|
157
|
+
@@index([createdAt])
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
model Feedback {
|
|
161
|
+
id String @id @default(cuid())
|
|
162
|
+
answerId String @unique
|
|
163
|
+
rating FeedbackRating
|
|
164
|
+
feedbackTypes String[]
|
|
165
|
+
customFeedback String?
|
|
166
|
+
userId String
|
|
167
|
+
messageContent String?
|
|
168
|
+
createdAt DateTime @default(now())
|
|
169
|
+
answer Answer @relation(fields: [answerId], references: [id], onDelete: Cascade)
|
|
170
|
+
user User @relation(fields: [userId], references: [id])
|
|
171
|
+
|
|
172
|
+
@@index([rating])
|
|
173
|
+
@@index([userId])
|
|
174
|
+
@@index([answerId])
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// ZJEDNODUŠENÝ Reference - len na Answer, bez duplikátov
|
|
178
|
+
model Reference {
|
|
179
|
+
id String @id @default(cuid())
|
|
180
|
+
answerId String // Len answerId - konzistentné
|
|
181
|
+
type ReferenceType
|
|
182
|
+
title String
|
|
183
|
+
reference String
|
|
184
|
+
summary String?
|
|
185
|
+
url String?
|
|
186
|
+
uuid String?
|
|
187
|
+
relevance Float?
|
|
188
|
+
citationNumber Int?
|
|
189
|
+
metadata Json?
|
|
190
|
+
userId String?
|
|
191
|
+
createdAt DateTime @default(now())
|
|
192
|
+
// Relácie
|
|
193
|
+
answer Answer @relation(fields: [answerId], references: [id], onDelete: Cascade)
|
|
194
|
+
|
|
195
|
+
@@index([answerId])
|
|
196
|
+
@@index([type])
|
|
197
|
+
@@index([reference])
|
|
198
|
+
@@index([userId])
|
|
199
|
+
@@index([createdAt])
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
model PageView {
|
|
203
|
+
id String @id @default(cuid())
|
|
204
|
+
userId String?
|
|
205
|
+
sessionId String
|
|
206
|
+
page String
|
|
207
|
+
path String
|
|
208
|
+
referrer String?
|
|
209
|
+
userAgent String?
|
|
210
|
+
ipAddress String?
|
|
211
|
+
country String?
|
|
212
|
+
city String?
|
|
213
|
+
deviceType String?
|
|
214
|
+
browser String?
|
|
215
|
+
os String?
|
|
216
|
+
screenSize String?
|
|
217
|
+
language String?
|
|
218
|
+
timeOnPage Int?
|
|
219
|
+
isBounce Boolean @default(true)
|
|
220
|
+
createdAt DateTime @default(now())
|
|
221
|
+
session Session @relation(fields: [sessionId], references: [sessionId], onDelete: SetNull)
|
|
222
|
+
user User? @relation(fields: [userId], references: [id])
|
|
223
|
+
|
|
224
|
+
@@index([userId])
|
|
225
|
+
@@index([sessionId])
|
|
226
|
+
@@index([page])
|
|
227
|
+
@@index([createdAt])
|
|
228
|
+
@@index([country])
|
|
229
|
+
@@index([deviceType])
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
model Session {
|
|
233
|
+
id String @id @default(cuid())
|
|
234
|
+
sessionId String @unique
|
|
235
|
+
userId String?
|
|
236
|
+
startedAt DateTime @default(now())
|
|
237
|
+
endedAt DateTime?
|
|
238
|
+
duration Int?
|
|
239
|
+
pageViews PageView[]
|
|
240
|
+
user User? @relation(fields: [userId], references: [id])
|
|
241
|
+
|
|
242
|
+
@@index([sessionId])
|
|
243
|
+
@@index([userId])
|
|
244
|
+
@@index([startedAt])
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
enum Role {
|
|
248
|
+
USER
|
|
249
|
+
ASSISTANT
|
|
250
|
+
SYSTEM
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
enum FeedbackRating {
|
|
254
|
+
LIKE
|
|
255
|
+
DISLIKE
|
|
256
|
+
NEUTRAL
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
enum ReferenceType {
|
|
260
|
+
LAW
|
|
261
|
+
CASE
|
|
262
|
+
REGULATION
|
|
263
|
+
DOCUMENT
|
|
264
|
+
OTHER
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
enum ApprovalStatus {
|
|
268
|
+
PENDING
|
|
269
|
+
APPROVED
|
|
270
|
+
REJECTED
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Nový model pre logovanie admin akcií
|
|
274
|
+
model AdminActionLog {
|
|
275
|
+
id String @id @default(cuid())
|
|
276
|
+
action String // APPROVE_USER, REJECT_USER, etc.
|
|
277
|
+
targetUserId String // ID používateľa, na ktorého sa akcia vzťahuje
|
|
278
|
+
adminEmail String // E-mail admina, ktorý vykonal akciu
|
|
279
|
+
details Json? // Ďalšie detaily akcie (reason, notes, etc.)
|
|
280
|
+
createdAt DateTime @default(now())
|
|
281
|
+
|
|
282
|
+
@@index([action])
|
|
283
|
+
@@index([targetUserId])
|
|
284
|
+
@@index([adminEmail])
|
|
285
|
+
@@index([createdAt])
|
|
286
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index"
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!!
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
Decimal,
|
|
9
|
+
objectEnumValues,
|
|
10
|
+
makeStrictEnum,
|
|
11
|
+
Public,
|
|
12
|
+
getRuntime,
|
|
13
|
+
skip
|
|
14
|
+
} = require('./runtime/index-browser.js')
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const Prisma = {}
|
|
18
|
+
|
|
19
|
+
exports.Prisma = Prisma
|
|
20
|
+
exports.$Enums = {}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Prisma Client JS version: 6.14.0
|
|
24
|
+
* Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49
|
|
25
|
+
*/
|
|
26
|
+
Prisma.prismaVersion = {
|
|
27
|
+
client: "6.14.0",
|
|
28
|
+
engine: "717184b7b35ea05dfa71a3236b7af656013e1e49"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
Prisma.PrismaClientKnownRequestError = () => {
|
|
32
|
+
const runtimeName = getRuntime().prettyName;
|
|
33
|
+
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
34
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
35
|
+
)};
|
|
36
|
+
Prisma.PrismaClientUnknownRequestError = () => {
|
|
37
|
+
const runtimeName = getRuntime().prettyName;
|
|
38
|
+
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
39
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
40
|
+
)}
|
|
41
|
+
Prisma.PrismaClientRustPanicError = () => {
|
|
42
|
+
const runtimeName = getRuntime().prettyName;
|
|
43
|
+
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
44
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
45
|
+
)}
|
|
46
|
+
Prisma.PrismaClientInitializationError = () => {
|
|
47
|
+
const runtimeName = getRuntime().prettyName;
|
|
48
|
+
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
49
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
50
|
+
)}
|
|
51
|
+
Prisma.PrismaClientValidationError = () => {
|
|
52
|
+
const runtimeName = getRuntime().prettyName;
|
|
53
|
+
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
54
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
55
|
+
)}
|
|
56
|
+
Prisma.Decimal = Decimal
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Re-export of sql-template-tag
|
|
60
|
+
*/
|
|
61
|
+
Prisma.sql = () => {
|
|
62
|
+
const runtimeName = getRuntime().prettyName;
|
|
63
|
+
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
64
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
65
|
+
)}
|
|
66
|
+
Prisma.empty = () => {
|
|
67
|
+
const runtimeName = getRuntime().prettyName;
|
|
68
|
+
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
69
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
70
|
+
)}
|
|
71
|
+
Prisma.join = () => {
|
|
72
|
+
const runtimeName = getRuntime().prettyName;
|
|
73
|
+
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
74
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
75
|
+
)}
|
|
76
|
+
Prisma.raw = () => {
|
|
77
|
+
const runtimeName = getRuntime().prettyName;
|
|
78
|
+
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
79
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
80
|
+
)}
|
|
81
|
+
Prisma.validator = Public.validator
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Extensions
|
|
85
|
+
*/
|
|
86
|
+
Prisma.getExtensionContext = () => {
|
|
87
|
+
const runtimeName = getRuntime().prettyName;
|
|
88
|
+
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
89
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
90
|
+
)}
|
|
91
|
+
Prisma.defineExtension = () => {
|
|
92
|
+
const runtimeName = getRuntime().prettyName;
|
|
93
|
+
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
94
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
95
|
+
)}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Shorthand utilities for JSON filtering
|
|
99
|
+
*/
|
|
100
|
+
Prisma.DbNull = objectEnumValues.instances.DbNull
|
|
101
|
+
Prisma.JsonNull = objectEnumValues.instances.JsonNull
|
|
102
|
+
Prisma.AnyNull = objectEnumValues.instances.AnyNull
|
|
103
|
+
|
|
104
|
+
Prisma.NullTypes = {
|
|
105
|
+
DbNull: objectEnumValues.classes.DbNull,
|
|
106
|
+
JsonNull: objectEnumValues.classes.JsonNull,
|
|
107
|
+
AnyNull: objectEnumValues.classes.AnyNull
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Enums
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
117
|
+
ReadUncommitted: 'ReadUncommitted',
|
|
118
|
+
ReadCommitted: 'ReadCommitted',
|
|
119
|
+
RepeatableRead: 'RepeatableRead',
|
|
120
|
+
Serializable: 'Serializable'
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
exports.Prisma.AccountScalarFieldEnum = {
|
|
124
|
+
id: 'id',
|
|
125
|
+
userId: 'userId',
|
|
126
|
+
type: 'type',
|
|
127
|
+
provider: 'provider',
|
|
128
|
+
providerAccountId: 'providerAccountId',
|
|
129
|
+
refresh_token: 'refresh_token',
|
|
130
|
+
access_token: 'access_token',
|
|
131
|
+
expires_at: 'expires_at',
|
|
132
|
+
token_type: 'token_type',
|
|
133
|
+
scope: 'scope',
|
|
134
|
+
id_token: 'id_token',
|
|
135
|
+
session_state: 'session_state'
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
exports.Prisma.UserScalarFieldEnum = {
|
|
139
|
+
id: 'id',
|
|
140
|
+
name: 'name',
|
|
141
|
+
email: 'email',
|
|
142
|
+
emailVerified: 'emailVerified',
|
|
143
|
+
image: 'image',
|
|
144
|
+
createdAt: 'createdAt',
|
|
145
|
+
messageCount: 'messageCount',
|
|
146
|
+
agreedToTerms: 'agreedToTerms',
|
|
147
|
+
practiceArea: 'practiceArea',
|
|
148
|
+
lawFirm: 'lawFirm',
|
|
149
|
+
yearsOfExperience: 'yearsOfExperience',
|
|
150
|
+
isApproved: 'isApproved',
|
|
151
|
+
isRejected: 'isRejected',
|
|
152
|
+
approvedAt: 'approvedAt',
|
|
153
|
+
rejectedAt: 'rejectedAt',
|
|
154
|
+
approvedBy: 'approvedBy',
|
|
155
|
+
rejectedBy: 'rejectedBy',
|
|
156
|
+
rejectionReason: 'rejectionReason',
|
|
157
|
+
referralSource: 'referralSource',
|
|
158
|
+
applicationText: 'applicationText'
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
exports.Prisma.UserApprovalRequestScalarFieldEnum = {
|
|
162
|
+
id: 'id',
|
|
163
|
+
userId: 'userId',
|
|
164
|
+
status: 'status',
|
|
165
|
+
submittedAt: 'submittedAt',
|
|
166
|
+
reviewedAt: 'reviewedAt',
|
|
167
|
+
reviewedBy: 'reviewedBy',
|
|
168
|
+
notes: 'notes'
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
exports.Prisma.ConversationScalarFieldEnum = {
|
|
172
|
+
id: 'id',
|
|
173
|
+
name: 'name',
|
|
174
|
+
userId: 'userId',
|
|
175
|
+
isShareable: 'isShareable',
|
|
176
|
+
shareUrl: 'shareUrl',
|
|
177
|
+
sharedAt: 'sharedAt',
|
|
178
|
+
createdAt: 'createdAt',
|
|
179
|
+
updatedAt: 'updatedAt',
|
|
180
|
+
summary: 'summary',
|
|
181
|
+
messagesSinceLastSummary: 'messagesSinceLastSummary'
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
exports.Prisma.AnswerScalarFieldEnum = {
|
|
185
|
+
id: 'id',
|
|
186
|
+
conversationId: 'conversationId',
|
|
187
|
+
messageId: 'messageId',
|
|
188
|
+
role: 'role',
|
|
189
|
+
content: 'content',
|
|
190
|
+
question: 'question',
|
|
191
|
+
answer: 'answer',
|
|
192
|
+
evaluation: 'evaluation',
|
|
193
|
+
isWelcome: 'isWelcome',
|
|
194
|
+
processingTime: 'processingTime',
|
|
195
|
+
model: 'model',
|
|
196
|
+
userId: 'userId',
|
|
197
|
+
createdAt: 'createdAt',
|
|
198
|
+
updatedAt: 'updatedAt'
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
exports.Prisma.AnswerMetricsScalarFieldEnum = {
|
|
202
|
+
id: 'id',
|
|
203
|
+
answerId: 'answerId',
|
|
204
|
+
apiCost: 'apiCost',
|
|
205
|
+
aiCost: 'aiCost',
|
|
206
|
+
ragCost: 'ragCost',
|
|
207
|
+
apiCalls: 'apiCalls',
|
|
208
|
+
aiCalls: 'aiCalls',
|
|
209
|
+
ragCalls: 'ragCalls',
|
|
210
|
+
apiDuration: 'apiDuration',
|
|
211
|
+
aiProvider: 'aiProvider',
|
|
212
|
+
aiModel: 'aiModel',
|
|
213
|
+
aiProvidersUsed: 'aiProvidersUsed',
|
|
214
|
+
aiModelsUsed: 'aiModelsUsed',
|
|
215
|
+
createdAt: 'createdAt',
|
|
216
|
+
updatedAt: 'updatedAt'
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
exports.Prisma.FeedbackScalarFieldEnum = {
|
|
220
|
+
id: 'id',
|
|
221
|
+
answerId: 'answerId',
|
|
222
|
+
rating: 'rating',
|
|
223
|
+
feedbackTypes: 'feedbackTypes',
|
|
224
|
+
customFeedback: 'customFeedback',
|
|
225
|
+
userId: 'userId',
|
|
226
|
+
messageContent: 'messageContent',
|
|
227
|
+
createdAt: 'createdAt'
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
exports.Prisma.ReferenceScalarFieldEnum = {
|
|
231
|
+
id: 'id',
|
|
232
|
+
answerId: 'answerId',
|
|
233
|
+
type: 'type',
|
|
234
|
+
title: 'title',
|
|
235
|
+
reference: 'reference',
|
|
236
|
+
summary: 'summary',
|
|
237
|
+
url: 'url',
|
|
238
|
+
uuid: 'uuid',
|
|
239
|
+
relevance: 'relevance',
|
|
240
|
+
citationNumber: 'citationNumber',
|
|
241
|
+
metadata: 'metadata',
|
|
242
|
+
userId: 'userId',
|
|
243
|
+
createdAt: 'createdAt'
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
exports.Prisma.PageViewScalarFieldEnum = {
|
|
247
|
+
id: 'id',
|
|
248
|
+
userId: 'userId',
|
|
249
|
+
sessionId: 'sessionId',
|
|
250
|
+
page: 'page',
|
|
251
|
+
path: 'path',
|
|
252
|
+
referrer: 'referrer',
|
|
253
|
+
userAgent: 'userAgent',
|
|
254
|
+
ipAddress: 'ipAddress',
|
|
255
|
+
country: 'country',
|
|
256
|
+
city: 'city',
|
|
257
|
+
deviceType: 'deviceType',
|
|
258
|
+
browser: 'browser',
|
|
259
|
+
os: 'os',
|
|
260
|
+
screenSize: 'screenSize',
|
|
261
|
+
language: 'language',
|
|
262
|
+
timeOnPage: 'timeOnPage',
|
|
263
|
+
isBounce: 'isBounce',
|
|
264
|
+
createdAt: 'createdAt'
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
exports.Prisma.SessionScalarFieldEnum = {
|
|
268
|
+
id: 'id',
|
|
269
|
+
sessionId: 'sessionId',
|
|
270
|
+
userId: 'userId',
|
|
271
|
+
startedAt: 'startedAt',
|
|
272
|
+
endedAt: 'endedAt',
|
|
273
|
+
duration: 'duration'
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
exports.Prisma.AdminActionLogScalarFieldEnum = {
|
|
277
|
+
id: 'id',
|
|
278
|
+
action: 'action',
|
|
279
|
+
targetUserId: 'targetUserId',
|
|
280
|
+
adminEmail: 'adminEmail',
|
|
281
|
+
details: 'details',
|
|
282
|
+
createdAt: 'createdAt'
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
exports.Prisma.SortOrder = {
|
|
286
|
+
asc: 'asc',
|
|
287
|
+
desc: 'desc'
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
exports.Prisma.NullableJsonNullValueInput = {
|
|
291
|
+
DbNull: Prisma.DbNull,
|
|
292
|
+
JsonNull: Prisma.JsonNull
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
exports.Prisma.QueryMode = {
|
|
296
|
+
default: 'default',
|
|
297
|
+
insensitive: 'insensitive'
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
exports.Prisma.NullsOrder = {
|
|
301
|
+
first: 'first',
|
|
302
|
+
last: 'last'
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
exports.Prisma.JsonNullValueFilter = {
|
|
306
|
+
DbNull: Prisma.DbNull,
|
|
307
|
+
JsonNull: Prisma.JsonNull,
|
|
308
|
+
AnyNull: Prisma.AnyNull
|
|
309
|
+
};
|
|
310
|
+
exports.ApprovalStatus = exports.$Enums.ApprovalStatus = {
|
|
311
|
+
PENDING: 'PENDING',
|
|
312
|
+
APPROVED: 'APPROVED',
|
|
313
|
+
REJECTED: 'REJECTED'
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
exports.Role = exports.$Enums.Role = {
|
|
317
|
+
USER: 'USER',
|
|
318
|
+
ASSISTANT: 'ASSISTANT',
|
|
319
|
+
SYSTEM: 'SYSTEM'
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
exports.FeedbackRating = exports.$Enums.FeedbackRating = {
|
|
323
|
+
LIKE: 'LIKE',
|
|
324
|
+
DISLIKE: 'DISLIKE',
|
|
325
|
+
NEUTRAL: 'NEUTRAL'
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
exports.ReferenceType = exports.$Enums.ReferenceType = {
|
|
329
|
+
LAW: 'LAW',
|
|
330
|
+
CASE: 'CASE',
|
|
331
|
+
REGULATION: 'REGULATION',
|
|
332
|
+
DOCUMENT: 'DOCUMENT',
|
|
333
|
+
OTHER: 'OTHER'
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
exports.Prisma.ModelName = {
|
|
337
|
+
Account: 'Account',
|
|
338
|
+
User: 'User',
|
|
339
|
+
UserApprovalRequest: 'UserApprovalRequest',
|
|
340
|
+
Conversation: 'Conversation',
|
|
341
|
+
Answer: 'Answer',
|
|
342
|
+
AnswerMetrics: 'AnswerMetrics',
|
|
343
|
+
Feedback: 'Feedback',
|
|
344
|
+
Reference: 'Reference',
|
|
345
|
+
PageView: 'PageView',
|
|
346
|
+
Session: 'Session',
|
|
347
|
+
AdminActionLog: 'AdminActionLog'
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* This is a stub Prisma Client that will error at runtime if called.
|
|
352
|
+
*/
|
|
353
|
+
class PrismaClient {
|
|
354
|
+
constructor() {
|
|
355
|
+
return new Proxy(this, {
|
|
356
|
+
get(target, prop) {
|
|
357
|
+
let message
|
|
358
|
+
const runtime = getRuntime()
|
|
359
|
+
if (runtime.isEdge) {
|
|
360
|
+
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
|
|
361
|
+
- Use Prisma Accelerate: https://pris.ly/d/accelerate
|
|
362
|
+
- Use Driver Adapters: https://pris.ly/d/driver-adapters
|
|
363
|
+
`;
|
|
364
|
+
} else {
|
|
365
|
+
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
message += `
|
|
369
|
+
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
|
|
370
|
+
|
|
371
|
+
throw new Error(message)
|
|
372
|
+
}
|
|
373
|
+
})
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
exports.PrismaClient = PrismaClient
|
|
378
|
+
|
|
379
|
+
Object.assign(exports, Prisma)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./default"
|