@danielcok17/prisma-db 1.0.5 → 1.1.1

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 (48) hide show
  1. package/package.json +3 -3
  2. package/prisma/app.prisma +35 -2
  3. package/prisma/generated/app/default.js +1 -1
  4. package/prisma/generated/app/edge.js +33 -10
  5. package/prisma/generated/app/index-browser.js +24 -5
  6. package/prisma/generated/app/index.d.ts +4795 -1404
  7. package/prisma/generated/app/index.js +37 -10
  8. package/prisma/generated/app/libquery_engine-darwin-arm64.dylib.node +0 -0
  9. package/prisma/generated/app/libquery_engine-linux-musl-openssl-3.0.x.so.node +0 -0
  10. package/prisma/generated/app/package.json +37 -4
  11. package/prisma/generated/app/query_engine_bg.js +2 -0
  12. package/prisma/generated/app/query_engine_bg.wasm +0 -0
  13. package/prisma/generated/app/runtime/edge-esm.js +16 -16
  14. package/prisma/generated/app/runtime/edge.js +16 -16
  15. package/prisma/generated/app/runtime/library.d.ts +1 -0
  16. package/prisma/generated/app/runtime/library.js +45 -45
  17. package/prisma/generated/app/runtime/react-native.js +28 -28
  18. package/prisma/generated/app/runtime/wasm-compiler-edge.js +27 -26
  19. package/prisma/generated/app/runtime/wasm-engine-edge.js +18 -17
  20. package/prisma/generated/app/schema.prisma +63 -30
  21. package/prisma/generated/app/wasm-edge-light-loader.mjs +4 -0
  22. package/prisma/generated/app/wasm-worker-loader.mjs +4 -0
  23. package/prisma/generated/app/wasm.d.ts +1 -1
  24. package/prisma/generated/app/wasm.js +143 -99
  25. package/prisma/generated/law/default.js +1 -1
  26. package/prisma/generated/law/edge.js +12 -8
  27. package/prisma/generated/law/index-browser.js +4 -4
  28. package/prisma/generated/law/index.d.ts +6 -2
  29. package/prisma/generated/law/index.js +16 -8
  30. package/prisma/generated/law/libquery_engine-darwin-arm64.dylib.node +0 -0
  31. package/prisma/generated/law/libquery_engine-linux-musl-openssl-3.0.x.so.node +0 -0
  32. package/prisma/generated/law/package.json +37 -4
  33. package/prisma/generated/law/query_engine_bg.js +2 -0
  34. package/prisma/generated/law/query_engine_bg.wasm +0 -0
  35. package/prisma/generated/law/runtime/edge-esm.js +16 -16
  36. package/prisma/generated/law/runtime/edge.js +16 -16
  37. package/prisma/generated/law/runtime/library.d.ts +1 -0
  38. package/prisma/generated/law/runtime/library.js +45 -45
  39. package/prisma/generated/law/runtime/react-native.js +28 -28
  40. package/prisma/generated/law/runtime/wasm-compiler-edge.js +27 -26
  41. package/prisma/generated/law/runtime/wasm-engine-edge.js +18 -17
  42. package/prisma/generated/law/schema.prisma +3 -2
  43. package/prisma/generated/law/wasm-edge-light-loader.mjs +4 -0
  44. package/prisma/generated/law/wasm-worker-loader.mjs +4 -0
  45. package/prisma/generated/law/wasm.d.ts +1 -1
  46. package/prisma/generated/law/wasm.js +110 -85
  47. package/prisma/law.prisma +3 -2
  48. package/prisma/migrations/20251009213916_add_email_authentication/migration.sql +54 -0
@@ -1,6 +1,7 @@
1
1
  generator client {
2
- provider = "prisma-client-js"
3
- output = "./generated/app"
2
+ provider = "prisma-client-js"
3
+ output = "./generated/app"
4
+ binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
4
5
  }
5
6
 
6
7
  datasource db {
@@ -28,36 +29,40 @@ model Account {
28
29
  }
29
30
 
30
31
  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?
32
+ id String @id @default(cuid())
33
+ name String?
34
+ email String? @unique
35
+ emailVerified DateTime?
36
+ image String?
37
+ // Credentials authentication fields
38
+ password String? // Hashed password pre credentials login
39
+ createdAt DateTime @default(now())
40
+ messageCount Int @default(100)
41
+ agreedToTerms Boolean @default(false)
42
+ practiceArea String[]
43
+ lawFirm String?
44
+ yearsOfExperience Int?
42
45
  // 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
46
+ isApproved Boolean @default(false) // Či je používateľ schválený
47
+ isRejected Boolean @default(false) // Či je používateľ zamietnutý
48
+ approvedAt DateTime? // Kedy bol schválený
49
+ rejectedAt DateTime? // Kedy bol zamietnutý
50
+ approvedBy String? // ID admina, ktorý schválil
51
+ rejectedBy String? // ID admina, ktorý zamietol
52
+ rejectionReason String? // Dôvod zamietnutia
50
53
  // 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
- workflowLogs WorkflowLog[]
54
+ referralSource String? // Odkiaľ sa o nás dozvedel (Google, Facebook, LinkedIn, etc.)
55
+ applicationText String? // Text žiadosti o prihlásenie
56
+ approvalRequest UserApprovalRequest?
57
+ accounts Account[]
58
+ answers Answer[]
59
+ conversations Conversation[]
60
+ feedbacks Feedback[]
61
+ pageViews PageView[]
62
+ sessions Session[]
63
+ workflowLogs WorkflowLog[]
64
+ verificationTokens VerificationToken[]
65
+ passwordResetTokens PasswordResetToken[]
61
66
  }
