/** * Client **/ import * as runtime from '@prisma/client/runtime/client.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 Session * */ export type Session = $Result.DefaultSelection /** * Model Book * */ export type Book = $Result.DefaultSelection /** * Model Chapter * */ export type Chapter = $Result.DefaultSelection /** * Model Character * */ export type Character = $Result.DefaultSelection /** * Model CoverDesign * */ export type CoverDesign = $Result.DefaultSelection /** * ## Prisma Client ʲˢ * * Type-safe database client for TypeScript & Node.js * @example * ``` * const prisma = new PrismaClient({ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) * }) * // Fetch zero or more Users * const users = await prisma.user.findMany() * ``` * * * Read more in our [docs](https://pris.ly/d/client). */ export class PrismaClient< ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, const 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({ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) * }) * // Fetch zero or more Users * const users = await prisma.user.findMany() * ``` * * * Read more in our [docs](https://pris.ly/d/client). */ constructor(optionsArg ?: Prisma.Subset); $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; /** * Connect with the database */ $connect(): $Utils.JsPromise; /** * Disconnect from the database */ $disconnect(): $Utils.JsPromise; /** * 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://pris.ly/d/raw-queries). */ $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://pris.ly/d/raw-queries). */ $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://pris.ly/d/raw-queries). */ $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://pris.ly/d/raw-queries). */ $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/orm/prisma-client/queries/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, $Utils.Call, { extArgs: 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.session`: Exposes CRUD operations for the **Session** model. * Example usage: * ```ts * // Fetch zero or more Sessions * const sessions = await prisma.session.findMany() * ``` */ get session(): Prisma.SessionDelegate; /** * `prisma.book`: Exposes CRUD operations for the **Book** model. * Example usage: * ```ts * // Fetch zero or more Books * const books = await prisma.book.findMany() * ``` */ get book(): Prisma.BookDelegate; /** * `prisma.chapter`: Exposes CRUD operations for the **Chapter** model. * Example usage: * ```ts * // Fetch zero or more Chapters * const chapters = await prisma.chapter.findMany() * ``` */ get chapter(): Prisma.ChapterDelegate; /** * `prisma.character`: Exposes CRUD operations for the **Character** model. * Example usage: * ```ts * // Fetch zero or more Characters * const characters = await prisma.character.findMany() * ``` */ get character(): Prisma.CharacterDelegate; /** * `prisma.coverDesign`: Exposes CRUD operations for the **CoverDesign** model. * Example usage: * ```ts * // Fetch zero or more CoverDesigns * const coverDesigns = await prisma.coverDesign.findMany() * ``` */ get coverDesign(): Prisma.CoverDesignDelegate; } 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 /** * 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 /** * 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: 7.6.0 * Query Engine version: 75cbdc1eb7150937890ad5465d861175c6624711 */ export type PrismaVersion = { client: string engine: string } export const prismaVersion: PrismaVersion /** * Utility Types */ export import Bytes = runtime.Bytes 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 ? P : 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', Session: 'Session', Book: 'Book', Chapter: 'Chapter', Character: 'Character', CoverDesign: 'CoverDesign' }; export type ModelName = (typeof ModelName)[keyof typeof ModelName] interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record> { returns: Prisma.TypeMap } export type TypeMap = { globalOmitOptions: { omit: GlobalOmitOptions } meta: { modelProps: "user" | "session" | "book" | "chapter" | "character" | "coverDesign" 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 } updateManyAndReturn: { args: Prisma.UserUpdateManyAndReturnArgs result: $Utils.PayloadToResult[] } 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 } } } Session: { payload: Prisma.$SessionPayload fields: Prisma.SessionFieldRefs operations: { findUnique: { args: Prisma.SessionFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SessionFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.SessionFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SessionFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.SessionFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.SessionCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.SessionCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.SessionCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.SessionDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.SessionUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SessionDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.SessionUpdateManyArgs result: BatchPayload } updateManyAndReturn: { args: Prisma.SessionUpdateManyAndReturnArgs result: $Utils.PayloadToResult[] } upsert: { args: Prisma.SessionUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.SessionAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.SessionGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.SessionCountArgs result: $Utils.Optional | number } } } Book: { payload: Prisma.$BookPayload fields: Prisma.BookFieldRefs operations: { findUnique: { args: Prisma.BookFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.BookFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.BookFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.BookFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.BookFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.BookCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.BookCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.BookCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.BookDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.BookUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.BookDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.BookUpdateManyArgs result: BatchPayload } updateManyAndReturn: { args: Prisma.BookUpdateManyAndReturnArgs result: $Utils.PayloadToResult[] } upsert: { args: Prisma.BookUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.BookAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.BookGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.BookCountArgs result: $Utils.Optional | number } } } Chapter: { payload: Prisma.$ChapterPayload fields: Prisma.ChapterFieldRefs operations: { findUnique: { args: Prisma.ChapterFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.ChapterFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.ChapterFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.ChapterFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.ChapterFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.ChapterCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.ChapterCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.ChapterCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.ChapterDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.ChapterUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.ChapterDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.ChapterUpdateManyArgs result: BatchPayload } updateManyAndReturn: { args: Prisma.ChapterUpdateManyAndReturnArgs result: $Utils.PayloadToResult[] } upsert: { args: Prisma.ChapterUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.ChapterAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.ChapterGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.ChapterCountArgs result: $Utils.Optional | number } } } Character: { payload: Prisma.$CharacterPayload fields: Prisma.CharacterFieldRefs operations: { findUnique: { args: Prisma.CharacterFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.CharacterFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.CharacterFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.CharacterFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.CharacterFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.CharacterCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.CharacterCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.CharacterCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.CharacterDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.CharacterUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.CharacterDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.CharacterUpdateManyArgs result: BatchPayload } updateManyAndReturn: { args: Prisma.CharacterUpdateManyAndReturnArgs result: $Utils.PayloadToResult[] } upsert: { args: Prisma.CharacterUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.CharacterAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.CharacterGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.CharacterCountArgs result: $Utils.Optional | number } } } CoverDesign: { payload: Prisma.$CoverDesignPayload fields: Prisma.CoverDesignFieldRefs operations: { findUnique: { args: Prisma.CoverDesignFindUniqueArgs result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.CoverDesignFindUniqueOrThrowArgs result: $Utils.PayloadToResult } findFirst: { args: Prisma.CoverDesignFindFirstArgs result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.CoverDesignFindFirstOrThrowArgs result: $Utils.PayloadToResult } findMany: { args: Prisma.CoverDesignFindManyArgs result: $Utils.PayloadToResult[] } create: { args: Prisma.CoverDesignCreateArgs result: $Utils.PayloadToResult } createMany: { args: Prisma.CoverDesignCreateManyArgs result: BatchPayload } createManyAndReturn: { args: Prisma.CoverDesignCreateManyAndReturnArgs result: $Utils.PayloadToResult[] } delete: { args: Prisma.CoverDesignDeleteArgs result: $Utils.PayloadToResult } update: { args: Prisma.CoverDesignUpdateArgs result: $Utils.PayloadToResult } deleteMany: { args: Prisma.CoverDesignDeleteManyArgs result: BatchPayload } updateMany: { args: Prisma.CoverDesignUpdateManyArgs result: BatchPayload } updateManyAndReturn: { args: Prisma.CoverDesignUpdateManyAndReturnArgs result: $Utils.PayloadToResult[] } upsert: { args: Prisma.CoverDesignUpsertArgs result: $Utils.PayloadToResult } aggregate: { args: Prisma.CoverDesignAggregateArgs result: $Utils.Optional } groupBy: { args: Prisma.CoverDesignGroupByArgs result: $Utils.Optional[] } count: { args: Prisma.CoverDesignCountArgs 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 { /** * @default "colorless" */ errorFormat?: ErrorFormat /** * @example * ``` * // Shorthand for `emit: 'stdout'` * log: ['query', 'info', 'warn', 'error'] * * // Emit as events only * log: [ * { emit: 'event', level: 'query' }, * { emit: 'event', level: 'info' }, * { emit: 'event', level: 'warn' } * { emit: 'event', level: 'error' } * ] * * / Emit as events and log to stdout * og: [ * { emit: 'stdout', level: 'query' }, * { emit: 'stdout', level: 'info' }, * { emit: 'stdout', level: 'warn' } * { emit: 'stdout', level: 'error' } * * ``` * Read more in our [docs](https://pris.ly/d/logging). */ log?: (LogLevel | LogDefinition)[] /** * The default values for transactionOptions * maxWait ?= 2000 * timeout ?= 5000 */ transactionOptions?: { maxWait?: number timeout?: number isolationLevel?: Prisma.TransactionIsolationLevel } /** * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale` */ adapter?: runtime.SqlDriverAdapterFactory /** * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. */ accelerateUrl?: string /** * Global configuration for omitting model fields by default. * * @example * ``` * const prisma = new PrismaClient({ * omit: { * user: { * password: true * } * } * }) * ``` */ omit?: Prisma.GlobalOmitConfig /** * SQL commenter plugins that add metadata to SQL queries as comments. * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/ * * @example * ``` * const prisma = new PrismaClient({ * adapter, * comments: [ * traceContext(), * queryInsights(), * ], * }) * ``` */ comments?: runtime.SqlCommenterPlugin[] } export type GlobalOmitConfig = { user?: UserOmit session?: SessionOmit book?: BookOmit chapter?: ChapterOmit character?: CharacterOmit coverDesign?: CoverDesignOmit } /* Types for Logging */ export type LogLevel = 'info' | 'query' | 'warn' | 'error' export type LogDefinition = { level: LogLevel emit: 'stdout' | 'event' } export type CheckIsLogLevel = T extends LogLevel ? T : never; export type GetLogType = CheckIsLogLevel< T extends LogDefinition ? T['level'] : T >; export type GetEvents = T extends Array ? 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' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'executeRaw' | 'queryRaw' | 'aggregate' | 'count' | 'runCommandRaw' | 'findRaw' | 'groupBy' // 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 = { books: number coverDesigns: number sessions: number } export type UserCountOutputTypeSelect = { books?: boolean | UserCountOutputTypeCountBooksArgs coverDesigns?: boolean | UserCountOutputTypeCountCoverDesignsArgs sessions?: boolean | UserCountOutputTypeCountSessionsArgs } // Custom InputTypes /** * UserCountOutputType without action */ export type UserCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the UserCountOutputType */ select?: UserCountOutputTypeSelect | null } /** * UserCountOutputType without action */ export type UserCountOutputTypeCountBooksArgs = { where?: BookWhereInput } /** * UserCountOutputType without action */ export type UserCountOutputTypeCountCoverDesignsArgs = { where?: CoverDesignWhereInput } /** * UserCountOutputType without action */ export type UserCountOutputTypeCountSessionsArgs = { where?: SessionWhereInput } /** * Count Type BookCountOutputType */ export type BookCountOutputType = { chapters: number characters: number } export type BookCountOutputTypeSelect = { chapters?: boolean | BookCountOutputTypeCountChaptersArgs characters?: boolean | BookCountOutputTypeCountCharactersArgs } // Custom InputTypes /** * BookCountOutputType without action */ export type BookCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the BookCountOutputType */ select?: BookCountOutputTypeSelect | null } /** * BookCountOutputType without action */ export type BookCountOutputTypeCountChaptersArgs = { where?: ChapterWhereInput } /** * BookCountOutputType without action */ export type BookCountOutputTypeCountCharactersArgs = { where?: CharacterWhereInput } /** * Models */ /** * Model User */ export type AggregateUser = { _count: UserCountAggregateOutputType | null _min: UserMinAggregateOutputType | null _max: UserMaxAggregateOutputType | null } export type UserMinAggregateOutputType = { id: string | null email: string | null password: string | null name: string | null role: string | null createdAt: Date | null updatedAt: Date | null } export type UserMaxAggregateOutputType = { id: string | null email: string | null password: string | null name: string | null role: string | null createdAt: Date | null updatedAt: Date | null } export type UserCountAggregateOutputType = { id: number email: number password: number name: number role: number createdAt: number updatedAt: number _all: number } export type UserMinAggregateInputType = { id?: true email?: true password?: true name?: true role?: true createdAt?: true updatedAt?: true } export type UserMaxAggregateInputType = { id?: true email?: true password?: true name?: true role?: true createdAt?: true updatedAt?: true } export type UserCountAggregateInputType = { id?: true email?: true password?: true name?: true role?: 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 email: string password: string name: string | null role: string 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 email?: boolean password?: boolean name?: boolean role?: boolean createdAt?: boolean updatedAt?: boolean books?: boolean | User$booksArgs coverDesigns?: boolean | User$coverDesignsArgs sessions?: boolean | User$sessionsArgs _count?: boolean | UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean email?: boolean password?: boolean name?: boolean role?: boolean createdAt?: boolean updatedAt?: boolean }, ExtArgs["result"]["user"]> export type UserSelectUpdateManyAndReturn = $Extensions.GetSelect<{ id?: boolean email?: boolean password?: boolean name?: boolean role?: boolean createdAt?: boolean updatedAt?: boolean }, ExtArgs["result"]["user"]> export type UserSelectScalar = { id?: boolean email?: boolean password?: boolean name?: boolean role?: boolean createdAt?: boolean updatedAt?: boolean } export type UserOmit = $Extensions.GetOmit<"id" | "email" | "password" | "name" | "role" | "createdAt" | "updatedAt", ExtArgs["result"]["user"]> export type UserInclude = { books?: boolean | User$booksArgs coverDesigns?: boolean | User$coverDesignsArgs sessions?: boolean | User$sessionsArgs _count?: boolean | UserCountOutputTypeDefaultArgs } export type UserIncludeCreateManyAndReturn = {} export type UserIncludeUpdateManyAndReturn = {} export type $UserPayload = { name: "User" objects: { books: Prisma.$BookPayload[] coverDesigns: Prisma.$CoverDesignPayload[] sessions: Prisma.$SessionPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string email: string password: string name: string | null role: string 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", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * 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", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * 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", GlobalOmitOptions>> /** * 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * 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", GlobalOmitOptions>> /** * 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * 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 /** * Update zero or more Users and returns the data updated in the database. * @param {UserUpdateManyAndReturnArgs} args - Arguments to update many Users. * @example * // Update many Users * const user = await prisma.user.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Users and only return the `id` * const userWithIdOnly = await prisma.user.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here * }, * 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 * */ updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> /** * 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", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * 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" books = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> coverDesigns = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> sessions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | 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 email: FieldRef<"User", 'String'> readonly password: FieldRef<"User", 'String'> readonly name: FieldRef<"User", 'String'> readonly role: 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 /** * Omit specific fields from the User */ omit?: UserOmit | 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 /** * Omit specific fields from the User */ omit?: UserOmit | 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 /** * Omit specific fields from the User */ omit?: UserOmit | 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 /** * Omit specific fields from the User */ omit?: UserOmit | 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 /** * Omit specific fields from the User */ omit?: UserOmit | 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 /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Users. */ distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] } /** * User create */ export type UserCreateArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Omit specific fields from the User */ omit?: UserOmit | 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[] } /** * User createManyAndReturn */ export type UserCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelectCreateManyAndReturn | null /** * Omit specific fields from the User */ omit?: UserOmit | null /** * The data used to create many Users. */ data: UserCreateManyInput | UserCreateManyInput[] } /** * User update */ export type UserUpdateArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Omit specific fields from the User */ omit?: UserOmit | 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 /** * Limit how many Users to update. */ limit?: number } /** * User updateManyAndReturn */ export type UserUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelectUpdateManyAndReturn | null /** * Omit specific fields from the User */ omit?: UserOmit | null /** * The data used to update Users. */ data: XOR /** * Filter which Users to update */ where?: UserWhereInput /** * Limit how many Users to update. */ limit?: number } /** * User upsert */ export type UserUpsertArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Omit specific fields from the User */ omit?: UserOmit | 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 /** * Omit specific fields from the User */ omit?: UserOmit | 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 /** * Limit how many Users to delete. */ limit?: number } /** * User.books */ export type User$booksArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null where?: BookWhereInput orderBy?: BookOrderByWithRelationInput | BookOrderByWithRelationInput[] cursor?: BookWhereUniqueInput take?: number skip?: number distinct?: BookScalarFieldEnum | BookScalarFieldEnum[] } /** * User.coverDesigns */ export type User$coverDesignsArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null where?: CoverDesignWhereInput orderBy?: CoverDesignOrderByWithRelationInput | CoverDesignOrderByWithRelationInput[] cursor?: CoverDesignWhereUniqueInput take?: number skip?: number distinct?: CoverDesignScalarFieldEnum | CoverDesignScalarFieldEnum[] } /** * User.sessions */ export type User$sessionsArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null where?: SessionWhereInput orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] cursor?: SessionWhereUniqueInput take?: number skip?: number distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] } /** * User without action */ export type UserDefaultArgs = { /** * Select specific fields to fetch from the User */ select?: UserSelect | null /** * Omit specific fields from the User */ omit?: UserOmit | null /** * Choose, which related nodes to fetch as well */ include?: UserInclude | null } /** * Model Session */ export type AggregateSession = { _count: SessionCountAggregateOutputType | null _min: SessionMinAggregateOutputType | null _max: SessionMaxAggregateOutputType | null } export type SessionMinAggregateOutputType = { id: string | null userId: string | null token: string | null expiresAt: Date | null createdAt: Date | null } export type SessionMaxAggregateOutputType = { id: string | null userId: string | null token: string | null expiresAt: Date | null createdAt: Date | null } export type SessionCountAggregateOutputType = { id: number userId: number token: number expiresAt: number createdAt: number _all: number } export type SessionMinAggregateInputType = { id?: true userId?: true token?: true expiresAt?: true createdAt?: true } export type SessionMaxAggregateInputType = { id?: true userId?: true token?: true expiresAt?: true createdAt?: true } export type SessionCountAggregateInputType = { id?: true userId?: true token?: true expiresAt?: true createdAt?: true _all?: true } export type SessionAggregateArgs = { /** * Filter which Session to aggregate. */ where?: SessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Sessions to fetch. */ orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Sessions 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` Sessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Sessions **/ _count?: true | SessionCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SessionMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SessionMaxAggregateInputType } export type GetSessionAggregateType = { [P in keyof T & keyof AggregateSession]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SessionGroupByArgs = { where?: SessionWhereInput orderBy?: SessionOrderByWithAggregationInput | SessionOrderByWithAggregationInput[] by: SessionScalarFieldEnum[] | SessionScalarFieldEnum having?: SessionScalarWhereWithAggregatesInput take?: number skip?: number _count?: SessionCountAggregateInputType | true _min?: SessionMinAggregateInputType _max?: SessionMaxAggregateInputType } export type SessionGroupByOutputType = { id: string userId: string token: string expiresAt: Date createdAt: Date _count: SessionCountAggregateOutputType | null _min: SessionMinAggregateOutputType | null _max: SessionMaxAggregateOutputType | null } type GetSessionGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SessionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SessionSelect = $Extensions.GetSelect<{ id?: boolean userId?: boolean token?: boolean expiresAt?: boolean createdAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["session"]> export type SessionSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean token?: boolean expiresAt?: boolean createdAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["session"]> export type SessionSelectUpdateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean token?: boolean expiresAt?: boolean createdAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["session"]> export type SessionSelectScalar = { id?: boolean userId?: boolean token?: boolean expiresAt?: boolean createdAt?: boolean } export type SessionOmit = $Extensions.GetOmit<"id" | "userId" | "token" | "expiresAt" | "createdAt", ExtArgs["result"]["session"]> export type SessionInclude = { user?: boolean | UserDefaultArgs } export type SessionIncludeCreateManyAndReturn = { user?: boolean | UserDefaultArgs } export type SessionIncludeUpdateManyAndReturn = { user?: boolean | UserDefaultArgs } export type $SessionPayload = { name: "Session" objects: { user: Prisma.$UserPayload } scalars: $Extensions.GetPayloadResult<{ id: string userId: string token: string expiresAt: Date createdAt: Date }, ExtArgs["result"]["session"]> composites: {} } type SessionGetPayload = $Result.GetResult type SessionCountArgs = Omit & { select?: SessionCountAggregateInputType | true } export interface SessionDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Session'], meta: { name: 'Session' } } /** * Find zero or one Session that matches the filter. * @param {SessionFindUniqueArgs} args - Arguments to find a Session * @example * // Get one Session * const session = await prisma.session.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Session that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SessionFindUniqueOrThrowArgs} args - Arguments to find a Session * @example * // Get one Session * const session = await prisma.session.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Session 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 {SessionFindFirstArgs} args - Arguments to find a Session * @example * // Get one Session * const session = await prisma.session.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Session 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 {SessionFindFirstOrThrowArgs} args - Arguments to find a Session * @example * // Get one Session * const session = await prisma.session.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Sessions 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 {SessionFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Sessions * const sessions = await prisma.session.findMany() * * // Get first 10 Sessions * const sessions = await prisma.session.findMany({ take: 10 }) * * // Only select the `id` * const sessionWithIdOnly = await prisma.session.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> /** * Create a Session. * @param {SessionCreateArgs} args - Arguments to create a Session. * @example * // Create one Session * const Session = await prisma.session.create({ * data: { * // ... data to create a Session * } * }) * */ create(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Sessions. * @param {SessionCreateManyArgs} args - Arguments to create many Sessions. * @example * // Create many Sessions * const session = await prisma.session.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many Sessions and returns the data saved in the database. * @param {SessionCreateManyAndReturnArgs} args - Arguments to create many Sessions. * @example * // Create many Sessions * const session = await prisma.session.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Sessions and only return the `id` * const sessionWithIdOnly = await prisma.session.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", GlobalOmitOptions>> /** * Delete a Session. * @param {SessionDeleteArgs} args - Arguments to delete one Session. * @example * // Delete one Session * const Session = await prisma.session.delete({ * where: { * // ... filter to delete one Session * } * }) * */ delete(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Session. * @param {SessionUpdateArgs} args - Arguments to update one Session. * @example * // Update one Session * const session = await prisma.session.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Sessions. * @param {SessionDeleteManyArgs} args - Arguments to filter Sessions to delete. * @example * // Delete a few Sessions * const { count } = await prisma.session.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Sessions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SessionUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Sessions * const session = await prisma.session.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Sessions and returns the data updated in the database. * @param {SessionUpdateManyAndReturnArgs} args - Arguments to update many Sessions. * @example * // Update many Sessions * const session = await prisma.session.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Sessions and only return the `id` * const sessionWithIdOnly = await prisma.session.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here * }, * 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 * */ updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one Session. * @param {SessionUpsertArgs} args - Arguments to update or create a Session. * @example * // Update or create a Session * const session = await prisma.session.upsert({ * create: { * // ... data to create a Session * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Session we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__SessionClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Sessions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SessionCountArgs} args - Arguments to filter Sessions to count. * @example * // Count the number of Sessions * const count = await prisma.session.count({ * where: { * // ... the filter for the Sessions 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 Session. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SessionAggregateArgs} 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 Session. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SessionGroupByArgs} 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 SessionGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SessionGroupByArgs['orderBy'] } : { orderBy?: SessionGroupByArgs['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 ? GetSessionGroupByPayload : Prisma.PrismaPromise /** * Fields of the Session model */ readonly fields: SessionFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Session. * 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__SessionClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> /** * 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 Session model */ interface SessionFieldRefs { readonly id: FieldRef<"Session", 'String'> readonly userId: FieldRef<"Session", 'String'> readonly token: FieldRef<"Session", 'String'> readonly expiresAt: FieldRef<"Session", 'DateTime'> readonly createdAt: FieldRef<"Session", 'DateTime'> } // Custom InputTypes /** * Session findUnique */ export type SessionFindUniqueArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * Filter, which Session to fetch. */ where: SessionWhereUniqueInput } /** * Session findUniqueOrThrow */ export type SessionFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * Filter, which Session to fetch. */ where: SessionWhereUniqueInput } /** * Session findFirst */ export type SessionFindFirstArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * Filter, which Session to fetch. */ where?: SessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Sessions to fetch. */ orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Sessions. */ cursor?: SessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Sessions 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` Sessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Sessions. */ distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] } /** * Session findFirstOrThrow */ export type SessionFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * Filter, which Session to fetch. */ where?: SessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Sessions to fetch. */ orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Sessions. */ cursor?: SessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Sessions 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` Sessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Sessions. */ distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] } /** * Session findMany */ export type SessionFindManyArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * Filter, which Sessions to fetch. */ where?: SessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Sessions to fetch. */ orderBy?: SessionOrderByWithRelationInput | SessionOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Sessions. */ cursor?: SessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Sessions 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` Sessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Sessions. */ distinct?: SessionScalarFieldEnum | SessionScalarFieldEnum[] } /** * Session create */ export type SessionCreateArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * The data needed to create a Session. */ data: XOR } /** * Session createMany */ export type SessionCreateManyArgs = { /** * The data used to create many Sessions. */ data: SessionCreateManyInput | SessionCreateManyInput[] } /** * Session createManyAndReturn */ export type SessionCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelectCreateManyAndReturn | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * The data used to create many Sessions. */ data: SessionCreateManyInput | SessionCreateManyInput[] /** * Choose, which related nodes to fetch as well */ include?: SessionIncludeCreateManyAndReturn | null } /** * Session update */ export type SessionUpdateArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * The data needed to update a Session. */ data: XOR /** * Choose, which Session to update. */ where: SessionWhereUniqueInput } /** * Session updateMany */ export type SessionUpdateManyArgs = { /** * The data used to update Sessions. */ data: XOR /** * Filter which Sessions to update */ where?: SessionWhereInput /** * Limit how many Sessions to update. */ limit?: number } /** * Session updateManyAndReturn */ export type SessionUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelectUpdateManyAndReturn | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * The data used to update Sessions. */ data: XOR /** * Filter which Sessions to update */ where?: SessionWhereInput /** * Limit how many Sessions to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: SessionIncludeUpdateManyAndReturn | null } /** * Session upsert */ export type SessionUpsertArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * The filter to search for the Session to update in case it exists. */ where: SessionWhereUniqueInput /** * In case the Session found by the `where` argument doesn't exist, create a new Session with this data. */ create: XOR /** * In case the Session was found with the provided `where` argument, update it with this data. */ update: XOR } /** * Session delete */ export type SessionDeleteArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null /** * Filter which Session to delete. */ where: SessionWhereUniqueInput } /** * Session deleteMany */ export type SessionDeleteManyArgs = { /** * Filter which Sessions to delete */ where?: SessionWhereInput /** * Limit how many Sessions to delete. */ limit?: number } /** * Session without action */ export type SessionDefaultArgs = { /** * Select specific fields to fetch from the Session */ select?: SessionSelect | null /** * Omit specific fields from the Session */ omit?: SessionOmit | null /** * Choose, which related nodes to fetch as well */ include?: SessionInclude | null } /** * Model Book */ export type AggregateBook = { _count: BookCountAggregateOutputType | null _avg: BookAvgAggregateOutputType | null _sum: BookSumAggregateOutputType | null _min: BookMinAggregateOutputType | null _max: BookMaxAggregateOutputType | null } export type BookAvgAggregateOutputType = { currentChapter: number | null } export type BookSumAggregateOutputType = { currentChapter: number | null } export type BookMinAggregateOutputType = { id: string | null userId: string | null title: string | null genre: string | null idea: string | null logline: string | null currentChapter: number | null coverId: string | null createdAt: Date | null updatedAt: Date | null } export type BookMaxAggregateOutputType = { id: string | null userId: string | null title: string | null genre: string | null idea: string | null logline: string | null currentChapter: number | null coverId: string | null createdAt: Date | null updatedAt: Date | null } export type BookCountAggregateOutputType = { id: number userId: number title: number genre: number idea: number logline: number outline: number currentChapter: number coverId: number createdAt: number updatedAt: number _all: number } export type BookAvgAggregateInputType = { currentChapter?: true } export type BookSumAggregateInputType = { currentChapter?: true } export type BookMinAggregateInputType = { id?: true userId?: true title?: true genre?: true idea?: true logline?: true currentChapter?: true coverId?: true createdAt?: true updatedAt?: true } export type BookMaxAggregateInputType = { id?: true userId?: true title?: true genre?: true idea?: true logline?: true currentChapter?: true coverId?: true createdAt?: true updatedAt?: true } export type BookCountAggregateInputType = { id?: true userId?: true title?: true genre?: true idea?: true logline?: true outline?: true currentChapter?: true coverId?: true createdAt?: true updatedAt?: true _all?: true } export type BookAggregateArgs = { /** * Filter which Book to aggregate. */ where?: BookWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Books to fetch. */ orderBy?: BookOrderByWithRelationInput | BookOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: BookWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Books 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` Books. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Books **/ _count?: true | BookCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: BookAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: BookSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: BookMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: BookMaxAggregateInputType } export type GetBookAggregateType = { [P in keyof T & keyof AggregateBook]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type BookGroupByArgs = { where?: BookWhereInput orderBy?: BookOrderByWithAggregationInput | BookOrderByWithAggregationInput[] by: BookScalarFieldEnum[] | BookScalarFieldEnum having?: BookScalarWhereWithAggregatesInput take?: number skip?: number _count?: BookCountAggregateInputType | true _avg?: BookAvgAggregateInputType _sum?: BookSumAggregateInputType _min?: BookMinAggregateInputType _max?: BookMaxAggregateInputType } export type BookGroupByOutputType = { id: string userId: string title: string genre: string idea: string logline: string | null outline: JsonValue | null currentChapter: number coverId: string | null createdAt: Date updatedAt: Date _count: BookCountAggregateOutputType | null _avg: BookAvgAggregateOutputType | null _sum: BookSumAggregateOutputType | null _min: BookMinAggregateOutputType | null _max: BookMaxAggregateOutputType | null } type GetBookGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof BookGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type BookSelect = $Extensions.GetSelect<{ id?: boolean userId?: boolean title?: boolean genre?: boolean idea?: boolean logline?: boolean outline?: boolean currentChapter?: boolean coverId?: boolean createdAt?: boolean updatedAt?: boolean user?: boolean | UserDefaultArgs chapters?: boolean | Book$chaptersArgs characters?: boolean | Book$charactersArgs _count?: boolean | BookCountOutputTypeDefaultArgs }, ExtArgs["result"]["book"]> export type BookSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean title?: boolean genre?: boolean idea?: boolean logline?: boolean outline?: boolean currentChapter?: boolean coverId?: boolean createdAt?: boolean updatedAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["book"]> export type BookSelectUpdateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean title?: boolean genre?: boolean idea?: boolean logline?: boolean outline?: boolean currentChapter?: boolean coverId?: boolean createdAt?: boolean updatedAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["book"]> export type BookSelectScalar = { id?: boolean userId?: boolean title?: boolean genre?: boolean idea?: boolean logline?: boolean outline?: boolean currentChapter?: boolean coverId?: boolean createdAt?: boolean updatedAt?: boolean } export type BookOmit = $Extensions.GetOmit<"id" | "userId" | "title" | "genre" | "idea" | "logline" | "outline" | "currentChapter" | "coverId" | "createdAt" | "updatedAt", ExtArgs["result"]["book"]> export type BookInclude = { user?: boolean | UserDefaultArgs chapters?: boolean | Book$chaptersArgs characters?: boolean | Book$charactersArgs _count?: boolean | BookCountOutputTypeDefaultArgs } export type BookIncludeCreateManyAndReturn = { user?: boolean | UserDefaultArgs } export type BookIncludeUpdateManyAndReturn = { user?: boolean | UserDefaultArgs } export type $BookPayload = { name: "Book" objects: { user: Prisma.$UserPayload chapters: Prisma.$ChapterPayload[] characters: Prisma.$CharacterPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string userId: string title: string genre: string idea: string logline: string | null outline: Prisma.JsonValue | null currentChapter: number coverId: string | null createdAt: Date updatedAt: Date }, ExtArgs["result"]["book"]> composites: {} } type BookGetPayload = $Result.GetResult type BookCountArgs = Omit & { select?: BookCountAggregateInputType | true } export interface BookDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Book'], meta: { name: 'Book' } } /** * Find zero or one Book that matches the filter. * @param {BookFindUniqueArgs} args - Arguments to find a Book * @example * // Get one Book * const book = await prisma.book.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__BookClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Book that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {BookFindUniqueOrThrowArgs} args - Arguments to find a Book * @example * // Get one Book * const book = await prisma.book.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__BookClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Book 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 {BookFindFirstArgs} args - Arguments to find a Book * @example * // Get one Book * const book = await prisma.book.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__BookClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Book 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 {BookFindFirstOrThrowArgs} args - Arguments to find a Book * @example * // Get one Book * const book = await prisma.book.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__BookClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Books 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 {BookFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Books * const books = await prisma.book.findMany() * * // Get first 10 Books * const books = await prisma.book.findMany({ take: 10 }) * * // Only select the `id` * const bookWithIdOnly = await prisma.book.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> /** * Create a Book. * @param {BookCreateArgs} args - Arguments to create a Book. * @example * // Create one Book * const Book = await prisma.book.create({ * data: { * // ... data to create a Book * } * }) * */ create(args: SelectSubset>): Prisma__BookClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Books. * @param {BookCreateManyArgs} args - Arguments to create many Books. * @example * // Create many Books * const book = await prisma.book.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many Books and returns the data saved in the database. * @param {BookCreateManyAndReturnArgs} args - Arguments to create many Books. * @example * // Create many Books * const book = await prisma.book.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Books and only return the `id` * const bookWithIdOnly = await prisma.book.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", GlobalOmitOptions>> /** * Delete a Book. * @param {BookDeleteArgs} args - Arguments to delete one Book. * @example * // Delete one Book * const Book = await prisma.book.delete({ * where: { * // ... filter to delete one Book * } * }) * */ delete(args: SelectSubset>): Prisma__BookClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Book. * @param {BookUpdateArgs} args - Arguments to update one Book. * @example * // Update one Book * const book = await prisma.book.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__BookClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Books. * @param {BookDeleteManyArgs} args - Arguments to filter Books to delete. * @example * // Delete a few Books * const { count } = await prisma.book.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Books. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {BookUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Books * const book = await prisma.book.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Books and returns the data updated in the database. * @param {BookUpdateManyAndReturnArgs} args - Arguments to update many Books. * @example * // Update many Books * const book = await prisma.book.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Books and only return the `id` * const bookWithIdOnly = await prisma.book.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here * }, * 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 * */ updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one Book. * @param {BookUpsertArgs} args - Arguments to update or create a Book. * @example * // Update or create a Book * const book = await prisma.book.upsert({ * create: { * // ... data to create a Book * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Book we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__BookClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Books. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {BookCountArgs} args - Arguments to filter Books to count. * @example * // Count the number of Books * const count = await prisma.book.count({ * where: { * // ... the filter for the Books 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 Book. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {BookAggregateArgs} 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 Book. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {BookGroupByArgs} 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 BookGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: BookGroupByArgs['orderBy'] } : { orderBy?: BookGroupByArgs['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 ? GetBookGroupByPayload : Prisma.PrismaPromise /** * Fields of the Book model */ readonly fields: BookFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Book. * 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__BookClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> chapters = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> characters = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | 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 Book model */ interface BookFieldRefs { readonly id: FieldRef<"Book", 'String'> readonly userId: FieldRef<"Book", 'String'> readonly title: FieldRef<"Book", 'String'> readonly genre: FieldRef<"Book", 'String'> readonly idea: FieldRef<"Book", 'String'> readonly logline: FieldRef<"Book", 'String'> readonly outline: FieldRef<"Book", 'Json'> readonly currentChapter: FieldRef<"Book", 'Int'> readonly coverId: FieldRef<"Book", 'String'> readonly createdAt: FieldRef<"Book", 'DateTime'> readonly updatedAt: FieldRef<"Book", 'DateTime'> } // Custom InputTypes /** * Book findUnique */ export type BookFindUniqueArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * Filter, which Book to fetch. */ where: BookWhereUniqueInput } /** * Book findUniqueOrThrow */ export type BookFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * Filter, which Book to fetch. */ where: BookWhereUniqueInput } /** * Book findFirst */ export type BookFindFirstArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * Filter, which Book to fetch. */ where?: BookWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Books to fetch. */ orderBy?: BookOrderByWithRelationInput | BookOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Books. */ cursor?: BookWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Books 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` Books. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Books. */ distinct?: BookScalarFieldEnum | BookScalarFieldEnum[] } /** * Book findFirstOrThrow */ export type BookFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * Filter, which Book to fetch. */ where?: BookWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Books to fetch. */ orderBy?: BookOrderByWithRelationInput | BookOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Books. */ cursor?: BookWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Books 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` Books. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Books. */ distinct?: BookScalarFieldEnum | BookScalarFieldEnum[] } /** * Book findMany */ export type BookFindManyArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * Filter, which Books to fetch. */ where?: BookWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Books to fetch. */ orderBy?: BookOrderByWithRelationInput | BookOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Books. */ cursor?: BookWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Books 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` Books. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Books. */ distinct?: BookScalarFieldEnum | BookScalarFieldEnum[] } /** * Book create */ export type BookCreateArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * The data needed to create a Book. */ data: XOR } /** * Book createMany */ export type BookCreateManyArgs = { /** * The data used to create many Books. */ data: BookCreateManyInput | BookCreateManyInput[] } /** * Book createManyAndReturn */ export type BookCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelectCreateManyAndReturn | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * The data used to create many Books. */ data: BookCreateManyInput | BookCreateManyInput[] /** * Choose, which related nodes to fetch as well */ include?: BookIncludeCreateManyAndReturn | null } /** * Book update */ export type BookUpdateArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * The data needed to update a Book. */ data: XOR /** * Choose, which Book to update. */ where: BookWhereUniqueInput } /** * Book updateMany */ export type BookUpdateManyArgs = { /** * The data used to update Books. */ data: XOR /** * Filter which Books to update */ where?: BookWhereInput /** * Limit how many Books to update. */ limit?: number } /** * Book updateManyAndReturn */ export type BookUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelectUpdateManyAndReturn | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * The data used to update Books. */ data: XOR /** * Filter which Books to update */ where?: BookWhereInput /** * Limit how many Books to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: BookIncludeUpdateManyAndReturn | null } /** * Book upsert */ export type BookUpsertArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * The filter to search for the Book to update in case it exists. */ where: BookWhereUniqueInput /** * In case the Book found by the `where` argument doesn't exist, create a new Book with this data. */ create: XOR /** * In case the Book was found with the provided `where` argument, update it with this data. */ update: XOR } /** * Book delete */ export type BookDeleteArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null /** * Filter which Book to delete. */ where: BookWhereUniqueInput } /** * Book deleteMany */ export type BookDeleteManyArgs = { /** * Filter which Books to delete */ where?: BookWhereInput /** * Limit how many Books to delete. */ limit?: number } /** * Book.chapters */ export type Book$chaptersArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null where?: ChapterWhereInput orderBy?: ChapterOrderByWithRelationInput | ChapterOrderByWithRelationInput[] cursor?: ChapterWhereUniqueInput take?: number skip?: number distinct?: ChapterScalarFieldEnum | ChapterScalarFieldEnum[] } /** * Book.characters */ export type Book$charactersArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null where?: CharacterWhereInput orderBy?: CharacterOrderByWithRelationInput | CharacterOrderByWithRelationInput[] cursor?: CharacterWhereUniqueInput take?: number skip?: number distinct?: CharacterScalarFieldEnum | CharacterScalarFieldEnum[] } /** * Book without action */ export type BookDefaultArgs = { /** * Select specific fields to fetch from the Book */ select?: BookSelect | null /** * Omit specific fields from the Book */ omit?: BookOmit | null /** * Choose, which related nodes to fetch as well */ include?: BookInclude | null } /** * Model Chapter */ export type AggregateChapter = { _count: ChapterCountAggregateOutputType | null _avg: ChapterAvgAggregateOutputType | null _sum: ChapterSumAggregateOutputType | null _min: ChapterMinAggregateOutputType | null _max: ChapterMaxAggregateOutputType | null } export type ChapterAvgAggregateOutputType = { number: number | null } export type ChapterSumAggregateOutputType = { number: number | null } export type ChapterMinAggregateOutputType = { id: string | null bookId: string | null number: number | null title: string | null summary: string | null content: string | null isGenerated: boolean | null createdAt: Date | null updatedAt: Date | null } export type ChapterMaxAggregateOutputType = { id: string | null bookId: string | null number: number | null title: string | null summary: string | null content: string | null isGenerated: boolean | null createdAt: Date | null updatedAt: Date | null } export type ChapterCountAggregateOutputType = { id: number bookId: number number: number title: number summary: number content: number isGenerated: number createdAt: number updatedAt: number _all: number } export type ChapterAvgAggregateInputType = { number?: true } export type ChapterSumAggregateInputType = { number?: true } export type ChapterMinAggregateInputType = { id?: true bookId?: true number?: true title?: true summary?: true content?: true isGenerated?: true createdAt?: true updatedAt?: true } export type ChapterMaxAggregateInputType = { id?: true bookId?: true number?: true title?: true summary?: true content?: true isGenerated?: true createdAt?: true updatedAt?: true } export type ChapterCountAggregateInputType = { id?: true bookId?: true number?: true title?: true summary?: true content?: true isGenerated?: true createdAt?: true updatedAt?: true _all?: true } export type ChapterAggregateArgs = { /** * Filter which Chapter to aggregate. */ where?: ChapterWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Chapters to fetch. */ orderBy?: ChapterOrderByWithRelationInput | ChapterOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: ChapterWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Chapters 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` Chapters. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Chapters **/ _count?: true | ChapterCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: ChapterAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: ChapterSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: ChapterMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: ChapterMaxAggregateInputType } export type GetChapterAggregateType = { [P in keyof T & keyof AggregateChapter]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type ChapterGroupByArgs = { where?: ChapterWhereInput orderBy?: ChapterOrderByWithAggregationInput | ChapterOrderByWithAggregationInput[] by: ChapterScalarFieldEnum[] | ChapterScalarFieldEnum having?: ChapterScalarWhereWithAggregatesInput take?: number skip?: number _count?: ChapterCountAggregateInputType | true _avg?: ChapterAvgAggregateInputType _sum?: ChapterSumAggregateInputType _min?: ChapterMinAggregateInputType _max?: ChapterMaxAggregateInputType } export type ChapterGroupByOutputType = { id: string bookId: string number: number title: string summary: string content: string | null isGenerated: boolean createdAt: Date updatedAt: Date _count: ChapterCountAggregateOutputType | null _avg: ChapterAvgAggregateOutputType | null _sum: ChapterSumAggregateOutputType | null _min: ChapterMinAggregateOutputType | null _max: ChapterMaxAggregateOutputType | null } type GetChapterGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof ChapterGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type ChapterSelect = $Extensions.GetSelect<{ id?: boolean bookId?: boolean number?: boolean title?: boolean summary?: boolean content?: boolean isGenerated?: boolean createdAt?: boolean updatedAt?: boolean book?: boolean | BookDefaultArgs }, ExtArgs["result"]["chapter"]> export type ChapterSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean bookId?: boolean number?: boolean title?: boolean summary?: boolean content?: boolean isGenerated?: boolean createdAt?: boolean updatedAt?: boolean book?: boolean | BookDefaultArgs }, ExtArgs["result"]["chapter"]> export type ChapterSelectUpdateManyAndReturn = $Extensions.GetSelect<{ id?: boolean bookId?: boolean number?: boolean title?: boolean summary?: boolean content?: boolean isGenerated?: boolean createdAt?: boolean updatedAt?: boolean book?: boolean | BookDefaultArgs }, ExtArgs["result"]["chapter"]> export type ChapterSelectScalar = { id?: boolean bookId?: boolean number?: boolean title?: boolean summary?: boolean content?: boolean isGenerated?: boolean createdAt?: boolean updatedAt?: boolean } export type ChapterOmit = $Extensions.GetOmit<"id" | "bookId" | "number" | "title" | "summary" | "content" | "isGenerated" | "createdAt" | "updatedAt", ExtArgs["result"]["chapter"]> export type ChapterInclude = { book?: boolean | BookDefaultArgs } export type ChapterIncludeCreateManyAndReturn = { book?: boolean | BookDefaultArgs } export type ChapterIncludeUpdateManyAndReturn = { book?: boolean | BookDefaultArgs } export type $ChapterPayload = { name: "Chapter" objects: { book: Prisma.$BookPayload } scalars: $Extensions.GetPayloadResult<{ id: string bookId: string number: number title: string summary: string content: string | null isGenerated: boolean createdAt: Date updatedAt: Date }, ExtArgs["result"]["chapter"]> composites: {} } type ChapterGetPayload = $Result.GetResult type ChapterCountArgs = Omit & { select?: ChapterCountAggregateInputType | true } export interface ChapterDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Chapter'], meta: { name: 'Chapter' } } /** * Find zero or one Chapter that matches the filter. * @param {ChapterFindUniqueArgs} args - Arguments to find a Chapter * @example * // Get one Chapter * const chapter = await prisma.chapter.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__ChapterClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Chapter that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {ChapterFindUniqueOrThrowArgs} args - Arguments to find a Chapter * @example * // Get one Chapter * const chapter = await prisma.chapter.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__ChapterClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Chapter 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 {ChapterFindFirstArgs} args - Arguments to find a Chapter * @example * // Get one Chapter * const chapter = await prisma.chapter.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__ChapterClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Chapter 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 {ChapterFindFirstOrThrowArgs} args - Arguments to find a Chapter * @example * // Get one Chapter * const chapter = await prisma.chapter.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__ChapterClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Chapters 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 {ChapterFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Chapters * const chapters = await prisma.chapter.findMany() * * // Get first 10 Chapters * const chapters = await prisma.chapter.findMany({ take: 10 }) * * // Only select the `id` * const chapterWithIdOnly = await prisma.chapter.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> /** * Create a Chapter. * @param {ChapterCreateArgs} args - Arguments to create a Chapter. * @example * // Create one Chapter * const Chapter = await prisma.chapter.create({ * data: { * // ... data to create a Chapter * } * }) * */ create(args: SelectSubset>): Prisma__ChapterClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Chapters. * @param {ChapterCreateManyArgs} args - Arguments to create many Chapters. * @example * // Create many Chapters * const chapter = await prisma.chapter.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many Chapters and returns the data saved in the database. * @param {ChapterCreateManyAndReturnArgs} args - Arguments to create many Chapters. * @example * // Create many Chapters * const chapter = await prisma.chapter.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Chapters and only return the `id` * const chapterWithIdOnly = await prisma.chapter.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", GlobalOmitOptions>> /** * Delete a Chapter. * @param {ChapterDeleteArgs} args - Arguments to delete one Chapter. * @example * // Delete one Chapter * const Chapter = await prisma.chapter.delete({ * where: { * // ... filter to delete one Chapter * } * }) * */ delete(args: SelectSubset>): Prisma__ChapterClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Chapter. * @param {ChapterUpdateArgs} args - Arguments to update one Chapter. * @example * // Update one Chapter * const chapter = await prisma.chapter.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__ChapterClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Chapters. * @param {ChapterDeleteManyArgs} args - Arguments to filter Chapters to delete. * @example * // Delete a few Chapters * const { count } = await prisma.chapter.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Chapters. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ChapterUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Chapters * const chapter = await prisma.chapter.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Chapters and returns the data updated in the database. * @param {ChapterUpdateManyAndReturnArgs} args - Arguments to update many Chapters. * @example * // Update many Chapters * const chapter = await prisma.chapter.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Chapters and only return the `id` * const chapterWithIdOnly = await prisma.chapter.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here * }, * 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 * */ updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one Chapter. * @param {ChapterUpsertArgs} args - Arguments to update or create a Chapter. * @example * // Update or create a Chapter * const chapter = await prisma.chapter.upsert({ * create: { * // ... data to create a Chapter * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Chapter we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__ChapterClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Chapters. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ChapterCountArgs} args - Arguments to filter Chapters to count. * @example * // Count the number of Chapters * const count = await prisma.chapter.count({ * where: { * // ... the filter for the Chapters 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 Chapter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ChapterAggregateArgs} 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 Chapter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ChapterGroupByArgs} 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 ChapterGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: ChapterGroupByArgs['orderBy'] } : { orderBy?: ChapterGroupByArgs['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 ? GetChapterGroupByPayload : Prisma.PrismaPromise /** * Fields of the Chapter model */ readonly fields: ChapterFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Chapter. * 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__ChapterClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" book = {}>(args?: Subset>): Prisma__BookClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> /** * 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 Chapter model */ interface ChapterFieldRefs { readonly id: FieldRef<"Chapter", 'String'> readonly bookId: FieldRef<"Chapter", 'String'> readonly number: FieldRef<"Chapter", 'Int'> readonly title: FieldRef<"Chapter", 'String'> readonly summary: FieldRef<"Chapter", 'String'> readonly content: FieldRef<"Chapter", 'String'> readonly isGenerated: FieldRef<"Chapter", 'Boolean'> readonly createdAt: FieldRef<"Chapter", 'DateTime'> readonly updatedAt: FieldRef<"Chapter", 'DateTime'> } // Custom InputTypes /** * Chapter findUnique */ export type ChapterFindUniqueArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * Filter, which Chapter to fetch. */ where: ChapterWhereUniqueInput } /** * Chapter findUniqueOrThrow */ export type ChapterFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * Filter, which Chapter to fetch. */ where: ChapterWhereUniqueInput } /** * Chapter findFirst */ export type ChapterFindFirstArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * Filter, which Chapter to fetch. */ where?: ChapterWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Chapters to fetch. */ orderBy?: ChapterOrderByWithRelationInput | ChapterOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Chapters. */ cursor?: ChapterWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Chapters 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` Chapters. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Chapters. */ distinct?: ChapterScalarFieldEnum | ChapterScalarFieldEnum[] } /** * Chapter findFirstOrThrow */ export type ChapterFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * Filter, which Chapter to fetch. */ where?: ChapterWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Chapters to fetch. */ orderBy?: ChapterOrderByWithRelationInput | ChapterOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Chapters. */ cursor?: ChapterWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Chapters 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` Chapters. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Chapters. */ distinct?: ChapterScalarFieldEnum | ChapterScalarFieldEnum[] } /** * Chapter findMany */ export type ChapterFindManyArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * Filter, which Chapters to fetch. */ where?: ChapterWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Chapters to fetch. */ orderBy?: ChapterOrderByWithRelationInput | ChapterOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Chapters. */ cursor?: ChapterWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Chapters 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` Chapters. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Chapters. */ distinct?: ChapterScalarFieldEnum | ChapterScalarFieldEnum[] } /** * Chapter create */ export type ChapterCreateArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * The data needed to create a Chapter. */ data: XOR } /** * Chapter createMany */ export type ChapterCreateManyArgs = { /** * The data used to create many Chapters. */ data: ChapterCreateManyInput | ChapterCreateManyInput[] } /** * Chapter createManyAndReturn */ export type ChapterCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelectCreateManyAndReturn | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * The data used to create many Chapters. */ data: ChapterCreateManyInput | ChapterCreateManyInput[] /** * Choose, which related nodes to fetch as well */ include?: ChapterIncludeCreateManyAndReturn | null } /** * Chapter update */ export type ChapterUpdateArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * The data needed to update a Chapter. */ data: XOR /** * Choose, which Chapter to update. */ where: ChapterWhereUniqueInput } /** * Chapter updateMany */ export type ChapterUpdateManyArgs = { /** * The data used to update Chapters. */ data: XOR /** * Filter which Chapters to update */ where?: ChapterWhereInput /** * Limit how many Chapters to update. */ limit?: number } /** * Chapter updateManyAndReturn */ export type ChapterUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelectUpdateManyAndReturn | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * The data used to update Chapters. */ data: XOR /** * Filter which Chapters to update */ where?: ChapterWhereInput /** * Limit how many Chapters to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: ChapterIncludeUpdateManyAndReturn | null } /** * Chapter upsert */ export type ChapterUpsertArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * The filter to search for the Chapter to update in case it exists. */ where: ChapterWhereUniqueInput /** * In case the Chapter found by the `where` argument doesn't exist, create a new Chapter with this data. */ create: XOR /** * In case the Chapter was found with the provided `where` argument, update it with this data. */ update: XOR } /** * Chapter delete */ export type ChapterDeleteArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null /** * Filter which Chapter to delete. */ where: ChapterWhereUniqueInput } /** * Chapter deleteMany */ export type ChapterDeleteManyArgs = { /** * Filter which Chapters to delete */ where?: ChapterWhereInput /** * Limit how many Chapters to delete. */ limit?: number } /** * Chapter without action */ export type ChapterDefaultArgs = { /** * Select specific fields to fetch from the Chapter */ select?: ChapterSelect | null /** * Omit specific fields from the Chapter */ omit?: ChapterOmit | null /** * Choose, which related nodes to fetch as well */ include?: ChapterInclude | null } /** * Model Character */ export type AggregateCharacter = { _count: CharacterCountAggregateOutputType | null _min: CharacterMinAggregateOutputType | null _max: CharacterMaxAggregateOutputType | null } export type CharacterMinAggregateOutputType = { id: string | null bookId: string | null name: string | null role: string | null traits: string | null motivation: string | null backstory: string | null createdAt: Date | null updatedAt: Date | null } export type CharacterMaxAggregateOutputType = { id: string | null bookId: string | null name: string | null role: string | null traits: string | null motivation: string | null backstory: string | null createdAt: Date | null updatedAt: Date | null } export type CharacterCountAggregateOutputType = { id: number bookId: number name: number role: number traits: number motivation: number backstory: number createdAt: number updatedAt: number _all: number } export type CharacterMinAggregateInputType = { id?: true bookId?: true name?: true role?: true traits?: true motivation?: true backstory?: true createdAt?: true updatedAt?: true } export type CharacterMaxAggregateInputType = { id?: true bookId?: true name?: true role?: true traits?: true motivation?: true backstory?: true createdAt?: true updatedAt?: true } export type CharacterCountAggregateInputType = { id?: true bookId?: true name?: true role?: true traits?: true motivation?: true backstory?: true createdAt?: true updatedAt?: true _all?: true } export type CharacterAggregateArgs = { /** * Filter which Character to aggregate. */ where?: CharacterWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Characters to fetch. */ orderBy?: CharacterOrderByWithRelationInput | CharacterOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: CharacterWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Characters 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` Characters. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Characters **/ _count?: true | CharacterCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: CharacterMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: CharacterMaxAggregateInputType } export type GetCharacterAggregateType = { [P in keyof T & keyof AggregateCharacter]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type CharacterGroupByArgs = { where?: CharacterWhereInput orderBy?: CharacterOrderByWithAggregationInput | CharacterOrderByWithAggregationInput[] by: CharacterScalarFieldEnum[] | CharacterScalarFieldEnum having?: CharacterScalarWhereWithAggregatesInput take?: number skip?: number _count?: CharacterCountAggregateInputType | true _min?: CharacterMinAggregateInputType _max?: CharacterMaxAggregateInputType } export type CharacterGroupByOutputType = { id: string bookId: string name: string role: string traits: string motivation: string | null backstory: string | null createdAt: Date updatedAt: Date _count: CharacterCountAggregateOutputType | null _min: CharacterMinAggregateOutputType | null _max: CharacterMaxAggregateOutputType | null } type GetCharacterGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof CharacterGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type CharacterSelect = $Extensions.GetSelect<{ id?: boolean bookId?: boolean name?: boolean role?: boolean traits?: boolean motivation?: boolean backstory?: boolean createdAt?: boolean updatedAt?: boolean book?: boolean | BookDefaultArgs }, ExtArgs["result"]["character"]> export type CharacterSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean bookId?: boolean name?: boolean role?: boolean traits?: boolean motivation?: boolean backstory?: boolean createdAt?: boolean updatedAt?: boolean book?: boolean | BookDefaultArgs }, ExtArgs["result"]["character"]> export type CharacterSelectUpdateManyAndReturn = $Extensions.GetSelect<{ id?: boolean bookId?: boolean name?: boolean role?: boolean traits?: boolean motivation?: boolean backstory?: boolean createdAt?: boolean updatedAt?: boolean book?: boolean | BookDefaultArgs }, ExtArgs["result"]["character"]> export type CharacterSelectScalar = { id?: boolean bookId?: boolean name?: boolean role?: boolean traits?: boolean motivation?: boolean backstory?: boolean createdAt?: boolean updatedAt?: boolean } export type CharacterOmit = $Extensions.GetOmit<"id" | "bookId" | "name" | "role" | "traits" | "motivation" | "backstory" | "createdAt" | "updatedAt", ExtArgs["result"]["character"]> export type CharacterInclude = { book?: boolean | BookDefaultArgs } export type CharacterIncludeCreateManyAndReturn = { book?: boolean | BookDefaultArgs } export type CharacterIncludeUpdateManyAndReturn = { book?: boolean | BookDefaultArgs } export type $CharacterPayload = { name: "Character" objects: { book: Prisma.$BookPayload } scalars: $Extensions.GetPayloadResult<{ id: string bookId: string name: string role: string traits: string motivation: string | null backstory: string | null createdAt: Date updatedAt: Date }, ExtArgs["result"]["character"]> composites: {} } type CharacterGetPayload = $Result.GetResult type CharacterCountArgs = Omit & { select?: CharacterCountAggregateInputType | true } export interface CharacterDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Character'], meta: { name: 'Character' } } /** * Find zero or one Character that matches the filter. * @param {CharacterFindUniqueArgs} args - Arguments to find a Character * @example * // Get one Character * const character = await prisma.character.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__CharacterClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Character that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {CharacterFindUniqueOrThrowArgs} args - Arguments to find a Character * @example * // Get one Character * const character = await prisma.character.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__CharacterClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Character 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 {CharacterFindFirstArgs} args - Arguments to find a Character * @example * // Get one Character * const character = await prisma.character.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__CharacterClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Character 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 {CharacterFindFirstOrThrowArgs} args - Arguments to find a Character * @example * // Get one Character * const character = await prisma.character.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__CharacterClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Characters 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 {CharacterFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Characters * const characters = await prisma.character.findMany() * * // Get first 10 Characters * const characters = await prisma.character.findMany({ take: 10 }) * * // Only select the `id` * const characterWithIdOnly = await prisma.character.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> /** * Create a Character. * @param {CharacterCreateArgs} args - Arguments to create a Character. * @example * // Create one Character * const Character = await prisma.character.create({ * data: { * // ... data to create a Character * } * }) * */ create(args: SelectSubset>): Prisma__CharacterClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Characters. * @param {CharacterCreateManyArgs} args - Arguments to create many Characters. * @example * // Create many Characters * const character = await prisma.character.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many Characters and returns the data saved in the database. * @param {CharacterCreateManyAndReturnArgs} args - Arguments to create many Characters. * @example * // Create many Characters * const character = await prisma.character.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Characters and only return the `id` * const characterWithIdOnly = await prisma.character.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", GlobalOmitOptions>> /** * Delete a Character. * @param {CharacterDeleteArgs} args - Arguments to delete one Character. * @example * // Delete one Character * const Character = await prisma.character.delete({ * where: { * // ... filter to delete one Character * } * }) * */ delete(args: SelectSubset>): Prisma__CharacterClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Character. * @param {CharacterUpdateArgs} args - Arguments to update one Character. * @example * // Update one Character * const character = await prisma.character.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__CharacterClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Characters. * @param {CharacterDeleteManyArgs} args - Arguments to filter Characters to delete. * @example * // Delete a few Characters * const { count } = await prisma.character.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Characters. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CharacterUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Characters * const character = await prisma.character.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Characters and returns the data updated in the database. * @param {CharacterUpdateManyAndReturnArgs} args - Arguments to update many Characters. * @example * // Update many Characters * const character = await prisma.character.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Characters and only return the `id` * const characterWithIdOnly = await prisma.character.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here * }, * 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 * */ updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one Character. * @param {CharacterUpsertArgs} args - Arguments to update or create a Character. * @example * // Update or create a Character * const character = await prisma.character.upsert({ * create: { * // ... data to create a Character * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Character we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__CharacterClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Characters. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CharacterCountArgs} args - Arguments to filter Characters to count. * @example * // Count the number of Characters * const count = await prisma.character.count({ * where: { * // ... the filter for the Characters 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 Character. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CharacterAggregateArgs} 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 Character. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CharacterGroupByArgs} 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 CharacterGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: CharacterGroupByArgs['orderBy'] } : { orderBy?: CharacterGroupByArgs['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 ? GetCharacterGroupByPayload : Prisma.PrismaPromise /** * Fields of the Character model */ readonly fields: CharacterFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Character. * 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__CharacterClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" book = {}>(args?: Subset>): Prisma__BookClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> /** * 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 Character model */ interface CharacterFieldRefs { readonly id: FieldRef<"Character", 'String'> readonly bookId: FieldRef<"Character", 'String'> readonly name: FieldRef<"Character", 'String'> readonly role: FieldRef<"Character", 'String'> readonly traits: FieldRef<"Character", 'String'> readonly motivation: FieldRef<"Character", 'String'> readonly backstory: FieldRef<"Character", 'String'> readonly createdAt: FieldRef<"Character", 'DateTime'> readonly updatedAt: FieldRef<"Character", 'DateTime'> } // Custom InputTypes /** * Character findUnique */ export type CharacterFindUniqueArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * Filter, which Character to fetch. */ where: CharacterWhereUniqueInput } /** * Character findUniqueOrThrow */ export type CharacterFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * Filter, which Character to fetch. */ where: CharacterWhereUniqueInput } /** * Character findFirst */ export type CharacterFindFirstArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * Filter, which Character to fetch. */ where?: CharacterWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Characters to fetch. */ orderBy?: CharacterOrderByWithRelationInput | CharacterOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Characters. */ cursor?: CharacterWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Characters 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` Characters. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Characters. */ distinct?: CharacterScalarFieldEnum | CharacterScalarFieldEnum[] } /** * Character findFirstOrThrow */ export type CharacterFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * Filter, which Character to fetch. */ where?: CharacterWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Characters to fetch. */ orderBy?: CharacterOrderByWithRelationInput | CharacterOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Characters. */ cursor?: CharacterWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Characters 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` Characters. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Characters. */ distinct?: CharacterScalarFieldEnum | CharacterScalarFieldEnum[] } /** * Character findMany */ export type CharacterFindManyArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * Filter, which Characters to fetch. */ where?: CharacterWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Characters to fetch. */ orderBy?: CharacterOrderByWithRelationInput | CharacterOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Characters. */ cursor?: CharacterWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Characters 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` Characters. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Characters. */ distinct?: CharacterScalarFieldEnum | CharacterScalarFieldEnum[] } /** * Character create */ export type CharacterCreateArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * The data needed to create a Character. */ data: XOR } /** * Character createMany */ export type CharacterCreateManyArgs = { /** * The data used to create many Characters. */ data: CharacterCreateManyInput | CharacterCreateManyInput[] } /** * Character createManyAndReturn */ export type CharacterCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelectCreateManyAndReturn | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * The data used to create many Characters. */ data: CharacterCreateManyInput | CharacterCreateManyInput[] /** * Choose, which related nodes to fetch as well */ include?: CharacterIncludeCreateManyAndReturn | null } /** * Character update */ export type CharacterUpdateArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * The data needed to update a Character. */ data: XOR /** * Choose, which Character to update. */ where: CharacterWhereUniqueInput } /** * Character updateMany */ export type CharacterUpdateManyArgs = { /** * The data used to update Characters. */ data: XOR /** * Filter which Characters to update */ where?: CharacterWhereInput /** * Limit how many Characters to update. */ limit?: number } /** * Character updateManyAndReturn */ export type CharacterUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelectUpdateManyAndReturn | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * The data used to update Characters. */ data: XOR /** * Filter which Characters to update */ where?: CharacterWhereInput /** * Limit how many Characters to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: CharacterIncludeUpdateManyAndReturn | null } /** * Character upsert */ export type CharacterUpsertArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * The filter to search for the Character to update in case it exists. */ where: CharacterWhereUniqueInput /** * In case the Character found by the `where` argument doesn't exist, create a new Character with this data. */ create: XOR /** * In case the Character was found with the provided `where` argument, update it with this data. */ update: XOR } /** * Character delete */ export type CharacterDeleteArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null /** * Filter which Character to delete. */ where: CharacterWhereUniqueInput } /** * Character deleteMany */ export type CharacterDeleteManyArgs = { /** * Filter which Characters to delete */ where?: CharacterWhereInput /** * Limit how many Characters to delete. */ limit?: number } /** * Character without action */ export type CharacterDefaultArgs = { /** * Select specific fields to fetch from the Character */ select?: CharacterSelect | null /** * Omit specific fields from the Character */ omit?: CharacterOmit | null /** * Choose, which related nodes to fetch as well */ include?: CharacterInclude | null } /** * Model CoverDesign */ export type AggregateCoverDesign = { _count: CoverDesignCountAggregateOutputType | null _avg: CoverDesignAvgAggregateOutputType | null _sum: CoverDesignSumAggregateOutputType | null _min: CoverDesignMinAggregateOutputType | null _max: CoverDesignMaxAggregateOutputType | null } export type CoverDesignAvgAggregateOutputType = { width: number | null height: number | null } export type CoverDesignSumAggregateOutputType = { width: number | null height: number | null } export type CoverDesignMinAggregateOutputType = { id: string | null userId: string | null filename: string | null url: string | null prompt: string | null genre: string | null isGenerated: boolean | null width: number | null height: number | null createdAt: Date | null } export type CoverDesignMaxAggregateOutputType = { id: string | null userId: string | null filename: string | null url: string | null prompt: string | null genre: string | null isGenerated: boolean | null width: number | null height: number | null createdAt: Date | null } export type CoverDesignCountAggregateOutputType = { id: number userId: number filename: number url: number prompt: number genre: number isGenerated: number width: number height: number createdAt: number _all: number } export type CoverDesignAvgAggregateInputType = { width?: true height?: true } export type CoverDesignSumAggregateInputType = { width?: true height?: true } export type CoverDesignMinAggregateInputType = { id?: true userId?: true filename?: true url?: true prompt?: true genre?: true isGenerated?: true width?: true height?: true createdAt?: true } export type CoverDesignMaxAggregateInputType = { id?: true userId?: true filename?: true url?: true prompt?: true genre?: true isGenerated?: true width?: true height?: true createdAt?: true } export type CoverDesignCountAggregateInputType = { id?: true userId?: true filename?: true url?: true prompt?: true genre?: true isGenerated?: true width?: true height?: true createdAt?: true _all?: true } export type CoverDesignAggregateArgs = { /** * Filter which CoverDesign to aggregate. */ where?: CoverDesignWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of CoverDesigns to fetch. */ orderBy?: CoverDesignOrderByWithRelationInput | CoverDesignOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: CoverDesignWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` CoverDesigns 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` CoverDesigns. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned CoverDesigns **/ _count?: true | CoverDesignCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: CoverDesignAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: CoverDesignSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: CoverDesignMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: CoverDesignMaxAggregateInputType } export type GetCoverDesignAggregateType = { [P in keyof T & keyof AggregateCoverDesign]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type CoverDesignGroupByArgs = { where?: CoverDesignWhereInput orderBy?: CoverDesignOrderByWithAggregationInput | CoverDesignOrderByWithAggregationInput[] by: CoverDesignScalarFieldEnum[] | CoverDesignScalarFieldEnum having?: CoverDesignScalarWhereWithAggregatesInput take?: number skip?: number _count?: CoverDesignCountAggregateInputType | true _avg?: CoverDesignAvgAggregateInputType _sum?: CoverDesignSumAggregateInputType _min?: CoverDesignMinAggregateInputType _max?: CoverDesignMaxAggregateInputType } export type CoverDesignGroupByOutputType = { id: string userId: string filename: string url: string prompt: string | null genre: string | null isGenerated: boolean width: number | null height: number | null createdAt: Date _count: CoverDesignCountAggregateOutputType | null _avg: CoverDesignAvgAggregateOutputType | null _sum: CoverDesignSumAggregateOutputType | null _min: CoverDesignMinAggregateOutputType | null _max: CoverDesignMaxAggregateOutputType | null } type GetCoverDesignGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof CoverDesignGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type CoverDesignSelect = $Extensions.GetSelect<{ id?: boolean userId?: boolean filename?: boolean url?: boolean prompt?: boolean genre?: boolean isGenerated?: boolean width?: boolean height?: boolean createdAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["coverDesign"]> export type CoverDesignSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean filename?: boolean url?: boolean prompt?: boolean genre?: boolean isGenerated?: boolean width?: boolean height?: boolean createdAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["coverDesign"]> export type CoverDesignSelectUpdateManyAndReturn = $Extensions.GetSelect<{ id?: boolean userId?: boolean filename?: boolean url?: boolean prompt?: boolean genre?: boolean isGenerated?: boolean width?: boolean height?: boolean createdAt?: boolean user?: boolean | UserDefaultArgs }, ExtArgs["result"]["coverDesign"]> export type CoverDesignSelectScalar = { id?: boolean userId?: boolean filename?: boolean url?: boolean prompt?: boolean genre?: boolean isGenerated?: boolean width?: boolean height?: boolean createdAt?: boolean } export type CoverDesignOmit = $Extensions.GetOmit<"id" | "userId" | "filename" | "url" | "prompt" | "genre" | "isGenerated" | "width" | "height" | "createdAt", ExtArgs["result"]["coverDesign"]> export type CoverDesignInclude = { user?: boolean | UserDefaultArgs } export type CoverDesignIncludeCreateManyAndReturn = { user?: boolean | UserDefaultArgs } export type CoverDesignIncludeUpdateManyAndReturn = { user?: boolean | UserDefaultArgs } export type $CoverDesignPayload = { name: "CoverDesign" objects: { user: Prisma.$UserPayload } scalars: $Extensions.GetPayloadResult<{ id: string userId: string filename: string url: string prompt: string | null genre: string | null isGenerated: boolean width: number | null height: number | null createdAt: Date }, ExtArgs["result"]["coverDesign"]> composites: {} } type CoverDesignGetPayload = $Result.GetResult type CoverDesignCountArgs = Omit & { select?: CoverDesignCountAggregateInputType | true } export interface CoverDesignDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['CoverDesign'], meta: { name: 'CoverDesign' } } /** * Find zero or one CoverDesign that matches the filter. * @param {CoverDesignFindUniqueArgs} args - Arguments to find a CoverDesign * @example * // Get one CoverDesign * const coverDesign = await prisma.coverDesign.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: SelectSubset>): Prisma__CoverDesignClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one CoverDesign that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {CoverDesignFindUniqueOrThrowArgs} args - Arguments to find a CoverDesign * @example * // Get one CoverDesign * const coverDesign = await prisma.coverDesign.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: SelectSubset>): Prisma__CoverDesignClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first CoverDesign 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 {CoverDesignFindFirstArgs} args - Arguments to find a CoverDesign * @example * // Get one CoverDesign * const coverDesign = await prisma.coverDesign.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: SelectSubset>): Prisma__CoverDesignClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first CoverDesign 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 {CoverDesignFindFirstOrThrowArgs} args - Arguments to find a CoverDesign * @example * // Get one CoverDesign * const coverDesign = await prisma.coverDesign.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: SelectSubset>): Prisma__CoverDesignClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more CoverDesigns 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 {CoverDesignFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all CoverDesigns * const coverDesigns = await prisma.coverDesign.findMany() * * // Get first 10 CoverDesigns * const coverDesigns = await prisma.coverDesign.findMany({ take: 10 }) * * // Only select the `id` * const coverDesignWithIdOnly = await prisma.coverDesign.findMany({ select: { id: true } }) * */ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> /** * Create a CoverDesign. * @param {CoverDesignCreateArgs} args - Arguments to create a CoverDesign. * @example * // Create one CoverDesign * const CoverDesign = await prisma.coverDesign.create({ * data: { * // ... data to create a CoverDesign * } * }) * */ create(args: SelectSubset>): Prisma__CoverDesignClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many CoverDesigns. * @param {CoverDesignCreateManyArgs} args - Arguments to create many CoverDesigns. * @example * // Create many CoverDesigns * const coverDesign = await prisma.coverDesign.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Create many CoverDesigns and returns the data saved in the database. * @param {CoverDesignCreateManyAndReturnArgs} args - Arguments to create many CoverDesigns. * @example * // Create many CoverDesigns * const coverDesign = await prisma.coverDesign.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many CoverDesigns and only return the `id` * const coverDesignWithIdOnly = await prisma.coverDesign.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", GlobalOmitOptions>> /** * Delete a CoverDesign. * @param {CoverDesignDeleteArgs} args - Arguments to delete one CoverDesign. * @example * // Delete one CoverDesign * const CoverDesign = await prisma.coverDesign.delete({ * where: { * // ... filter to delete one CoverDesign * } * }) * */ delete(args: SelectSubset>): Prisma__CoverDesignClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one CoverDesign. * @param {CoverDesignUpdateArgs} args - Arguments to update one CoverDesign. * @example * // Update one CoverDesign * const coverDesign = await prisma.coverDesign.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: SelectSubset>): Prisma__CoverDesignClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more CoverDesigns. * @param {CoverDesignDeleteManyArgs} args - Arguments to filter CoverDesigns to delete. * @example * // Delete a few CoverDesigns * const { count } = await prisma.coverDesign.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more CoverDesigns. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CoverDesignUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many CoverDesigns * const coverDesign = await prisma.coverDesign.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: SelectSubset>): Prisma.PrismaPromise /** * Update zero or more CoverDesigns and returns the data updated in the database. * @param {CoverDesignUpdateManyAndReturnArgs} args - Arguments to update many CoverDesigns. * @example * // Update many CoverDesigns * const coverDesign = await prisma.coverDesign.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more CoverDesigns and only return the `id` * const coverDesignWithIdOnly = await prisma.coverDesign.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here * }, * 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 * */ updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one CoverDesign. * @param {CoverDesignUpsertArgs} args - Arguments to update or create a CoverDesign. * @example * // Update or create a CoverDesign * const coverDesign = await prisma.coverDesign.upsert({ * create: { * // ... data to create a CoverDesign * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the CoverDesign we want to update * } * }) */ upsert(args: SelectSubset>): Prisma__CoverDesignClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of CoverDesigns. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CoverDesignCountArgs} args - Arguments to filter CoverDesigns to count. * @example * // Count the number of CoverDesigns * const count = await prisma.coverDesign.count({ * where: { * // ... the filter for the CoverDesigns 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 CoverDesign. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CoverDesignAggregateArgs} 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 CoverDesign. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CoverDesignGroupByArgs} 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 CoverDesignGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: CoverDesignGroupByArgs['orderBy'] } : { orderBy?: CoverDesignGroupByArgs['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 ? GetCoverDesignGroupByPayload : Prisma.PrismaPromise /** * Fields of the CoverDesign model */ readonly fields: CoverDesignFieldRefs; } /** * The delegate class that acts as a "Promise-like" for CoverDesign. * 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__CoverDesignClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> /** * 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 CoverDesign model */ interface CoverDesignFieldRefs { readonly id: FieldRef<"CoverDesign", 'String'> readonly userId: FieldRef<"CoverDesign", 'String'> readonly filename: FieldRef<"CoverDesign", 'String'> readonly url: FieldRef<"CoverDesign", 'String'> readonly prompt: FieldRef<"CoverDesign", 'String'> readonly genre: FieldRef<"CoverDesign", 'String'> readonly isGenerated: FieldRef<"CoverDesign", 'Boolean'> readonly width: FieldRef<"CoverDesign", 'Int'> readonly height: FieldRef<"CoverDesign", 'Int'> readonly createdAt: FieldRef<"CoverDesign", 'DateTime'> } // Custom InputTypes /** * CoverDesign findUnique */ export type CoverDesignFindUniqueArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * Filter, which CoverDesign to fetch. */ where: CoverDesignWhereUniqueInput } /** * CoverDesign findUniqueOrThrow */ export type CoverDesignFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * Filter, which CoverDesign to fetch. */ where: CoverDesignWhereUniqueInput } /** * CoverDesign findFirst */ export type CoverDesignFindFirstArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * Filter, which CoverDesign to fetch. */ where?: CoverDesignWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of CoverDesigns to fetch. */ orderBy?: CoverDesignOrderByWithRelationInput | CoverDesignOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for CoverDesigns. */ cursor?: CoverDesignWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` CoverDesigns 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` CoverDesigns. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of CoverDesigns. */ distinct?: CoverDesignScalarFieldEnum | CoverDesignScalarFieldEnum[] } /** * CoverDesign findFirstOrThrow */ export type CoverDesignFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * Filter, which CoverDesign to fetch. */ where?: CoverDesignWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of CoverDesigns to fetch. */ orderBy?: CoverDesignOrderByWithRelationInput | CoverDesignOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for CoverDesigns. */ cursor?: CoverDesignWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` CoverDesigns 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` CoverDesigns. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of CoverDesigns. */ distinct?: CoverDesignScalarFieldEnum | CoverDesignScalarFieldEnum[] } /** * CoverDesign findMany */ export type CoverDesignFindManyArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * Filter, which CoverDesigns to fetch. */ where?: CoverDesignWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of CoverDesigns to fetch. */ orderBy?: CoverDesignOrderByWithRelationInput | CoverDesignOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing CoverDesigns. */ cursor?: CoverDesignWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` CoverDesigns 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` CoverDesigns. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of CoverDesigns. */ distinct?: CoverDesignScalarFieldEnum | CoverDesignScalarFieldEnum[] } /** * CoverDesign create */ export type CoverDesignCreateArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * The data needed to create a CoverDesign. */ data: XOR } /** * CoverDesign createMany */ export type CoverDesignCreateManyArgs = { /** * The data used to create many CoverDesigns. */ data: CoverDesignCreateManyInput | CoverDesignCreateManyInput[] } /** * CoverDesign createManyAndReturn */ export type CoverDesignCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelectCreateManyAndReturn | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * The data used to create many CoverDesigns. */ data: CoverDesignCreateManyInput | CoverDesignCreateManyInput[] /** * Choose, which related nodes to fetch as well */ include?: CoverDesignIncludeCreateManyAndReturn | null } /** * CoverDesign update */ export type CoverDesignUpdateArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * The data needed to update a CoverDesign. */ data: XOR /** * Choose, which CoverDesign to update. */ where: CoverDesignWhereUniqueInput } /** * CoverDesign updateMany */ export type CoverDesignUpdateManyArgs = { /** * The data used to update CoverDesigns. */ data: XOR /** * Filter which CoverDesigns to update */ where?: CoverDesignWhereInput /** * Limit how many CoverDesigns to update. */ limit?: number } /** * CoverDesign updateManyAndReturn */ export type CoverDesignUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelectUpdateManyAndReturn | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * The data used to update CoverDesigns. */ data: XOR /** * Filter which CoverDesigns to update */ where?: CoverDesignWhereInput /** * Limit how many CoverDesigns to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: CoverDesignIncludeUpdateManyAndReturn | null } /** * CoverDesign upsert */ export type CoverDesignUpsertArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * The filter to search for the CoverDesign to update in case it exists. */ where: CoverDesignWhereUniqueInput /** * In case the CoverDesign found by the `where` argument doesn't exist, create a new CoverDesign with this data. */ create: XOR /** * In case the CoverDesign was found with the provided `where` argument, update it with this data. */ update: XOR } /** * CoverDesign delete */ export type CoverDesignDeleteArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null /** * Filter which CoverDesign to delete. */ where: CoverDesignWhereUniqueInput } /** * CoverDesign deleteMany */ export type CoverDesignDeleteManyArgs = { /** * Filter which CoverDesigns to delete */ where?: CoverDesignWhereInput /** * Limit how many CoverDesigns to delete. */ limit?: number } /** * CoverDesign without action */ export type CoverDesignDefaultArgs = { /** * Select specific fields to fetch from the CoverDesign */ select?: CoverDesignSelect | null /** * Omit specific fields from the CoverDesign */ omit?: CoverDesignOmit | null /** * Choose, which related nodes to fetch as well */ include?: CoverDesignInclude | null } /** * Enums */ export const TransactionIsolationLevel: { Serializable: 'Serializable' }; export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] export const UserScalarFieldEnum: { id: 'id', email: 'email', password: 'password', name: 'name', role: 'role', createdAt: 'createdAt', updatedAt: 'updatedAt' }; export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] export const SessionScalarFieldEnum: { id: 'id', userId: 'userId', token: 'token', expiresAt: 'expiresAt', createdAt: 'createdAt' }; export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum] export const BookScalarFieldEnum: { id: 'id', userId: 'userId', title: 'title', genre: 'genre', idea: 'idea', logline: 'logline', outline: 'outline', currentChapter: 'currentChapter', coverId: 'coverId', createdAt: 'createdAt', updatedAt: 'updatedAt' }; export type BookScalarFieldEnum = (typeof BookScalarFieldEnum)[keyof typeof BookScalarFieldEnum] export const ChapterScalarFieldEnum: { id: 'id', bookId: 'bookId', number: 'number', title: 'title', summary: 'summary', content: 'content', isGenerated: 'isGenerated', createdAt: 'createdAt', updatedAt: 'updatedAt' }; export type ChapterScalarFieldEnum = (typeof ChapterScalarFieldEnum)[keyof typeof ChapterScalarFieldEnum] export const CharacterScalarFieldEnum: { id: 'id', bookId: 'bookId', name: 'name', role: 'role', traits: 'traits', motivation: 'motivation', backstory: 'backstory', createdAt: 'createdAt', updatedAt: 'updatedAt' }; export type CharacterScalarFieldEnum = (typeof CharacterScalarFieldEnum)[keyof typeof CharacterScalarFieldEnum] export const CoverDesignScalarFieldEnum: { id: 'id', userId: 'userId', filename: 'filename', url: 'url', prompt: 'prompt', genre: 'genre', isGenerated: 'isGenerated', width: 'width', height: 'height', createdAt: 'createdAt' }; export type CoverDesignScalarFieldEnum = (typeof CoverDesignScalarFieldEnum)[keyof typeof CoverDesignScalarFieldEnum] export const SortOrder: { asc: 'asc', desc: 'desc' }; export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] export const NullableJsonNullValueInput: { DbNull: typeof DbNull, JsonNull: typeof JsonNull }; export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] 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] export const QueryMode: { default: 'default', insensitive: 'insensitive' }; export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] /** * Field references */ /** * Reference to a field of type 'String' */ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> /** * Reference to a field of type 'DateTime' */ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> /** * Reference to a field of type 'Json' */ export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'> /** * Reference to a field of type 'QueryMode' */ export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'> /** * Reference to a field of type 'Int' */ export type IntFieldRefInput<$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'> /** * Deep Input Types */ export type UserWhereInput = { AND?: UserWhereInput | UserWhereInput[] OR?: UserWhereInput[] NOT?: UserWhereInput | UserWhereInput[] id?: StringFilter<"User"> | string email?: StringFilter<"User"> | string password?: StringFilter<"User"> | string name?: StringNullableFilter<"User"> | string | null role?: StringFilter<"User"> | string createdAt?: DateTimeFilter<"User"> | Date | string updatedAt?: DateTimeFilter<"User"> | Date | string books?: BookListRelationFilter coverDesigns?: CoverDesignListRelationFilter sessions?: SessionListRelationFilter } export type UserOrderByWithRelationInput = { id?: SortOrder email?: SortOrder password?: SortOrder name?: SortOrderInput | SortOrder role?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder books?: BookOrderByRelationAggregateInput coverDesigns?: CoverDesignOrderByRelationAggregateInput sessions?: SessionOrderByRelationAggregateInput } export type UserWhereUniqueInput = Prisma.AtLeast<{ id?: string email?: string AND?: UserWhereInput | UserWhereInput[] OR?: UserWhereInput[] NOT?: UserWhereInput | UserWhereInput[] password?: StringFilter<"User"> | string name?: StringNullableFilter<"User"> | string | null role?: StringFilter<"User"> | string createdAt?: DateTimeFilter<"User"> | Date | string updatedAt?: DateTimeFilter<"User"> | Date | string books?: BookListRelationFilter coverDesigns?: CoverDesignListRelationFilter sessions?: SessionListRelationFilter }, "id" | "email"> export type UserOrderByWithAggregationInput = { id?: SortOrder email?: SortOrder password?: SortOrder name?: SortOrderInput | SortOrder role?: 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 email?: StringWithAggregatesFilter<"User"> | string password?: StringWithAggregatesFilter<"User"> | string name?: StringNullableWithAggregatesFilter<"User"> | string | null role?: StringWithAggregatesFilter<"User"> | string createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string } export type SessionWhereInput = { AND?: SessionWhereInput | SessionWhereInput[] OR?: SessionWhereInput[] NOT?: SessionWhereInput | SessionWhereInput[] id?: StringFilter<"Session"> | string userId?: StringFilter<"Session"> | string token?: StringFilter<"Session"> | string expiresAt?: DateTimeFilter<"Session"> | Date | string createdAt?: DateTimeFilter<"Session"> | Date | string user?: XOR } export type SessionOrderByWithRelationInput = { id?: SortOrder userId?: SortOrder token?: SortOrder expiresAt?: SortOrder createdAt?: SortOrder user?: UserOrderByWithRelationInput } export type SessionWhereUniqueInput = Prisma.AtLeast<{ id?: string token?: string AND?: SessionWhereInput | SessionWhereInput[] OR?: SessionWhereInput[] NOT?: SessionWhereInput | SessionWhereInput[] userId?: StringFilter<"Session"> | string expiresAt?: DateTimeFilter<"Session"> | Date | string createdAt?: DateTimeFilter<"Session"> | Date | string user?: XOR }, "id" | "token"> export type SessionOrderByWithAggregationInput = { id?: SortOrder userId?: SortOrder token?: SortOrder expiresAt?: SortOrder createdAt?: SortOrder _count?: SessionCountOrderByAggregateInput _max?: SessionMaxOrderByAggregateInput _min?: SessionMinOrderByAggregateInput } export type SessionScalarWhereWithAggregatesInput = { AND?: SessionScalarWhereWithAggregatesInput | SessionScalarWhereWithAggregatesInput[] OR?: SessionScalarWhereWithAggregatesInput[] NOT?: SessionScalarWhereWithAggregatesInput | SessionScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"Session"> | string userId?: StringWithAggregatesFilter<"Session"> | string token?: StringWithAggregatesFilter<"Session"> | string expiresAt?: DateTimeWithAggregatesFilter<"Session"> | Date | string createdAt?: DateTimeWithAggregatesFilter<"Session"> | Date | string } export type BookWhereInput = { AND?: BookWhereInput | BookWhereInput[] OR?: BookWhereInput[] NOT?: BookWhereInput | BookWhereInput[] id?: StringFilter<"Book"> | string userId?: StringFilter<"Book"> | string title?: StringFilter<"Book"> | string genre?: StringFilter<"Book"> | string idea?: StringFilter<"Book"> | string logline?: StringNullableFilter<"Book"> | string | null outline?: JsonNullableFilter<"Book"> currentChapter?: IntFilter<"Book"> | number coverId?: StringNullableFilter<"Book"> | string | null createdAt?: DateTimeFilter<"Book"> | Date | string updatedAt?: DateTimeFilter<"Book"> | Date | string user?: XOR chapters?: ChapterListRelationFilter characters?: CharacterListRelationFilter } export type BookOrderByWithRelationInput = { id?: SortOrder userId?: SortOrder title?: SortOrder genre?: SortOrder idea?: SortOrder logline?: SortOrderInput | SortOrder outline?: SortOrderInput | SortOrder currentChapter?: SortOrder coverId?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder user?: UserOrderByWithRelationInput chapters?: ChapterOrderByRelationAggregateInput characters?: CharacterOrderByRelationAggregateInput } export type BookWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: BookWhereInput | BookWhereInput[] OR?: BookWhereInput[] NOT?: BookWhereInput | BookWhereInput[] userId?: StringFilter<"Book"> | string title?: StringFilter<"Book"> | string genre?: StringFilter<"Book"> | string idea?: StringFilter<"Book"> | string logline?: StringNullableFilter<"Book"> | string | null outline?: JsonNullableFilter<"Book"> currentChapter?: IntFilter<"Book"> | number coverId?: StringNullableFilter<"Book"> | string | null createdAt?: DateTimeFilter<"Book"> | Date | string updatedAt?: DateTimeFilter<"Book"> | Date | string user?: XOR chapters?: ChapterListRelationFilter characters?: CharacterListRelationFilter }, "id"> export type BookOrderByWithAggregationInput = { id?: SortOrder userId?: SortOrder title?: SortOrder genre?: SortOrder idea?: SortOrder logline?: SortOrderInput | SortOrder outline?: SortOrderInput | SortOrder currentChapter?: SortOrder coverId?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder _count?: BookCountOrderByAggregateInput _avg?: BookAvgOrderByAggregateInput _max?: BookMaxOrderByAggregateInput _min?: BookMinOrderByAggregateInput _sum?: BookSumOrderByAggregateInput } export type BookScalarWhereWithAggregatesInput = { AND?: BookScalarWhereWithAggregatesInput | BookScalarWhereWithAggregatesInput[] OR?: BookScalarWhereWithAggregatesInput[] NOT?: BookScalarWhereWithAggregatesInput | BookScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"Book"> | string userId?: StringWithAggregatesFilter<"Book"> | string title?: StringWithAggregatesFilter<"Book"> | string genre?: StringWithAggregatesFilter<"Book"> | string idea?: StringWithAggregatesFilter<"Book"> | string logline?: StringNullableWithAggregatesFilter<"Book"> | string | null outline?: JsonNullableWithAggregatesFilter<"Book"> currentChapter?: IntWithAggregatesFilter<"Book"> | number coverId?: StringNullableWithAggregatesFilter<"Book"> | string | null createdAt?: DateTimeWithAggregatesFilter<"Book"> | Date | string updatedAt?: DateTimeWithAggregatesFilter<"Book"> | Date | string } export type ChapterWhereInput = { AND?: ChapterWhereInput | ChapterWhereInput[] OR?: ChapterWhereInput[] NOT?: ChapterWhereInput | ChapterWhereInput[] id?: StringFilter<"Chapter"> | string bookId?: StringFilter<"Chapter"> | string number?: IntFilter<"Chapter"> | number title?: StringFilter<"Chapter"> | string summary?: StringFilter<"Chapter"> | string content?: StringNullableFilter<"Chapter"> | string | null isGenerated?: BoolFilter<"Chapter"> | boolean createdAt?: DateTimeFilter<"Chapter"> | Date | string updatedAt?: DateTimeFilter<"Chapter"> | Date | string book?: XOR } export type ChapterOrderByWithRelationInput = { id?: SortOrder bookId?: SortOrder number?: SortOrder title?: SortOrder summary?: SortOrder content?: SortOrderInput | SortOrder isGenerated?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder book?: BookOrderByWithRelationInput } export type ChapterWhereUniqueInput = Prisma.AtLeast<{ id?: string bookId_number?: ChapterBookIdNumberCompoundUniqueInput AND?: ChapterWhereInput | ChapterWhereInput[] OR?: ChapterWhereInput[] NOT?: ChapterWhereInput | ChapterWhereInput[] bookId?: StringFilter<"Chapter"> | string number?: IntFilter<"Chapter"> | number title?: StringFilter<"Chapter"> | string summary?: StringFilter<"Chapter"> | string content?: StringNullableFilter<"Chapter"> | string | null isGenerated?: BoolFilter<"Chapter"> | boolean createdAt?: DateTimeFilter<"Chapter"> | Date | string updatedAt?: DateTimeFilter<"Chapter"> | Date | string book?: XOR }, "id" | "bookId_number"> export type ChapterOrderByWithAggregationInput = { id?: SortOrder bookId?: SortOrder number?: SortOrder title?: SortOrder summary?: SortOrder content?: SortOrderInput | SortOrder isGenerated?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder _count?: ChapterCountOrderByAggregateInput _avg?: ChapterAvgOrderByAggregateInput _max?: ChapterMaxOrderByAggregateInput _min?: ChapterMinOrderByAggregateInput _sum?: ChapterSumOrderByAggregateInput } export type ChapterScalarWhereWithAggregatesInput = { AND?: ChapterScalarWhereWithAggregatesInput | ChapterScalarWhereWithAggregatesInput[] OR?: ChapterScalarWhereWithAggregatesInput[] NOT?: ChapterScalarWhereWithAggregatesInput | ChapterScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"Chapter"> | string bookId?: StringWithAggregatesFilter<"Chapter"> | string number?: IntWithAggregatesFilter<"Chapter"> | number title?: StringWithAggregatesFilter<"Chapter"> | string summary?: StringWithAggregatesFilter<"Chapter"> | string content?: StringNullableWithAggregatesFilter<"Chapter"> | string | null isGenerated?: BoolWithAggregatesFilter<"Chapter"> | boolean createdAt?: DateTimeWithAggregatesFilter<"Chapter"> | Date | string updatedAt?: DateTimeWithAggregatesFilter<"Chapter"> | Date | string } export type CharacterWhereInput = { AND?: CharacterWhereInput | CharacterWhereInput[] OR?: CharacterWhereInput[] NOT?: CharacterWhereInput | CharacterWhereInput[] id?: StringFilter<"Character"> | string bookId?: StringFilter<"Character"> | string name?: StringFilter<"Character"> | string role?: StringFilter<"Character"> | string traits?: StringFilter<"Character"> | string motivation?: StringNullableFilter<"Character"> | string | null backstory?: StringNullableFilter<"Character"> | string | null createdAt?: DateTimeFilter<"Character"> | Date | string updatedAt?: DateTimeFilter<"Character"> | Date | string book?: XOR } export type CharacterOrderByWithRelationInput = { id?: SortOrder bookId?: SortOrder name?: SortOrder role?: SortOrder traits?: SortOrder motivation?: SortOrderInput | SortOrder backstory?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder book?: BookOrderByWithRelationInput } export type CharacterWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: CharacterWhereInput | CharacterWhereInput[] OR?: CharacterWhereInput[] NOT?: CharacterWhereInput | CharacterWhereInput[] bookId?: StringFilter<"Character"> | string name?: StringFilter<"Character"> | string role?: StringFilter<"Character"> | string traits?: StringFilter<"Character"> | string motivation?: StringNullableFilter<"Character"> | string | null backstory?: StringNullableFilter<"Character"> | string | null createdAt?: DateTimeFilter<"Character"> | Date | string updatedAt?: DateTimeFilter<"Character"> | Date | string book?: XOR }, "id"> export type CharacterOrderByWithAggregationInput = { id?: SortOrder bookId?: SortOrder name?: SortOrder role?: SortOrder traits?: SortOrder motivation?: SortOrderInput | SortOrder backstory?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder _count?: CharacterCountOrderByAggregateInput _max?: CharacterMaxOrderByAggregateInput _min?: CharacterMinOrderByAggregateInput } export type CharacterScalarWhereWithAggregatesInput = { AND?: CharacterScalarWhereWithAggregatesInput | CharacterScalarWhereWithAggregatesInput[] OR?: CharacterScalarWhereWithAggregatesInput[] NOT?: CharacterScalarWhereWithAggregatesInput | CharacterScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"Character"> | string bookId?: StringWithAggregatesFilter<"Character"> | string name?: StringWithAggregatesFilter<"Character"> | string role?: StringWithAggregatesFilter<"Character"> | string traits?: StringWithAggregatesFilter<"Character"> | string motivation?: StringNullableWithAggregatesFilter<"Character"> | string | null backstory?: StringNullableWithAggregatesFilter<"Character"> | string | null createdAt?: DateTimeWithAggregatesFilter<"Character"> | Date | string updatedAt?: DateTimeWithAggregatesFilter<"Character"> | Date | string } export type CoverDesignWhereInput = { AND?: CoverDesignWhereInput | CoverDesignWhereInput[] OR?: CoverDesignWhereInput[] NOT?: CoverDesignWhereInput | CoverDesignWhereInput[] id?: StringFilter<"CoverDesign"> | string userId?: StringFilter<"CoverDesign"> | string filename?: StringFilter<"CoverDesign"> | string url?: StringFilter<"CoverDesign"> | string prompt?: StringNullableFilter<"CoverDesign"> | string | null genre?: StringNullableFilter<"CoverDesign"> | string | null isGenerated?: BoolFilter<"CoverDesign"> | boolean width?: IntNullableFilter<"CoverDesign"> | number | null height?: IntNullableFilter<"CoverDesign"> | number | null createdAt?: DateTimeFilter<"CoverDesign"> | Date | string user?: XOR } export type CoverDesignOrderByWithRelationInput = { id?: SortOrder userId?: SortOrder filename?: SortOrder url?: SortOrder prompt?: SortOrderInput | SortOrder genre?: SortOrderInput | SortOrder isGenerated?: SortOrder width?: SortOrderInput | SortOrder height?: SortOrderInput | SortOrder createdAt?: SortOrder user?: UserOrderByWithRelationInput } export type CoverDesignWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: CoverDesignWhereInput | CoverDesignWhereInput[] OR?: CoverDesignWhereInput[] NOT?: CoverDesignWhereInput | CoverDesignWhereInput[] userId?: StringFilter<"CoverDesign"> | string filename?: StringFilter<"CoverDesign"> | string url?: StringFilter<"CoverDesign"> | string prompt?: StringNullableFilter<"CoverDesign"> | string | null genre?: StringNullableFilter<"CoverDesign"> | string | null isGenerated?: BoolFilter<"CoverDesign"> | boolean width?: IntNullableFilter<"CoverDesign"> | number | null height?: IntNullableFilter<"CoverDesign"> | number | null createdAt?: DateTimeFilter<"CoverDesign"> | Date | string user?: XOR }, "id"> export type CoverDesignOrderByWithAggregationInput = { id?: SortOrder userId?: SortOrder filename?: SortOrder url?: SortOrder prompt?: SortOrderInput | SortOrder genre?: SortOrderInput | SortOrder isGenerated?: SortOrder width?: SortOrderInput | SortOrder height?: SortOrderInput | SortOrder createdAt?: SortOrder _count?: CoverDesignCountOrderByAggregateInput _avg?: CoverDesignAvgOrderByAggregateInput _max?: CoverDesignMaxOrderByAggregateInput _min?: CoverDesignMinOrderByAggregateInput _sum?: CoverDesignSumOrderByAggregateInput } export type CoverDesignScalarWhereWithAggregatesInput = { AND?: CoverDesignScalarWhereWithAggregatesInput | CoverDesignScalarWhereWithAggregatesInput[] OR?: CoverDesignScalarWhereWithAggregatesInput[] NOT?: CoverDesignScalarWhereWithAggregatesInput | CoverDesignScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"CoverDesign"> | string userId?: StringWithAggregatesFilter<"CoverDesign"> | string filename?: StringWithAggregatesFilter<"CoverDesign"> | string url?: StringWithAggregatesFilter<"CoverDesign"> | string prompt?: StringNullableWithAggregatesFilter<"CoverDesign"> | string | null genre?: StringNullableWithAggregatesFilter<"CoverDesign"> | string | null isGenerated?: BoolWithAggregatesFilter<"CoverDesign"> | boolean width?: IntNullableWithAggregatesFilter<"CoverDesign"> | number | null height?: IntNullableWithAggregatesFilter<"CoverDesign"> | number | null createdAt?: DateTimeWithAggregatesFilter<"CoverDesign"> | Date | string } export type UserCreateInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string books?: BookCreateNestedManyWithoutUserInput coverDesigns?: CoverDesignCreateNestedManyWithoutUserInput sessions?: SessionCreateNestedManyWithoutUserInput } export type UserUncheckedCreateInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string books?: BookUncheckedCreateNestedManyWithoutUserInput coverDesigns?: CoverDesignUncheckedCreateNestedManyWithoutUserInput sessions?: SessionUncheckedCreateNestedManyWithoutUserInput } export type UserUpdateInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string books?: BookUpdateManyWithoutUserNestedInput coverDesigns?: CoverDesignUpdateManyWithoutUserNestedInput sessions?: SessionUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string books?: BookUncheckedUpdateManyWithoutUserNestedInput coverDesigns?: CoverDesignUncheckedUpdateManyWithoutUserNestedInput sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput } export type UserCreateManyInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string } export type UserUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type UserUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type SessionCreateInput = { id?: string token: string expiresAt: Date | string createdAt?: Date | string user: UserCreateNestedOneWithoutSessionsInput } export type SessionUncheckedCreateInput = { id?: string userId: string token: string expiresAt: Date | string createdAt?: Date | string } export type SessionUpdateInput = { id?: StringFieldUpdateOperationsInput | string token?: StringFieldUpdateOperationsInput | string expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string user?: UserUpdateOneRequiredWithoutSessionsNestedInput } export type SessionUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string token?: StringFieldUpdateOperationsInput | string expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type SessionCreateManyInput = { id?: string userId: string token: string expiresAt: Date | string createdAt?: Date | string } export type SessionUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string token?: StringFieldUpdateOperationsInput | string expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type SessionUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string token?: StringFieldUpdateOperationsInput | string expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type BookCreateInput = { id?: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string user: UserCreateNestedOneWithoutBooksInput chapters?: ChapterCreateNestedManyWithoutBookInput characters?: CharacterCreateNestedManyWithoutBookInput } export type BookUncheckedCreateInput = { id?: string userId: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string chapters?: ChapterUncheckedCreateNestedManyWithoutBookInput characters?: CharacterUncheckedCreateNestedManyWithoutBookInput } export type BookUpdateInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string user?: UserUpdateOneRequiredWithoutBooksNestedInput chapters?: ChapterUpdateManyWithoutBookNestedInput characters?: CharacterUpdateManyWithoutBookNestedInput } export type BookUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string chapters?: ChapterUncheckedUpdateManyWithoutBookNestedInput characters?: CharacterUncheckedUpdateManyWithoutBookNestedInput } export type BookCreateManyInput = { id?: string userId: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string } export type BookUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type BookUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type ChapterCreateInput = { id?: string number: number title: string summary: string content?: string | null isGenerated?: boolean createdAt?: Date | string updatedAt?: Date | string book: BookCreateNestedOneWithoutChaptersInput } export type ChapterUncheckedCreateInput = { id?: string bookId: string number: number title: string summary: string content?: string | null isGenerated?: boolean createdAt?: Date | string updatedAt?: Date | string } export type ChapterUpdateInput = { id?: StringFieldUpdateOperationsInput | string number?: IntFieldUpdateOperationsInput | number title?: StringFieldUpdateOperationsInput | string summary?: StringFieldUpdateOperationsInput | string content?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string book?: BookUpdateOneRequiredWithoutChaptersNestedInput } export type ChapterUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string bookId?: StringFieldUpdateOperationsInput | string number?: IntFieldUpdateOperationsInput | number title?: StringFieldUpdateOperationsInput | string summary?: StringFieldUpdateOperationsInput | string content?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type ChapterCreateManyInput = { id?: string bookId: string number: number title: string summary: string content?: string | null isGenerated?: boolean createdAt?: Date | string updatedAt?: Date | string } export type ChapterUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string number?: IntFieldUpdateOperationsInput | number title?: StringFieldUpdateOperationsInput | string summary?: StringFieldUpdateOperationsInput | string content?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type ChapterUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string bookId?: StringFieldUpdateOperationsInput | string number?: IntFieldUpdateOperationsInput | number title?: StringFieldUpdateOperationsInput | string summary?: StringFieldUpdateOperationsInput | string content?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CharacterCreateInput = { id?: string name: string role: string traits: string motivation?: string | null backstory?: string | null createdAt?: Date | string updatedAt?: Date | string book: BookCreateNestedOneWithoutCharactersInput } export type CharacterUncheckedCreateInput = { id?: string bookId: string name: string role: string traits: string motivation?: string | null backstory?: string | null createdAt?: Date | string updatedAt?: Date | string } export type CharacterUpdateInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string role?: StringFieldUpdateOperationsInput | string traits?: StringFieldUpdateOperationsInput | string motivation?: NullableStringFieldUpdateOperationsInput | string | null backstory?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string book?: BookUpdateOneRequiredWithoutCharactersNestedInput } export type CharacterUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string bookId?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string role?: StringFieldUpdateOperationsInput | string traits?: StringFieldUpdateOperationsInput | string motivation?: NullableStringFieldUpdateOperationsInput | string | null backstory?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CharacterCreateManyInput = { id?: string bookId: string name: string role: string traits: string motivation?: string | null backstory?: string | null createdAt?: Date | string updatedAt?: Date | string } export type CharacterUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string role?: StringFieldUpdateOperationsInput | string traits?: StringFieldUpdateOperationsInput | string motivation?: NullableStringFieldUpdateOperationsInput | string | null backstory?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CharacterUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string bookId?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string role?: StringFieldUpdateOperationsInput | string traits?: StringFieldUpdateOperationsInput | string motivation?: NullableStringFieldUpdateOperationsInput | string | null backstory?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CoverDesignCreateInput = { id?: string filename: string url: string prompt?: string | null genre?: string | null isGenerated?: boolean width?: number | null height?: number | null createdAt?: Date | string user: UserCreateNestedOneWithoutCoverDesignsInput } export type CoverDesignUncheckedCreateInput = { id?: string userId: string filename: string url: string prompt?: string | null genre?: string | null isGenerated?: boolean width?: number | null height?: number | null createdAt?: Date | string } export type CoverDesignUpdateInput = { id?: StringFieldUpdateOperationsInput | string filename?: StringFieldUpdateOperationsInput | string url?: StringFieldUpdateOperationsInput | string prompt?: NullableStringFieldUpdateOperationsInput | string | null genre?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean width?: NullableIntFieldUpdateOperationsInput | number | null height?: NullableIntFieldUpdateOperationsInput | number | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string user?: UserUpdateOneRequiredWithoutCoverDesignsNestedInput } export type CoverDesignUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string filename?: StringFieldUpdateOperationsInput | string url?: StringFieldUpdateOperationsInput | string prompt?: NullableStringFieldUpdateOperationsInput | string | null genre?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean width?: NullableIntFieldUpdateOperationsInput | number | null height?: NullableIntFieldUpdateOperationsInput | number | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CoverDesignCreateManyInput = { id?: string userId: string filename: string url: string prompt?: string | null genre?: string | null isGenerated?: boolean width?: number | null height?: number | null createdAt?: Date | string } export type CoverDesignUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string filename?: StringFieldUpdateOperationsInput | string url?: StringFieldUpdateOperationsInput | string prompt?: NullableStringFieldUpdateOperationsInput | string | null genre?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean width?: NullableIntFieldUpdateOperationsInput | number | null height?: NullableIntFieldUpdateOperationsInput | number | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CoverDesignUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string filename?: StringFieldUpdateOperationsInput | string url?: StringFieldUpdateOperationsInput | string prompt?: NullableStringFieldUpdateOperationsInput | string | null genre?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean width?: NullableIntFieldUpdateOperationsInput | number | null height?: NullableIntFieldUpdateOperationsInput | number | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type StringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] 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 StringNullableFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | null notIn?: string[] | 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 DateTimeFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] notIn?: Date[] | string[] 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 BookListRelationFilter = { every?: BookWhereInput some?: BookWhereInput none?: BookWhereInput } export type CoverDesignListRelationFilter = { every?: CoverDesignWhereInput some?: CoverDesignWhereInput none?: CoverDesignWhereInput } export type SessionListRelationFilter = { every?: SessionWhereInput some?: SessionWhereInput none?: SessionWhereInput } export type SortOrderInput = { sort: SortOrder nulls?: NullsOrder } export type BookOrderByRelationAggregateInput = { _count?: SortOrder } export type CoverDesignOrderByRelationAggregateInput = { _count?: SortOrder } export type SessionOrderByRelationAggregateInput = { _count?: SortOrder } export type UserCountOrderByAggregateInput = { id?: SortOrder email?: SortOrder password?: SortOrder name?: SortOrder role?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type UserMaxOrderByAggregateInput = { id?: SortOrder email?: SortOrder password?: SortOrder name?: SortOrder role?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type UserMinOrderByAggregateInput = { id?: SortOrder email?: SortOrder password?: SortOrder name?: SortOrder role?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type StringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] 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 StringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | null notIn?: string[] | 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 DateTimeWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] notIn?: Date[] | string[] 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 UserScalarRelationFilter = { is?: UserWhereInput isNot?: UserWhereInput } export type SessionCountOrderByAggregateInput = { id?: SortOrder userId?: SortOrder token?: SortOrder expiresAt?: SortOrder createdAt?: SortOrder } export type SessionMaxOrderByAggregateInput = { id?: SortOrder userId?: SortOrder token?: SortOrder expiresAt?: SortOrder createdAt?: SortOrder } export type SessionMinOrderByAggregateInput = { id?: SortOrder userId?: SortOrder token?: SortOrder expiresAt?: SortOrder createdAt?: SortOrder } export type JsonNullableFilter<$PrismaModel = never> = | PatchUndefined< Either>, Exclude>, 'path'>>, Required> > | OptionalFlat>, 'path'>> export type JsonNullableFilterBase<$PrismaModel = never> = { equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter path?: string mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel> string_contains?: string | StringFieldRefInput<$PrismaModel> string_starts_with?: string | StringFieldRefInput<$PrismaModel> string_ends_with?: string | StringFieldRefInput<$PrismaModel> array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter } export type IntFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] notIn?: number[] lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntFilter<$PrismaModel> | number } export type ChapterListRelationFilter = { every?: ChapterWhereInput some?: ChapterWhereInput none?: ChapterWhereInput } export type CharacterListRelationFilter = { every?: CharacterWhereInput some?: CharacterWhereInput none?: CharacterWhereInput } export type ChapterOrderByRelationAggregateInput = { _count?: SortOrder } export type CharacterOrderByRelationAggregateInput = { _count?: SortOrder } export type BookCountOrderByAggregateInput = { id?: SortOrder userId?: SortOrder title?: SortOrder genre?: SortOrder idea?: SortOrder logline?: SortOrder outline?: SortOrder currentChapter?: SortOrder coverId?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type BookAvgOrderByAggregateInput = { currentChapter?: SortOrder } export type BookMaxOrderByAggregateInput = { id?: SortOrder userId?: SortOrder title?: SortOrder genre?: SortOrder idea?: SortOrder logline?: SortOrder currentChapter?: SortOrder coverId?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type BookMinOrderByAggregateInput = { id?: SortOrder userId?: SortOrder title?: SortOrder genre?: SortOrder idea?: SortOrder logline?: SortOrder currentChapter?: SortOrder coverId?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type BookSumOrderByAggregateInput = { currentChapter?: SortOrder } export type JsonNullableWithAggregatesFilter<$PrismaModel = never> = | PatchUndefined< Either>, Exclude>, 'path'>>, Required> > | OptionalFlat>, 'path'>> export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = { equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter path?: string mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel> string_contains?: string | StringFieldRefInput<$PrismaModel> string_starts_with?: string | StringFieldRefInput<$PrismaModel> string_ends_with?: string | StringFieldRefInput<$PrismaModel> array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter _count?: NestedIntNullableFilter<$PrismaModel> _min?: NestedJsonNullableFilter<$PrismaModel> _max?: NestedJsonNullableFilter<$PrismaModel> } export type IntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] notIn?: number[] 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 BoolFilter<$PrismaModel = never> = { equals?: boolean | BooleanFieldRefInput<$PrismaModel> not?: NestedBoolFilter<$PrismaModel> | boolean } export type BookScalarRelationFilter = { is?: BookWhereInput isNot?: BookWhereInput } export type ChapterBookIdNumberCompoundUniqueInput = { bookId: string number: number } export type ChapterCountOrderByAggregateInput = { id?: SortOrder bookId?: SortOrder number?: SortOrder title?: SortOrder summary?: SortOrder content?: SortOrder isGenerated?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type ChapterAvgOrderByAggregateInput = { number?: SortOrder } export type ChapterMaxOrderByAggregateInput = { id?: SortOrder bookId?: SortOrder number?: SortOrder title?: SortOrder summary?: SortOrder content?: SortOrder isGenerated?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type ChapterMinOrderByAggregateInput = { id?: SortOrder bookId?: SortOrder number?: SortOrder title?: SortOrder summary?: SortOrder content?: SortOrder isGenerated?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type ChapterSumOrderByAggregateInput = { number?: 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 CharacterCountOrderByAggregateInput = { id?: SortOrder bookId?: SortOrder name?: SortOrder role?: SortOrder traits?: SortOrder motivation?: SortOrder backstory?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type CharacterMaxOrderByAggregateInput = { id?: SortOrder bookId?: SortOrder name?: SortOrder role?: SortOrder traits?: SortOrder motivation?: SortOrder backstory?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type CharacterMinOrderByAggregateInput = { id?: SortOrder bookId?: SortOrder name?: SortOrder role?: SortOrder traits?: SortOrder motivation?: SortOrder backstory?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } export type IntNullableFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | null notIn?: number[] | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableFilter<$PrismaModel> | number | null } export type CoverDesignCountOrderByAggregateInput = { id?: SortOrder userId?: SortOrder filename?: SortOrder url?: SortOrder prompt?: SortOrder genre?: SortOrder isGenerated?: SortOrder width?: SortOrder height?: SortOrder createdAt?: SortOrder } export type CoverDesignAvgOrderByAggregateInput = { width?: SortOrder height?: SortOrder } export type CoverDesignMaxOrderByAggregateInput = { id?: SortOrder userId?: SortOrder filename?: SortOrder url?: SortOrder prompt?: SortOrder genre?: SortOrder isGenerated?: SortOrder width?: SortOrder height?: SortOrder createdAt?: SortOrder } export type CoverDesignMinOrderByAggregateInput = { id?: SortOrder userId?: SortOrder filename?: SortOrder url?: SortOrder prompt?: SortOrder genre?: SortOrder isGenerated?: SortOrder width?: SortOrder height?: SortOrder createdAt?: SortOrder } export type CoverDesignSumOrderByAggregateInput = { width?: SortOrder height?: SortOrder } export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | null notIn?: number[] | 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 BookCreateNestedManyWithoutUserInput = { create?: XOR | BookCreateWithoutUserInput[] | BookUncheckedCreateWithoutUserInput[] connectOrCreate?: BookCreateOrConnectWithoutUserInput | BookCreateOrConnectWithoutUserInput[] createMany?: BookCreateManyUserInputEnvelope connect?: BookWhereUniqueInput | BookWhereUniqueInput[] } export type CoverDesignCreateNestedManyWithoutUserInput = { create?: XOR | CoverDesignCreateWithoutUserInput[] | CoverDesignUncheckedCreateWithoutUserInput[] connectOrCreate?: CoverDesignCreateOrConnectWithoutUserInput | CoverDesignCreateOrConnectWithoutUserInput[] createMany?: CoverDesignCreateManyUserInputEnvelope connect?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] } export type SessionCreateNestedManyWithoutUserInput = { create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] createMany?: SessionCreateManyUserInputEnvelope connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] } export type BookUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | BookCreateWithoutUserInput[] | BookUncheckedCreateWithoutUserInput[] connectOrCreate?: BookCreateOrConnectWithoutUserInput | BookCreateOrConnectWithoutUserInput[] createMany?: BookCreateManyUserInputEnvelope connect?: BookWhereUniqueInput | BookWhereUniqueInput[] } export type CoverDesignUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | CoverDesignCreateWithoutUserInput[] | CoverDesignUncheckedCreateWithoutUserInput[] connectOrCreate?: CoverDesignCreateOrConnectWithoutUserInput | CoverDesignCreateOrConnectWithoutUserInput[] createMany?: CoverDesignCreateManyUserInputEnvelope connect?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] } export type SessionUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] createMany?: SessionCreateManyUserInputEnvelope connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] } export type StringFieldUpdateOperationsInput = { set?: string } export type NullableStringFieldUpdateOperationsInput = { set?: string | null } export type DateTimeFieldUpdateOperationsInput = { set?: Date | string } export type BookUpdateManyWithoutUserNestedInput = { create?: XOR | BookCreateWithoutUserInput[] | BookUncheckedCreateWithoutUserInput[] connectOrCreate?: BookCreateOrConnectWithoutUserInput | BookCreateOrConnectWithoutUserInput[] upsert?: BookUpsertWithWhereUniqueWithoutUserInput | BookUpsertWithWhereUniqueWithoutUserInput[] createMany?: BookCreateManyUserInputEnvelope set?: BookWhereUniqueInput | BookWhereUniqueInput[] disconnect?: BookWhereUniqueInput | BookWhereUniqueInput[] delete?: BookWhereUniqueInput | BookWhereUniqueInput[] connect?: BookWhereUniqueInput | BookWhereUniqueInput[] update?: BookUpdateWithWhereUniqueWithoutUserInput | BookUpdateWithWhereUniqueWithoutUserInput[] updateMany?: BookUpdateManyWithWhereWithoutUserInput | BookUpdateManyWithWhereWithoutUserInput[] deleteMany?: BookScalarWhereInput | BookScalarWhereInput[] } export type CoverDesignUpdateManyWithoutUserNestedInput = { create?: XOR | CoverDesignCreateWithoutUserInput[] | CoverDesignUncheckedCreateWithoutUserInput[] connectOrCreate?: CoverDesignCreateOrConnectWithoutUserInput | CoverDesignCreateOrConnectWithoutUserInput[] upsert?: CoverDesignUpsertWithWhereUniqueWithoutUserInput | CoverDesignUpsertWithWhereUniqueWithoutUserInput[] createMany?: CoverDesignCreateManyUserInputEnvelope set?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] disconnect?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] delete?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] connect?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] update?: CoverDesignUpdateWithWhereUniqueWithoutUserInput | CoverDesignUpdateWithWhereUniqueWithoutUserInput[] updateMany?: CoverDesignUpdateManyWithWhereWithoutUserInput | CoverDesignUpdateManyWithWhereWithoutUserInput[] deleteMany?: CoverDesignScalarWhereInput | CoverDesignScalarWhereInput[] } export type SessionUpdateManyWithoutUserNestedInput = { create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] upsert?: SessionUpsertWithWhereUniqueWithoutUserInput | SessionUpsertWithWhereUniqueWithoutUserInput[] createMany?: SessionCreateManyUserInputEnvelope set?: SessionWhereUniqueInput | SessionWhereUniqueInput[] disconnect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] delete?: SessionWhereUniqueInput | SessionWhereUniqueInput[] connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] update?: SessionUpdateWithWhereUniqueWithoutUserInput | SessionUpdateWithWhereUniqueWithoutUserInput[] updateMany?: SessionUpdateManyWithWhereWithoutUserInput | SessionUpdateManyWithWhereWithoutUserInput[] deleteMany?: SessionScalarWhereInput | SessionScalarWhereInput[] } export type BookUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | BookCreateWithoutUserInput[] | BookUncheckedCreateWithoutUserInput[] connectOrCreate?: BookCreateOrConnectWithoutUserInput | BookCreateOrConnectWithoutUserInput[] upsert?: BookUpsertWithWhereUniqueWithoutUserInput | BookUpsertWithWhereUniqueWithoutUserInput[] createMany?: BookCreateManyUserInputEnvelope set?: BookWhereUniqueInput | BookWhereUniqueInput[] disconnect?: BookWhereUniqueInput | BookWhereUniqueInput[] delete?: BookWhereUniqueInput | BookWhereUniqueInput[] connect?: BookWhereUniqueInput | BookWhereUniqueInput[] update?: BookUpdateWithWhereUniqueWithoutUserInput | BookUpdateWithWhereUniqueWithoutUserInput[] updateMany?: BookUpdateManyWithWhereWithoutUserInput | BookUpdateManyWithWhereWithoutUserInput[] deleteMany?: BookScalarWhereInput | BookScalarWhereInput[] } export type CoverDesignUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | CoverDesignCreateWithoutUserInput[] | CoverDesignUncheckedCreateWithoutUserInput[] connectOrCreate?: CoverDesignCreateOrConnectWithoutUserInput | CoverDesignCreateOrConnectWithoutUserInput[] upsert?: CoverDesignUpsertWithWhereUniqueWithoutUserInput | CoverDesignUpsertWithWhereUniqueWithoutUserInput[] createMany?: CoverDesignCreateManyUserInputEnvelope set?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] disconnect?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] delete?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] connect?: CoverDesignWhereUniqueInput | CoverDesignWhereUniqueInput[] update?: CoverDesignUpdateWithWhereUniqueWithoutUserInput | CoverDesignUpdateWithWhereUniqueWithoutUserInput[] updateMany?: CoverDesignUpdateManyWithWhereWithoutUserInput | CoverDesignUpdateManyWithWhereWithoutUserInput[] deleteMany?: CoverDesignScalarWhereInput | CoverDesignScalarWhereInput[] } export type SessionUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | SessionCreateWithoutUserInput[] | SessionUncheckedCreateWithoutUserInput[] connectOrCreate?: SessionCreateOrConnectWithoutUserInput | SessionCreateOrConnectWithoutUserInput[] upsert?: SessionUpsertWithWhereUniqueWithoutUserInput | SessionUpsertWithWhereUniqueWithoutUserInput[] createMany?: SessionCreateManyUserInputEnvelope set?: SessionWhereUniqueInput | SessionWhereUniqueInput[] disconnect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] delete?: SessionWhereUniqueInput | SessionWhereUniqueInput[] connect?: SessionWhereUniqueInput | SessionWhereUniqueInput[] update?: SessionUpdateWithWhereUniqueWithoutUserInput | SessionUpdateWithWhereUniqueWithoutUserInput[] updateMany?: SessionUpdateManyWithWhereWithoutUserInput | SessionUpdateManyWithWhereWithoutUserInput[] deleteMany?: SessionScalarWhereInput | SessionScalarWhereInput[] } export type UserCreateNestedOneWithoutSessionsInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutSessionsInput connect?: UserWhereUniqueInput } export type UserUpdateOneRequiredWithoutSessionsNestedInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutSessionsInput upsert?: UserUpsertWithoutSessionsInput connect?: UserWhereUniqueInput update?: XOR, UserUncheckedUpdateWithoutSessionsInput> } export type UserCreateNestedOneWithoutBooksInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutBooksInput connect?: UserWhereUniqueInput } export type ChapterCreateNestedManyWithoutBookInput = { create?: XOR | ChapterCreateWithoutBookInput[] | ChapterUncheckedCreateWithoutBookInput[] connectOrCreate?: ChapterCreateOrConnectWithoutBookInput | ChapterCreateOrConnectWithoutBookInput[] createMany?: ChapterCreateManyBookInputEnvelope connect?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] } export type CharacterCreateNestedManyWithoutBookInput = { create?: XOR | CharacterCreateWithoutBookInput[] | CharacterUncheckedCreateWithoutBookInput[] connectOrCreate?: CharacterCreateOrConnectWithoutBookInput | CharacterCreateOrConnectWithoutBookInput[] createMany?: CharacterCreateManyBookInputEnvelope connect?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] } export type ChapterUncheckedCreateNestedManyWithoutBookInput = { create?: XOR | ChapterCreateWithoutBookInput[] | ChapterUncheckedCreateWithoutBookInput[] connectOrCreate?: ChapterCreateOrConnectWithoutBookInput | ChapterCreateOrConnectWithoutBookInput[] createMany?: ChapterCreateManyBookInputEnvelope connect?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] } export type CharacterUncheckedCreateNestedManyWithoutBookInput = { create?: XOR | CharacterCreateWithoutBookInput[] | CharacterUncheckedCreateWithoutBookInput[] connectOrCreate?: CharacterCreateOrConnectWithoutBookInput | CharacterCreateOrConnectWithoutBookInput[] createMany?: CharacterCreateManyBookInputEnvelope connect?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] } export type IntFieldUpdateOperationsInput = { set?: number increment?: number decrement?: number multiply?: number divide?: number } export type UserUpdateOneRequiredWithoutBooksNestedInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutBooksInput upsert?: UserUpsertWithoutBooksInput connect?: UserWhereUniqueInput update?: XOR, UserUncheckedUpdateWithoutBooksInput> } export type ChapterUpdateManyWithoutBookNestedInput = { create?: XOR | ChapterCreateWithoutBookInput[] | ChapterUncheckedCreateWithoutBookInput[] connectOrCreate?: ChapterCreateOrConnectWithoutBookInput | ChapterCreateOrConnectWithoutBookInput[] upsert?: ChapterUpsertWithWhereUniqueWithoutBookInput | ChapterUpsertWithWhereUniqueWithoutBookInput[] createMany?: ChapterCreateManyBookInputEnvelope set?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] disconnect?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] delete?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] connect?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] update?: ChapterUpdateWithWhereUniqueWithoutBookInput | ChapterUpdateWithWhereUniqueWithoutBookInput[] updateMany?: ChapterUpdateManyWithWhereWithoutBookInput | ChapterUpdateManyWithWhereWithoutBookInput[] deleteMany?: ChapterScalarWhereInput | ChapterScalarWhereInput[] } export type CharacterUpdateManyWithoutBookNestedInput = { create?: XOR | CharacterCreateWithoutBookInput[] | CharacterUncheckedCreateWithoutBookInput[] connectOrCreate?: CharacterCreateOrConnectWithoutBookInput | CharacterCreateOrConnectWithoutBookInput[] upsert?: CharacterUpsertWithWhereUniqueWithoutBookInput | CharacterUpsertWithWhereUniqueWithoutBookInput[] createMany?: CharacterCreateManyBookInputEnvelope set?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] disconnect?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] delete?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] connect?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] update?: CharacterUpdateWithWhereUniqueWithoutBookInput | CharacterUpdateWithWhereUniqueWithoutBookInput[] updateMany?: CharacterUpdateManyWithWhereWithoutBookInput | CharacterUpdateManyWithWhereWithoutBookInput[] deleteMany?: CharacterScalarWhereInput | CharacterScalarWhereInput[] } export type ChapterUncheckedUpdateManyWithoutBookNestedInput = { create?: XOR | ChapterCreateWithoutBookInput[] | ChapterUncheckedCreateWithoutBookInput[] connectOrCreate?: ChapterCreateOrConnectWithoutBookInput | ChapterCreateOrConnectWithoutBookInput[] upsert?: ChapterUpsertWithWhereUniqueWithoutBookInput | ChapterUpsertWithWhereUniqueWithoutBookInput[] createMany?: ChapterCreateManyBookInputEnvelope set?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] disconnect?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] delete?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] connect?: ChapterWhereUniqueInput | ChapterWhereUniqueInput[] update?: ChapterUpdateWithWhereUniqueWithoutBookInput | ChapterUpdateWithWhereUniqueWithoutBookInput[] updateMany?: ChapterUpdateManyWithWhereWithoutBookInput | ChapterUpdateManyWithWhereWithoutBookInput[] deleteMany?: ChapterScalarWhereInput | ChapterScalarWhereInput[] } export type CharacterUncheckedUpdateManyWithoutBookNestedInput = { create?: XOR | CharacterCreateWithoutBookInput[] | CharacterUncheckedCreateWithoutBookInput[] connectOrCreate?: CharacterCreateOrConnectWithoutBookInput | CharacterCreateOrConnectWithoutBookInput[] upsert?: CharacterUpsertWithWhereUniqueWithoutBookInput | CharacterUpsertWithWhereUniqueWithoutBookInput[] createMany?: CharacterCreateManyBookInputEnvelope set?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] disconnect?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] delete?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] connect?: CharacterWhereUniqueInput | CharacterWhereUniqueInput[] update?: CharacterUpdateWithWhereUniqueWithoutBookInput | CharacterUpdateWithWhereUniqueWithoutBookInput[] updateMany?: CharacterUpdateManyWithWhereWithoutBookInput | CharacterUpdateManyWithWhereWithoutBookInput[] deleteMany?: CharacterScalarWhereInput | CharacterScalarWhereInput[] } export type BookCreateNestedOneWithoutChaptersInput = { create?: XOR connectOrCreate?: BookCreateOrConnectWithoutChaptersInput connect?: BookWhereUniqueInput } export type BoolFieldUpdateOperationsInput = { set?: boolean } export type BookUpdateOneRequiredWithoutChaptersNestedInput = { create?: XOR connectOrCreate?: BookCreateOrConnectWithoutChaptersInput upsert?: BookUpsertWithoutChaptersInput connect?: BookWhereUniqueInput update?: XOR, BookUncheckedUpdateWithoutChaptersInput> } export type BookCreateNestedOneWithoutCharactersInput = { create?: XOR connectOrCreate?: BookCreateOrConnectWithoutCharactersInput connect?: BookWhereUniqueInput } export type BookUpdateOneRequiredWithoutCharactersNestedInput = { create?: XOR connectOrCreate?: BookCreateOrConnectWithoutCharactersInput upsert?: BookUpsertWithoutCharactersInput connect?: BookWhereUniqueInput update?: XOR, BookUncheckedUpdateWithoutCharactersInput> } export type UserCreateNestedOneWithoutCoverDesignsInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutCoverDesignsInput connect?: UserWhereUniqueInput } export type NullableIntFieldUpdateOperationsInput = { set?: number | null increment?: number decrement?: number multiply?: number divide?: number } export type UserUpdateOneRequiredWithoutCoverDesignsNestedInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutCoverDesignsInput upsert?: UserUpsertWithoutCoverDesignsInput connect?: UserWhereUniqueInput update?: XOR, UserUncheckedUpdateWithoutCoverDesignsInput> } export type NestedStringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] 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[] | null notIn?: string[] | 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[] notIn?: Date[] | string[] 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[] notIn?: string[] 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[] notIn?: number[] 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[] | null notIn?: string[] | 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[] | null notIn?: number[] | 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[] notIn?: Date[] | string[] 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 NestedJsonNullableFilter<$PrismaModel = never> = | PatchUndefined< Either>, Exclude>, 'path'>>, Required> > | OptionalFlat>, 'path'>> export type NestedJsonNullableFilterBase<$PrismaModel = never> = { equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter path?: string mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel> string_contains?: string | StringFieldRefInput<$PrismaModel> string_starts_with?: string | StringFieldRefInput<$PrismaModel> string_ends_with?: string | StringFieldRefInput<$PrismaModel> array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter } export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] notIn?: number[] 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[] notIn?: number[] lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> gte?: number | FloatFieldRefInput<$PrismaModel> not?: NestedFloatFilter<$PrismaModel> | number } 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[] | null notIn?: number[] | 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[] | null notIn?: number[] | null lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> gte?: number | FloatFieldRefInput<$PrismaModel> not?: NestedFloatNullableFilter<$PrismaModel> | number | null } export type BookCreateWithoutUserInput = { id?: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string chapters?: ChapterCreateNestedManyWithoutBookInput characters?: CharacterCreateNestedManyWithoutBookInput } export type BookUncheckedCreateWithoutUserInput = { id?: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string chapters?: ChapterUncheckedCreateNestedManyWithoutBookInput characters?: CharacterUncheckedCreateNestedManyWithoutBookInput } export type BookCreateOrConnectWithoutUserInput = { where: BookWhereUniqueInput create: XOR } export type BookCreateManyUserInputEnvelope = { data: BookCreateManyUserInput | BookCreateManyUserInput[] } export type CoverDesignCreateWithoutUserInput = { id?: string filename: string url: string prompt?: string | null genre?: string | null isGenerated?: boolean width?: number | null height?: number | null createdAt?: Date | string } export type CoverDesignUncheckedCreateWithoutUserInput = { id?: string filename: string url: string prompt?: string | null genre?: string | null isGenerated?: boolean width?: number | null height?: number | null createdAt?: Date | string } export type CoverDesignCreateOrConnectWithoutUserInput = { where: CoverDesignWhereUniqueInput create: XOR } export type CoverDesignCreateManyUserInputEnvelope = { data: CoverDesignCreateManyUserInput | CoverDesignCreateManyUserInput[] } export type SessionCreateWithoutUserInput = { id?: string token: string expiresAt: Date | string createdAt?: Date | string } export type SessionUncheckedCreateWithoutUserInput = { id?: string token: string expiresAt: Date | string createdAt?: Date | string } export type SessionCreateOrConnectWithoutUserInput = { where: SessionWhereUniqueInput create: XOR } export type SessionCreateManyUserInputEnvelope = { data: SessionCreateManyUserInput | SessionCreateManyUserInput[] } export type BookUpsertWithWhereUniqueWithoutUserInput = { where: BookWhereUniqueInput update: XOR create: XOR } export type BookUpdateWithWhereUniqueWithoutUserInput = { where: BookWhereUniqueInput data: XOR } export type BookUpdateManyWithWhereWithoutUserInput = { where: BookScalarWhereInput data: XOR } export type BookScalarWhereInput = { AND?: BookScalarWhereInput | BookScalarWhereInput[] OR?: BookScalarWhereInput[] NOT?: BookScalarWhereInput | BookScalarWhereInput[] id?: StringFilter<"Book"> | string userId?: StringFilter<"Book"> | string title?: StringFilter<"Book"> | string genre?: StringFilter<"Book"> | string idea?: StringFilter<"Book"> | string logline?: StringNullableFilter<"Book"> | string | null outline?: JsonNullableFilter<"Book"> currentChapter?: IntFilter<"Book"> | number coverId?: StringNullableFilter<"Book"> | string | null createdAt?: DateTimeFilter<"Book"> | Date | string updatedAt?: DateTimeFilter<"Book"> | Date | string } export type CoverDesignUpsertWithWhereUniqueWithoutUserInput = { where: CoverDesignWhereUniqueInput update: XOR create: XOR } export type CoverDesignUpdateWithWhereUniqueWithoutUserInput = { where: CoverDesignWhereUniqueInput data: XOR } export type CoverDesignUpdateManyWithWhereWithoutUserInput = { where: CoverDesignScalarWhereInput data: XOR } export type CoverDesignScalarWhereInput = { AND?: CoverDesignScalarWhereInput | CoverDesignScalarWhereInput[] OR?: CoverDesignScalarWhereInput[] NOT?: CoverDesignScalarWhereInput | CoverDesignScalarWhereInput[] id?: StringFilter<"CoverDesign"> | string userId?: StringFilter<"CoverDesign"> | string filename?: StringFilter<"CoverDesign"> | string url?: StringFilter<"CoverDesign"> | string prompt?: StringNullableFilter<"CoverDesign"> | string | null genre?: StringNullableFilter<"CoverDesign"> | string | null isGenerated?: BoolFilter<"CoverDesign"> | boolean width?: IntNullableFilter<"CoverDesign"> | number | null height?: IntNullableFilter<"CoverDesign"> | number | null createdAt?: DateTimeFilter<"CoverDesign"> | Date | string } export type SessionUpsertWithWhereUniqueWithoutUserInput = { where: SessionWhereUniqueInput update: XOR create: XOR } export type SessionUpdateWithWhereUniqueWithoutUserInput = { where: SessionWhereUniqueInput data: XOR } export type SessionUpdateManyWithWhereWithoutUserInput = { where: SessionScalarWhereInput data: XOR } export type SessionScalarWhereInput = { AND?: SessionScalarWhereInput | SessionScalarWhereInput[] OR?: SessionScalarWhereInput[] NOT?: SessionScalarWhereInput | SessionScalarWhereInput[] id?: StringFilter<"Session"> | string userId?: StringFilter<"Session"> | string token?: StringFilter<"Session"> | string expiresAt?: DateTimeFilter<"Session"> | Date | string createdAt?: DateTimeFilter<"Session"> | Date | string } export type UserCreateWithoutSessionsInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string books?: BookCreateNestedManyWithoutUserInput coverDesigns?: CoverDesignCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutSessionsInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string books?: BookUncheckedCreateNestedManyWithoutUserInput coverDesigns?: CoverDesignUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutSessionsInput = { where: UserWhereUniqueInput create: XOR } export type UserUpsertWithoutSessionsInput = { update: XOR create: XOR where?: UserWhereInput } export type UserUpdateToOneWithWhereWithoutSessionsInput = { where?: UserWhereInput data: XOR } export type UserUpdateWithoutSessionsInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string books?: BookUpdateManyWithoutUserNestedInput coverDesigns?: CoverDesignUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutSessionsInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string books?: BookUncheckedUpdateManyWithoutUserNestedInput coverDesigns?: CoverDesignUncheckedUpdateManyWithoutUserNestedInput } export type UserCreateWithoutBooksInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string coverDesigns?: CoverDesignCreateNestedManyWithoutUserInput sessions?: SessionCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutBooksInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string coverDesigns?: CoverDesignUncheckedCreateNestedManyWithoutUserInput sessions?: SessionUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutBooksInput = { where: UserWhereUniqueInput create: XOR } export type ChapterCreateWithoutBookInput = { id?: string number: number title: string summary: string content?: string | null isGenerated?: boolean createdAt?: Date | string updatedAt?: Date | string } export type ChapterUncheckedCreateWithoutBookInput = { id?: string number: number title: string summary: string content?: string | null isGenerated?: boolean createdAt?: Date | string updatedAt?: Date | string } export type ChapterCreateOrConnectWithoutBookInput = { where: ChapterWhereUniqueInput create: XOR } export type ChapterCreateManyBookInputEnvelope = { data: ChapterCreateManyBookInput | ChapterCreateManyBookInput[] } export type CharacterCreateWithoutBookInput = { id?: string name: string role: string traits: string motivation?: string | null backstory?: string | null createdAt?: Date | string updatedAt?: Date | string } export type CharacterUncheckedCreateWithoutBookInput = { id?: string name: string role: string traits: string motivation?: string | null backstory?: string | null createdAt?: Date | string updatedAt?: Date | string } export type CharacterCreateOrConnectWithoutBookInput = { where: CharacterWhereUniqueInput create: XOR } export type CharacterCreateManyBookInputEnvelope = { data: CharacterCreateManyBookInput | CharacterCreateManyBookInput[] } export type UserUpsertWithoutBooksInput = { update: XOR create: XOR where?: UserWhereInput } export type UserUpdateToOneWithWhereWithoutBooksInput = { where?: UserWhereInput data: XOR } export type UserUpdateWithoutBooksInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string coverDesigns?: CoverDesignUpdateManyWithoutUserNestedInput sessions?: SessionUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutBooksInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string coverDesigns?: CoverDesignUncheckedUpdateManyWithoutUserNestedInput sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput } export type ChapterUpsertWithWhereUniqueWithoutBookInput = { where: ChapterWhereUniqueInput update: XOR create: XOR } export type ChapterUpdateWithWhereUniqueWithoutBookInput = { where: ChapterWhereUniqueInput data: XOR } export type ChapterUpdateManyWithWhereWithoutBookInput = { where: ChapterScalarWhereInput data: XOR } export type ChapterScalarWhereInput = { AND?: ChapterScalarWhereInput | ChapterScalarWhereInput[] OR?: ChapterScalarWhereInput[] NOT?: ChapterScalarWhereInput | ChapterScalarWhereInput[] id?: StringFilter<"Chapter"> | string bookId?: StringFilter<"Chapter"> | string number?: IntFilter<"Chapter"> | number title?: StringFilter<"Chapter"> | string summary?: StringFilter<"Chapter"> | string content?: StringNullableFilter<"Chapter"> | string | null isGenerated?: BoolFilter<"Chapter"> | boolean createdAt?: DateTimeFilter<"Chapter"> | Date | string updatedAt?: DateTimeFilter<"Chapter"> | Date | string } export type CharacterUpsertWithWhereUniqueWithoutBookInput = { where: CharacterWhereUniqueInput update: XOR create: XOR } export type CharacterUpdateWithWhereUniqueWithoutBookInput = { where: CharacterWhereUniqueInput data: XOR } export type CharacterUpdateManyWithWhereWithoutBookInput = { where: CharacterScalarWhereInput data: XOR } export type CharacterScalarWhereInput = { AND?: CharacterScalarWhereInput | CharacterScalarWhereInput[] OR?: CharacterScalarWhereInput[] NOT?: CharacterScalarWhereInput | CharacterScalarWhereInput[] id?: StringFilter<"Character"> | string bookId?: StringFilter<"Character"> | string name?: StringFilter<"Character"> | string role?: StringFilter<"Character"> | string traits?: StringFilter<"Character"> | string motivation?: StringNullableFilter<"Character"> | string | null backstory?: StringNullableFilter<"Character"> | string | null createdAt?: DateTimeFilter<"Character"> | Date | string updatedAt?: DateTimeFilter<"Character"> | Date | string } export type BookCreateWithoutChaptersInput = { id?: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string user: UserCreateNestedOneWithoutBooksInput characters?: CharacterCreateNestedManyWithoutBookInput } export type BookUncheckedCreateWithoutChaptersInput = { id?: string userId: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string characters?: CharacterUncheckedCreateNestedManyWithoutBookInput } export type BookCreateOrConnectWithoutChaptersInput = { where: BookWhereUniqueInput create: XOR } export type BookUpsertWithoutChaptersInput = { update: XOR create: XOR where?: BookWhereInput } export type BookUpdateToOneWithWhereWithoutChaptersInput = { where?: BookWhereInput data: XOR } export type BookUpdateWithoutChaptersInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string user?: UserUpdateOneRequiredWithoutBooksNestedInput characters?: CharacterUpdateManyWithoutBookNestedInput } export type BookUncheckedUpdateWithoutChaptersInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string characters?: CharacterUncheckedUpdateManyWithoutBookNestedInput } export type BookCreateWithoutCharactersInput = { id?: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string user: UserCreateNestedOneWithoutBooksInput chapters?: ChapterCreateNestedManyWithoutBookInput } export type BookUncheckedCreateWithoutCharactersInput = { id?: string userId: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string chapters?: ChapterUncheckedCreateNestedManyWithoutBookInput } export type BookCreateOrConnectWithoutCharactersInput = { where: BookWhereUniqueInput create: XOR } export type BookUpsertWithoutCharactersInput = { update: XOR create: XOR where?: BookWhereInput } export type BookUpdateToOneWithWhereWithoutCharactersInput = { where?: BookWhereInput data: XOR } export type BookUpdateWithoutCharactersInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string user?: UserUpdateOneRequiredWithoutBooksNestedInput chapters?: ChapterUpdateManyWithoutBookNestedInput } export type BookUncheckedUpdateWithoutCharactersInput = { id?: StringFieldUpdateOperationsInput | string userId?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string chapters?: ChapterUncheckedUpdateManyWithoutBookNestedInput } export type UserCreateWithoutCoverDesignsInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string books?: BookCreateNestedManyWithoutUserInput sessions?: SessionCreateNestedManyWithoutUserInput } export type UserUncheckedCreateWithoutCoverDesignsInput = { id?: string email: string password: string name?: string | null role?: string createdAt?: Date | string updatedAt?: Date | string books?: BookUncheckedCreateNestedManyWithoutUserInput sessions?: SessionUncheckedCreateNestedManyWithoutUserInput } export type UserCreateOrConnectWithoutCoverDesignsInput = { where: UserWhereUniqueInput create: XOR } export type UserUpsertWithoutCoverDesignsInput = { update: XOR create: XOR where?: UserWhereInput } export type UserUpdateToOneWithWhereWithoutCoverDesignsInput = { where?: UserWhereInput data: XOR } export type UserUpdateWithoutCoverDesignsInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string books?: BookUpdateManyWithoutUserNestedInput sessions?: SessionUpdateManyWithoutUserNestedInput } export type UserUncheckedUpdateWithoutCoverDesignsInput = { id?: StringFieldUpdateOperationsInput | string email?: StringFieldUpdateOperationsInput | string password?: StringFieldUpdateOperationsInput | string name?: NullableStringFieldUpdateOperationsInput | string | null role?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string books?: BookUncheckedUpdateManyWithoutUserNestedInput sessions?: SessionUncheckedUpdateManyWithoutUserNestedInput } export type BookCreateManyUserInput = { id?: string title: string genre: string idea: string logline?: string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: number coverId?: string | null createdAt?: Date | string updatedAt?: Date | string } export type CoverDesignCreateManyUserInput = { id?: string filename: string url: string prompt?: string | null genre?: string | null isGenerated?: boolean width?: number | null height?: number | null createdAt?: Date | string } export type SessionCreateManyUserInput = { id?: string token: string expiresAt: Date | string createdAt?: Date | string } export type BookUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string chapters?: ChapterUpdateManyWithoutBookNestedInput characters?: CharacterUpdateManyWithoutBookNestedInput } export type BookUncheckedUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string chapters?: ChapterUncheckedUpdateManyWithoutBookNestedInput characters?: CharacterUncheckedUpdateManyWithoutBookNestedInput } export type BookUncheckedUpdateManyWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string genre?: StringFieldUpdateOperationsInput | string idea?: StringFieldUpdateOperationsInput | string logline?: NullableStringFieldUpdateOperationsInput | string | null outline?: NullableJsonNullValueInput | InputJsonValue currentChapter?: IntFieldUpdateOperationsInput | number coverId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CoverDesignUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string filename?: StringFieldUpdateOperationsInput | string url?: StringFieldUpdateOperationsInput | string prompt?: NullableStringFieldUpdateOperationsInput | string | null genre?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean width?: NullableIntFieldUpdateOperationsInput | number | null height?: NullableIntFieldUpdateOperationsInput | number | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CoverDesignUncheckedUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string filename?: StringFieldUpdateOperationsInput | string url?: StringFieldUpdateOperationsInput | string prompt?: NullableStringFieldUpdateOperationsInput | string | null genre?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean width?: NullableIntFieldUpdateOperationsInput | number | null height?: NullableIntFieldUpdateOperationsInput | number | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CoverDesignUncheckedUpdateManyWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string filename?: StringFieldUpdateOperationsInput | string url?: StringFieldUpdateOperationsInput | string prompt?: NullableStringFieldUpdateOperationsInput | string | null genre?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean width?: NullableIntFieldUpdateOperationsInput | number | null height?: NullableIntFieldUpdateOperationsInput | number | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type SessionUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string token?: StringFieldUpdateOperationsInput | string expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type SessionUncheckedUpdateWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string token?: StringFieldUpdateOperationsInput | string expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type SessionUncheckedUpdateManyWithoutUserInput = { id?: StringFieldUpdateOperationsInput | string token?: StringFieldUpdateOperationsInput | string expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type ChapterCreateManyBookInput = { id?: string number: number title: string summary: string content?: string | null isGenerated?: boolean createdAt?: Date | string updatedAt?: Date | string } export type CharacterCreateManyBookInput = { id?: string name: string role: string traits: string motivation?: string | null backstory?: string | null createdAt?: Date | string updatedAt?: Date | string } export type ChapterUpdateWithoutBookInput = { id?: StringFieldUpdateOperationsInput | string number?: IntFieldUpdateOperationsInput | number title?: StringFieldUpdateOperationsInput | string summary?: StringFieldUpdateOperationsInput | string content?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type ChapterUncheckedUpdateWithoutBookInput = { id?: StringFieldUpdateOperationsInput | string number?: IntFieldUpdateOperationsInput | number title?: StringFieldUpdateOperationsInput | string summary?: StringFieldUpdateOperationsInput | string content?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type ChapterUncheckedUpdateManyWithoutBookInput = { id?: StringFieldUpdateOperationsInput | string number?: IntFieldUpdateOperationsInput | number title?: StringFieldUpdateOperationsInput | string summary?: StringFieldUpdateOperationsInput | string content?: NullableStringFieldUpdateOperationsInput | string | null isGenerated?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CharacterUpdateWithoutBookInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string role?: StringFieldUpdateOperationsInput | string traits?: StringFieldUpdateOperationsInput | string motivation?: NullableStringFieldUpdateOperationsInput | string | null backstory?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CharacterUncheckedUpdateWithoutBookInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string role?: StringFieldUpdateOperationsInput | string traits?: StringFieldUpdateOperationsInput | string motivation?: NullableStringFieldUpdateOperationsInput | string | null backstory?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CharacterUncheckedUpdateManyWithoutBookInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string role?: StringFieldUpdateOperationsInput | string traits?: StringFieldUpdateOperationsInput | string motivation?: NullableStringFieldUpdateOperationsInput | string | null backstory?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } /** * Batch Payload for updateMany & deleteMany & createMany */ export type BatchPayload = { count: number } /** * DMMF */ export const dmmf: runtime.BaseDMMF }