/** * Client **/ import * as runtime from './runtime/index'; declare const prisma: unique symbol export type PrismaPromise = Promise & {[prisma]: true} type UnwrapPromise

= P extends Promise ? R : P type UnwrapTuple = { [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise }; /** * Model UserAddress * */ export type UserAddress = { street: string number: number | null city: string } /** * Model Post * */ export type Post = { id: string slug: string title: string body: string authorId: string } /** * Model Comment * */ export type Comment = { id: string postId: string comment: string } /** * Model User * */ export type User = { id: string email: string age: number | null address: UserAddress } /** * ## Prisma Client ʲˢ * * Type-safe database client for TypeScript & Node.js * @example * ``` * const prisma = new PrismaClient() * // Fetch zero or more Posts * const posts = await prisma.post.findMany() * ``` * * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ export class PrismaClient< T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, GlobalReject extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined = 'rejectOnNotFound' extends keyof T ? T['rejectOnNotFound'] : false > { /** * ## Prisma Client ʲˢ * * Type-safe database client for TypeScript & Node.js * @example * ``` * const prisma = new PrismaClient() * // Fetch zero or more Posts * const posts = await prisma.post.findMany() * ``` * * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ constructor(optionsArg ?: Prisma.Subset); $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => Promise : Prisma.LogEvent) => void): void; /** * Connect with the database */ $connect(): Promise; /** * Disconnect from the database */ $disconnect(): Promise; /** * Add a middleware */ $use(cb: Prisma.Middleware): void /** * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. * @example * ``` * const [george, bob, alice] = await prisma.$transaction([ * prisma.user.create({ data: { name: 'George' } }), * prisma.user.create({ data: { name: 'Bob' } }), * prisma.user.create({ data: { name: 'Alice' } }), * ]) * ``` * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ $transaction

[]>(arg: [...P]): Promise>; $transaction(fn: (prisma: Prisma.TransactionClient) => Promise, options?: {maxWait?: number, timeout?: number}): Promise; /** * Executes a raw MongoDB command and returns the result of it. * @example * ``` * const user = await prisma.$runCommandRaw({ * aggregate: 'User', * pipeline: [{ $match: { name: 'Bob' } }, { $project: { email: true, _id: false } }], * explain: false, * }) * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $runCommandRaw(command: Prisma.InputJsonObject): PrismaPromise; /** * `prisma.post`: Exposes CRUD operations for the **Post** model. * Example usage: * ```ts * // Fetch zero or more Posts * const posts = await prisma.post.findMany() * ``` */ get post(): Prisma.PostDelegate; /** * `prisma.comment`: Exposes CRUD operations for the **Comment** model. * Example usage: * ```ts * // Fetch zero or more Comments * const comments = await prisma.comment.findMany() * ``` */ get comment(): Prisma.CommentDelegate; /** * `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; } export namespace Prisma { export import DMMF = runtime.DMMF /** * Prisma Errors */ export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError export import PrismaClientInitializationError = runtime.PrismaClientInitializationError export import PrismaClientValidationError = runtime.PrismaClientValidationError export import NotFoundError = runtime.NotFoundError /** * Re-export of sql-template-tag */ export import sql = runtime.sqltag export import empty = runtime.empty export import join = runtime.join export import raw = runtime.raw export import Sql = runtime.Sql /** * Decimal.js */ export import Decimal = runtime.Decimal export type DecimalJsLike = runtime.DecimalJsLike /** * Metrics */ export type Metrics = runtime.Metrics export type Metric = runtime.Metric export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket /** * Prisma Client JS version: 4.8.0 * Query Engine version: d6e67a83f971b175a593ccc12e15c4a757f93ffe */ export type PrismaVersion = { client: string } export const prismaVersion: PrismaVersion /** * Utility Types */ /** * From https://github.com/sindresorhus/type-fest/ * Matches a JSON object. * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. */ export type JsonObject = {[Key in string]?: JsonValue} /** * From https://github.com/sindresorhus/type-fest/ * Matches a JSON array. */ export interface JsonArray extends Array {} /** * From https://github.com/sindresorhus/type-fest/ * Matches any valid JSON value. */ export type JsonValue = string | number | boolean | JsonObject | JsonArray | null /** * Matches a JSON object. * Unlike `JsonObject`, this type allows undefined and read-only properties. */ export type InputJsonObject = {readonly [Key in string]?: InputJsonValue | null} /** * Matches a JSON array. * Unlike `JsonArray`, readonly arrays are assignable to this type. */ export interface InputJsonArray extends ReadonlyArray {} /** * Matches any valid value that can be used as an input for operations like * create and update as the value of a JSON field. Unlike `JsonValue`, this * type allows read-only arrays and read-only object properties and disallows * `null` at the top level. * * `null` cannot be used as the value of a JSON field because its meaning * would be ambiguous. Use `Prisma.JsonNull` to store the JSON null value or * `Prisma.DbNull` to clear the JSON value and set the field to the database * NULL value instead. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values */ export type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray /** * 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 HasSelect = { select: any } type HasInclude = { include: any } type CheckSelect = T extends SelectAndInclude ? 'Please either choose `select` or `include`' : T extends HasSelect ? U : T extends HasInclude ? U : S /** * 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 Promise> = 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`.' : {}) /** * Subset + Intersection * @desc From `T` pick properties that exist in `U` and intersect `K` */ export type SubsetIntersection = { [key in keyof T]: key extends keyof U ? T[key] : never } & K type Without = { [P in Exclude]?: never }; /** * XOR is needed to have a real mutually exclusive union type * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types */ type XOR = T extends object ? U extends object ? (Without & U) | (Without & T) : U : T /** * Is T a Record? */ type IsObject = T extends Array ? False : T extends Date ? False : T extends Uint8Array ? False : T extends BigInt ? False : T extends object ? True : False /** * If it's T[], return T */ export type UnEnumerate = T extends Array ? U : T /** * From ts-toolbelt */ type __Either = Omit & { // Merge all but K [P in K]: Prisma__Pick // With K possibilities }[K] type EitherStrict = Strict<__Either> type EitherLoose = ComputeRaw<__Either> type _Either< O extends object, K extends Key, strict extends Boolean > = { 1: EitherStrict 0: EitherLoose }[strict] type Either< O extends object, K extends Key, strict extends Boolean = 1 > = O extends unknown ? _Either : never export type Union = any type PatchUndefined = { [K in keyof O]: O[K] extends undefined ? At : O[K] } & {} /** Helper Types for "Merge" **/ export type IntersectOf = ( U extends unknown ? (k: U) => void : never ) extends (k: infer I) => void ? I : never export type Overwrite = { [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; } & {}; type _Merge = IntersectOf; }>>; type Key = string | number | symbol; type AtBasic = K extends keyof O ? O[K] : never; type AtStrict = O[K & keyof O]; type AtLoose = O extends unknown ? AtStrict : never; export type At = { 1: AtStrict; 0: AtLoose; }[strict]; export type ComputeRaw = A extends Function ? A : { [K in keyof A]: A[K]; } & {}; export type OptionalFlat = { [K in keyof O]?: O[K]; } & {}; type _Record = { [P in K]: T; }; // cause typescript not to expand types and preserve names type NoExpand = T extends unknown ? T : never; // this type assumes the passed object is entirely optional type AtLeast = NoExpand< O extends unknown ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O : never>; type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; export type Strict = ComputeRaw<_Strict>; /** End Helper Types for "Merge" **/ export type Merge = ComputeRaw<_Merge>>; /** A [[Boolean]] */ export type Boolean = True | False // /** // 1 // */ export type True = 1 /** 0 */ export type False = 0 export type Not = { 0: 1 1: 0 }[B] export type Extends = [A1] extends [never] ? 0 // anything `never` is false : A1 extends A2 ? 1 : 0 export type Has = Not< Extends, U1> > export type Or = { 0: { 0: 0 1: 1 } 1: { 0: 1 1: 1 } }[B1][B2] export type Keys = U extends unknown ? keyof U : never type Exact = W extends unknown ? A extends Narrowable ? Cast : Cast< {[K in keyof A]: K extends keyof W ? Exact : never}, {[K in keyof W]: K extends keyof A ? Exact : W[K]}> : never; type Narrowable = string | number | boolean | bigint; type Cast = A extends B ? A : B; export const type: unique symbol; export function validator(): (select: Exact) => S; /** * 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 with an array */ type PickArray> = 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 class PrismaClientFetcher { private readonly prisma; private readonly debug; private readonly hooks?; constructor(prisma: PrismaClient, debug?: boolean, hooks?: Hooks | undefined); request(document: any, dataPath?: string[], rootField?: string, typeName?: string, isList?: boolean, callsite?: string): Promise; sanitizeMessage(message: string): string; protected unpack(document: any, data: any, path: string[], rootField?: string, isList?: boolean): any; } export const ModelName: { Post: 'Post', Comment: 'Comment', User: 'User' }; export type ModelName = (typeof ModelName)[keyof typeof ModelName] export type Datasources = { db?: Datasource } export type DefaultPrismaClient = PrismaClient export type RejectOnNotFound = boolean | ((error: Error) => Error) export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound } export type RejectPerOperation = { [P in "findUnique" | "findFirst"]?: RejectPerModel | RejectOnNotFound } type IsReject = T extends true ? True : T extends (err: Error) => Error ? True : False export type HasReject< GlobalRejectSettings extends Prisma.PrismaClientOptions['rejectOnNotFound'], LocalRejectSettings, Action extends PrismaAction, Model extends ModelName > = LocalRejectSettings extends RejectOnNotFound ? IsReject : GlobalRejectSettings extends RejectPerOperation ? Action extends keyof GlobalRejectSettings ? GlobalRejectSettings[Action] extends RejectOnNotFound ? IsReject : GlobalRejectSettings[Action] extends RejectPerModel ? Model extends keyof GlobalRejectSettings[Action] ? IsReject : False : False : False : IsReject export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' export interface PrismaClientOptions { /** * Configure findUnique/findFirst to throw an error if the query returns null. * @deprecated since 4.0.0. Use `findUniqueOrThrow`/`findFirstOrThrow` methods instead. * @example * ``` * // Reject on both findUnique/findFirst * rejectOnNotFound: true * // Reject only on findFirst with a custom error * rejectOnNotFound: { findFirst: (err) => new Error("Custom Error")} * // Reject on user.findUnique with a custom error * rejectOnNotFound: { findUnique: {User: (err) => new Error("User not found")}} * ``` */ rejectOnNotFound?: RejectOnNotFound | RejectPerOperation /** * Overwrites the datasource url from your schema.prisma file */ datasources?: Datasources /** * @default "colorless" */ errorFormat?: ErrorFormat /** * @example * ``` * // Defaults to stdout * log: ['query', 'info', 'warn', 'error'] * * // Emit as events * log: [ * { emit: 'stdout', level: 'query' }, * { emit: 'stdout', level: 'info' }, * { emit: 'stdout', level: 'warn' } * { emit: 'stdout', level: 'error' } * ] * ``` * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). */ log?: Array } export type Hooks = { beforeRequest?: (options: { query: string, path: string[], rootField?: string, typeName?: string, document: any }) => any } /* Types for Logging */ export type LogLevel = 'info' | 'query' | 'warn' | 'error' export type LogDefinition = { level: LogLevel emit: 'stdout' | 'event' } export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never export type GetEvents = T extends Array ? GetLogType | GetLogType | GetLogType | GetLogType : never export type QueryEvent = { timestamp: Date query: string params: string duration: number target: string } export type LogEvent = { timestamp: Date message: string target: string } /* End Types for Logging */ export type PrismaAction = | 'findUnique' | 'findMany' | 'findFirst' | 'create' | 'createMany' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'executeRaw' | 'queryRaw' | 'aggregate' | 'count' | 'runCommandRaw' | 'findRaw' /** * These options are being passed into the middleware as "params" */ export type MiddlewareParams = { model?: ModelName action: PrismaAction args: any dataPath: string[] runInTransaction: boolean } /** * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation */ export type Middleware = ( params: MiddlewareParams, next: (params: MiddlewareParams) => Promise, ) => Promise // 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 PostCountOutputType */ export type PostCountOutputType = { comments: number } export type PostCountOutputTypeSelect = { comments?: boolean } export type PostCountOutputTypeGetPayload = S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : S extends true ? PostCountOutputType : S extends undefined ? never : S extends { include: any } & (PostCountOutputTypeArgs) ? PostCountOutputType : S extends { select: any } & (PostCountOutputTypeArgs) ? { [P in TruthyKeys]: P extends keyof PostCountOutputType ? PostCountOutputType[P] : never } : PostCountOutputType // Custom InputTypes /** * PostCountOutputType without action */ export type PostCountOutputTypeArgs = { /** * Select specific fields to fetch from the PostCountOutputType * **/ select?: PostCountOutputTypeSelect | null } /** * Count Type UserCountOutputType */ export type UserCountOutputType = { posts: number } export type UserCountOutputTypeSelect = { posts?: boolean } export type UserCountOutputTypeGetPayload = S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : S extends true ? UserCountOutputType : S extends undefined ? never : S extends { include: any } & (UserCountOutputTypeArgs) ? UserCountOutputType : S extends { select: any } & (UserCountOutputTypeArgs) ? { [P in TruthyKeys]: P extends keyof UserCountOutputType ? UserCountOutputType[P] : never } : UserCountOutputType // Custom InputTypes /** * UserCountOutputType without action */ export type UserCountOutputTypeArgs = { /** * Select specific fields to fetch from the UserCountOutputType * **/ select?: UserCountOutputTypeSelect | null } /** * Models */ /** * Model UserAddress */ export type UserAddressSelect = { street?: boolean number?: boolean city?: boolean } export type UserAddressGetPayload = S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : S extends true ? UserAddress : S extends undefined ? never : S extends { include: any } & (UserAddressArgs) ? UserAddress : S extends { select: any } & (UserAddressArgs) ? { [P in TruthyKeys]: P extends keyof UserAddress ? UserAddress[P] : never } : UserAddress export interface UserAddressDelegate { } /** * The delegate class that acts as a "Promise-like" for UserAddress. * 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 class Prisma__UserAddressClient implements PrismaPromise { [prisma]: true; private readonly _dmmf; private readonly _fetcher; private readonly _queryType; private readonly _rootField; private readonly _clientMethod; private readonly _args; private readonly _dataPath; private readonly _errorFormat; private readonly _measurePerformance?; private _isList; private _callsite; private _requestPromise?; constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); readonly [Symbol.toStringTag]: 'PrismaClientPromise'; private get _document(); /** * 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): Promise; /** * 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): Promise; /** * 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): Promise; } // Custom InputTypes /** * UserAddress without action */ export type UserAddressArgs = { /** * Select specific fields to fetch from the UserAddress * **/ select?: UserAddressSelect | null } /** * Model Post */ export type AggregatePost = { _count: PostCountAggregateOutputType | null _min: PostMinAggregateOutputType | null _max: PostMaxAggregateOutputType | null } export type PostMinAggregateOutputType = { id: string | null slug: string | null title: string | null body: string | null authorId: string | null } export type PostMaxAggregateOutputType = { id: string | null slug: string | null title: string | null body: string | null authorId: string | null } export type PostCountAggregateOutputType = { id: number slug: number title: number body: number authorId: number _all: number } export type PostMinAggregateInputType = { id?: true slug?: true title?: true body?: true authorId?: true } export type PostMaxAggregateInputType = { id?: true slug?: true title?: true body?: true authorId?: true } export type PostCountAggregateInputType = { id?: true slug?: true title?: true body?: true authorId?: true _all?: true } export type PostAggregateArgs = { /** * Filter which Post to aggregate. * **/ where?: PostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Posts to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position * **/ cursor?: PostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Posts 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` Posts. * **/ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Posts **/ _count?: true | PostCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: PostMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: PostMaxAggregateInputType } export type GetPostAggregateType = { [P in keyof T & keyof AggregatePost]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type PostGroupByArgs = { where?: PostWhereInput orderBy?: Enumerable by: Array having?: PostScalarWhereWithAggregatesInput take?: number skip?: number _count?: PostCountAggregateInputType | true _min?: PostMinAggregateInputType _max?: PostMaxAggregateInputType } export type PostGroupByOutputType = { id: string slug: string title: string body: string authorId: string _count: PostCountAggregateOutputType | null _min: PostMinAggregateOutputType | null _max: PostMaxAggregateOutputType | null } type GetPostGroupByPayload = PrismaPromise< Array< PickArray & { [P in ((keyof T) & (keyof PostGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type PostSelect = { id?: boolean slug?: boolean title?: boolean body?: boolean comments?: boolean | PostCommentsArgs author?: boolean | UserArgs authorId?: boolean _count?: boolean | PostCountOutputTypeArgs } export type PostInclude = { comments?: boolean | PostCommentsArgs author?: boolean | UserArgs _count?: boolean | PostCountOutputTypeArgs } export type PostGetPayload = S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : S extends true ? Post : S extends undefined ? never : S extends { include: any } & (PostArgs | PostFindManyArgs) ? Post & { [P in TruthyKeys]: P extends 'comments' ? Array < CommentGetPayload> : P extends 'author' ? UserGetPayload : P extends '_count' ? PostCountOutputTypeGetPayload : never } : S extends { select: any } & (PostArgs | PostFindManyArgs) ? { [P in TruthyKeys]: P extends 'comments' ? Array < CommentGetPayload> : P extends 'author' ? UserGetPayload : P extends '_count' ? PostCountOutputTypeGetPayload : P extends keyof Post ? Post[P] : never } : Post type PostCountArgs = Merge< Omit & { select?: PostCountAggregateInputType | true } > export interface PostDelegate { /** * Find zero or one Post that matches the filter. * @param {PostFindUniqueArgs} args - Arguments to find a Post * @example * // Get one Post * const post = await prisma.post.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique( args: SelectSubset ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> /** * Find one Post that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {PostFindUniqueOrThrowArgs} args - Arguments to find a Post * @example * // Get one Post * const post = await prisma.post.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow( args?: SelectSubset ): Prisma__PostClient> /** * Find the first Post 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 {PostFindFirstArgs} args - Arguments to find a Post * @example * // Get one Post * const post = await prisma.post.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst( args?: SelectSubset ): HasReject extends True ? Prisma__PostClient> : Prisma__PostClient | null, null> /** * Find the first Post that matches the filter or * throw `NotFoundError` 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 {PostFindFirstOrThrowArgs} args - Arguments to find a Post * @example * // Get one Post * const post = await prisma.post.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow( args?: SelectSubset ): Prisma__PostClient> /** * Find zero or more Posts 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 {PostFindManyArgs=} args - Arguments to filter and select certain fields only. * @example * // Get all Posts * const posts = await prisma.post.findMany() * * // Get first 10 Posts * const posts = await prisma.post.findMany({ take: 10 }) * * // Only select the `id` * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) * **/ findMany( args?: SelectSubset ): PrismaPromise>> /** * Create a Post. * @param {PostCreateArgs} args - Arguments to create a Post. * @example * // Create one Post * const Post = await prisma.post.create({ * data: { * // ... data to create a Post * } * }) * **/ create( args: SelectSubset ): Prisma__PostClient> /** * Create many Posts. * @param {PostCreateManyArgs} args - Arguments to create many Posts. * @example * // Create many Posts * const post = await prisma.post.createMany({ * data: { * // ... provide data here * } * }) * **/ createMany( args?: SelectSubset ): PrismaPromise /** * Delete a Post. * @param {PostDeleteArgs} args - Arguments to delete one Post. * @example * // Delete one Post * const Post = await prisma.post.delete({ * where: { * // ... filter to delete one Post * } * }) * **/ delete( args: SelectSubset ): Prisma__PostClient> /** * Update one Post. * @param {PostUpdateArgs} args - Arguments to update one Post. * @example * // Update one Post * const post = await prisma.post.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update( args: SelectSubset ): Prisma__PostClient> /** * Delete zero or more Posts. * @param {PostDeleteManyArgs} args - Arguments to filter Posts to delete. * @example * // Delete a few Posts * const { count } = await prisma.post.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany( args?: SelectSubset ): PrismaPromise /** * Update zero or more Posts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PostUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Posts * const post = await prisma.post.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany( args: SelectSubset ): PrismaPromise /** * Create or update one Post. * @param {PostUpsertArgs} args - Arguments to update or create a Post. * @example * // Update or create a Post * const post = await prisma.post.upsert({ * create: { * // ... data to create a Post * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Post we want to update * } * }) **/ upsert( args: SelectSubset ): Prisma__PostClient> /** * Find zero or more Posts that matches the filter. * @param {PostFindRawArgs} args - Select which filters you would like to apply. * @example * const post = await prisma.post.findRaw({ * filter: { age: { $gt: 25 } } * }) **/ findRaw( args?: PostFindRawArgs ): PrismaPromise /** * Perform aggregation operations on a Post. * @param {PostAggregateRawArgs} args - Select which aggregations you would like to apply. * @example * const post = await prisma.post.aggregateRaw({ * pipeline: [ * { $match: { status: "registered" } }, * { $group: { _id: "$country", total: { $sum: 1 } } } * ] * }) **/ aggregateRaw( args?: PostAggregateRawArgs ): PrismaPromise /** * Count the number of Posts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PostCountArgs} args - Arguments to filter Posts to count. * @example * // Count the number of Posts * const count = await prisma.post.count({ * where: { * // ... the filter for the Posts we want to count * } * }) **/ count( args?: Subset, ): PrismaPromise< T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a Post. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PostAggregateArgs} 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): PrismaPromise> /** * Group by Post. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PostGroupByArgs} 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 PostGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: PostGroupByArgs['orderBy'] } : { orderBy?: PostGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, 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 ? GetPostGroupByPayload : PrismaPromise } /** * The delegate class that acts as a "Promise-like" for Post. * 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 class Prisma__PostClient implements PrismaPromise { [prisma]: true; private readonly _dmmf; private readonly _fetcher; private readonly _queryType; private readonly _rootField; private readonly _clientMethod; private readonly _args; private readonly _dataPath; private readonly _errorFormat; private readonly _measurePerformance?; private _isList; private _callsite; private _requestPromise?; constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); readonly [Symbol.toStringTag]: 'PrismaClientPromise'; comments(args?: Subset): PrismaPromise>| Null>; author(args?: Subset): Prisma__UserClient | Null>; private get _document(); /** * 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): Promise; /** * 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): Promise; /** * 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): Promise; } // Custom InputTypes /** * Post base type for findUnique actions */ export type PostFindUniqueArgsBase = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * Filter, which Post to fetch. * **/ where: PostWhereUniqueInput } /** * Post findUnique */ export interface PostFindUniqueArgs extends PostFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } /** * Post findUniqueOrThrow */ export type PostFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * Filter, which Post to fetch. * **/ where: PostWhereUniqueInput } /** * Post base type for findFirst actions */ export type PostFindFirstArgsBase = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * Filter, which Post to fetch. * **/ where?: PostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Posts to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Posts. * **/ cursor?: PostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Posts 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` Posts. * **/ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Posts. * **/ distinct?: Enumerable } /** * Post findFirst */ export interface PostFindFirstArgs extends PostFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } /** * Post findFirstOrThrow */ export type PostFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * Filter, which Post to fetch. * **/ where?: PostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Posts to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Posts. * **/ cursor?: PostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Posts 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` Posts. * **/ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Posts. * **/ distinct?: Enumerable } /** * Post findMany */ export type PostFindManyArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * Filter, which Posts to fetch. * **/ where?: PostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Posts to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Posts. * **/ cursor?: PostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Posts 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` Posts. * **/ skip?: number distinct?: Enumerable } /** * Post create */ export type PostCreateArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * The data needed to create a Post. * **/ data: XOR } /** * Post createMany */ export type PostCreateManyArgs = { /** * The data used to create many Posts. * **/ data: Enumerable } /** * Post update */ export type PostUpdateArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * The data needed to update a Post. * **/ data: XOR /** * Choose, which Post to update. * **/ where: PostWhereUniqueInput } /** * Post updateMany */ export type PostUpdateManyArgs = { /** * The data used to update Posts. * **/ data: XOR /** * Filter which Posts to update * **/ where?: PostWhereInput } /** * Post upsert */ export type PostUpsertArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * The filter to search for the Post to update in case it exists. * **/ where: PostWhereUniqueInput /** * In case the Post found by the `where` argument doesn't exist, create a new Post with this data. * **/ create: XOR /** * In case the Post was found with the provided `where` argument, update it with this data. * **/ update: XOR } /** * Post delete */ export type PostDeleteArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null /** * Filter which Post to delete. * **/ where: PostWhereUniqueInput } /** * Post deleteMany */ export type PostDeleteManyArgs = { /** * Filter which Posts to delete * **/ where?: PostWhereInput } /** * Post findRaw */ export type PostFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. ${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. * **/ filter?: InputJsonValue /** * Additional options to pass to the `find` command ${@link https://docs.mongodb.com/manual/reference/command/find/#command-fields MongoDB Docs}. * **/ options?: InputJsonValue } /** * Post aggregateRaw */ export type PostAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. ${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. * **/ pipeline?: Array /** * Additional options to pass to the `aggregate` command ${@link https://docs.mongodb.com/manual/reference/command/aggregate/#command-fields MongoDB Docs}. * **/ options?: InputJsonValue } /** * Post.comments */ export type PostCommentsArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null where?: CommentWhereInput orderBy?: Enumerable cursor?: CommentWhereUniqueInput take?: number skip?: number distinct?: Enumerable } /** * Post without action */ export type PostArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null } /** * Model Comment */ export type AggregateComment = { _count: CommentCountAggregateOutputType | null _min: CommentMinAggregateOutputType | null _max: CommentMaxAggregateOutputType | null } export type CommentMinAggregateOutputType = { id: string | null postId: string | null comment: string | null } export type CommentMaxAggregateOutputType = { id: string | null postId: string | null comment: string | null } export type CommentCountAggregateOutputType = { id: number postId: number comment: number _all: number } export type CommentMinAggregateInputType = { id?: true postId?: true comment?: true } export type CommentMaxAggregateInputType = { id?: true postId?: true comment?: true } export type CommentCountAggregateInputType = { id?: true postId?: true comment?: true _all?: true } export type CommentAggregateArgs = { /** * Filter which Comment to aggregate. * **/ where?: CommentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Comments to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position * **/ cursor?: CommentWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Comments 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` Comments. * **/ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Comments **/ _count?: true | CommentCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: CommentMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: CommentMaxAggregateInputType } export type GetCommentAggregateType = { [P in keyof T & keyof AggregateComment]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type CommentGroupByArgs = { where?: CommentWhereInput orderBy?: Enumerable by: Array having?: CommentScalarWhereWithAggregatesInput take?: number skip?: number _count?: CommentCountAggregateInputType | true _min?: CommentMinAggregateInputType _max?: CommentMaxAggregateInputType } export type CommentGroupByOutputType = { id: string postId: string comment: string _count: CommentCountAggregateOutputType | null _min: CommentMinAggregateOutputType | null _max: CommentMaxAggregateOutputType | null } type GetCommentGroupByPayload = PrismaPromise< Array< PickArray & { [P in ((keyof T) & (keyof CommentGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type CommentSelect = { id?: boolean post?: boolean | PostArgs postId?: boolean comment?: boolean } export type CommentInclude = { post?: boolean | PostArgs } export type CommentGetPayload = S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : S extends true ? Comment : S extends undefined ? never : S extends { include: any } & (CommentArgs | CommentFindManyArgs) ? Comment & { [P in TruthyKeys]: P extends 'post' ? PostGetPayload : never } : S extends { select: any } & (CommentArgs | CommentFindManyArgs) ? { [P in TruthyKeys]: P extends 'post' ? PostGetPayload : P extends keyof Comment ? Comment[P] : never } : Comment type CommentCountArgs = Merge< Omit & { select?: CommentCountAggregateInputType | true } > export interface CommentDelegate { /** * Find zero or one Comment that matches the filter. * @param {CommentFindUniqueArgs} args - Arguments to find a Comment * @example * // Get one Comment * const comment = await prisma.comment.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique( args: SelectSubset ): HasReject extends True ? Prisma__CommentClient> : Prisma__CommentClient | null, null> /** * Find one Comment that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {CommentFindUniqueOrThrowArgs} args - Arguments to find a Comment * @example * // Get one Comment * const comment = await prisma.comment.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow( args?: SelectSubset ): Prisma__CommentClient> /** * Find the first Comment 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 {CommentFindFirstArgs} args - Arguments to find a Comment * @example * // Get one Comment * const comment = await prisma.comment.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst( args?: SelectSubset ): HasReject extends True ? Prisma__CommentClient> : Prisma__CommentClient | null, null> /** * Find the first Comment that matches the filter or * throw `NotFoundError` 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 {CommentFindFirstOrThrowArgs} args - Arguments to find a Comment * @example * // Get one Comment * const comment = await prisma.comment.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow( args?: SelectSubset ): Prisma__CommentClient> /** * Find zero or more Comments 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 {CommentFindManyArgs=} args - Arguments to filter and select certain fields only. * @example * // Get all Comments * const comments = await prisma.comment.findMany() * * // Get first 10 Comments * const comments = await prisma.comment.findMany({ take: 10 }) * * // Only select the `id` * const commentWithIdOnly = await prisma.comment.findMany({ select: { id: true } }) * **/ findMany( args?: SelectSubset ): PrismaPromise>> /** * Create a Comment. * @param {CommentCreateArgs} args - Arguments to create a Comment. * @example * // Create one Comment * const Comment = await prisma.comment.create({ * data: { * // ... data to create a Comment * } * }) * **/ create( args: SelectSubset ): Prisma__CommentClient> /** * Create many Comments. * @param {CommentCreateManyArgs} args - Arguments to create many Comments. * @example * // Create many Comments * const comment = await prisma.comment.createMany({ * data: { * // ... provide data here * } * }) * **/ createMany( args?: SelectSubset ): PrismaPromise /** * Delete a Comment. * @param {CommentDeleteArgs} args - Arguments to delete one Comment. * @example * // Delete one Comment * const Comment = await prisma.comment.delete({ * where: { * // ... filter to delete one Comment * } * }) * **/ delete( args: SelectSubset ): Prisma__CommentClient> /** * Update one Comment. * @param {CommentUpdateArgs} args - Arguments to update one Comment. * @example * // Update one Comment * const comment = await prisma.comment.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update( args: SelectSubset ): Prisma__CommentClient> /** * Delete zero or more Comments. * @param {CommentDeleteManyArgs} args - Arguments to filter Comments to delete. * @example * // Delete a few Comments * const { count } = await prisma.comment.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany( args?: SelectSubset ): PrismaPromise /** * Update zero or more Comments. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CommentUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Comments * const comment = await prisma.comment.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany( args: SelectSubset ): PrismaPromise /** * Create or update one Comment. * @param {CommentUpsertArgs} args - Arguments to update or create a Comment. * @example * // Update or create a Comment * const comment = await prisma.comment.upsert({ * create: { * // ... data to create a Comment * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Comment we want to update * } * }) **/ upsert( args: SelectSubset ): Prisma__CommentClient> /** * Find zero or more Comments that matches the filter. * @param {CommentFindRawArgs} args - Select which filters you would like to apply. * @example * const comment = await prisma.comment.findRaw({ * filter: { age: { $gt: 25 } } * }) **/ findRaw( args?: CommentFindRawArgs ): PrismaPromise /** * Perform aggregation operations on a Comment. * @param {CommentAggregateRawArgs} args - Select which aggregations you would like to apply. * @example * const comment = await prisma.comment.aggregateRaw({ * pipeline: [ * { $match: { status: "registered" } }, * { $group: { _id: "$country", total: { $sum: 1 } } } * ] * }) **/ aggregateRaw( args?: CommentAggregateRawArgs ): PrismaPromise /** * Count the number of Comments. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CommentCountArgs} args - Arguments to filter Comments to count. * @example * // Count the number of Comments * const count = await prisma.comment.count({ * where: { * // ... the filter for the Comments we want to count * } * }) **/ count( args?: Subset, ): PrismaPromise< T extends _Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a Comment. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CommentAggregateArgs} 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): PrismaPromise> /** * Group by Comment. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {CommentGroupByArgs} 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 CommentGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: CommentGroupByArgs['orderBy'] } : { orderBy?: CommentGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, 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 ? GetCommentGroupByPayload : PrismaPromise } /** * The delegate class that acts as a "Promise-like" for Comment. * 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 class Prisma__CommentClient implements PrismaPromise { [prisma]: true; private readonly _dmmf; private readonly _fetcher; private readonly _queryType; private readonly _rootField; private readonly _clientMethod; private readonly _args; private readonly _dataPath; private readonly _errorFormat; private readonly _measurePerformance?; private _isList; private _callsite; private _requestPromise?; constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); readonly [Symbol.toStringTag]: 'PrismaClientPromise'; post(args?: Subset): Prisma__PostClient | Null>; private get _document(); /** * 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): Promise; /** * 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): Promise; /** * 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): Promise; } // Custom InputTypes /** * Comment base type for findUnique actions */ export type CommentFindUniqueArgsBase = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * Filter, which Comment to fetch. * **/ where: CommentWhereUniqueInput } /** * Comment findUnique */ export interface CommentFindUniqueArgs extends CommentFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } /** * Comment findUniqueOrThrow */ export type CommentFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * Filter, which Comment to fetch. * **/ where: CommentWhereUniqueInput } /** * Comment base type for findFirst actions */ export type CommentFindFirstArgsBase = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * Filter, which Comment to fetch. * **/ where?: CommentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Comments to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Comments. * **/ cursor?: CommentWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Comments 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` Comments. * **/ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Comments. * **/ distinct?: Enumerable } /** * Comment findFirst */ export interface CommentFindFirstArgs extends CommentFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } /** * Comment findFirstOrThrow */ export type CommentFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * Filter, which Comment to fetch. * **/ where?: CommentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Comments to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Comments. * **/ cursor?: CommentWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Comments 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` Comments. * **/ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Comments. * **/ distinct?: Enumerable } /** * Comment findMany */ export type CommentFindManyArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * Filter, which Comments to fetch. * **/ where?: CommentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Comments to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Comments. * **/ cursor?: CommentWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Comments 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` Comments. * **/ skip?: number distinct?: Enumerable } /** * Comment create */ export type CommentCreateArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * The data needed to create a Comment. * **/ data: XOR } /** * Comment createMany */ export type CommentCreateManyArgs = { /** * The data used to create many Comments. * **/ data: Enumerable } /** * Comment update */ export type CommentUpdateArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * The data needed to update a Comment. * **/ data: XOR /** * Choose, which Comment to update. * **/ where: CommentWhereUniqueInput } /** * Comment updateMany */ export type CommentUpdateManyArgs = { /** * The data used to update Comments. * **/ data: XOR /** * Filter which Comments to update * **/ where?: CommentWhereInput } /** * Comment upsert */ export type CommentUpsertArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * The filter to search for the Comment to update in case it exists. * **/ where: CommentWhereUniqueInput /** * In case the Comment found by the `where` argument doesn't exist, create a new Comment with this data. * **/ create: XOR /** * In case the Comment was found with the provided `where` argument, update it with this data. * **/ update: XOR } /** * Comment delete */ export type CommentDeleteArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null /** * Filter which Comment to delete. * **/ where: CommentWhereUniqueInput } /** * Comment deleteMany */ export type CommentDeleteManyArgs = { /** * Filter which Comments to delete * **/ where?: CommentWhereInput } /** * Comment findRaw */ export type CommentFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. ${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. * **/ filter?: InputJsonValue /** * Additional options to pass to the `find` command ${@link https://docs.mongodb.com/manual/reference/command/find/#command-fields MongoDB Docs}. * **/ options?: InputJsonValue } /** * Comment aggregateRaw */ export type CommentAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. ${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. * **/ pipeline?: Array /** * Additional options to pass to the `aggregate` command ${@link https://docs.mongodb.com/manual/reference/command/aggregate/#command-fields MongoDB Docs}. * **/ options?: InputJsonValue } /** * Comment without action */ export type CommentArgs = { /** * Select specific fields to fetch from the Comment * **/ select?: CommentSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: CommentInclude | null } /** * Model User */ export type AggregateUser = { _count: UserCountAggregateOutputType | null _avg: UserAvgAggregateOutputType | null _sum: UserSumAggregateOutputType | null _min: UserMinAggregateOutputType | null _max: UserMaxAggregateOutputType | null } export type UserAvgAggregateOutputType = { age: number | null } export type UserSumAggregateOutputType = { age: number | null } export type UserMinAggregateOutputType = { id: string | null email: string | null age: number | null } export type UserMaxAggregateOutputType = { id: string | null email: string | null age: number | null } export type UserCountAggregateOutputType = { id: number email: number age: number _all: number } export type UserAvgAggregateInputType = { age?: true } export type UserSumAggregateInputType = { age?: true } export type UserMinAggregateInputType = { id?: true email?: true age?: true } export type UserMaxAggregateInputType = { id?: true email?: true age?: true } export type UserCountAggregateInputType = { id?: true email?: true age?: 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?: Enumerable /** * {@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 average **/ _avg?: UserAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: UserSumAggregateInputType /** * {@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?: Enumerable by: Array having?: UserScalarWhereWithAggregatesInput take?: number skip?: number _count?: UserCountAggregateInputType | true _avg?: UserAvgAggregateInputType _sum?: UserSumAggregateInputType _min?: UserMinAggregateInputType _max?: UserMaxAggregateInputType } export type UserGroupByOutputType = { id: string email: string age: number | null _count: UserCountAggregateOutputType | null _avg: UserAvgAggregateOutputType | null _sum: UserSumAggregateOutputType | null _min: UserMinAggregateOutputType | null _max: UserMaxAggregateOutputType | null } type GetUserGroupByPayload = PrismaPromise< Array< PickArray & { [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type UserSelect = { id?: boolean email?: boolean age?: boolean address?: boolean | UserAddressArgs posts?: boolean | UserPostsArgs _count?: boolean | UserCountOutputTypeArgs } export type UserInclude = { posts?: boolean | UserPostsArgs _count?: boolean | UserCountOutputTypeArgs } export type UserGetPayload = S extends { select: any, include: any } ? 'Please either choose `select` or `include`' : S extends true ? User : S extends undefined ? never : S extends { include: any } & (UserArgs | UserFindManyArgs) ? User & { [P in TruthyKeys]: P extends 'posts' ? Array < PostGetPayload> : P extends '_count' ? UserCountOutputTypeGetPayload : never } : S extends { select: any } & (UserArgs | UserFindManyArgs) ? { [P in TruthyKeys]: P extends 'address' ? UserAddressGetPayload : P extends 'posts' ? Array < PostGetPayload> : P extends '_count' ? UserCountOutputTypeGetPayload : P extends keyof User ? User[P] : never } : User type UserCountArgs = Merge< Omit & { select?: UserCountAggregateInputType | true } > export interface UserDelegate { /** * 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 ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> /** * 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> /** * 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 ): HasReject extends True ? Prisma__UserClient> : Prisma__UserClient | null, null> /** * Find the first User that matches the filter or * throw `NotFoundError` 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> /** * 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 ): PrismaPromise>> /** * 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> /** * 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 ): PrismaPromise /** * 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> /** * 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> /** * 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 ): 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 ): PrismaPromise /** * Create or update one User. * @param {UserUpsertArgs} args - Arguments to update or create a User. * @example * // Update or create a User * const user = await prisma.user.upsert({ * create: { * // ... data to create a User * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the User we want to update * } * }) **/ upsert( args: SelectSubset ): Prisma__UserClient> /** * Find zero or more Users that matches the filter. * @param {UserFindRawArgs} args - Select which filters you would like to apply. * @example * const user = await prisma.user.findRaw({ * filter: { age: { $gt: 25 } } * }) **/ findRaw( args?: UserFindRawArgs ): PrismaPromise /** * Perform aggregation operations on a User. * @param {UserAggregateRawArgs} args - Select which aggregations you would like to apply. * @example * const user = await prisma.user.aggregateRaw({ * pipeline: [ * { $match: { status: "registered" } }, * { $group: { _id: "$country", total: { $sum: 1 } } } * ] * }) **/ aggregateRaw( args?: UserAggregateRawArgs ): PrismaPromise /** * 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, ): PrismaPromise< T extends _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): 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 TupleToUnion, 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 : PrismaPromise } /** * 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 class Prisma__UserClient implements PrismaPromise { [prisma]: true; private readonly _dmmf; private readonly _fetcher; private readonly _queryType; private readonly _rootField; private readonly _clientMethod; private readonly _args; private readonly _dataPath; private readonly _errorFormat; private readonly _measurePerformance?; private _isList; private _callsite; private _requestPromise?; constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); readonly [Symbol.toStringTag]: 'PrismaClientPromise'; address(args?: Subset): Prisma__UserAddressClient | Null>; posts(args?: Subset): PrismaPromise>| Null>; private get _document(); /** * 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): Promise; /** * 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): Promise; /** * 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): Promise; } // Custom InputTypes /** * User base type for findUnique actions */ export type UserFindUniqueArgsBase = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * Filter, which User to fetch. * **/ where: UserWhereUniqueInput } /** * User findUnique */ export interface UserFindUniqueArgs extends UserFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } /** * User findUniqueOrThrow */ export type UserFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * Filter, which User to fetch. * **/ where: UserWhereUniqueInput } /** * User base type for findFirst actions */ export type UserFindFirstArgsBase = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * Filter, which User to fetch. * **/ where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. * **/ orderBy?: Enumerable /** * {@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?: Enumerable } /** * User findFirst */ export interface UserFindFirstArgs extends UserFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } /** * User findFirstOrThrow */ export type UserFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * Filter, which User to fetch. * **/ where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. * **/ orderBy?: Enumerable /** * {@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?: Enumerable } /** * User findMany */ export type UserFindManyArgs = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * Filter, which Users to fetch. * **/ where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Users to fetch. * **/ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Users. * **/ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Users from the position of the cursor. * **/ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Users. * **/ skip?: number distinct?: Enumerable } /** * User create */ export type UserCreateArgs = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * The data needed to create a User. * **/ data: XOR } /** * User createMany */ export type UserCreateManyArgs = { /** * The data used to create many Users. * **/ data: Enumerable } /** * User update */ export type UserUpdateArgs = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * The data needed to update a User. * **/ data: XOR /** * Choose, which User to update. * **/ where: UserWhereUniqueInput } /** * User updateMany */ export type UserUpdateManyArgs = { /** * The data used to update Users. * **/ data: XOR /** * Filter which Users to update * **/ where?: UserWhereInput } /** * User upsert */ export type UserUpsertArgs = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * The filter to search for the User to update in case it exists. * **/ where: UserWhereUniqueInput /** * In case the User found by the `where` argument doesn't exist, create a new User with this data. * **/ create: XOR /** * In case the User was found with the provided `where` argument, update it with this data. * **/ update: XOR } /** * User delete */ export type UserDeleteArgs = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null /** * Filter which User to delete. * **/ where: UserWhereUniqueInput } /** * User deleteMany */ export type UserDeleteManyArgs = { /** * Filter which Users to delete * **/ where?: UserWhereInput } /** * User findRaw */ export type UserFindRawArgs = { /** * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. ${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}. * **/ filter?: InputJsonValue /** * Additional options to pass to the `find` command ${@link https://docs.mongodb.com/manual/reference/command/find/#command-fields MongoDB Docs}. * **/ options?: InputJsonValue } /** * User aggregateRaw */ export type UserAggregateRawArgs = { /** * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. ${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}. * **/ pipeline?: Array /** * Additional options to pass to the `aggregate` command ${@link https://docs.mongodb.com/manual/reference/command/aggregate/#command-fields MongoDB Docs}. * **/ options?: InputJsonValue } /** * User.posts */ export type UserPostsArgs = { /** * Select specific fields to fetch from the Post * **/ select?: PostSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: PostInclude | null where?: PostWhereInput orderBy?: Enumerable cursor?: PostWhereUniqueInput take?: number skip?: number distinct?: Enumerable } /** * User without action */ export type UserArgs = { /** * Select specific fields to fetch from the User * **/ select?: UserSelect | null /** * Choose, which related nodes to fetch as well. * **/ include?: UserInclude | null } /** * Enums */ // Based on // https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275 export const CommentScalarFieldEnum: { id: 'id', postId: 'postId', comment: 'comment' }; export type CommentScalarFieldEnum = (typeof CommentScalarFieldEnum)[keyof typeof CommentScalarFieldEnum] export const PostScalarFieldEnum: { id: 'id', slug: 'slug', title: 'title', body: 'body', authorId: 'authorId' }; export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] export const QueryMode: { default: 'default', insensitive: 'insensitive' }; export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] export const SortOrder: { asc: 'asc', desc: 'desc' }; export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] export const UserScalarFieldEnum: { id: 'id', email: 'email', age: 'age' }; export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] /** * Deep Input Types */ export type PostWhereInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable id?: StringFilter | string slug?: StringFilter | string title?: StringFilter | string body?: StringFilter | string comments?: CommentListRelationFilter author?: XOR authorId?: StringFilter | string } export type PostOrderByWithRelationInput = { id?: SortOrder slug?: SortOrder title?: SortOrder body?: SortOrder comments?: CommentOrderByRelationAggregateInput author?: UserOrderByWithRelationInput authorId?: SortOrder } export type PostWhereUniqueInput = { id?: string slug?: string } export type PostOrderByWithAggregationInput = { id?: SortOrder slug?: SortOrder title?: SortOrder body?: SortOrder authorId?: SortOrder _count?: PostCountOrderByAggregateInput _max?: PostMaxOrderByAggregateInput _min?: PostMinOrderByAggregateInput } export type PostScalarWhereWithAggregatesInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable id?: StringWithAggregatesFilter | string slug?: StringWithAggregatesFilter | string title?: StringWithAggregatesFilter | string body?: StringWithAggregatesFilter | string authorId?: StringWithAggregatesFilter | string } export type CommentWhereInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable id?: StringFilter | string post?: XOR postId?: StringFilter | string comment?: StringFilter | string } export type CommentOrderByWithRelationInput = { id?: SortOrder post?: PostOrderByWithRelationInput postId?: SortOrder comment?: SortOrder } export type CommentWhereUniqueInput = { id?: string } export type CommentOrderByWithAggregationInput = { id?: SortOrder postId?: SortOrder comment?: SortOrder _count?: CommentCountOrderByAggregateInput _max?: CommentMaxOrderByAggregateInput _min?: CommentMinOrderByAggregateInput } export type CommentScalarWhereWithAggregatesInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable id?: StringWithAggregatesFilter | string postId?: StringWithAggregatesFilter | string comment?: StringWithAggregatesFilter | string } export type UserWhereInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable id?: StringFilter | string email?: StringFilter | string age?: IntNullableFilter | number | null address?: XOR posts?: PostListRelationFilter } export type UserOrderByWithRelationInput = { id?: SortOrder email?: SortOrder age?: SortOrder address?: UserAddressOrderByInput posts?: PostOrderByRelationAggregateInput } export type UserWhereUniqueInput = { id?: string email?: string } export type UserOrderByWithAggregationInput = { id?: SortOrder email?: SortOrder age?: SortOrder _count?: UserCountOrderByAggregateInput _avg?: UserAvgOrderByAggregateInput _max?: UserMaxOrderByAggregateInput _min?: UserMinOrderByAggregateInput _sum?: UserSumOrderByAggregateInput } export type UserScalarWhereWithAggregatesInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable id?: StringWithAggregatesFilter | string email?: StringWithAggregatesFilter | string age?: IntNullableWithAggregatesFilter | number | null } export type PostCreateInput = { id?: string slug: string title: string body: string comments?: CommentCreateNestedManyWithoutPostInput author: UserCreateNestedOneWithoutPostsInput } export type PostUncheckedCreateInput = { id?: string slug: string title: string body: string comments?: CommentUncheckedCreateNestedManyWithoutPostInput authorId: string } export type PostUpdateInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string comments?: CommentUpdateManyWithoutPostNestedInput author?: UserUpdateOneRequiredWithoutPostsNestedInput } export type PostUncheckedUpdateInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string comments?: CommentUncheckedUpdateManyWithoutPostNestedInput authorId?: StringFieldUpdateOperationsInput | string } export type PostCreateManyInput = { id?: string slug: string title: string body: string authorId: string } export type PostUpdateManyMutationInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string } export type PostUncheckedUpdateManyInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string authorId?: StringFieldUpdateOperationsInput | string } export type CommentCreateInput = { id?: string post: PostCreateNestedOneWithoutCommentsInput comment: string } export type CommentUncheckedCreateInput = { id?: string postId: string comment: string } export type CommentUpdateInput = { post?: PostUpdateOneRequiredWithoutCommentsNestedInput comment?: StringFieldUpdateOperationsInput | string } export type CommentUncheckedUpdateInput = { postId?: StringFieldUpdateOperationsInput | string comment?: StringFieldUpdateOperationsInput | string } export type CommentCreateManyInput = { id?: string postId: string comment: string } export type CommentUpdateManyMutationInput = { comment?: StringFieldUpdateOperationsInput | string } export type CommentUncheckedUpdateManyInput = { postId?: StringFieldUpdateOperationsInput | string comment?: StringFieldUpdateOperationsInput | string } export type UserCreateInput = { id?: string email: string age?: number | null address: XOR posts?: PostCreateNestedManyWithoutAuthorInput } export type UserUncheckedCreateInput = { id?: string email: string age?: number | null address: XOR posts?: PostUncheckedCreateNestedManyWithoutAuthorInput } export type UserUpdateInput = { email?: StringFieldUpdateOperationsInput | string age?: NullableIntFieldUpdateOperationsInput | number | null address?: XOR posts?: PostUpdateManyWithoutAuthorNestedInput } export type UserUncheckedUpdateInput = { email?: StringFieldUpdateOperationsInput | string age?: NullableIntFieldUpdateOperationsInput | number | null address?: XOR posts?: PostUncheckedUpdateManyWithoutAuthorNestedInput } export type UserCreateManyInput = { id?: string email: string age?: number | null address: XOR } export type UserUpdateManyMutationInput = { email?: StringFieldUpdateOperationsInput | string age?: NullableIntFieldUpdateOperationsInput | number | null address?: XOR } export type UserUncheckedUpdateManyInput = { email?: StringFieldUpdateOperationsInput | string age?: NullableIntFieldUpdateOperationsInput | number | null address?: XOR } export type StringFilter = { equals?: string in?: Enumerable notIn?: Enumerable lt?: string lte?: string gt?: string gte?: string contains?: string startsWith?: string endsWith?: string mode?: QueryMode not?: NestedStringFilter | string } export type CommentListRelationFilter = { every?: CommentWhereInput some?: CommentWhereInput none?: CommentWhereInput } export type UserRelationFilter = { is?: UserWhereInput isNot?: UserWhereInput } export type CommentOrderByRelationAggregateInput = { _count?: SortOrder } export type PostCountOrderByAggregateInput = { id?: SortOrder slug?: SortOrder title?: SortOrder body?: SortOrder authorId?: SortOrder } export type PostMaxOrderByAggregateInput = { id?: SortOrder slug?: SortOrder title?: SortOrder body?: SortOrder authorId?: SortOrder } export type PostMinOrderByAggregateInput = { id?: SortOrder slug?: SortOrder title?: SortOrder body?: SortOrder authorId?: SortOrder } export type StringWithAggregatesFilter = { equals?: string in?: Enumerable notIn?: Enumerable lt?: string lte?: string gt?: string gte?: string contains?: string startsWith?: string endsWith?: string mode?: QueryMode not?: NestedStringWithAggregatesFilter | string _count?: NestedIntFilter _min?: NestedStringFilter _max?: NestedStringFilter } export type PostRelationFilter = { is?: PostWhereInput isNot?: PostWhereInput } export type CommentCountOrderByAggregateInput = { id?: SortOrder postId?: SortOrder comment?: SortOrder } export type CommentMaxOrderByAggregateInput = { id?: SortOrder postId?: SortOrder comment?: SortOrder } export type CommentMinOrderByAggregateInput = { id?: SortOrder postId?: SortOrder comment?: SortOrder } export type IntNullableFilter = { equals?: number | null in?: Enumerable | null notIn?: Enumerable | null lt?: number lte?: number gt?: number gte?: number not?: NestedIntNullableFilter | number | null isSet?: boolean } export type UserAddressCompositeFilter = { equals?: UserAddressObjectEqualityInput is?: UserAddressWhereInput isNot?: UserAddressWhereInput } export type UserAddressObjectEqualityInput = { street: string number?: number | null city: string } export type PostListRelationFilter = { every?: PostWhereInput some?: PostWhereInput none?: PostWhereInput } export type UserAddressOrderByInput = { street?: SortOrder number?: SortOrder city?: SortOrder } export type PostOrderByRelationAggregateInput = { _count?: SortOrder } export type UserCountOrderByAggregateInput = { id?: SortOrder email?: SortOrder age?: SortOrder } export type UserAvgOrderByAggregateInput = { age?: SortOrder } export type UserMaxOrderByAggregateInput = { id?: SortOrder email?: SortOrder age?: SortOrder } export type UserMinOrderByAggregateInput = { id?: SortOrder email?: SortOrder age?: SortOrder } export type UserSumOrderByAggregateInput = { age?: SortOrder } export type IntNullableWithAggregatesFilter = { equals?: number | null in?: Enumerable | null notIn?: Enumerable | null lt?: number lte?: number gt?: number gte?: number not?: NestedIntNullableWithAggregatesFilter | number | null _count?: NestedIntNullableFilter _avg?: NestedFloatNullableFilter _sum?: NestedIntNullableFilter _min?: NestedIntNullableFilter _max?: NestedIntNullableFilter isSet?: boolean } export type CommentCreateNestedManyWithoutPostInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable createMany?: CommentCreateManyPostInputEnvelope connect?: Enumerable } export type UserCreateNestedOneWithoutPostsInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutPostsInput connect?: UserWhereUniqueInput } export type CommentUncheckedCreateNestedManyWithoutPostInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable createMany?: CommentCreateManyPostInputEnvelope connect?: Enumerable } export type StringFieldUpdateOperationsInput = { set?: string } export type CommentUpdateManyWithoutPostNestedInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable upsert?: Enumerable createMany?: CommentCreateManyPostInputEnvelope set?: Enumerable disconnect?: Enumerable delete?: Enumerable connect?: Enumerable update?: Enumerable updateMany?: Enumerable deleteMany?: Enumerable } export type UserUpdateOneRequiredWithoutPostsNestedInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutPostsInput upsert?: UserUpsertWithoutPostsInput connect?: UserWhereUniqueInput update?: XOR } export type CommentUncheckedUpdateManyWithoutPostNestedInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable upsert?: Enumerable createMany?: CommentCreateManyPostInputEnvelope set?: Enumerable disconnect?: Enumerable delete?: Enumerable connect?: Enumerable update?: Enumerable updateMany?: Enumerable deleteMany?: Enumerable } export type PostCreateNestedOneWithoutCommentsInput = { create?: XOR connectOrCreate?: PostCreateOrConnectWithoutCommentsInput connect?: PostWhereUniqueInput } export type PostUpdateOneRequiredWithoutCommentsNestedInput = { create?: XOR connectOrCreate?: PostCreateOrConnectWithoutCommentsInput upsert?: PostUpsertWithoutCommentsInput connect?: PostWhereUniqueInput update?: XOR } export type UserAddressCreateEnvelopeInput = { set?: UserAddressCreateInput } export type UserAddressCreateInput = { street: string number?: number | null city: string } export type PostCreateNestedManyWithoutAuthorInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable createMany?: PostCreateManyAuthorInputEnvelope connect?: Enumerable } export type PostUncheckedCreateNestedManyWithoutAuthorInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable createMany?: PostCreateManyAuthorInputEnvelope connect?: Enumerable } export type NullableIntFieldUpdateOperationsInput = { set?: number | null increment?: number decrement?: number multiply?: number divide?: number unset?: boolean } export type UserAddressUpdateEnvelopeInput = { set?: UserAddressCreateInput update?: UserAddressUpdateInput } export type PostUpdateManyWithoutAuthorNestedInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable upsert?: Enumerable createMany?: PostCreateManyAuthorInputEnvelope set?: Enumerable disconnect?: Enumerable delete?: Enumerable connect?: Enumerable update?: Enumerable updateMany?: Enumerable deleteMany?: Enumerable } export type PostUncheckedUpdateManyWithoutAuthorNestedInput = { create?: XOR, Enumerable> connectOrCreate?: Enumerable upsert?: Enumerable createMany?: PostCreateManyAuthorInputEnvelope set?: Enumerable disconnect?: Enumerable delete?: Enumerable connect?: Enumerable update?: Enumerable updateMany?: Enumerable deleteMany?: Enumerable } export type NestedStringFilter = { equals?: string in?: Enumerable notIn?: Enumerable lt?: string lte?: string gt?: string gte?: string contains?: string startsWith?: string endsWith?: string not?: NestedStringFilter | string } export type NestedStringWithAggregatesFilter = { equals?: string in?: Enumerable notIn?: Enumerable lt?: string lte?: string gt?: string gte?: string contains?: string startsWith?: string endsWith?: string not?: NestedStringWithAggregatesFilter | string _count?: NestedIntFilter _min?: NestedStringFilter _max?: NestedStringFilter } export type NestedIntFilter = { equals?: number in?: Enumerable notIn?: Enumerable lt?: number lte?: number gt?: number gte?: number not?: NestedIntFilter | number } export type NestedIntNullableFilter = { equals?: number | null in?: Enumerable | null notIn?: Enumerable | null lt?: number lte?: number gt?: number gte?: number not?: NestedIntNullableFilter | number | null isSet?: boolean } export type UserAddressWhereInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable street?: StringFilter | string number?: IntNullableFilter | number | null city?: StringFilter | string } export type NestedIntNullableWithAggregatesFilter = { equals?: number | null in?: Enumerable | null notIn?: Enumerable | null lt?: number lte?: number gt?: number gte?: number not?: NestedIntNullableWithAggregatesFilter | number | null _count?: NestedIntNullableFilter _avg?: NestedFloatNullableFilter _sum?: NestedIntNullableFilter _min?: NestedIntNullableFilter _max?: NestedIntNullableFilter isSet?: boolean } export type NestedFloatNullableFilter = { equals?: number | null in?: Enumerable | null notIn?: Enumerable | null lt?: number lte?: number gt?: number gte?: number not?: NestedFloatNullableFilter | number | null isSet?: boolean } export type CommentCreateWithoutPostInput = { id?: string comment: string } export type CommentUncheckedCreateWithoutPostInput = { id?: string comment: string } export type CommentCreateOrConnectWithoutPostInput = { where: CommentWhereUniqueInput create: XOR } export type CommentCreateManyPostInputEnvelope = { data: Enumerable } export type UserCreateWithoutPostsInput = { id?: string email: string age?: number | null address: XOR } export type UserUncheckedCreateWithoutPostsInput = { id?: string email: string age?: number | null address: XOR } export type UserCreateOrConnectWithoutPostsInput = { where: UserWhereUniqueInput create: XOR } export type CommentUpsertWithWhereUniqueWithoutPostInput = { where: CommentWhereUniqueInput update: XOR create: XOR } export type CommentUpdateWithWhereUniqueWithoutPostInput = { where: CommentWhereUniqueInput data: XOR } export type CommentUpdateManyWithWhereWithoutPostInput = { where: CommentScalarWhereInput data: XOR } export type CommentScalarWhereInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable id?: StringFilter | string postId?: StringFilter | string comment?: StringFilter | string } export type UserUpsertWithoutPostsInput = { update: XOR create: XOR } export type UserUpdateWithoutPostsInput = { email?: StringFieldUpdateOperationsInput | string age?: NullableIntFieldUpdateOperationsInput | number | null address?: XOR } export type UserUncheckedUpdateWithoutPostsInput = { email?: StringFieldUpdateOperationsInput | string age?: NullableIntFieldUpdateOperationsInput | number | null address?: XOR } export type PostCreateWithoutCommentsInput = { id?: string slug: string title: string body: string author: UserCreateNestedOneWithoutPostsInput } export type PostUncheckedCreateWithoutCommentsInput = { id?: string slug: string title: string body: string authorId: string } export type PostCreateOrConnectWithoutCommentsInput = { where: PostWhereUniqueInput create: XOR } export type PostUpsertWithoutCommentsInput = { update: XOR create: XOR } export type PostUpdateWithoutCommentsInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string author?: UserUpdateOneRequiredWithoutPostsNestedInput } export type PostUncheckedUpdateWithoutCommentsInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string authorId?: StringFieldUpdateOperationsInput | string } export type PostCreateWithoutAuthorInput = { id?: string slug: string title: string body: string comments?: CommentCreateNestedManyWithoutPostInput } export type PostUncheckedCreateWithoutAuthorInput = { id?: string slug: string title: string body: string comments?: CommentUncheckedCreateNestedManyWithoutPostInput } export type PostCreateOrConnectWithoutAuthorInput = { where: PostWhereUniqueInput create: XOR } export type PostCreateManyAuthorInputEnvelope = { data: Enumerable } export type UserAddressUpdateInput = { street?: StringFieldUpdateOperationsInput | string number?: NullableIntFieldUpdateOperationsInput | number | null city?: StringFieldUpdateOperationsInput | string } export type PostUpsertWithWhereUniqueWithoutAuthorInput = { where: PostWhereUniqueInput update: XOR create: XOR } export type PostUpdateWithWhereUniqueWithoutAuthorInput = { where: PostWhereUniqueInput data: XOR } export type PostUpdateManyWithWhereWithoutAuthorInput = { where: PostScalarWhereInput data: XOR } export type PostScalarWhereInput = { AND?: Enumerable OR?: Enumerable NOT?: Enumerable id?: StringFilter | string slug?: StringFilter | string title?: StringFilter | string body?: StringFilter | string authorId?: StringFilter | string } export type CommentCreateManyPostInput = { id?: string comment: string } export type CommentUpdateWithoutPostInput = { comment?: StringFieldUpdateOperationsInput | string } export type CommentUncheckedUpdateWithoutPostInput = { comment?: StringFieldUpdateOperationsInput | string } export type CommentUncheckedUpdateManyWithoutCommentsInput = { comment?: StringFieldUpdateOperationsInput | string } export type PostCreateManyAuthorInput = { id?: string slug: string title: string body: string } export type PostUpdateWithoutAuthorInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string comments?: CommentUpdateManyWithoutPostNestedInput } export type PostUncheckedUpdateWithoutAuthorInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string comments?: CommentUncheckedUpdateManyWithoutPostNestedInput } export type PostUncheckedUpdateManyWithoutPostsInput = { slug?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string body?: StringFieldUpdateOperationsInput | string } /** * Batch Payload for updateMany & deleteMany & createMany */ export type BatchPayload = { count: number } /** * DMMF */ export const dmmf: runtime.BaseDMMF }