62
67
 
63
68
  // Nový model pre žiadosti o schválenie
@@ -360,3 +365,31 @@ enum StepType {
360
365
  DATA_PERSISTENCE
361
366
  ERROR_HANDLING
362
367
  }
368
+
369
+ // Email verification tokens
370
+ model VerificationToken {
371
+ id String @id @default(cuid())
372
+ userId String
373
+ token String @unique
374
+ expires DateTime
375
+ createdAt DateTime @default(now())
376
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
377
+
378
+ @@index([token])
379
+ @@index([userId])
380
+ @@index([expires])
381
+ }
382
+
383
+ // Password reset tokens
384
+ model PasswordResetToken {
385
+ id String @id @default(cuid())
386
+ userId String
387
+ token String @unique
388
+ expires DateTime
389
+ createdAt DateTime @default(now())
390
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
391
+
392
+ @@index([token])
393
+ @@index([userId])
394
+ @@index([expires])
395
+ }
@@ -0,0 +1,4 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!!
3
+ /* eslint-disable */
4
+ export default import('./query_engine_bg.wasm?module')
@@ -0,0 +1,4 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!!
3
+ /* eslint-disable */
4
+ export default import('./query_engine_bg.wasm')
@@ -1 +1 @@
1
- export * from "./index"
1
+ export * from "./default"
@@ -5,13 +5,28 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
 
7
7
  const {
8
+ PrismaClientKnownRequestError,
9
+ PrismaClientUnknownRequestError,
10
+ PrismaClientRustPanicError,
11
+ PrismaClientInitializationError,
12
+ PrismaClientValidationError,
13
+ getPrismaClient,
14
+ sqltag,
15
+ empty,
16
+ join,
17
+ raw,
18
+ skip,
8
19
  Decimal,
20
+ Debug,
9
21
  objectEnumValues,
10
22
  makeStrictEnum,
23
+ Extensions,
24
+ warnOnce,
25
+ defineDmmfProperty,
11
26
  Public,
12
27
  getRuntime,
13
- skip
14
- } = require('./runtime/index-browser.js')
28
+ createParam,
29
+ } = require('./runtime/wasm-engine-edge.js')
15
30
 
16
31
 
17
32
  const Prisma = {}
@@ -20,79 +35,35 @@ exports.Prisma = Prisma
20
35
  exports.$Enums = {}
21
36
 
22
37
  /**
23
- * Prisma Client JS version: 6.15.0
24
- * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb
38
+ * Prisma Client JS version: 6.17.0
39
+ * Query Engine version: c0aafc03b8ef6cdced8654b9a817999e02457d6a
25
40
  */
26
41
  Prisma.prismaVersion = {
27
- client: "6.15.0",
28
- engine: "85179d7826409ee107a6ba334b5e305ae3fba9fb"
42
+ client: "6.17.0",
43
+ engine: "c0aafc03b8ef6cdced8654b9a817999e02457d6a"
29
44
  }
30
45
 
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
- )}
46
+ Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
47
+ Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError
48
+ Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError
49
+ Prisma.PrismaClientInitializationError = PrismaClientInitializationError
50
+ Prisma.PrismaClientValidationError = PrismaClientValidationError
56
51
  Prisma.Decimal = Decimal
57
52
 
58
53
  /**
59
54
  * Re-export of sql-template-tag
60
55
  */
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
- )}
56
+ Prisma.sql = sqltag
57
+ Prisma.empty = empty
58
+ Prisma.join = join
59
+ Prisma.raw = raw
81
60
  Prisma.validator = Public.validator
82
61
 
83
62
  /**
84
63
  * Extensions
85
64
  */
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
- )}
65
+ Prisma.getExtensionContext = Extensions.getExtensionContext
66
+ Prisma.defineExtension = Extensions.defineExtension
96
67
 
97
68
  /**
98
69
  * Shorthand utilities for JSON filtering
@@ -109,10 +80,11 @@ Prisma.NullTypes = {
109
80
 
110
81
 
111
82
 
83
+
84
+
112
85
  /**
113
86
  * Enums
114
87
  */
115
-
116
88
  exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
117
89
  ReadUncommitted: 'ReadUncommitted',
118
90
  ReadCommitted: 'ReadCommitted',
