/** * Client **/ import * as runtime from '@prisma/client/runtime/library.js'; import $Types = runtime.Types // general types import $Public = runtime.Types.Public import $Utils = runtime.Types.Utils import $Extensions = runtime.Types.Extensions import $Result = runtime.Types.Result export type PrismaPromise = $Public.PrismaPromise /** * Model User * */ export type User = $Result.DefaultSelection /** * Model Question * */ export type Question = $Result.DefaultSelection /** * Model GameSession * */ export type GameSession = $Result.DefaultSelection /** * Model UserAnswer * */ export type UserAnswer = $Result.DefaultSelection /** * Model LeaderboardEntry * */ export type LeaderboardEntry = $Result.DefaultSelection /** * Model MatchResult * */ export type MatchResult = $Result.DefaultSelection /** * Enums */ export namespace $Enums { export const Grade: { G3: 'G3', G6: 'G6', G9: 'G9' }; export type Grade = (typeof Grade)[keyof typeof Grade] export const Subject: { MATH: 'MATH', READING: 'READING', WRITING: 'WRITING' }; export type Subject = (typeof Subject)[keyof typeof Subject] export const Difficulty: { EASY: 'EASY', MEDIUM: 'MEDIUM', HARD: 'HARD' }; export type Difficulty = (typeof Difficulty)[keyof typeof Difficulty] export const SessionStatus: { IN_PROGRESS: 'IN_PROGRESS', COMPLETED: 'COMPLETED', ABANDONED: 'ABANDONED' }; export type SessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus] } export type Grade = $Enums.Grade export const Grade: typeof $Enums.Grade export type Subject = $Enums.Subject export const Subject: typeof $Enums.Subject export type Difficulty = $Enums.Difficulty export const Difficulty: typeof $Enums.Difficulty export type SessionStatus = $Enums.SessionStatus export const SessionStatus: typeof $Enums.SessionStatus /** * ## Prisma Client ʲˢ * * Type-safe database client for TypeScript & Node.js * @example * ``` * const prisma = new PrismaClient() * // Fetch zero or more Users * const users = await prisma.user.findMany() * ``` * * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ export class PrismaClient< ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs > { [K: symbol]: { types: Prisma.TypeMap['other'] } /** * ## Prisma Client ʲˢ * * Type-safe database client for TypeScript & Node.js * @example * ``` * const prisma = new PrismaClient() * // Fetch zero or more Users * const users = await prisma.user.findMany() * ``` * * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ constructor(optionsArg ?: Prisma.Subset); $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; /** * Connect with the database */ $connect(): $Utils.JsPromise; /** * Disconnect from the database */ $disconnect(): $Utils.JsPromise; /** * Add a middleware * @deprecated since 4.16.0. For new code, prefer client extensions instead. * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void /** * Executes a prepared raw query and returns the number of affected rows. * @example * ``` * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; /** * Executes a raw query and returns the number of affected rows. * Susceptible to SQL injections, see documentation. * @example * ``` * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; /** * Performs a prepared raw query and returns the `SELECT` data. * @example * ``` * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; /** * Performs a raw query and returns the `SELECT` data. * Susceptible to SQL injections, see documentation. * @example * ``` * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; /** * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. * @example * ``` * const [george, bob, alice] = await prisma.$transaction([ * prisma.user.create({ data: { name: 'George' } }), * prisma.user.create({ data: { name: 'Bob' } }), * prisma.user.create({ data: { name: 'Alice' } }), * ]) * ``` * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs> /** * `prisma.user`: Exposes CRUD operations for the **User** model. * Example usage: * ```ts * // Fetch zero or more Users * const users = await prisma.user.findMany() * ``` */ get user(): Prisma.UserDelegate; /** * `prisma.question`: Exposes CRUD operations for the **Question** model. * Example usage: * ```ts * // Fetch zero or more Questions * const questions = await prisma.question.findMany() * ``` */ get question(): Prisma.QuestionDelegate; /** * `prisma.gameSession`: Exposes CRUD operations for the **GameSession** model. * Example usage: * ```ts * // Fetch zero or more GameSessions * const gameSessions = await prisma.gameSession.findMany() * ``` */ get gameSession(): Prisma.GameSessionDelegate; /** * `prisma.userAnswer`: Exposes CRUD operations for the **UserAnswer** model. * Example usage: * ```ts * // Fetch zero or more UserAnswers * const userAnswers = await prisma.userAnswer.findMany() * ``` */ get userAnswer(): Prisma.UserAnswerDelegate; /** * `prisma.leaderboardEntry`: Exposes CRUD operations for the **LeaderboardEntry** model. * Example usage: * ```ts * // Fetch zero or more LeaderboardEntries * const leaderboardEntries = await prisma.leaderboardEntry.findMany() * ``` */ get leaderboardEntry(): Prisma.LeaderboardEntryDelegate; /** * `prisma.matchResult`: Exposes CRUD operations for the **MatchResult** model. * Example usage: * ```ts * // Fetch zero or more MatchResults * const matchResults = await prisma.matchResult.findMany() * ``` */ get matchResult(): Prisma.MatchResultDelegate; } export namespace Prisma { export import DMMF = runtime.DMMF export type PrismaPromise = $Public.PrismaPromise /** * Validator */ export import validator = runtime.Public.validator /** * Prisma Errors */ export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError export import PrismaClientInitializationError = runtime.PrismaClientInitializationError export import PrismaClientValidationError = runtime.PrismaClientValidationError export import NotFoundError = runtime.NotFoundError /** * Re-export of sql-template-tag */ export import sql = runtime.sqltag export import empty = runtime.empty export import join = runtime.join export import raw = runtime.raw export import Sql = runtime.Sql /** * Decimal.js */ export import Decimal = runtime.Decimal export type DecimalJsLike = runtime.DecimalJsLike /** * Metrics */ export type Metrics = runtime.Metrics export type Metric = runtime.Metric export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket /** * Extensions */ export import Extension = $Extensions.UserArgs export import getExtensionContext = runtime.Extensions.getExtensionContext export import Args = $Public.Args export import Payload = $Public.Payload export import Result = $Public.Result export import Exact = $Public.Exact /** * Prisma Client JS version: 5.22.0 * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 */ export type PrismaVersion = { client: string } export const prismaVersion: PrismaVersion /** * Utility Types */ export import JsonObject = runtime.JsonObject export import JsonArray = runtime.JsonArray export import JsonValue = runtime.JsonValue export import InputJsonObject = runtime.InputJsonObject export import InputJsonArray = runtime.InputJsonArray export import InputJsonValue = runtime.InputJsonValue /** * Types of the values used to represent different kinds of `null` values when working with JSON fields. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ namespace NullTypes { /** * Type of `Prisma.DbNull`. * * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class DbNull { private DbNull: never private constructor() } /** * Type of `Prisma.JsonNull`. * * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class JsonNull { private JsonNull: never private constructor() } /** * Type of `Prisma.AnyNull`. * * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class AnyNull { private AnyNull: never private constructor() } } /** * Helper for filtering JSON entries that have `null` on the database (empty on the db) * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const DbNull: NullTypes.DbNull /** * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const JsonNull: NullTypes.JsonNull /** * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const AnyNull: NullTypes.AnyNull type SelectAndInclude = { select: any include: any } type SelectAndOmit = { select: any omit: any } /** * Get the type of the value, that the Promise holds. */ export type PromiseType> = T extends PromiseLike ? U : T; /** * Get the return type of a function which returns a Promise. */ export type PromiseReturnType $Utils.JsPromise> = PromiseType> /** * From T, pick a set of properties whose keys are in the union K */ type Prisma__Pick = { [P in K]: T[P]; }; export type Enumerable = T | Array; export type RequiredKeys = { [K in keyof T]-?: {} extends Prisma__Pick ? never : K }[keyof T] export type TruthyKeys = keyof { [K in keyof T as T[K] extends false | undefined | null ? never : K]: K } export type TrueKeys = TruthyKeys>> /** * Subset * @desc From `T` pick properties that exist in `U`. Simple version of Intersection */ export type Subset = { [key in keyof T]: key extends keyof U ? T[key] : never; }; /** * SelectSubset * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. * Additionally, it validates, if both select and include are present. If the case, it errors. */ export type SelectSubset = { [key in keyof T]: key extends keyof U ? T[key] : never } & (T extends SelectAndInclude ? 'Please either choose `select` or `include`.' : T extends SelectAndOmit ? 'Please either choose `select` or `omit`.' : {}) /** * Subset + Intersection * @desc From `T` pick properties that exist in `U` and intersect `K` */ export type SubsetIntersection = { [key in keyof T]: key extends keyof U ? T[key] : never } & K type Without = { [P in Exclude]?: never }; /** * XOR is needed to have a real mutually exclusive union type * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types */ type XOR = T extends object ? U extends object ? (Without & U) | (Without & T) : U : T /** * Is T a Record? */ type IsObject = T extends Array ? False : T extends Date ? False : T extends Uint8Array ? False : T extends BigInt ? False : T extends object ? True : False /** * If it's T[], return T */ export type UnEnumerate = T extends Array ? U : T /** * From ts-toolbelt */ type __Either = Omit & { // Merge all but K [P in K]: Prisma__Pick // With K possibilities }[K] type EitherStrict = Strict<__Either> type EitherLoose = ComputeRaw<__Either> type _Either< O extends object, K extends Key, strict extends Boolean > = { 1: EitherStrict 0: EitherLoose }[strict] type Either< O extends object, K extends Key, strict extends Boolean = 1 > = O extends unknown ? _Either : never export type Union = any type PatchUndefined = { [K in keyof O]: O[K] extends undefined ? At : O[K] } & {} /** Helper Types for "Merge" **/ export type IntersectOf = ( U extends unknown ? (k: U) => void : never ) extends (k: infer I) => void ? I : never export type Overwrite = { [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; } & {}; type _Merge = IntersectOf; }>>; type Key = string | number | symbol; type AtBasic = K extends keyof O ? O[K] : never; type AtStrict = O[K & keyof O]; type AtLoose = O extends unknown ? AtStrict : never; export type At = { 1: AtStrict; 0: AtLoose; }[strict]; export type ComputeRaw = A extends Function ? A : { [K in keyof A]: A[K]; } & {}; export type OptionalFlat = { [K in keyof O]?: O[K]; } & {}; type _Record = { [P in K]: T; }; // cause typescript not to expand types and preserve names type NoExpand = T extends unknown ? T : never; // this type assumes the passed object is entirely optional type AtLeast = NoExpand< O extends unknown ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O : never>; type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; export type Strict = ComputeRaw<_Strict>; /** End Helper Types for "Merge" **/ export type Merge = ComputeRaw<_Merge>>; /** A [[Boolean]] */ export type Boolean = True | False // /** // 1 // */ export type True = 1 /** 0 */ export type False = 0 export type Not = { 0: 1 1: 0 }[B] export type Extends = [A1] extends [never] ? 0 // anything `never` is false : A1 extends A2 ? 1 : 0 export type Has = Not< Extends, U1> > export type Or = { 0: { 0: 0 1: 1 } 1: { 0: 1 1: 1 } }[B1][B2] export type Keys = U extends unknown ? keyof U : never type Cast = A extends B ? A : B; export const type: unique symbol; /** * Used by group by */ export type GetScalarType = O extends object ? { [P in keyof T]: P extends keyof O ? O[P] : never } : never type FieldPaths< T, U = Omit > = IsObject extends True ? U : T type GetHavingFields = { [K in keyof T]: Or< Or, Extends<'AND', K>>, Extends<'NOT', K> > extends True ? // infer is only needed to not hit TS limit // based on the brilliant idea of Pierre-Antoine Mills // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 T[K] extends infer TK ? GetHavingFields extends object ? Merge> : never> : never : {} extends FieldPaths ? never : K }[keyof T] /** * Convert tuple to union */ type _TupleToUnion = T extends (infer E)[] ? E : never type TupleToUnion = _TupleToUnion type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T /** * Like `Pick`, but additionally can also accept an array of keys */ type PickEnumerable | keyof T> = Prisma__Pick> /** * Exclude all keys with underscores */ type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T export type FieldRef = runtime.FieldRef type FieldRefInputType = Model extends never ? never : FieldRef export const ModelName: { User: 'User', Question: 'Question', GameSession: 'GameSession', UserAnswer: 'UserAnswer', LeaderboardEntry: 'LeaderboardEntry', MatchResult: 'MatchResult' }; export type ModelName = (typeof ModelName)[keyof typeof ModelName] export type Datasources = { db?: Datasource } interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { returns: Prisma.TypeMap } export type TypeMap = { meta: { modelProps: "user" | "question" | "gameSession" | "userAnswer" | "leaderboardEntry" | "matchResult" txIsolationLevel: Prisma.TransactionIsolationLevel } model: { User: { payload: Prisma.$UserPayload fields: Prisma.UserFieldRefs operations: { findUnique: { args: Prisma.UserFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.UserFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.UserFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.UserFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.UserFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.UserCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.UserCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.UserCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.UserDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.UserUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.UserDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.UserUpdateManyArgs result: BatchPayload } upsert: { args: Prisma.UserUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.UserAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.UserGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.UserCountArgs result: $Utils.Optional | number } } } Question: { payload: Prisma.$QuestionPayload fields: Prisma.QuestionFieldRefs operations: { findUnique: { args: Prisma.QuestionFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.QuestionFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.QuestionFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.QuestionFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.QuestionFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.QuestionCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.QuestionCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.QuestionCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.QuestionDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.QuestionUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.QuestionDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.QuestionUpdateManyArgs result: BatchPayload } upsert: { args: Prisma.QuestionUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.QuestionAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.QuestionGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.QuestionCountArgs result: $Utils.Optional | number } } } GameSession: { payload: Prisma.$GameSessionPayload fields: Prisma.GameSessionFieldRefs operations: { findUnique: { args: Prisma.GameSessionFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.GameSessionFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.GameSessionFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.GameSessionFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.GameSessionFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.GameSessionCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.GameSessionCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.GameSessionCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.GameSessionDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.GameSessionUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.GameSessionDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.GameSessionUpdateManyArgs result: BatchPayload } upsert: { args: Prisma.GameSessionUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.GameSessionAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.GameSessionGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.GameSessionCountArgs result: $Utils.Optional | number } } } UserAnswer: { payload: Prisma.$UserAnswerPayload fields: Prisma.UserAnswerFieldRefs operations: { findUnique: { args: Prisma.UserAnswerFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.UserAnswerFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.UserAnswerFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.UserAnswerFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.UserAnswerFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.UserAnswerCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.UserAnswerCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.UserAnswerCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.UserAnswerDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.UserAnswerUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.UserAnswerDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.UserAnswerUpdateManyArgs result: BatchPayload } upsert: { args: Prisma.UserAnswerUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.UserAnswerAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.UserAnswerGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.UserAnswerCountArgs result: $Utils.Optional | number } } } LeaderboardEntry: { payload: Prisma.$LeaderboardEntryPayload fields: Prisma.LeaderboardEntryFieldRefs operations: { findUnique: { args: Prisma.LeaderboardEntryFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.LeaderboardEntryFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.LeaderboardEntryFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.LeaderboardEntryFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.LeaderboardEntryFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.LeaderboardEntryCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.LeaderboardEntryCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.LeaderboardEntryCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.LeaderboardEntryDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.LeaderboardEntryUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.LeaderboardEntryDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.LeaderboardEntryUpdateManyArgs result: BatchPayload } upsert: { args: Prisma.LeaderboardEntryUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.LeaderboardEntryAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.LeaderboardEntryGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.LeaderboardEntryCountArgs result: $Utils.Optional | number } } } MatchResult: { payload: Prisma.$MatchResultPayload fields: Prisma.MatchResultFieldRefs operations: { findUnique: { args: Prisma.MatchResultFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.MatchResultFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.MatchResultFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.MatchResultFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.MatchResultFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.MatchResultCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.MatchResultCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.MatchResultCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.MatchResultDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.MatchResultUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.MatchResultDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.MatchResultUpdateManyArgs result: BatchPayload } upsert: { args: Prisma.MatchResultUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.MatchResultAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.MatchResultGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.MatchResultCountArgs result: $Utils.Optional | number } } } } } & { other: { payload: any operations: { $executeRaw: { args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], result: any } $executeRawUnsafe: { args: [query: string, ...values: any[]], result: any } $queryRaw: { args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], result: any } $queryRawUnsafe: { args: [query: string, ...values: any[]], result: any } } } } export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> export type DefaultPrismaClient = PrismaClient export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' export interface PrismaClientOptions { /** * Overwrites the datasource url from your schema.prisma file */ datasources?: Datasources /** * Overwrites the datasource url from your schema.prisma file */ datasourceUrl?: string /** * @default "colorless" */ errorFormat?: ErrorFormat /** * @example * ``` * // Defaults to stdout * log: ['query', 'info', 'warn', 'error'] * * // Emit as events * log: [ * { emit: 'stdout', level: 'query' }, * { emit: 'stdout', level: 'info' }, * { emit: 'stdout', level: 'warn' } * { emit: 'stdout', level: 'error' } * ] * ``` * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). */ log?: (LogLevel | LogDefinition)[] /** * The default values for transactionOptions * maxWait ?= 2000 * timeout ?= 5000 */ transactionOptions?: { maxWait?: number timeout?: number isolationLevel?: Prisma.TransactionIsolationLevel } } /* Types for Logging */ export type LogLevel = 'info' | 'query' | 'warn' | 'error' export type LogDefinition = { level: LogLevel emit: 'stdout' | 'event' } export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never export type GetEvents = T extends Array ? GetLogType | GetLogType | GetLogType | GetLogType : never export type QueryEvent = { timestamp: Date query: string params: string duration: number target: string } export type LogEvent = { timestamp: Date message: string target: string } /* End Types for Logging */ export type PrismaAction = | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'executeRaw' | 'queryRaw' | 'aggregate' | 'count' | 'runCommandRaw' | 'findRaw' | 'groupBy' /** * These options are being passed into the middleware as "params" */ export type MiddlewareParams = { model?: ModelName action: PrismaAction args: any dataPath: string[] runInTransaction: boolean } /** * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation */ export type Middleware = ( params: MiddlewareParams, next: (params: MiddlewareParams) => $Utils.JsPromise, ) => $Utils.JsPromise // tested in getLogLevel.test.ts export function getLogLevel(log: Array): LogLevel | undefined; /** * `PrismaClient` proxy available in interactive transactions. */ export type TransactionClient = Omit export type Datasource = { url?: string } /** * Count Types */ /** * Count Type UserCountOutputType */ export type UserCountOutputType = { sessions: number leaderboardEntries: number matchResults: number } export type UserCountOutputTypeSelect = { sessions?: boolean | UserCountOutputTypeCountSessionsArgs leaderboardEntries?: boolean | UserCountOutputTypeCountLeaderboardEntriesArgs matchResults?: boolean | UserCountOutputTypeCountMatchResultsArgs } // Custom InputTypes /** * UserCountOutputType without action */ export type UserCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the UserCountOutputType */ select?: UserCountOutputTypeSelect | null } /** * UserCountOutputType without action */ export type UserCountOutputTypeCountSessionsArgs = { where?: GameSessionWhereInput } /** * UserCountOutputType without action */ export type UserCountOutputTypeCountLeaderboardEntriesArgs = { where?: LeaderboardEntryWhereInput } /** * UserCountOutputType without action */ export type UserCountOutputTypeCountMatchResultsArgs = { where?: MatchResultWhereInput } /** * Count Type QuestionCountOutputType */ export type QuestionCountOutputType = { answers: number } export type QuestionCountOutputTypeSelect = { answers?: boolean | QuestionCountOutputTypeCountAnswersArgs } // Custom InputTypes /** * QuestionCountOutputType without action */ export type QuestionCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the QuestionCountOutputType */ select?: QuestionCountOutputTypeSelect | null } /** * QuestionCountOutputType without action */ export type QuestionCountOutputTypeCountAnswersArgs = { where?: UserAnswerWhereInput } /** * Count Type GameSessionCountOutputType */ export type GameSessionCountOutputType = { answers: number } export type GameSessionCountOutputTypeSelect = { answers?: boolean | GameSessionCountOutputTypeCountAnswersArgs } // Custom InputTypes /** * GameSessionCountOutputType without action */ export type GameSessionCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the GameSessionCountOutputType */ select?: GameSessionCountOutputTypeSelect | null } /** * GameSessionCountOutputType without action */ export type GameSessionCountOutputTypeCountAnswersArgs = { where?: UserAnswerWhereInput } /** * Models */ /** * Model User */ export type AggregateUser = { _count: UserCountAggregateOutputType | null _min: UserMinAggregateOutputType | null _max: UserMaxAggregateOutputType | null } export type UserMinAggregateOutputType = { id: string | null googleId: string | null email: string | null displayName: string | null username: string | null avatarUrl: string | null createdAt: Date | null updatedAt: Date | null } export type UserMaxAggregateOutputType = { id: string | null googleId: string | null email: string | null displayName: string | null username: string | null avatarUrl: string | null createdAt: Date | null updatedAt: Date | null } export type UserCountAggregateOutputType = { id: number googleId: number email: number displayName: number username: number avatarUrl: number createdAt: number updatedAt: number _all: number } export type UserMinAggregateInputType = { id?: true googleId?: true email?: true displayName?: true username?: true avatarUrl?: true createdAt?: true updatedAt?: true } export type UserMaxAggregateInputType = { id?: true googleId?: true email?: true displayName?: true username?: true avatarUrl?: true createdAt?: true updatedAt?: true } export type UserCountAggregateInputType = { id?: true googleId?: true email?: true displayName?: true username?: true avatarUrl?: true createdAt?: true updatedAt?: true _all?: true } export type UserAggregateArgs = { /** * Filter which User to aggregate. */ where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. */ orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Users **/ _count?: true | UserCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: UserMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: UserMaxAggregateInputType } export type GetUserAggregateType = { [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type UserGroupByArgs = { where?: UserWhereInput orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[] by: UserScalarFieldEnum[] | UserScalarFieldEnum having?: UserScalarWhereWithAggregatesInput take?: number skip?: number _count?: UserCountAggregateInputType | true _min?: UserMinAggregateInputType _max?: UserMaxAggregateInputType } export type UserGroupByOutputType = { id: string googleId: string email: string displayName: string username: string avatarUrl: string | null createdAt: Date updatedAt: Date _count: UserCountAggregateOutputType | null _min: UserMinAggregateOutputType | null _max: UserMaxAggregateOutputType | null } type GetUserGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type UserSelect = $Extensions.GetSelect<{ id?: boolean googleId?: boolean email?: boolean displayName?: boolean username?: boolean avatarUrl?: boolean createdAt?: boolean updatedAt?: boolean sessions?: boolean | User$sessionsArgs leaderboardEntries?: boolean | User$leaderboardEntriesArgs matchResults?: boolean | User$matchResultsArgs _count?: boolean | UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean googleId?: boolean email?: boolean displayName?: boolean username?: boolean avatarUrl?: boolean createdAt?: boolean updatedAt?: boolean }, ExtArgs["result"]["user"]> export type UserSelectScalar = { id?: boolean googleId?: boolean email?: boolean displayName?: boolean username?: boolean avatarUrl?: boolean createdAt?: boolean updatedAt?: boolean } export type UserInclude = { sessions?: boolean | User$sessionsArgs leaderboardEntries?: boolean | User$leaderboardEntriesArgs matchResults?: boolean | User$matchResultsArgs _count?: boolean | UserCountOutputTypeDefaultArgs } export type UserIncludeCreateManyAndReturn = {} export type $UserPayload = { name: "User" objects: { sessions: Prisma.$GameSessionPayload[] leaderboardEntries: Prisma.$LeaderboardEntryPayload[] matchResults: Prisma.$MatchResultPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string googleId: string email: string displayName: string username: string avatarUrl: string | null createdAt: Date updatedAt: Date }, ExtArgs["result"]["user"]> composites: {} } type UserGetPayload = $Result.GetResult type UserCountArgs = Omit & { select?: UserCountAggregateInputType | true } export interface UserDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } /** * Find zero or one User that matches the filter. * @param {UserFindUniqueArgs} args - Arguments to find a User * @example * // Get one User * const user = await prisma.user.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** * Find one User that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User * @example * // Get one User * const user = await prisma.user.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first User that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserFindFirstArgs} args - Arguments to find a User * @example * // Get one User * const user = await prisma.user.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first User that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User * @example * // Get one User * const user = await prisma.user.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Users that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Users * const users = await prisma.user.findMany() * * // Get first 10 Users * const users = await prisma.user.findMany({ take: 10 }) * * // Only select the `id` * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a User. * @param {UserCreateArgs} args - Arguments to create a User. * @example * // Create one User * const User = await prisma.user.create({ * data: { * // ... data to create a User * } * }) * */ create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Users. * @param {UserCreateManyArgs} args - Arguments to create many Users. * @example * // Create many Users * const user = await prisma.user.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many Users and returns the data saved in the database. * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. * @example * // Create many Users * const user = await prisma.user.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Users and only return the `id` * const userWithIdOnly = await prisma.user.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** * Delete a User. * @param {UserDeleteArgs} args - Arguments to delete one User. * @example * // Delete one User * const User = await prisma.user.delete({ * where: { * // ... filter to delete one User * } * }) * */ delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one User. * @param {UserUpdateArgs} args - Arguments to update one User. * @example * // Update one User * const user = await prisma.user.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Users. * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. * @example * // Delete a few Users * const { count } = await prisma.user.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Users. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Users * const user = await prisma.user.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one User. * @param {UserUpsertArgs} args - Arguments to update or create a User. * @example * // Update or create a User * const user = await prisma.user.upsert({ * create: { * // ... data to create a User * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the User we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Count the number of Users. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserCountArgs} args - Arguments to filter Users to count. * @example * // Count the number of Users * const count = await prisma.user.count({ * where: { * // ... the filter for the Users we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a User. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by User. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends UserGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: UserGroupByArgs['orderBy'] } : { orderBy?: UserGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise /** * Fields of the User model */ readonly fields: UserFieldRefs; } /** * The delegate class that acts as a "Promise-like" for User. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__UserClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" sessions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> leaderboardEntries = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> matchResults = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } /** * Fields of the User model */ interface UserFieldRefs { readonly id: FieldRef<"User", 'String'> readonly googleId: FieldRef<"User", 'String'> readonly email: FieldRef<"User", 'String'> readonly displayName: FieldRef<"User", 'String'> readonly username: FieldRef<"User", 'String'> readonly avatarUrl: FieldRef<"User", 'String'> readonly createdAt: FieldRef<"User", 'DateTime'> readonly updatedAt: FieldRef<"User", 'DateTime'> } // Custom InputTypes /** * User findUnique */ export type UserFindUniqueArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * Filter, which User to fetch. */ where: UserWhereUniqueInput } /** * User findUniqueOrThrow */ export type UserFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * Filter, which User to fetch. */ where: UserWhereUniqueInput } /** * User findFirst */ export type UserFindFirstArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * Filter, which User to fetch. */ where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. */ orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Users. */ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Users. */ distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } /** * User findFirstOrThrow */ export type UserFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * Filter, which User to fetch. */ where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. */ orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Users. */ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Users. */ distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } /** * User findMany */ export type UserFindManyArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * Filter, which Users to fetch. */ where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. */ orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Users. */ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Users. */ skip?: number distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } /** * User create */ export type UserCreateArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * The data needed to create a User. */ data: XOR } /** * User createMany */ export type UserCreateManyArgs = { /** * The data used to create many Users. */ data: UserCreateManyInput | UserCreateManyInput[] skipDuplicates?: boolean } /** * User createManyAndReturn */ export type UserCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelectCreateManyAndReturn | null /** * The data used to create many Users. */ data: UserCreateManyInput | UserCreateManyInput[] skipDuplicates?: boolean } /** * User update */ export type UserUpdateArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * The data needed to update a User. */ data: XOR /** * Choose, which User to update. */ where: UserWhereUniqueInput } /** * User updateMany */ export type UserUpdateManyArgs = { /** * The data used to update Users. */ data: XOR /** * Filter which Users to update */ where?: UserWhereInput } /** * User upsert */ export type UserUpsertArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * The filter to search for the User to update in case it exists. */ where: UserWhereUniqueInput /** * In case the User found by the `where` argument doesn't exist, create a new User with this data. */ create: XOR /** * In case the User was found with the provided `where` argument, update it with this data. */ update: XOR } /** * User delete */ export type UserDeleteArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null /** * Filter which User to delete. */ where: UserWhereUniqueInput } /** * User deleteMany */ export type UserDeleteManyArgs = { /** * Filter which Users to delete */ where?: UserWhereInput } /** * User.sessions */ export type User$sessionsArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null where?: GameSessionWhereInput orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[] cursor?: GameSessionWhereUniqueInput take?: number skip?: number distinct?: GameSessionScalarFieldEnum | GameSessionScalarFieldEnum[] } /** * User.leaderboardEntries */ export type User$leaderboardEntriesArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null where?: LeaderboardEntryWhereInput orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[] cursor?: LeaderboardEntryWhereUniqueInput take?: number skip?: number distinct?: LeaderboardEntryScalarFieldEnum | LeaderboardEntryScalarFieldEnum[] } /** * User.matchResults */ export type User$matchResultsArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null where?: MatchResultWhereInput orderBy?: MatchResultOrderByWithRelationInput | MatchResultOrderByWithRelationInput[] cursor?: MatchResultWhereUniqueInput take?: number skip?: number distinct?: MatchResultScalarFieldEnum | MatchResultScalarFieldEnum[] } /** * User without action */ export type UserDefaultArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null } /** * Model Question */ export type AggregateQuestion = { _count: QuestionCountAggregateOutputType | null _min: QuestionMinAggregateOutputType | null _max: QuestionMaxAggregateOutputType | null } export type QuestionMinAggregateOutputType = { id: string | null grade: $Enums.Grade | null subject: $Enums.Subject | null strand: string | null difficulty: $Enums.Difficulty | null questionText: string | null correctAnswer: string | null explanation: string | null createdAt: Date | null } export type QuestionMaxAggregateOutputType = { id: string | null grade: $Enums.Grade | null subject: $Enums.Subject | null strand: string | null difficulty: $Enums.Difficulty | null questionText: string | null correctAnswer: string | null explanation: string | null createdAt: Date | null } export type QuestionCountAggregateOutputType = { id: number grade: number subject: number strand: number difficulty: number questionText: number options: number correctAnswer: number explanation: number createdAt: number _all: number } export type QuestionMinAggregateInputType = { id?: true grade?: true subject?: true strand?: true difficulty?: true questionText?: true correctAnswer?: true explanation?: true createdAt?: true } export type QuestionMaxAggregateInputType = { id?: true grade?: true subject?: true strand?: true difficulty?: true questionText?: true correctAnswer?: true explanation?: true createdAt?: true } export type QuestionCountAggregateInputType = { id?: true grade?: true subject?: true strand?: true difficulty?: true questionText?: true options?: true correctAnswer?: true explanation?: true createdAt?: true _all?: true } export type QuestionAggregateArgs = { /** * Filter which Question to aggregate. */ where?: QuestionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Questions to fetch. */ orderBy?: QuestionOrderByWithRelationInput | QuestionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: QuestionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Questions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Questions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Questions **/ _count?: true | QuestionCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: QuestionMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: QuestionMaxAggregateInputType } export type GetQuestionAggregateType = { [P in keyof T & keyof AggregateQuestion]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type QuestionGroupByArgs = { where?: QuestionWhereInput orderBy?: QuestionOrderByWithAggregationInput | QuestionOrderByWithAggregationInput[] by: QuestionScalarFieldEnum[] | QuestionScalarFieldEnum having?: QuestionScalarWhereWithAggregatesInput take?: number skip?: number _count?: QuestionCountAggregateInputType | true _min?: QuestionMinAggregateInputType _max?: QuestionMaxAggregateInputType } export type QuestionGroupByOutputType = { id: string grade: $Enums.Grade subject: $Enums.Subject strand: string difficulty: $Enums.Difficulty questionText: string options: JsonValue correctAnswer: string explanation: string | null createdAt: Date _count: QuestionCountAggregateOutputType | null _min: QuestionMinAggregateOutputType | null _max: QuestionMaxAggregateOutputType | null } type GetQuestionGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof QuestionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type QuestionSelect = $Extensions.GetSelect<{ id?: boolean grade?: boolean subject?: boolean strand?: boolean difficulty?: boolean questionText?: boolean options?: boolean correctAnswer?: boolean explanation?: boolean createdAt?: boolean answers?: boolean | Question$answersArgs _count?: boolean | QuestionCountOutputTypeDefaultArgs }, ExtArgs["result"]["question"]> export type QuestionSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean grade?: boolean subject?: boolean strand?: boolean difficulty?: boolean questionText?: boolean options?: boolean correctAnswer?: boolean explanation?: boolean createdAt?: boolean }, ExtArgs["result"]["question"]> export type QuestionSelectScalar = { id?: boolean grade?: boolean subject?: boolean strand?: boolean difficulty?: boolean questionText?: boolean options?: boolean correctAnswer?: boolean explanation?: boolean createdAt?: boolean } export type QuestionInclude = { answers?: boolean | Question$answersArgs _count?: boolean | QuestionCountOutputTypeDefaultArgs } export type QuestionIncludeCreateManyAndReturn = {} export type $QuestionPayload = { name: "Question" objects: { answers: Prisma.$UserAnswerPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string grade: $Enums.Grade subject: $Enums.Subject strand: string difficulty: $Enums.Difficulty questionText: string options: Prisma.JsonValue correctAnswer: string explanation: string | null createdAt: Date }, ExtArgs["result"]["question"]> composites: {} } type QuestionGetPayload = $Result.GetResult type QuestionCountArgs = Omit & { select?: QuestionCountAggregateInputType | true } export interface QuestionDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Question'], meta: { name: 'Question' } } /** * Find zero or one Question that matches the filter. * @param {QuestionFindUniqueArgs} args - Arguments to find a Question * @example * // Get one Question * const question = await prisma.question.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__QuestionClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** * Find one Question that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {QuestionFindUniqueOrThrowArgs} args - Arguments to find a Question * @example * // Get one Question * const question = await prisma.question.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__QuestionClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first Question that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {QuestionFindFirstArgs} args - Arguments to find a Question * @example * // Get one Question * const question = await prisma.question.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__QuestionClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first Question that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {QuestionFindFirstOrThrowArgs} args - Arguments to find a Question * @example * // Get one Question * const question = await prisma.question.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__QuestionClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more Questions that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {QuestionFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Questions * const questions = await prisma.question.findMany() * * // Get first 10 Questions * const questions = await prisma.question.findMany({ take: 10 }) * * // Only select the `id` * const questionWithIdOnly = await prisma.question.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a Question. * @param {QuestionCreateArgs} args - Arguments to create a Question. * @example * // Create one Question * const Question = await prisma.question.create({ * data: { * // ... data to create a Question * } * }) * */ create(args: SelectSubset>): Prisma__QuestionClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many Questions. * @param {QuestionCreateManyArgs} args - Arguments to create many Questions. * @example * // Create many Questions * const question = await prisma.question.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many Questions and returns the data saved in the database. * @param {QuestionCreateManyAndReturnArgs} args - Arguments to create many Questions. * @example * // Create many Questions * const question = await prisma.question.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Questions and only return the `id` * const questionWithIdOnly = await prisma.question.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** * Delete a Question. * @param {QuestionDeleteArgs} args - Arguments to delete one Question. * @example * // Delete one Question * const Question = await prisma.question.delete({ * where: { * // ... filter to delete one Question * } * }) * */ delete(args: SelectSubset>): Prisma__QuestionClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one Question. * @param {QuestionUpdateArgs} args - Arguments to update one Question. * @example * // Update one Question * const question = await prisma.question.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__QuestionClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more Questions. * @param {QuestionDeleteManyArgs} args - Arguments to filter Questions to delete. * @example * // Delete a few Questions * const { count } = await prisma.question.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Questions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {QuestionUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Questions * const question = await prisma.question.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one Question. * @param {QuestionUpsertArgs} args - Arguments to update or create a Question. * @example * // Update or create a Question * const question = await prisma.question.upsert({ * create: { * // ... data to create a Question * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Question we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__QuestionClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Count the number of Questions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {QuestionCountArgs} args - Arguments to filter Questions to count. * @example * // Count the number of Questions * const count = await prisma.question.count({ * where: { * // ... the filter for the Questions we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a Question. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {QuestionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by Question. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {QuestionGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends QuestionGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: QuestionGroupByArgs['orderBy'] } : { orderBy?: QuestionGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetQuestionGroupByPayload : Prisma.PrismaPromise /** * Fields of the Question model */ readonly fields: QuestionFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Question. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__QuestionClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" answers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } /** * Fields of the Question model */ interface QuestionFieldRefs { readonly id: FieldRef<"Question", 'String'> readonly grade: FieldRef<"Question", 'Grade'> readonly subject: FieldRef<"Question", 'Subject'> readonly strand: FieldRef<"Question", 'String'> readonly difficulty: FieldRef<"Question", 'Difficulty'> readonly questionText: FieldRef<"Question", 'String'> readonly options: FieldRef<"Question", 'Json'> readonly correctAnswer: FieldRef<"Question", 'String'> readonly explanation: FieldRef<"Question", 'String'> readonly createdAt: FieldRef<"Question", 'DateTime'> } // Custom InputTypes /** * Question findUnique */ export type QuestionFindUniqueArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * Filter, which Question to fetch. */ where: QuestionWhereUniqueInput } /** * Question findUniqueOrThrow */ export type QuestionFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * Filter, which Question to fetch. */ where: QuestionWhereUniqueInput } /** * Question findFirst */ export type QuestionFindFirstArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * Filter, which Question to fetch. */ where?: QuestionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Questions to fetch. */ orderBy?: QuestionOrderByWithRelationInput | QuestionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Questions. */ cursor?: QuestionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Questions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Questions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Questions. */ distinct?: QuestionScalarFieldEnum | QuestionScalarFieldEnum[] } /** * Question findFirstOrThrow */ export type QuestionFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * Filter, which Question to fetch. */ where?: QuestionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Questions to fetch. */ orderBy?: QuestionOrderByWithRelationInput | QuestionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Questions. */ cursor?: QuestionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Questions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Questions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Questions. */ distinct?: QuestionScalarFieldEnum | QuestionScalarFieldEnum[] } /** * Question findMany */ export type QuestionFindManyArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * Filter, which Questions to fetch. */ where?: QuestionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Questions to fetch. */ orderBy?: QuestionOrderByWithRelationInput | QuestionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Questions. */ cursor?: QuestionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Questions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Questions. */ skip?: number distinct?: QuestionScalarFieldEnum | QuestionScalarFieldEnum[] } /** * Question create */ export type QuestionCreateArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * The data needed to create a Question. */ data: XOR } /** * Question createMany */ export type QuestionCreateManyArgs = { /** * The data used to create many Questions. */ data: QuestionCreateManyInput | QuestionCreateManyInput[] skipDuplicates?: boolean } /** * Question createManyAndReturn */ export type QuestionCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelectCreateManyAndReturn | null /** * The data used to create many Questions. */ data: QuestionCreateManyInput | QuestionCreateManyInput[] skipDuplicates?: boolean } /** * Question update */ export type QuestionUpdateArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * The data needed to update a Question. */ data: XOR /** * Choose, which Question to update. */ where: QuestionWhereUniqueInput } /** * Question updateMany */ export type QuestionUpdateManyArgs = { /** * The data used to update Questions. */ data: XOR /** * Filter which Questions to update */ where?: QuestionWhereInput } /** * Question upsert */ export type QuestionUpsertArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * The filter to search for the Question to update in case it exists. */ where: QuestionWhereUniqueInput /** * In case the Question found by the `where` argument doesn't exist, create a new Question with this data. */ create: XOR /** * In case the Question was found with the provided `where` argument, update it with this data. */ update: XOR } /** * Question delete */ export type QuestionDeleteArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null /** * Filter which Question to delete. */ where: QuestionWhereUniqueInput } /** * Question deleteMany */ export type QuestionDeleteManyArgs = { /** * Filter which Questions to delete */ where?: QuestionWhereInput } /** * Question.answers */ export type Question$answersArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null where?: UserAnswerWhereInput orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[] cursor?: UserAnswerWhereUniqueInput take?: number skip?: number distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[] } /** * Question without action */ export type QuestionDefaultArgs = { /** * Select specific fields to fetch from the Question */ select?: QuestionSelect | null /** * Choose, which related nodes to fetch as well */ include?: QuestionInclude | null } /** * Model GameSession */ export type AggregateGameSession = { _count: GameSessionCountAggregateOutputType | null _avg: GameSessionAvgAggregateOutputType | null _sum: GameSessionSumAggregateOutputType | null _min: GameSessionMinAggregateOutputType | null _max: GameSessionMaxAggregateOutputType | null } export type GameSessionAvgAggregateOutputType = { score: number | null totalQuestions: number | null correctAnswers: number | null } export type GameSessionSumAggregateOutputType = { score: number | null totalQuestions: number | null correctAnswers: number | null } export type GameSessionMinAggregateOutputType = { id: string | null userId: string | null grade: $Enums.Grade | null subject: $Enums.Subject | null status: $Enums.SessionStatus | null score: number | null totalQuestions: number | null correctAnswers: number | null startedAt: Date | null completedAt: Date | null } export type GameSessionMaxAggregateOutputType = { id: string | null userId: string | null grade: $Enums.Grade | null subject: $Enums.Subject | null status: $Enums.SessionStatus | null score: number | null totalQuestions: number | null correctAnswers: number | null startedAt: Date | null completedAt: Date | null } export type GameSessionCountAggregateOutputType = { id: number userId: number grade: number subject: number status: number score: number totalQuestions: number correctAnswers: number startedAt: number completedAt: number _all: number } export type GameSessionAvgAggregateInputType = { score?: true totalQuestions?: true correctAnswers?: true } export type GameSessionSumAggregateInputType = { score?: true totalQuestions?: true correctAnswers?: true } export type GameSessionMinAggregateInputType = { id?: true userId?: true grade?: true subject?: true status?: true score?: true totalQuestions?: true correctAnswers?: true startedAt?: true completedAt?: true } export type GameSessionMaxAggregateInputType = { id?: true userId?: true grade?: true subject?: true status?: true score?: true totalQuestions?: true correctAnswers?: true startedAt?: true completedAt?: true } export type GameSessionCountAggregateInputType = { id?: true userId?: true grade?: true subject?: true status?: true score?: true totalQuestions?: true correctAnswers?: true startedAt?: true completedAt?: true _all?: true } export type GameSessionAggregateArgs = { /** * Filter which GameSession to aggregate. */ where?: GameSessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GameSessions to fetch. */ orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: GameSessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GameSessions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GameSessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned GameSessions **/ _count?: true | GameSessionCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: GameSessionAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: GameSessionSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: GameSessionMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: GameSessionMaxAggregateInputType } export type GetGameSessionAggregateType = { [P in keyof T & keyof AggregateGameSession]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type GameSessionGroupByArgs = { where?: GameSessionWhereInput orderBy?: GameSessionOrderByWithAggregationInput | GameSessionOrderByWithAggregationInput[] by: GameSessionScalarFieldEnum[] | GameSessionScalarFieldEnum having?: GameSessionScalarWhereWithAggregatesInput take?: number skip?: number _count?: GameSessionCountAggregateInputType | true _avg?: GameSessionAvgAggregateInputType _sum?: GameSessionSumAggregateInputType _min?: GameSessionMinAggregateInputType _max?: GameSessionMaxAggregateInputType } export type GameSessionGroupByOutputType = { id: string userId: string grade: $Enums.Grade subject: $Enums.Subject status: $Enums.SessionStatus score: number totalQuestions: number correctAnswers: number startedAt: Date completedAt: Date | null _count: GameSessionCountAggregateOutputType | null _avg: GameSessionAvgAggregateOutputType | null _sum: GameSessionSumAggregateOutputType | null _min: GameSessionMinAggregateOutputType | null _max: GameSessionMaxAggregateOutputType | null } type GetGameSessionGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof GameSessionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type GameSessionSelect = $Extensions.GetSelect<{ id?: boolean userId?: boolean grade?: boolean subject?: boolean status?: boolean score?: boolean totalQuestions?: boolean correctAnswers?: boolean startedAt?: boolean completedAt?: boolean user?: boolean | UserDefaultArgs answers?: boolean | GameSession$answersArgs _count?: boolean | GameSessionCountOutputTypeDefaultArgs }, ExtArgs["result"]["gameSession"]> export type GameSessionSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean grade?: boolean subject?: boolean status?: boolean score?: boolean totalQuestions?: boolean correctAnswers?: boolean startedAt?: boolean completedAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["gameSession"]> export type GameSessionSelectScalar = { id?: boolean userId?: boolean grade?: boolean subject?: boolean status?: boolean score?: boolean totalQuestions?: boolean correctAnswers?: boolean startedAt?: boolean completedAt?: boolean } export type GameSessionInclude = { user?: boolean | UserDefaultArgs answers?: boolean | GameSession$answersArgs _count?: boolean | GameSessionCountOutputTypeDefaultArgs } export type GameSessionIncludeCreateManyAndReturn = { user?: boolean | UserDefaultArgs } export type $GameSessionPayload = { name: "GameSession" objects: { user: Prisma.$UserPayload answers: Prisma.$UserAnswerPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string userId: string grade: $Enums.Grade subject: $Enums.Subject status: $Enums.SessionStatus score: number totalQuestions: number correctAnswers: number startedAt: Date completedAt: Date | null }, ExtArgs["result"]["gameSession"]> composites: {} } type GameSessionGetPayload = $Result.GetResult type GameSessionCountArgs = Omit & { select?: GameSessionCountAggregateInputType | true } export interface GameSessionDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['GameSession'], meta: { name: 'GameSession' } } /** * Find zero or one GameSession that matches the filter. * @param {GameSessionFindUniqueArgs} args - Arguments to find a GameSession * @example * // Get one GameSession * const gameSession = await prisma.gameSession.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__GameSessionClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** * Find one GameSession that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {GameSessionFindUniqueOrThrowArgs} args - Arguments to find a GameSession * @example * // Get one GameSession * const gameSession = await prisma.gameSession.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__GameSessionClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first GameSession that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GameSessionFindFirstArgs} args - Arguments to find a GameSession * @example * // Get one GameSession * const gameSession = await prisma.gameSession.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__GameSessionClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first GameSession that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GameSessionFindFirstOrThrowArgs} args - Arguments to find a GameSession * @example * // Get one GameSession * const gameSession = await prisma.gameSession.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__GameSessionClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more GameSessions that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GameSessionFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all GameSessions * const gameSessions = await prisma.gameSession.findMany() * * // Get first 10 GameSessions * const gameSessions = await prisma.gameSession.findMany({ take: 10 }) * * // Only select the `id` * const gameSessionWithIdOnly = await prisma.gameSession.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a GameSession. * @param {GameSessionCreateArgs} args - Arguments to create a GameSession. * @example * // Create one GameSession * const GameSession = await prisma.gameSession.create({ * data: { * // ... data to create a GameSession * } * }) * */ create(args: SelectSubset>): Prisma__GameSessionClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many GameSessions. * @param {GameSessionCreateManyArgs} args - Arguments to create many GameSessions. * @example * // Create many GameSessions * const gameSession = await prisma.gameSession.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many GameSessions and returns the data saved in the database. * @param {GameSessionCreateManyAndReturnArgs} args - Arguments to create many GameSessions. * @example * // Create many GameSessions * const gameSession = await prisma.gameSession.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many GameSessions and only return the `id` * const gameSessionWithIdOnly = await prisma.gameSession.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** * Delete a GameSession. * @param {GameSessionDeleteArgs} args - Arguments to delete one GameSession. * @example * // Delete one GameSession * const GameSession = await prisma.gameSession.delete({ * where: { * // ... filter to delete one GameSession * } * }) * */ delete(args: SelectSubset>): Prisma__GameSessionClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one GameSession. * @param {GameSessionUpdateArgs} args - Arguments to update one GameSession. * @example * // Update one GameSession * const gameSession = await prisma.gameSession.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__GameSessionClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more GameSessions. * @param {GameSessionDeleteManyArgs} args - Arguments to filter GameSessions to delete. * @example * // Delete a few GameSessions * const { count } = await prisma.gameSession.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more GameSessions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GameSessionUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many GameSessions * const gameSession = await prisma.gameSession.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one GameSession. * @param {GameSessionUpsertArgs} args - Arguments to update or create a GameSession. * @example * // Update or create a GameSession * const gameSession = await prisma.gameSession.upsert({ * create: { * // ... data to create a GameSession * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the GameSession we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__GameSessionClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Count the number of GameSessions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GameSessionCountArgs} args - Arguments to filter GameSessions to count. * @example * // Count the number of GameSessions * const count = await prisma.gameSession.count({ * where: { * // ... the filter for the GameSessions we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a GameSession. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GameSessionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by GameSession. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GameSessionGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends GameSessionGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: GameSessionGroupByArgs['orderBy'] } : { orderBy?: GameSessionGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetGameSessionGroupByPayload : Prisma.PrismaPromise /** * Fields of the GameSession model */ readonly fields: GameSessionFieldRefs; } /** * The delegate class that acts as a "Promise-like" for GameSession. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__GameSessionClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> answers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } /** * Fields of the GameSession model */ interface GameSessionFieldRefs { readonly id: FieldRef<"GameSession", 'String'> readonly userId: FieldRef<"GameSession", 'String'> readonly grade: FieldRef<"GameSession", 'Grade'> readonly subject: FieldRef<"GameSession", 'Subject'> readonly status: FieldRef<"GameSession", 'SessionStatus'> readonly score: FieldRef<"GameSession", 'Int'> readonly totalQuestions: FieldRef<"GameSession", 'Int'> readonly correctAnswers: FieldRef<"GameSession", 'Int'> readonly startedAt: FieldRef<"GameSession", 'DateTime'> readonly completedAt: FieldRef<"GameSession", 'DateTime'> } // Custom InputTypes /** * GameSession findUnique */ export type GameSessionFindUniqueArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * Filter, which GameSession to fetch. */ where: GameSessionWhereUniqueInput } /** * GameSession findUniqueOrThrow */ export type GameSessionFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * Filter, which GameSession to fetch. */ where: GameSessionWhereUniqueInput } /** * GameSession findFirst */ export type GameSessionFindFirstArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * Filter, which GameSession to fetch. */ where?: GameSessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GameSessions to fetch. */ orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for GameSessions. */ cursor?: GameSessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GameSessions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GameSessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of GameSessions. */ distinct?: GameSessionScalarFieldEnum | GameSessionScalarFieldEnum[] } /** * GameSession findFirstOrThrow */ export type GameSessionFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * Filter, which GameSession to fetch. */ where?: GameSessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GameSessions to fetch. */ orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for GameSessions. */ cursor?: GameSessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GameSessions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GameSessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of GameSessions. */ distinct?: GameSessionScalarFieldEnum | GameSessionScalarFieldEnum[] } /** * GameSession findMany */ export type GameSessionFindManyArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * Filter, which GameSessions to fetch. */ where?: GameSessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GameSessions to fetch. */ orderBy?: GameSessionOrderByWithRelationInput | GameSessionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing GameSessions. */ cursor?: GameSessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GameSessions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GameSessions. */ skip?: number distinct?: GameSessionScalarFieldEnum | GameSessionScalarFieldEnum[] } /** * GameSession create */ export type GameSessionCreateArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * The data needed to create a GameSession. */ data: XOR } /** * GameSession createMany */ export type GameSessionCreateManyArgs = { /** * The data used to create many GameSessions. */ data: GameSessionCreateManyInput | GameSessionCreateManyInput[] skipDuplicates?: boolean } /** * GameSession createManyAndReturn */ export type GameSessionCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelectCreateManyAndReturn | null /** * The data used to create many GameSessions. */ data: GameSessionCreateManyInput | GameSessionCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ include?: GameSessionIncludeCreateManyAndReturn | null } /** * GameSession update */ export type GameSessionUpdateArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * The data needed to update a GameSession. */ data: XOR /** * Choose, which GameSession to update. */ where: GameSessionWhereUniqueInput } /** * GameSession updateMany */ export type GameSessionUpdateManyArgs = { /** * The data used to update GameSessions. */ data: XOR /** * Filter which GameSessions to update */ where?: GameSessionWhereInput } /** * GameSession upsert */ export type GameSessionUpsertArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * The filter to search for the GameSession to update in case it exists. */ where: GameSessionWhereUniqueInput /** * In case the GameSession found by the `where` argument doesn't exist, create a new GameSession with this data. */ create: XOR /** * In case the GameSession was found with the provided `where` argument, update it with this data. */ update: XOR } /** * GameSession delete */ export type GameSessionDeleteArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null /** * Filter which GameSession to delete. */ where: GameSessionWhereUniqueInput } /** * GameSession deleteMany */ export type GameSessionDeleteManyArgs = { /** * Filter which GameSessions to delete */ where?: GameSessionWhereInput } /** * GameSession.answers */ export type GameSession$answersArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null where?: UserAnswerWhereInput orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[] cursor?: UserAnswerWhereUniqueInput take?: number skip?: number distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[] } /** * GameSession without action */ export type GameSessionDefaultArgs = { /** * Select specific fields to fetch from the GameSession */ select?: GameSessionSelect | null /** * Choose, which related nodes to fetch as well */ include?: GameSessionInclude | null } /** * Model UserAnswer */ export type AggregateUserAnswer = { _count: UserAnswerCountAggregateOutputType | null _avg: UserAnswerAvgAggregateOutputType | null _sum: UserAnswerSumAggregateOutputType | null _min: UserAnswerMinAggregateOutputType | null _max: UserAnswerMaxAggregateOutputType | null } export type UserAnswerAvgAggregateOutputType = { timeSpentMs: number | null } export type UserAnswerSumAggregateOutputType = { timeSpentMs: number | null } export type UserAnswerMinAggregateOutputType = { id: string | null sessionId: string | null questionId: string | null selectedAnswer: string | null isCorrect: boolean | null timeSpentMs: number | null answeredAt: Date | null } export type UserAnswerMaxAggregateOutputType = { id: string | null sessionId: string | null questionId: string | null selectedAnswer: string | null isCorrect: boolean | null timeSpentMs: number | null answeredAt: Date | null } export type UserAnswerCountAggregateOutputType = { id: number sessionId: number questionId: number selectedAnswer: number isCorrect: number timeSpentMs: number answeredAt: number _all: number } export type UserAnswerAvgAggregateInputType = { timeSpentMs?: true } export type UserAnswerSumAggregateInputType = { timeSpentMs?: true } export type UserAnswerMinAggregateInputType = { id?: true sessionId?: true questionId?: true selectedAnswer?: true isCorrect?: true timeSpentMs?: true answeredAt?: true } export type UserAnswerMaxAggregateInputType = { id?: true sessionId?: true questionId?: true selectedAnswer?: true isCorrect?: true timeSpentMs?: true answeredAt?: true } export type UserAnswerCountAggregateInputType = { id?: true sessionId?: true questionId?: true selectedAnswer?: true isCorrect?: true timeSpentMs?: true answeredAt?: true _all?: true } export type UserAnswerAggregateArgs = { /** * Filter which UserAnswer to aggregate. */ where?: UserAnswerWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of UserAnswers to fetch. */ orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: UserAnswerWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` UserAnswers from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` UserAnswers. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned UserAnswers **/ _count?: true | UserAnswerCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: UserAnswerAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: UserAnswerSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: UserAnswerMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: UserAnswerMaxAggregateInputType } export type GetUserAnswerAggregateType = { [P in keyof T & keyof AggregateUserAnswer]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type UserAnswerGroupByArgs = { where?: UserAnswerWhereInput orderBy?: UserAnswerOrderByWithAggregationInput | UserAnswerOrderByWithAggregationInput[] by: UserAnswerScalarFieldEnum[] | UserAnswerScalarFieldEnum having?: UserAnswerScalarWhereWithAggregatesInput take?: number skip?: number _count?: UserAnswerCountAggregateInputType | true _avg?: UserAnswerAvgAggregateInputType _sum?: UserAnswerSumAggregateInputType _min?: UserAnswerMinAggregateInputType _max?: UserAnswerMaxAggregateInputType } export type UserAnswerGroupByOutputType = { id: string sessionId: string questionId: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt: Date _count: UserAnswerCountAggregateOutputType | null _avg: UserAnswerAvgAggregateOutputType | null _sum: UserAnswerSumAggregateOutputType | null _min: UserAnswerMinAggregateOutputType | null _max: UserAnswerMaxAggregateOutputType | null } type GetUserAnswerGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof UserAnswerGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type UserAnswerSelect = $Extensions.GetSelect<{ id?: boolean sessionId?: boolean questionId?: boolean selectedAnswer?: boolean isCorrect?: boolean timeSpentMs?: boolean answeredAt?: boolean session?: boolean | GameSessionDefaultArgs question?: boolean | QuestionDefaultArgs }, ExtArgs["result"]["userAnswer"]> export type UserAnswerSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean sessionId?: boolean questionId?: boolean selectedAnswer?: boolean isCorrect?: boolean timeSpentMs?: boolean answeredAt?: boolean session?: boolean | GameSessionDefaultArgs question?: boolean | QuestionDefaultArgs }, ExtArgs["result"]["userAnswer"]> export type UserAnswerSelectScalar = { id?: boolean sessionId?: boolean questionId?: boolean selectedAnswer?: boolean isCorrect?: boolean timeSpentMs?: boolean answeredAt?: boolean } export type UserAnswerInclude = { session?: boolean | GameSessionDefaultArgs question?: boolean | QuestionDefaultArgs } export type UserAnswerIncludeCreateManyAndReturn = { session?: boolean | GameSessionDefaultArgs question?: boolean | QuestionDefaultArgs } export type $UserAnswerPayload = { name: "UserAnswer" objects: { session: Prisma.$GameSessionPayload question: Prisma.$QuestionPayload } scalars: $Extensions.GetPayloadResult<{ id: string sessionId: string questionId: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt: Date }, ExtArgs["result"]["userAnswer"]> composites: {} } type UserAnswerGetPayload = $Result.GetResult type UserAnswerCountArgs = Omit & { select?: UserAnswerCountAggregateInputType | true } export interface UserAnswerDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['UserAnswer'], meta: { name: 'UserAnswer' } } /** * Find zero or one UserAnswer that matches the filter. * @param {UserAnswerFindUniqueArgs} args - Arguments to find a UserAnswer * @example * // Get one UserAnswer * const userAnswer = await prisma.userAnswer.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__UserAnswerClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** * Find one UserAnswer that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {UserAnswerFindUniqueOrThrowArgs} args - Arguments to find a UserAnswer * @example * // Get one UserAnswer * const userAnswer = await prisma.userAnswer.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__UserAnswerClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first UserAnswer that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAnswerFindFirstArgs} args - Arguments to find a UserAnswer * @example * // Get one UserAnswer * const userAnswer = await prisma.userAnswer.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__UserAnswerClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first UserAnswer that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAnswerFindFirstOrThrowArgs} args - Arguments to find a UserAnswer * @example * // Get one UserAnswer * const userAnswer = await prisma.userAnswer.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__UserAnswerClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more UserAnswers that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAnswerFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all UserAnswers * const userAnswers = await prisma.userAnswer.findMany() * * // Get first 10 UserAnswers * const userAnswers = await prisma.userAnswer.findMany({ take: 10 }) * * // Only select the `id` * const userAnswerWithIdOnly = await prisma.userAnswer.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a UserAnswer. * @param {UserAnswerCreateArgs} args - Arguments to create a UserAnswer. * @example * // Create one UserAnswer * const UserAnswer = await prisma.userAnswer.create({ * data: { * // ... data to create a UserAnswer * } * }) * */ create(args: SelectSubset>): Prisma__UserAnswerClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many UserAnswers. * @param {UserAnswerCreateManyArgs} args - Arguments to create many UserAnswers. * @example * // Create many UserAnswers * const userAnswer = await prisma.userAnswer.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many UserAnswers and returns the data saved in the database. * @param {UserAnswerCreateManyAndReturnArgs} args - Arguments to create many UserAnswers. * @example * // Create many UserAnswers * const userAnswer = await prisma.userAnswer.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many UserAnswers and only return the `id` * const userAnswerWithIdOnly = await prisma.userAnswer.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** * Delete a UserAnswer. * @param {UserAnswerDeleteArgs} args - Arguments to delete one UserAnswer. * @example * // Delete one UserAnswer * const UserAnswer = await prisma.userAnswer.delete({ * where: { * // ... filter to delete one UserAnswer * } * }) * */ delete(args: SelectSubset>): Prisma__UserAnswerClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one UserAnswer. * @param {UserAnswerUpdateArgs} args - Arguments to update one UserAnswer. * @example * // Update one UserAnswer * const userAnswer = await prisma.userAnswer.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__UserAnswerClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more UserAnswers. * @param {UserAnswerDeleteManyArgs} args - Arguments to filter UserAnswers to delete. * @example * // Delete a few UserAnswers * const { count } = await prisma.userAnswer.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more UserAnswers. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAnswerUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many UserAnswers * const userAnswer = await prisma.userAnswer.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one UserAnswer. * @param {UserAnswerUpsertArgs} args - Arguments to update or create a UserAnswer. * @example * // Update or create a UserAnswer * const userAnswer = await prisma.userAnswer.upsert({ * create: { * // ... data to create a UserAnswer * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the UserAnswer we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__UserAnswerClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Count the number of UserAnswers. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAnswerCountArgs} args - Arguments to filter UserAnswers to count. * @example * // Count the number of UserAnswers * const count = await prisma.userAnswer.count({ * where: { * // ... the filter for the UserAnswers we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a UserAnswer. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAnswerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by UserAnswer. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {UserAnswerGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends UserAnswerGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: UserAnswerGroupByArgs['orderBy'] } : { orderBy?: UserAnswerGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserAnswerGroupByPayload : Prisma.PrismaPromise /** * Fields of the UserAnswer model */ readonly fields: UserAnswerFieldRefs; } /** * The delegate class that acts as a "Promise-like" for UserAnswer. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__UserAnswerClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" session = {}>(args?: Subset>): Prisma__GameSessionClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> question = {}>(args?: Subset>): Prisma__QuestionClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } /** * Fields of the UserAnswer model */ interface UserAnswerFieldRefs { readonly id: FieldRef<"UserAnswer", 'String'> readonly sessionId: FieldRef<"UserAnswer", 'String'> readonly questionId: FieldRef<"UserAnswer", 'String'> readonly selectedAnswer: FieldRef<"UserAnswer", 'String'> readonly isCorrect: FieldRef<"UserAnswer", 'Boolean'> readonly timeSpentMs: FieldRef<"UserAnswer", 'Int'> readonly answeredAt: FieldRef<"UserAnswer", 'DateTime'> } // Custom InputTypes /** * UserAnswer findUnique */ export type UserAnswerFindUniqueArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * Filter, which UserAnswer to fetch. */ where: UserAnswerWhereUniqueInput } /** * UserAnswer findUniqueOrThrow */ export type UserAnswerFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * Filter, which UserAnswer to fetch. */ where: UserAnswerWhereUniqueInput } /** * UserAnswer findFirst */ export type UserAnswerFindFirstArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * Filter, which UserAnswer to fetch. */ where?: UserAnswerWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of UserAnswers to fetch. */ orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for UserAnswers. */ cursor?: UserAnswerWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` UserAnswers from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` UserAnswers. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of UserAnswers. */ distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[] } /** * UserAnswer findFirstOrThrow */ export type UserAnswerFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * Filter, which UserAnswer to fetch. */ where?: UserAnswerWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of UserAnswers to fetch. */ orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for UserAnswers. */ cursor?: UserAnswerWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` UserAnswers from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` UserAnswers. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of UserAnswers. */ distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[] } /** * UserAnswer findMany */ export type UserAnswerFindManyArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * Filter, which UserAnswers to fetch. */ where?: UserAnswerWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of UserAnswers to fetch. */ orderBy?: UserAnswerOrderByWithRelationInput | UserAnswerOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing UserAnswers. */ cursor?: UserAnswerWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` UserAnswers from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` UserAnswers. */ skip?: number distinct?: UserAnswerScalarFieldEnum | UserAnswerScalarFieldEnum[] } /** * UserAnswer create */ export type UserAnswerCreateArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * The data needed to create a UserAnswer. */ data: XOR } /** * UserAnswer createMany */ export type UserAnswerCreateManyArgs = { /** * The data used to create many UserAnswers. */ data: UserAnswerCreateManyInput | UserAnswerCreateManyInput[] skipDuplicates?: boolean } /** * UserAnswer createManyAndReturn */ export type UserAnswerCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelectCreateManyAndReturn | null /** * The data used to create many UserAnswers. */ data: UserAnswerCreateManyInput | UserAnswerCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ include?: UserAnswerIncludeCreateManyAndReturn | null } /** * UserAnswer update */ export type UserAnswerUpdateArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * The data needed to update a UserAnswer. */ data: XOR /** * Choose, which UserAnswer to update. */ where: UserAnswerWhereUniqueInput } /** * UserAnswer updateMany */ export type UserAnswerUpdateManyArgs = { /** * The data used to update UserAnswers. */ data: XOR /** * Filter which UserAnswers to update */ where?: UserAnswerWhereInput } /** * UserAnswer upsert */ export type UserAnswerUpsertArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * The filter to search for the UserAnswer to update in case it exists. */ where: UserAnswerWhereUniqueInput /** * In case the UserAnswer found by the `where` argument doesn't exist, create a new UserAnswer with this data. */ create: XOR /** * In case the UserAnswer was found with the provided `where` argument, update it with this data. */ update: XOR } /** * UserAnswer delete */ export type UserAnswerDeleteArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null /** * Filter which UserAnswer to delete. */ where: UserAnswerWhereUniqueInput } /** * UserAnswer deleteMany */ export type UserAnswerDeleteManyArgs = { /** * Filter which UserAnswers to delete */ where?: UserAnswerWhereInput } /** * UserAnswer without action */ export type UserAnswerDefaultArgs = { /** * Select specific fields to fetch from the UserAnswer */ select?: UserAnswerSelect | null /** * Choose, which related nodes to fetch as well */ include?: UserAnswerInclude | null } /** * Model LeaderboardEntry */ export type AggregateLeaderboardEntry = { _count: LeaderboardEntryCountAggregateOutputType | null _avg: LeaderboardEntryAvgAggregateOutputType | null _sum: LeaderboardEntrySumAggregateOutputType | null _min: LeaderboardEntryMinAggregateOutputType | null _max: LeaderboardEntryMaxAggregateOutputType | null } export type LeaderboardEntryAvgAggregateOutputType = { elo: number | null bestTime: number | null gamesPlayed: number | null totalCorrect: number | null } export type LeaderboardEntrySumAggregateOutputType = { elo: number | null bestTime: number | null gamesPlayed: number | null totalCorrect: number | null } export type LeaderboardEntryMinAggregateOutputType = { id: string | null userId: string | null grade: $Enums.Grade | null elo: number | null bestTime: number | null gamesPlayed: number | null totalCorrect: number | null updatedAt: Date | null } export type LeaderboardEntryMaxAggregateOutputType = { id: string | null userId: string | null grade: $Enums.Grade | null elo: number | null bestTime: number | null gamesPlayed: number | null totalCorrect: number | null updatedAt: Date | null } export type LeaderboardEntryCountAggregateOutputType = { id: number userId: number grade: number elo: number bestTime: number gamesPlayed: number totalCorrect: number updatedAt: number _all: number } export type LeaderboardEntryAvgAggregateInputType = { elo?: true bestTime?: true gamesPlayed?: true totalCorrect?: true } export type LeaderboardEntrySumAggregateInputType = { elo?: true bestTime?: true gamesPlayed?: true totalCorrect?: true } export type LeaderboardEntryMinAggregateInputType = { id?: true userId?: true grade?: true elo?: true bestTime?: true gamesPlayed?: true totalCorrect?: true updatedAt?: true } export type LeaderboardEntryMaxAggregateInputType = { id?: true userId?: true grade?: true elo?: true bestTime?: true gamesPlayed?: true totalCorrect?: true updatedAt?: true } export type LeaderboardEntryCountAggregateInputType = { id?: true userId?: true grade?: true elo?: true bestTime?: true gamesPlayed?: true totalCorrect?: true updatedAt?: true _all?: true } export type LeaderboardEntryAggregateArgs = { /** * Filter which LeaderboardEntry to aggregate. */ where?: LeaderboardEntryWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of LeaderboardEntries to fetch. */ orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: LeaderboardEntryWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` LeaderboardEntries from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` LeaderboardEntries. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned LeaderboardEntries **/ _count?: true | LeaderboardEntryCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: LeaderboardEntryAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: LeaderboardEntrySumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: LeaderboardEntryMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: LeaderboardEntryMaxAggregateInputType } export type GetLeaderboardEntryAggregateType = { [P in keyof T & keyof AggregateLeaderboardEntry]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type LeaderboardEntryGroupByArgs = { where?: LeaderboardEntryWhereInput orderBy?: LeaderboardEntryOrderByWithAggregationInput | LeaderboardEntryOrderByWithAggregationInput[] by: LeaderboardEntryScalarFieldEnum[] | LeaderboardEntryScalarFieldEnum having?: LeaderboardEntryScalarWhereWithAggregatesInput take?: number skip?: number _count?: LeaderboardEntryCountAggregateInputType | true _avg?: LeaderboardEntryAvgAggregateInputType _sum?: LeaderboardEntrySumAggregateInputType _min?: LeaderboardEntryMinAggregateInputType _max?: LeaderboardEntryMaxAggregateInputType } export type LeaderboardEntryGroupByOutputType = { id: string userId: string grade: $Enums.Grade elo: number bestTime: number | null gamesPlayed: number totalCorrect: number updatedAt: Date _count: LeaderboardEntryCountAggregateOutputType | null _avg: LeaderboardEntryAvgAggregateOutputType | null _sum: LeaderboardEntrySumAggregateOutputType | null _min: LeaderboardEntryMinAggregateOutputType | null _max: LeaderboardEntryMaxAggregateOutputType | null } type GetLeaderboardEntryGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof LeaderboardEntryGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type LeaderboardEntrySelect = $Extensions.GetSelect<{ id?: boolean userId?: boolean grade?: boolean elo?: boolean bestTime?: boolean gamesPlayed?: boolean totalCorrect?: boolean updatedAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["leaderboardEntry"]> export type LeaderboardEntrySelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean grade?: boolean elo?: boolean bestTime?: boolean gamesPlayed?: boolean totalCorrect?: boolean updatedAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["leaderboardEntry"]> export type LeaderboardEntrySelectScalar = { id?: boolean userId?: boolean grade?: boolean elo?: boolean bestTime?: boolean gamesPlayed?: boolean totalCorrect?: boolean updatedAt?: boolean } export type LeaderboardEntryInclude = { user?: boolean | UserDefaultArgs } export type LeaderboardEntryIncludeCreateManyAndReturn = { user?: boolean | UserDefaultArgs } export type $LeaderboardEntryPayload = { name: "LeaderboardEntry" objects: { user: Prisma.$UserPayload } scalars: $Extensions.GetPayloadResult<{ id: string userId: string grade: $Enums.Grade elo: number bestTime: number | null gamesPlayed: number totalCorrect: number updatedAt: Date }, ExtArgs["result"]["leaderboardEntry"]> composites: {} } type LeaderboardEntryGetPayload = $Result.GetResult type LeaderboardEntryCountArgs = Omit & { select?: LeaderboardEntryCountAggregateInputType | true } export interface LeaderboardEntryDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['LeaderboardEntry'], meta: { name: 'LeaderboardEntry' } } /** * Find zero or one LeaderboardEntry that matches the filter. * @param {LeaderboardEntryFindUniqueArgs} args - Arguments to find a LeaderboardEntry * @example * // Get one LeaderboardEntry * const leaderboardEntry = await prisma.leaderboardEntry.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__LeaderboardEntryClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** * Find one LeaderboardEntry that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {LeaderboardEntryFindUniqueOrThrowArgs} args - Arguments to find a LeaderboardEntry * @example * // Get one LeaderboardEntry * const leaderboardEntry = await prisma.leaderboardEntry.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__LeaderboardEntryClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first LeaderboardEntry that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeaderboardEntryFindFirstArgs} args - Arguments to find a LeaderboardEntry * @example * // Get one LeaderboardEntry * const leaderboardEntry = await prisma.leaderboardEntry.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__LeaderboardEntryClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first LeaderboardEntry that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeaderboardEntryFindFirstOrThrowArgs} args - Arguments to find a LeaderboardEntry * @example * // Get one LeaderboardEntry * const leaderboardEntry = await prisma.leaderboardEntry.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__LeaderboardEntryClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more LeaderboardEntries that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeaderboardEntryFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all LeaderboardEntries * const leaderboardEntries = await prisma.leaderboardEntry.findMany() * * // Get first 10 LeaderboardEntries * const leaderboardEntries = await prisma.leaderboardEntry.findMany({ take: 10 }) * * // Only select the `id` * const leaderboardEntryWithIdOnly = await prisma.leaderboardEntry.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a LeaderboardEntry. * @param {LeaderboardEntryCreateArgs} args - Arguments to create a LeaderboardEntry. * @example * // Create one LeaderboardEntry * const LeaderboardEntry = await prisma.leaderboardEntry.create({ * data: { * // ... data to create a LeaderboardEntry * } * }) * */ create(args: SelectSubset>): Prisma__LeaderboardEntryClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many LeaderboardEntries. * @param {LeaderboardEntryCreateManyArgs} args - Arguments to create many LeaderboardEntries. * @example * // Create many LeaderboardEntries * const leaderboardEntry = await prisma.leaderboardEntry.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many LeaderboardEntries and returns the data saved in the database. * @param {LeaderboardEntryCreateManyAndReturnArgs} args - Arguments to create many LeaderboardEntries. * @example * // Create many LeaderboardEntries * const leaderboardEntry = await prisma.leaderboardEntry.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many LeaderboardEntries and only return the `id` * const leaderboardEntryWithIdOnly = await prisma.leaderboardEntry.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** * Delete a LeaderboardEntry. * @param {LeaderboardEntryDeleteArgs} args - Arguments to delete one LeaderboardEntry. * @example * // Delete one LeaderboardEntry * const LeaderboardEntry = await prisma.leaderboardEntry.delete({ * where: { * // ... filter to delete one LeaderboardEntry * } * }) * */ delete(args: SelectSubset>): Prisma__LeaderboardEntryClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one LeaderboardEntry. * @param {LeaderboardEntryUpdateArgs} args - Arguments to update one LeaderboardEntry. * @example * // Update one LeaderboardEntry * const leaderboardEntry = await prisma.leaderboardEntry.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__LeaderboardEntryClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more LeaderboardEntries. * @param {LeaderboardEntryDeleteManyArgs} args - Arguments to filter LeaderboardEntries to delete. * @example * // Delete a few LeaderboardEntries * const { count } = await prisma.leaderboardEntry.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more LeaderboardEntries. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeaderboardEntryUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many LeaderboardEntries * const leaderboardEntry = await prisma.leaderboardEntry.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one LeaderboardEntry. * @param {LeaderboardEntryUpsertArgs} args - Arguments to update or create a LeaderboardEntry. * @example * // Update or create a LeaderboardEntry * const leaderboardEntry = await prisma.leaderboardEntry.upsert({ * create: { * // ... data to create a LeaderboardEntry * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the LeaderboardEntry we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__LeaderboardEntryClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Count the number of LeaderboardEntries. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeaderboardEntryCountArgs} args - Arguments to filter LeaderboardEntries to count. * @example * // Count the number of LeaderboardEntries * const count = await prisma.leaderboardEntry.count({ * where: { * // ... the filter for the LeaderboardEntries we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a LeaderboardEntry. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeaderboardEntryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by LeaderboardEntry. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeaderboardEntryGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends LeaderboardEntryGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: LeaderboardEntryGroupByArgs['orderBy'] } : { orderBy?: LeaderboardEntryGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetLeaderboardEntryGroupByPayload : Prisma.PrismaPromise /** * Fields of the LeaderboardEntry model */ readonly fields: LeaderboardEntryFieldRefs; } /** * The delegate class that acts as a "Promise-like" for LeaderboardEntry. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__LeaderboardEntryClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } /** * Fields of the LeaderboardEntry model */ interface LeaderboardEntryFieldRefs { readonly id: FieldRef<"LeaderboardEntry", 'String'> readonly userId: FieldRef<"LeaderboardEntry", 'String'> readonly grade: FieldRef<"LeaderboardEntry", 'Grade'> readonly elo: FieldRef<"LeaderboardEntry", 'Int'> readonly bestTime: FieldRef<"LeaderboardEntry", 'Int'> readonly gamesPlayed: FieldRef<"LeaderboardEntry", 'Int'> readonly totalCorrect: FieldRef<"LeaderboardEntry", 'Int'> readonly updatedAt: FieldRef<"LeaderboardEntry", 'DateTime'> } // Custom InputTypes /** * LeaderboardEntry findUnique */ export type LeaderboardEntryFindUniqueArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * Filter, which LeaderboardEntry to fetch. */ where: LeaderboardEntryWhereUniqueInput } /** * LeaderboardEntry findUniqueOrThrow */ export type LeaderboardEntryFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * Filter, which LeaderboardEntry to fetch. */ where: LeaderboardEntryWhereUniqueInput } /** * LeaderboardEntry findFirst */ export type LeaderboardEntryFindFirstArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * Filter, which LeaderboardEntry to fetch. */ where?: LeaderboardEntryWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of LeaderboardEntries to fetch. */ orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for LeaderboardEntries. */ cursor?: LeaderboardEntryWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` LeaderboardEntries from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` LeaderboardEntries. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of LeaderboardEntries. */ distinct?: LeaderboardEntryScalarFieldEnum | LeaderboardEntryScalarFieldEnum[] } /** * LeaderboardEntry findFirstOrThrow */ export type LeaderboardEntryFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * Filter, which LeaderboardEntry to fetch. */ where?: LeaderboardEntryWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of LeaderboardEntries to fetch. */ orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for LeaderboardEntries. */ cursor?: LeaderboardEntryWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` LeaderboardEntries from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` LeaderboardEntries. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of LeaderboardEntries. */ distinct?: LeaderboardEntryScalarFieldEnum | LeaderboardEntryScalarFieldEnum[] } /** * LeaderboardEntry findMany */ export type LeaderboardEntryFindManyArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * Filter, which LeaderboardEntries to fetch. */ where?: LeaderboardEntryWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of LeaderboardEntries to fetch. */ orderBy?: LeaderboardEntryOrderByWithRelationInput | LeaderboardEntryOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing LeaderboardEntries. */ cursor?: LeaderboardEntryWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` LeaderboardEntries from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` LeaderboardEntries. */ skip?: number distinct?: LeaderboardEntryScalarFieldEnum | LeaderboardEntryScalarFieldEnum[] } /** * LeaderboardEntry create */ export type LeaderboardEntryCreateArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * The data needed to create a LeaderboardEntry. */ data: XOR } /** * LeaderboardEntry createMany */ export type LeaderboardEntryCreateManyArgs = { /** * The data used to create many LeaderboardEntries. */ data: LeaderboardEntryCreateManyInput | LeaderboardEntryCreateManyInput[] skipDuplicates?: boolean } /** * LeaderboardEntry createManyAndReturn */ export type LeaderboardEntryCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelectCreateManyAndReturn | null /** * The data used to create many LeaderboardEntries. */ data: LeaderboardEntryCreateManyInput | LeaderboardEntryCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryIncludeCreateManyAndReturn | null } /** * LeaderboardEntry update */ export type LeaderboardEntryUpdateArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * The data needed to update a LeaderboardEntry. */ data: XOR /** * Choose, which LeaderboardEntry to update. */ where: LeaderboardEntryWhereUniqueInput } /** * LeaderboardEntry updateMany */ export type LeaderboardEntryUpdateManyArgs = { /** * The data used to update LeaderboardEntries. */ data: XOR /** * Filter which LeaderboardEntries to update */ where?: LeaderboardEntryWhereInput } /** * LeaderboardEntry upsert */ export type LeaderboardEntryUpsertArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * The filter to search for the LeaderboardEntry to update in case it exists. */ where: LeaderboardEntryWhereUniqueInput /** * In case the LeaderboardEntry found by the `where` argument doesn't exist, create a new LeaderboardEntry with this data. */ create: XOR /** * In case the LeaderboardEntry was found with the provided `where` argument, update it with this data. */ update: XOR } /** * LeaderboardEntry delete */ export type LeaderboardEntryDeleteArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null /** * Filter which LeaderboardEntry to delete. */ where: LeaderboardEntryWhereUniqueInput } /** * LeaderboardEntry deleteMany */ export type LeaderboardEntryDeleteManyArgs = { /** * Filter which LeaderboardEntries to delete */ where?: LeaderboardEntryWhereInput } /** * LeaderboardEntry without action */ export type LeaderboardEntryDefaultArgs = { /** * Select specific fields to fetch from the LeaderboardEntry */ select?: LeaderboardEntrySelect | null /** * Choose, which related nodes to fetch as well */ include?: LeaderboardEntryInclude | null } /** * Model MatchResult */ export type AggregateMatchResult = { _count: MatchResultCountAggregateOutputType | null _avg: MatchResultAvgAggregateOutputType | null _sum: MatchResultSumAggregateOutputType | null _min: MatchResultMinAggregateOutputType | null _max: MatchResultMaxAggregateOutputType | null } export type MatchResultAvgAggregateOutputType = { eloChange: number | null eloAfter: number | null timeSpentMs: number | null } export type MatchResultSumAggregateOutputType = { eloChange: number | null eloAfter: number | null timeSpentMs: number | null } export type MatchResultMinAggregateOutputType = { id: string | null userId: string | null grade: $Enums.Grade | null won: boolean | null eloChange: number | null eloAfter: number | null timeSpentMs: number | null playedAt: Date | null } export type MatchResultMaxAggregateOutputType = { id: string | null userId: string | null grade: $Enums.Grade | null won: boolean | null eloChange: number | null eloAfter: number | null timeSpentMs: number | null playedAt: Date | null } export type MatchResultCountAggregateOutputType = { id: number userId: number grade: number won: number eloChange: number eloAfter: number timeSpentMs: number playedAt: number _all: number } export type MatchResultAvgAggregateInputType = { eloChange?: true eloAfter?: true timeSpentMs?: true } export type MatchResultSumAggregateInputType = { eloChange?: true eloAfter?: true timeSpentMs?: true } export type MatchResultMinAggregateInputType = { id?: true userId?: true grade?: true won?: true eloChange?: true eloAfter?: true timeSpentMs?: true playedAt?: true } export type MatchResultMaxAggregateInputType = { id?: true userId?: true grade?: true won?: true eloChange?: true eloAfter?: true timeSpentMs?: true playedAt?: true } export type MatchResultCountAggregateInputType = { id?: true userId?: true grade?: true won?: true eloChange?: true eloAfter?: true timeSpentMs?: true playedAt?: true _all?: true } export type MatchResultAggregateArgs = { /** * Filter which MatchResult to aggregate. */ where?: MatchResultWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of MatchResults to fetch. */ orderBy?: MatchResultOrderByWithRelationInput | MatchResultOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: MatchResultWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` MatchResults from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` MatchResults. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned MatchResults **/ _count?: true | MatchResultCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: MatchResultAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: MatchResultSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: MatchResultMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: MatchResultMaxAggregateInputType } export type GetMatchResultAggregateType = { [P in keyof T & keyof AggregateMatchResult]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type MatchResultGroupByArgs = { where?: MatchResultWhereInput orderBy?: MatchResultOrderByWithAggregationInput | MatchResultOrderByWithAggregationInput[] by: MatchResultScalarFieldEnum[] | MatchResultScalarFieldEnum having?: MatchResultScalarWhereWithAggregatesInput take?: number skip?: number _count?: MatchResultCountAggregateInputType | true _avg?: MatchResultAvgAggregateInputType _sum?: MatchResultSumAggregateInputType _min?: MatchResultMinAggregateInputType _max?: MatchResultMaxAggregateInputType } export type MatchResultGroupByOutputType = { id: string userId: string grade: $Enums.Grade won: boolean eloChange: number eloAfter: number timeSpentMs: number | null playedAt: Date _count: MatchResultCountAggregateOutputType | null _avg: MatchResultAvgAggregateOutputType | null _sum: MatchResultSumAggregateOutputType | null _min: MatchResultMinAggregateOutputType | null _max: MatchResultMaxAggregateOutputType | null } type GetMatchResultGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof MatchResultGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type MatchResultSelect = $Extensions.GetSelect<{ id?: boolean userId?: boolean grade?: boolean won?: boolean eloChange?: boolean eloAfter?: boolean timeSpentMs?: boolean playedAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["matchResult"]> export type MatchResultSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean grade?: boolean won?: boolean eloChange?: boolean eloAfter?: boolean timeSpentMs?: boolean playedAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["matchResult"]> export type MatchResultSelectScalar = { id?: boolean userId?: boolean grade?: boolean won?: boolean eloChange?: boolean eloAfter?: boolean timeSpentMs?: boolean playedAt?: boolean } export type MatchResultInclude = { user?: boolean | UserDefaultArgs } export type MatchResultIncludeCreateManyAndReturn = { user?: boolean | UserDefaultArgs } export type $MatchResultPayload = { name: "MatchResult" objects: { user: Prisma.$UserPayload } scalars: $Extensions.GetPayloadResult<{ id: string userId: string grade: $Enums.Grade won: boolean eloChange: number eloAfter: number timeSpentMs: number | null playedAt: Date }, ExtArgs["result"]["matchResult"]> composites: {} } type MatchResultGetPayload = $Result.GetResult type MatchResultCountArgs = Omit & { select?: MatchResultCountAggregateInputType | true } export interface MatchResultDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['MatchResult'], meta: { name: 'MatchResult' } } /** * Find zero or one MatchResult that matches the filter. * @param {MatchResultFindUniqueArgs} args - Arguments to find a MatchResult * @example * // Get one MatchResult * const matchResult = await prisma.matchResult.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__MatchResultClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> /** * Find one MatchResult that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {MatchResultFindUniqueOrThrowArgs} args - Arguments to find a MatchResult * @example * // Get one MatchResult * const matchResult = await prisma.matchResult.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__MatchResultClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> /** * Find the first MatchResult that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MatchResultFindFirstArgs} args - Arguments to find a MatchResult * @example * // Get one MatchResult * const matchResult = await prisma.matchResult.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__MatchResultClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> /** * Find the first MatchResult that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MatchResultFindFirstOrThrowArgs} args - Arguments to find a MatchResult * @example * // Get one MatchResult * const matchResult = await prisma.matchResult.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__MatchResultClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> /** * Find zero or more MatchResults that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MatchResultFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all MatchResults * const matchResults = await prisma.matchResult.findMany() * * // Get first 10 MatchResults * const matchResults = await prisma.matchResult.findMany({ take: 10 }) * * // Only select the `id` * const matchResultWithIdOnly = await prisma.matchResult.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> /** * Create a MatchResult. * @param {MatchResultCreateArgs} args - Arguments to create a MatchResult. * @example * // Create one MatchResult * const MatchResult = await prisma.matchResult.create({ * data: { * // ... data to create a MatchResult * } * }) * */ create(args: SelectSubset>): Prisma__MatchResultClient<$Result.GetResult, T, "create">, never, ExtArgs> /** * Create many MatchResults. * @param {MatchResultCreateManyArgs} args - Arguments to create many MatchResults. * @example * // Create many MatchResults * const matchResult = await prisma.matchResult.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many MatchResults and returns the data saved in the database. * @param {MatchResultCreateManyAndReturnArgs} args - Arguments to create many MatchResults. * @example * // Create many MatchResults * const matchResult = await prisma.matchResult.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many MatchResults and only return the `id` * const matchResultWithIdOnly = await prisma.matchResult.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> /** * Delete a MatchResult. * @param {MatchResultDeleteArgs} args - Arguments to delete one MatchResult. * @example * // Delete one MatchResult * const MatchResult = await prisma.matchResult.delete({ * where: { * // ... filter to delete one MatchResult * } * }) * */ delete(args: SelectSubset>): Prisma__MatchResultClient<$Result.GetResult, T, "delete">, never, ExtArgs> /** * Update one MatchResult. * @param {MatchResultUpdateArgs} args - Arguments to update one MatchResult. * @example * // Update one MatchResult * const matchResult = await prisma.matchResult.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__MatchResultClient<$Result.GetResult, T, "update">, never, ExtArgs> /** * Delete zero or more MatchResults. * @param {MatchResultDeleteManyArgs} args - Arguments to filter MatchResults to delete. * @example * // Delete a few MatchResults * const { count } = await prisma.matchResult.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more MatchResults. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MatchResultUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many MatchResults * const matchResult = await prisma.matchResult.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Create or update one MatchResult. * @param {MatchResultUpsertArgs} args - Arguments to update or create a MatchResult. * @example * // Update or create a MatchResult * const matchResult = await prisma.matchResult.upsert({ * create: { * // ... data to create a MatchResult * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the MatchResult we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__MatchResultClient<$Result.GetResult, T, "upsert">, never, ExtArgs> /** * Count the number of MatchResults. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MatchResultCountArgs} args - Arguments to filter MatchResults to count. * @example * // Count the number of MatchResults * const count = await prisma.matchResult.count({ * where: { * // ... the filter for the MatchResults we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a MatchResult. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MatchResultAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by MatchResult. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MatchResultGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends MatchResultGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: MatchResultGroupByArgs['orderBy'] } : { orderBy?: MatchResultGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMatchResultGroupByPayload : Prisma.PrismaPromise /** * Fields of the MatchResult model */ readonly fields: MatchResultFieldRefs; } /** * The delegate class that acts as a "Promise-like" for MatchResult. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__MatchResultClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise } /** * Fields of the MatchResult model */ interface MatchResultFieldRefs { readonly id: FieldRef<"MatchResult", 'String'> readonly userId: FieldRef<"MatchResult", 'String'> readonly grade: FieldRef<"MatchResult", 'Grade'> readonly won: FieldRef<"MatchResult", 'Boolean'> readonly eloChange: FieldRef<"MatchResult", 'Int'> readonly eloAfter: FieldRef<"MatchResult", 'Int'> readonly timeSpentMs: FieldRef<"MatchResult", 'Int'> readonly playedAt: FieldRef<"MatchResult", 'DateTime'> } // Custom InputTypes /** * MatchResult findUnique */ export type MatchResultFindUniqueArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * Filter, which MatchResult to fetch. */ where: MatchResultWhereUniqueInput } /** * MatchResult findUniqueOrThrow */ export type MatchResultFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * Filter, which MatchResult to fetch. */ where: MatchResultWhereUniqueInput } /** * MatchResult findFirst */ export type MatchResultFindFirstArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * Filter, which MatchResult to fetch. */ where?: MatchResultWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of MatchResults to fetch. */ orderBy?: MatchResultOrderByWithRelationInput | MatchResultOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for MatchResults. */ cursor?: MatchResultWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` MatchResults from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` MatchResults. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of MatchResults. */ distinct?: MatchResultScalarFieldEnum | MatchResultScalarFieldEnum[] } /** * MatchResult findFirstOrThrow */ export type MatchResultFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * Filter, which MatchResult to fetch. */ where?: MatchResultWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of MatchResults to fetch. */ orderBy?: MatchResultOrderByWithRelationInput | MatchResultOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for MatchResults. */ cursor?: MatchResultWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` MatchResults from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` MatchResults. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of MatchResults. */ distinct?: MatchResultScalarFieldEnum | MatchResultScalarFieldEnum[] } /** * MatchResult findMany */ export type MatchResultFindManyArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * Filter, which MatchResults to fetch. */ where?: MatchResultWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of MatchResults to fetch. */ orderBy?: MatchResultOrderByWithRelationInput | MatchResultOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing MatchResults. */ cursor?: MatchResultWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` MatchResults from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` MatchResults. */ skip?: number distinct?: MatchResultScalarFieldEnum | MatchResultScalarFieldEnum[] } /** * MatchResult create */ export type MatchResultCreateArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * The data needed to create a MatchResult. */ data: XOR } /** * MatchResult createMany */ export type MatchResultCreateManyArgs = { /** * The data used to create many MatchResults. */ data: MatchResultCreateManyInput | MatchResultCreateManyInput[] skipDuplicates?: boolean } /** * MatchResult createManyAndReturn */ export type MatchResultCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelectCreateManyAndReturn | null /** * The data used to create many MatchResults. */ data: MatchResultCreateManyInput | MatchResultCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ include?: MatchResultIncludeCreateManyAndReturn | null } /** * MatchResult update */ export type MatchResultUpdateArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * The data needed to update a MatchResult. */ data: XOR /** * Choose, which MatchResult to update. */ where: MatchResultWhereUniqueInput } /** * MatchResult updateMany */ export type MatchResultUpdateManyArgs = { /** * The data used to update MatchResults. */ data: XOR /** * Filter which MatchResults to update */ where?: MatchResultWhereInput } /** * MatchResult upsert */ export type MatchResultUpsertArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * The filter to search for the MatchResult to update in case it exists. */ where: MatchResultWhereUniqueInput /** * In case the MatchResult found by the `where` argument doesn't exist, create a new MatchResult with this data. */ create: XOR /** * In case the MatchResult was found with the provided `where` argument, update it with this data. */ update: XOR } /** * MatchResult delete */ export type MatchResultDeleteArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null /** * Filter which MatchResult to delete. */ where: MatchResultWhereUniqueInput } /** * MatchResult deleteMany */ export type MatchResultDeleteManyArgs = { /** * Filter which MatchResults to delete */ where?: MatchResultWhereInput } /** * MatchResult without action */ export type MatchResultDefaultArgs = { /** * Select specific fields to fetch from the MatchResult */ select?: MatchResultSelect | null /** * Choose, which related nodes to fetch as well */ include?: MatchResultInclude | null } /** * Enums */ export const TransactionIsolationLevel: { ReadUncommitted: 'ReadUncommitted', ReadCommitted: 'ReadCommitted', RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }; export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] export const UserScalarFieldEnum: { id: 'id', googleId: 'googleId', email: 'email', displayName: 'displayName', username: 'username', avatarUrl: 'avatarUrl', createdAt: 'createdAt', updatedAt: 'updatedAt' }; export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] export const QuestionScalarFieldEnum: { id: 'id', grade: 'grade', subject: 'subject', strand: 'strand', difficulty: 'difficulty', questionText: 'questionText', options: 'options', correctAnswer: 'correctAnswer', explanation: 'explanation', createdAt: 'createdAt' }; export type QuestionScalarFieldEnum = (typeof QuestionScalarFieldEnum)[keyof typeof QuestionScalarFieldEnum] export const GameSessionScalarFieldEnum: { id: 'id', userId: 'userId', grade: 'grade', subject: 'subject', status: 'status', score: 'score', totalQuestions: 'totalQuestions', correctAnswers: 'correctAnswers', startedAt: 'startedAt', completedAt: 'completedAt' }; export type GameSessionScalarFieldEnum = (typeof GameSessionScalarFieldEnum)[keyof typeof GameSessionScalarFieldEnum] export const UserAnswerScalarFieldEnum: { id: 'id', sessionId: 'sessionId', questionId: 'questionId', selectedAnswer: 'selectedAnswer', isCorrect: 'isCorrect', timeSpentMs: 'timeSpentMs', answeredAt: 'answeredAt' }; export type UserAnswerScalarFieldEnum = (typeof UserAnswerScalarFieldEnum)[keyof typeof UserAnswerScalarFieldEnum] export const LeaderboardEntryScalarFieldEnum: { id: 'id', userId: 'userId', grade: 'grade', elo: 'elo', bestTime: 'bestTime', gamesPlayed: 'gamesPlayed', totalCorrect: 'totalCorrect', updatedAt: 'updatedAt' }; export type LeaderboardEntryScalarFieldEnum = (typeof LeaderboardEntryScalarFieldEnum)[keyof typeof LeaderboardEntryScalarFieldEnum] export const MatchResultScalarFieldEnum: { id: 'id', userId: 'userId', grade: 'grade', won: 'won', eloChange: 'eloChange', eloAfter: 'eloAfter', timeSpentMs: 'timeSpentMs', playedAt: 'playedAt' }; export type MatchResultScalarFieldEnum = (typeof MatchResultScalarFieldEnum)[keyof typeof MatchResultScalarFieldEnum] export const SortOrder: { asc: 'asc', desc: 'desc' }; export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] export const JsonNullValueInput: { JsonNull: typeof JsonNull }; export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] export const QueryMode: { default: 'default', insensitive: 'insensitive' }; export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] export const NullsOrder: { first: 'first', last: 'last' }; export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] export const JsonNullValueFilter: { DbNull: typeof DbNull, JsonNull: typeof JsonNull, AnyNull: typeof AnyNull }; export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] /** * Field references */ /** * Reference to a field of type 'String' */ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> /** * Reference to a field of type 'String[]' */ export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> /** * Reference to a field of type 'DateTime' */ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> /** * Reference to a field of type 'DateTime[]' */ export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> /** * Reference to a field of type 'Grade' */ export type EnumGradeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Grade'> /** * Reference to a field of type 'Grade[]' */ export type ListEnumGradeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Grade[]'> /** * Reference to a field of type 'Subject' */ export type EnumSubjectFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Subject'> /** * Reference to a field of type 'Subject[]' */ export type ListEnumSubjectFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Subject[]'> /** * Reference to a field of type 'Difficulty' */ export type EnumDifficultyFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Difficulty'> /** * Reference to a field of type 'Difficulty[]' */ export type ListEnumDifficultyFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Difficulty[]'> /** * Reference to a field of type 'Json' */ export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'> /** * Reference to a field of type 'SessionStatus' */ export type EnumSessionStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SessionStatus'> /** * Reference to a field of type 'SessionStatus[]' */ export type ListEnumSessionStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SessionStatus[]'> /** * Reference to a field of type 'Int' */ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> /** * Reference to a field of type 'Int[]' */ export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> /** * Reference to a field of type 'Boolean' */ export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> /** * Reference to a field of type 'Float' */ export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> /** * Reference to a field of type 'Float[]' */ export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> /** * Deep Input Types */ export type UserWhereInput = { AND?: UserWhereInput | UserWhereInput[] OR?: UserWhereInput[] NOT?: UserWhereInput | UserWhereInput[] id?: StringFilter<"User"> | string googleId?: StringFilter<"User"> | string email?: StringFilter<"User"> | string displayName?: StringFilter<"User"> | string username?: StringFilter<"User"> | string avatarUrl?: StringNullableFilter<"User"> | string | null createdAt?: DateTimeFilter<"User"> | Date | string updatedAt?: DateTimeFilter<"User"> | Date | string sessions?: GameSessionListRelationFilter leaderboardEntries?: LeaderboardEntryListRelationFilter matchResults?: MatchResultListRelationFilter } export type UserOrderByWithRelationInput = { id?: SortOrder googleId?: SortOrder email?: SortOrder displayName?: SortOrder username?: SortOrder avatarUrl?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder sessions?: GameSessionOrderByRelationAggregateInput leaderboardEntries?: LeaderboardEntryOrderByRelationAggregateInput matchResults?: MatchResultOrderByRelationAggregateInput } export type UserWhereUniqueInput = Prisma.AtLeast<{ id?: string googleId?: string email?: string username?: string AND?: UserWhereInput | UserWhereInput[] OR?: UserWhereInput[] NOT?: UserWhereInput | UserWhereInput[] displayName?: StringFilter<"User"> | string avatarUrl?: StringNullableFilter<"User"> | string | null createdAt?: DateTimeFilter<"User"> | Date | string updatedAt?: DateTimeFilter<"User"> | Date | string sessions?: GameSessionListRelationFilter leaderboardEntries?: LeaderboardEntryListRelationFilter matchResults?: MatchResultListRelationFilter }, "id" | "googleId" | "email" | "username"> export type UserOrderByWithAggregationInput = { id?: SortOrder googleId?: SortOrder email?: SortOrder displayName?: SortOrder username?: SortOrder avatarUrl?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder _count?: UserCountOrderByAggregateInput _max?: UserMaxOrderByAggregateInput _min?: UserMinOrderByAggregateInput } export type UserScalarWhereWithAggregatesInput = { AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] OR?: UserScalarWhereWithAggregatesInput[] NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"User"> | string googleId?: StringWithAggregatesFilter<"User"> | string email?: StringWithAggregatesFilter<"User"> | string displayName?: StringWithAggregatesFilter<"User"> | string username?: StringWithAggregatesFilter<"User"> | string avatarUrl?: StringNullableWithAggregatesFilter<"User"> | string | null createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string } export type QuestionWhereInput = { AND?: QuestionWhereInput | QuestionWhereInput[] OR?: QuestionWhereInput[] NOT?: QuestionWhereInput | QuestionWhereInput[] id?: StringFilter<"Question"> | string grade?: EnumGradeFilter<"Question"> | $Enums.Grade subject?: EnumSubjectFilter<"Question"> | $Enums.Subject strand?: StringFilter<"Question"> | string difficulty?: EnumDifficultyFilter<"Question"> | $Enums.Difficulty questionText?: StringFilter<"Question"> | string options?: JsonFilter<"Question"> correctAnswer?: StringFilter<"Question"> | string explanation?: StringNullableFilter<"Question"> | string | null createdAt?: DateTimeFilter<"Question"> | Date | string answers?: UserAnswerListRelationFilter } export type QuestionOrderByWithRelationInput = { id?: SortOrder grade?: SortOrder subject?: SortOrder strand?: SortOrder difficulty?: SortOrder questionText?: SortOrder options?: SortOrder correctAnswer?: SortOrder explanation?: SortOrderInput | SortOrder createdAt?: SortOrder answers?: UserAnswerOrderByRelationAggregateInput } export type QuestionWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: QuestionWhereInput | QuestionWhereInput[] OR?: QuestionWhereInput[] NOT?: QuestionWhereInput | QuestionWhereInput[] grade?: EnumGradeFilter<"Question"> | $Enums.Grade subject?: EnumSubjectFilter<"Question"> | $Enums.Subject strand?: StringFilter<"Question"> | string difficulty?: EnumDifficultyFilter<"Question"> | $Enums.Difficulty questionText?: StringFilter<"Question"> | string options?: JsonFilter<"Question"> correctAnswer?: StringFilter<"Question"> | string explanation?: StringNullableFilter<"Question"> | string | null createdAt?: DateTimeFilter<"Question"> | Date | string answers?: UserAnswerListRelationFilter }, "id"> export type QuestionOrderByWithAggregationInput = { id?: SortOrder grade?: SortOrder subject?: SortOrder strand?: SortOrder difficulty?: SortOrder questionText?: SortOrder options?: SortOrder correctAnswer?: SortOrder explanation?: SortOrderInput | SortOrder createdAt?: SortOrder _count?: QuestionCountOrderByAggregateInput _max?: QuestionMaxOrderByAggregateInput _min?: QuestionMinOrderByAggregateInput } export type QuestionScalarWhereWithAggregatesInput = { AND?: QuestionScalarWhereWithAggregatesInput | QuestionScalarWhereWithAggregatesInput[] OR?: QuestionScalarWhereWithAggregatesInput[] NOT?: QuestionScalarWhereWithAggregatesInput | QuestionScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"Question"> | string grade?: EnumGradeWithAggregatesFilter<"Question"> | $Enums.Grade subject?: EnumSubjectWithAggregatesFilter<"Question"> | $Enums.Subject strand?: StringWithAggregatesFilter<"Question"> | string difficulty?: EnumDifficultyWithAggregatesFilter<"Question"> | $Enums.Difficulty questionText?: StringWithAggregatesFilter<"Question"> | string options?: JsonWithAggregatesFilter<"Question"> correctAnswer?: StringWithAggregatesFilter<"Question"> | string explanation?: StringNullableWithAggregatesFilter<"Question"> | string | null createdAt?: DateTimeWithAggregatesFilter<"Question"> | Date | string } export type GameSessionWhereInput = { AND?: GameSessionWhereInput | GameSessionWhereInput[] OR?: GameSessionWhereInput[] NOT?: GameSessionWhereInput | GameSessionWhereInput[] id?: StringFilter<"GameSession"> | string userId?: StringFilter<"GameSession"> | string grade?: EnumGradeFilter<"GameSession"> | $Enums.Grade subject?: EnumSubjectFilter<"GameSession"> | $Enums.Subject status?: EnumSessionStatusFilter<"GameSession"> | $Enums.SessionStatus score?: IntFilter<"GameSession"> | number totalQuestions?: IntFilter<"GameSession"> | number correctAnswers?: IntFilter<"GameSession"> | number startedAt?: DateTimeFilter<"GameSession"> | Date | string completedAt?: DateTimeNullableFilter<"GameSession"> | Date | string | null user?: XOR answers?: UserAnswerListRelationFilter } export type GameSessionOrderByWithRelationInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder subject?: SortOrder status?: SortOrder score?: SortOrder totalQuestions?: SortOrder correctAnswers?: SortOrder startedAt?: SortOrder completedAt?: SortOrderInput | SortOrder user?: UserOrderByWithRelationInput answers?: UserAnswerOrderByRelationAggregateInput } export type GameSessionWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: GameSessionWhereInput | GameSessionWhereInput[] OR?: GameSessionWhereInput[] NOT?: GameSessionWhereInput | GameSessionWhereInput[] userId?: StringFilter<"GameSession"> | string grade?: EnumGradeFilter<"GameSession"> | $Enums.Grade subject?: EnumSubjectFilter<"GameSession"> | $Enums.Subject status?: EnumSessionStatusFilter<"GameSession"> | $Enums.SessionStatus score?: IntFilter<"GameSession"> | number totalQuestions?: IntFilter<"GameSession"> | number correctAnswers?: IntFilter<"GameSession"> | number startedAt?: DateTimeFilter<"GameSession"> | Date | string completedAt?: DateTimeNullableFilter<"GameSession"> | Date | string | null user?: XOR answers?: UserAnswerListRelationFilter }, "id"> export type GameSessionOrderByWithAggregationInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder subject?: SortOrder status?: SortOrder score?: SortOrder totalQuestions?: SortOrder correctAnswers?: SortOrder startedAt?: SortOrder completedAt?: SortOrderInput | SortOrder _count?: GameSessionCountOrderByAggregateInput _avg?: GameSessionAvgOrderByAggregateInput _max?: GameSessionMaxOrderByAggregateInput _min?: GameSessionMinOrderByAggregateInput _sum?: GameSessionSumOrderByAggregateInput } export type GameSessionScalarWhereWithAggregatesInput = { AND?: GameSessionScalarWhereWithAggregatesInput | GameSessionScalarWhereWithAggregatesInput[] OR?: GameSessionScalarWhereWithAggregatesInput[] NOT?: GameSessionScalarWhereWithAggregatesInput | GameSessionScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"GameSession"> | string userId?: StringWithAggregatesFilter<"GameSession"> | string grade?: EnumGradeWithAggregatesFilter<"GameSession"> | $Enums.Grade subject?: EnumSubjectWithAggregatesFilter<"GameSession"> | $Enums.Subject status?: EnumSessionStatusWithAggregatesFilter<"GameSession"> | $Enums.SessionStatus score?: IntWithAggregatesFilter<"GameSession"> | number totalQuestions?: IntWithAggregatesFilter<"GameSession"> | number correctAnswers?: IntWithAggregatesFilter<"GameSession"> | number startedAt?: DateTimeWithAggregatesFilter<"GameSession"> | Date | string completedAt?: DateTimeNullableWithAggregatesFilter<"GameSession"> | Date | string | null } export type UserAnswerWhereInput = { AND?: UserAnswerWhereInput | UserAnswerWhereInput[] OR?: UserAnswerWhereInput[] NOT?: UserAnswerWhereInput | UserAnswerWhereInput[] id?: StringFilter<"UserAnswer"> | string sessionId?: StringFilter<"UserAnswer"> | string questionId?: StringFilter<"UserAnswer"> | string selectedAnswer?: StringFilter<"UserAnswer"> | string isCorrect?: BoolFilter<"UserAnswer"> | boolean timeSpentMs?: IntFilter<"UserAnswer"> | number answeredAt?: DateTimeFilter<"UserAnswer"> | Date | string session?: XOR question?: XOR } export type UserAnswerOrderByWithRelationInput = { id?: SortOrder sessionId?: SortOrder questionId?: SortOrder selectedAnswer?: SortOrder isCorrect?: SortOrder timeSpentMs?: SortOrder answeredAt?: SortOrder session?: GameSessionOrderByWithRelationInput question?: QuestionOrderByWithRelationInput } export type UserAnswerWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: UserAnswerWhereInput | UserAnswerWhereInput[] OR?: UserAnswerWhereInput[] NOT?: UserAnswerWhereInput | UserAnswerWhereInput[] sessionId?: StringFilter<"UserAnswer"> | string questionId?: StringFilter<"UserAnswer"> | string selectedAnswer?: StringFilter<"UserAnswer"> | string isCorrect?: BoolFilter<"UserAnswer"> | boolean timeSpentMs?: IntFilter<"UserAnswer"> | number answeredAt?: DateTimeFilter<"UserAnswer"> | Date | string session?: XOR question?: XOR }, "id"> export type UserAnswerOrderByWithAggregationInput = { id?: SortOrder sessionId?: SortOrder questionId?: SortOrder selectedAnswer?: SortOrder isCorrect?: SortOrder timeSpentMs?: SortOrder answeredAt?: SortOrder _count?: UserAnswerCountOrderByAggregateInput _avg?: UserAnswerAvgOrderByAggregateInput _max?: UserAnswerMaxOrderByAggregateInput _min?: UserAnswerMinOrderByAggregateInput _sum?: UserAnswerSumOrderByAggregateInput } export type UserAnswerScalarWhereWithAggregatesInput = { AND?: UserAnswerScalarWhereWithAggregatesInput | UserAnswerScalarWhereWithAggregatesInput[] OR?: UserAnswerScalarWhereWithAggregatesInput[] NOT?: UserAnswerScalarWhereWithAggregatesInput | UserAnswerScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"UserAnswer"> | string sessionId?: StringWithAggregatesFilter<"UserAnswer"> | string questionId?: StringWithAggregatesFilter<"UserAnswer"> | string selectedAnswer?: StringWithAggregatesFilter<"UserAnswer"> | string isCorrect?: BoolWithAggregatesFilter<"UserAnswer"> | boolean timeSpentMs?: IntWithAggregatesFilter<"UserAnswer"> | number answeredAt?: DateTimeWithAggregatesFilter<"UserAnswer"> | Date | string } export type LeaderboardEntryWhereInput = { AND?: LeaderboardEntryWhereInput | LeaderboardEntryWhereInput[] OR?: LeaderboardEntryWhereInput[] NOT?: LeaderboardEntryWhereInput | LeaderboardEntryWhereInput[] id?: StringFilter<"LeaderboardEntry"> | string userId?: StringFilter<"LeaderboardEntry"> | string grade?: EnumGradeFilter<"LeaderboardEntry"> | $Enums.Grade elo?: IntFilter<"LeaderboardEntry"> | number bestTime?: IntNullableFilter<"LeaderboardEntry"> | number | null gamesPlayed?: IntFilter<"LeaderboardEntry"> | number totalCorrect?: IntFilter<"LeaderboardEntry"> | number updatedAt?: DateTimeFilter<"LeaderboardEntry"> | Date | string user?: XOR } export type LeaderboardEntryOrderByWithRelationInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder elo?: SortOrder bestTime?: SortOrderInput | SortOrder gamesPlayed?: SortOrder totalCorrect?: SortOrder updatedAt?: SortOrder user?: UserOrderByWithRelationInput } export type LeaderboardEntryWhereUniqueInput = Prisma.AtLeast<{ id?: string userId_grade?: LeaderboardEntryUserIdGradeCompoundUniqueInput AND?: LeaderboardEntryWhereInput | LeaderboardEntryWhereInput[] OR?: LeaderboardEntryWhereInput[] NOT?: LeaderboardEntryWhereInput | LeaderboardEntryWhereInput[] userId?: StringFilter<"LeaderboardEntry"> | string grade?: EnumGradeFilter<"LeaderboardEntry"> | $Enums.Grade elo?: IntFilter<"LeaderboardEntry"> | number bestTime?: IntNullableFilter<"LeaderboardEntry"> | number | null gamesPlayed?: IntFilter<"LeaderboardEntry"> | number totalCorrect?: IntFilter<"LeaderboardEntry"> | number updatedAt?: DateTimeFilter<"LeaderboardEntry"> | Date | string user?: XOR }, "id" | "userId_grade"> export type LeaderboardEntryOrderByWithAggregationInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder elo?: SortOrder bestTime?: SortOrderInput | SortOrder gamesPlayed?: SortOrder totalCorrect?: SortOrder updatedAt?: SortOrder _count?: LeaderboardEntryCountOrderByAggregateInput _avg?: LeaderboardEntryAvgOrderByAggregateInput _max?: LeaderboardEntryMaxOrderByAggregateInput _min?: LeaderboardEntryMinOrderByAggregateInput _sum?: LeaderboardEntrySumOrderByAggregateInput } export type LeaderboardEntryScalarWhereWithAggregatesInput = { AND?: LeaderboardEntryScalarWhereWithAggregatesInput | LeaderboardEntryScalarWhereWithAggregatesInput[] OR?: LeaderboardEntryScalarWhereWithAggregatesInput[] NOT?: LeaderboardEntryScalarWhereWithAggregatesInput | LeaderboardEntryScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"LeaderboardEntry"> | string userId?: StringWithAggregatesFilter<"LeaderboardEntry"> | string grade?: EnumGradeWithAggregatesFilter<"LeaderboardEntry"> | $Enums.Grade elo?: IntWithAggregatesFilter<"LeaderboardEntry"> | number bestTime?: IntNullableWithAggregatesFilter<"LeaderboardEntry"> | number | null gamesPlayed?: IntWithAggregatesFilter<"LeaderboardEntry"> | number totalCorrect?: IntWithAggregatesFilter<"LeaderboardEntry"> | number updatedAt?: DateTimeWithAggregatesFilter<"LeaderboardEntry"> | Date | string } export type MatchResultWhereInput = { AND?: MatchResultWhereInput | MatchResultWhereInput[] OR?: MatchResultWhereInput[] NOT?: MatchResultWhereInput | MatchResultWhereInput[] id?: StringFilter<"MatchResult"> | string userId?: StringFilter<"MatchResult"> | string grade?: EnumGradeFilter<"MatchResult"> | $Enums.Grade won?: BoolFilter<"MatchResult"> | boolean eloChange?: IntFilter<"MatchResult"> | number eloAfter?: IntFilter<"MatchResult"> | number timeSpentMs?: IntNullableFilter<"MatchResult"> | number | null playedAt?: DateTimeFilter<"MatchResult"> | Date | string user?: XOR } export type MatchResultOrderByWithRelationInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder won?: SortOrder eloChange?: SortOrder eloAfter?: SortOrder timeSpentMs?: SortOrderInput | SortOrder playedAt?: SortOrder user?: UserOrderByWithRelationInput } export type MatchResultWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: MatchResultWhereInput | MatchResultWhereInput[] OR?: MatchResultWhereInput[] NOT?: MatchResultWhereInput | MatchResultWhereInput[] userId?: StringFilter<"MatchResult"> | string grade?: EnumGradeFilter<"MatchResult"> | $Enums.Grade won?: BoolFilter<"MatchResult"> | boolean eloChange?: IntFilter<"MatchResult"> | number eloAfter?: IntFilter<"MatchResult"> | number timeSpentMs?: IntNullableFilter<"MatchResult"> | number | null playedAt?: DateTimeFilter<"MatchResult"> | Date | string user?: XOR }, "id"> export type MatchResultOrderByWithAggregationInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder won?: SortOrder eloChange?: SortOrder eloAfter?: SortOrder timeSpentMs?: SortOrderInput | SortOrder playedAt?: SortOrder _count?: MatchResultCountOrderByAggregateInput _avg?: MatchResultAvgOrderByAggregateInput _max?: MatchResultMaxOrderByAggregateInput _min?: MatchResultMinOrderByAggregateInput _sum?: MatchResultSumOrderByAggregateInput } export type MatchResultScalarWhereWithAggregatesInput = { AND?: MatchResultScalarWhereWithAggregatesInput | MatchResultScalarWhereWithAggregatesInput[] OR?: MatchResultScalarWhereWithAggregatesInput[] NOT?: MatchResultScalarWhereWithAggregatesInput | MatchResultScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"MatchResult"> | string userId?: StringWithAggregatesFilter<"MatchResult"> | string grade?: EnumGradeWithAggregatesFilter<"MatchResult"> | $Enums.Grade won?: BoolWithAggregatesFilter<"MatchResult"> | boolean eloChange?: IntWithAggregatesFilter<"MatchResult"> | number eloAfter?: IntWithAggregatesFilter<"MatchResult"> | number timeSpentMs?: IntNullableWithAggregatesFilter<"MatchResult"> | number | null playedAt?: DateTimeWithAggregatesFilter<"MatchResult"> | Date | string } export type UserCreateInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string sessions?: GameSessionCreateNestedManyWithoutUserInput leaderboardEntries?: LeaderboardEntryCreateNestedManyWithoutUserInput matchResults?: MatchResultCreateNestedManyWithoutUserInput } export type UserUncheckedCreateInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string sessions?: GameSessionUncheckedCreateNestedManyWithoutUserInput leaderboardEntries?: LeaderboardEntryUncheckedCreateNestedManyWithoutUserInput matchResults?: MatchResultUncheckedCreateNestedManyWithoutUserInput } export type UserUpdateInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string sessions?: GameSessionUpdateManyWithoutUserNestedInput leaderboardEntries?: LeaderboardEntryUpdateManyWithoutUserNestedInput matchResults?: MatchResultUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string sessions?: GameSessionUncheckedUpdateManyWithoutUserNestedInput leaderboardEntries?: LeaderboardEntryUncheckedUpdateManyWithoutUserNestedInput matchResults?: MatchResultUncheckedUpdateManyWithoutUserNestedInput } export type UserCreateManyInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string } export type UserUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type QuestionCreateInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject strand: string difficulty: $Enums.Difficulty questionText: string options: JsonNullValueInput | InputJsonValue correctAnswer: string explanation?: string | null createdAt?: Date | string answers?: UserAnswerCreateNestedManyWithoutQuestionInput } export type QuestionUncheckedCreateInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject strand: string difficulty: $Enums.Difficulty questionText: string options: JsonNullValueInput | InputJsonValue correctAnswer: string explanation?: string | null createdAt?: Date | string answers?: UserAnswerUncheckedCreateNestedManyWithoutQuestionInput } export type QuestionUpdateInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject strand?: StringFieldUpdateOperationsInput | string difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty questionText?: StringFieldUpdateOperationsInput | string options?: JsonNullValueInput | InputJsonValue correctAnswer?: StringFieldUpdateOperationsInput | string explanation?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string answers?: UserAnswerUpdateManyWithoutQuestionNestedInput } export type QuestionUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject strand?: StringFieldUpdateOperationsInput | string difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty questionText?: StringFieldUpdateOperationsInput | string options?: JsonNullValueInput | InputJsonValue correctAnswer?: StringFieldUpdateOperationsInput | string explanation?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string answers?: UserAnswerUncheckedUpdateManyWithoutQuestionNestedInput } export type QuestionCreateManyInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject strand: string difficulty: $Enums.Difficulty questionText: string options: JsonNullValueInput | InputJsonValue correctAnswer: string explanation?: string | null createdAt?: Date | string } export type QuestionUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject strand?: StringFieldUpdateOperationsInput | string difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty questionText?: StringFieldUpdateOperationsInput | string options?: JsonNullValueInput | InputJsonValue correctAnswer?: StringFieldUpdateOperationsInput | string explanation?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type QuestionUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject strand?: StringFieldUpdateOperationsInput | string difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty questionText?: StringFieldUpdateOperationsInput | string options?: JsonNullValueInput | InputJsonValue correctAnswer?: StringFieldUpdateOperationsInput | string explanation?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type GameSessionCreateInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject status?: $Enums.SessionStatus score?: number totalQuestions: number correctAnswers?: number startedAt?: Date | string completedAt?: Date | string | null user: UserCreateNestedOneWithoutSessionsInput answers?: UserAnswerCreateNestedManyWithoutSessionInput } export type GameSessionUncheckedCreateInput = { id?: string userId: string grade: $Enums.Grade subject: $Enums.Subject status?: $Enums.SessionStatus score?: number totalQuestions: number correctAnswers?: number startedAt?: Date | string completedAt?: Date | string | null answers?: UserAnswerUncheckedCreateNestedManyWithoutSessionInput } export type GameSessionUpdateInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null user?: UserUpdateOneRequiredWithoutSessionsNestedInput answers?: UserAnswerUpdateManyWithoutSessionNestedInput } export type GameSessionUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null answers?: UserAnswerUncheckedUpdateManyWithoutSessionNestedInput } export type GameSessionCreateManyInput = { id?: string userId: string grade: $Enums.Grade subject: $Enums.Subject status?: $Enums.SessionStatus score?: number totalQuestions: number correctAnswers?: number startedAt?: Date | string completedAt?: Date | string | null } export type GameSessionUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type GameSessionUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type UserAnswerCreateInput = { id?: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string session: GameSessionCreateNestedOneWithoutAnswersInput question: QuestionCreateNestedOneWithoutAnswersInput } export type UserAnswerUncheckedCreateInput = { id?: string sessionId: string questionId: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string } export type UserAnswerUpdateInput = { id?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string session?: GameSessionUpdateOneRequiredWithoutAnswersNestedInput question?: QuestionUpdateOneRequiredWithoutAnswersNestedInput } export type UserAnswerUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string sessionId?: StringFieldUpdateOperationsInput | string questionId?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserAnswerCreateManyInput = { id?: string sessionId: string questionId: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string } export type UserAnswerUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserAnswerUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string sessionId?: StringFieldUpdateOperationsInput | string questionId?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type LeaderboardEntryCreateInput = { id?: string grade: $Enums.Grade elo?: number bestTime?: number | null gamesPlayed?: number totalCorrect?: number updatedAt?: Date | string user: UserCreateNestedOneWithoutLeaderboardEntriesInput } export type LeaderboardEntryUncheckedCreateInput = { id?: string userId: string grade: $Enums.Grade elo?: number bestTime?: number | null gamesPlayed?: number totalCorrect?: number updatedAt?: Date | string } export type LeaderboardEntryUpdateInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade elo?: IntFieldUpdateOperationsInput | number bestTime?: NullableIntFieldUpdateOperationsInput | number | null gamesPlayed?: IntFieldUpdateOperationsInput | number totalCorrect?: IntFieldUpdateOperationsInput | number updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string user?: UserUpdateOneRequiredWithoutLeaderboardEntriesNestedInput } export type LeaderboardEntryUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade elo?: IntFieldUpdateOperationsInput | number bestTime?: NullableIntFieldUpdateOperationsInput | number | null gamesPlayed?: IntFieldUpdateOperationsInput | number totalCorrect?: IntFieldUpdateOperationsInput | number updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type LeaderboardEntryCreateManyInput = { id?: string userId: string grade: $Enums.Grade elo?: number bestTime?: number | null gamesPlayed?: number totalCorrect?: number updatedAt?: Date | string } export type LeaderboardEntryUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade elo?: IntFieldUpdateOperationsInput | number bestTime?: NullableIntFieldUpdateOperationsInput | number | null gamesPlayed?: IntFieldUpdateOperationsInput | number totalCorrect?: IntFieldUpdateOperationsInput | number updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type LeaderboardEntryUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade elo?: IntFieldUpdateOperationsInput | number bestTime?: NullableIntFieldUpdateOperationsInput | number | null gamesPlayed?: IntFieldUpdateOperationsInput | number totalCorrect?: IntFieldUpdateOperationsInput | number updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type MatchResultCreateInput = { id?: string grade: $Enums.Grade won: boolean eloChange: number eloAfter: number timeSpentMs?: number | null playedAt?: Date | string user: UserCreateNestedOneWithoutMatchResultsInput } export type MatchResultUncheckedCreateInput = { id?: string userId: string grade: $Enums.Grade won: boolean eloChange: number eloAfter: number timeSpentMs?: number | null playedAt?: Date | string } export type MatchResultUpdateInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade won?: BoolFieldUpdateOperationsInput | boolean eloChange?: IntFieldUpdateOperationsInput | number eloAfter?: IntFieldUpdateOperationsInput | number timeSpentMs?: NullableIntFieldUpdateOperationsInput | number | null playedAt?: DateTimeFieldUpdateOperationsInput | Date | string user?: UserUpdateOneRequiredWithoutMatchResultsNestedInput } export type MatchResultUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade won?: BoolFieldUpdateOperationsInput | boolean eloChange?: IntFieldUpdateOperationsInput | number eloAfter?: IntFieldUpdateOperationsInput | number timeSpentMs?: NullableIntFieldUpdateOperationsInput | number | null playedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type MatchResultCreateManyInput = { id?: string userId: string grade: $Enums.Grade won: boolean eloChange: number eloAfter: number timeSpentMs?: number | null playedAt?: Date | string } export type MatchResultUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade won?: BoolFieldUpdateOperationsInput | boolean eloChange?: IntFieldUpdateOperationsInput | number eloAfter?: IntFieldUpdateOperationsInput | number timeSpentMs?: NullableIntFieldUpdateOperationsInput | number | null playedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type MatchResultUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade won?: BoolFieldUpdateOperationsInput | boolean eloChange?: IntFieldUpdateOperationsInput | number eloAfter?: IntFieldUpdateOperationsInput | number timeSpentMs?: NullableIntFieldUpdateOperationsInput | number | null playedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type StringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> notIn?: string[] | ListStringFieldRefInput<$PrismaModel> lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> mode?: QueryMode not?: NestedStringFilter<$PrismaModel> | string } export type StringNullableFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | ListStringFieldRefInput<$PrismaModel> | null notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> mode?: QueryMode not?: NestedStringNullableFilter<$PrismaModel> | string | null } export type DateTimeFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> not?: NestedDateTimeFilter<$PrismaModel> | Date | string } export type GameSessionListRelationFilter = { every?: GameSessionWhereInput some?: GameSessionWhereInput none?: GameSessionWhereInput } export type LeaderboardEntryListRelationFilter = { every?: LeaderboardEntryWhereInput some?: LeaderboardEntryWhereInput none?: LeaderboardEntryWhereInput } export type MatchResultListRelationFilter = { every?: MatchResultWhereInput some?: MatchResultWhereInput none?: MatchResultWhereInput } export type SortOrderInput = { sort: SortOrder nulls?: NullsOrder } export type GameSessionOrderByRelationAggregateInput = { _count?: SortOrder } export type LeaderboardEntryOrderByRelationAggregateInput = { _count?: SortOrder } export type MatchResultOrderByRelationAggregateInput = { _count?: SortOrder } export type UserCountOrderByAggregateInput = { id?: SortOrder googleId?: SortOrder email?: SortOrder displayName?: SortOrder username?: SortOrder avatarUrl?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type UserMaxOrderByAggregateInput = { id?: SortOrder googleId?: SortOrder email?: SortOrder displayName?: SortOrder username?: SortOrder avatarUrl?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type UserMinOrderByAggregateInput = { id?: SortOrder googleId?: SortOrder email?: SortOrder displayName?: SortOrder username?: SortOrder avatarUrl?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type StringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> notIn?: string[] | ListStringFieldRefInput<$PrismaModel> lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> mode?: QueryMode not?: NestedStringWithAggregatesFilter<$PrismaModel> | string _count?: NestedIntFilter<$PrismaModel> _min?: NestedStringFilter<$PrismaModel> _max?: NestedStringFilter<$PrismaModel> } export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | ListStringFieldRefInput<$PrismaModel> | null notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> mode?: QueryMode not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null _count?: NestedIntNullableFilter<$PrismaModel> _min?: NestedStringNullableFilter<$PrismaModel> _max?: NestedStringNullableFilter<$PrismaModel> } export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string _count?: NestedIntFilter<$PrismaModel> _min?: NestedDateTimeFilter<$PrismaModel> _max?: NestedDateTimeFilter<$PrismaModel> } export type EnumGradeFilter<$PrismaModel = never> = { equals?: $Enums.Grade | EnumGradeFieldRefInput<$PrismaModel> in?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel> notIn?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel> not?: NestedEnumGradeFilter<$PrismaModel> | $Enums.Grade } export type EnumSubjectFilter<$PrismaModel = never> = { equals?: $Enums.Subject | EnumSubjectFieldRefInput<$PrismaModel> in?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel> notIn?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel> not?: NestedEnumSubjectFilter<$PrismaModel> | $Enums.Subject } export type EnumDifficultyFilter<$PrismaModel = never> = { equals?: $Enums.Difficulty | EnumDifficultyFieldRefInput<$PrismaModel> in?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel> notIn?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel> not?: NestedEnumDifficultyFilter<$PrismaModel> | $Enums.Difficulty } export type JsonFilter<$PrismaModel = never> = | PatchUndefined< Either>, Exclude>, 'path'>>, Required> > | OptionalFlat>, 'path'>> export type JsonFilterBase<$PrismaModel = never> = { equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter path?: string[] string_contains?: string | StringFieldRefInput<$PrismaModel> string_starts_with?: string | StringFieldRefInput<$PrismaModel> string_ends_with?: string | StringFieldRefInput<$PrismaModel> array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter } export type UserAnswerListRelationFilter = { every?: UserAnswerWhereInput some?: UserAnswerWhereInput none?: UserAnswerWhereInput } export type UserAnswerOrderByRelationAggregateInput = { _count?: SortOrder } export type QuestionCountOrderByAggregateInput = { id?: SortOrder grade?: SortOrder subject?: SortOrder strand?: SortOrder difficulty?: SortOrder questionText?: SortOrder options?: SortOrder correctAnswer?: SortOrder explanation?: SortOrder createdAt?: SortOrder } export type QuestionMaxOrderByAggregateInput = { id?: SortOrder grade?: SortOrder subject?: SortOrder strand?: SortOrder difficulty?: SortOrder questionText?: SortOrder correctAnswer?: SortOrder explanation?: SortOrder createdAt?: SortOrder } export type QuestionMinOrderByAggregateInput = { id?: SortOrder grade?: SortOrder subject?: SortOrder strand?: SortOrder difficulty?: SortOrder questionText?: SortOrder correctAnswer?: SortOrder explanation?: SortOrder createdAt?: SortOrder } export type EnumGradeWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.Grade | EnumGradeFieldRefInput<$PrismaModel> in?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel> notIn?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel> not?: NestedEnumGradeWithAggregatesFilter<$PrismaModel> | $Enums.Grade _count?: NestedIntFilter<$PrismaModel> _min?: NestedEnumGradeFilter<$PrismaModel> _max?: NestedEnumGradeFilter<$PrismaModel> } export type EnumSubjectWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.Subject | EnumSubjectFieldRefInput<$PrismaModel> in?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel> notIn?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel> not?: NestedEnumSubjectWithAggregatesFilter<$PrismaModel> | $Enums.Subject _count?: NestedIntFilter<$PrismaModel> _min?: NestedEnumSubjectFilter<$PrismaModel> _max?: NestedEnumSubjectFilter<$PrismaModel> } export type EnumDifficultyWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.Difficulty | EnumDifficultyFieldRefInput<$PrismaModel> in?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel> notIn?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel> not?: NestedEnumDifficultyWithAggregatesFilter<$PrismaModel> | $Enums.Difficulty _count?: NestedIntFilter<$PrismaModel> _min?: NestedEnumDifficultyFilter<$PrismaModel> _max?: NestedEnumDifficultyFilter<$PrismaModel> } export type JsonWithAggregatesFilter<$PrismaModel = never> = | PatchUndefined< Either>, Exclude>, 'path'>>, Required> > | OptionalFlat>, 'path'>> export type JsonWithAggregatesFilterBase<$PrismaModel = never> = { equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter path?: string[] string_contains?: string | StringFieldRefInput<$PrismaModel> string_starts_with?: string | StringFieldRefInput<$PrismaModel> string_ends_with?: string | StringFieldRefInput<$PrismaModel> array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter _count?: NestedIntFilter<$PrismaModel> _min?: NestedJsonFilter<$PrismaModel> _max?: NestedJsonFilter<$PrismaModel> } export type EnumSessionStatusFilter<$PrismaModel = never> = { equals?: $Enums.SessionStatus | EnumSessionStatusFieldRefInput<$PrismaModel> in?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel> notIn?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel> not?: NestedEnumSessionStatusFilter<$PrismaModel> | $Enums.SessionStatus } export type IntFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] | ListIntFieldRefInput<$PrismaModel> notIn?: number[] | ListIntFieldRefInput<$PrismaModel> lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntFilter<$PrismaModel> | number } export type DateTimeNullableFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null } export type UserRelationFilter = { is?: UserWhereInput isNot?: UserWhereInput } export type GameSessionCountOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder subject?: SortOrder status?: SortOrder score?: SortOrder totalQuestions?: SortOrder correctAnswers?: SortOrder startedAt?: SortOrder completedAt?: SortOrder } export type GameSessionAvgOrderByAggregateInput = { score?: SortOrder totalQuestions?: SortOrder correctAnswers?: SortOrder } export type GameSessionMaxOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder subject?: SortOrder status?: SortOrder score?: SortOrder totalQuestions?: SortOrder correctAnswers?: SortOrder startedAt?: SortOrder completedAt?: SortOrder } export type GameSessionMinOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder subject?: SortOrder status?: SortOrder score?: SortOrder totalQuestions?: SortOrder correctAnswers?: SortOrder startedAt?: SortOrder completedAt?: SortOrder } export type GameSessionSumOrderByAggregateInput = { score?: SortOrder totalQuestions?: SortOrder correctAnswers?: SortOrder } export type EnumSessionStatusWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.SessionStatus | EnumSessionStatusFieldRefInput<$PrismaModel> in?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel> notIn?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel> not?: NestedEnumSessionStatusWithAggregatesFilter<$PrismaModel> | $Enums.SessionStatus _count?: NestedIntFilter<$PrismaModel> _min?: NestedEnumSessionStatusFilter<$PrismaModel> _max?: NestedEnumSessionStatusFilter<$PrismaModel> } export type IntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] | ListIntFieldRefInput<$PrismaModel> notIn?: number[] | ListIntFieldRefInput<$PrismaModel> lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntWithAggregatesFilter<$PrismaModel> | number _count?: NestedIntFilter<$PrismaModel> _avg?: NestedFloatFilter<$PrismaModel> _sum?: NestedIntFilter<$PrismaModel> _min?: NestedIntFilter<$PrismaModel> _max?: NestedIntFilter<$PrismaModel> } export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null _count?: NestedIntNullableFilter<$PrismaModel> _min?: NestedDateTimeNullableFilter<$PrismaModel> _max?: NestedDateTimeNullableFilter<$PrismaModel> } export type BoolFilter<$PrismaModel = never> = { equals?: boolean | BooleanFieldRefInput<$PrismaModel> not?: NestedBoolFilter<$PrismaModel> | boolean } export type GameSessionRelationFilter = { is?: GameSessionWhereInput isNot?: GameSessionWhereInput } export type QuestionRelationFilter = { is?: QuestionWhereInput isNot?: QuestionWhereInput } export type UserAnswerCountOrderByAggregateInput = { id?: SortOrder sessionId?: SortOrder questionId?: SortOrder selectedAnswer?: SortOrder isCorrect?: SortOrder timeSpentMs?: SortOrder answeredAt?: SortOrder } export type UserAnswerAvgOrderByAggregateInput = { timeSpentMs?: SortOrder } export type UserAnswerMaxOrderByAggregateInput = { id?: SortOrder sessionId?: SortOrder questionId?: SortOrder selectedAnswer?: SortOrder isCorrect?: SortOrder timeSpentMs?: SortOrder answeredAt?: SortOrder } export type UserAnswerMinOrderByAggregateInput = { id?: SortOrder sessionId?: SortOrder questionId?: SortOrder selectedAnswer?: SortOrder isCorrect?: SortOrder timeSpentMs?: SortOrder answeredAt?: SortOrder } export type UserAnswerSumOrderByAggregateInput = { timeSpentMs?: SortOrder } export type BoolWithAggregatesFilter<$PrismaModel = never> = { equals?: boolean | BooleanFieldRefInput<$PrismaModel> not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean _count?: NestedIntFilter<$PrismaModel> _min?: NestedBoolFilter<$PrismaModel> _max?: NestedBoolFilter<$PrismaModel> } export type IntNullableFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | ListIntFieldRefInput<$PrismaModel> | null notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableFilter<$PrismaModel> | number | null } export type LeaderboardEntryUserIdGradeCompoundUniqueInput = { userId: string grade: $Enums.Grade } export type LeaderboardEntryCountOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder elo?: SortOrder bestTime?: SortOrder gamesPlayed?: SortOrder totalCorrect?: SortOrder updatedAt?: SortOrder } export type LeaderboardEntryAvgOrderByAggregateInput = { elo?: SortOrder bestTime?: SortOrder gamesPlayed?: SortOrder totalCorrect?: SortOrder } export type LeaderboardEntryMaxOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder elo?: SortOrder bestTime?: SortOrder gamesPlayed?: SortOrder totalCorrect?: SortOrder updatedAt?: SortOrder } export type LeaderboardEntryMinOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder elo?: SortOrder bestTime?: SortOrder gamesPlayed?: SortOrder totalCorrect?: SortOrder updatedAt?: SortOrder } export type LeaderboardEntrySumOrderByAggregateInput = { elo?: SortOrder bestTime?: SortOrder gamesPlayed?: SortOrder totalCorrect?: SortOrder } export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | ListIntFieldRefInput<$PrismaModel> | null notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null _count?: NestedIntNullableFilter<$PrismaModel> _avg?: NestedFloatNullableFilter<$PrismaModel> _sum?: NestedIntNullableFilter<$PrismaModel> _min?: NestedIntNullableFilter<$PrismaModel> _max?: NestedIntNullableFilter<$PrismaModel> } export type MatchResultCountOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder won?: SortOrder eloChange?: SortOrder eloAfter?: SortOrder timeSpentMs?: SortOrder playedAt?: SortOrder } export type MatchResultAvgOrderByAggregateInput = { eloChange?: SortOrder eloAfter?: SortOrder timeSpentMs?: SortOrder } export type MatchResultMaxOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder won?: SortOrder eloChange?: SortOrder eloAfter?: SortOrder timeSpentMs?: SortOrder playedAt?: SortOrder } export type MatchResultMinOrderByAggregateInput = { id?: SortOrder userId?: SortOrder grade?: SortOrder won?: SortOrder eloChange?: SortOrder eloAfter?: SortOrder timeSpentMs?: SortOrder playedAt?: SortOrder } export type MatchResultSumOrderByAggregateInput = { eloChange?: SortOrder eloAfter?: SortOrder timeSpentMs?: SortOrder } export type GameSessionCreateNestedManyWithoutUserInput = { create?: XOR | GameSessionCreateWithoutUserInput[] | GameSessionUncheckedCreateWithoutUserInput[] connectOrCreate?: GameSessionCreateOrConnectWithoutUserInput | GameSessionCreateOrConnectWithoutUserInput[] createMany?: GameSessionCreateManyUserInputEnvelope connect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] } export type LeaderboardEntryCreateNestedManyWithoutUserInput = { create?: XOR | LeaderboardEntryCreateWithoutUserInput[] | LeaderboardEntryUncheckedCreateWithoutUserInput[] connectOrCreate?: LeaderboardEntryCreateOrConnectWithoutUserInput | LeaderboardEntryCreateOrConnectWithoutUserInput[] createMany?: LeaderboardEntryCreateManyUserInputEnvelope connect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] } export type MatchResultCreateNestedManyWithoutUserInput = { create?: XOR | MatchResultCreateWithoutUserInput[] | MatchResultUncheckedCreateWithoutUserInput[] connectOrCreate?: MatchResultCreateOrConnectWithoutUserInput | MatchResultCreateOrConnectWithoutUserInput[] createMany?: MatchResultCreateManyUserInputEnvelope connect?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] } export type GameSessionUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | GameSessionCreateWithoutUserInput[] | GameSessionUncheckedCreateWithoutUserInput[] connectOrCreate?: GameSessionCreateOrConnectWithoutUserInput | GameSessionCreateOrConnectWithoutUserInput[] createMany?: GameSessionCreateManyUserInputEnvelope connect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] } export type LeaderboardEntryUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | LeaderboardEntryCreateWithoutUserInput[] | LeaderboardEntryUncheckedCreateWithoutUserInput[] connectOrCreate?: LeaderboardEntryCreateOrConnectWithoutUserInput | LeaderboardEntryCreateOrConnectWithoutUserInput[] createMany?: LeaderboardEntryCreateManyUserInputEnvelope connect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] } export type MatchResultUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | MatchResultCreateWithoutUserInput[] | MatchResultUncheckedCreateWithoutUserInput[] connectOrCreate?: MatchResultCreateOrConnectWithoutUserInput | MatchResultCreateOrConnectWithoutUserInput[] createMany?: MatchResultCreateManyUserInputEnvelope connect?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] } export type StringFieldUpdateOperationsInput = { set?: string } export type NullableStringFieldUpdateOperationsInput = { set?: string | null } export type DateTimeFieldUpdateOperationsInput = { set?: Date | string } export type GameSessionUpdateManyWithoutUserNestedInput = { create?: XOR | GameSessionCreateWithoutUserInput[] | GameSessionUncheckedCreateWithoutUserInput[] connectOrCreate?: GameSessionCreateOrConnectWithoutUserInput | GameSessionCreateOrConnectWithoutUserInput[] upsert?: GameSessionUpsertWithWhereUniqueWithoutUserInput | GameSessionUpsertWithWhereUniqueWithoutUserInput[] createMany?: GameSessionCreateManyUserInputEnvelope set?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] disconnect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] delete?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] connect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] update?: GameSessionUpdateWithWhereUniqueWithoutUserInput | GameSessionUpdateWithWhereUniqueWithoutUserInput[] updateMany?: GameSessionUpdateManyWithWhereWithoutUserInput | GameSessionUpdateManyWithWhereWithoutUserInput[] deleteMany?: GameSessionScalarWhereInput | GameSessionScalarWhereInput[] } export type LeaderboardEntryUpdateManyWithoutUserNestedInput = { create?: XOR | LeaderboardEntryCreateWithoutUserInput[] | LeaderboardEntryUncheckedCreateWithoutUserInput[] connectOrCreate?: LeaderboardEntryCreateOrConnectWithoutUserInput | LeaderboardEntryCreateOrConnectWithoutUserInput[] upsert?: LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput | LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput[] createMany?: LeaderboardEntryCreateManyUserInputEnvelope set?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] disconnect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] delete?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] connect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] update?: LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput | LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput[] updateMany?: LeaderboardEntryUpdateManyWithWhereWithoutUserInput | LeaderboardEntryUpdateManyWithWhereWithoutUserInput[] deleteMany?: LeaderboardEntryScalarWhereInput | LeaderboardEntryScalarWhereInput[] } export type MatchResultUpdateManyWithoutUserNestedInput = { create?: XOR | MatchResultCreateWithoutUserInput[] | MatchResultUncheckedCreateWithoutUserInput[] connectOrCreate?: MatchResultCreateOrConnectWithoutUserInput | MatchResultCreateOrConnectWithoutUserInput[] upsert?: MatchResultUpsertWithWhereUniqueWithoutUserInput | MatchResultUpsertWithWhereUniqueWithoutUserInput[] createMany?: MatchResultCreateManyUserInputEnvelope set?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] disconnect?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] delete?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] connect?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] update?: MatchResultUpdateWithWhereUniqueWithoutUserInput | MatchResultUpdateWithWhereUniqueWithoutUserInput[] updateMany?: MatchResultUpdateManyWithWhereWithoutUserInput | MatchResultUpdateManyWithWhereWithoutUserInput[] deleteMany?: MatchResultScalarWhereInput | MatchResultScalarWhereInput[] } export type GameSessionUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | GameSessionCreateWithoutUserInput[] | GameSessionUncheckedCreateWithoutUserInput[] connectOrCreate?: GameSessionCreateOrConnectWithoutUserInput | GameSessionCreateOrConnectWithoutUserInput[] upsert?: GameSessionUpsertWithWhereUniqueWithoutUserInput | GameSessionUpsertWithWhereUniqueWithoutUserInput[] createMany?: GameSessionCreateManyUserInputEnvelope set?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] disconnect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] delete?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] connect?: GameSessionWhereUniqueInput | GameSessionWhereUniqueInput[] update?: GameSessionUpdateWithWhereUniqueWithoutUserInput | GameSessionUpdateWithWhereUniqueWithoutUserInput[] updateMany?: GameSessionUpdateManyWithWhereWithoutUserInput | GameSessionUpdateManyWithWhereWithoutUserInput[] deleteMany?: GameSessionScalarWhereInput | GameSessionScalarWhereInput[] } export type LeaderboardEntryUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | LeaderboardEntryCreateWithoutUserInput[] | LeaderboardEntryUncheckedCreateWithoutUserInput[] connectOrCreate?: LeaderboardEntryCreateOrConnectWithoutUserInput | LeaderboardEntryCreateOrConnectWithoutUserInput[] upsert?: LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput | LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput[] createMany?: LeaderboardEntryCreateManyUserInputEnvelope set?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] disconnect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] delete?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] connect?: LeaderboardEntryWhereUniqueInput | LeaderboardEntryWhereUniqueInput[] update?: LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput | LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput[] updateMany?: LeaderboardEntryUpdateManyWithWhereWithoutUserInput | LeaderboardEntryUpdateManyWithWhereWithoutUserInput[] deleteMany?: LeaderboardEntryScalarWhereInput | LeaderboardEntryScalarWhereInput[] } export type MatchResultUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | MatchResultCreateWithoutUserInput[] | MatchResultUncheckedCreateWithoutUserInput[] connectOrCreate?: MatchResultCreateOrConnectWithoutUserInput | MatchResultCreateOrConnectWithoutUserInput[] upsert?: MatchResultUpsertWithWhereUniqueWithoutUserInput | MatchResultUpsertWithWhereUniqueWithoutUserInput[] createMany?: MatchResultCreateManyUserInputEnvelope set?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] disconnect?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] delete?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] connect?: MatchResultWhereUniqueInput | MatchResultWhereUniqueInput[] update?: MatchResultUpdateWithWhereUniqueWithoutUserInput | MatchResultUpdateWithWhereUniqueWithoutUserInput[] updateMany?: MatchResultUpdateManyWithWhereWithoutUserInput | MatchResultUpdateManyWithWhereWithoutUserInput[] deleteMany?: MatchResultScalarWhereInput | MatchResultScalarWhereInput[] } export type UserAnswerCreateNestedManyWithoutQuestionInput = { create?: XOR | UserAnswerCreateWithoutQuestionInput[] | UserAnswerUncheckedCreateWithoutQuestionInput[] connectOrCreate?: UserAnswerCreateOrConnectWithoutQuestionInput | UserAnswerCreateOrConnectWithoutQuestionInput[] createMany?: UserAnswerCreateManyQuestionInputEnvelope connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] } export type UserAnswerUncheckedCreateNestedManyWithoutQuestionInput = { create?: XOR | UserAnswerCreateWithoutQuestionInput[] | UserAnswerUncheckedCreateWithoutQuestionInput[] connectOrCreate?: UserAnswerCreateOrConnectWithoutQuestionInput | UserAnswerCreateOrConnectWithoutQuestionInput[] createMany?: UserAnswerCreateManyQuestionInputEnvelope connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] } export type EnumGradeFieldUpdateOperationsInput = { set?: $Enums.Grade } export type EnumSubjectFieldUpdateOperationsInput = { set?: $Enums.Subject } export type EnumDifficultyFieldUpdateOperationsInput = { set?: $Enums.Difficulty } export type UserAnswerUpdateManyWithoutQuestionNestedInput = { create?: XOR | UserAnswerCreateWithoutQuestionInput[] | UserAnswerUncheckedCreateWithoutQuestionInput[] connectOrCreate?: UserAnswerCreateOrConnectWithoutQuestionInput | UserAnswerCreateOrConnectWithoutQuestionInput[] upsert?: UserAnswerUpsertWithWhereUniqueWithoutQuestionInput | UserAnswerUpsertWithWhereUniqueWithoutQuestionInput[] createMany?: UserAnswerCreateManyQuestionInputEnvelope set?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] disconnect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] delete?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] update?: UserAnswerUpdateWithWhereUniqueWithoutQuestionInput | UserAnswerUpdateWithWhereUniqueWithoutQuestionInput[] updateMany?: UserAnswerUpdateManyWithWhereWithoutQuestionInput | UserAnswerUpdateManyWithWhereWithoutQuestionInput[] deleteMany?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[] } export type UserAnswerUncheckedUpdateManyWithoutQuestionNestedInput = { create?: XOR | UserAnswerCreateWithoutQuestionInput[] | UserAnswerUncheckedCreateWithoutQuestionInput[] connectOrCreate?: UserAnswerCreateOrConnectWithoutQuestionInput | UserAnswerCreateOrConnectWithoutQuestionInput[] upsert?: UserAnswerUpsertWithWhereUniqueWithoutQuestionInput | UserAnswerUpsertWithWhereUniqueWithoutQuestionInput[] createMany?: UserAnswerCreateManyQuestionInputEnvelope set?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] disconnect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] delete?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] update?: UserAnswerUpdateWithWhereUniqueWithoutQuestionInput | UserAnswerUpdateWithWhereUniqueWithoutQuestionInput[] updateMany?: UserAnswerUpdateManyWithWhereWithoutQuestionInput | UserAnswerUpdateManyWithWhereWithoutQuestionInput[] deleteMany?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[] } export type UserCreateNestedOneWithoutSessionsInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutSessionsInput connect?: UserWhereUniqueInput } export type UserAnswerCreateNestedManyWithoutSessionInput = { create?: XOR | UserAnswerCreateWithoutSessionInput[] | UserAnswerUncheckedCreateWithoutSessionInput[] connectOrCreate?: UserAnswerCreateOrConnectWithoutSessionInput | UserAnswerCreateOrConnectWithoutSessionInput[] createMany?: UserAnswerCreateManySessionInputEnvelope connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] } export type UserAnswerUncheckedCreateNestedManyWithoutSessionInput = { create?: XOR | UserAnswerCreateWithoutSessionInput[] | UserAnswerUncheckedCreateWithoutSessionInput[] connectOrCreate?: UserAnswerCreateOrConnectWithoutSessionInput | UserAnswerCreateOrConnectWithoutSessionInput[] createMany?: UserAnswerCreateManySessionInputEnvelope connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] } export type EnumSessionStatusFieldUpdateOperationsInput = { set?: $Enums.SessionStatus } export type IntFieldUpdateOperationsInput = { set?: number increment?: number decrement?: number multiply?: number divide?: number } export type NullableDateTimeFieldUpdateOperationsInput = { set?: Date | string | null } export type UserUpdateOneRequiredWithoutSessionsNestedInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutSessionsInput upsert?: UserUpsertWithoutSessionsInput connect?: UserWhereUniqueInput update?: XOR, UserUncheckedUpdateWithoutSessionsInput> } export type UserAnswerUpdateManyWithoutSessionNestedInput = { create?: XOR | UserAnswerCreateWithoutSessionInput[] | UserAnswerUncheckedCreateWithoutSessionInput[] connectOrCreate?: UserAnswerCreateOrConnectWithoutSessionInput | UserAnswerCreateOrConnectWithoutSessionInput[] upsert?: UserAnswerUpsertWithWhereUniqueWithoutSessionInput | UserAnswerUpsertWithWhereUniqueWithoutSessionInput[] createMany?: UserAnswerCreateManySessionInputEnvelope set?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] disconnect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] delete?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] update?: UserAnswerUpdateWithWhereUniqueWithoutSessionInput | UserAnswerUpdateWithWhereUniqueWithoutSessionInput[] updateMany?: UserAnswerUpdateManyWithWhereWithoutSessionInput | UserAnswerUpdateManyWithWhereWithoutSessionInput[] deleteMany?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[] } export type UserAnswerUncheckedUpdateManyWithoutSessionNestedInput = { create?: XOR | UserAnswerCreateWithoutSessionInput[] | UserAnswerUncheckedCreateWithoutSessionInput[] connectOrCreate?: UserAnswerCreateOrConnectWithoutSessionInput | UserAnswerCreateOrConnectWithoutSessionInput[] upsert?: UserAnswerUpsertWithWhereUniqueWithoutSessionInput | UserAnswerUpsertWithWhereUniqueWithoutSessionInput[] createMany?: UserAnswerCreateManySessionInputEnvelope set?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] disconnect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] delete?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] connect?: UserAnswerWhereUniqueInput | UserAnswerWhereUniqueInput[] update?: UserAnswerUpdateWithWhereUniqueWithoutSessionInput | UserAnswerUpdateWithWhereUniqueWithoutSessionInput[] updateMany?: UserAnswerUpdateManyWithWhereWithoutSessionInput | UserAnswerUpdateManyWithWhereWithoutSessionInput[] deleteMany?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[] } export type GameSessionCreateNestedOneWithoutAnswersInput = { create?: XOR connectOrCreate?: GameSessionCreateOrConnectWithoutAnswersInput connect?: GameSessionWhereUniqueInput } export type QuestionCreateNestedOneWithoutAnswersInput = { create?: XOR connectOrCreate?: QuestionCreateOrConnectWithoutAnswersInput connect?: QuestionWhereUniqueInput } export type BoolFieldUpdateOperationsInput = { set?: boolean } export type GameSessionUpdateOneRequiredWithoutAnswersNestedInput = { create?: XOR connectOrCreate?: GameSessionCreateOrConnectWithoutAnswersInput upsert?: GameSessionUpsertWithoutAnswersInput connect?: GameSessionWhereUniqueInput update?: XOR, GameSessionUncheckedUpdateWithoutAnswersInput> } export type QuestionUpdateOneRequiredWithoutAnswersNestedInput = { create?: XOR connectOrCreate?: QuestionCreateOrConnectWithoutAnswersInput upsert?: QuestionUpsertWithoutAnswersInput connect?: QuestionWhereUniqueInput update?: XOR, QuestionUncheckedUpdateWithoutAnswersInput> } export type UserCreateNestedOneWithoutLeaderboardEntriesInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutLeaderboardEntriesInput connect?: UserWhereUniqueInput } export type NullableIntFieldUpdateOperationsInput = { set?: number | null increment?: number decrement?: number multiply?: number divide?: number } export type UserUpdateOneRequiredWithoutLeaderboardEntriesNestedInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutLeaderboardEntriesInput upsert?: UserUpsertWithoutLeaderboardEntriesInput connect?: UserWhereUniqueInput update?: XOR, UserUncheckedUpdateWithoutLeaderboardEntriesInput> } export type UserCreateNestedOneWithoutMatchResultsInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutMatchResultsInput connect?: UserWhereUniqueInput } export type UserUpdateOneRequiredWithoutMatchResultsNestedInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutMatchResultsInput upsert?: UserUpsertWithoutMatchResultsInput connect?: UserWhereUniqueInput update?: XOR, UserUncheckedUpdateWithoutMatchResultsInput> } export type NestedStringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> notIn?: string[] | ListStringFieldRefInput<$PrismaModel> lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringFilter<$PrismaModel> | string } export type NestedStringNullableFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | ListStringFieldRefInput<$PrismaModel> | null notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringNullableFilter<$PrismaModel> | string | null } export type NestedDateTimeFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> not?: NestedDateTimeFilter<$PrismaModel> | Date | string } export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> notIn?: string[] | ListStringFieldRefInput<$PrismaModel> lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringWithAggregatesFilter<$PrismaModel> | string _count?: NestedIntFilter<$PrismaModel> _min?: NestedStringFilter<$PrismaModel> _max?: NestedStringFilter<$PrismaModel> } export type NestedIntFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] | ListIntFieldRefInput<$PrismaModel> notIn?: number[] | ListIntFieldRefInput<$PrismaModel> lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntFilter<$PrismaModel> | number } export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | ListStringFieldRefInput<$PrismaModel> | null notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null _count?: NestedIntNullableFilter<$PrismaModel> _min?: NestedStringNullableFilter<$PrismaModel> _max?: NestedStringNullableFilter<$PrismaModel> } export type NestedIntNullableFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | ListIntFieldRefInput<$PrismaModel> | null notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableFilter<$PrismaModel> | number | null } export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string _count?: NestedIntFilter<$PrismaModel> _min?: NestedDateTimeFilter<$PrismaModel> _max?: NestedDateTimeFilter<$PrismaModel> } export type NestedEnumGradeFilter<$PrismaModel = never> = { equals?: $Enums.Grade | EnumGradeFieldRefInput<$PrismaModel> in?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel> notIn?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel> not?: NestedEnumGradeFilter<$PrismaModel> | $Enums.Grade } export type NestedEnumSubjectFilter<$PrismaModel = never> = { equals?: $Enums.Subject | EnumSubjectFieldRefInput<$PrismaModel> in?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel> notIn?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel> not?: NestedEnumSubjectFilter<$PrismaModel> | $Enums.Subject } export type NestedEnumDifficultyFilter<$PrismaModel = never> = { equals?: $Enums.Difficulty | EnumDifficultyFieldRefInput<$PrismaModel> in?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel> notIn?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel> not?: NestedEnumDifficultyFilter<$PrismaModel> | $Enums.Difficulty } export type NestedEnumGradeWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.Grade | EnumGradeFieldRefInput<$PrismaModel> in?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel> notIn?: $Enums.Grade[] | ListEnumGradeFieldRefInput<$PrismaModel> not?: NestedEnumGradeWithAggregatesFilter<$PrismaModel> | $Enums.Grade _count?: NestedIntFilter<$PrismaModel> _min?: NestedEnumGradeFilter<$PrismaModel> _max?: NestedEnumGradeFilter<$PrismaModel> } export type NestedEnumSubjectWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.Subject | EnumSubjectFieldRefInput<$PrismaModel> in?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel> notIn?: $Enums.Subject[] | ListEnumSubjectFieldRefInput<$PrismaModel> not?: NestedEnumSubjectWithAggregatesFilter<$PrismaModel> | $Enums.Subject _count?: NestedIntFilter<$PrismaModel> _min?: NestedEnumSubjectFilter<$PrismaModel> _max?: NestedEnumSubjectFilter<$PrismaModel> } export type NestedEnumDifficultyWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.Difficulty | EnumDifficultyFieldRefInput<$PrismaModel> in?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel> notIn?: $Enums.Difficulty[] | ListEnumDifficultyFieldRefInput<$PrismaModel> not?: NestedEnumDifficultyWithAggregatesFilter<$PrismaModel> | $Enums.Difficulty _count?: NestedIntFilter<$PrismaModel> _min?: NestedEnumDifficultyFilter<$PrismaModel> _max?: NestedEnumDifficultyFilter<$PrismaModel> } export type NestedJsonFilter<$PrismaModel = never> = | PatchUndefined< Either>, Exclude>, 'path'>>, Required> > | OptionalFlat>, 'path'>> export type NestedJsonFilterBase<$PrismaModel = never> = { equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter path?: string[] string_contains?: string | StringFieldRefInput<$PrismaModel> string_starts_with?: string | StringFieldRefInput<$PrismaModel> string_ends_with?: string | StringFieldRefInput<$PrismaModel> array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter } export type NestedEnumSessionStatusFilter<$PrismaModel = never> = { equals?: $Enums.SessionStatus | EnumSessionStatusFieldRefInput<$PrismaModel> in?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel> notIn?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel> not?: NestedEnumSessionStatusFilter<$PrismaModel> | $Enums.SessionStatus } export type NestedDateTimeNullableFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null } export type NestedEnumSessionStatusWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.SessionStatus | EnumSessionStatusFieldRefInput<$PrismaModel> in?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel> notIn?: $Enums.SessionStatus[] | ListEnumSessionStatusFieldRefInput<$PrismaModel> not?: NestedEnumSessionStatusWithAggregatesFilter<$PrismaModel> | $Enums.SessionStatus _count?: NestedIntFilter<$PrismaModel> _min?: NestedEnumSessionStatusFilter<$PrismaModel> _max?: NestedEnumSessionStatusFilter<$PrismaModel> } export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] | ListIntFieldRefInput<$PrismaModel> notIn?: number[] | ListIntFieldRefInput<$PrismaModel> lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntWithAggregatesFilter<$PrismaModel> | number _count?: NestedIntFilter<$PrismaModel> _avg?: NestedFloatFilter<$PrismaModel> _sum?: NestedIntFilter<$PrismaModel> _min?: NestedIntFilter<$PrismaModel> _max?: NestedIntFilter<$PrismaModel> } export type NestedFloatFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> in?: number[] | ListFloatFieldRefInput<$PrismaModel> notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> gte?: number | FloatFieldRefInput<$PrismaModel> not?: NestedFloatFilter<$PrismaModel> | number } export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null _count?: NestedIntNullableFilter<$PrismaModel> _min?: NestedDateTimeNullableFilter<$PrismaModel> _max?: NestedDateTimeNullableFilter<$PrismaModel> } export type NestedBoolFilter<$PrismaModel = never> = { equals?: boolean | BooleanFieldRefInput<$PrismaModel> not?: NestedBoolFilter<$PrismaModel> | boolean } export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { equals?: boolean | BooleanFieldRefInput<$PrismaModel> not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean _count?: NestedIntFilter<$PrismaModel> _min?: NestedBoolFilter<$PrismaModel> _max?: NestedBoolFilter<$PrismaModel> } export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | ListIntFieldRefInput<$PrismaModel> | null notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null _count?: NestedIntNullableFilter<$PrismaModel> _avg?: NestedFloatNullableFilter<$PrismaModel> _sum?: NestedIntNullableFilter<$PrismaModel> _min?: NestedIntNullableFilter<$PrismaModel> _max?: NestedIntNullableFilter<$PrismaModel> } export type NestedFloatNullableFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> | null in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> gte?: number | FloatFieldRefInput<$PrismaModel> not?: NestedFloatNullableFilter<$PrismaModel> | number | null } export type GameSessionCreateWithoutUserInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject status?: $Enums.SessionStatus score?: number totalQuestions: number correctAnswers?: number startedAt?: Date | string completedAt?: Date | string | null answers?: UserAnswerCreateNestedManyWithoutSessionInput } export type GameSessionUncheckedCreateWithoutUserInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject status?: $Enums.SessionStatus score?: number totalQuestions: number correctAnswers?: number startedAt?: Date | string completedAt?: Date | string | null answers?: UserAnswerUncheckedCreateNestedManyWithoutSessionInput } export type GameSessionCreateOrConnectWithoutUserInput = { where: GameSessionWhereUniqueInput create: XOR } export type GameSessionCreateManyUserInputEnvelope = { data: GameSessionCreateManyUserInput | GameSessionCreateManyUserInput[] skipDuplicates?: boolean } export type LeaderboardEntryCreateWithoutUserInput = { id?: string grade: $Enums.Grade elo?: number bestTime?: number | null gamesPlayed?: number totalCorrect?: number updatedAt?: Date | string } export type LeaderboardEntryUncheckedCreateWithoutUserInput = { id?: string grade: $Enums.Grade elo?: number bestTime?: number | null gamesPlayed?: number totalCorrect?: number updatedAt?: Date | string } export type LeaderboardEntryCreateOrConnectWithoutUserInput = { where: LeaderboardEntryWhereUniqueInput create: XOR } export type LeaderboardEntryCreateManyUserInputEnvelope = { data: LeaderboardEntryCreateManyUserInput | LeaderboardEntryCreateManyUserInput[] skipDuplicates?: boolean } export type MatchResultCreateWithoutUserInput = { id?: string grade: $Enums.Grade won: boolean eloChange: number eloAfter: number timeSpentMs?: number | null playedAt?: Date | string } export type MatchResultUncheckedCreateWithoutUserInput = { id?: string grade: $Enums.Grade won: boolean eloChange: number eloAfter: number timeSpentMs?: number | null playedAt?: Date | string } export type MatchResultCreateOrConnectWithoutUserInput = { where: MatchResultWhereUniqueInput create: XOR } export type MatchResultCreateManyUserInputEnvelope = { data: MatchResultCreateManyUserInput | MatchResultCreateManyUserInput[] skipDuplicates?: boolean } export type GameSessionUpsertWithWhereUniqueWithoutUserInput = { where: GameSessionWhereUniqueInput update: XOR create: XOR } export type GameSessionUpdateWithWhereUniqueWithoutUserInput = { where: GameSessionWhereUniqueInput data: XOR } export type GameSessionUpdateManyWithWhereWithoutUserInput = { where: GameSessionScalarWhereInput data: XOR } export type GameSessionScalarWhereInput = { AND?: GameSessionScalarWhereInput | GameSessionScalarWhereInput[] OR?: GameSessionScalarWhereInput[] NOT?: GameSessionScalarWhereInput | GameSessionScalarWhereInput[] id?: StringFilter<"GameSession"> | string userId?: StringFilter<"GameSession"> | string grade?: EnumGradeFilter<"GameSession"> | $Enums.Grade subject?: EnumSubjectFilter<"GameSession"> | $Enums.Subject status?: EnumSessionStatusFilter<"GameSession"> | $Enums.SessionStatus score?: IntFilter<"GameSession"> | number totalQuestions?: IntFilter<"GameSession"> | number correctAnswers?: IntFilter<"GameSession"> | number startedAt?: DateTimeFilter<"GameSession"> | Date | string completedAt?: DateTimeNullableFilter<"GameSession"> | Date | string | null } export type LeaderboardEntryUpsertWithWhereUniqueWithoutUserInput = { where: LeaderboardEntryWhereUniqueInput update: XOR create: XOR } export type LeaderboardEntryUpdateWithWhereUniqueWithoutUserInput = { where: LeaderboardEntryWhereUniqueInput data: XOR } export type LeaderboardEntryUpdateManyWithWhereWithoutUserInput = { where: LeaderboardEntryScalarWhereInput data: XOR } export type LeaderboardEntryScalarWhereInput = { AND?: LeaderboardEntryScalarWhereInput | LeaderboardEntryScalarWhereInput[] OR?: LeaderboardEntryScalarWhereInput[] NOT?: LeaderboardEntryScalarWhereInput | LeaderboardEntryScalarWhereInput[] id?: StringFilter<"LeaderboardEntry"> | string userId?: StringFilter<"LeaderboardEntry"> | string grade?: EnumGradeFilter<"LeaderboardEntry"> | $Enums.Grade elo?: IntFilter<"LeaderboardEntry"> | number bestTime?: IntNullableFilter<"LeaderboardEntry"> | number | null gamesPlayed?: IntFilter<"LeaderboardEntry"> | number totalCorrect?: IntFilter<"LeaderboardEntry"> | number updatedAt?: DateTimeFilter<"LeaderboardEntry"> | Date | string } export type MatchResultUpsertWithWhereUniqueWithoutUserInput = { where: MatchResultWhereUniqueInput update: XOR create: XOR } export type MatchResultUpdateWithWhereUniqueWithoutUserInput = { where: MatchResultWhereUniqueInput data: XOR } export type MatchResultUpdateManyWithWhereWithoutUserInput = { where: MatchResultScalarWhereInput data: XOR } export type MatchResultScalarWhereInput = { AND?: MatchResultScalarWhereInput | MatchResultScalarWhereInput[] OR?: MatchResultScalarWhereInput[] NOT?: MatchResultScalarWhereInput | MatchResultScalarWhereInput[] id?: StringFilter<"MatchResult"> | string userId?: StringFilter<"MatchResult"> | string grade?: EnumGradeFilter<"MatchResult"> | $Enums.Grade won?: BoolFilter<"MatchResult"> | boolean eloChange?: IntFilter<"MatchResult"> | number eloAfter?: IntFilter<"MatchResult"> | number timeSpentMs?: IntNullableFilter<"MatchResult"> | number | null playedAt?: DateTimeFilter<"MatchResult"> | Date | string } export type UserAnswerCreateWithoutQuestionInput = { id?: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string session: GameSessionCreateNestedOneWithoutAnswersInput } export type UserAnswerUncheckedCreateWithoutQuestionInput = { id?: string sessionId: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string } export type UserAnswerCreateOrConnectWithoutQuestionInput = { where: UserAnswerWhereUniqueInput create: XOR } export type UserAnswerCreateManyQuestionInputEnvelope = { data: UserAnswerCreateManyQuestionInput | UserAnswerCreateManyQuestionInput[] skipDuplicates?: boolean } export type UserAnswerUpsertWithWhereUniqueWithoutQuestionInput = { where: UserAnswerWhereUniqueInput update: XOR create: XOR } export type UserAnswerUpdateWithWhereUniqueWithoutQuestionInput = { where: UserAnswerWhereUniqueInput data: XOR } export type UserAnswerUpdateManyWithWhereWithoutQuestionInput = { where: UserAnswerScalarWhereInput data: XOR } export type UserAnswerScalarWhereInput = { AND?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[] OR?: UserAnswerScalarWhereInput[] NOT?: UserAnswerScalarWhereInput | UserAnswerScalarWhereInput[] id?: StringFilter<"UserAnswer"> | string sessionId?: StringFilter<"UserAnswer"> | string questionId?: StringFilter<"UserAnswer"> | string selectedAnswer?: StringFilter<"UserAnswer"> | string isCorrect?: BoolFilter<"UserAnswer"> | boolean timeSpentMs?: IntFilter<"UserAnswer"> | number answeredAt?: DateTimeFilter<"UserAnswer"> | Date | string } export type UserCreateWithoutSessionsInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string leaderboardEntries?: LeaderboardEntryCreateNestedManyWithoutUserInput matchResults?: MatchResultCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutSessionsInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string leaderboardEntries?: LeaderboardEntryUncheckedCreateNestedManyWithoutUserInput matchResults?: MatchResultUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutSessionsInput = { where: UserWhereUniqueInput create: XOR } export type UserAnswerCreateWithoutSessionInput = { id?: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string question: QuestionCreateNestedOneWithoutAnswersInput } export type UserAnswerUncheckedCreateWithoutSessionInput = { id?: string questionId: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string } export type UserAnswerCreateOrConnectWithoutSessionInput = { where: UserAnswerWhereUniqueInput create: XOR } export type UserAnswerCreateManySessionInputEnvelope = { data: UserAnswerCreateManySessionInput | UserAnswerCreateManySessionInput[] skipDuplicates?: boolean } export type UserUpsertWithoutSessionsInput = { update: XOR create: XOR where?: UserWhereInput } export type UserUpdateToOneWithWhereWithoutSessionsInput = { where?: UserWhereInput data: XOR } export type UserUpdateWithoutSessionsInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string leaderboardEntries?: LeaderboardEntryUpdateManyWithoutUserNestedInput matchResults?: MatchResultUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutSessionsInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string leaderboardEntries?: LeaderboardEntryUncheckedUpdateManyWithoutUserNestedInput matchResults?: MatchResultUncheckedUpdateManyWithoutUserNestedInput } export type UserAnswerUpsertWithWhereUniqueWithoutSessionInput = { where: UserAnswerWhereUniqueInput update: XOR create: XOR } export type UserAnswerUpdateWithWhereUniqueWithoutSessionInput = { where: UserAnswerWhereUniqueInput data: XOR } export type UserAnswerUpdateManyWithWhereWithoutSessionInput = { where: UserAnswerScalarWhereInput data: XOR } export type GameSessionCreateWithoutAnswersInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject status?: $Enums.SessionStatus score?: number totalQuestions: number correctAnswers?: number startedAt?: Date | string completedAt?: Date | string | null user: UserCreateNestedOneWithoutSessionsInput } export type GameSessionUncheckedCreateWithoutAnswersInput = { id?: string userId: string grade: $Enums.Grade subject: $Enums.Subject status?: $Enums.SessionStatus score?: number totalQuestions: number correctAnswers?: number startedAt?: Date | string completedAt?: Date | string | null } export type GameSessionCreateOrConnectWithoutAnswersInput = { where: GameSessionWhereUniqueInput create: XOR } export type QuestionCreateWithoutAnswersInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject strand: string difficulty: $Enums.Difficulty questionText: string options: JsonNullValueInput | InputJsonValue correctAnswer: string explanation?: string | null createdAt?: Date | string } export type QuestionUncheckedCreateWithoutAnswersInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject strand: string difficulty: $Enums.Difficulty questionText: string options: JsonNullValueInput | InputJsonValue correctAnswer: string explanation?: string | null createdAt?: Date | string } export type QuestionCreateOrConnectWithoutAnswersInput = { where: QuestionWhereUniqueInput create: XOR } export type GameSessionUpsertWithoutAnswersInput = { update: XOR create: XOR where?: GameSessionWhereInput } export type GameSessionUpdateToOneWithWhereWithoutAnswersInput = { where?: GameSessionWhereInput data: XOR } export type GameSessionUpdateWithoutAnswersInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null user?: UserUpdateOneRequiredWithoutSessionsNestedInput } export type GameSessionUncheckedUpdateWithoutAnswersInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type QuestionUpsertWithoutAnswersInput = { update: XOR create: XOR where?: QuestionWhereInput } export type QuestionUpdateToOneWithWhereWithoutAnswersInput = { where?: QuestionWhereInput data: XOR } export type QuestionUpdateWithoutAnswersInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject strand?: StringFieldUpdateOperationsInput | string difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty questionText?: StringFieldUpdateOperationsInput | string options?: JsonNullValueInput | InputJsonValue correctAnswer?: StringFieldUpdateOperationsInput | string explanation?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type QuestionUncheckedUpdateWithoutAnswersInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject strand?: StringFieldUpdateOperationsInput | string difficulty?: EnumDifficultyFieldUpdateOperationsInput | $Enums.Difficulty questionText?: StringFieldUpdateOperationsInput | string options?: JsonNullValueInput | InputJsonValue correctAnswer?: StringFieldUpdateOperationsInput | string explanation?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserCreateWithoutLeaderboardEntriesInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string sessions?: GameSessionCreateNestedManyWithoutUserInput matchResults?: MatchResultCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutLeaderboardEntriesInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string sessions?: GameSessionUncheckedCreateNestedManyWithoutUserInput matchResults?: MatchResultUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutLeaderboardEntriesInput = { where: UserWhereUniqueInput create: XOR } export type UserUpsertWithoutLeaderboardEntriesInput = { update: XOR create: XOR where?: UserWhereInput } export type UserUpdateToOneWithWhereWithoutLeaderboardEntriesInput = { where?: UserWhereInput data: XOR } export type UserUpdateWithoutLeaderboardEntriesInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string sessions?: GameSessionUpdateManyWithoutUserNestedInput matchResults?: MatchResultUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutLeaderboardEntriesInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string sessions?: GameSessionUncheckedUpdateManyWithoutUserNestedInput matchResults?: MatchResultUncheckedUpdateManyWithoutUserNestedInput } export type UserCreateWithoutMatchResultsInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string sessions?: GameSessionCreateNestedManyWithoutUserInput leaderboardEntries?: LeaderboardEntryCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutMatchResultsInput = { id?: string googleId: string email: string displayName: string username: string avatarUrl?: string | null createdAt?: Date | string updatedAt?: Date | string sessions?: GameSessionUncheckedCreateNestedManyWithoutUserInput leaderboardEntries?: LeaderboardEntryUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutMatchResultsInput = { where: UserWhereUniqueInput create: XOR } export type UserUpsertWithoutMatchResultsInput = { update: XOR create: XOR where?: UserWhereInput } export type UserUpdateToOneWithWhereWithoutMatchResultsInput = { where?: UserWhereInput data: XOR } export type UserUpdateWithoutMatchResultsInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string sessions?: GameSessionUpdateManyWithoutUserNestedInput leaderboardEntries?: LeaderboardEntryUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutMatchResultsInput = { id?: StringFieldUpdateOperationsInput | string googleId?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string displayName?: StringFieldUpdateOperationsInput | string username?: StringFieldUpdateOperationsInput | string avatarUrl?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string sessions?: GameSessionUncheckedUpdateManyWithoutUserNestedInput leaderboardEntries?: LeaderboardEntryUncheckedUpdateManyWithoutUserNestedInput } export type GameSessionCreateManyUserInput = { id?: string grade: $Enums.Grade subject: $Enums.Subject status?: $Enums.SessionStatus score?: number totalQuestions: number correctAnswers?: number startedAt?: Date | string completedAt?: Date | string | null } export type LeaderboardEntryCreateManyUserInput = { id?: string grade: $Enums.Grade elo?: number bestTime?: number | null gamesPlayed?: number totalCorrect?: number updatedAt?: Date | string } export type MatchResultCreateManyUserInput = { id?: string grade: $Enums.Grade won: boolean eloChange: number eloAfter: number timeSpentMs?: number | null playedAt?: Date | string } export type GameSessionUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null answers?: UserAnswerUpdateManyWithoutSessionNestedInput } export type GameSessionUncheckedUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null answers?: UserAnswerUncheckedUpdateManyWithoutSessionNestedInput } export type GameSessionUncheckedUpdateManyWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade subject?: EnumSubjectFieldUpdateOperationsInput | $Enums.Subject status?: EnumSessionStatusFieldUpdateOperationsInput | $Enums.SessionStatus score?: IntFieldUpdateOperationsInput | number totalQuestions?: IntFieldUpdateOperationsInput | number correctAnswers?: IntFieldUpdateOperationsInput | number startedAt?: DateTimeFieldUpdateOperationsInput | Date | string completedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type LeaderboardEntryUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade elo?: IntFieldUpdateOperationsInput | number bestTime?: NullableIntFieldUpdateOperationsInput | number | null gamesPlayed?: IntFieldUpdateOperationsInput | number totalCorrect?: IntFieldUpdateOperationsInput | number updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type LeaderboardEntryUncheckedUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade elo?: IntFieldUpdateOperationsInput | number bestTime?: NullableIntFieldUpdateOperationsInput | number | null gamesPlayed?: IntFieldUpdateOperationsInput | number totalCorrect?: IntFieldUpdateOperationsInput | number updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type LeaderboardEntryUncheckedUpdateManyWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade elo?: IntFieldUpdateOperationsInput | number bestTime?: NullableIntFieldUpdateOperationsInput | number | null gamesPlayed?: IntFieldUpdateOperationsInput | number totalCorrect?: IntFieldUpdateOperationsInput | number updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type MatchResultUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade won?: BoolFieldUpdateOperationsInput | boolean eloChange?: IntFieldUpdateOperationsInput | number eloAfter?: IntFieldUpdateOperationsInput | number timeSpentMs?: NullableIntFieldUpdateOperationsInput | number | null playedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type MatchResultUncheckedUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade won?: BoolFieldUpdateOperationsInput | boolean eloChange?: IntFieldUpdateOperationsInput | number eloAfter?: IntFieldUpdateOperationsInput | number timeSpentMs?: NullableIntFieldUpdateOperationsInput | number | null playedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type MatchResultUncheckedUpdateManyWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string grade?: EnumGradeFieldUpdateOperationsInput | $Enums.Grade won?: BoolFieldUpdateOperationsInput | boolean eloChange?: IntFieldUpdateOperationsInput | number eloAfter?: IntFieldUpdateOperationsInput | number timeSpentMs?: NullableIntFieldUpdateOperationsInput | number | null playedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserAnswerCreateManyQuestionInput = { id?: string sessionId: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string } export type UserAnswerUpdateWithoutQuestionInput = { id?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string session?: GameSessionUpdateOneRequiredWithoutAnswersNestedInput } export type UserAnswerUncheckedUpdateWithoutQuestionInput = { id?: StringFieldUpdateOperationsInput | string sessionId?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserAnswerUncheckedUpdateManyWithoutQuestionInput = { id?: StringFieldUpdateOperationsInput | string sessionId?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserAnswerCreateManySessionInput = { id?: string questionId: string selectedAnswer: string isCorrect: boolean timeSpentMs: number answeredAt?: Date | string } export type UserAnswerUpdateWithoutSessionInput = { id?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string question?: QuestionUpdateOneRequiredWithoutAnswersNestedInput } export type UserAnswerUncheckedUpdateWithoutSessionInput = { id?: StringFieldUpdateOperationsInput | string questionId?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserAnswerUncheckedUpdateManyWithoutSessionInput = { id?: StringFieldUpdateOperationsInput | string questionId?: StringFieldUpdateOperationsInput | string selectedAnswer?: StringFieldUpdateOperationsInput | string isCorrect?: BoolFieldUpdateOperationsInput | boolean timeSpentMs?: IntFieldUpdateOperationsInput | number answeredAt?: DateTimeFieldUpdateOperationsInput | Date | string } /** * Aliases for legacy arg types */ /** * @deprecated Use UserCountOutputTypeDefaultArgs instead */ export type UserCountOutputTypeArgs = UserCountOutputTypeDefaultArgs /** * @deprecated Use QuestionCountOutputTypeDefaultArgs instead */ export type QuestionCountOutputTypeArgs = QuestionCountOutputTypeDefaultArgs /** * @deprecated Use GameSessionCountOutputTypeDefaultArgs instead */ export type GameSessionCountOutputTypeArgs = GameSessionCountOutputTypeDefaultArgs /** * @deprecated Use UserDefaultArgs instead */ export type UserArgs = UserDefaultArgs /** * @deprecated Use QuestionDefaultArgs instead */ export type QuestionArgs = QuestionDefaultArgs /** * @deprecated Use GameSessionDefaultArgs instead */ export type GameSessionArgs = GameSessionDefaultArgs /** * @deprecated Use UserAnswerDefaultArgs instead */ export type UserAnswerArgs = UserAnswerDefaultArgs /** * @deprecated Use LeaderboardEntryDefaultArgs instead */ export type LeaderboardEntryArgs = LeaderboardEntryDefaultArgs /** * @deprecated Use MatchResultDefaultArgs instead */ export type MatchResultArgs = MatchResultDefaultArgs /** * Batch Payload for updateMany & deleteMany & createMany */ export type BatchPayload = { count: number } /** * DMMF */ export const dmmf: runtime.BaseDMMF }