auth-vir 1.3.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +27 -18
  2. package/dist/auth-client/backend-auth.client.d.ts +177 -0
  3. package/dist/auth-client/backend-auth.client.js +232 -0
  4. package/dist/auth-client/frontend-auth.client.d.ts +64 -0
  5. package/dist/auth-client/frontend-auth.client.js +107 -0
  6. package/dist/auth.d.ts +32 -46
  7. package/dist/auth.js +36 -36
  8. package/dist/cookie.d.ts +15 -4
  9. package/dist/cookie.js +16 -4
  10. package/dist/csrf-token.d.ts +113 -3
  11. package/dist/csrf-token.js +101 -5
  12. package/dist/generated/browser.d.ts +9 -0
  13. package/dist/generated/browser.js +16 -0
  14. package/dist/generated/client.d.ts +26 -0
  15. package/dist/generated/client.js +31 -0
  16. package/dist/generated/commonInputTypes.d.ts +122 -0
  17. package/dist/generated/commonInputTypes.js +1 -0
  18. package/dist/generated/enums.d.ts +1 -0
  19. package/dist/generated/enums.js +9 -0
  20. package/dist/generated/internal/class.d.ts +126 -0
  21. package/dist/generated/internal/class.js +84 -0
  22. package/dist/generated/internal/prismaNamespace.d.ts +544 -0
  23. package/dist/generated/internal/prismaNamespace.js +101 -0
  24. package/dist/generated/internal/prismaNamespaceBrowser.d.ts +75 -0
  25. package/dist/generated/internal/prismaNamespaceBrowser.js +69 -0
  26. package/dist/generated/models/User.d.ts +983 -0
  27. package/dist/generated/models/User.js +1 -0
  28. package/dist/generated/models.d.ts +2 -0
  29. package/dist/generated/models.js +1 -0
  30. package/dist/generated/shapes.gen.d.ts +8 -0
  31. package/dist/generated/shapes.gen.js +11 -0
  32. package/dist/headers.d.ts +20 -0
  33. package/dist/headers.js +33 -0
  34. package/dist/index.d.ts +2 -0
  35. package/dist/index.js +2 -0
  36. package/dist/jwt/jwt.d.ts +11 -2
  37. package/dist/jwt/jwt.js +14 -3
  38. package/dist/jwt/user-jwt.d.ts +8 -8
  39. package/dist/jwt/user-jwt.js +12 -9
  40. package/package.json +12 -7
  41. package/src/auth-client/backend-auth.client.ts +500 -0
  42. package/src/auth-client/frontend-auth.client.ts +182 -0
  43. package/src/auth.ts +99 -77
  44. package/src/cookie.ts +20 -8
  45. package/src/csrf-token.ts +196 -5
  46. package/src/generated/browser.ts +23 -0
  47. package/src/generated/client.ts +47 -0
  48. package/src/generated/commonInputTypes.ts +147 -0
  49. package/src/generated/enums.ts +14 -0
  50. package/src/generated/internal/class.ts +236 -0
  51. package/src/generated/internal/prismaNamespace.ts +761 -0
  52. package/src/generated/internal/prismaNamespaceBrowser.ts +102 -0
  53. package/src/generated/models/User.ts +1135 -0
  54. package/src/generated/models.ts +11 -0
  55. package/src/generated/shapes.gen.ts +15 -0
  56. package/src/headers.ts +35 -0
  57. package/src/index.ts +2 -0
  58. package/src/jwt/jwt.ts +34 -5
  59. package/src/jwt/user-jwt.ts +21 -12
