8275 lines
241 KiB
TypeScript
8275 lines
241 KiB
TypeScript
|
|
/**
|
|
* Client
|
|
**/
|
|
|
|
import * as runtime from '@prisma/client/runtime/index';
|
|
declare const prisma: unique symbol
|
|
export type PrismaPromise<A> = Promise<A> & {[prisma]: true}
|
|
type UnwrapPromise<P extends any> = P extends Promise<infer R> ? R : P
|
|
type UnwrapTuple<Tuple extends readonly unknown[]> = {
|
|
[K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise<infer X> ? X : UnwrapPromise<Tuple[K]> : UnwrapPromise<Tuple[K]>
|
|
};
|
|
|
|
|
|
/**
|
|
* Model User
|
|
*
|
|
*/
|
|
export type User = {
|
|
id: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
serverId: string | null
|
|
}
|
|
|
|
/**
|
|
* Model Server
|
|
*
|
|
*/
|
|
export type Server = {
|
|
id: string
|
|
name: string
|
|
}
|
|
|
|
/**
|
|
* Model Room
|
|
*
|
|
*/
|
|
export type Room = {
|
|
id: string
|
|
name: string
|
|
}
|
|
|
|
/**
|
|
* Model Message
|
|
*
|
|
*/
|
|
export type Message = {
|
|
id: string
|
|
body: string
|
|
userId: string
|
|
}
|
|
|
|
/**
|
|
* Model Session
|
|
*
|
|
*/
|
|
export type Session = {
|
|
id: string
|
|
token: string
|
|
userId: string
|
|
}
|
|
|
|
/**
|
|
* Model ExpiredSession
|
|
*
|
|
*/
|
|
export type ExpiredSession = {
|
|
id: string
|
|
token: string
|
|
}
|
|
|
|
|
|
/**
|
|
* ## Prisma Client ʲˢ
|
|
*
|
|
* Type-safe database client for TypeScript & Node.js
|
|
* @example
|
|
* ```
|
|
* const prisma = new PrismaClient()
|
|
* // Fetch zero or more Users
|
|
* const users = await prisma.user.findMany()
|
|
* ```
|
|
*
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
*/
|
|
export class PrismaClient<
|
|
T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
|
|
U = 'log' extends keyof T ? T['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<T['log']> : 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 Users
|
|
* const users = await prisma.user.findMany()
|
|
* ```
|
|
*
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
*/
|
|
|
|
constructor(optionsArg ?: Prisma.Subset<T, Prisma.PrismaClientOptions>);
|
|
$on<V extends (U | 'beforeExit')>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => Promise<void> : Prisma.LogEvent) => void): void;
|
|
|
|
/**
|
|
* Connect with the database
|
|
*/
|
|
$connect(): Promise<void>;
|
|
|
|
/**
|
|
* Disconnect from the database
|
|
*/
|
|
$disconnect(): Promise<void>;
|
|
|
|
/**
|
|
* Add a middleware
|
|
*/
|
|
$use(cb: Prisma.Middleware): void
|
|
|
|
/**
|
|
* Executes a prepared raw query and returns the number of affected rows.
|
|
* @example
|
|
* ```
|
|
* const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
*/
|
|
$executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): PrismaPromise<number>;
|
|
|
|
/**
|
|
* Executes a raw query and returns the number of affected rows.
|
|
* Susceptible to SQL injections, see documentation.
|
|
* @example
|
|
* ```
|
|
* const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
*/
|
|
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): PrismaPromise<number>;
|
|
|
|
/**
|
|
* Performs a prepared raw query and returns the `SELECT` data.
|
|
* @example
|
|
* ```
|
|
* const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
*/
|
|
$queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): PrismaPromise<T>;
|
|
|
|
/**
|
|
* Performs a raw query and returns the `SELECT` data.
|
|
* Susceptible to SQL injections, see documentation.
|
|
* @example
|
|
* ```
|
|
* const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
*/
|
|
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): PrismaPromise<T>;
|
|
|
|
/**
|
|
* 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<P extends PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): Promise<UnwrapTuple<P>>;
|
|
|
|
$transaction<R>(fn: (prisma: Prisma.TransactionClient) => Promise<R>, options?: {maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel}): Promise<R>;
|
|
|
|
/**
|
|
* `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<GlobalReject>;
|
|
|
|
/**
|
|
* `prisma.server`: Exposes CRUD operations for the **Server** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Servers
|
|
* const servers = await prisma.server.findMany()
|
|
* ```
|
|
*/
|
|
get server(): Prisma.ServerDelegate<GlobalReject>;
|
|
|
|
/**
|
|
* `prisma.room`: Exposes CRUD operations for the **Room** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Rooms
|
|
* const rooms = await prisma.room.findMany()
|
|
* ```
|
|
*/
|
|
get room(): Prisma.RoomDelegate<GlobalReject>;
|
|
|
|
/**
|
|
* `prisma.message`: Exposes CRUD operations for the **Message** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Messages
|
|
* const messages = await prisma.message.findMany()
|
|
* ```
|
|
*/
|
|
get message(): Prisma.MessageDelegate<GlobalReject>;
|
|
|
|
/**
|
|
* `prisma.session`: Exposes CRUD operations for the **Session** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Sessions
|
|
* const sessions = await prisma.session.findMany()
|
|
* ```
|
|
*/
|
|
get session(): Prisma.SessionDelegate<GlobalReject>;
|
|
|
|
/**
|
|
* `prisma.expiredSession`: Exposes CRUD operations for the **ExpiredSession** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more ExpiredSessions
|
|
* const expiredSessions = await prisma.expiredSession.findMany()
|
|
* ```
|
|
*/
|
|
get expiredSession(): Prisma.ExpiredSessionDelegate<GlobalReject>;
|
|
}
|
|
|
|
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<T> = runtime.Metric<T>
|
|
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<JsonValue> {}
|
|
|
|
/**
|
|
* 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<InputJsonValue | null> {}
|
|
|
|
/**
|
|
* 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, S, U> = 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<any>> = T extends PromiseLike<infer U> ? U : T;
|
|
|
|
/**
|
|
* Get the return type of a function which returns a Promise.
|
|
*/
|
|
export type PromiseReturnType<T extends (...args: any) => Promise<any>> = PromiseType<ReturnType<T>>
|
|
|
|
/**
|
|
* From T, pick a set of properties whose keys are in the union K
|
|
*/
|
|
type Prisma__Pick<T, K extends keyof T> = {
|
|
[P in K]: T[P];
|
|
};
|
|
|
|
|
|
export type Enumerable<T> = T | Array<T>;
|
|
|
|
export type RequiredKeys<T> = {
|
|
[K in keyof T]-?: {} extends Prisma__Pick<T, K> ? never : K
|
|
}[keyof T]
|
|
|
|
export type TruthyKeys<T> = keyof {
|
|
[K in keyof T as T[K] extends false | undefined | null ? never : K]: K
|
|
}
|
|
|
|
export type TrueKeys<T> = TruthyKeys<Prisma__Pick<T, RequiredKeys<T>>>
|
|
|
|
/**
|
|
* Subset
|
|
* @desc From `T` pick properties that exist in `U`. Simple version of Intersection
|
|
*/
|
|
export type Subset<T, U> = {
|
|
[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<T, U> = {
|
|
[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<T, U, K> = {
|
|
[key in keyof T]: key extends keyof U ? T[key] : never
|
|
} &
|
|
K
|
|
|
|
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: 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, U> =
|
|
T extends object ?
|
|
U extends object ?
|
|
(Without<T, U> & U) | (Without<U, T> & T)
|
|
: U : T
|
|
|
|
|
|
/**
|
|
* Is T a Record?
|
|
*/
|
|
type IsObject<T extends any> = T extends Array<any>
|
|
? 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 unknown> = T extends Array<infer U> ? U : T
|
|
|
|
/**
|
|
* From ts-toolbelt
|
|
*/
|
|
|
|
type __Either<O extends object, K extends Key> = Omit<O, K> &
|
|
{
|
|
// Merge all but K
|
|
[P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
|
|
}[K]
|
|
|
|
type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>
|
|
|
|
type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>
|
|
|
|
type _Either<
|
|
O extends object,
|
|
K extends Key,
|
|
strict extends Boolean
|
|
> = {
|
|
1: EitherStrict<O, K>
|
|
0: EitherLoose<O, K>
|
|
}[strict]
|
|
|
|
type Either<
|
|
O extends object,
|
|
K extends Key,
|
|
strict extends Boolean = 1
|
|
> = O extends unknown ? _Either<O, K, strict> : never
|
|
|
|
export type Union = any
|
|
|
|
type PatchUndefined<O extends object, O1 extends object> = {
|
|
[K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
|
|
} & {}
|
|
|
|
/** Helper Types for "Merge" **/
|
|
export type IntersectOf<U extends Union> = (
|
|
U extends unknown ? (k: U) => void : never
|
|
) extends (k: infer I) => void
|
|
? I
|
|
: never
|
|
|
|
export type Overwrite<O extends object, O1 extends object> = {
|
|
[K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
|
|
} & {};
|
|
|
|
type _Merge<U extends object> = IntersectOf<Overwrite<U, {
|
|
[K in keyof U]-?: At<U, K>;
|
|
}>>;
|
|
|
|
type Key = string | number | symbol;
|
|
type AtBasic<O extends object, K extends Key> = K extends keyof O ? O[K] : never;
|
|
type AtStrict<O extends object, K extends Key> = O[K & keyof O];
|
|
type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
|
|
export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
|
|
1: AtStrict<O, K>;
|
|
0: AtLoose<O, K>;
|
|
}[strict];
|
|
|
|
export type ComputeRaw<A extends any> = A extends Function ? A : {
|
|
[K in keyof A]: A[K];
|
|
} & {};
|
|
|
|
export type OptionalFlat<O> = {
|
|
[K in keyof O]?: O[K];
|
|
} & {};
|
|
|
|
type _Record<K extends keyof any, T> = {
|
|
[P in K]: T;
|
|
};
|
|
|
|
// cause typescript not to expand types and preserve names
|
|
type NoExpand<T> = T extends unknown ? T : never;
|
|
|
|
// this type assumes the passed object is entirely optional
|
|
type AtLeast<O extends object, K extends string> = 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, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;
|
|
|
|
export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
|
|
/** End Helper Types for "Merge" **/
|
|
|
|
export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;
|
|
|
|
/**
|
|
A [[Boolean]]
|
|
*/
|
|
export type Boolean = True | False
|
|
|
|
// /**
|
|
// 1
|
|
// */
|
|
export type True = 1
|
|
|
|
/**
|
|
0
|
|
*/
|
|
export type False = 0
|
|
|
|
export type Not<B extends Boolean> = {
|
|
0: 1
|
|
1: 0
|
|
}[B]
|
|
|
|
export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
|
|
? 0 // anything `never` is false
|
|
: A1 extends A2
|
|
? 1
|
|
: 0
|
|
|
|
export type Has<U extends Union, U1 extends Union> = Not<
|
|
Extends<Exclude<U1, U>, U1>
|
|
>
|
|
|
|
export type Or<B1 extends Boolean, B2 extends Boolean> = {
|
|
0: {
|
|
0: 0
|
|
1: 1
|
|
}
|
|
1: {
|
|
0: 1
|
|
1: 1
|
|
}
|
|
}[B1][B2]
|
|
|
|
export type Keys<U extends Union> = U extends unknown ? keyof U : never
|
|
|
|
type Exact<A, W = unknown> =
|
|
W extends unknown ? A extends Narrowable ? Cast<A, W> : Cast<
|
|
{[K in keyof A]: K extends keyof W ? Exact<A[K], W[K]> : never},
|
|
{[K in keyof W]: K extends keyof A ? Exact<A[K], W[K]> : W[K]}>
|
|
: never;
|
|
|
|
type Narrowable = string | number | boolean | bigint;
|
|
|
|
type Cast<A, B> = A extends B ? A : B;
|
|
|
|
export const type: unique symbol;
|
|
|
|
export function validator<V>(): <S>(select: Exact<S, V>) => S;
|
|
|
|
/**
|
|
* Used by group by
|
|
*/
|
|
|
|
export type GetScalarType<T, O> = O extends object ? {
|
|
[P in keyof T]: P extends keyof O
|
|
? O[P]
|
|
: never
|
|
} : never
|
|
|
|
type FieldPaths<
|
|
T,
|
|
U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
|
|
> = IsObject<T> extends True ? U : T
|
|
|
|
type GetHavingFields<T> = {
|
|
[K in keyof T]: Or<
|
|
Or<Extends<'OR', K>, 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<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
|
|
: never
|
|
: {} extends FieldPaths<T[K]>
|
|
? never
|
|
: K
|
|
}[keyof T]
|
|
|
|
/**
|
|
* Convert tuple to union
|
|
*/
|
|
type _TupleToUnion<T> = T extends (infer E)[] ? E : never
|
|
type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
|
|
type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T
|
|
|
|
/**
|
|
* Like `Pick`, but with an array
|
|
*/
|
|
type PickArray<T, K extends Array<keyof T>> = Prisma__Pick<T, TupleToUnion<K>>
|
|
|
|
/**
|
|
* Exclude all keys with underscores
|
|
*/
|
|
type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T
|
|
|
|
|
|
export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>
|
|
|
|
type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>
|
|
|
|
class PrismaClientFetcher {
|
|
private readonly prisma;
|
|
private readonly debug;
|
|
private readonly hooks?;
|
|
constructor(prisma: PrismaClient<any, any>, debug?: boolean, hooks?: Hooks | undefined);
|
|
request<T>(document: any, dataPath?: string[], rootField?: string, typeName?: string, isList?: boolean, callsite?: string): Promise<T>;
|
|
sanitizeMessage(message: string): string;
|
|
protected unpack(document: any, data: any, path: string[], rootField?: string, isList?: boolean): any;
|
|
}
|
|
|
|
export const ModelName: {
|
|
User: 'User',
|
|
Server: 'Server',
|
|
Room: 'Room',
|
|
Message: 'Message',
|
|
Session: 'Session',
|
|
ExpiredSession: 'ExpiredSession'
|
|
};
|
|
|
|
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> = 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<LocalRejectSettings>
|
|
: GlobalRejectSettings extends RejectPerOperation
|
|
? Action extends keyof GlobalRejectSettings
|
|
? GlobalRejectSettings[Action] extends RejectOnNotFound
|
|
? IsReject<GlobalRejectSettings[Action]>
|
|
: GlobalRejectSettings[Action] extends RejectPerModel
|
|
? Model extends keyof GlobalRejectSettings[Action]
|
|
? IsReject<GlobalRejectSettings[Action][Model]>
|
|
: False
|
|
: False
|
|
: False
|
|
: IsReject<GlobalRejectSettings>
|
|
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<LogLevel | LogDefinition>
|
|
}
|
|
|
|
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 LogLevel | LogDefinition> = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never
|
|
export type GetEvents<T extends any> = T extends Array<LogLevel | LogDefinition> ?
|
|
GetLogType<T[0]> | GetLogType<T[1]> | GetLogType<T[2]> | GetLogType<T[3]>
|
|
: 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<T = any> = (
|
|
params: MiddlewareParams,
|
|
next: (params: MiddlewareParams) => Promise<T>,
|
|
) => Promise<T>
|
|
|
|
// tested in getLogLevel.test.ts
|
|
export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | undefined;
|
|
|
|
/**
|
|
* `PrismaClient` proxy available in interactive transactions.
|
|
*/
|
|
export type TransactionClient = Omit<Prisma.DefaultPrismaClient, '$connect' | '$disconnect' | '$on' | '$transaction' | '$use'>
|
|
|
|
export type Datasource = {
|
|
url?: string
|
|
}
|
|
|
|
/**
|
|
* Count Types
|
|
*/
|
|
|
|
|
|
/**
|
|
* Count Type UserCountOutputType
|
|
*/
|
|
|
|
|
|
export type UserCountOutputType = {
|
|
Server: number
|
|
Messages: number
|
|
Session: number
|
|
}
|
|
|
|
export type UserCountOutputTypeSelect = {
|
|
Server?: boolean
|
|
Messages?: boolean
|
|
Session?: boolean
|
|
}
|
|
|
|
export type UserCountOutputTypeGetPayload<S extends boolean | null | undefined | UserCountOutputTypeArgs> =
|
|
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<S['select']>]:
|
|
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
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Count Type ServerCountOutputType
|
|
*/
|
|
|
|
|
|
export type ServerCountOutputType = {
|
|
participants: number
|
|
}
|
|
|
|
export type ServerCountOutputTypeSelect = {
|
|
participants?: boolean
|
|
}
|
|
|
|
export type ServerCountOutputTypeGetPayload<S extends boolean | null | undefined | ServerCountOutputTypeArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? ServerCountOutputType :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (ServerCountOutputTypeArgs)
|
|
? ServerCountOutputType
|
|
: S extends { select: any } & (ServerCountOutputTypeArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends keyof ServerCountOutputType ? ServerCountOutputType[P] : never
|
|
}
|
|
: ServerCountOutputType
|
|
|
|
|
|
|
|
|
|
// Custom InputTypes
|
|
|
|
/**
|
|
* ServerCountOutputType without action
|
|
*/
|
|
export type ServerCountOutputTypeArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ServerCountOutputType
|
|
*
|
|
**/
|
|
select?: ServerCountOutputTypeSelect | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Models
|
|
*/
|
|
|
|
/**
|
|
* Model User
|
|
*/
|
|
|
|
|
|
export type AggregateUser = {
|
|
_count: UserCountAggregateOutputType | null
|
|
_min: UserMinAggregateOutputType | null
|
|
_max: UserMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type UserMinAggregateOutputType = {
|
|
id: string | null
|
|
email: string | null
|
|
username: string | null
|
|
passwordhash: string | null
|
|
serverId: string | null
|
|
}
|
|
|
|
export type UserMaxAggregateOutputType = {
|
|
id: string | null
|
|
email: string | null
|
|
username: string | null
|
|
passwordhash: string | null
|
|
serverId: string | null
|
|
}
|
|
|
|
export type UserCountAggregateOutputType = {
|
|
id: number
|
|
email: number
|
|
username: number
|
|
passwordhash: number
|
|
serverId: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type UserMinAggregateInputType = {
|
|
id?: true
|
|
email?: true
|
|
username?: true
|
|
passwordhash?: true
|
|
serverId?: true
|
|
}
|
|
|
|
export type UserMaxAggregateInputType = {
|
|
id?: true
|
|
email?: true
|
|
username?: true
|
|
passwordhash?: true
|
|
serverId?: true
|
|
}
|
|
|
|
export type UserCountAggregateInputType = {
|
|
id?: true
|
|
email?: true
|
|
username?: true
|
|
passwordhash?: true
|
|
serverId?: 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<UserOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*
|
|
**/
|
|
cursor?: UserWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Users from the position of the cursor.
|
|
*
|
|
**/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` Users.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Users
|
|
**/
|
|
_count?: true | UserCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: UserMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: UserMaxAggregateInputType
|
|
}
|
|
|
|
export type GetUserAggregateType<T extends UserAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateUser]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateUser[P]>
|
|
: GetScalarType<T[P], AggregateUser[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type UserGroupByArgs = {
|
|
where?: UserWhereInput
|
|
orderBy?: Enumerable<UserOrderByWithAggregationInput>
|
|
by: Array<UserScalarFieldEnum>
|
|
having?: UserScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: UserCountAggregateInputType | true
|
|
_min?: UserMinAggregateInputType
|
|
_max?: UserMaxAggregateInputType
|
|
}
|
|
|
|
|
|
export type UserGroupByOutputType = {
|
|
id: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
serverId: string | null
|
|
_count: UserCountAggregateOutputType | null
|
|
_min: UserMinAggregateOutputType | null
|
|
_max: UserMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetUserGroupByPayload<T extends UserGroupByArgs> = PrismaPromise<
|
|
Array<
|
|
PickArray<UserGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], UserGroupByOutputType[P]>
|
|
: GetScalarType<T[P], UserGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type UserSelect = {
|
|
id?: boolean
|
|
email?: boolean
|
|
username?: boolean
|
|
passwordhash?: boolean
|
|
Server?: boolean | UserServerArgs
|
|
serverId?: boolean
|
|
Messages?: boolean | UserMessagesArgs
|
|
Session?: boolean | UserSessionArgs
|
|
_count?: boolean | UserCountOutputTypeArgs
|
|
}
|
|
|
|
|
|
export type UserInclude = {
|
|
Server?: boolean | UserServerArgs
|
|
Messages?: boolean | UserMessagesArgs
|
|
Session?: boolean | UserSessionArgs
|
|
_count?: boolean | UserCountOutputTypeArgs
|
|
}
|
|
|
|
export type UserGetPayload<S extends boolean | null | undefined | UserArgs> =
|
|
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<S['include']>]:
|
|
P extends 'Server' ? Array < ServerGetPayload<S['include'][P]>> :
|
|
P extends 'Messages' ? Array < MessageGetPayload<S['include'][P]>> :
|
|
P extends 'Session' ? Array < SessionGetPayload<S['include'][P]>> :
|
|
P extends '_count' ? UserCountOutputTypeGetPayload<S['include'][P]> : never
|
|
}
|
|
: S extends { select: any } & (UserArgs | UserFindManyArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends 'Server' ? Array < ServerGetPayload<S['select'][P]>> :
|
|
P extends 'Messages' ? Array < MessageGetPayload<S['select'][P]>> :
|
|
P extends 'Session' ? Array < SessionGetPayload<S['select'][P]>> :
|
|
P extends '_count' ? UserCountOutputTypeGetPayload<S['select'][P]> : P extends keyof User ? User[P] : never
|
|
}
|
|
: User
|
|
|
|
|
|
type UserCountArgs = Merge<
|
|
Omit<UserFindManyArgs, 'select' | 'include'> & {
|
|
select?: UserCountAggregateInputType | true
|
|
}
|
|
>
|
|
|
|
export interface UserDelegate<GlobalRejectSettings extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined> {
|
|
/**
|
|
* 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<T extends UserFindUniqueArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args: SelectSubset<T, UserFindUniqueArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'User'> extends True ? Prisma__UserClient<UserGetPayload<T>> : Prisma__UserClient<UserGetPayload<T> | 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<T extends UserFindUniqueOrThrowArgs>(
|
|
args?: SelectSubset<T, UserFindUniqueOrThrowArgs>
|
|
): Prisma__UserClient<UserGetPayload<T>>
|
|
|
|
/**
|
|
* 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<T extends UserFindFirstArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args?: SelectSubset<T, UserFindFirstArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'User'> extends True ? Prisma__UserClient<UserGetPayload<T>> : Prisma__UserClient<UserGetPayload<T> | 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<T extends UserFindFirstOrThrowArgs>(
|
|
args?: SelectSubset<T, UserFindFirstOrThrowArgs>
|
|
): Prisma__UserClient<UserGetPayload<T>>
|
|
|
|
/**
|
|
* 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<T extends UserFindManyArgs>(
|
|
args?: SelectSubset<T, UserFindManyArgs>
|
|
): PrismaPromise<Array<UserGetPayload<T>>>
|
|
|
|
/**
|
|
* 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<T extends UserCreateArgs>(
|
|
args: SelectSubset<T, UserCreateArgs>
|
|
): Prisma__UserClient<UserGetPayload<T>>
|
|
|
|
/**
|
|
* 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<T extends UserCreateManyArgs>(
|
|
args?: SelectSubset<T, UserCreateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* 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<T extends UserDeleteArgs>(
|
|
args: SelectSubset<T, UserDeleteArgs>
|
|
): Prisma__UserClient<UserGetPayload<T>>
|
|
|
|
/**
|
|
* 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<T extends UserUpdateArgs>(
|
|
args: SelectSubset<T, UserUpdateArgs>
|
|
): Prisma__UserClient<UserGetPayload<T>>
|
|
|
|
/**
|
|
* 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<T extends UserDeleteManyArgs>(
|
|
args?: SelectSubset<T, UserDeleteManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* 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<T extends UserUpdateManyArgs>(
|
|
args: SelectSubset<T, UserUpdateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* 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<T extends UserUpsertArgs>(
|
|
args: SelectSubset<T, UserUpsertArgs>
|
|
): Prisma__UserClient<UserGetPayload<T>>
|
|
|
|
/**
|
|
* 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<T extends UserCountArgs>(
|
|
args?: Subset<T, UserCountArgs>,
|
|
): PrismaPromise<
|
|
T extends _Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], UserCountAggregateOutputType>
|
|
: 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<T extends UserAggregateArgs>(args: Subset<T, UserAggregateArgs>): PrismaPromise<GetUserAggregateType<T>>
|
|
|
|
/**
|
|
* 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<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: UserGroupByArgs['orderBy'] }
|
|
: { orderBy?: UserGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends TupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T, UserGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserGroupByPayload<T> : PrismaPromise<InputErrors>
|
|
|
|
}
|
|
|
|
/**
|
|
* 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<T, Null = never> implements PrismaPromise<T> {
|
|
[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';
|
|
|
|
Server<T extends UserServerArgs= {}>(args?: Subset<T, UserServerArgs>): PrismaPromise<Array<ServerGetPayload<T>>| Null>;
|
|
|
|
Messages<T extends UserMessagesArgs= {}>(args?: Subset<T, UserMessagesArgs>): PrismaPromise<Array<MessageGetPayload<T>>| Null>;
|
|
|
|
Session<T extends UserSessionArgs= {}>(args?: Subset<T, UserSessionArgs>): PrismaPromise<Array<SessionGetPayload<T>>| 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
/**
|
|
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
/**
|
|
* 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<T>;
|
|
}
|
|
|
|
|
|
|
|
// 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<UserOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Users.
|
|
*
|
|
**/
|
|
cursor?: UserWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Users from the position of the cursor.
|
|
*
|
|
**/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` Users.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Users.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<UserScalarFieldEnum>
|
|
}
|
|
|
|
/**
|
|
* 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<UserOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Users.
|
|
*
|
|
**/
|
|
cursor?: UserWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Users from the position of the cursor.
|
|
*
|
|
**/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` Users.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Users.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<UserScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* User findMany
|
|
*/
|
|
export type UserFindManyArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*
|
|
**/
|
|
select?: UserSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: UserInclude | null
|
|
/**
|
|
* Filter, which Users to fetch.
|
|
*
|
|
**/
|
|
where?: UserWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Users to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<UserOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Users.
|
|
*
|
|
**/
|
|
cursor?: UserWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Users from the position of the cursor.
|
|
*
|
|
**/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` Users.
|
|
*
|
|
**/
|
|
skip?: number
|
|
distinct?: Enumerable<UserScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* User create
|
|
*/
|
|
export type UserCreateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*
|
|
**/
|
|
select?: UserSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: UserInclude | null
|
|
/**
|
|
* The data needed to create a User.
|
|
*
|
|
**/
|
|
data: XOR<UserCreateInput, UserUncheckedCreateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* User createMany
|
|
*/
|
|
export type UserCreateManyArgs = {
|
|
/**
|
|
* The data used to create many Users.
|
|
*
|
|
**/
|
|
data: Enumerable<UserCreateManyInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
|
|
/**
|
|
* User update
|
|
*/
|
|
export type UserUpdateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*
|
|
**/
|
|
select?: UserSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: UserInclude | null
|
|
/**
|
|
* The data needed to update a User.
|
|
*
|
|
**/
|
|
data: XOR<UserUpdateInput, UserUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which User to update.
|
|
*
|
|
**/
|
|
where: UserWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* User updateMany
|
|
*/
|
|
export type UserUpdateManyArgs = {
|
|
/**
|
|
* The data used to update Users.
|
|
*
|
|
**/
|
|
data: XOR<UserUpdateManyMutationInput, UserUncheckedUpdateManyInput>
|
|
/**
|
|
* 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<UserCreateInput, UserUncheckedCreateInput>
|
|
/**
|
|
* In case the User was found with the provided `where` argument, update it with this data.
|
|
*
|
|
**/
|
|
update: XOR<UserUpdateInput, UserUncheckedUpdateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* 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.Server
|
|
*/
|
|
export type UserServerArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
where?: ServerWhereInput
|
|
orderBy?: Enumerable<ServerOrderByWithRelationInput>
|
|
cursor?: ServerWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: Enumerable<ServerScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* User.Messages
|
|
*/
|
|
export type UserMessagesArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
where?: MessageWhereInput
|
|
orderBy?: Enumerable<MessageOrderByWithRelationInput>
|
|
cursor?: MessageWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: Enumerable<MessageScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* User.Session
|
|
*/
|
|
export type UserSessionArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
where?: SessionWhereInput
|
|
orderBy?: Enumerable<SessionOrderByWithRelationInput>
|
|
cursor?: SessionWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: Enumerable<SessionScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* 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
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Model Server
|
|
*/
|
|
|
|
|
|
export type AggregateServer = {
|
|
_count: ServerCountAggregateOutputType | null
|
|
_min: ServerMinAggregateOutputType | null
|
|
_max: ServerMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type ServerMinAggregateOutputType = {
|
|
id: string | null
|
|
name: string | null
|
|
}
|
|
|
|
export type ServerMaxAggregateOutputType = {
|
|
id: string | null
|
|
name: string | null
|
|
}
|
|
|
|
export type ServerCountAggregateOutputType = {
|
|
id: number
|
|
name: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type ServerMinAggregateInputType = {
|
|
id?: true
|
|
name?: true
|
|
}
|
|
|
|
export type ServerMaxAggregateInputType = {
|
|
id?: true
|
|
name?: true
|
|
}
|
|
|
|
export type ServerCountAggregateInputType = {
|
|
id?: true
|
|
name?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type ServerAggregateArgs = {
|
|
/**
|
|
* Filter which Server to aggregate.
|
|
*
|
|
**/
|
|
where?: ServerWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Servers to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<ServerOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*
|
|
**/
|
|
cursor?: ServerWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Servers 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` Servers.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Servers
|
|
**/
|
|
_count?: true | ServerCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: ServerMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: ServerMaxAggregateInputType
|
|
}
|
|
|
|
export type GetServerAggregateType<T extends ServerAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateServer]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateServer[P]>
|
|
: GetScalarType<T[P], AggregateServer[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type ServerGroupByArgs = {
|
|
where?: ServerWhereInput
|
|
orderBy?: Enumerable<ServerOrderByWithAggregationInput>
|
|
by: Array<ServerScalarFieldEnum>
|
|
having?: ServerScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: ServerCountAggregateInputType | true
|
|
_min?: ServerMinAggregateInputType
|
|
_max?: ServerMaxAggregateInputType
|
|
}
|
|
|
|
|
|
export type ServerGroupByOutputType = {
|
|
id: string
|
|
name: string
|
|
_count: ServerCountAggregateOutputType | null
|
|
_min: ServerMinAggregateOutputType | null
|
|
_max: ServerMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetServerGroupByPayload<T extends ServerGroupByArgs> = PrismaPromise<
|
|
Array<
|
|
PickArray<ServerGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof ServerGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], ServerGroupByOutputType[P]>
|
|
: GetScalarType<T[P], ServerGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type ServerSelect = {
|
|
id?: boolean
|
|
name?: boolean
|
|
participants?: boolean | ServerParticipantsArgs
|
|
_count?: boolean | ServerCountOutputTypeArgs
|
|
}
|
|
|
|
|
|
export type ServerInclude = {
|
|
participants?: boolean | ServerParticipantsArgs
|
|
_count?: boolean | ServerCountOutputTypeArgs
|
|
}
|
|
|
|
export type ServerGetPayload<S extends boolean | null | undefined | ServerArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? Server :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (ServerArgs | ServerFindManyArgs)
|
|
? Server & {
|
|
[P in TruthyKeys<S['include']>]:
|
|
P extends 'participants' ? Array < UserGetPayload<S['include'][P]>> :
|
|
P extends '_count' ? ServerCountOutputTypeGetPayload<S['include'][P]> : never
|
|
}
|
|
: S extends { select: any } & (ServerArgs | ServerFindManyArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends 'participants' ? Array < UserGetPayload<S['select'][P]>> :
|
|
P extends '_count' ? ServerCountOutputTypeGetPayload<S['select'][P]> : P extends keyof Server ? Server[P] : never
|
|
}
|
|
: Server
|
|
|
|
|
|
type ServerCountArgs = Merge<
|
|
Omit<ServerFindManyArgs, 'select' | 'include'> & {
|
|
select?: ServerCountAggregateInputType | true
|
|
}
|
|
>
|
|
|
|
export interface ServerDelegate<GlobalRejectSettings extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined> {
|
|
/**
|
|
* Find zero or one Server that matches the filter.
|
|
* @param {ServerFindUniqueArgs} args - Arguments to find a Server
|
|
* @example
|
|
* // Get one Server
|
|
* const server = await prisma.server.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUnique<T extends ServerFindUniqueArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args: SelectSubset<T, ServerFindUniqueArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Server'> extends True ? Prisma__ServerClient<ServerGetPayload<T>> : Prisma__ServerClient<ServerGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find one Server that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {ServerFindUniqueOrThrowArgs} args - Arguments to find a Server
|
|
* @example
|
|
* // Get one Server
|
|
* const server = await prisma.server.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUniqueOrThrow<T extends ServerFindUniqueOrThrowArgs>(
|
|
args?: SelectSubset<T, ServerFindUniqueOrThrowArgs>
|
|
): Prisma__ServerClient<ServerGetPayload<T>>
|
|
|
|
/**
|
|
* Find the first Server 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 {ServerFindFirstArgs} args - Arguments to find a Server
|
|
* @example
|
|
* // Get one Server
|
|
* const server = await prisma.server.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirst<T extends ServerFindFirstArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args?: SelectSubset<T, ServerFindFirstArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Server'> extends True ? Prisma__ServerClient<ServerGetPayload<T>> : Prisma__ServerClient<ServerGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find the first Server 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 {ServerFindFirstOrThrowArgs} args - Arguments to find a Server
|
|
* @example
|
|
* // Get one Server
|
|
* const server = await prisma.server.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirstOrThrow<T extends ServerFindFirstOrThrowArgs>(
|
|
args?: SelectSubset<T, ServerFindFirstOrThrowArgs>
|
|
): Prisma__ServerClient<ServerGetPayload<T>>
|
|
|
|
/**
|
|
* Find zero or more Servers 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 {ServerFindManyArgs=} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Servers
|
|
* const servers = await prisma.server.findMany()
|
|
*
|
|
* // Get first 10 Servers
|
|
* const servers = await prisma.server.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const serverWithIdOnly = await prisma.server.findMany({ select: { id: true } })
|
|
*
|
|
**/
|
|
findMany<T extends ServerFindManyArgs>(
|
|
args?: SelectSubset<T, ServerFindManyArgs>
|
|
): PrismaPromise<Array<ServerGetPayload<T>>>
|
|
|
|
/**
|
|
* Create a Server.
|
|
* @param {ServerCreateArgs} args - Arguments to create a Server.
|
|
* @example
|
|
* // Create one Server
|
|
* const Server = await prisma.server.create({
|
|
* data: {
|
|
* // ... data to create a Server
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
create<T extends ServerCreateArgs>(
|
|
args: SelectSubset<T, ServerCreateArgs>
|
|
): Prisma__ServerClient<ServerGetPayload<T>>
|
|
|
|
/**
|
|
* Create many Servers.
|
|
* @param {ServerCreateManyArgs} args - Arguments to create many Servers.
|
|
* @example
|
|
* // Create many Servers
|
|
* const server = await prisma.server.createMany({
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
createMany<T extends ServerCreateManyArgs>(
|
|
args?: SelectSubset<T, ServerCreateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Delete a Server.
|
|
* @param {ServerDeleteArgs} args - Arguments to delete one Server.
|
|
* @example
|
|
* // Delete one Server
|
|
* const Server = await prisma.server.delete({
|
|
* where: {
|
|
* // ... filter to delete one Server
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
delete<T extends ServerDeleteArgs>(
|
|
args: SelectSubset<T, ServerDeleteArgs>
|
|
): Prisma__ServerClient<ServerGetPayload<T>>
|
|
|
|
/**
|
|
* Update one Server.
|
|
* @param {ServerUpdateArgs} args - Arguments to update one Server.
|
|
* @example
|
|
* // Update one Server
|
|
* const server = await prisma.server.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
update<T extends ServerUpdateArgs>(
|
|
args: SelectSubset<T, ServerUpdateArgs>
|
|
): Prisma__ServerClient<ServerGetPayload<T>>
|
|
|
|
/**
|
|
* Delete zero or more Servers.
|
|
* @param {ServerDeleteManyArgs} args - Arguments to filter Servers to delete.
|
|
* @example
|
|
* // Delete a few Servers
|
|
* const { count } = await prisma.server.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
deleteMany<T extends ServerDeleteManyArgs>(
|
|
args?: SelectSubset<T, ServerDeleteManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Servers.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ServerUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Servers
|
|
* const server = await prisma.server.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
updateMany<T extends ServerUpdateManyArgs>(
|
|
args: SelectSubset<T, ServerUpdateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Server.
|
|
* @param {ServerUpsertArgs} args - Arguments to update or create a Server.
|
|
* @example
|
|
* // Update or create a Server
|
|
* const server = await prisma.server.upsert({
|
|
* create: {
|
|
* // ... data to create a Server
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Server we want to update
|
|
* }
|
|
* })
|
|
**/
|
|
upsert<T extends ServerUpsertArgs>(
|
|
args: SelectSubset<T, ServerUpsertArgs>
|
|
): Prisma__ServerClient<ServerGetPayload<T>>
|
|
|
|
/**
|
|
* Count the number of Servers.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ServerCountArgs} args - Arguments to filter Servers to count.
|
|
* @example
|
|
* // Count the number of Servers
|
|
* const count = await prisma.server.count({
|
|
* where: {
|
|
* // ... the filter for the Servers we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends ServerCountArgs>(
|
|
args?: Subset<T, ServerCountArgs>,
|
|
): PrismaPromise<
|
|
T extends _Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], ServerCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Server.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ServerAggregateArgs} 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<T extends ServerAggregateArgs>(args: Subset<T, ServerAggregateArgs>): PrismaPromise<GetServerAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Server.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ServerGroupByArgs} 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 ServerGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: ServerGroupByArgs['orderBy'] }
|
|
: { orderBy?: ServerGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends TupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T, ServerGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetServerGroupByPayload<T> : PrismaPromise<InputErrors>
|
|
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Server.
|
|
* 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__ServerClient<T, Null = never> implements PrismaPromise<T> {
|
|
[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';
|
|
|
|
participants<T extends ServerParticipantsArgs= {}>(args?: Subset<T, ServerParticipantsArgs>): PrismaPromise<Array<UserGetPayload<T>>| 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
/**
|
|
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
/**
|
|
* 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<T>;
|
|
}
|
|
|
|
|
|
|
|
// Custom InputTypes
|
|
|
|
/**
|
|
* Server base type for findUnique actions
|
|
*/
|
|
export type ServerFindUniqueArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* Filter, which Server to fetch.
|
|
*
|
|
**/
|
|
where: ServerWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Server findUnique
|
|
*/
|
|
export interface ServerFindUniqueArgs extends ServerFindUniqueArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findUniqueOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Server findUniqueOrThrow
|
|
*/
|
|
export type ServerFindUniqueOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* Filter, which Server to fetch.
|
|
*
|
|
**/
|
|
where: ServerWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Server base type for findFirst actions
|
|
*/
|
|
export type ServerFindFirstArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* Filter, which Server to fetch.
|
|
*
|
|
**/
|
|
where?: ServerWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Servers to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<ServerOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Servers.
|
|
*
|
|
**/
|
|
cursor?: ServerWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Servers 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` Servers.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Servers.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<ServerScalarFieldEnum>
|
|
}
|
|
|
|
/**
|
|
* Server findFirst
|
|
*/
|
|
export interface ServerFindFirstArgs extends ServerFindFirstArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findFirstOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Server findFirstOrThrow
|
|
*/
|
|
export type ServerFindFirstOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* Filter, which Server to fetch.
|
|
*
|
|
**/
|
|
where?: ServerWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Servers to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<ServerOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Servers.
|
|
*
|
|
**/
|
|
cursor?: ServerWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Servers 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` Servers.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Servers.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<ServerScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Server findMany
|
|
*/
|
|
export type ServerFindManyArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* Filter, which Servers to fetch.
|
|
*
|
|
**/
|
|
where?: ServerWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Servers to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<ServerOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Servers.
|
|
*
|
|
**/
|
|
cursor?: ServerWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Servers 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` Servers.
|
|
*
|
|
**/
|
|
skip?: number
|
|
distinct?: Enumerable<ServerScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Server create
|
|
*/
|
|
export type ServerCreateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* The data needed to create a Server.
|
|
*
|
|
**/
|
|
data: XOR<ServerCreateInput, ServerUncheckedCreateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Server createMany
|
|
*/
|
|
export type ServerCreateManyArgs = {
|
|
/**
|
|
* The data used to create many Servers.
|
|
*
|
|
**/
|
|
data: Enumerable<ServerCreateManyInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
|
|
/**
|
|
* Server update
|
|
*/
|
|
export type ServerUpdateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* The data needed to update a Server.
|
|
*
|
|
**/
|
|
data: XOR<ServerUpdateInput, ServerUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Server to update.
|
|
*
|
|
**/
|
|
where: ServerWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Server updateMany
|
|
*/
|
|
export type ServerUpdateManyArgs = {
|
|
/**
|
|
* The data used to update Servers.
|
|
*
|
|
**/
|
|
data: XOR<ServerUpdateManyMutationInput, ServerUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Servers to update
|
|
*
|
|
**/
|
|
where?: ServerWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Server upsert
|
|
*/
|
|
export type ServerUpsertArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* The filter to search for the Server to update in case it exists.
|
|
*
|
|
**/
|
|
where: ServerWhereUniqueInput
|
|
/**
|
|
* In case the Server found by the `where` argument doesn't exist, create a new Server with this data.
|
|
*
|
|
**/
|
|
create: XOR<ServerCreateInput, ServerUncheckedCreateInput>
|
|
/**
|
|
* In case the Server was found with the provided `where` argument, update it with this data.
|
|
*
|
|
**/
|
|
update: XOR<ServerUpdateInput, ServerUncheckedUpdateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Server delete
|
|
*/
|
|
export type ServerDeleteArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
/**
|
|
* Filter which Server to delete.
|
|
*
|
|
**/
|
|
where: ServerWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Server deleteMany
|
|
*/
|
|
export type ServerDeleteManyArgs = {
|
|
/**
|
|
* Filter which Servers to delete
|
|
*
|
|
**/
|
|
where?: ServerWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Server.participants
|
|
*/
|
|
export type ServerParticipantsArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the User
|
|
*
|
|
**/
|
|
select?: UserSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: UserInclude | null
|
|
where?: UserWhereInput
|
|
orderBy?: Enumerable<UserOrderByWithRelationInput>
|
|
cursor?: UserWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: Enumerable<UserScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Server without action
|
|
*/
|
|
export type ServerArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Server
|
|
*
|
|
**/
|
|
select?: ServerSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: ServerInclude | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Model Room
|
|
*/
|
|
|
|
|
|
export type AggregateRoom = {
|
|
_count: RoomCountAggregateOutputType | null
|
|
_min: RoomMinAggregateOutputType | null
|
|
_max: RoomMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type RoomMinAggregateOutputType = {
|
|
id: string | null
|
|
name: string | null
|
|
}
|
|
|
|
export type RoomMaxAggregateOutputType = {
|
|
id: string | null
|
|
name: string | null
|
|
}
|
|
|
|
export type RoomCountAggregateOutputType = {
|
|
id: number
|
|
name: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type RoomMinAggregateInputType = {
|
|
id?: true
|
|
name?: true
|
|
}
|
|
|
|
export type RoomMaxAggregateInputType = {
|
|
id?: true
|
|
name?: true
|
|
}
|
|
|
|
export type RoomCountAggregateInputType = {
|
|
id?: true
|
|
name?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type RoomAggregateArgs = {
|
|
/**
|
|
* Filter which Room to aggregate.
|
|
*
|
|
**/
|
|
where?: RoomWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Rooms to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<RoomOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*
|
|
**/
|
|
cursor?: RoomWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Rooms 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` Rooms.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Rooms
|
|
**/
|
|
_count?: true | RoomCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: RoomMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: RoomMaxAggregateInputType
|
|
}
|
|
|
|
export type GetRoomAggregateType<T extends RoomAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateRoom]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateRoom[P]>
|
|
: GetScalarType<T[P], AggregateRoom[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type RoomGroupByArgs = {
|
|
where?: RoomWhereInput
|
|
orderBy?: Enumerable<RoomOrderByWithAggregationInput>
|
|
by: Array<RoomScalarFieldEnum>
|
|
having?: RoomScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: RoomCountAggregateInputType | true
|
|
_min?: RoomMinAggregateInputType
|
|
_max?: RoomMaxAggregateInputType
|
|
}
|
|
|
|
|
|
export type RoomGroupByOutputType = {
|
|
id: string
|
|
name: string
|
|
_count: RoomCountAggregateOutputType | null
|
|
_min: RoomMinAggregateOutputType | null
|
|
_max: RoomMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetRoomGroupByPayload<T extends RoomGroupByArgs> = PrismaPromise<
|
|
Array<
|
|
PickArray<RoomGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof RoomGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], RoomGroupByOutputType[P]>
|
|
: GetScalarType<T[P], RoomGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type RoomSelect = {
|
|
id?: boolean
|
|
name?: boolean
|
|
}
|
|
|
|
|
|
export type RoomGetPayload<S extends boolean | null | undefined | RoomArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? Room :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (RoomArgs | RoomFindManyArgs)
|
|
? Room
|
|
: S extends { select: any } & (RoomArgs | RoomFindManyArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends keyof Room ? Room[P] : never
|
|
}
|
|
: Room
|
|
|
|
|
|
type RoomCountArgs = Merge<
|
|
Omit<RoomFindManyArgs, 'select' | 'include'> & {
|
|
select?: RoomCountAggregateInputType | true
|
|
}
|
|
>
|
|
|
|
export interface RoomDelegate<GlobalRejectSettings extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined> {
|
|
/**
|
|
* Find zero or one Room that matches the filter.
|
|
* @param {RoomFindUniqueArgs} args - Arguments to find a Room
|
|
* @example
|
|
* // Get one Room
|
|
* const room = await prisma.room.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUnique<T extends RoomFindUniqueArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args: SelectSubset<T, RoomFindUniqueArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Room'> extends True ? Prisma__RoomClient<RoomGetPayload<T>> : Prisma__RoomClient<RoomGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find one Room that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {RoomFindUniqueOrThrowArgs} args - Arguments to find a Room
|
|
* @example
|
|
* // Get one Room
|
|
* const room = await prisma.room.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUniqueOrThrow<T extends RoomFindUniqueOrThrowArgs>(
|
|
args?: SelectSubset<T, RoomFindUniqueOrThrowArgs>
|
|
): Prisma__RoomClient<RoomGetPayload<T>>
|
|
|
|
/**
|
|
* Find the first Room 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 {RoomFindFirstArgs} args - Arguments to find a Room
|
|
* @example
|
|
* // Get one Room
|
|
* const room = await prisma.room.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirst<T extends RoomFindFirstArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args?: SelectSubset<T, RoomFindFirstArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Room'> extends True ? Prisma__RoomClient<RoomGetPayload<T>> : Prisma__RoomClient<RoomGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find the first Room 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 {RoomFindFirstOrThrowArgs} args - Arguments to find a Room
|
|
* @example
|
|
* // Get one Room
|
|
* const room = await prisma.room.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirstOrThrow<T extends RoomFindFirstOrThrowArgs>(
|
|
args?: SelectSubset<T, RoomFindFirstOrThrowArgs>
|
|
): Prisma__RoomClient<RoomGetPayload<T>>
|
|
|
|
/**
|
|
* Find zero or more Rooms 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 {RoomFindManyArgs=} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Rooms
|
|
* const rooms = await prisma.room.findMany()
|
|
*
|
|
* // Get first 10 Rooms
|
|
* const rooms = await prisma.room.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const roomWithIdOnly = await prisma.room.findMany({ select: { id: true } })
|
|
*
|
|
**/
|
|
findMany<T extends RoomFindManyArgs>(
|
|
args?: SelectSubset<T, RoomFindManyArgs>
|
|
): PrismaPromise<Array<RoomGetPayload<T>>>
|
|
|
|
/**
|
|
* Create a Room.
|
|
* @param {RoomCreateArgs} args - Arguments to create a Room.
|
|
* @example
|
|
* // Create one Room
|
|
* const Room = await prisma.room.create({
|
|
* data: {
|
|
* // ... data to create a Room
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
create<T extends RoomCreateArgs>(
|
|
args: SelectSubset<T, RoomCreateArgs>
|
|
): Prisma__RoomClient<RoomGetPayload<T>>
|
|
|
|
/**
|
|
* Create many Rooms.
|
|
* @param {RoomCreateManyArgs} args - Arguments to create many Rooms.
|
|
* @example
|
|
* // Create many Rooms
|
|
* const room = await prisma.room.createMany({
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
createMany<T extends RoomCreateManyArgs>(
|
|
args?: SelectSubset<T, RoomCreateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Delete a Room.
|
|
* @param {RoomDeleteArgs} args - Arguments to delete one Room.
|
|
* @example
|
|
* // Delete one Room
|
|
* const Room = await prisma.room.delete({
|
|
* where: {
|
|
* // ... filter to delete one Room
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
delete<T extends RoomDeleteArgs>(
|
|
args: SelectSubset<T, RoomDeleteArgs>
|
|
): Prisma__RoomClient<RoomGetPayload<T>>
|
|
|
|
/**
|
|
* Update one Room.
|
|
* @param {RoomUpdateArgs} args - Arguments to update one Room.
|
|
* @example
|
|
* // Update one Room
|
|
* const room = await prisma.room.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
update<T extends RoomUpdateArgs>(
|
|
args: SelectSubset<T, RoomUpdateArgs>
|
|
): Prisma__RoomClient<RoomGetPayload<T>>
|
|
|
|
/**
|
|
* Delete zero or more Rooms.
|
|
* @param {RoomDeleteManyArgs} args - Arguments to filter Rooms to delete.
|
|
* @example
|
|
* // Delete a few Rooms
|
|
* const { count } = await prisma.room.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
deleteMany<T extends RoomDeleteManyArgs>(
|
|
args?: SelectSubset<T, RoomDeleteManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Rooms.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {RoomUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Rooms
|
|
* const room = await prisma.room.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
updateMany<T extends RoomUpdateManyArgs>(
|
|
args: SelectSubset<T, RoomUpdateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Room.
|
|
* @param {RoomUpsertArgs} args - Arguments to update or create a Room.
|
|
* @example
|
|
* // Update or create a Room
|
|
* const room = await prisma.room.upsert({
|
|
* create: {
|
|
* // ... data to create a Room
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Room we want to update
|
|
* }
|
|
* })
|
|
**/
|
|
upsert<T extends RoomUpsertArgs>(
|
|
args: SelectSubset<T, RoomUpsertArgs>
|
|
): Prisma__RoomClient<RoomGetPayload<T>>
|
|
|
|
/**
|
|
* Count the number of Rooms.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {RoomCountArgs} args - Arguments to filter Rooms to count.
|
|
* @example
|
|
* // Count the number of Rooms
|
|
* const count = await prisma.room.count({
|
|
* where: {
|
|
* // ... the filter for the Rooms we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends RoomCountArgs>(
|
|
args?: Subset<T, RoomCountArgs>,
|
|
): PrismaPromise<
|
|
T extends _Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], RoomCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Room.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {RoomAggregateArgs} 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<T extends RoomAggregateArgs>(args: Subset<T, RoomAggregateArgs>): PrismaPromise<GetRoomAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Room.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {RoomGroupByArgs} 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 RoomGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: RoomGroupByArgs['orderBy'] }
|
|
: { orderBy?: RoomGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends TupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T, RoomGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRoomGroupByPayload<T> : PrismaPromise<InputErrors>
|
|
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Room.
|
|
* 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__RoomClient<T, Null = never> implements PrismaPromise<T> {
|
|
[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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
/**
|
|
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
/**
|
|
* 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<T>;
|
|
}
|
|
|
|
|
|
|
|
// Custom InputTypes
|
|
|
|
/**
|
|
* Room base type for findUnique actions
|
|
*/
|
|
export type RoomFindUniqueArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* Filter, which Room to fetch.
|
|
*
|
|
**/
|
|
where: RoomWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Room findUnique
|
|
*/
|
|
export interface RoomFindUniqueArgs extends RoomFindUniqueArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findUniqueOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Room findUniqueOrThrow
|
|
*/
|
|
export type RoomFindUniqueOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* Filter, which Room to fetch.
|
|
*
|
|
**/
|
|
where: RoomWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Room base type for findFirst actions
|
|
*/
|
|
export type RoomFindFirstArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* Filter, which Room to fetch.
|
|
*
|
|
**/
|
|
where?: RoomWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Rooms to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<RoomOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Rooms.
|
|
*
|
|
**/
|
|
cursor?: RoomWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Rooms 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` Rooms.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Rooms.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<RoomScalarFieldEnum>
|
|
}
|
|
|
|
/**
|
|
* Room findFirst
|
|
*/
|
|
export interface RoomFindFirstArgs extends RoomFindFirstArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findFirstOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Room findFirstOrThrow
|
|
*/
|
|
export type RoomFindFirstOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* Filter, which Room to fetch.
|
|
*
|
|
**/
|
|
where?: RoomWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Rooms to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<RoomOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Rooms.
|
|
*
|
|
**/
|
|
cursor?: RoomWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Rooms 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` Rooms.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Rooms.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<RoomScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Room findMany
|
|
*/
|
|
export type RoomFindManyArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* Filter, which Rooms to fetch.
|
|
*
|
|
**/
|
|
where?: RoomWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Rooms to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<RoomOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Rooms.
|
|
*
|
|
**/
|
|
cursor?: RoomWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Rooms 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` Rooms.
|
|
*
|
|
**/
|
|
skip?: number
|
|
distinct?: Enumerable<RoomScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Room create
|
|
*/
|
|
export type RoomCreateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* The data needed to create a Room.
|
|
*
|
|
**/
|
|
data: XOR<RoomCreateInput, RoomUncheckedCreateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Room createMany
|
|
*/
|
|
export type RoomCreateManyArgs = {
|
|
/**
|
|
* The data used to create many Rooms.
|
|
*
|
|
**/
|
|
data: Enumerable<RoomCreateManyInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
|
|
/**
|
|
* Room update
|
|
*/
|
|
export type RoomUpdateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* The data needed to update a Room.
|
|
*
|
|
**/
|
|
data: XOR<RoomUpdateInput, RoomUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Room to update.
|
|
*
|
|
**/
|
|
where: RoomWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Room updateMany
|
|
*/
|
|
export type RoomUpdateManyArgs = {
|
|
/**
|
|
* The data used to update Rooms.
|
|
*
|
|
**/
|
|
data: XOR<RoomUpdateManyMutationInput, RoomUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Rooms to update
|
|
*
|
|
**/
|
|
where?: RoomWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Room upsert
|
|
*/
|
|
export type RoomUpsertArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* The filter to search for the Room to update in case it exists.
|
|
*
|
|
**/
|
|
where: RoomWhereUniqueInput
|
|
/**
|
|
* In case the Room found by the `where` argument doesn't exist, create a new Room with this data.
|
|
*
|
|
**/
|
|
create: XOR<RoomCreateInput, RoomUncheckedCreateInput>
|
|
/**
|
|
* In case the Room was found with the provided `where` argument, update it with this data.
|
|
*
|
|
**/
|
|
update: XOR<RoomUpdateInput, RoomUncheckedUpdateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Room delete
|
|
*/
|
|
export type RoomDeleteArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
/**
|
|
* Filter which Room to delete.
|
|
*
|
|
**/
|
|
where: RoomWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Room deleteMany
|
|
*/
|
|
export type RoomDeleteManyArgs = {
|
|
/**
|
|
* Filter which Rooms to delete
|
|
*
|
|
**/
|
|
where?: RoomWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Room without action
|
|
*/
|
|
export type RoomArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Room
|
|
*
|
|
**/
|
|
select?: RoomSelect | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Model Message
|
|
*/
|
|
|
|
|
|
export type AggregateMessage = {
|
|
_count: MessageCountAggregateOutputType | null
|
|
_min: MessageMinAggregateOutputType | null
|
|
_max: MessageMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type MessageMinAggregateOutputType = {
|
|
id: string | null
|
|
body: string | null
|
|
userId: string | null
|
|
}
|
|
|
|
export type MessageMaxAggregateOutputType = {
|
|
id: string | null
|
|
body: string | null
|
|
userId: string | null
|
|
}
|
|
|
|
export type MessageCountAggregateOutputType = {
|
|
id: number
|
|
body: number
|
|
userId: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type MessageMinAggregateInputType = {
|
|
id?: true
|
|
body?: true
|
|
userId?: true
|
|
}
|
|
|
|
export type MessageMaxAggregateInputType = {
|
|
id?: true
|
|
body?: true
|
|
userId?: true
|
|
}
|
|
|
|
export type MessageCountAggregateInputType = {
|
|
id?: true
|
|
body?: true
|
|
userId?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type MessageAggregateArgs = {
|
|
/**
|
|
* Filter which Message to aggregate.
|
|
*
|
|
**/
|
|
where?: MessageWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Messages to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<MessageOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*
|
|
**/
|
|
cursor?: MessageWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Messages 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` Messages.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Messages
|
|
**/
|
|
_count?: true | MessageCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: MessageMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: MessageMaxAggregateInputType
|
|
}
|
|
|
|
export type GetMessageAggregateType<T extends MessageAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateMessage]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateMessage[P]>
|
|
: GetScalarType<T[P], AggregateMessage[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type MessageGroupByArgs = {
|
|
where?: MessageWhereInput
|
|
orderBy?: Enumerable<MessageOrderByWithAggregationInput>
|
|
by: Array<MessageScalarFieldEnum>
|
|
having?: MessageScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: MessageCountAggregateInputType | true
|
|
_min?: MessageMinAggregateInputType
|
|
_max?: MessageMaxAggregateInputType
|
|
}
|
|
|
|
|
|
export type MessageGroupByOutputType = {
|
|
id: string
|
|
body: string
|
|
userId: string
|
|
_count: MessageCountAggregateOutputType | null
|
|
_min: MessageMinAggregateOutputType | null
|
|
_max: MessageMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetMessageGroupByPayload<T extends MessageGroupByArgs> = PrismaPromise<
|
|
Array<
|
|
PickArray<MessageGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof MessageGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], MessageGroupByOutputType[P]>
|
|
: GetScalarType<T[P], MessageGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type MessageSelect = {
|
|
id?: boolean
|
|
body?: boolean
|
|
creator?: boolean | UserArgs
|
|
userId?: boolean
|
|
}
|
|
|
|
|
|
export type MessageInclude = {
|
|
creator?: boolean | UserArgs
|
|
}
|
|
|
|
export type MessageGetPayload<S extends boolean | null | undefined | MessageArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? Message :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (MessageArgs | MessageFindManyArgs)
|
|
? Message & {
|
|
[P in TruthyKeys<S['include']>]:
|
|
P extends 'creator' ? UserGetPayload<S['include'][P]> : never
|
|
}
|
|
: S extends { select: any } & (MessageArgs | MessageFindManyArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends 'creator' ? UserGetPayload<S['select'][P]> : P extends keyof Message ? Message[P] : never
|
|
}
|
|
: Message
|
|
|
|
|
|
type MessageCountArgs = Merge<
|
|
Omit<MessageFindManyArgs, 'select' | 'include'> & {
|
|
select?: MessageCountAggregateInputType | true
|
|
}
|
|
>
|
|
|
|
export interface MessageDelegate<GlobalRejectSettings extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined> {
|
|
/**
|
|
* Find zero or one Message that matches the filter.
|
|
* @param {MessageFindUniqueArgs} args - Arguments to find a Message
|
|
* @example
|
|
* // Get one Message
|
|
* const message = await prisma.message.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUnique<T extends MessageFindUniqueArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args: SelectSubset<T, MessageFindUniqueArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Message'> extends True ? Prisma__MessageClient<MessageGetPayload<T>> : Prisma__MessageClient<MessageGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find one Message that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {MessageFindUniqueOrThrowArgs} args - Arguments to find a Message
|
|
* @example
|
|
* // Get one Message
|
|
* const message = await prisma.message.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUniqueOrThrow<T extends MessageFindUniqueOrThrowArgs>(
|
|
args?: SelectSubset<T, MessageFindUniqueOrThrowArgs>
|
|
): Prisma__MessageClient<MessageGetPayload<T>>
|
|
|
|
/**
|
|
* Find the first Message 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 {MessageFindFirstArgs} args - Arguments to find a Message
|
|
* @example
|
|
* // Get one Message
|
|
* const message = await prisma.message.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirst<T extends MessageFindFirstArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args?: SelectSubset<T, MessageFindFirstArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Message'> extends True ? Prisma__MessageClient<MessageGetPayload<T>> : Prisma__MessageClient<MessageGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find the first Message 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 {MessageFindFirstOrThrowArgs} args - Arguments to find a Message
|
|
* @example
|
|
* // Get one Message
|
|
* const message = await prisma.message.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirstOrThrow<T extends MessageFindFirstOrThrowArgs>(
|
|
args?: SelectSubset<T, MessageFindFirstOrThrowArgs>
|
|
): Prisma__MessageClient<MessageGetPayload<T>>
|
|
|
|
/**
|
|
* Find zero or more Messages 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 {MessageFindManyArgs=} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Messages
|
|
* const messages = await prisma.message.findMany()
|
|
*
|
|
* // Get first 10 Messages
|
|
* const messages = await prisma.message.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const messageWithIdOnly = await prisma.message.findMany({ select: { id: true } })
|
|
*
|
|
**/
|
|
findMany<T extends MessageFindManyArgs>(
|
|
args?: SelectSubset<T, MessageFindManyArgs>
|
|
): PrismaPromise<Array<MessageGetPayload<T>>>
|
|
|
|
/**
|
|
* Create a Message.
|
|
* @param {MessageCreateArgs} args - Arguments to create a Message.
|
|
* @example
|
|
* // Create one Message
|
|
* const Message = await prisma.message.create({
|
|
* data: {
|
|
* // ... data to create a Message
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
create<T extends MessageCreateArgs>(
|
|
args: SelectSubset<T, MessageCreateArgs>
|
|
): Prisma__MessageClient<MessageGetPayload<T>>
|
|
|
|
/**
|
|
* Create many Messages.
|
|
* @param {MessageCreateManyArgs} args - Arguments to create many Messages.
|
|
* @example
|
|
* // Create many Messages
|
|
* const message = await prisma.message.createMany({
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
createMany<T extends MessageCreateManyArgs>(
|
|
args?: SelectSubset<T, MessageCreateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Delete a Message.
|
|
* @param {MessageDeleteArgs} args - Arguments to delete one Message.
|
|
* @example
|
|
* // Delete one Message
|
|
* const Message = await prisma.message.delete({
|
|
* where: {
|
|
* // ... filter to delete one Message
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
delete<T extends MessageDeleteArgs>(
|
|
args: SelectSubset<T, MessageDeleteArgs>
|
|
): Prisma__MessageClient<MessageGetPayload<T>>
|
|
|
|
/**
|
|
* Update one Message.
|
|
* @param {MessageUpdateArgs} args - Arguments to update one Message.
|
|
* @example
|
|
* // Update one Message
|
|
* const message = await prisma.message.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
update<T extends MessageUpdateArgs>(
|
|
args: SelectSubset<T, MessageUpdateArgs>
|
|
): Prisma__MessageClient<MessageGetPayload<T>>
|
|
|
|
/**
|
|
* Delete zero or more Messages.
|
|
* @param {MessageDeleteManyArgs} args - Arguments to filter Messages to delete.
|
|
* @example
|
|
* // Delete a few Messages
|
|
* const { count } = await prisma.message.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
deleteMany<T extends MessageDeleteManyArgs>(
|
|
args?: SelectSubset<T, MessageDeleteManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Messages.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {MessageUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Messages
|
|
* const message = await prisma.message.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
updateMany<T extends MessageUpdateManyArgs>(
|
|
args: SelectSubset<T, MessageUpdateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Message.
|
|
* @param {MessageUpsertArgs} args - Arguments to update or create a Message.
|
|
* @example
|
|
* // Update or create a Message
|
|
* const message = await prisma.message.upsert({
|
|
* create: {
|
|
* // ... data to create a Message
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Message we want to update
|
|
* }
|
|
* })
|
|
**/
|
|
upsert<T extends MessageUpsertArgs>(
|
|
args: SelectSubset<T, MessageUpsertArgs>
|
|
): Prisma__MessageClient<MessageGetPayload<T>>
|
|
|
|
/**
|
|
* Count the number of Messages.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {MessageCountArgs} args - Arguments to filter Messages to count.
|
|
* @example
|
|
* // Count the number of Messages
|
|
* const count = await prisma.message.count({
|
|
* where: {
|
|
* // ... the filter for the Messages we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends MessageCountArgs>(
|
|
args?: Subset<T, MessageCountArgs>,
|
|
): PrismaPromise<
|
|
T extends _Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], MessageCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Message.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {MessageAggregateArgs} 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<T extends MessageAggregateArgs>(args: Subset<T, MessageAggregateArgs>): PrismaPromise<GetMessageAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Message.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {MessageGroupByArgs} 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 MessageGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: MessageGroupByArgs['orderBy'] }
|
|
: { orderBy?: MessageGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends TupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T, MessageGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetMessageGroupByPayload<T> : PrismaPromise<InputErrors>
|
|
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Message.
|
|
* 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__MessageClient<T, Null = never> implements PrismaPromise<T> {
|
|
[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';
|
|
|
|
creator<T extends UserArgs= {}>(args?: Subset<T, UserArgs>): Prisma__UserClient<UserGetPayload<T> | 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
/**
|
|
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
/**
|
|
* 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<T>;
|
|
}
|
|
|
|
|
|
|
|
// Custom InputTypes
|
|
|
|
/**
|
|
* Message base type for findUnique actions
|
|
*/
|
|
export type MessageFindUniqueArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* Filter, which Message to fetch.
|
|
*
|
|
**/
|
|
where: MessageWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Message findUnique
|
|
*/
|
|
export interface MessageFindUniqueArgs extends MessageFindUniqueArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findUniqueOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Message findUniqueOrThrow
|
|
*/
|
|
export type MessageFindUniqueOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* Filter, which Message to fetch.
|
|
*
|
|
**/
|
|
where: MessageWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Message base type for findFirst actions
|
|
*/
|
|
export type MessageFindFirstArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* Filter, which Message to fetch.
|
|
*
|
|
**/
|
|
where?: MessageWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Messages to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<MessageOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Messages.
|
|
*
|
|
**/
|
|
cursor?: MessageWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Messages 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` Messages.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Messages.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<MessageScalarFieldEnum>
|
|
}
|
|
|
|
/**
|
|
* Message findFirst
|
|
*/
|
|
export interface MessageFindFirstArgs extends MessageFindFirstArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findFirstOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Message findFirstOrThrow
|
|
*/
|
|
export type MessageFindFirstOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* Filter, which Message to fetch.
|
|
*
|
|
**/
|
|
where?: MessageWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Messages to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<MessageOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Messages.
|
|
*
|
|
**/
|
|
cursor?: MessageWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Messages 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` Messages.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Messages.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<MessageScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Message findMany
|
|
*/
|
|
export type MessageFindManyArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* Filter, which Messages to fetch.
|
|
*
|
|
**/
|
|
where?: MessageWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Messages to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<MessageOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Messages.
|
|
*
|
|
**/
|
|
cursor?: MessageWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Messages 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` Messages.
|
|
*
|
|
**/
|
|
skip?: number
|
|
distinct?: Enumerable<MessageScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Message create
|
|
*/
|
|
export type MessageCreateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* The data needed to create a Message.
|
|
*
|
|
**/
|
|
data: XOR<MessageCreateInput, MessageUncheckedCreateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Message createMany
|
|
*/
|
|
export type MessageCreateManyArgs = {
|
|
/**
|
|
* The data used to create many Messages.
|
|
*
|
|
**/
|
|
data: Enumerable<MessageCreateManyInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
|
|
/**
|
|
* Message update
|
|
*/
|
|
export type MessageUpdateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* The data needed to update a Message.
|
|
*
|
|
**/
|
|
data: XOR<MessageUpdateInput, MessageUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Message to update.
|
|
*
|
|
**/
|
|
where: MessageWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Message updateMany
|
|
*/
|
|
export type MessageUpdateManyArgs = {
|
|
/**
|
|
* The data used to update Messages.
|
|
*
|
|
**/
|
|
data: XOR<MessageUpdateManyMutationInput, MessageUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Messages to update
|
|
*
|
|
**/
|
|
where?: MessageWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Message upsert
|
|
*/
|
|
export type MessageUpsertArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* The filter to search for the Message to update in case it exists.
|
|
*
|
|
**/
|
|
where: MessageWhereUniqueInput
|
|
/**
|
|
* In case the Message found by the `where` argument doesn't exist, create a new Message with this data.
|
|
*
|
|
**/
|
|
create: XOR<MessageCreateInput, MessageUncheckedCreateInput>
|
|
/**
|
|
* In case the Message was found with the provided `where` argument, update it with this data.
|
|
*
|
|
**/
|
|
update: XOR<MessageUpdateInput, MessageUncheckedUpdateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Message delete
|
|
*/
|
|
export type MessageDeleteArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
/**
|
|
* Filter which Message to delete.
|
|
*
|
|
**/
|
|
where: MessageWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Message deleteMany
|
|
*/
|
|
export type MessageDeleteManyArgs = {
|
|
/**
|
|
* Filter which Messages to delete
|
|
*
|
|
**/
|
|
where?: MessageWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Message without action
|
|
*/
|
|
export type MessageArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Message
|
|
*
|
|
**/
|
|
select?: MessageSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: MessageInclude | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Model Session
|
|
*/
|
|
|
|
|
|
export type AggregateSession = {
|
|
_count: SessionCountAggregateOutputType | null
|
|
_min: SessionMinAggregateOutputType | null
|
|
_max: SessionMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type SessionMinAggregateOutputType = {
|
|
id: string | null
|
|
token: string | null
|
|
userId: string | null
|
|
}
|
|
|
|
export type SessionMaxAggregateOutputType = {
|
|
id: string | null
|
|
token: string | null
|
|
userId: string | null
|
|
}
|
|
|
|
export type SessionCountAggregateOutputType = {
|
|
id: number
|
|
token: number
|
|
userId: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type SessionMinAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
userId?: true
|
|
}
|
|
|
|
export type SessionMaxAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
userId?: true
|
|
}
|
|
|
|
export type SessionCountAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
userId?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type SessionAggregateArgs = {
|
|
/**
|
|
* Filter which Session to aggregate.
|
|
*
|
|
**/
|
|
where?: SessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Sessions to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<SessionOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*
|
|
**/
|
|
cursor?: SessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Sessions from the position of the cursor.
|
|
*
|
|
**/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` Sessions.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Sessions
|
|
**/
|
|
_count?: true | SessionCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: SessionMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: SessionMaxAggregateInputType
|
|
}
|
|
|
|
export type GetSessionAggregateType<T extends SessionAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateSession]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateSession[P]>
|
|
: GetScalarType<T[P], AggregateSession[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type SessionGroupByArgs = {
|
|
where?: SessionWhereInput
|
|
orderBy?: Enumerable<SessionOrderByWithAggregationInput>
|
|
by: Array<SessionScalarFieldEnum>
|
|
having?: SessionScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: SessionCountAggregateInputType | true
|
|
_min?: SessionMinAggregateInputType
|
|
_max?: SessionMaxAggregateInputType
|
|
}
|
|
|
|
|
|
export type SessionGroupByOutputType = {
|
|
id: string
|
|
token: string
|
|
userId: string
|
|
_count: SessionCountAggregateOutputType | null
|
|
_min: SessionMinAggregateOutputType | null
|
|
_max: SessionMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetSessionGroupByPayload<T extends SessionGroupByArgs> = PrismaPromise<
|
|
Array<
|
|
PickArray<SessionGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof SessionGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], SessionGroupByOutputType[P]>
|
|
: GetScalarType<T[P], SessionGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type SessionSelect = {
|
|
id?: boolean
|
|
token?: boolean
|
|
userId?: boolean
|
|
user?: boolean | UserArgs
|
|
}
|
|
|
|
|
|
export type SessionInclude = {
|
|
user?: boolean | UserArgs
|
|
}
|
|
|
|
export type SessionGetPayload<S extends boolean | null | undefined | SessionArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? Session :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (SessionArgs | SessionFindManyArgs)
|
|
? Session & {
|
|
[P in TruthyKeys<S['include']>]:
|
|
P extends 'user' ? UserGetPayload<S['include'][P]> : never
|
|
}
|
|
: S extends { select: any } & (SessionArgs | SessionFindManyArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends 'user' ? UserGetPayload<S['select'][P]> : P extends keyof Session ? Session[P] : never
|
|
}
|
|
: Session
|
|
|
|
|
|
type SessionCountArgs = Merge<
|
|
Omit<SessionFindManyArgs, 'select' | 'include'> & {
|
|
select?: SessionCountAggregateInputType | true
|
|
}
|
|
>
|
|
|
|
export interface SessionDelegate<GlobalRejectSettings extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined> {
|
|
/**
|
|
* Find zero or one Session that matches the filter.
|
|
* @param {SessionFindUniqueArgs} args - Arguments to find a Session
|
|
* @example
|
|
* // Get one Session
|
|
* const session = await prisma.session.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUnique<T extends SessionFindUniqueArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args: SelectSubset<T, SessionFindUniqueArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Session'> extends True ? Prisma__SessionClient<SessionGetPayload<T>> : Prisma__SessionClient<SessionGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find one Session that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {SessionFindUniqueOrThrowArgs} args - Arguments to find a Session
|
|
* @example
|
|
* // Get one Session
|
|
* const session = await prisma.session.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUniqueOrThrow<T extends SessionFindUniqueOrThrowArgs>(
|
|
args?: SelectSubset<T, SessionFindUniqueOrThrowArgs>
|
|
): Prisma__SessionClient<SessionGetPayload<T>>
|
|
|
|
/**
|
|
* Find the first Session that matches the filter.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SessionFindFirstArgs} args - Arguments to find a Session
|
|
* @example
|
|
* // Get one Session
|
|
* const session = await prisma.session.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirst<T extends SessionFindFirstArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args?: SelectSubset<T, SessionFindFirstArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Session'> extends True ? Prisma__SessionClient<SessionGetPayload<T>> : Prisma__SessionClient<SessionGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find the first Session 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 {SessionFindFirstOrThrowArgs} args - Arguments to find a Session
|
|
* @example
|
|
* // Get one Session
|
|
* const session = await prisma.session.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirstOrThrow<T extends SessionFindFirstOrThrowArgs>(
|
|
args?: SelectSubset<T, SessionFindFirstOrThrowArgs>
|
|
): Prisma__SessionClient<SessionGetPayload<T>>
|
|
|
|
/**
|
|
* Find zero or more Sessions that matches the filter.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SessionFindManyArgs=} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Sessions
|
|
* const sessions = await prisma.session.findMany()
|
|
*
|
|
* // Get first 10 Sessions
|
|
* const sessions = await prisma.session.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const sessionWithIdOnly = await prisma.session.findMany({ select: { id: true } })
|
|
*
|
|
**/
|
|
findMany<T extends SessionFindManyArgs>(
|
|
args?: SelectSubset<T, SessionFindManyArgs>
|
|
): PrismaPromise<Array<SessionGetPayload<T>>>
|
|
|
|
/**
|
|
* Create a Session.
|
|
* @param {SessionCreateArgs} args - Arguments to create a Session.
|
|
* @example
|
|
* // Create one Session
|
|
* const Session = await prisma.session.create({
|
|
* data: {
|
|
* // ... data to create a Session
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
create<T extends SessionCreateArgs>(
|
|
args: SelectSubset<T, SessionCreateArgs>
|
|
): Prisma__SessionClient<SessionGetPayload<T>>
|
|
|
|
/**
|
|
* Create many Sessions.
|
|
* @param {SessionCreateManyArgs} args - Arguments to create many Sessions.
|
|
* @example
|
|
* // Create many Sessions
|
|
* const session = await prisma.session.createMany({
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
createMany<T extends SessionCreateManyArgs>(
|
|
args?: SelectSubset<T, SessionCreateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Delete a Session.
|
|
* @param {SessionDeleteArgs} args - Arguments to delete one Session.
|
|
* @example
|
|
* // Delete one Session
|
|
* const Session = await prisma.session.delete({
|
|
* where: {
|
|
* // ... filter to delete one Session
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
delete<T extends SessionDeleteArgs>(
|
|
args: SelectSubset<T, SessionDeleteArgs>
|
|
): Prisma__SessionClient<SessionGetPayload<T>>
|
|
|
|
/**
|
|
* Update one Session.
|
|
* @param {SessionUpdateArgs} args - Arguments to update one Session.
|
|
* @example
|
|
* // Update one Session
|
|
* const session = await prisma.session.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
update<T extends SessionUpdateArgs>(
|
|
args: SelectSubset<T, SessionUpdateArgs>
|
|
): Prisma__SessionClient<SessionGetPayload<T>>
|
|
|
|
/**
|
|
* Delete zero or more Sessions.
|
|
* @param {SessionDeleteManyArgs} args - Arguments to filter Sessions to delete.
|
|
* @example
|
|
* // Delete a few Sessions
|
|
* const { count } = await prisma.session.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
deleteMany<T extends SessionDeleteManyArgs>(
|
|
args?: SelectSubset<T, SessionDeleteManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Sessions.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SessionUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Sessions
|
|
* const session = await prisma.session.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
updateMany<T extends SessionUpdateManyArgs>(
|
|
args: SelectSubset<T, SessionUpdateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Session.
|
|
* @param {SessionUpsertArgs} args - Arguments to update or create a Session.
|
|
* @example
|
|
* // Update or create a Session
|
|
* const session = await prisma.session.upsert({
|
|
* create: {
|
|
* // ... data to create a Session
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Session we want to update
|
|
* }
|
|
* })
|
|
**/
|
|
upsert<T extends SessionUpsertArgs>(
|
|
args: SelectSubset<T, SessionUpsertArgs>
|
|
): Prisma__SessionClient<SessionGetPayload<T>>
|
|
|
|
/**
|
|
* Count the number of Sessions.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SessionCountArgs} args - Arguments to filter Sessions to count.
|
|
* @example
|
|
* // Count the number of Sessions
|
|
* const count = await prisma.session.count({
|
|
* where: {
|
|
* // ... the filter for the Sessions we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends SessionCountArgs>(
|
|
args?: Subset<T, SessionCountArgs>,
|
|
): PrismaPromise<
|
|
T extends _Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], SessionCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Session.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SessionAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
|
|
* @example
|
|
* // Ordered by age ascending
|
|
* // Where email contains prisma.io
|
|
* // Limited to the 10 users
|
|
* const aggregations = await prisma.user.aggregate({
|
|
* _avg: {
|
|
* age: true,
|
|
* },
|
|
* where: {
|
|
* email: {
|
|
* contains: "prisma.io",
|
|
* },
|
|
* },
|
|
* orderBy: {
|
|
* age: "asc",
|
|
* },
|
|
* take: 10,
|
|
* })
|
|
**/
|
|
aggregate<T extends SessionAggregateArgs>(args: Subset<T, SessionAggregateArgs>): PrismaPromise<GetSessionAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Session.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {SessionGroupByArgs} args - Group by arguments.
|
|
* @example
|
|
* // Group by city, order by createdAt, get count
|
|
* const result = await prisma.user.groupBy({
|
|
* by: ['city', 'createdAt'],
|
|
* orderBy: {
|
|
* createdAt: true
|
|
* },
|
|
* _count: {
|
|
* _all: true
|
|
* },
|
|
* })
|
|
*
|
|
**/
|
|
groupBy<
|
|
T extends SessionGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: SessionGroupByArgs['orderBy'] }
|
|
: { orderBy?: SessionGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends TupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T, SessionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSessionGroupByPayload<T> : PrismaPromise<InputErrors>
|
|
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Session.
|
|
* Why is this prefixed with `Prisma__`?
|
|
* Because we want to prevent naming conflicts as mentioned in
|
|
* https://github.com/prisma/prisma-client-js/issues/707
|
|
*/
|
|
export class Prisma__SessionClient<T, Null = never> implements PrismaPromise<T> {
|
|
[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';
|
|
|
|
user<T extends UserArgs= {}>(args?: Subset<T, UserArgs>): Prisma__UserClient<UserGetPayload<T> | 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
/**
|
|
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
/**
|
|
* 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<T>;
|
|
}
|
|
|
|
|
|
|
|
// Custom InputTypes
|
|
|
|
/**
|
|
* Session base type for findUnique actions
|
|
*/
|
|
export type SessionFindUniqueArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* Filter, which Session to fetch.
|
|
*
|
|
**/
|
|
where: SessionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Session findUnique
|
|
*/
|
|
export interface SessionFindUniqueArgs extends SessionFindUniqueArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findUniqueOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Session findUniqueOrThrow
|
|
*/
|
|
export type SessionFindUniqueOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* Filter, which Session to fetch.
|
|
*
|
|
**/
|
|
where: SessionWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Session base type for findFirst actions
|
|
*/
|
|
export type SessionFindFirstArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* Filter, which Session to fetch.
|
|
*
|
|
**/
|
|
where?: SessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Sessions to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<SessionOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Sessions.
|
|
*
|
|
**/
|
|
cursor?: SessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Sessions from the position of the cursor.
|
|
*
|
|
**/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` Sessions.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Sessions.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<SessionScalarFieldEnum>
|
|
}
|
|
|
|
/**
|
|
* Session findFirst
|
|
*/
|
|
export interface SessionFindFirstArgs extends SessionFindFirstArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findFirstOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Session findFirstOrThrow
|
|
*/
|
|
export type SessionFindFirstOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* Filter, which Session to fetch.
|
|
*
|
|
**/
|
|
where?: SessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Sessions to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<SessionOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Sessions.
|
|
*
|
|
**/
|
|
cursor?: SessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Sessions from the position of the cursor.
|
|
*
|
|
**/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` Sessions.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Sessions.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<SessionScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Session findMany
|
|
*/
|
|
export type SessionFindManyArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* Filter, which Sessions to fetch.
|
|
*
|
|
**/
|
|
where?: SessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Sessions to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<SessionOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Sessions.
|
|
*
|
|
**/
|
|
cursor?: SessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Sessions from the position of the cursor.
|
|
*
|
|
**/
|
|
take?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Skip the first `n` Sessions.
|
|
*
|
|
**/
|
|
skip?: number
|
|
distinct?: Enumerable<SessionScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Session create
|
|
*/
|
|
export type SessionCreateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* The data needed to create a Session.
|
|
*
|
|
**/
|
|
data: XOR<SessionCreateInput, SessionUncheckedCreateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Session createMany
|
|
*/
|
|
export type SessionCreateManyArgs = {
|
|
/**
|
|
* The data used to create many Sessions.
|
|
*
|
|
**/
|
|
data: Enumerable<SessionCreateManyInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
|
|
/**
|
|
* Session update
|
|
*/
|
|
export type SessionUpdateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* The data needed to update a Session.
|
|
*
|
|
**/
|
|
data: XOR<SessionUpdateInput, SessionUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Session to update.
|
|
*
|
|
**/
|
|
where: SessionWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Session updateMany
|
|
*/
|
|
export type SessionUpdateManyArgs = {
|
|
/**
|
|
* The data used to update Sessions.
|
|
*
|
|
**/
|
|
data: XOR<SessionUpdateManyMutationInput, SessionUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Sessions to update
|
|
*
|
|
**/
|
|
where?: SessionWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Session upsert
|
|
*/
|
|
export type SessionUpsertArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* The filter to search for the Session to update in case it exists.
|
|
*
|
|
**/
|
|
where: SessionWhereUniqueInput
|
|
/**
|
|
* In case the Session found by the `where` argument doesn't exist, create a new Session with this data.
|
|
*
|
|
**/
|
|
create: XOR<SessionCreateInput, SessionUncheckedCreateInput>
|
|
/**
|
|
* In case the Session was found with the provided `where` argument, update it with this data.
|
|
*
|
|
**/
|
|
update: XOR<SessionUpdateInput, SessionUncheckedUpdateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Session delete
|
|
*/
|
|
export type SessionDeleteArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
/**
|
|
* Filter which Session to delete.
|
|
*
|
|
**/
|
|
where: SessionWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Session deleteMany
|
|
*/
|
|
export type SessionDeleteManyArgs = {
|
|
/**
|
|
* Filter which Sessions to delete
|
|
*
|
|
**/
|
|
where?: SessionWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Session without action
|
|
*/
|
|
export type SessionArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Session
|
|
*
|
|
**/
|
|
select?: SessionSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*
|
|
**/
|
|
include?: SessionInclude | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Model ExpiredSession
|
|
*/
|
|
|
|
|
|
export type AggregateExpiredSession = {
|
|
_count: ExpiredSessionCountAggregateOutputType | null
|
|
_min: ExpiredSessionMinAggregateOutputType | null
|
|
_max: ExpiredSessionMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type ExpiredSessionMinAggregateOutputType = {
|
|
id: string | null
|
|
token: string | null
|
|
}
|
|
|
|
export type ExpiredSessionMaxAggregateOutputType = {
|
|
id: string | null
|
|
token: string | null
|
|
}
|
|
|
|
export type ExpiredSessionCountAggregateOutputType = {
|
|
id: number
|
|
token: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type ExpiredSessionMinAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
}
|
|
|
|
export type ExpiredSessionMaxAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
}
|
|
|
|
export type ExpiredSessionCountAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type ExpiredSessionAggregateArgs = {
|
|
/**
|
|
* Filter which ExpiredSession to aggregate.
|
|
*
|
|
**/
|
|
where?: ExpiredSessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of ExpiredSessions to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<ExpiredSessionOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*
|
|
**/
|
|
cursor?: ExpiredSessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` ExpiredSessions 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` ExpiredSessions.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned ExpiredSessions
|
|
**/
|
|
_count?: true | ExpiredSessionCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: ExpiredSessionMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: ExpiredSessionMaxAggregateInputType
|
|
}
|
|
|
|
export type GetExpiredSessionAggregateType<T extends ExpiredSessionAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateExpiredSession]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateExpiredSession[P]>
|
|
: GetScalarType<T[P], AggregateExpiredSession[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type ExpiredSessionGroupByArgs = {
|
|
where?: ExpiredSessionWhereInput
|
|
orderBy?: Enumerable<ExpiredSessionOrderByWithAggregationInput>
|
|
by: Array<ExpiredSessionScalarFieldEnum>
|
|
having?: ExpiredSessionScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: ExpiredSessionCountAggregateInputType | true
|
|
_min?: ExpiredSessionMinAggregateInputType
|
|
_max?: ExpiredSessionMaxAggregateInputType
|
|
}
|
|
|
|
|
|
export type ExpiredSessionGroupByOutputType = {
|
|
id: string
|
|
token: string
|
|
_count: ExpiredSessionCountAggregateOutputType | null
|
|
_min: ExpiredSessionMinAggregateOutputType | null
|
|
_max: ExpiredSessionMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetExpiredSessionGroupByPayload<T extends ExpiredSessionGroupByArgs> = PrismaPromise<
|
|
Array<
|
|
PickArray<ExpiredSessionGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof ExpiredSessionGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], ExpiredSessionGroupByOutputType[P]>
|
|
: GetScalarType<T[P], ExpiredSessionGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type ExpiredSessionSelect = {
|
|
id?: boolean
|
|
token?: boolean
|
|
}
|
|
|
|
|
|
export type ExpiredSessionGetPayload<S extends boolean | null | undefined | ExpiredSessionArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? ExpiredSession :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (ExpiredSessionArgs | ExpiredSessionFindManyArgs)
|
|
? ExpiredSession
|
|
: S extends { select: any } & (ExpiredSessionArgs | ExpiredSessionFindManyArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends keyof ExpiredSession ? ExpiredSession[P] : never
|
|
}
|
|
: ExpiredSession
|
|
|
|
|
|
type ExpiredSessionCountArgs = Merge<
|
|
Omit<ExpiredSessionFindManyArgs, 'select' | 'include'> & {
|
|
select?: ExpiredSessionCountAggregateInputType | true
|
|
}
|
|
>
|
|
|
|
export interface ExpiredSessionDelegate<GlobalRejectSettings extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined> {
|
|
/**
|
|
* Find zero or one ExpiredSession that matches the filter.
|
|
* @param {ExpiredSessionFindUniqueArgs} args - Arguments to find a ExpiredSession
|
|
* @example
|
|
* // Get one ExpiredSession
|
|
* const expiredSession = await prisma.expiredSession.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUnique<T extends ExpiredSessionFindUniqueArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args: SelectSubset<T, ExpiredSessionFindUniqueArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'ExpiredSession'> extends True ? Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T>> : Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find one ExpiredSession that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {ExpiredSessionFindUniqueOrThrowArgs} args - Arguments to find a ExpiredSession
|
|
* @example
|
|
* // Get one ExpiredSession
|
|
* const expiredSession = await prisma.expiredSession.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUniqueOrThrow<T extends ExpiredSessionFindUniqueOrThrowArgs>(
|
|
args?: SelectSubset<T, ExpiredSessionFindUniqueOrThrowArgs>
|
|
): Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T>>
|
|
|
|
/**
|
|
* Find the first ExpiredSession 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 {ExpiredSessionFindFirstArgs} args - Arguments to find a ExpiredSession
|
|
* @example
|
|
* // Get one ExpiredSession
|
|
* const expiredSession = await prisma.expiredSession.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirst<T extends ExpiredSessionFindFirstArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args?: SelectSubset<T, ExpiredSessionFindFirstArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'ExpiredSession'> extends True ? Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T>> : Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find the first ExpiredSession 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 {ExpiredSessionFindFirstOrThrowArgs} args - Arguments to find a ExpiredSession
|
|
* @example
|
|
* // Get one ExpiredSession
|
|
* const expiredSession = await prisma.expiredSession.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirstOrThrow<T extends ExpiredSessionFindFirstOrThrowArgs>(
|
|
args?: SelectSubset<T, ExpiredSessionFindFirstOrThrowArgs>
|
|
): Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T>>
|
|
|
|
/**
|
|
* Find zero or more ExpiredSessions 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 {ExpiredSessionFindManyArgs=} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all ExpiredSessions
|
|
* const expiredSessions = await prisma.expiredSession.findMany()
|
|
*
|
|
* // Get first 10 ExpiredSessions
|
|
* const expiredSessions = await prisma.expiredSession.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const expiredSessionWithIdOnly = await prisma.expiredSession.findMany({ select: { id: true } })
|
|
*
|
|
**/
|
|
findMany<T extends ExpiredSessionFindManyArgs>(
|
|
args?: SelectSubset<T, ExpiredSessionFindManyArgs>
|
|
): PrismaPromise<Array<ExpiredSessionGetPayload<T>>>
|
|
|
|
/**
|
|
* Create a ExpiredSession.
|
|
* @param {ExpiredSessionCreateArgs} args - Arguments to create a ExpiredSession.
|
|
* @example
|
|
* // Create one ExpiredSession
|
|
* const ExpiredSession = await prisma.expiredSession.create({
|
|
* data: {
|
|
* // ... data to create a ExpiredSession
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
create<T extends ExpiredSessionCreateArgs>(
|
|
args: SelectSubset<T, ExpiredSessionCreateArgs>
|
|
): Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T>>
|
|
|
|
/**
|
|
* Create many ExpiredSessions.
|
|
* @param {ExpiredSessionCreateManyArgs} args - Arguments to create many ExpiredSessions.
|
|
* @example
|
|
* // Create many ExpiredSessions
|
|
* const expiredSession = await prisma.expiredSession.createMany({
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
createMany<T extends ExpiredSessionCreateManyArgs>(
|
|
args?: SelectSubset<T, ExpiredSessionCreateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Delete a ExpiredSession.
|
|
* @param {ExpiredSessionDeleteArgs} args - Arguments to delete one ExpiredSession.
|
|
* @example
|
|
* // Delete one ExpiredSession
|
|
* const ExpiredSession = await prisma.expiredSession.delete({
|
|
* where: {
|
|
* // ... filter to delete one ExpiredSession
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
delete<T extends ExpiredSessionDeleteArgs>(
|
|
args: SelectSubset<T, ExpiredSessionDeleteArgs>
|
|
): Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T>>
|
|
|
|
/**
|
|
* Update one ExpiredSession.
|
|
* @param {ExpiredSessionUpdateArgs} args - Arguments to update one ExpiredSession.
|
|
* @example
|
|
* // Update one ExpiredSession
|
|
* const expiredSession = await prisma.expiredSession.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
update<T extends ExpiredSessionUpdateArgs>(
|
|
args: SelectSubset<T, ExpiredSessionUpdateArgs>
|
|
): Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T>>
|
|
|
|
/**
|
|
* Delete zero or more ExpiredSessions.
|
|
* @param {ExpiredSessionDeleteManyArgs} args - Arguments to filter ExpiredSessions to delete.
|
|
* @example
|
|
* // Delete a few ExpiredSessions
|
|
* const { count } = await prisma.expiredSession.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
deleteMany<T extends ExpiredSessionDeleteManyArgs>(
|
|
args?: SelectSubset<T, ExpiredSessionDeleteManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more ExpiredSessions.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ExpiredSessionUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many ExpiredSessions
|
|
* const expiredSession = await prisma.expiredSession.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
updateMany<T extends ExpiredSessionUpdateManyArgs>(
|
|
args: SelectSubset<T, ExpiredSessionUpdateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one ExpiredSession.
|
|
* @param {ExpiredSessionUpsertArgs} args - Arguments to update or create a ExpiredSession.
|
|
* @example
|
|
* // Update or create a ExpiredSession
|
|
* const expiredSession = await prisma.expiredSession.upsert({
|
|
* create: {
|
|
* // ... data to create a ExpiredSession
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the ExpiredSession we want to update
|
|
* }
|
|
* })
|
|
**/
|
|
upsert<T extends ExpiredSessionUpsertArgs>(
|
|
args: SelectSubset<T, ExpiredSessionUpsertArgs>
|
|
): Prisma__ExpiredSessionClient<ExpiredSessionGetPayload<T>>
|
|
|
|
/**
|
|
* Count the number of ExpiredSessions.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ExpiredSessionCountArgs} args - Arguments to filter ExpiredSessions to count.
|
|
* @example
|
|
* // Count the number of ExpiredSessions
|
|
* const count = await prisma.expiredSession.count({
|
|
* where: {
|
|
* // ... the filter for the ExpiredSessions we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends ExpiredSessionCountArgs>(
|
|
args?: Subset<T, ExpiredSessionCountArgs>,
|
|
): PrismaPromise<
|
|
T extends _Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], ExpiredSessionCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a ExpiredSession.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ExpiredSessionAggregateArgs} 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<T extends ExpiredSessionAggregateArgs>(args: Subset<T, ExpiredSessionAggregateArgs>): PrismaPromise<GetExpiredSessionAggregateType<T>>
|
|
|
|
/**
|
|
* Group by ExpiredSession.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ExpiredSessionGroupByArgs} 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 ExpiredSessionGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: ExpiredSessionGroupByArgs['orderBy'] }
|
|
: { orderBy?: ExpiredSessionGroupByArgs['orderBy'] },
|
|
OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
|
|
ByFields extends TupleToUnion<T['by']>,
|
|
ByValid extends Has<ByFields, OrderFields>,
|
|
HavingFields extends GetHavingFields<T['having']>,
|
|
HavingValid extends Has<ByFields, HavingFields>,
|
|
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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T>
|
|
? 'orderBy' extends Keys<T>
|
|
? 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<T, ExpiredSessionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetExpiredSessionGroupByPayload<T> : PrismaPromise<InputErrors>
|
|
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for ExpiredSession.
|
|
* 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__ExpiredSessionClient<T, Null = never> implements PrismaPromise<T> {
|
|
[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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
/**
|
|
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
/**
|
|
* 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<T>;
|
|
}
|
|
|
|
|
|
|
|
// Custom InputTypes
|
|
|
|
/**
|
|
* ExpiredSession base type for findUnique actions
|
|
*/
|
|
export type ExpiredSessionFindUniqueArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* Filter, which ExpiredSession to fetch.
|
|
*
|
|
**/
|
|
where: ExpiredSessionWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* ExpiredSession findUnique
|
|
*/
|
|
export interface ExpiredSessionFindUniqueArgs extends ExpiredSessionFindUniqueArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findUniqueOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession findUniqueOrThrow
|
|
*/
|
|
export type ExpiredSessionFindUniqueOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* Filter, which ExpiredSession to fetch.
|
|
*
|
|
**/
|
|
where: ExpiredSessionWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession base type for findFirst actions
|
|
*/
|
|
export type ExpiredSessionFindFirstArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* Filter, which ExpiredSession to fetch.
|
|
*
|
|
**/
|
|
where?: ExpiredSessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of ExpiredSessions to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<ExpiredSessionOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for ExpiredSessions.
|
|
*
|
|
**/
|
|
cursor?: ExpiredSessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` ExpiredSessions 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` ExpiredSessions.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of ExpiredSessions.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<ExpiredSessionScalarFieldEnum>
|
|
}
|
|
|
|
/**
|
|
* ExpiredSession findFirst
|
|
*/
|
|
export interface ExpiredSessionFindFirstArgs extends ExpiredSessionFindFirstArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findFirstOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession findFirstOrThrow
|
|
*/
|
|
export type ExpiredSessionFindFirstOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* Filter, which ExpiredSession to fetch.
|
|
*
|
|
**/
|
|
where?: ExpiredSessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of ExpiredSessions to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<ExpiredSessionOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for ExpiredSessions.
|
|
*
|
|
**/
|
|
cursor?: ExpiredSessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` ExpiredSessions 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` ExpiredSessions.
|
|
*
|
|
**/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of ExpiredSessions.
|
|
*
|
|
**/
|
|
distinct?: Enumerable<ExpiredSessionScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession findMany
|
|
*/
|
|
export type ExpiredSessionFindManyArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* Filter, which ExpiredSessions to fetch.
|
|
*
|
|
**/
|
|
where?: ExpiredSessionWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of ExpiredSessions to fetch.
|
|
*
|
|
**/
|
|
orderBy?: Enumerable<ExpiredSessionOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing ExpiredSessions.
|
|
*
|
|
**/
|
|
cursor?: ExpiredSessionWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` ExpiredSessions 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` ExpiredSessions.
|
|
*
|
|
**/
|
|
skip?: number
|
|
distinct?: Enumerable<ExpiredSessionScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession create
|
|
*/
|
|
export type ExpiredSessionCreateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* The data needed to create a ExpiredSession.
|
|
*
|
|
**/
|
|
data: XOR<ExpiredSessionCreateInput, ExpiredSessionUncheckedCreateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession createMany
|
|
*/
|
|
export type ExpiredSessionCreateManyArgs = {
|
|
/**
|
|
* The data used to create many ExpiredSessions.
|
|
*
|
|
**/
|
|
data: Enumerable<ExpiredSessionCreateManyInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession update
|
|
*/
|
|
export type ExpiredSessionUpdateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* The data needed to update a ExpiredSession.
|
|
*
|
|
**/
|
|
data: XOR<ExpiredSessionUpdateInput, ExpiredSessionUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which ExpiredSession to update.
|
|
*
|
|
**/
|
|
where: ExpiredSessionWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession updateMany
|
|
*/
|
|
export type ExpiredSessionUpdateManyArgs = {
|
|
/**
|
|
* The data used to update ExpiredSessions.
|
|
*
|
|
**/
|
|
data: XOR<ExpiredSessionUpdateManyMutationInput, ExpiredSessionUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which ExpiredSessions to update
|
|
*
|
|
**/
|
|
where?: ExpiredSessionWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession upsert
|
|
*/
|
|
export type ExpiredSessionUpsertArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* The filter to search for the ExpiredSession to update in case it exists.
|
|
*
|
|
**/
|
|
where: ExpiredSessionWhereUniqueInput
|
|
/**
|
|
* In case the ExpiredSession found by the `where` argument doesn't exist, create a new ExpiredSession with this data.
|
|
*
|
|
**/
|
|
create: XOR<ExpiredSessionCreateInput, ExpiredSessionUncheckedCreateInput>
|
|
/**
|
|
* In case the ExpiredSession was found with the provided `where` argument, update it with this data.
|
|
*
|
|
**/
|
|
update: XOR<ExpiredSessionUpdateInput, ExpiredSessionUncheckedUpdateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession delete
|
|
*/
|
|
export type ExpiredSessionDeleteArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
/**
|
|
* Filter which ExpiredSession to delete.
|
|
*
|
|
**/
|
|
where: ExpiredSessionWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession deleteMany
|
|
*/
|
|
export type ExpiredSessionDeleteManyArgs = {
|
|
/**
|
|
* Filter which ExpiredSessions to delete
|
|
*
|
|
**/
|
|
where?: ExpiredSessionWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* ExpiredSession without action
|
|
*/
|
|
export type ExpiredSessionArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ExpiredSession
|
|
*
|
|
**/
|
|
select?: ExpiredSessionSelect | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Enums
|
|
*/
|
|
|
|
// Based on
|
|
// https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275
|
|
|
|
export const ExpiredSessionScalarFieldEnum: {
|
|
id: 'id',
|
|
token: 'token'
|
|
};
|
|
|
|
export type ExpiredSessionScalarFieldEnum = (typeof ExpiredSessionScalarFieldEnum)[keyof typeof ExpiredSessionScalarFieldEnum]
|
|
|
|
|
|
export const MessageScalarFieldEnum: {
|
|
id: 'id',
|
|
body: 'body',
|
|
userId: 'userId'
|
|
};
|
|
|
|
export type MessageScalarFieldEnum = (typeof MessageScalarFieldEnum)[keyof typeof MessageScalarFieldEnum]
|
|
|
|
|
|
export const QueryMode: {
|
|
default: 'default',
|
|
insensitive: 'insensitive'
|
|
};
|
|
|
|
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
|
|
|
|
|
export const RoomScalarFieldEnum: {
|
|
id: 'id',
|
|
name: 'name'
|
|
};
|
|
|
|
export type RoomScalarFieldEnum = (typeof RoomScalarFieldEnum)[keyof typeof RoomScalarFieldEnum]
|
|
|
|
|
|
export const ServerScalarFieldEnum: {
|
|
id: 'id',
|
|
name: 'name'
|
|
};
|
|
|
|
export type ServerScalarFieldEnum = (typeof ServerScalarFieldEnum)[keyof typeof ServerScalarFieldEnum]
|
|
|
|
|
|
export const SessionScalarFieldEnum: {
|
|
id: 'id',
|
|
token: 'token',
|
|
userId: 'userId'
|
|
};
|
|
|
|
export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum]
|
|
|
|
|
|
export const SortOrder: {
|
|
asc: 'asc',
|
|
desc: 'desc'
|
|
};
|
|
|
|
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
|
|
|
|
|
export const TransactionIsolationLevel: {
|
|
ReadUncommitted: 'ReadUncommitted',
|
|
ReadCommitted: 'ReadCommitted',
|
|
RepeatableRead: 'RepeatableRead',
|
|
Serializable: 'Serializable'
|
|
};
|
|
|
|
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
|
|
|
|
|
export const UserScalarFieldEnum: {
|
|
id: 'id',
|
|
email: 'email',
|
|
username: 'username',
|
|
passwordhash: 'passwordhash',
|
|
serverId: 'serverId'
|
|
};
|
|
|
|
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
|
|
|
|
|
/**
|
|
* Deep Input Types
|
|
*/
|
|
|
|
|
|
export type UserWhereInput = {
|
|
AND?: Enumerable<UserWhereInput>
|
|
OR?: Enumerable<UserWhereInput>
|
|
NOT?: Enumerable<UserWhereInput>
|
|
id?: StringFilter | string
|
|
email?: StringFilter | string
|
|
username?: StringFilter | string
|
|
passwordhash?: StringFilter | string
|
|
Server?: ServerListRelationFilter
|
|
serverId?: StringNullableFilter | string | null
|
|
Messages?: MessageListRelationFilter
|
|
Session?: SessionListRelationFilter
|
|
}
|
|
|
|
export type UserOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
email?: SortOrder
|
|
username?: SortOrder
|
|
passwordhash?: SortOrder
|
|
Server?: ServerOrderByRelationAggregateInput
|
|
serverId?: SortOrder
|
|
Messages?: MessageOrderByRelationAggregateInput
|
|
Session?: SessionOrderByRelationAggregateInput
|
|
}
|
|
|
|
export type UserWhereUniqueInput = {
|
|
id?: string
|
|
email?: string
|
|
username?: string
|
|
}
|
|
|
|
export type UserOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
email?: SortOrder
|
|
username?: SortOrder
|
|
passwordhash?: SortOrder
|
|
serverId?: SortOrder
|
|
_count?: UserCountOrderByAggregateInput
|
|
_max?: UserMaxOrderByAggregateInput
|
|
_min?: UserMinOrderByAggregateInput
|
|
}
|
|
|
|
export type UserScalarWhereWithAggregatesInput = {
|
|
AND?: Enumerable<UserScalarWhereWithAggregatesInput>
|
|
OR?: Enumerable<UserScalarWhereWithAggregatesInput>
|
|
NOT?: Enumerable<UserScalarWhereWithAggregatesInput>
|
|
id?: StringWithAggregatesFilter | string
|
|
email?: StringWithAggregatesFilter | string
|
|
username?: StringWithAggregatesFilter | string
|
|
passwordhash?: StringWithAggregatesFilter | string
|
|
serverId?: StringNullableWithAggregatesFilter | string | null
|
|
}
|
|
|
|
export type ServerWhereInput = {
|
|
AND?: Enumerable<ServerWhereInput>
|
|
OR?: Enumerable<ServerWhereInput>
|
|
NOT?: Enumerable<ServerWhereInput>
|
|
id?: StringFilter | string
|
|
name?: StringFilter | string
|
|
participants?: UserListRelationFilter
|
|
}
|
|
|
|
export type ServerOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
participants?: UserOrderByRelationAggregateInput
|
|
}
|
|
|
|
export type ServerWhereUniqueInput = {
|
|
id?: string
|
|
}
|
|
|
|
export type ServerOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
_count?: ServerCountOrderByAggregateInput
|
|
_max?: ServerMaxOrderByAggregateInput
|
|
_min?: ServerMinOrderByAggregateInput
|
|
}
|
|
|
|
export type ServerScalarWhereWithAggregatesInput = {
|
|
AND?: Enumerable<ServerScalarWhereWithAggregatesInput>
|
|
OR?: Enumerable<ServerScalarWhereWithAggregatesInput>
|
|
NOT?: Enumerable<ServerScalarWhereWithAggregatesInput>
|
|
id?: StringWithAggregatesFilter | string
|
|
name?: StringWithAggregatesFilter | string
|
|
}
|
|
|
|
export type RoomWhereInput = {
|
|
AND?: Enumerable<RoomWhereInput>
|
|
OR?: Enumerable<RoomWhereInput>
|
|
NOT?: Enumerable<RoomWhereInput>
|
|
id?: StringFilter | string
|
|
name?: StringFilter | string
|
|
}
|
|
|
|
export type RoomOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
}
|
|
|
|
export type RoomWhereUniqueInput = {
|
|
id?: string
|
|
}
|
|
|
|
export type RoomOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
_count?: RoomCountOrderByAggregateInput
|
|
_max?: RoomMaxOrderByAggregateInput
|
|
_min?: RoomMinOrderByAggregateInput
|
|
}
|
|
|
|
export type RoomScalarWhereWithAggregatesInput = {
|
|
AND?: Enumerable<RoomScalarWhereWithAggregatesInput>
|
|
OR?: Enumerable<RoomScalarWhereWithAggregatesInput>
|
|
NOT?: Enumerable<RoomScalarWhereWithAggregatesInput>
|
|
id?: StringWithAggregatesFilter | string
|
|
name?: StringWithAggregatesFilter | string
|
|
}
|
|
|
|
export type MessageWhereInput = {
|
|
AND?: Enumerable<MessageWhereInput>
|
|
OR?: Enumerable<MessageWhereInput>
|
|
NOT?: Enumerable<MessageWhereInput>
|
|
id?: StringFilter | string
|
|
body?: StringFilter | string
|
|
creator?: XOR<UserRelationFilter, UserWhereInput>
|
|
userId?: StringFilter | string
|
|
}
|
|
|
|
export type MessageOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
body?: SortOrder
|
|
creator?: UserOrderByWithRelationInput
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type MessageWhereUniqueInput = {
|
|
id?: string
|
|
}
|
|
|
|
export type MessageOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
body?: SortOrder
|
|
userId?: SortOrder
|
|
_count?: MessageCountOrderByAggregateInput
|
|
_max?: MessageMaxOrderByAggregateInput
|
|
_min?: MessageMinOrderByAggregateInput
|
|
}
|
|
|
|
export type MessageScalarWhereWithAggregatesInput = {
|
|
AND?: Enumerable<MessageScalarWhereWithAggregatesInput>
|
|
OR?: Enumerable<MessageScalarWhereWithAggregatesInput>
|
|
NOT?: Enumerable<MessageScalarWhereWithAggregatesInput>
|
|
id?: StringWithAggregatesFilter | string
|
|
body?: StringWithAggregatesFilter | string
|
|
userId?: StringWithAggregatesFilter | string
|
|
}
|
|
|
|
export type SessionWhereInput = {
|
|
AND?: Enumerable<SessionWhereInput>
|
|
OR?: Enumerable<SessionWhereInput>
|
|
NOT?: Enumerable<SessionWhereInput>
|
|
id?: StringFilter | string
|
|
token?: StringFilter | string
|
|
userId?: StringFilter | string
|
|
user?: XOR<UserRelationFilter, UserWhereInput>
|
|
}
|
|
|
|
export type SessionOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
userId?: SortOrder
|
|
user?: UserOrderByWithRelationInput
|
|
}
|
|
|
|
export type SessionWhereUniqueInput = {
|
|
id?: string
|
|
}
|
|
|
|
export type SessionOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
userId?: SortOrder
|
|
_count?: SessionCountOrderByAggregateInput
|
|
_max?: SessionMaxOrderByAggregateInput
|
|
_min?: SessionMinOrderByAggregateInput
|
|
}
|
|
|
|
export type SessionScalarWhereWithAggregatesInput = {
|
|
AND?: Enumerable<SessionScalarWhereWithAggregatesInput>
|
|
OR?: Enumerable<SessionScalarWhereWithAggregatesInput>
|
|
NOT?: Enumerable<SessionScalarWhereWithAggregatesInput>
|
|
id?: StringWithAggregatesFilter | string
|
|
token?: StringWithAggregatesFilter | string
|
|
userId?: StringWithAggregatesFilter | string
|
|
}
|
|
|
|
export type ExpiredSessionWhereInput = {
|
|
AND?: Enumerable<ExpiredSessionWhereInput>
|
|
OR?: Enumerable<ExpiredSessionWhereInput>
|
|
NOT?: Enumerable<ExpiredSessionWhereInput>
|
|
id?: StringFilter | string
|
|
token?: StringFilter | string
|
|
}
|
|
|
|
export type ExpiredSessionOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
}
|
|
|
|
export type ExpiredSessionWhereUniqueInput = {
|
|
id?: string
|
|
}
|
|
|
|
export type ExpiredSessionOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
_count?: ExpiredSessionCountOrderByAggregateInput
|
|
_max?: ExpiredSessionMaxOrderByAggregateInput
|
|
_min?: ExpiredSessionMinOrderByAggregateInput
|
|
}
|
|
|
|
export type ExpiredSessionScalarWhereWithAggregatesInput = {
|
|
AND?: Enumerable<ExpiredSessionScalarWhereWithAggregatesInput>
|
|
OR?: Enumerable<ExpiredSessionScalarWhereWithAggregatesInput>
|
|
NOT?: Enumerable<ExpiredSessionScalarWhereWithAggregatesInput>
|
|
id?: StringWithAggregatesFilter | string
|
|
token?: StringWithAggregatesFilter | string
|
|
}
|
|
|
|
export type UserCreateInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
Server?: ServerCreateNestedManyWithoutParticipantsInput
|
|
serverId?: string | null
|
|
Messages?: MessageCreateNestedManyWithoutCreatorInput
|
|
Session?: SessionCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserUncheckedCreateInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
Server?: ServerUncheckedCreateNestedManyWithoutParticipantsInput
|
|
serverId?: string | null
|
|
Messages?: MessageUncheckedCreateNestedManyWithoutCreatorInput
|
|
Session?: SessionUncheckedCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
Server?: ServerUpdateManyWithoutParticipantsNestedInput
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
Messages?: MessageUpdateManyWithoutCreatorNestedInput
|
|
Session?: SessionUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
Server?: ServerUncheckedUpdateManyWithoutParticipantsNestedInput
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
Messages?: MessageUncheckedUpdateManyWithoutCreatorNestedInput
|
|
Session?: SessionUncheckedUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserCreateManyInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
serverId?: string | null
|
|
}
|
|
|
|
export type UserUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
}
|
|
|
|
export type UserUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
}
|
|
|
|
export type ServerCreateInput = {
|
|
id?: string
|
|
name: string
|
|
participants?: UserCreateNestedManyWithoutServerInput
|
|
}
|
|
|
|
export type ServerUncheckedCreateInput = {
|
|
id?: string
|
|
name: string
|
|
participants?: UserUncheckedCreateNestedManyWithoutServerInput
|
|
}
|
|
|
|
export type ServerUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
participants?: UserUpdateManyWithoutServerNestedInput
|
|
}
|
|
|
|
export type ServerUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
participants?: UserUncheckedUpdateManyWithoutServerNestedInput
|
|
}
|
|
|
|
export type ServerCreateManyInput = {
|
|
id?: string
|
|
name: string
|
|
}
|
|
|
|
export type ServerUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ServerUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type RoomCreateInput = {
|
|
id?: string
|
|
name: string
|
|
}
|
|
|
|
export type RoomUncheckedCreateInput = {
|
|
id?: string
|
|
name: string
|
|
}
|
|
|
|
export type RoomUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type RoomUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type RoomCreateManyInput = {
|
|
id?: string
|
|
name: string
|
|
}
|
|
|
|
export type RoomUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type RoomUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type MessageCreateInput = {
|
|
id?: string
|
|
body: string
|
|
creator: UserCreateNestedOneWithoutMessagesInput
|
|
}
|
|
|
|
export type MessageUncheckedCreateInput = {
|
|
id?: string
|
|
body: string
|
|
userId: string
|
|
}
|
|
|
|
export type MessageUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
body?: StringFieldUpdateOperationsInput | string
|
|
creator?: UserUpdateOneRequiredWithoutMessagesNestedInput
|
|
}
|
|
|
|
export type MessageUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
body?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type MessageCreateManyInput = {
|
|
id?: string
|
|
body: string
|
|
userId: string
|
|
}
|
|
|
|
export type MessageUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
body?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type MessageUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
body?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type SessionCreateInput = {
|
|
id?: string
|
|
token: string
|
|
user: UserCreateNestedOneWithoutSessionInput
|
|
}
|
|
|
|
export type SessionUncheckedCreateInput = {
|
|
id?: string
|
|
token: string
|
|
userId: string
|
|
}
|
|
|
|
export type SessionUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
user?: UserUpdateOneRequiredWithoutSessionNestedInput
|
|
}
|
|
|
|
export type SessionUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type SessionCreateManyInput = {
|
|
id?: string
|
|
token: string
|
|
userId: string
|
|
}
|
|
|
|
export type SessionUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type SessionUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
userId?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ExpiredSessionCreateInput = {
|
|
id?: string
|
|
token: string
|
|
}
|
|
|
|
export type ExpiredSessionUncheckedCreateInput = {
|
|
id?: string
|
|
token: string
|
|
}
|
|
|
|
export type ExpiredSessionUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ExpiredSessionUncheckedUpdateInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ExpiredSessionCreateManyInput = {
|
|
id?: string
|
|
token: string
|
|
}
|
|
|
|
export type ExpiredSessionUpdateManyMutationInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ExpiredSessionUncheckedUpdateManyInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type StringFilter = {
|
|
equals?: string
|
|
in?: Enumerable<string>
|
|
notIn?: Enumerable<string>
|
|
lt?: string
|
|
lte?: string
|
|
gt?: string
|
|
gte?: string
|
|
contains?: string
|
|
startsWith?: string
|
|
endsWith?: string
|
|
mode?: QueryMode
|
|
not?: NestedStringFilter | string
|
|
}
|
|
|
|
export type ServerListRelationFilter = {
|
|
every?: ServerWhereInput
|
|
some?: ServerWhereInput
|
|
none?: ServerWhereInput
|
|
}
|
|
|
|
export type StringNullableFilter = {
|
|
equals?: string | null
|
|
in?: Enumerable<string> | null
|
|
notIn?: Enumerable<string> | null
|
|
lt?: string
|
|
lte?: string
|
|
gt?: string
|
|
gte?: string
|
|
contains?: string
|
|
startsWith?: string
|
|
endsWith?: string
|
|
mode?: QueryMode
|
|
not?: NestedStringNullableFilter | string | null
|
|
}
|
|
|
|
export type MessageListRelationFilter = {
|
|
every?: MessageWhereInput
|
|
some?: MessageWhereInput
|
|
none?: MessageWhereInput
|
|
}
|
|
|
|
export type SessionListRelationFilter = {
|
|
every?: SessionWhereInput
|
|
some?: SessionWhereInput
|
|
none?: SessionWhereInput
|
|
}
|
|
|
|
export type ServerOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type MessageOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type SessionOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type UserCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
email?: SortOrder
|
|
username?: SortOrder
|
|
passwordhash?: SortOrder
|
|
serverId?: SortOrder
|
|
}
|
|
|
|
export type UserMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
email?: SortOrder
|
|
username?: SortOrder
|
|
passwordhash?: SortOrder
|
|
serverId?: SortOrder
|
|
}
|
|
|
|
export type UserMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
email?: SortOrder
|
|
username?: SortOrder
|
|
passwordhash?: SortOrder
|
|
serverId?: SortOrder
|
|
}
|
|
|
|
export type StringWithAggregatesFilter = {
|
|
equals?: string
|
|
in?: Enumerable<string>
|
|
notIn?: Enumerable<string>
|
|
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 StringNullableWithAggregatesFilter = {
|
|
equals?: string | null
|
|
in?: Enumerable<string> | null
|
|
notIn?: Enumerable<string> | null
|
|
lt?: string
|
|
lte?: string
|
|
gt?: string
|
|
gte?: string
|
|
contains?: string
|
|
startsWith?: string
|
|
endsWith?: string
|
|
mode?: QueryMode
|
|
not?: NestedStringNullableWithAggregatesFilter | string | null
|
|
_count?: NestedIntNullableFilter
|
|
_min?: NestedStringNullableFilter
|
|
_max?: NestedStringNullableFilter
|
|
}
|
|
|
|
export type UserListRelationFilter = {
|
|
every?: UserWhereInput
|
|
some?: UserWhereInput
|
|
none?: UserWhereInput
|
|
}
|
|
|
|
export type UserOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type ServerCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
}
|
|
|
|
export type ServerMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
}
|
|
|
|
export type ServerMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
}
|
|
|
|
export type RoomCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
}
|
|
|
|
export type RoomMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
}
|
|
|
|
export type RoomMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
name?: SortOrder
|
|
}
|
|
|
|
export type UserRelationFilter = {
|
|
is?: UserWhereInput
|
|
isNot?: UserWhereInput
|
|
}
|
|
|
|
export type MessageCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
body?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type MessageMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
body?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type MessageMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
body?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type SessionCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type SessionMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type SessionMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
userId?: SortOrder
|
|
}
|
|
|
|
export type ExpiredSessionCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
}
|
|
|
|
export type ExpiredSessionMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
}
|
|
|
|
export type ExpiredSessionMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
token?: SortOrder
|
|
}
|
|
|
|
export type ServerCreateNestedManyWithoutParticipantsInput = {
|
|
create?: XOR<Enumerable<ServerCreateWithoutParticipantsInput>, Enumerable<ServerUncheckedCreateWithoutParticipantsInput>>
|
|
connectOrCreate?: Enumerable<ServerCreateOrConnectWithoutParticipantsInput>
|
|
connect?: Enumerable<ServerWhereUniqueInput>
|
|
}
|
|
|
|
export type MessageCreateNestedManyWithoutCreatorInput = {
|
|
create?: XOR<Enumerable<MessageCreateWithoutCreatorInput>, Enumerable<MessageUncheckedCreateWithoutCreatorInput>>
|
|
connectOrCreate?: Enumerable<MessageCreateOrConnectWithoutCreatorInput>
|
|
createMany?: MessageCreateManyCreatorInputEnvelope
|
|
connect?: Enumerable<MessageWhereUniqueInput>
|
|
}
|
|
|
|
export type SessionCreateNestedManyWithoutUserInput = {
|
|
create?: XOR<Enumerable<SessionCreateWithoutUserInput>, Enumerable<SessionUncheckedCreateWithoutUserInput>>
|
|
connectOrCreate?: Enumerable<SessionCreateOrConnectWithoutUserInput>
|
|
createMany?: SessionCreateManyUserInputEnvelope
|
|
connect?: Enumerable<SessionWhereUniqueInput>
|
|
}
|
|
|
|
export type ServerUncheckedCreateNestedManyWithoutParticipantsInput = {
|
|
create?: XOR<Enumerable<ServerCreateWithoutParticipantsInput>, Enumerable<ServerUncheckedCreateWithoutParticipantsInput>>
|
|
connectOrCreate?: Enumerable<ServerCreateOrConnectWithoutParticipantsInput>
|
|
connect?: Enumerable<ServerWhereUniqueInput>
|
|
}
|
|
|
|
export type MessageUncheckedCreateNestedManyWithoutCreatorInput = {
|
|
create?: XOR<Enumerable<MessageCreateWithoutCreatorInput>, Enumerable<MessageUncheckedCreateWithoutCreatorInput>>
|
|
connectOrCreate?: Enumerable<MessageCreateOrConnectWithoutCreatorInput>
|
|
createMany?: MessageCreateManyCreatorInputEnvelope
|
|
connect?: Enumerable<MessageWhereUniqueInput>
|
|
}
|
|
|
|
export type SessionUncheckedCreateNestedManyWithoutUserInput = {
|
|
create?: XOR<Enumerable<SessionCreateWithoutUserInput>, Enumerable<SessionUncheckedCreateWithoutUserInput>>
|
|
connectOrCreate?: Enumerable<SessionCreateOrConnectWithoutUserInput>
|
|
createMany?: SessionCreateManyUserInputEnvelope
|
|
connect?: Enumerable<SessionWhereUniqueInput>
|
|
}
|
|
|
|
export type StringFieldUpdateOperationsInput = {
|
|
set?: string
|
|
}
|
|
|
|
export type ServerUpdateManyWithoutParticipantsNestedInput = {
|
|
create?: XOR<Enumerable<ServerCreateWithoutParticipantsInput>, Enumerable<ServerUncheckedCreateWithoutParticipantsInput>>
|
|
connectOrCreate?: Enumerable<ServerCreateOrConnectWithoutParticipantsInput>
|
|
upsert?: Enumerable<ServerUpsertWithWhereUniqueWithoutParticipantsInput>
|
|
set?: Enumerable<ServerWhereUniqueInput>
|
|
disconnect?: Enumerable<ServerWhereUniqueInput>
|
|
delete?: Enumerable<ServerWhereUniqueInput>
|
|
connect?: Enumerable<ServerWhereUniqueInput>
|
|
update?: Enumerable<ServerUpdateWithWhereUniqueWithoutParticipantsInput>
|
|
updateMany?: Enumerable<ServerUpdateManyWithWhereWithoutParticipantsInput>
|
|
deleteMany?: Enumerable<ServerScalarWhereInput>
|
|
}
|
|
|
|
export type NullableStringFieldUpdateOperationsInput = {
|
|
set?: string | null
|
|
}
|
|
|
|
export type MessageUpdateManyWithoutCreatorNestedInput = {
|
|
create?: XOR<Enumerable<MessageCreateWithoutCreatorInput>, Enumerable<MessageUncheckedCreateWithoutCreatorInput>>
|
|
connectOrCreate?: Enumerable<MessageCreateOrConnectWithoutCreatorInput>
|
|
upsert?: Enumerable<MessageUpsertWithWhereUniqueWithoutCreatorInput>
|
|
createMany?: MessageCreateManyCreatorInputEnvelope
|
|
set?: Enumerable<MessageWhereUniqueInput>
|
|
disconnect?: Enumerable<MessageWhereUniqueInput>
|
|
delete?: Enumerable<MessageWhereUniqueInput>
|
|
connect?: Enumerable<MessageWhereUniqueInput>
|
|
update?: Enumerable<MessageUpdateWithWhereUniqueWithoutCreatorInput>
|
|
updateMany?: Enumerable<MessageUpdateManyWithWhereWithoutCreatorInput>
|
|
deleteMany?: Enumerable<MessageScalarWhereInput>
|
|
}
|
|
|
|
export type SessionUpdateManyWithoutUserNestedInput = {
|
|
create?: XOR<Enumerable<SessionCreateWithoutUserInput>, Enumerable<SessionUncheckedCreateWithoutUserInput>>
|
|
connectOrCreate?: Enumerable<SessionCreateOrConnectWithoutUserInput>
|
|
upsert?: Enumerable<SessionUpsertWithWhereUniqueWithoutUserInput>
|
|
createMany?: SessionCreateManyUserInputEnvelope
|
|
set?: Enumerable<SessionWhereUniqueInput>
|
|
disconnect?: Enumerable<SessionWhereUniqueInput>
|
|
delete?: Enumerable<SessionWhereUniqueInput>
|
|
connect?: Enumerable<SessionWhereUniqueInput>
|
|
update?: Enumerable<SessionUpdateWithWhereUniqueWithoutUserInput>
|
|
updateMany?: Enumerable<SessionUpdateManyWithWhereWithoutUserInput>
|
|
deleteMany?: Enumerable<SessionScalarWhereInput>
|
|
}
|
|
|
|
export type ServerUncheckedUpdateManyWithoutParticipantsNestedInput = {
|
|
create?: XOR<Enumerable<ServerCreateWithoutParticipantsInput>, Enumerable<ServerUncheckedCreateWithoutParticipantsInput>>
|
|
connectOrCreate?: Enumerable<ServerCreateOrConnectWithoutParticipantsInput>
|
|
upsert?: Enumerable<ServerUpsertWithWhereUniqueWithoutParticipantsInput>
|
|
set?: Enumerable<ServerWhereUniqueInput>
|
|
disconnect?: Enumerable<ServerWhereUniqueInput>
|
|
delete?: Enumerable<ServerWhereUniqueInput>
|
|
connect?: Enumerable<ServerWhereUniqueInput>
|
|
update?: Enumerable<ServerUpdateWithWhereUniqueWithoutParticipantsInput>
|
|
updateMany?: Enumerable<ServerUpdateManyWithWhereWithoutParticipantsInput>
|
|
deleteMany?: Enumerable<ServerScalarWhereInput>
|
|
}
|
|
|
|
export type MessageUncheckedUpdateManyWithoutCreatorNestedInput = {
|
|
create?: XOR<Enumerable<MessageCreateWithoutCreatorInput>, Enumerable<MessageUncheckedCreateWithoutCreatorInput>>
|
|
connectOrCreate?: Enumerable<MessageCreateOrConnectWithoutCreatorInput>
|
|
upsert?: Enumerable<MessageUpsertWithWhereUniqueWithoutCreatorInput>
|
|
createMany?: MessageCreateManyCreatorInputEnvelope
|
|
set?: Enumerable<MessageWhereUniqueInput>
|
|
disconnect?: Enumerable<MessageWhereUniqueInput>
|
|
delete?: Enumerable<MessageWhereUniqueInput>
|
|
connect?: Enumerable<MessageWhereUniqueInput>
|
|
update?: Enumerable<MessageUpdateWithWhereUniqueWithoutCreatorInput>
|
|
updateMany?: Enumerable<MessageUpdateManyWithWhereWithoutCreatorInput>
|
|
deleteMany?: Enumerable<MessageScalarWhereInput>
|
|
}
|
|
|
|
export type SessionUncheckedUpdateManyWithoutUserNestedInput = {
|
|
create?: XOR<Enumerable<SessionCreateWithoutUserInput>, Enumerable<SessionUncheckedCreateWithoutUserInput>>
|
|
connectOrCreate?: Enumerable<SessionCreateOrConnectWithoutUserInput>
|
|
upsert?: Enumerable<SessionUpsertWithWhereUniqueWithoutUserInput>
|
|
createMany?: SessionCreateManyUserInputEnvelope
|
|
set?: Enumerable<SessionWhereUniqueInput>
|
|
disconnect?: Enumerable<SessionWhereUniqueInput>
|
|
delete?: Enumerable<SessionWhereUniqueInput>
|
|
connect?: Enumerable<SessionWhereUniqueInput>
|
|
update?: Enumerable<SessionUpdateWithWhereUniqueWithoutUserInput>
|
|
updateMany?: Enumerable<SessionUpdateManyWithWhereWithoutUserInput>
|
|
deleteMany?: Enumerable<SessionScalarWhereInput>
|
|
}
|
|
|
|
export type UserCreateNestedManyWithoutServerInput = {
|
|
create?: XOR<Enumerable<UserCreateWithoutServerInput>, Enumerable<UserUncheckedCreateWithoutServerInput>>
|
|
connectOrCreate?: Enumerable<UserCreateOrConnectWithoutServerInput>
|
|
connect?: Enumerable<UserWhereUniqueInput>
|
|
}
|
|
|
|
export type UserUncheckedCreateNestedManyWithoutServerInput = {
|
|
create?: XOR<Enumerable<UserCreateWithoutServerInput>, Enumerable<UserUncheckedCreateWithoutServerInput>>
|
|
connectOrCreate?: Enumerable<UserCreateOrConnectWithoutServerInput>
|
|
connect?: Enumerable<UserWhereUniqueInput>
|
|
}
|
|
|
|
export type UserUpdateManyWithoutServerNestedInput = {
|
|
create?: XOR<Enumerable<UserCreateWithoutServerInput>, Enumerable<UserUncheckedCreateWithoutServerInput>>
|
|
connectOrCreate?: Enumerable<UserCreateOrConnectWithoutServerInput>
|
|
upsert?: Enumerable<UserUpsertWithWhereUniqueWithoutServerInput>
|
|
set?: Enumerable<UserWhereUniqueInput>
|
|
disconnect?: Enumerable<UserWhereUniqueInput>
|
|
delete?: Enumerable<UserWhereUniqueInput>
|
|
connect?: Enumerable<UserWhereUniqueInput>
|
|
update?: Enumerable<UserUpdateWithWhereUniqueWithoutServerInput>
|
|
updateMany?: Enumerable<UserUpdateManyWithWhereWithoutServerInput>
|
|
deleteMany?: Enumerable<UserScalarWhereInput>
|
|
}
|
|
|
|
export type UserUncheckedUpdateManyWithoutServerNestedInput = {
|
|
create?: XOR<Enumerable<UserCreateWithoutServerInput>, Enumerable<UserUncheckedCreateWithoutServerInput>>
|
|
connectOrCreate?: Enumerable<UserCreateOrConnectWithoutServerInput>
|
|
upsert?: Enumerable<UserUpsertWithWhereUniqueWithoutServerInput>
|
|
set?: Enumerable<UserWhereUniqueInput>
|
|
disconnect?: Enumerable<UserWhereUniqueInput>
|
|
delete?: Enumerable<UserWhereUniqueInput>
|
|
connect?: Enumerable<UserWhereUniqueInput>
|
|
update?: Enumerable<UserUpdateWithWhereUniqueWithoutServerInput>
|
|
updateMany?: Enumerable<UserUpdateManyWithWhereWithoutServerInput>
|
|
deleteMany?: Enumerable<UserScalarWhereInput>
|
|
}
|
|
|
|
export type UserCreateNestedOneWithoutMessagesInput = {
|
|
create?: XOR<UserCreateWithoutMessagesInput, UserUncheckedCreateWithoutMessagesInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutMessagesInput
|
|
connect?: UserWhereUniqueInput
|
|
}
|
|
|
|
export type UserUpdateOneRequiredWithoutMessagesNestedInput = {
|
|
create?: XOR<UserCreateWithoutMessagesInput, UserUncheckedCreateWithoutMessagesInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutMessagesInput
|
|
upsert?: UserUpsertWithoutMessagesInput
|
|
connect?: UserWhereUniqueInput
|
|
update?: XOR<UserUpdateWithoutMessagesInput, UserUncheckedUpdateWithoutMessagesInput>
|
|
}
|
|
|
|
export type UserCreateNestedOneWithoutSessionInput = {
|
|
create?: XOR<UserCreateWithoutSessionInput, UserUncheckedCreateWithoutSessionInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutSessionInput
|
|
connect?: UserWhereUniqueInput
|
|
}
|
|
|
|
export type UserUpdateOneRequiredWithoutSessionNestedInput = {
|
|
create?: XOR<UserCreateWithoutSessionInput, UserUncheckedCreateWithoutSessionInput>
|
|
connectOrCreate?: UserCreateOrConnectWithoutSessionInput
|
|
upsert?: UserUpsertWithoutSessionInput
|
|
connect?: UserWhereUniqueInput
|
|
update?: XOR<UserUpdateWithoutSessionInput, UserUncheckedUpdateWithoutSessionInput>
|
|
}
|
|
|
|
export type NestedStringFilter = {
|
|
equals?: string
|
|
in?: Enumerable<string>
|
|
notIn?: Enumerable<string>
|
|
lt?: string
|
|
lte?: string
|
|
gt?: string
|
|
gte?: string
|
|
contains?: string
|
|
startsWith?: string
|
|
endsWith?: string
|
|
not?: NestedStringFilter | string
|
|
}
|
|
|
|
export type NestedStringNullableFilter = {
|
|
equals?: string | null
|
|
in?: Enumerable<string> | null
|
|
notIn?: Enumerable<string> | null
|
|
lt?: string
|
|
lte?: string
|
|
gt?: string
|
|
gte?: string
|
|
contains?: string
|
|
startsWith?: string
|
|
endsWith?: string
|
|
not?: NestedStringNullableFilter | string | null
|
|
}
|
|
|
|
export type NestedStringWithAggregatesFilter = {
|
|
equals?: string
|
|
in?: Enumerable<string>
|
|
notIn?: Enumerable<string>
|
|
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<number>
|
|
notIn?: Enumerable<number>
|
|
lt?: number
|
|
lte?: number
|
|
gt?: number
|
|
gte?: number
|
|
not?: NestedIntFilter | number
|
|
}
|
|
|
|
export type NestedStringNullableWithAggregatesFilter = {
|
|
equals?: string | null
|
|
in?: Enumerable<string> | null
|
|
notIn?: Enumerable<string> | null
|
|
lt?: string
|
|
lte?: string
|
|
gt?: string
|
|
gte?: string
|
|
contains?: string
|
|
startsWith?: string
|
|
endsWith?: string
|
|
not?: NestedStringNullableWithAggregatesFilter | string | null
|
|
_count?: NestedIntNullableFilter
|
|
_min?: NestedStringNullableFilter
|
|
_max?: NestedStringNullableFilter
|
|
}
|
|
|
|
export type NestedIntNullableFilter = {
|
|
equals?: number | null
|
|
in?: Enumerable<number> | null
|
|
notIn?: Enumerable<number> | null
|
|
lt?: number
|
|
lte?: number
|
|
gt?: number
|
|
gte?: number
|
|
not?: NestedIntNullableFilter | number | null
|
|
}
|
|
|
|
export type ServerCreateWithoutParticipantsInput = {
|
|
id?: string
|
|
name: string
|
|
}
|
|
|
|
export type ServerUncheckedCreateWithoutParticipantsInput = {
|
|
id?: string
|
|
name: string
|
|
}
|
|
|
|
export type ServerCreateOrConnectWithoutParticipantsInput = {
|
|
where: ServerWhereUniqueInput
|
|
create: XOR<ServerCreateWithoutParticipantsInput, ServerUncheckedCreateWithoutParticipantsInput>
|
|
}
|
|
|
|
export type MessageCreateWithoutCreatorInput = {
|
|
id?: string
|
|
body: string
|
|
}
|
|
|
|
export type MessageUncheckedCreateWithoutCreatorInput = {
|
|
id?: string
|
|
body: string
|
|
}
|
|
|
|
export type MessageCreateOrConnectWithoutCreatorInput = {
|
|
where: MessageWhereUniqueInput
|
|
create: XOR<MessageCreateWithoutCreatorInput, MessageUncheckedCreateWithoutCreatorInput>
|
|
}
|
|
|
|
export type MessageCreateManyCreatorInputEnvelope = {
|
|
data: Enumerable<MessageCreateManyCreatorInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
export type SessionCreateWithoutUserInput = {
|
|
id?: string
|
|
token: string
|
|
}
|
|
|
|
export type SessionUncheckedCreateWithoutUserInput = {
|
|
id?: string
|
|
token: string
|
|
}
|
|
|
|
export type SessionCreateOrConnectWithoutUserInput = {
|
|
where: SessionWhereUniqueInput
|
|
create: XOR<SessionCreateWithoutUserInput, SessionUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type SessionCreateManyUserInputEnvelope = {
|
|
data: Enumerable<SessionCreateManyUserInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
export type ServerUpsertWithWhereUniqueWithoutParticipantsInput = {
|
|
where: ServerWhereUniqueInput
|
|
update: XOR<ServerUpdateWithoutParticipantsInput, ServerUncheckedUpdateWithoutParticipantsInput>
|
|
create: XOR<ServerCreateWithoutParticipantsInput, ServerUncheckedCreateWithoutParticipantsInput>
|
|
}
|
|
|
|
export type ServerUpdateWithWhereUniqueWithoutParticipantsInput = {
|
|
where: ServerWhereUniqueInput
|
|
data: XOR<ServerUpdateWithoutParticipantsInput, ServerUncheckedUpdateWithoutParticipantsInput>
|
|
}
|
|
|
|
export type ServerUpdateManyWithWhereWithoutParticipantsInput = {
|
|
where: ServerScalarWhereInput
|
|
data: XOR<ServerUpdateManyMutationInput, ServerUncheckedUpdateManyWithoutServerInput>
|
|
}
|
|
|
|
export type ServerScalarWhereInput = {
|
|
AND?: Enumerable<ServerScalarWhereInput>
|
|
OR?: Enumerable<ServerScalarWhereInput>
|
|
NOT?: Enumerable<ServerScalarWhereInput>
|
|
id?: StringFilter | string
|
|
name?: StringFilter | string
|
|
}
|
|
|
|
export type MessageUpsertWithWhereUniqueWithoutCreatorInput = {
|
|
where: MessageWhereUniqueInput
|
|
update: XOR<MessageUpdateWithoutCreatorInput, MessageUncheckedUpdateWithoutCreatorInput>
|
|
create: XOR<MessageCreateWithoutCreatorInput, MessageUncheckedCreateWithoutCreatorInput>
|
|
}
|
|
|
|
export type MessageUpdateWithWhereUniqueWithoutCreatorInput = {
|
|
where: MessageWhereUniqueInput
|
|
data: XOR<MessageUpdateWithoutCreatorInput, MessageUncheckedUpdateWithoutCreatorInput>
|
|
}
|
|
|
|
export type MessageUpdateManyWithWhereWithoutCreatorInput = {
|
|
where: MessageScalarWhereInput
|
|
data: XOR<MessageUpdateManyMutationInput, MessageUncheckedUpdateManyWithoutMessagesInput>
|
|
}
|
|
|
|
export type MessageScalarWhereInput = {
|
|
AND?: Enumerable<MessageScalarWhereInput>
|
|
OR?: Enumerable<MessageScalarWhereInput>
|
|
NOT?: Enumerable<MessageScalarWhereInput>
|
|
id?: StringFilter | string
|
|
body?: StringFilter | string
|
|
userId?: StringFilter | string
|
|
}
|
|
|
|
export type SessionUpsertWithWhereUniqueWithoutUserInput = {
|
|
where: SessionWhereUniqueInput
|
|
update: XOR<SessionUpdateWithoutUserInput, SessionUncheckedUpdateWithoutUserInput>
|
|
create: XOR<SessionCreateWithoutUserInput, SessionUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type SessionUpdateWithWhereUniqueWithoutUserInput = {
|
|
where: SessionWhereUniqueInput
|
|
data: XOR<SessionUpdateWithoutUserInput, SessionUncheckedUpdateWithoutUserInput>
|
|
}
|
|
|
|
export type SessionUpdateManyWithWhereWithoutUserInput = {
|
|
where: SessionScalarWhereInput
|
|
data: XOR<SessionUpdateManyMutationInput, SessionUncheckedUpdateManyWithoutSessionInput>
|
|
}
|
|
|
|
export type SessionScalarWhereInput = {
|
|
AND?: Enumerable<SessionScalarWhereInput>
|
|
OR?: Enumerable<SessionScalarWhereInput>
|
|
NOT?: Enumerable<SessionScalarWhereInput>
|
|
id?: StringFilter | string
|
|
token?: StringFilter | string
|
|
userId?: StringFilter | string
|
|
}
|
|
|
|
export type UserCreateWithoutServerInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
serverId?: string | null
|
|
Messages?: MessageCreateNestedManyWithoutCreatorInput
|
|
Session?: SessionCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserUncheckedCreateWithoutServerInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
serverId?: string | null
|
|
Messages?: MessageUncheckedCreateNestedManyWithoutCreatorInput
|
|
Session?: SessionUncheckedCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserCreateOrConnectWithoutServerInput = {
|
|
where: UserWhereUniqueInput
|
|
create: XOR<UserCreateWithoutServerInput, UserUncheckedCreateWithoutServerInput>
|
|
}
|
|
|
|
export type UserUpsertWithWhereUniqueWithoutServerInput = {
|
|
where: UserWhereUniqueInput
|
|
update: XOR<UserUpdateWithoutServerInput, UserUncheckedUpdateWithoutServerInput>
|
|
create: XOR<UserCreateWithoutServerInput, UserUncheckedCreateWithoutServerInput>
|
|
}
|
|
|
|
export type UserUpdateWithWhereUniqueWithoutServerInput = {
|
|
where: UserWhereUniqueInput
|
|
data: XOR<UserUpdateWithoutServerInput, UserUncheckedUpdateWithoutServerInput>
|
|
}
|
|
|
|
export type UserUpdateManyWithWhereWithoutServerInput = {
|
|
where: UserScalarWhereInput
|
|
data: XOR<UserUpdateManyMutationInput, UserUncheckedUpdateManyWithoutParticipantsInput>
|
|
}
|
|
|
|
export type UserScalarWhereInput = {
|
|
AND?: Enumerable<UserScalarWhereInput>
|
|
OR?: Enumerable<UserScalarWhereInput>
|
|
NOT?: Enumerable<UserScalarWhereInput>
|
|
id?: StringFilter | string
|
|
email?: StringFilter | string
|
|
username?: StringFilter | string
|
|
passwordhash?: StringFilter | string
|
|
serverId?: StringNullableFilter | string | null
|
|
}
|
|
|
|
export type UserCreateWithoutMessagesInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
Server?: ServerCreateNestedManyWithoutParticipantsInput
|
|
serverId?: string | null
|
|
Session?: SessionCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserUncheckedCreateWithoutMessagesInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
Server?: ServerUncheckedCreateNestedManyWithoutParticipantsInput
|
|
serverId?: string | null
|
|
Session?: SessionUncheckedCreateNestedManyWithoutUserInput
|
|
}
|
|
|
|
export type UserCreateOrConnectWithoutMessagesInput = {
|
|
where: UserWhereUniqueInput
|
|
create: XOR<UserCreateWithoutMessagesInput, UserUncheckedCreateWithoutMessagesInput>
|
|
}
|
|
|
|
export type UserUpsertWithoutMessagesInput = {
|
|
update: XOR<UserUpdateWithoutMessagesInput, UserUncheckedUpdateWithoutMessagesInput>
|
|
create: XOR<UserCreateWithoutMessagesInput, UserUncheckedCreateWithoutMessagesInput>
|
|
}
|
|
|
|
export type UserUpdateWithoutMessagesInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
Server?: ServerUpdateManyWithoutParticipantsNestedInput
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
Session?: SessionUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateWithoutMessagesInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
Server?: ServerUncheckedUpdateManyWithoutParticipantsNestedInput
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
Session?: SessionUncheckedUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserCreateWithoutSessionInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
Server?: ServerCreateNestedManyWithoutParticipantsInput
|
|
serverId?: string | null
|
|
Messages?: MessageCreateNestedManyWithoutCreatorInput
|
|
}
|
|
|
|
export type UserUncheckedCreateWithoutSessionInput = {
|
|
id?: string
|
|
email: string
|
|
username: string
|
|
passwordhash: string
|
|
Server?: ServerUncheckedCreateNestedManyWithoutParticipantsInput
|
|
serverId?: string | null
|
|
Messages?: MessageUncheckedCreateNestedManyWithoutCreatorInput
|
|
}
|
|
|
|
export type UserCreateOrConnectWithoutSessionInput = {
|
|
where: UserWhereUniqueInput
|
|
create: XOR<UserCreateWithoutSessionInput, UserUncheckedCreateWithoutSessionInput>
|
|
}
|
|
|
|
export type UserUpsertWithoutSessionInput = {
|
|
update: XOR<UserUpdateWithoutSessionInput, UserUncheckedUpdateWithoutSessionInput>
|
|
create: XOR<UserCreateWithoutSessionInput, UserUncheckedCreateWithoutSessionInput>
|
|
}
|
|
|
|
export type UserUpdateWithoutSessionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
Server?: ServerUpdateManyWithoutParticipantsNestedInput
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
Messages?: MessageUpdateManyWithoutCreatorNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateWithoutSessionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
Server?: ServerUncheckedUpdateManyWithoutParticipantsNestedInput
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
Messages?: MessageUncheckedUpdateManyWithoutCreatorNestedInput
|
|
}
|
|
|
|
export type MessageCreateManyCreatorInput = {
|
|
id?: string
|
|
body: string
|
|
}
|
|
|
|
export type SessionCreateManyUserInput = {
|
|
id?: string
|
|
token: string
|
|
}
|
|
|
|
export type ServerUpdateWithoutParticipantsInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ServerUncheckedUpdateWithoutParticipantsInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ServerUncheckedUpdateManyWithoutServerInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
name?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type MessageUpdateWithoutCreatorInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
body?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type MessageUncheckedUpdateWithoutCreatorInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
body?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type MessageUncheckedUpdateManyWithoutMessagesInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
body?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type SessionUpdateWithoutUserInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type SessionUncheckedUpdateWithoutUserInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type SessionUncheckedUpdateManyWithoutSessionInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
token?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type UserUpdateWithoutServerInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
Messages?: MessageUpdateManyWithoutCreatorNestedInput
|
|
Session?: SessionUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateWithoutServerInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
Messages?: MessageUncheckedUpdateManyWithoutCreatorNestedInput
|
|
Session?: SessionUncheckedUpdateManyWithoutUserNestedInput
|
|
}
|
|
|
|
export type UserUncheckedUpdateManyWithoutParticipantsInput = {
|
|
id?: StringFieldUpdateOperationsInput | string
|
|
email?: StringFieldUpdateOperationsInput | string
|
|
username?: StringFieldUpdateOperationsInput | string
|
|
passwordhash?: StringFieldUpdateOperationsInput | string
|
|
serverId?: NullableStringFieldUpdateOperationsInput | string | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Batch Payload for updateMany & deleteMany & createMany
|
|
*/
|
|
|
|
export type BatchPayload = {
|
|
count: number
|
|
}
|
|
|
|
/**
|
|
* DMMF
|
|
*/
|
|
export const dmmf: runtime.BaseDMMF
|
|
} |