@@ -141,6 +113,7 @@ exports.Prisma.UserScalarFieldEnum = {
141
113
  email: 'email',
142
114
  emailVerified: 'emailVerified',
143
115
  image: 'image',
116
+ password: 'password',
144
117
  createdAt: 'createdAt',
145
118
  messageCount: 'messageCount',
146
119
  agreedToTerms: 'agreedToTerms',
@@ -311,6 +284,22 @@ exports.Prisma.WorkflowStepScalarFieldEnum = {
311
284
  metadata: 'metadata'
312
285
  };
313
286
 
287
+ exports.Prisma.VerificationTokenScalarFieldEnum = {
288
+ id: 'id',
289
+ userId: 'userId',
290
+ token: 'token',
291
+ expires: 'expires',
292
+ createdAt: 'createdAt'
293
+ };
294
+
295
+ exports.Prisma.PasswordResetTokenScalarFieldEnum = {
296
+ id: 'id',
297
+ userId: 'userId',
298
+ token: 'token',
299
+ expires: 'expires',
300
+ createdAt: 'createdAt'
301
+ };
302
+
314
303
  exports.Prisma.SortOrder = {
315
304
  asc: 'asc',
316
305
  desc: 'desc'
@@ -336,12 +325,6 @@ exports.Prisma.JsonNullValueFilter = {
336
325
  JsonNull: Prisma.JsonNull,
337
326
  AnyNull: Prisma.AnyNull
338
327
  };
339
- exports.ApprovalStatus = exports.$Enums.ApprovalStatus = {
340
- PENDING: 'PENDING',
341
- APPROVED: 'APPROVED',
342
- REJECTED: 'REJECTED'
343
- };
344
-
345
328
  exports.Role = exports.$Enums.Role = {
346
329
  USER: 'USER',
347
330
  ASSISTANT: 'ASSISTANT',
@@ -362,6 +345,12 @@ exports.ReferenceType = exports.$Enums.ReferenceType = {
362
345
  OTHER: 'OTHER'
363
346
  };
364
347
 
348
+ exports.ApprovalStatus = exports.$Enums.ApprovalStatus = {
349
+ PENDING: 'PENDING',
350
+ APPROVED: 'APPROVED',
351
+ REJECTED: 'REJECTED'
352
+ };
353
+
365
354
  exports.WorkflowStatus = exports.$Enums.WorkflowStatus = {
366
355
  IN_PROGRESS: 'IN_PROGRESS',
367
356
  COMPLETED: 'COMPLETED',
@@ -369,6 +358,13 @@ exports.WorkflowStatus = exports.$Enums.WorkflowStatus = {
369
358
  CANCELLED: 'CANCELLED'
370
359
  };
371
360
 
361
+ exports.StepStatus = exports.$Enums.StepStatus = {
362
+ IN_PROGRESS: 'IN_PROGRESS',
363
+ COMPLETED: 'COMPLETED',
364
+ FAILED: 'FAILED',
365
+ SKIPPED: 'SKIPPED'
366
+ };
367
+
372
368
  exports.StepType = exports.$Enums.StepType = {
373
369
  CLASSIFICATION: 'CLASSIFICATION',
374
370
  RAG_RETRIEVAL: 'RAG_RETRIEVAL',
@@ -378,13 +374,6 @@ exports.StepType = exports.$Enums.StepType = {
378
374
  ERROR_HANDLING: 'ERROR_HANDLING'
379
375
  };
380
376
 
381
- exports.StepStatus = exports.$Enums.StepStatus = {
382
- IN_PROGRESS: 'IN_PROGRESS',
383
- COMPLETED: 'COMPLETED',
384
- FAILED: 'FAILED',
385
- SKIPPED: 'SKIPPED'
386
- };
387
-
388
377
  exports.Prisma.ModelName = {
389
378
  Account: 'Account',
390
379
  User: 'User',
@@ -398,36 +387,91 @@ exports.Prisma.ModelName = {
398
387
  Session: 'Session',
399
388
  AdminActionLog: 'AdminActionLog',
400
389
  WorkflowLog: 'WorkflowLog',
401
- WorkflowStep: 'WorkflowStep'
390
+ WorkflowStep: 'WorkflowStep',
391
+ VerificationToken: 'VerificationToken',
392
+ PasswordResetToken: 'PasswordResetToken'
402
393
  };
403
-
404
394
  /**
405
- * This is a stub Prisma Client that will error at runtime if called.
395
+ * Create the Client
406
396
  */
407
- class PrismaClient {
408
- constructor() {
409
- return new Proxy(this, {
410
- get(target, prop) {
411
- let message
412
- const runtime = getRuntime()
413
- if (runtime.isEdge) {
414
- message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
415
- - Use Prisma Accelerate: https://pris.ly/d/accelerate
416
- - Use Driver Adapters: https://pris.ly/d/driver-adapters
417
- `;
418
- } else {
419
- message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
420
- }
421
-
422
- message += `
423
- If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
424
-
425
- throw new Error(message)
397
+ const config = {
398
+ "generator": {
399
+ "name": "client",
400
+ "provider": {
401
+ "fromEnvVar": null,
402
+ "value": "prisma-client-js"
403
+ },
404
+ "output": {
405
+ "value": "/Users/danielcok/Solty/AI Solutions/legal-ai-prisma-db/prisma/generated/app",
406
+ "fromEnvVar": null
407
+ },
408
+ "config": {
409
+ "engineType": "library"
410
+ },
411
+ "binaryTargets": [
412
+ {
413
+ "fromEnvVar": null,
414
+ "value": "darwin-arm64",
415
+ "native": true
416
+ },
417
+ {
418
+ "fromEnvVar": null,
419
+ "value": "linux-musl-openssl-3.0.x"
420
+ }
421
+ ],
422
+ "previewFeatures": [],
423
+ "sourceFilePath": "/Users/danielcok/Solty/AI Solutions/legal-ai-prisma-db/prisma/app.prisma",
424
+ "isCustomOutput": true
425
+ },
426
+ "relativeEnvPaths": {
427
+ "rootEnvPath": null,
428
+ "schemaEnvPath": "../../../.env"
429
+ },
430
+ "relativePath": "../..",
431
+ "clientVersion": "6.17.0",
432
+ "engineVersion": "c0aafc03b8ef6cdced8654b9a817999e02457d6a",
433
+ "datasourceNames": [
434
+ "db"
435
+ ],
436
+ "activeProvider": "postgresql",
437
+ "postinstall": false,
438
+ "inlineDatasources": {
439
+ "db": {
440
+ "url": {
441
+ "fromEnvVar": "POSTGRES_PRISMA_URL",
442
+ "value": null
426
443
  }
427
- })
444
+ }
445
+ },
446
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"./generated/app\"\n binaryTargets = [\"native\", \"linux-musl-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"POSTGRES_PRISMA_URL\")\n directUrl = env(\"POSTGRES_URL_NON_POOLING\")\n}\n\nmodel Account {\n id String @id @default(cuid())\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@unique([provider, providerAccountId])\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String? @unique\n emailVerified DateTime?\n image String?\n // Credentials authentication fields\n password String? // Hashed password pre credentials login\n createdAt DateTime @default(now())\n messageCount Int @default(100)\n agreedToTerms Boolean @default(false)\n practiceArea String[]\n lawFirm String?\n yearsOfExperience Int?\n // Nové polia pre schvalovanie používateľov\n isApproved Boolean @default(false) // Či je používateľ schválený\n isRejected Boolean @default(false) // Či je používateľ zamietnutý\n approvedAt DateTime? // Kedy bol schválený\n rejectedAt DateTime? // Kedy bol zamietnutý\n approvedBy String? // ID admina, ktorý schválil\n rejectedBy String? // ID admina, ktorý zamietol\n rejectionReason String? // Dôvod zamietnutia\n // Nové polia pre tracking a žiadosť\n referralSource String? // Odkiaľ sa o nás dozvedel (Google, Facebook, LinkedIn, etc.)\n applicationText String? // Text žiadosti o prihlásenie\n approvalRequest UserApprovalRequest?\n accounts Account[]\n answers Answer[]\n conversations Conversation[]\n feedbacks Feedback[]\n pageViews PageView[]\n sessions Session[]\n workflowLogs WorkflowLog[]\n verificationTokens VerificationToken[]\n passwordResetTokens PasswordResetToken[]\n}\n\n// Nový model pre žiadosti o schválenie\nmodel UserApprovalRequest {\n id String @id @default(cuid())\n userId String @unique\n status ApprovalStatus @default(PENDING)\n submittedAt DateTime @default(now())\n reviewedAt DateTime?\n reviewedBy String? // ID admina, ktorý preskúmal žiadosť\n notes String? // Poznámky admina\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([status])\n @@index([submittedAt])\n @@index([reviewedAt])\n}\n\n// ZJEDNODUŠENÝ Conversation - len metadata, bez duplikátov\nmodel Conversation {\n id String @id @default(cuid())\n name String\n userId String\n isShareable Boolean @default(false)\n shareUrl String? @unique\n sharedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n summary String?\n messagesSinceLastSummary Int? @default(0)\n // Relácie\n answers Answer[]\n user User @relation(fields: [userId], references: [id])\n workflowLogs WorkflowLog[]\n\n @@index([userId])\n @@index([createdAt])\n}\n\n// Hlavný model - všetky správy, bez duplikátov\nmodel Answer {\n id String @id @default(cuid())\n conversationId String\n messageId String @unique\n role Role\n content String\n question String?\n answer String?\n evaluation String?\n isWelcome Boolean @default(false)\n processingTime Int?\n model String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n // Relácie\n conversation Conversation @relation(fields: [conversationId], references: [id], onDelete: Cascade)\n user User? @relation(fields: [userId], references: [id])\n feedback Feedback?\n references Reference[]\n metrics AnswerMetrics?\n WorkflowLog WorkflowLog[]\n\n @@index([conversationId])\n @@index([messageId])\n @@index([role])\n @@index([userId])\n @@index([createdAt])\n}\n\n// Nová tabuľka pre metriky odpovedí\nmodel AnswerMetrics {\n id String @id @default(cuid())\n answerId String @unique\n // Náklady\n apiCost Float? // Celkové náklady (ai_cost + rag_cost)\n aiCost Float? // Náklady len na AI provider volania\n ragCost Float? // Náklady na RAG operácie\n // Volania\n apiCalls Int? // Celkový počet volaní\n aiCalls Int? // Počet AI provider volaní\n ragCalls Int? // Počet RAG operácií\n // Čas a výkon\n apiDuration Int? // Doba spracovania v ms\n // AI Provider a Model\n aiProvider String? // Hlavný AI provider\n aiModel String? // Hlavný AI model\n aiProvidersUsed String[] // Všetky použité AI providery\n aiModelsUsed String[] // Všetky použité AI modely\n // Timestamps\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n // Relations\n answer Answer @relation(fields: [answerId], references: [id], onDelete: Cascade)\n\n @@index([answerId])\n @@index([apiCost])\n @@index([apiDuration])\n @@index([aiProvider])\n @@index([createdAt])\n}\n\nmodel Feedback {\n id String @id @default(cuid())\n answerId String @unique\n rating FeedbackRating\n feedbackTypes String[]\n customFeedback String?\n userId String\n messageContent String?\n createdAt DateTime @default(now())\n answer Answer @relation(fields: [answerId], references: [id], onDelete: Cascade)\n user User @relation(fields: [userId], references: [id])\n\n @@index([rating])\n @@index([userId])\n @@index([answerId])\n}\n\n// ZJEDNODUŠENÝ Reference - len na Answer, bez duplikátov\nmodel Reference {\n id String @id @default(cuid())\n answerId String // Len answerId - konzistentné\n type ReferenceType\n title String\n reference String\n summary String?\n url String?\n uuid String?\n relevance Float?\n citationNumber Int?\n metadata Json?\n userId String?\n createdAt DateTime @default(now())\n // Relácie\n answer Answer @relation(fields: [answerId], references: [id], onDelete: Cascade)\n\n @@index([answerId])\n @@index([type])\n @@index([reference])\n @@index([userId])\n @@index([createdAt])\n}\n\nmodel PageView {\n id String @id @default(cuid())\n userId String?\n sessionId String?\n page String\n path String\n referrer String?\n userAgent String?\n ipAddress String?\n country String?\n city String?\n deviceType String?\n browser String?\n os String?\n screenSize String?\n language String?\n timeOnPage Int?\n isBounce Boolean @default(true)\n createdAt DateTime @default(now())\n session Session? @relation(fields: [sessionId], references: [sessionId], onDelete: SetNull)\n user User? @relation(fields: [userId], references: [id])\n\n @@index([userId])\n @@index([sessionId])\n @@index([page])\n @@index([createdAt])\n @@index([country])\n @@index([deviceType])\n}\n\nmodel Session {\n id String @id @default(cuid())\n sessionId String @unique\n userId String?\n startedAt DateTime @default(now())\n endedAt DateTime?\n duration Int?\n pageViews PageView[]\n user User? @relation(fields: [userId], references: [id])\n workflowLogs WorkflowLog[]\n\n @@index([userId])\n @@index([startedAt])\n}\n\nenum Role {\n USER\n ASSISTANT\n SYSTEM\n}\n\nenum FeedbackRating {\n LIKE\n DISLIKE\n NEUTRAL\n}\n\nenum ReferenceType {\n LAW\n CASE\n REGULATION\n DOCUMENT\n OTHER\n}\n\nenum ApprovalStatus {\n PENDING\n APPROVED\n REJECTED\n}\n\n// Nový model pre logovanie admin akcií\nmodel AdminActionLog {\n id String @id @default(cuid())\n action String // APPROVE_USER, REJECT_USER, etc.\n targetUserId String // ID používateľa, na ktorého sa akcia vzťahuje\n adminEmail String // E-mail admina, ktorý vykonal akciu\n details Json? // Ďalšie detaily akcie (reason, notes, etc.)\n createdAt DateTime @default(now())\n\n @@index([action])\n @@index([targetUserId])\n @@index([adminEmail])\n @@index([createdAt])\n}\n\nmodel WorkflowLog {\n id String @id @default(cuid()) // Added @default(cuid())\n conversationId String\n messageId String?\n userId String? // Made optional to preserve logs when users are deleted\n sessionId String? // Removed @unique to allow multiple workflows per session\n startedAt DateTime @default(now())\n completedAt DateTime?\n status WorkflowStatus @default(IN_PROGRESS)\n totalDuration Int? // milliseconds\n error String?\n metadata Json?\n steps WorkflowStep[] // Renamed from WorkflowStep to steps (lowerCamel, plural)\n conversation Conversation @relation(fields: [conversationId], references: [id], onDelete: Cascade)\n user User? @relation(fields: [userId], references: [id], onDelete: SetNull)\n session Session? @relation(fields: [sessionId], references: [sessionId], onDelete: SetNull)\n answer Answer? @relation(fields: [messageId], references: [messageId])\n\n @@index([conversationId])\n @@index([userId])\n @@index([sessionId])\n @@index([startedAt])\n @@index([status])\n @@index([conversationId, startedAt]) // Composite index for timeline queries\n @@index([messageId])\n}\n\nmodel WorkflowStep {\n id String @id @default(cuid()) // Added @default(cuid())\n workflowId String\n stepName String // 'classify_question', 'rag_search', 'ai_processing', 'generate_response'\n stepType StepType\n startedAt DateTime @default(now())\n completedAt DateTime?\n duration Int? // milliseconds\n status StepStatus @default(IN_PROGRESS)\n inputData Json? // Sanitized input data\n outputData Json? // Sanitized output data\n error String?\n metadata Json? // Provider used, model used, tokens, costs, etc.\n workflow WorkflowLog @relation(fields: [workflowId], references: [id], onDelete: Cascade)\n\n @@index([workflowId])\n @@index([stepName])\n @@index([stepType])\n @@index([startedAt])\n @@index([status])\n @@index([workflowId, startedAt]) // Composite index for timeline queries\n}\n\nenum WorkflowStatus {\n IN_PROGRESS\n COMPLETED\n FAILED\n CANCELLED\n}\n\nenum StepStatus {\n IN_PROGRESS\n COMPLETED\n FAILED\n SKIPPED\n}\n\nenum StepType {\n CLASSIFICATION\n RAG_RETRIEVAL\n AI_PROCESSING\n RESPONSE_GENERATION\n DATA_PERSISTENCE\n ERROR_HANDLING\n}\n\n// Email verification tokens\nmodel VerificationToken {\n id String @id @default(cuid())\n userId String\n token String @unique\n expires DateTime\n createdAt DateTime @default(now())\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([token])\n @@index([userId])\n @@index([expires])\n}\n\n// Password reset tokens\nmodel PasswordResetToken {\n id String @id @default(cuid())\n userId String\n token String @unique\n expires DateTime\n createdAt DateTime @default(now())\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n\n @@index([token])\n @@index([userId])\n @@index([expires])\n}\n",
447
+ "inlineSchemaHash": "adcf2f246fbd2a0eabab2f350a431b430a9ef8cb4d9dec85b0bb2fca54874cb8",
448
+ "copyEngine": true
449
+ }
450
+ config.dirname = '/'
451
+
452
+ config.runtimeDataModel = JSON.parse("{\"models\":{\"Account\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"provider\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"providerAccountId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"refresh_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"access_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"token_type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scope\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"id_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"session_state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"AccountToUser\"}],\"dbName\":null},\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"emailVerified\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"image\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"messageCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"agreedToTerms\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"practiceArea\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lawFirm\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"yearsOfExperience\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isApproved\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isRejected\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"approvedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"rejectedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"approvedBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rejectedBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rejectionReason\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referralSource\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"applicationText\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"approvalRequest\",\"kind\":\"object\",\"type\":\"UserApprovalRequest\",\"relationName\":\"UserToUserApprovalRequest\"},{\"name\":\"accounts\",\"kind\":\"object\",\"type\":\"Account\",\"relationName\":\"AccountToUser\"},{\"name\":\"answers\",\"kind\":\"object\",\"type\":\"Answer\",\"relationName\":\"AnswerToUser\"},{\"name\":\"conversations\",\"kind\":\"object\",\"type\":\"Conversation\",\"relationName\":\"ConversationToUser\"},{\"name\":\"feedbacks\",\"kind\":\"object\",\"type\":\"Feedback\",\"relationName\":\"FeedbackToUser\"},{\"name\":\"pageViews\",\"kind\":\"object\",\"type\":\"PageView\",\"relationName\":\"PageViewToUser\"},{\"name\":\"sessions\",\"kind\":\"object\",\"type\":\"Session\",\"relationName\":\"SessionToUser\"},{\"name\":\"workflowLogs\",\"kind\":\"object\",\"type\":\"WorkflowLog\",\"relationName\":\"UserToWorkflowLog\"},{\"name\":\"verificationTokens\",\"kind\":\"object\",\"type\":\"VerificationToken\",\"relationName\":\"UserToVerificationToken\"},{\"name\":\"passwordResetTokens\",\"kind\":\"object\",\"type\":\"PasswordResetToken\",\"relationName\":\"PasswordResetTokenToUser\"}],\"dbName\":null},\"UserApprovalRequest\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"ApprovalStatus\"},{\"name\":\"submittedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"reviewedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"reviewedBy\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"UserToUserApprovalRequest\"}],\"dbName\":null},\"Conversation\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isShareable\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"shareUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sharedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"summary\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"messagesSinceLastSummary\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"answers\",\"kind\":\"object\",\"type\":\"Answer\",\"relationName\":\"AnswerToConversation\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"ConversationToUser\"},{\"name\":\"workflowLogs\",\"kind\":\"object\",\"type\":\"WorkflowLog\",\"relationName\":\"ConversationToWorkflowLog\"}],\"dbName\":null},\"Answer\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"conversationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"messageId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"enum\",\"type\":\"Role\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"question\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"answer\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"evaluation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isWelcome\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"processingTime\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"conversation\",\"kind\":\"object\",\"type\":\"Conversation\",\"relationName\":\"AnswerToConversation\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"AnswerToUser\"},{\"name\":\"feedback\",\"kind\":\"object\",\"type\":\"Feedback\",\"relationName\":\"AnswerToFeedback\"},{\"name\":\"references\",\"kind\":\"object\",\"type\":\"Reference\",\"relationName\":\"AnswerToReference\"},{\"name\":\"metrics\",\"kind\":\"object\",\"type\":\"AnswerMetrics\",\"relationName\":\"AnswerToAnswerMetrics\"},{\"name\":\"WorkflowLog\",\"kind\":\"object\",\"type\":\"WorkflowLog\",\"relationName\":\"AnswerToWorkflowLog\"}],\"dbName\":null},\"AnswerMetrics\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"answerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"apiCost\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"aiCost\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"ragCost\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"apiCalls\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"aiCalls\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"ragCalls\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"apiDuration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"aiProvider\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"aiModel\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"aiProvidersUsed\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"aiModelsUsed\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"answer\",\"kind\":\"object\",\"type\":\"Answer\",\"relationName\":\"AnswerToAnswerMetrics\"}],\"dbName\":null},\"Feedback\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"answerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rating\",\"kind\":\"enum\",\"type\":\"FeedbackRating\"},{\"name\":\"feedbackTypes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"customFeedback\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"messageContent\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"answer\",\"kind\":\"object\",\"type\":\"Answer\",\"relationName\":\"AnswerToFeedback\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"FeedbackToUser\"}],\"dbName\":null},\"Reference\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"answerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"ReferenceType\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reference\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"summary\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"uuid\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"relevance\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"citationNumber\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"answer\",\"kind\":\"object\",\"type\":\"Answer\",\"relationName\":\"AnswerToReference\"}],\"dbName\":null},\"PageView\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sessionId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"page\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"path\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referrer\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userAgent\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"deviceType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"browser\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"os\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"screenSize\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"language\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timeOnPage\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"isBounce\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"session\",\"kind\":\"object\",\"type\":\"Session\",\"relationName\":\"PageViewToSession\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"PageViewToUser\"}],\"dbName\":null},\"Session\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sessionId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"startedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"endedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"pageViews\",\"kind\":\"object\",\"type\":\"PageView\",\"relationName\":\"PageViewToSession\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"SessionToUser\"},{\"name\":\"workflowLogs\",\"kind\":\"object\",\"type\":\"WorkflowLog\",\"relationName\":\"SessionToWorkflowLog\"}],\"dbName\":null},\"AdminActionLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"targetUserId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"adminEmail\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"details\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"WorkflowLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"conversationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"messageId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sessionId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"startedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"completedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"WorkflowStatus\"},{\"name\":\"totalDuration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"error\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"steps\",\"kind\":\"object\",\"type\":\"WorkflowStep\",\"relationName\":\"WorkflowLogToWorkflowStep\"},{\"name\":\"conversation\",\"kind\":\"object\",\"type\":\"Conversation\",\"relationName\":\"ConversationToWorkflowLog\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"UserToWorkflowLog\"},{\"name\":\"session\",\"kind\":\"object\",\"type\":\"Session\",\"relationName\":\"SessionToWorkflowLog\"},{\"name\":\"answer\",\"kind\":\"object\",\"type\":\"Answer\",\"relationName\":\"AnswerToWorkflowLog\"}],\"dbName\":null},\"WorkflowStep\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"workflowId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stepName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stepType\",\"kind\":\"enum\",\"type\":\"StepType\"},{\"name\":\"startedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"completedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"duration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"StepStatus\"},{\"name\":\"inputData\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"outputData\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"error\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"workflow\",\"kind\":\"object\",\"type\":\"WorkflowLog\",\"relationName\":\"WorkflowLogToWorkflowStep\"}],\"dbName\":null},\"VerificationToken\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expires\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"UserToVerificationToken\"}],\"dbName\":null},\"PasswordResetToken\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expires\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"PasswordResetTokenToUser\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
453
+ defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
454
+ config.engineWasm = {
455
+ getRuntime: async () => require('./query_engine_bg.js'),
456
+ getQueryEngineWasmModule: async () => {
457
+ const loader = (await import('#wasm-engine-loader')).default
458
+ const engine = (await loader).default
459
+ return engine
428
460
  }
429
461
  }
462
+ config.compilerWasm = undefined
430
463
 
431
- exports.PrismaClient = PrismaClient
464
+ config.injectableEdgeEnv = () => ({
465
+ parsed: {
466
+ POSTGRES_PRISMA_URL: typeof globalThis !== 'undefined' && globalThis['POSTGRES_PRISMA_URL'] || typeof process !== 'undefined' && process.env && process.env.POSTGRES_PRISMA_URL || undefined
467
+ }
468
+ })
469
+
470
+ if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) {
471
+ Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined)
472
+ }
432
473
 
474
+ const PrismaClient = getPrismaClient(config)
475
+ exports.PrismaClient = PrismaClient
433
476
  Object.assign(exports, Prisma)
477
+
@@ -1,4 +1,4 @@
1
1
 
2
2
  /* !!! This is code generated by Prisma. Do not edit directly. !!!
3
3
  /* eslint-disable */
4
- module.exports = { ...require('.') }
4
+ module.exports = { ...require('#main-entry-point') }
@@ -35,12 +35,12 @@ exports.Prisma = Prisma
35
35
  exports.$Enums = {}
36
36
 
37
37
  /**
38
- * Prisma Client JS version: 6.15.0
39
- * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb
38
+ * Prisma Client JS version: 6.17.0
39
+ * Query Engine version: c0aafc03b8ef6cdced8654b9a817999e02457d6a
40
40
  */
41
41
  Prisma.prismaVersion = {
42
- client: "6.15.0",
43
- engine: "85179d7826409ee107a6ba334b5e305ae3fba9fb"
42
+ client: "6.17.0",
43
+ engine: "c0aafc03b8ef6cdced8654b9a817999e02457d6a"
44
44
  }
45
45
 
46
46
  Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
@@ -199,6 +199,10 @@ const config = {
199
199
  "fromEnvVar": null,
200
200
  "value": "darwin-arm64",
201
201
  "native": true
202
+ },
203
+ {
204
+ "fromEnvVar": null,
205
+ "value": "linux-musl-openssl-3.0.x"
202
206
  }
203
207
  ],
204
208
  "previewFeatures": [],
@@ -210,8 +214,8 @@ const config = {
210
214
  "schemaEnvPath": "../../../.env"
211
215
  },
212
216
  "relativePath": "../..",
213
- "clientVersion": "6.15.0",
214
- "engineVersion": "85179d7826409ee107a6ba334b5e305ae3fba9fb",
217
+ "clientVersion": "6.17.0",
218
+ "engineVersion": "c0aafc03b8ef6cdced8654b9a817999e02457d6a",
215
219
  "datasourceNames": [
216
220
  "db"
217
221
  ],
@@ -225,8 +229,8 @@ const config = {
225
229
  }
226
230
  }
227
231
  },
228
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"./generated/law\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"POSTGRES_PRISMA_URL_LAW\")\n directUrl = env(\"POSTGRES_URL_NON_POOLING_LAW\")\n schemas = [\"public\"]\n}\n\n/// Existing public tables (read-only recommended). Validate nullability via introspection.\nmodel LawVersion {\n id String @id\n lawId String? @map(\"lawid\")\n lawName String? @map(\"lawname\")\n versionNumber String? @map(\"versionnumber\")\n lawUrl String? @map(\"lawurl\")\n isLawVersionEffective Boolean? @map(\"islawversioneffective\")\n isAmendment Boolean? @map(\"isamendment\")\n fullLawId String? @map(\"fulllawid\")\n approvalDate DateTime? @map(\"approvaldate\")\n publicationDate DateTime? @map(\"publicationdate\")\n effectiveFrom DateTime? @map(\"effectivefrom\")\n effectiveUntil DateTime? @map(\"effectiveuntil\")\n author String?\n fullLawHtml String? @map(\"fulllawhtml\")\n fullLaw String? @map(\"fulllaw\")\n legalAreas Json? @map(\"legalareas\")\n publishedIn Json? @map(\"publishedin\")\n relationships Json? @map(\"relationships\")\n\n attachments LawAttachment[]\n paragraphs VersionParagraph[]\n\n @@map(\"law_versions\")\n @@schema(\"public\")\n}\n\nmodel LawAttachment {\n id Int @id\n name String?\n attachmentId String? @map(\"attachmentid\")\n content String?\n lawVersionId String @map(\"lawversionid\")\n\n lawVersion LawVersion @relation(fields: [lawVersionId], references: [id])\n\n @@map(\"law_attachments\")\n @@schema(\"public\")\n}\n\nmodel VersionParagraph {\n id Int @id\n paragraphId String? @map(\"paragraph_id\")\n versionId String @map(\"version_id\")\n sequenceNumber Int? @map(\"sequence_number\")\n text String?\n fullText String? @map(\"full_text\")\n fullTextWithCitations String? @map(\"full_text_with_citations\")\n embedding Json?\n partId String? @map(\"part_id\")\n partName String? @map(\"part_name\")\n chapterId String? @map(\"chapter_id\")\n chapterName String? @map(\"chapter_name\")\n divisionId String? @map(\"division_id\")\n divisionName String? @map(\"division_name\")\n sectionId String? @map(\"section_id\")\n sectionName String? @map(\"section_name\")\n paragraphPath String? @map(\"paragraph_path\")\n paragraphGroupName String? @map(\"paragraph_group_name\")\n isAmendment Boolean? @map(\"is_amendment\")\n validFrom DateTime? @map(\"valid_from\")\n validTo DateTime? @map(\"valid_to\")\n\n lawVersion LawVersion @relation(fields: [versionId], references: [id])\n\n @@map(\"version_paragraphs\")\n @@schema(\"public\")\n}\n",
229
- "inlineSchemaHash": "6f22eba3fd4358c762e273f641c17cc5429a0f72af01ecce52b31cd52befa8cf",
232
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"./generated/law\"\n binaryTargets = [\"native\", \"linux-musl-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"POSTGRES_PRISMA_URL_LAW\")\n directUrl = env(\"POSTGRES_URL_NON_POOLING_LAW\")\n schemas = [\"public\"]\n}\n\n/// Existing public tables (read-only recommended). Validate nullability via introspection.\nmodel LawVersion {\n id String @id\n lawId String? @map(\"lawid\")\n lawName String? @map(\"lawname\")\n versionNumber String? @map(\"versionnumber\")\n lawUrl String? @map(\"lawurl\")\n isLawVersionEffective Boolean? @map(\"islawversioneffective\")\n isAmendment Boolean? @map(\"isamendment\")\n fullLawId String? @map(\"fulllawid\")\n approvalDate DateTime? @map(\"approvaldate\")\n publicationDate DateTime? @map(\"publicationdate\")\n effectiveFrom DateTime? @map(\"effectivefrom\")\n effectiveUntil DateTime? @map(\"effectiveuntil\")\n author String?\n fullLawHtml String? @map(\"fulllawhtml\")\n fullLaw String? @map(\"fulllaw\")\n legalAreas Json? @map(\"legalareas\")\n publishedIn Json? @map(\"publishedin\")\n relationships Json? @map(\"relationships\")\n\n attachments LawAttachment[]\n paragraphs VersionParagraph[]\n\n @@map(\"law_versions\")\n @@schema(\"public\")\n}\n\nmodel LawAttachment {\n id Int @id\n name String?\n attachmentId String? @map(\"attachmentid\")\n content String?\n lawVersionId String @map(\"lawversionid\")\n\n lawVersion LawVersion @relation(fields: [lawVersionId], references: [id])\n\n @@map(\"law_attachments\")\n @@schema(\"public\")\n}\n\nmodel VersionParagraph {\n id Int @id\n paragraphId String? @map(\"paragraph_id\")\n versionId String @map(\"version_id\")\n sequenceNumber Int? @map(\"sequence_number\")\n text String?\n fullText String? @map(\"full_text\")\n fullTextWithCitations String? @map(\"full_text_with_citations\")\n embedding Json?\n partId String? @map(\"part_id\")\n partName String? @map(\"part_name\")\n chapterId String? @map(\"chapter_id\")\n chapterName String? @map(\"chapter_name\")\n divisionId String? @map(\"division_id\")\n divisionName String? @map(\"division_name\")\n sectionId String? @map(\"section_id\")\n sectionName String? @map(\"section_name\")\n paragraphPath String? @map(\"paragraph_path\")\n paragraphGroupName String? @map(\"paragraph_group_name\")\n isAmendment Boolean? @map(\"is_amendment\")\n validFrom DateTime? @map(\"valid_from\")\n validTo DateTime? @map(\"valid_to\")\n\n lawVersion LawVersion @relation(fields: [versionId], references: [id])\n\n @@map(\"version_paragraphs\")\n @@schema(\"public\")\n}\n",
233
+ "inlineSchemaHash": "5e7978877ab7bde8da2bb99a15d195f0272bd753b7bfb2d9da6aa9007a9220cc",
230
234
  "copyEngine": true
231
235
  }
232
236
  config.dirname = '/'
@@ -20,12 +20,12 @@ exports.Prisma = Prisma
20
20
  exports.$Enums = {}
21
21
 
22
22
  /**
23
- * Prisma Client JS version: 6.15.0
24
- * Query Engine version: 85179d7826409ee107a6ba334b5e305ae3fba9fb
23
+ * Prisma Client JS version: 6.17.0
24
+ * Query Engine version: c0aafc03b8ef6cdced8654b9a817999e02457d6a
25
25
  */
26
26
  Prisma.prismaVersion = {
27
- client: "6.15.0",
28
- engine: "85179d7826409ee107a6ba334b5e305ae3fba9fb"
27
+ client: "6.17.0",
28
+ engine: "c0aafc03b8ef6cdced8654b9a817999e02457d6a"
29
29
  }
30
30
 
31
31
  Prisma.PrismaClientKnownRequestError = () => {