Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

prismaNamespace.ts

738 lines18.7 KB

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