@@ -0,0 +1,761 @@
1
+ // @ts-nocheck
2
+ import {type UtcIsoString} from 'date-vir';
3
+
4
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
5
+ /* eslint-disable */
6
+ /*
7
+ * WARNING: This is an internal file that is subject to change!
8
+ *
9
+ * 🛑 Under no circumstances should you import this file directly! 🛑
10
+ *
11
+ * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file.
12
+ * While this enables partial backward compatibility, it is not part of the stable public API.
13
+ *
14
+ * If you are looking for your Models, Enums, and Input Types, please import them from the respective
15
+ * model files in the `model` directory!
16
+ */
17
+
18
+ import * as runtime from "@prisma/client/runtime/client"
19
+ import type * as Prisma from "../models.js"
20
+ import { type PrismaClient } from "./class.js"
21
+
22
+ export type * from '../models.js'
23
+
24
+ export type DMMF = typeof runtime.DMMF
25
+
26
+ export type PrismaPromise<T> = runtime.Types.Public.PrismaPromise<T>
27
+
28
+ /**
29
+ * Prisma Errors
30
+ */
31
+
32
+ export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
33
+ export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
34
+
35
+ export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
36
+ export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
37
+
38
+ export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
39
+ export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
40
+
41
+ export const PrismaClientInitializationError = runtime.PrismaClientInitializationError
42
+ export type PrismaClientInitializationError = runtime.PrismaClientInitializationError
43
+
44
+ export const PrismaClientValidationError = runtime.PrismaClientValidationError
45
+ export type PrismaClientValidationError = runtime.PrismaClientValidationError
46
+
47
+ /**
48
+ * Re-export of sql-template-tag
49
+ */
50
+ export const sql = runtime.sqltag
51
+ export const empty = runtime.empty
52
+ export const join = runtime.join
53
+ export const raw = runtime.raw
54
+ export const Sql = runtime.Sql
55
+ export type Sql = runtime.Sql
56
+
57
+
58
+ /**
59
+ * Prisma.skip
60
+ */
61
+ export const skip = runtime.skip
62
+
63
+
64
+ /**
65
+ * Decimal.js
66
+ */
67
+ export const Decimal = runtime.Decimal
68
+ export type Decimal = runtime.Decimal
69
+
70
+ export type DecimalJsLike = runtime.DecimalJsLike
71
+
72
+ /**
73
+ * Metrics
74
+ */
75
+ export type Metrics = runtime.Metrics
76
+ export type Metric<T> = runtime.Metric<T>
77
+ export type MetricHistogram = runtime.MetricHistogram
78
+ export type MetricHistogramBucket = runtime.MetricHistogramBucket
79
+
80
+ /**
81
+ * Extensions
82
+ */
83
+ export type Extension = runtime.Types.Extensions.UserArgs
84
+ export const getExtensionContext = runtime.Extensions.getExtensionContext
85
+ export type Args<T, F extends runtime.Operation> = runtime.Types.Public.Args<T, F>
86
+ export type Payload<T, F extends runtime.Operation = never> = runtime.Types.Public.Payload<T, F>
87
+ export type Result<T, A, F extends runtime.Operation> = runtime.Types.Public.Result<T, A, F>
88
+ export type Exact<A, W> = runtime.Types.Public.Exact<A, W>
89
+
90
+ export type PrismaVersion = {
91
+ client: string
92
+ engine: string
93
+ }
94
+
95
+ /**
96
+ * Prisma Client JS version: 6.17.1
97
+ * Query Engine version: 272a37d34178c2894197e17273bf937f25acdeac
98
+ */
99
+ export const prismaVersion: PrismaVersion = {
100
+ client: "6.17.1",
101
+ engine: "272a37d34178c2894197e17273bf937f25acdeac"
102
+ }
103
+
104
+ /**
105
+ * Utility Types
106
+ */
107
+
108
+ export type JsonObject = runtime.JsonObject
109
+ export type JsonArray = runtime.JsonArray
110
+ export type JsonValue = runtime.JsonValue
111
+ export type InputJsonObject = runtime.InputJsonObject
112
+ export type InputJsonArray = runtime.InputJsonArray
113
+ export type InputJsonValue = runtime.InputJsonValue
114
+
115
+
116
+ export const NullTypes = {
117
+ DbNull: runtime.objectEnumValues.classes.DbNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull),
118
+ JsonNull: runtime.objectEnumValues.classes.JsonNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull),
119
+ AnyNull: runtime.objectEnumValues.classes.AnyNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull),
120
+ }
121
+ /**
122
+ * Helper for filtering JSON entries that have `null` on the database (empty on the db)
123
+ *
124
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
125
+ */
126
+ export const DbNull = runtime.objectEnumValues.instances.DbNull
127
+ /**
128
+ * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
129
+ *
130
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
131
+ */
132
+ export const JsonNull = runtime.objectEnumValues.instances.JsonNull
133
+ /**
134
+ * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
135
+ *
136
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
137
+ */
138
+ export const AnyNull = runtime.objectEnumValues.instances.AnyNull
139
+
140
+
141
+ type SelectAndInclude = {
142
+ select: any
143
+ include: any
144
+ }
145
+
146
+ type SelectAndOmit = {
147
+ select: any
148
+ omit: any
149
+ }
150
+
151
+ /**
152
+ * From T, pick a set of properties whose keys are in the union K
153
+ */
154
+ type Prisma__Pick<T, K extends keyof T> = {
155
+ [P in K]: T[P];
156
+ };
157
+
158
+ export type Enumerable<T> = T | Array<T>;
159
+
160
+ /**
161
+ * Subset
162
+ * @desc From `T` pick properties that exist in `U`. Simple version of Intersection
163
+ */
164
+ export type Subset<T, U> = {
165
+ [key in keyof T]: key extends keyof U ? T[key] : never;
166
+ };
167
+
168
+ /**
169
+ * SelectSubset
170
+ * @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
171
+ * Additionally, it validates, if both select and include are present. If the case, it errors.
172
+ */
173
+ export type SelectSubset<T, U> = {
174
+ [key in keyof T]: key extends keyof U ? T[key] : never
175
+ } &
176
+ (T extends SelectAndInclude
177
+ ? 'Please either choose `select` or `include`.'
178
+ : T extends SelectAndOmit
179
+ ? 'Please either choose `select` or `omit`.'
180
+ : {})
181
+
182
+ /**
183
+ * Subset + Intersection
184
+ * @desc From `T` pick properties that exist in `U` and intersect `K`
185
+ */
186
+ export type SubsetIntersection<T, U, K> = {
187
+ [key in keyof T]: key extends keyof U ? T[key] : never
188
+ } &
189
+ K
190
+
191
+ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
192
+
193
+ /**
194
+ * XOR is needed to have a real mutually exclusive union type
195
+ * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
196
+ */
197
+ export type XOR<T, U> =
198
+ T extends object ?
199
+ U extends object ?
200
+ (Without<T, U> & U) | (Without<U, T> & T)
201
+ : U : T
202
+
203
+
204
+ /**
205
+ * Is T a Record?
206
+ */
207
+ type IsObject<T extends any> = T extends Array<any>
208
+ ? False
209
+ : T extends UtcIsoString
210
+ ? False
211
+ : T extends Uint8Array
212
+ ? False
213
+ : T extends BigInt
214
+ ? False
215
+ : T extends object
216
+ ? True
217
+ : False
218
+
219
+
220
+ /**
221
+ * If it's T[], return T
222
+ */
223
+ export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T
224
+
225
+ /**
226
+ * From ts-toolbelt
227
+ */
228
+
229
+ type __Either<O extends object, K extends Key> = Omit<O, K> &
230
+ {
231
+ // Merge all but K
232
+ [P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
233
+ }[K]
234
+
235
+ type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>
236
+
237
+ type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>
238
+
239
+ type _Either<
240
+ O extends object,
241
+ K extends Key,
242
+ strict extends Boolean
243
+ > = {
244
+ 1: EitherStrict<O, K>
245
+ 0: EitherLoose<O, K>
246
+ }[strict]
247
+
248
+ export type Either<
249
+ O extends object,
250
+ K extends Key,
251
+ strict extends Boolean = 1
252
+ > = O extends unknown ? _Either<O, K, strict> : never
253
+
254
+ export type Union = any
255
+
256
+ export type PatchUndefined<O extends object, O1 extends object> = {
257
+ [K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
258
+ } & {}
259
+
260
+ /** Helper Types for "Merge" **/
261
+ export type IntersectOf<U extends Union> = (
262
+ U extends unknown ? (k: U) => void : never
263
+ ) extends (k: infer I) => void
264
+ ? I
265
+ : never
266
+
267
+ export type Overwrite<O extends object, O1 extends object> = {
268
+ [K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
269
+ } & {};
270
+
271
+ type _Merge<U extends object> = IntersectOf<Overwrite<U, {
272
+ [K in keyof U]-?: At<U, K>;
273
+ }>>;
274
+
275
+ type Key = string | number | symbol;
276
+ type AtStrict<O extends object, K extends Key> = O[K & keyof O];
277
+ type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
278
+ export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
279
+ 1: AtStrict<O, K>;
280
+ 0: AtLoose<O, K>;
281
+ }[strict];
282
+
283
+ export type ComputeRaw<A extends any> = A extends Function ? A : {
284
+ [K in keyof A]: A[K];
285
+ } & {};
286
+
287
+ export type OptionalFlat<O> = {
288
+ [K in keyof O]?: O[K];
289
+ } & {};
290
+
291
+ type _Record<K extends keyof any, T> = {
292
+ [P in K]: T;
293
+ };
294
+
295
+ // cause typescript not to expand types and preserve names
296
+ type NoExpand<T> = T extends unknown ? T : never;
297
+
298
+ // this type assumes the passed object is entirely optional
299
+ export type AtLeast<O extends object, K extends string> = NoExpand<
300
+ O extends unknown
301
+ ? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
302
+ | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O
303
+ : never>;
304
+
305
+ type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;
306
+
307
+ export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
308
+ /** End Helper Types for "Merge" **/
309
+
310
+ export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;
311
+
312
+ export type Boolean = True | False
313
+
314
+ export type True = 1
315
+
316
+ export type False = 0
317
+
318
+ export type Not<B extends Boolean> = {
319
+ 0: 1
320
+ 1: 0
321
+ }[B]
322
+
323
+ export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
324
+ ? 0 // anything `never` is false
325
+ : A1 extends A2
326
+ ? 1
327
+ : 0
328
+
329
+ export type Has<U extends Union, U1 extends Union> = Not<
330
+ Extends<Exclude<U1, U>, U1>
331
+ >
332
+
333
+ export type Or<B1 extends Boolean, B2 extends Boolean> = {
334
+ 0: {
335
+ 0: 0
336
+ 1: 1
337
+ }
338
+ 1: {
339
+ 0: 1
340
+ 1: 1
341
+ }
342
+ }[B1][B2]
343
+
344
+ export type Keys<U extends Union> = U extends unknown ? keyof U : never
345
+
346
+ export type GetScalarType<T, O> = O extends object ? {
347
+ [P in keyof T]: P extends keyof O
348
+ ? O[P]
349
+ : never
350
+ } : never
351
+
352
+ type FieldPaths<
353
+ T,
354
+ U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
355
+ > = IsObject<T> extends True ? U : T
356
+
357
+ export type GetHavingFields<T> = {
358
+ [K in keyof T]: Or<
359
+ Or<Extends<'OR', K>, Extends<'AND', K>>,
360
+ Extends<'NOT', K>
361
+ > extends True
362
+ ? // infer is only needed to not hit TS limit
363
+ // based on the brilliant idea of Pierre-Antoine Mills
364
+ // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
365
+ T[K] extends infer TK
366
+ ? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
367
+ : never
368
+ : {} extends FieldPaths<T[K]>
369
+ ? never
370
+ : K
371
+ }[keyof T]
372
+
373
+ /**
374
+ * Convert tuple to union
375
+ */
376
+ type _TupleToUnion<T> = T extends (infer E)[] ? E : never
377
+ type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
378
+ export type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T
379
+
380
+ /**
381
+ * Like `Pick`, but additionally can also accept an array of keys
382
+ */
383
+ export type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>
384
+
385
+ /**
386
+ * Exclude all keys with underscores
387
+ */
388
+ export type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T
389
+
390
+
391
+ export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>
392
+
393
+ type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>
394
+
395
+
396
+ export const ModelName = {
397
+ User: 'User'
398
+ } as const
399
+
400
+ export type ModelName = (typeof ModelName)[keyof typeof ModelName]
401
+
402
+
403
+
404
+ export interface TypeMapCb<GlobalOmitOptions = {}> extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record<string, any>> {
405
+ returns: TypeMap<this['params']['extArgs'], GlobalOmitOptions>
406
+ }
407
+
408
+ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> = {
409
+ globalOmitOptions: {
410
+ omit: GlobalOmitOptions
411
+ }
412
+ meta: {
413
+ modelProps: "user"
414
+ txIsolationLevel: TransactionIsolationLevel
415
+ }
416
+ model: {
417
+ User: {
418
+ payload: Prisma.$UserPayload<ExtArgs>
419
+ fields: Prisma.UserFieldRefs
420
+ operations: {
421
+ findUnique: {
422
+ args: Prisma.UserFindUniqueArgs<ExtArgs>
423
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload> | null
424
+ }
425
+ findUniqueOrThrow: {
426
+ args: Prisma.UserFindUniqueOrThrowArgs<ExtArgs>
427
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
428
+ }
429
+ findFirst: {
430
+ args: Prisma.UserFindFirstArgs<ExtArgs>
431
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload> | null
432
+ }
433
+ findFirstOrThrow: {
434
+ args: Prisma.UserFindFirstOrThrowArgs<ExtArgs>
435
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
436
+ }
437
+ findMany: {
438
+ args: Prisma.UserFindManyArgs<ExtArgs>
439
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>[]
440
+ }
441
+ create: {
442
+ args: Prisma.UserCreateArgs<ExtArgs>
443
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
444
+ }
445
+ createMany: {
446
+ args: Prisma.UserCreateManyArgs<ExtArgs>
447
+ result: BatchPayload
448
+ }
449
+ createManyAndReturn: {
450
+ args: Prisma.UserCreateManyAndReturnArgs<ExtArgs>
451
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>[]
452
+ }
453
+ delete: {
454
+ args: Prisma.UserDeleteArgs<ExtArgs>
455
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
456
+ }
457
+ update: {
458
+ args: Prisma.UserUpdateArgs<ExtArgs>
459
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
460
+ }
461
+ deleteMany: {
462
+ args: Prisma.UserDeleteManyArgs<ExtArgs>
463
+ result: BatchPayload
464
+ }
465
+ updateMany: {
466
+ args: Prisma.UserUpdateManyArgs<ExtArgs>
467
+ result: BatchPayload
468
+ }
469
+ updateManyAndReturn: {
470
+ args: Prisma.UserUpdateManyAndReturnArgs<ExtArgs>
471
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>[]
472
+ }
473
+ upsert: {
474
+ args: Prisma.UserUpsertArgs<ExtArgs>
475
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
476
+ }
477
+ aggregate: {
478
+ args: Prisma.UserAggregateArgs<ExtArgs>
479
+ result: runtime.Types.Utils.Optional<Prisma.AggregateUser>
480
+ }
481
+ groupBy: {
482
+ args: Prisma.UserGroupByArgs<ExtArgs>
483
+ result: runtime.Types.Utils.Optional<Prisma.UserGroupByOutputType>[]
484
+ }
485
+ count: {
486
+ args: Prisma.UserCountArgs<ExtArgs>
487
+ result: runtime.Types.Utils.Optional<Prisma.UserCountAggregateOutputType> | number
488
+ }
489
+ }
490
+ }
491
+ }
492
+ } & {
493
+ other: {
494
+ payload: any
495
+ operations: {
496
+ $executeRaw: {
497
+ args: [query: TemplateStringsArray | Sql, ...values: any[]],
498
+ result: any
499
+ }
500
+ $executeRawUnsafe: {
501
+ args: [query: string, ...values: any[]],
502
+ result: any
503
+ }
504
+ $queryRaw: {
505
+ args: [query: TemplateStringsArray | Sql, ...values: any[]],
506
+ result: any
507
+ }
508
+ $queryRawUnsafe: {
509
+ args: [query: string, ...values: any[]],
510
+ result: any
511
+ }
512
+ }
513
+ }
514
+ }
515
+
516
+ /**
517
+ * Enums
518
+ */
519
+
520
+ export const TransactionIsolationLevel = runtime.makeStrictEnum({
521
+ ReadUncommitted: 'ReadUncommitted',
522
+ ReadCommitted: 'ReadCommitted',
523
+ RepeatableRead: 'RepeatableRead',
524
+ Serializable: 'Serializable'
525
+ } as const)
526
+
527
+ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
528
+
529
+
530
+ export const UserScalarFieldEnum = {
531
+ id: 'id',
532
+ createdAt: 'createdAt',
533
+ updatedAt: 'updatedAt',
534
+ name: 'name'
535
+ } as const
536
+
537
+ export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
538
+
539
+
540
+ export const RelationLoadStrategy = {
541
+ query: 'query',
542
+ join: 'join'
543
+ } as const
544
+
545
+ export type RelationLoadStrategy = (typeof RelationLoadStrategy)[keyof typeof RelationLoadStrategy]
546
+
547
+
548
+ export const SortOrder = {
549
+ asc: 'asc',
550
+ desc: 'desc'
551
+ } as const
552
+
553
+ export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
554
+
555
+
556
+ export const QueryMode = {
557
+ default: 'default',
558
+ insensitive: 'insensitive'
559
+ } as const
560
+
561
+ export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
562
+
563
+
564
+
565
+ /**
566
+ * Field references
567
+ */
568
+
569
+
570
+ /**
571
+ * Reference to a field of type 'String'
572
+ */
573
+ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
574
+
575
+
576
+
577
+ /**
578
+ * Reference to a field of type 'String[]'
579
+ */
580
+ export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'>
581
+
582
+
583
+
584
+ /**
585
+ * Reference to a field of type 'DateTime'
586
+ */
587
+ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
588
+
589
+
590
+
591
+ /**
592
+ * Reference to a field of type 'DateTime[]'
593
+ */
594
+ export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'>
595
+
596
+
597
+
598
+ /**
599
+ * Reference to a field of type 'Int'
600
+ */
601
+ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
602
+
603
+
604
+
605
+ /**
606
+ * Reference to a field of type 'Int[]'
607
+ */
608
+ export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
609
+
610
+
611
+ /**
612
+ * Batch Payload for updateMany & deleteMany & createMany
613
+ */
614
+ export type BatchPayload = {
615
+ count: number
616
+ }
617
+
618
+
619
+ export type Datasource = {
620
+ url?: string
621
+ }
622
+ export type Datasources = {
623
+ db?: Datasource
624
+ }
625
+
626
+ export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs>
627
+ export type DefaultPrismaClient = PrismaClient
628
+ export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
629
+ export interface PrismaClientOptions {
630
+ /**
631
+ * Overwrites the datasource url from your schema.prisma file
632
+ */
633
+ datasources?: Datasources
634
+ /**
635
+ * Overwrites the datasource url from your schema.prisma file
636
+ */
637
+ datasourceUrl?: string
638
+ /**
639
+ * @default "colorless"
640
+ */
641
+ errorFormat?: ErrorFormat
642
+ /**
643
+ * @example
644
+ * ```
645
+ * // Shorthand for `emit: 'stdout'`
646
+ * log: ['query', 'info', 'warn', 'error']
647
+ *
648
+ * // Emit as events only
649
+ * log: [
650
+ * { emit: 'event', level: 'query' },
651
+ * { emit: 'event', level: 'info' },
652
+ * { emit: 'event', level: 'warn' }
653
+ * { emit: 'event', level: 'error' }
654
+ * ]
655
+ *
656
+ * / Emit as events and log to stdout
657
+ * og: [
658
+ * { emit: 'stdout', level: 'query' },
659
+ * { emit: 'stdout', level: 'info' },
660
+ * { emit: 'stdout', level: 'warn' }
661
+ * { emit: 'stdout', level: 'error' }
662
+ *
663
+ * ```
664
+ * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
665
+ */
666
+ log?: (LogLevel | LogDefinition)[]
667
+ /**
668
+ * The default values for transactionOptions
669
+ * maxWait ?= 2000
670
+ * timeout ?= 5000
671
+ */
672
+ transactionOptions?: {
673
+ maxWait?: number
674
+ timeout?: number
675
+ isolationLevel?: TransactionIsolationLevel
676
+ }
677
+ /**
678
+ * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`
679
+ */
680
+ adapter?: runtime.SqlDriverAdapterFactory | null
681
+ /**
682
+ * Global configuration for omitting model fields by default.
683
+ *
684
+ * @example
685
+ * ```
686
+ * const prisma = new PrismaClient({
687
+ * omit: {
688
+ * user: {
689
+ * password: true
690
+ * }
691
+ * }
692
+ * })
693
+ * ```
694
+ */
695
+ omit?: GlobalOmitConfig
696
+ }
697
+ export type GlobalOmitConfig = {
698
+ user?: Prisma.UserOmit
699
+ }
700
+
701
+ /* Types for Logging */
702
+ export type LogLevel = 'info' | 'query' | 'warn' | 'error'
703
+ export type LogDefinition = {
704
+ level: LogLevel
705
+ emit: 'stdout' | 'event'
706
+ }
707
+
708
+ export type CheckIsLogLevel<T> = T extends LogLevel ? T : never;
709
+
710
+ export type GetLogType<T> = CheckIsLogLevel<
711
+ T extends LogDefinition ? T['level'] : T
712
+ >;
713
+
714
+ export type GetEvents<T extends any[]> = T extends Array<LogLevel | LogDefinition>
715
+ ? GetLogType<T[number]>
716
+ : never;
717
+
718
+ export type QueryEvent = {
719
+ timestamp: UtcIsoString
720
+ query: string
721
+ params: string
722
+ duration: number
723
+ target: string
724
+ }
725
+
726
+ export type LogEvent = {
727
+ timestamp: UtcIsoString
728
+ message: string
729
+ target: string
730
+ }
731
+ /* End Types for Logging */
732
+
733
+
734
+ export type PrismaAction =
735
+ | 'findUnique'
736
+ | 'findUniqueOrThrow'
737
+ | 'findMany'
738
+ | 'findFirst'
739
+ | 'findFirstOrThrow'
740
+ | 'create'
741
+ | 'createMany'
742
+ | 'createManyAndReturn'
743
+ | 'update'
744
+ | 'updateMany'
745
+ | 'updateManyAndReturn'
746
+ | 'upsert'
747
+ | 'delete'
748
+ | 'deleteMany'
749
+ | 'executeRaw'
750
+ | 'queryRaw'
751
+ | 'aggregate'
752
+ | 'count'
753
+ | 'runCommandRaw'
754
+ | 'findRaw'
755
+ | 'groupBy'
756
+
757
+ /**
758
+ * `PrismaClient` proxy available in interactive transactions.
759
+ */
760
+ export type TransactionClient = Omit<DefaultPrismaClient, runtime.ITXClientDenyList>
761
+