3681 lines
108 KiB
TypeScript
3681 lines
108 KiB
TypeScript
|
|
/**
|
|
* Client
|
|
**/
|
|
|
|
import * as runtime from '@prisma/client/runtime/index';
|
|
declare const prisma: unique symbol
|
|
export interface PrismaPromise<A> extends 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 Project
|
|
*
|
|
*/
|
|
export type Project = {
|
|
id: number
|
|
title: string
|
|
uuid: string
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
network: string
|
|
}
|
|
|
|
/**
|
|
* Model Metric
|
|
*
|
|
*/
|
|
export type Metric = {
|
|
id: number
|
|
path: string
|
|
uuid: string
|
|
remote_address: string
|
|
date_requested: Date
|
|
projectId: number
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
}
|
|
|
|
|
|
/**
|
|
* ## Prisma Client ʲˢ
|
|
*
|
|
* Type-safe database client for TypeScript & Node.js
|
|
* @example
|
|
* ```
|
|
* const prisma = new PrismaClient()
|
|
* // Fetch zero or more Projects
|
|
* const projects = await prisma.project.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 Projects
|
|
* const projects = await prisma.project.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.project`: Exposes CRUD operations for the **Project** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Projects
|
|
* const projects = await prisma.project.findMany()
|
|
* ```
|
|
*/
|
|
get project(): Prisma.ProjectDelegate<GlobalReject>;
|
|
|
|
/**
|
|
* `prisma.metric`: Exposes CRUD operations for the **Metric** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Metrics
|
|
* const metrics = await prisma.metric.findMany()
|
|
* ```
|
|
*/
|
|
get metric(): Prisma.MetricDelegate<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.9.0
|
|
* Query Engine version: ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5
|
|
*/
|
|
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 Cast<A, B> = A extends B ? A : B;
|
|
|
|
export const type: unique symbol;
|
|
|
|
export function validator<V>(): <S>(select: runtime.Types.Utils.LegacyExact<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: {
|
|
Project: 'Project',
|
|
Metric: 'Metric'
|
|
};
|
|
|
|
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 ProjectCountOutputType
|
|
*/
|
|
|
|
|
|
export type ProjectCountOutputType = {
|
|
Metrics: number
|
|
}
|
|
|
|
export type ProjectCountOutputTypeSelect = {
|
|
Metrics?: boolean
|
|
}
|
|
|
|
export type ProjectCountOutputTypeGetPayload<S extends boolean | null | undefined | ProjectCountOutputTypeArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? ProjectCountOutputType :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (ProjectCountOutputTypeArgs)
|
|
? ProjectCountOutputType
|
|
: S extends { select: any } & (ProjectCountOutputTypeArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends keyof ProjectCountOutputType ? ProjectCountOutputType[P] : never
|
|
}
|
|
: ProjectCountOutputType
|
|
|
|
|
|
|
|
|
|
// Custom InputTypes
|
|
|
|
/**
|
|
* ProjectCountOutputType without action
|
|
*/
|
|
export type ProjectCountOutputTypeArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the ProjectCountOutputType
|
|
*/
|
|
select?: ProjectCountOutputTypeSelect | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Models
|
|
*/
|
|
|
|
/**
|
|
* Model Project
|
|
*/
|
|
|
|
|
|
export type AggregateProject = {
|
|
_count: ProjectCountAggregateOutputType | null
|
|
_avg: ProjectAvgAggregateOutputType | null
|
|
_sum: ProjectSumAggregateOutputType | null
|
|
_min: ProjectMinAggregateOutputType | null
|
|
_max: ProjectMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type ProjectAvgAggregateOutputType = {
|
|
id: number | null
|
|
}
|
|
|
|
export type ProjectSumAggregateOutputType = {
|
|
id: number | null
|
|
}
|
|
|
|
export type ProjectMinAggregateOutputType = {
|
|
id: number | null
|
|
title: string | null
|
|
uuid: string | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
network: string | null
|
|
}
|
|
|
|
export type ProjectMaxAggregateOutputType = {
|
|
id: number | null
|
|
title: string | null
|
|
uuid: string | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
network: string | null
|
|
}
|
|
|
|
export type ProjectCountAggregateOutputType = {
|
|
id: number
|
|
title: number
|
|
uuid: number
|
|
createdAt: number
|
|
updatedAt: number
|
|
network: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type ProjectAvgAggregateInputType = {
|
|
id?: true
|
|
}
|
|
|
|
export type ProjectSumAggregateInputType = {
|
|
id?: true
|
|
}
|
|
|
|
export type ProjectMinAggregateInputType = {
|
|
id?: true
|
|
title?: true
|
|
uuid?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
network?: true
|
|
}
|
|
|
|
export type ProjectMaxAggregateInputType = {
|
|
id?: true
|
|
title?: true
|
|
uuid?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
network?: true
|
|
}
|
|
|
|
export type ProjectCountAggregateInputType = {
|
|
id?: true
|
|
title?: true
|
|
uuid?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
network?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type ProjectAggregateArgs = {
|
|
/**
|
|
* Filter which Project to aggregate.
|
|
*/
|
|
where?: ProjectWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Projects to fetch.
|
|
*/
|
|
orderBy?: Enumerable<ProjectOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: ProjectWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Projects 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` Projects.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Projects
|
|
**/
|
|
_count?: true | ProjectCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: ProjectAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: ProjectSumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: ProjectMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: ProjectMaxAggregateInputType
|
|
}
|
|
|
|
export type GetProjectAggregateType<T extends ProjectAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateProject]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateProject[P]>
|
|
: GetScalarType<T[P], AggregateProject[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type ProjectGroupByArgs = {
|
|
where?: ProjectWhereInput
|
|
orderBy?: Enumerable<ProjectOrderByWithAggregationInput>
|
|
by: ProjectScalarFieldEnum[]
|
|
having?: ProjectScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: ProjectCountAggregateInputType | true
|
|
_avg?: ProjectAvgAggregateInputType
|
|
_sum?: ProjectSumAggregateInputType
|
|
_min?: ProjectMinAggregateInputType
|
|
_max?: ProjectMaxAggregateInputType
|
|
}
|
|
|
|
|
|
export type ProjectGroupByOutputType = {
|
|
id: number
|
|
title: string
|
|
uuid: string
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
network: string
|
|
_count: ProjectCountAggregateOutputType | null
|
|
_avg: ProjectAvgAggregateOutputType | null
|
|
_sum: ProjectSumAggregateOutputType | null
|
|
_min: ProjectMinAggregateOutputType | null
|
|
_max: ProjectMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetProjectGroupByPayload<T extends ProjectGroupByArgs> = PrismaPromise<
|
|
Array<
|
|
PickArray<ProjectGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof ProjectGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], ProjectGroupByOutputType[P]>
|
|
: GetScalarType<T[P], ProjectGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type ProjectSelect = {
|
|
id?: boolean
|
|
title?: boolean
|
|
uuid?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
network?: boolean
|
|
Metrics?: boolean | Project$MetricsArgs
|
|
_count?: boolean | ProjectCountOutputTypeArgs
|
|
}
|
|
|
|
|
|
export type ProjectInclude = {
|
|
Metrics?: boolean | Project$MetricsArgs
|
|
_count?: boolean | ProjectCountOutputTypeArgs
|
|
}
|
|
|
|
export type ProjectGetPayload<S extends boolean | null | undefined | ProjectArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? Project :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (ProjectArgs | ProjectFindManyArgs)
|
|
? Project & {
|
|
[P in TruthyKeys<S['include']>]:
|
|
P extends 'Metrics' ? Array < MetricGetPayload<S['include'][P]>> :
|
|
P extends '_count' ? ProjectCountOutputTypeGetPayload<S['include'][P]> : never
|
|
}
|
|
: S extends { select: any } & (ProjectArgs | ProjectFindManyArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends 'Metrics' ? Array < MetricGetPayload<S['select'][P]>> :
|
|
P extends '_count' ? ProjectCountOutputTypeGetPayload<S['select'][P]> : P extends keyof Project ? Project[P] : never
|
|
}
|
|
: Project
|
|
|
|
|
|
type ProjectCountArgs =
|
|
Omit<ProjectFindManyArgs, 'select' | 'include'> & {
|
|
select?: ProjectCountAggregateInputType | true
|
|
}
|
|
|
|
export interface ProjectDelegate<GlobalRejectSettings extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined> {
|
|
|
|
/**
|
|
* Find zero or one Project that matches the filter.
|
|
* @param {ProjectFindUniqueArgs} args - Arguments to find a Project
|
|
* @example
|
|
* // Get one Project
|
|
* const project = await prisma.project.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUnique<T extends ProjectFindUniqueArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args: SelectSubset<T, ProjectFindUniqueArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Project'> extends True ? Prisma__ProjectClient<ProjectGetPayload<T>> : Prisma__ProjectClient<ProjectGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find one Project that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {ProjectFindUniqueOrThrowArgs} args - Arguments to find a Project
|
|
* @example
|
|
* // Get one Project
|
|
* const project = await prisma.project.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUniqueOrThrow<T extends ProjectFindUniqueOrThrowArgs>(
|
|
args?: SelectSubset<T, ProjectFindUniqueOrThrowArgs>
|
|
): Prisma__ProjectClient<ProjectGetPayload<T>>
|
|
|
|
/**
|
|
* Find the first Project 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 {ProjectFindFirstArgs} args - Arguments to find a Project
|
|
* @example
|
|
* // Get one Project
|
|
* const project = await prisma.project.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirst<T extends ProjectFindFirstArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args?: SelectSubset<T, ProjectFindFirstArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Project'> extends True ? Prisma__ProjectClient<ProjectGetPayload<T>> : Prisma__ProjectClient<ProjectGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find the first Project 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 {ProjectFindFirstOrThrowArgs} args - Arguments to find a Project
|
|
* @example
|
|
* // Get one Project
|
|
* const project = await prisma.project.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirstOrThrow<T extends ProjectFindFirstOrThrowArgs>(
|
|
args?: SelectSubset<T, ProjectFindFirstOrThrowArgs>
|
|
): Prisma__ProjectClient<ProjectGetPayload<T>>
|
|
|
|
/**
|
|
* Find zero or more Projects 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 {ProjectFindManyArgs=} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Projects
|
|
* const projects = await prisma.project.findMany()
|
|
*
|
|
* // Get first 10 Projects
|
|
* const projects = await prisma.project.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const projectWithIdOnly = await prisma.project.findMany({ select: { id: true } })
|
|
*
|
|
**/
|
|
findMany<T extends ProjectFindManyArgs>(
|
|
args?: SelectSubset<T, ProjectFindManyArgs>
|
|
): PrismaPromise<Array<ProjectGetPayload<T>>>
|
|
|
|
/**
|
|
* Create a Project.
|
|
* @param {ProjectCreateArgs} args - Arguments to create a Project.
|
|
* @example
|
|
* // Create one Project
|
|
* const Project = await prisma.project.create({
|
|
* data: {
|
|
* // ... data to create a Project
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
create<T extends ProjectCreateArgs>(
|
|
args: SelectSubset<T, ProjectCreateArgs>
|
|
): Prisma__ProjectClient<ProjectGetPayload<T>>
|
|
|
|
/**
|
|
* Create many Projects.
|
|
* @param {ProjectCreateManyArgs} args - Arguments to create many Projects.
|
|
* @example
|
|
* // Create many Projects
|
|
* const project = await prisma.project.createMany({
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
createMany<T extends ProjectCreateManyArgs>(
|
|
args?: SelectSubset<T, ProjectCreateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Delete a Project.
|
|
* @param {ProjectDeleteArgs} args - Arguments to delete one Project.
|
|
* @example
|
|
* // Delete one Project
|
|
* const Project = await prisma.project.delete({
|
|
* where: {
|
|
* // ... filter to delete one Project
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
delete<T extends ProjectDeleteArgs>(
|
|
args: SelectSubset<T, ProjectDeleteArgs>
|
|
): Prisma__ProjectClient<ProjectGetPayload<T>>
|
|
|
|
/**
|
|
* Update one Project.
|
|
* @param {ProjectUpdateArgs} args - Arguments to update one Project.
|
|
* @example
|
|
* // Update one Project
|
|
* const project = await prisma.project.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
update<T extends ProjectUpdateArgs>(
|
|
args: SelectSubset<T, ProjectUpdateArgs>
|
|
): Prisma__ProjectClient<ProjectGetPayload<T>>
|
|
|
|
/**
|
|
* Delete zero or more Projects.
|
|
* @param {ProjectDeleteManyArgs} args - Arguments to filter Projects to delete.
|
|
* @example
|
|
* // Delete a few Projects
|
|
* const { count } = await prisma.project.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
deleteMany<T extends ProjectDeleteManyArgs>(
|
|
args?: SelectSubset<T, ProjectDeleteManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Projects.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ProjectUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Projects
|
|
* const project = await prisma.project.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
updateMany<T extends ProjectUpdateManyArgs>(
|
|
args: SelectSubset<T, ProjectUpdateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Project.
|
|
* @param {ProjectUpsertArgs} args - Arguments to update or create a Project.
|
|
* @example
|
|
* // Update or create a Project
|
|
* const project = await prisma.project.upsert({
|
|
* create: {
|
|
* // ... data to create a Project
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Project we want to update
|
|
* }
|
|
* })
|
|
**/
|
|
upsert<T extends ProjectUpsertArgs>(
|
|
args: SelectSubset<T, ProjectUpsertArgs>
|
|
): Prisma__ProjectClient<ProjectGetPayload<T>>
|
|
|
|
/**
|
|
* Count the number of Projects.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ProjectCountArgs} args - Arguments to filter Projects to count.
|
|
* @example
|
|
* // Count the number of Projects
|
|
* const count = await prisma.project.count({
|
|
* where: {
|
|
* // ... the filter for the Projects we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends ProjectCountArgs>(
|
|
args?: Subset<T, ProjectCountArgs>,
|
|
): PrismaPromise<
|
|
T extends _Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], ProjectCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Project.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ProjectAggregateArgs} 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 ProjectAggregateArgs>(args: Subset<T, ProjectAggregateArgs>): PrismaPromise<GetProjectAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Project.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ProjectGroupByArgs} 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 ProjectGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: ProjectGroupByArgs['orderBy'] }
|
|
: { orderBy?: ProjectGroupByArgs['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, ProjectGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetProjectGroupByPayload<T> : PrismaPromise<InputErrors>
|
|
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Project.
|
|
* 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__ProjectClient<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';
|
|
|
|
Metrics<T extends Project$MetricsArgs= {}>(args?: Subset<T, Project$MetricsArgs>): PrismaPromise<Array<MetricGetPayload<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
|
|
|
|
/**
|
|
* Project base type for findUnique actions
|
|
*/
|
|
export type ProjectFindUniqueArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* Filter, which Project to fetch.
|
|
*/
|
|
where: ProjectWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Project findUnique
|
|
*/
|
|
export interface ProjectFindUniqueArgs extends ProjectFindUniqueArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findUniqueOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Project findUniqueOrThrow
|
|
*/
|
|
export type ProjectFindUniqueOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* Filter, which Project to fetch.
|
|
*/
|
|
where: ProjectWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Project base type for findFirst actions
|
|
*/
|
|
export type ProjectFindFirstArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* Filter, which Project to fetch.
|
|
*/
|
|
where?: ProjectWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Projects to fetch.
|
|
*/
|
|
orderBy?: Enumerable<ProjectOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Projects.
|
|
*/
|
|
cursor?: ProjectWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Projects 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` Projects.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Projects.
|
|
*/
|
|
distinct?: Enumerable<ProjectScalarFieldEnum>
|
|
}
|
|
|
|
/**
|
|
* Project findFirst
|
|
*/
|
|
export interface ProjectFindFirstArgs extends ProjectFindFirstArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findFirstOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Project findFirstOrThrow
|
|
*/
|
|
export type ProjectFindFirstOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* Filter, which Project to fetch.
|
|
*/
|
|
where?: ProjectWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Projects to fetch.
|
|
*/
|
|
orderBy?: Enumerable<ProjectOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Projects.
|
|
*/
|
|
cursor?: ProjectWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Projects 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` Projects.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Projects.
|
|
*/
|
|
distinct?: Enumerable<ProjectScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Project findMany
|
|
*/
|
|
export type ProjectFindManyArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* Filter, which Projects to fetch.
|
|
*/
|
|
where?: ProjectWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Projects to fetch.
|
|
*/
|
|
orderBy?: Enumerable<ProjectOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Projects.
|
|
*/
|
|
cursor?: ProjectWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Projects 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` Projects.
|
|
*/
|
|
skip?: number
|
|
distinct?: Enumerable<ProjectScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Project create
|
|
*/
|
|
export type ProjectCreateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* The data needed to create a Project.
|
|
*/
|
|
data: XOR<ProjectCreateInput, ProjectUncheckedCreateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Project createMany
|
|
*/
|
|
export type ProjectCreateManyArgs = {
|
|
/**
|
|
* The data used to create many Projects.
|
|
*/
|
|
data: Enumerable<ProjectCreateManyInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
|
|
/**
|
|
* Project update
|
|
*/
|
|
export type ProjectUpdateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* The data needed to update a Project.
|
|
*/
|
|
data: XOR<ProjectUpdateInput, ProjectUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Project to update.
|
|
*/
|
|
where: ProjectWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Project updateMany
|
|
*/
|
|
export type ProjectUpdateManyArgs = {
|
|
/**
|
|
* The data used to update Projects.
|
|
*/
|
|
data: XOR<ProjectUpdateManyMutationInput, ProjectUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Projects to update
|
|
*/
|
|
where?: ProjectWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Project upsert
|
|
*/
|
|
export type ProjectUpsertArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* The filter to search for the Project to update in case it exists.
|
|
*/
|
|
where: ProjectWhereUniqueInput
|
|
/**
|
|
* In case the Project found by the `where` argument doesn't exist, create a new Project with this data.
|
|
*/
|
|
create: XOR<ProjectCreateInput, ProjectUncheckedCreateInput>
|
|
/**
|
|
* In case the Project was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<ProjectUpdateInput, ProjectUncheckedUpdateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Project delete
|
|
*/
|
|
export type ProjectDeleteArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
/**
|
|
* Filter which Project to delete.
|
|
*/
|
|
where: ProjectWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Project deleteMany
|
|
*/
|
|
export type ProjectDeleteManyArgs = {
|
|
/**
|
|
* Filter which Projects to delete
|
|
*/
|
|
where?: ProjectWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Project.Metrics
|
|
*/
|
|
export type Project$MetricsArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
where?: MetricWhereInput
|
|
orderBy?: Enumerable<MetricOrderByWithRelationInput>
|
|
cursor?: MetricWhereUniqueInput
|
|
take?: number
|
|
skip?: number
|
|
distinct?: Enumerable<MetricScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Project without action
|
|
*/
|
|
export type ProjectArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Project
|
|
*/
|
|
select?: ProjectSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: ProjectInclude | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Model Metric
|
|
*/
|
|
|
|
|
|
export type AggregateMetric = {
|
|
_count: MetricCountAggregateOutputType | null
|
|
_avg: MetricAvgAggregateOutputType | null
|
|
_sum: MetricSumAggregateOutputType | null
|
|
_min: MetricMinAggregateOutputType | null
|
|
_max: MetricMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type MetricAvgAggregateOutputType = {
|
|
id: number | null
|
|
projectId: number | null
|
|
}
|
|
|
|
export type MetricSumAggregateOutputType = {
|
|
id: number | null
|
|
projectId: number | null
|
|
}
|
|
|
|
export type MetricMinAggregateOutputType = {
|
|
id: number | null
|
|
path: string | null
|
|
uuid: string | null
|
|
remote_address: string | null
|
|
date_requested: Date | null
|
|
projectId: number | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type MetricMaxAggregateOutputType = {
|
|
id: number | null
|
|
path: string | null
|
|
uuid: string | null
|
|
remote_address: string | null
|
|
date_requested: Date | null
|
|
projectId: number | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type MetricCountAggregateOutputType = {
|
|
id: number
|
|
path: number
|
|
uuid: number
|
|
remote_address: number
|
|
date_requested: number
|
|
projectId: number
|
|
createdAt: number
|
|
updatedAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type MetricAvgAggregateInputType = {
|
|
id?: true
|
|
projectId?: true
|
|
}
|
|
|
|
export type MetricSumAggregateInputType = {
|
|
id?: true
|
|
projectId?: true
|
|
}
|
|
|
|
export type MetricMinAggregateInputType = {
|
|
id?: true
|
|
path?: true
|
|
uuid?: true
|
|
remote_address?: true
|
|
date_requested?: true
|
|
projectId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type MetricMaxAggregateInputType = {
|
|
id?: true
|
|
path?: true
|
|
uuid?: true
|
|
remote_address?: true
|
|
date_requested?: true
|
|
projectId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type MetricCountAggregateInputType = {
|
|
id?: true
|
|
path?: true
|
|
uuid?: true
|
|
remote_address?: true
|
|
date_requested?: true
|
|
projectId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type MetricAggregateArgs = {
|
|
/**
|
|
* Filter which Metric to aggregate.
|
|
*/
|
|
where?: MetricWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Metrics to fetch.
|
|
*/
|
|
orderBy?: Enumerable<MetricOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: MetricWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Metrics 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` Metrics.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned Metrics
|
|
**/
|
|
_count?: true | MetricCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to average
|
|
**/
|
|
_avg?: MetricAvgAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to sum
|
|
**/
|
|
_sum?: MetricSumAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: MetricMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: MetricMaxAggregateInputType
|
|
}
|
|
|
|
export type GetMetricAggregateType<T extends MetricAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateMetric]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: GetScalarType<T[P], AggregateMetric[P]>
|
|
: GetScalarType<T[P], AggregateMetric[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type MetricGroupByArgs = {
|
|
where?: MetricWhereInput
|
|
orderBy?: Enumerable<MetricOrderByWithAggregationInput>
|
|
by: MetricScalarFieldEnum[]
|
|
having?: MetricScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: MetricCountAggregateInputType | true
|
|
_avg?: MetricAvgAggregateInputType
|
|
_sum?: MetricSumAggregateInputType
|
|
_min?: MetricMinAggregateInputType
|
|
_max?: MetricMaxAggregateInputType
|
|
}
|
|
|
|
|
|
export type MetricGroupByOutputType = {
|
|
id: number
|
|
path: string
|
|
uuid: string
|
|
remote_address: string
|
|
date_requested: Date
|
|
projectId: number
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
_count: MetricCountAggregateOutputType | null
|
|
_avg: MetricAvgAggregateOutputType | null
|
|
_sum: MetricSumAggregateOutputType | null
|
|
_min: MetricMinAggregateOutputType | null
|
|
_max: MetricMaxAggregateOutputType | null
|
|
}
|
|
|
|
type GetMetricGroupByPayload<T extends MetricGroupByArgs> = PrismaPromise<
|
|
Array<
|
|
PickArray<MetricGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof MetricGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: GetScalarType<T[P], MetricGroupByOutputType[P]>
|
|
: GetScalarType<T[P], MetricGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
export type MetricSelect = {
|
|
id?: boolean
|
|
path?: boolean
|
|
uuid?: boolean
|
|
remote_address?: boolean
|
|
date_requested?: boolean
|
|
project?: boolean | ProjectArgs
|
|
projectId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
}
|
|
|
|
|
|
export type MetricInclude = {
|
|
project?: boolean | ProjectArgs
|
|
}
|
|
|
|
export type MetricGetPayload<S extends boolean | null | undefined | MetricArgs> =
|
|
S extends { select: any, include: any } ? 'Please either choose `select` or `include`' :
|
|
S extends true ? Metric :
|
|
S extends undefined ? never :
|
|
S extends { include: any } & (MetricArgs | MetricFindManyArgs)
|
|
? Metric & {
|
|
[P in TruthyKeys<S['include']>]:
|
|
P extends 'project' ? ProjectGetPayload<S['include'][P]> : never
|
|
}
|
|
: S extends { select: any } & (MetricArgs | MetricFindManyArgs)
|
|
? {
|
|
[P in TruthyKeys<S['select']>]:
|
|
P extends 'project' ? ProjectGetPayload<S['select'][P]> : P extends keyof Metric ? Metric[P] : never
|
|
}
|
|
: Metric
|
|
|
|
|
|
type MetricCountArgs =
|
|
Omit<MetricFindManyArgs, 'select' | 'include'> & {
|
|
select?: MetricCountAggregateInputType | true
|
|
}
|
|
|
|
export interface MetricDelegate<GlobalRejectSettings extends Prisma.RejectOnNotFound | Prisma.RejectPerOperation | false | undefined> {
|
|
|
|
/**
|
|
* Find zero or one Metric that matches the filter.
|
|
* @param {MetricFindUniqueArgs} args - Arguments to find a Metric
|
|
* @example
|
|
* // Get one Metric
|
|
* const metric = await prisma.metric.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUnique<T extends MetricFindUniqueArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args: SelectSubset<T, MetricFindUniqueArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findUnique', 'Metric'> extends True ? Prisma__MetricClient<MetricGetPayload<T>> : Prisma__MetricClient<MetricGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find one Metric that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {MetricFindUniqueOrThrowArgs} args - Arguments to find a Metric
|
|
* @example
|
|
* // Get one Metric
|
|
* const metric = await prisma.metric.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findUniqueOrThrow<T extends MetricFindUniqueOrThrowArgs>(
|
|
args?: SelectSubset<T, MetricFindUniqueOrThrowArgs>
|
|
): Prisma__MetricClient<MetricGetPayload<T>>
|
|
|
|
/**
|
|
* Find the first Metric 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 {MetricFindFirstArgs} args - Arguments to find a Metric
|
|
* @example
|
|
* // Get one Metric
|
|
* const metric = await prisma.metric.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirst<T extends MetricFindFirstArgs, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>(
|
|
args?: SelectSubset<T, MetricFindFirstArgs>
|
|
): HasReject<GlobalRejectSettings, LocalRejectSettings, 'findFirst', 'Metric'> extends True ? Prisma__MetricClient<MetricGetPayload<T>> : Prisma__MetricClient<MetricGetPayload<T> | null, null>
|
|
|
|
/**
|
|
* Find the first Metric 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 {MetricFindFirstOrThrowArgs} args - Arguments to find a Metric
|
|
* @example
|
|
* // Get one Metric
|
|
* const metric = await prisma.metric.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
**/
|
|
findFirstOrThrow<T extends MetricFindFirstOrThrowArgs>(
|
|
args?: SelectSubset<T, MetricFindFirstOrThrowArgs>
|
|
): Prisma__MetricClient<MetricGetPayload<T>>
|
|
|
|
/**
|
|
* Find zero or more Metrics 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 {MetricFindManyArgs=} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all Metrics
|
|
* const metrics = await prisma.metric.findMany()
|
|
*
|
|
* // Get first 10 Metrics
|
|
* const metrics = await prisma.metric.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const metricWithIdOnly = await prisma.metric.findMany({ select: { id: true } })
|
|
*
|
|
**/
|
|
findMany<T extends MetricFindManyArgs>(
|
|
args?: SelectSubset<T, MetricFindManyArgs>
|
|
): PrismaPromise<Array<MetricGetPayload<T>>>
|
|
|
|
/**
|
|
* Create a Metric.
|
|
* @param {MetricCreateArgs} args - Arguments to create a Metric.
|
|
* @example
|
|
* // Create one Metric
|
|
* const Metric = await prisma.metric.create({
|
|
* data: {
|
|
* // ... data to create a Metric
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
create<T extends MetricCreateArgs>(
|
|
args: SelectSubset<T, MetricCreateArgs>
|
|
): Prisma__MetricClient<MetricGetPayload<T>>
|
|
|
|
/**
|
|
* Create many Metrics.
|
|
* @param {MetricCreateManyArgs} args - Arguments to create many Metrics.
|
|
* @example
|
|
* // Create many Metrics
|
|
* const metric = await prisma.metric.createMany({
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
createMany<T extends MetricCreateManyArgs>(
|
|
args?: SelectSubset<T, MetricCreateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Delete a Metric.
|
|
* @param {MetricDeleteArgs} args - Arguments to delete one Metric.
|
|
* @example
|
|
* // Delete one Metric
|
|
* const Metric = await prisma.metric.delete({
|
|
* where: {
|
|
* // ... filter to delete one Metric
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
delete<T extends MetricDeleteArgs>(
|
|
args: SelectSubset<T, MetricDeleteArgs>
|
|
): Prisma__MetricClient<MetricGetPayload<T>>
|
|
|
|
/**
|
|
* Update one Metric.
|
|
* @param {MetricUpdateArgs} args - Arguments to update one Metric.
|
|
* @example
|
|
* // Update one Metric
|
|
* const metric = await prisma.metric.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
update<T extends MetricUpdateArgs>(
|
|
args: SelectSubset<T, MetricUpdateArgs>
|
|
): Prisma__MetricClient<MetricGetPayload<T>>
|
|
|
|
/**
|
|
* Delete zero or more Metrics.
|
|
* @param {MetricDeleteManyArgs} args - Arguments to filter Metrics to delete.
|
|
* @example
|
|
* // Delete a few Metrics
|
|
* const { count } = await prisma.metric.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
deleteMany<T extends MetricDeleteManyArgs>(
|
|
args?: SelectSubset<T, MetricDeleteManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more Metrics.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {MetricUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many Metrics
|
|
* const metric = await prisma.metric.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
**/
|
|
updateMany<T extends MetricUpdateManyArgs>(
|
|
args: SelectSubset<T, MetricUpdateManyArgs>
|
|
): PrismaPromise<BatchPayload>
|
|
|
|
/**
|
|
* Create or update one Metric.
|
|
* @param {MetricUpsertArgs} args - Arguments to update or create a Metric.
|
|
* @example
|
|
* // Update or create a Metric
|
|
* const metric = await prisma.metric.upsert({
|
|
* create: {
|
|
* // ... data to create a Metric
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the Metric we want to update
|
|
* }
|
|
* })
|
|
**/
|
|
upsert<T extends MetricUpsertArgs>(
|
|
args: SelectSubset<T, MetricUpsertArgs>
|
|
): Prisma__MetricClient<MetricGetPayload<T>>
|
|
|
|
/**
|
|
* Count the number of Metrics.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {MetricCountArgs} args - Arguments to filter Metrics to count.
|
|
* @example
|
|
* // Count the number of Metrics
|
|
* const count = await prisma.metric.count({
|
|
* where: {
|
|
* // ... the filter for the Metrics we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends MetricCountArgs>(
|
|
args?: Subset<T, MetricCountArgs>,
|
|
): PrismaPromise<
|
|
T extends _Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: GetScalarType<T['select'], MetricCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a Metric.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {MetricAggregateArgs} 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 MetricAggregateArgs>(args: Subset<T, MetricAggregateArgs>): PrismaPromise<GetMetricAggregateType<T>>
|
|
|
|
/**
|
|
* Group by Metric.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {MetricGroupByArgs} 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 MetricGroupByArgs,
|
|
HasSelectOrTake extends Or<
|
|
Extends<'skip', Keys<T>>,
|
|
Extends<'take', Keys<T>>
|
|
>,
|
|
OrderByArg extends True extends HasSelectOrTake
|
|
? { orderBy: MetricGroupByArgs['orderBy'] }
|
|
: { orderBy?: MetricGroupByArgs['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, MetricGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetMetricGroupByPayload<T> : PrismaPromise<InputErrors>
|
|
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for Metric.
|
|
* 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__MetricClient<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';
|
|
|
|
project<T extends ProjectArgs= {}>(args?: Subset<T, ProjectArgs>): Prisma__ProjectClient<ProjectGetPayload<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
|
|
|
|
/**
|
|
* Metric base type for findUnique actions
|
|
*/
|
|
export type MetricFindUniqueArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* Filter, which Metric to fetch.
|
|
*/
|
|
where: MetricWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* Metric findUnique
|
|
*/
|
|
export interface MetricFindUniqueArgs extends MetricFindUniqueArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findUniqueOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric findUniqueOrThrow
|
|
*/
|
|
export type MetricFindUniqueOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* Filter, which Metric to fetch.
|
|
*/
|
|
where: MetricWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric base type for findFirst actions
|
|
*/
|
|
export type MetricFindFirstArgsBase = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* Filter, which Metric to fetch.
|
|
*/
|
|
where?: MetricWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Metrics to fetch.
|
|
*/
|
|
orderBy?: Enumerable<MetricOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Metrics.
|
|
*/
|
|
cursor?: MetricWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Metrics 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` Metrics.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Metrics.
|
|
*/
|
|
distinct?: Enumerable<MetricScalarFieldEnum>
|
|
}
|
|
|
|
/**
|
|
* Metric findFirst
|
|
*/
|
|
export interface MetricFindFirstArgs extends MetricFindFirstArgsBase {
|
|
/**
|
|
* Throw an Error if query returns no results
|
|
* @deprecated since 4.0.0: use `findFirstOrThrow` method instead
|
|
*/
|
|
rejectOnNotFound?: RejectOnNotFound
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric findFirstOrThrow
|
|
*/
|
|
export type MetricFindFirstOrThrowArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* Filter, which Metric to fetch.
|
|
*/
|
|
where?: MetricWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Metrics to fetch.
|
|
*/
|
|
orderBy?: Enumerable<MetricOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for Metrics.
|
|
*/
|
|
cursor?: MetricWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Metrics 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` Metrics.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of Metrics.
|
|
*/
|
|
distinct?: Enumerable<MetricScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric findMany
|
|
*/
|
|
export type MetricFindManyArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* Filter, which Metrics to fetch.
|
|
*/
|
|
where?: MetricWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of Metrics to fetch.
|
|
*/
|
|
orderBy?: Enumerable<MetricOrderByWithRelationInput>
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing Metrics.
|
|
*/
|
|
cursor?: MetricWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` Metrics 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` Metrics.
|
|
*/
|
|
skip?: number
|
|
distinct?: Enumerable<MetricScalarFieldEnum>
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric create
|
|
*/
|
|
export type MetricCreateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* The data needed to create a Metric.
|
|
*/
|
|
data: XOR<MetricCreateInput, MetricUncheckedCreateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric createMany
|
|
*/
|
|
export type MetricCreateManyArgs = {
|
|
/**
|
|
* The data used to create many Metrics.
|
|
*/
|
|
data: Enumerable<MetricCreateManyInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric update
|
|
*/
|
|
export type MetricUpdateArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* The data needed to update a Metric.
|
|
*/
|
|
data: XOR<MetricUpdateInput, MetricUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which Metric to update.
|
|
*/
|
|
where: MetricWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric updateMany
|
|
*/
|
|
export type MetricUpdateManyArgs = {
|
|
/**
|
|
* The data used to update Metrics.
|
|
*/
|
|
data: XOR<MetricUpdateManyMutationInput, MetricUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which Metrics to update
|
|
*/
|
|
where?: MetricWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric upsert
|
|
*/
|
|
export type MetricUpsertArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* The filter to search for the Metric to update in case it exists.
|
|
*/
|
|
where: MetricWhereUniqueInput
|
|
/**
|
|
* In case the Metric found by the `where` argument doesn't exist, create a new Metric with this data.
|
|
*/
|
|
create: XOR<MetricCreateInput, MetricUncheckedCreateInput>
|
|
/**
|
|
* In case the Metric was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: XOR<MetricUpdateInput, MetricUncheckedUpdateInput>
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric delete
|
|
*/
|
|
export type MetricDeleteArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
/**
|
|
* Filter which Metric to delete.
|
|
*/
|
|
where: MetricWhereUniqueInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric deleteMany
|
|
*/
|
|
export type MetricDeleteManyArgs = {
|
|
/**
|
|
* Filter which Metrics to delete
|
|
*/
|
|
where?: MetricWhereInput
|
|
}
|
|
|
|
|
|
/**
|
|
* Metric without action
|
|
*/
|
|
export type MetricArgs = {
|
|
/**
|
|
* Select specific fields to fetch from the Metric
|
|
*/
|
|
select?: MetricSelect | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well.
|
|
*/
|
|
include?: MetricInclude | null
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Enums
|
|
*/
|
|
|
|
// Based on
|
|
// https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275
|
|
|
|
export const MetricScalarFieldEnum: {
|
|
id: 'id',
|
|
path: 'path',
|
|
uuid: 'uuid',
|
|
remote_address: 'remote_address',
|
|
date_requested: 'date_requested',
|
|
projectId: 'projectId',
|
|
createdAt: 'createdAt',
|
|
updatedAt: 'updatedAt'
|
|
};
|
|
|
|
export type MetricScalarFieldEnum = (typeof MetricScalarFieldEnum)[keyof typeof MetricScalarFieldEnum]
|
|
|
|
|
|
export const ProjectScalarFieldEnum: {
|
|
id: 'id',
|
|
title: 'title',
|
|
uuid: 'uuid',
|
|
createdAt: 'createdAt',
|
|
updatedAt: 'updatedAt',
|
|
network: 'network'
|
|
};
|
|
|
|
export type ProjectScalarFieldEnum = (typeof ProjectScalarFieldEnum)[keyof typeof ProjectScalarFieldEnum]
|
|
|
|
|
|
export const QueryMode: {
|
|
default: 'default',
|
|
insensitive: 'insensitive'
|
|
};
|
|
|
|
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
|
|
|
|
|
export const SortOrder: {
|
|
asc: 'asc',
|
|
desc: 'desc'
|
|
};
|
|
|
|
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
|
|
|
|
|
export const TransactionIsolationLevel: {
|
|
ReadUncommitted: 'ReadUncommitted',
|
|
ReadCommitted: 'ReadCommitted',
|
|
RepeatableRead: 'RepeatableRead',
|
|
Serializable: 'Serializable'
|
|
};
|
|
|
|
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
|
|
|
|
|
/**
|
|
* Deep Input Types
|
|
*/
|
|
|
|
|
|
export type ProjectWhereInput = {
|
|
AND?: Enumerable<ProjectWhereInput>
|
|
OR?: Enumerable<ProjectWhereInput>
|
|
NOT?: Enumerable<ProjectWhereInput>
|
|
id?: IntFilter | number
|
|
title?: StringFilter | string
|
|
uuid?: StringFilter | string
|
|
createdAt?: DateTimeFilter | Date | string
|
|
updatedAt?: DateTimeFilter | Date | string
|
|
network?: StringFilter | string
|
|
Metrics?: MetricListRelationFilter
|
|
}
|
|
|
|
export type ProjectOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
uuid?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
network?: SortOrder
|
|
Metrics?: MetricOrderByRelationAggregateInput
|
|
}
|
|
|
|
export type ProjectWhereUniqueInput = {
|
|
id?: number
|
|
uuid?: string
|
|
}
|
|
|
|
export type ProjectOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
uuid?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
network?: SortOrder
|
|
_count?: ProjectCountOrderByAggregateInput
|
|
_avg?: ProjectAvgOrderByAggregateInput
|
|
_max?: ProjectMaxOrderByAggregateInput
|
|
_min?: ProjectMinOrderByAggregateInput
|
|
_sum?: ProjectSumOrderByAggregateInput
|
|
}
|
|
|
|
export type ProjectScalarWhereWithAggregatesInput = {
|
|
AND?: Enumerable<ProjectScalarWhereWithAggregatesInput>
|
|
OR?: Enumerable<ProjectScalarWhereWithAggregatesInput>
|
|
NOT?: Enumerable<ProjectScalarWhereWithAggregatesInput>
|
|
id?: IntWithAggregatesFilter | number
|
|
title?: StringWithAggregatesFilter | string
|
|
uuid?: StringWithAggregatesFilter | string
|
|
createdAt?: DateTimeWithAggregatesFilter | Date | string
|
|
updatedAt?: DateTimeWithAggregatesFilter | Date | string
|
|
network?: StringWithAggregatesFilter | string
|
|
}
|
|
|
|
export type MetricWhereInput = {
|
|
AND?: Enumerable<MetricWhereInput>
|
|
OR?: Enumerable<MetricWhereInput>
|
|
NOT?: Enumerable<MetricWhereInput>
|
|
id?: IntFilter | number
|
|
path?: StringFilter | string
|
|
uuid?: StringFilter | string
|
|
remote_address?: StringFilter | string
|
|
date_requested?: DateTimeFilter | Date | string
|
|
project?: XOR<ProjectRelationFilter, ProjectWhereInput>
|
|
projectId?: IntFilter | number
|
|
createdAt?: DateTimeFilter | Date | string
|
|
updatedAt?: DateTimeFilter | Date | string
|
|
}
|
|
|
|
export type MetricOrderByWithRelationInput = {
|
|
id?: SortOrder
|
|
path?: SortOrder
|
|
uuid?: SortOrder
|
|
remote_address?: SortOrder
|
|
date_requested?: SortOrder
|
|
project?: ProjectOrderByWithRelationInput
|
|
projectId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type MetricWhereUniqueInput = {
|
|
id?: number
|
|
uuid?: string
|
|
}
|
|
|
|
export type MetricOrderByWithAggregationInput = {
|
|
id?: SortOrder
|
|
path?: SortOrder
|
|
uuid?: SortOrder
|
|
remote_address?: SortOrder
|
|
date_requested?: SortOrder
|
|
projectId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
_count?: MetricCountOrderByAggregateInput
|
|
_avg?: MetricAvgOrderByAggregateInput
|
|
_max?: MetricMaxOrderByAggregateInput
|
|
_min?: MetricMinOrderByAggregateInput
|
|
_sum?: MetricSumOrderByAggregateInput
|
|
}
|
|
|
|
export type MetricScalarWhereWithAggregatesInput = {
|
|
AND?: Enumerable<MetricScalarWhereWithAggregatesInput>
|
|
OR?: Enumerable<MetricScalarWhereWithAggregatesInput>
|
|
NOT?: Enumerable<MetricScalarWhereWithAggregatesInput>
|
|
id?: IntWithAggregatesFilter | number
|
|
path?: StringWithAggregatesFilter | string
|
|
uuid?: StringWithAggregatesFilter | string
|
|
remote_address?: StringWithAggregatesFilter | string
|
|
date_requested?: DateTimeWithAggregatesFilter | Date | string
|
|
projectId?: IntWithAggregatesFilter | number
|
|
createdAt?: DateTimeWithAggregatesFilter | Date | string
|
|
updatedAt?: DateTimeWithAggregatesFilter | Date | string
|
|
}
|
|
|
|
export type ProjectCreateInput = {
|
|
title: string
|
|
uuid: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
network: string
|
|
Metrics?: MetricCreateNestedManyWithoutProjectInput
|
|
}
|
|
|
|
export type ProjectUncheckedCreateInput = {
|
|
id?: number
|
|
title: string
|
|
uuid: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
network: string
|
|
Metrics?: MetricUncheckedCreateNestedManyWithoutProjectInput
|
|
}
|
|
|
|
export type ProjectUpdateInput = {
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
network?: StringFieldUpdateOperationsInput | string
|
|
Metrics?: MetricUpdateManyWithoutProjectNestedInput
|
|
}
|
|
|
|
export type ProjectUncheckedUpdateInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
network?: StringFieldUpdateOperationsInput | string
|
|
Metrics?: MetricUncheckedUpdateManyWithoutProjectNestedInput
|
|
}
|
|
|
|
export type ProjectCreateManyInput = {
|
|
id?: number
|
|
title: string
|
|
uuid: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
network: string
|
|
}
|
|
|
|
export type ProjectUpdateManyMutationInput = {
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
network?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ProjectUncheckedUpdateManyInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
network?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type MetricCreateInput = {
|
|
path: string
|
|
uuid: string
|
|
remote_address: string
|
|
date_requested: Date | string
|
|
project: ProjectCreateNestedOneWithoutMetricsInput
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type MetricUncheckedCreateInput = {
|
|
id?: number
|
|
path: string
|
|
uuid: string
|
|
remote_address: string
|
|
date_requested: Date | string
|
|
projectId: number
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type MetricUpdateInput = {
|
|
path?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
remote_address?: StringFieldUpdateOperationsInput | string
|
|
date_requested?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
project?: ProjectUpdateOneRequiredWithoutMetricsNestedInput
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type MetricUncheckedUpdateInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
path?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
remote_address?: StringFieldUpdateOperationsInput | string
|
|
date_requested?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
projectId?: IntFieldUpdateOperationsInput | number
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type MetricCreateManyInput = {
|
|
id?: number
|
|
path: string
|
|
uuid: string
|
|
remote_address: string
|
|
date_requested: Date | string
|
|
projectId: number
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type MetricUpdateManyMutationInput = {
|
|
path?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
remote_address?: StringFieldUpdateOperationsInput | string
|
|
date_requested?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type MetricUncheckedUpdateManyInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
path?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
remote_address?: StringFieldUpdateOperationsInput | string
|
|
date_requested?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
projectId?: IntFieldUpdateOperationsInput | number
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type IntFilter = {
|
|
equals?: number
|
|
in?: Enumerable<number>
|
|
notIn?: Enumerable<number>
|
|
lt?: number
|
|
lte?: number
|
|
gt?: number
|
|
gte?: number
|
|
not?: NestedIntFilter | number
|
|
}
|
|
|
|
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 DateTimeFilter = {
|
|
equals?: Date | string
|
|
in?: Enumerable<Date> | Enumerable<string>
|
|
notIn?: Enumerable<Date> | Enumerable<string>
|
|
lt?: Date | string
|
|
lte?: Date | string
|
|
gt?: Date | string
|
|
gte?: Date | string
|
|
not?: NestedDateTimeFilter | Date | string
|
|
}
|
|
|
|
export type MetricListRelationFilter = {
|
|
every?: MetricWhereInput
|
|
some?: MetricWhereInput
|
|
none?: MetricWhereInput
|
|
}
|
|
|
|
export type MetricOrderByRelationAggregateInput = {
|
|
_count?: SortOrder
|
|
}
|
|
|
|
export type ProjectCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
uuid?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
network?: SortOrder
|
|
}
|
|
|
|
export type ProjectAvgOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
}
|
|
|
|
export type ProjectMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
uuid?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
network?: SortOrder
|
|
}
|
|
|
|
export type ProjectMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
title?: SortOrder
|
|
uuid?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
network?: SortOrder
|
|
}
|
|
|
|
export type ProjectSumOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
}
|
|
|
|
export type IntWithAggregatesFilter = {
|
|
equals?: number
|
|
in?: Enumerable<number>
|
|
notIn?: Enumerable<number>
|
|
lt?: number
|
|
lte?: number
|
|
gt?: number
|
|
gte?: number
|
|
not?: NestedIntWithAggregatesFilter | number
|
|
_count?: NestedIntFilter
|
|
_avg?: NestedFloatFilter
|
|
_sum?: NestedIntFilter
|
|
_min?: NestedIntFilter
|
|
_max?: NestedIntFilter
|
|
}
|
|
|
|
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 DateTimeWithAggregatesFilter = {
|
|
equals?: Date | string
|
|
in?: Enumerable<Date> | Enumerable<string>
|
|
notIn?: Enumerable<Date> | Enumerable<string>
|
|
lt?: Date | string
|
|
lte?: Date | string
|
|
gt?: Date | string
|
|
gte?: Date | string
|
|
not?: NestedDateTimeWithAggregatesFilter | Date | string
|
|
_count?: NestedIntFilter
|
|
_min?: NestedDateTimeFilter
|
|
_max?: NestedDateTimeFilter
|
|
}
|
|
|
|
export type ProjectRelationFilter = {
|
|
is?: ProjectWhereInput
|
|
isNot?: ProjectWhereInput
|
|
}
|
|
|
|
export type MetricCountOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
path?: SortOrder
|
|
uuid?: SortOrder
|
|
remote_address?: SortOrder
|
|
date_requested?: SortOrder
|
|
projectId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type MetricAvgOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
projectId?: SortOrder
|
|
}
|
|
|
|
export type MetricMaxOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
path?: SortOrder
|
|
uuid?: SortOrder
|
|
remote_address?: SortOrder
|
|
date_requested?: SortOrder
|
|
projectId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type MetricMinOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
path?: SortOrder
|
|
uuid?: SortOrder
|
|
remote_address?: SortOrder
|
|
date_requested?: SortOrder
|
|
projectId?: SortOrder
|
|
createdAt?: SortOrder
|
|
updatedAt?: SortOrder
|
|
}
|
|
|
|
export type MetricSumOrderByAggregateInput = {
|
|
id?: SortOrder
|
|
projectId?: SortOrder
|
|
}
|
|
|
|
export type MetricCreateNestedManyWithoutProjectInput = {
|
|
create?: XOR<Enumerable<MetricCreateWithoutProjectInput>, Enumerable<MetricUncheckedCreateWithoutProjectInput>>
|
|
connectOrCreate?: Enumerable<MetricCreateOrConnectWithoutProjectInput>
|
|
createMany?: MetricCreateManyProjectInputEnvelope
|
|
connect?: Enumerable<MetricWhereUniqueInput>
|
|
}
|
|
|
|
export type MetricUncheckedCreateNestedManyWithoutProjectInput = {
|
|
create?: XOR<Enumerable<MetricCreateWithoutProjectInput>, Enumerable<MetricUncheckedCreateWithoutProjectInput>>
|
|
connectOrCreate?: Enumerable<MetricCreateOrConnectWithoutProjectInput>
|
|
createMany?: MetricCreateManyProjectInputEnvelope
|
|
connect?: Enumerable<MetricWhereUniqueInput>
|
|
}
|
|
|
|
export type StringFieldUpdateOperationsInput = {
|
|
set?: string
|
|
}
|
|
|
|
export type DateTimeFieldUpdateOperationsInput = {
|
|
set?: Date | string
|
|
}
|
|
|
|
export type MetricUpdateManyWithoutProjectNestedInput = {
|
|
create?: XOR<Enumerable<MetricCreateWithoutProjectInput>, Enumerable<MetricUncheckedCreateWithoutProjectInput>>
|
|
connectOrCreate?: Enumerable<MetricCreateOrConnectWithoutProjectInput>
|
|
upsert?: Enumerable<MetricUpsertWithWhereUniqueWithoutProjectInput>
|
|
createMany?: MetricCreateManyProjectInputEnvelope
|
|
set?: Enumerable<MetricWhereUniqueInput>
|
|
disconnect?: Enumerable<MetricWhereUniqueInput>
|
|
delete?: Enumerable<MetricWhereUniqueInput>
|
|
connect?: Enumerable<MetricWhereUniqueInput>
|
|
update?: Enumerable<MetricUpdateWithWhereUniqueWithoutProjectInput>
|
|
updateMany?: Enumerable<MetricUpdateManyWithWhereWithoutProjectInput>
|
|
deleteMany?: Enumerable<MetricScalarWhereInput>
|
|
}
|
|
|
|
export type IntFieldUpdateOperationsInput = {
|
|
set?: number
|
|
increment?: number
|
|
decrement?: number
|
|
multiply?: number
|
|
divide?: number
|
|
}
|
|
|
|
export type MetricUncheckedUpdateManyWithoutProjectNestedInput = {
|
|
create?: XOR<Enumerable<MetricCreateWithoutProjectInput>, Enumerable<MetricUncheckedCreateWithoutProjectInput>>
|
|
connectOrCreate?: Enumerable<MetricCreateOrConnectWithoutProjectInput>
|
|
upsert?: Enumerable<MetricUpsertWithWhereUniqueWithoutProjectInput>
|
|
createMany?: MetricCreateManyProjectInputEnvelope
|
|
set?: Enumerable<MetricWhereUniqueInput>
|
|
disconnect?: Enumerable<MetricWhereUniqueInput>
|
|
delete?: Enumerable<MetricWhereUniqueInput>
|
|
connect?: Enumerable<MetricWhereUniqueInput>
|
|
update?: Enumerable<MetricUpdateWithWhereUniqueWithoutProjectInput>
|
|
updateMany?: Enumerable<MetricUpdateManyWithWhereWithoutProjectInput>
|
|
deleteMany?: Enumerable<MetricScalarWhereInput>
|
|
}
|
|
|
|
export type ProjectCreateNestedOneWithoutMetricsInput = {
|
|
create?: XOR<ProjectCreateWithoutMetricsInput, ProjectUncheckedCreateWithoutMetricsInput>
|
|
connectOrCreate?: ProjectCreateOrConnectWithoutMetricsInput
|
|
connect?: ProjectWhereUniqueInput
|
|
}
|
|
|
|
export type ProjectUpdateOneRequiredWithoutMetricsNestedInput = {
|
|
create?: XOR<ProjectCreateWithoutMetricsInput, ProjectUncheckedCreateWithoutMetricsInput>
|
|
connectOrCreate?: ProjectCreateOrConnectWithoutMetricsInput
|
|
upsert?: ProjectUpsertWithoutMetricsInput
|
|
connect?: ProjectWhereUniqueInput
|
|
update?: XOR<ProjectUpdateWithoutMetricsInput, ProjectUncheckedUpdateWithoutMetricsInput>
|
|
}
|
|
|
|
export type NestedIntFilter = {
|
|
equals?: number
|
|
in?: Enumerable<number>
|
|
notIn?: Enumerable<number>
|
|
lt?: number
|
|
lte?: number
|
|
gt?: number
|
|
gte?: number
|
|
not?: NestedIntFilter | number
|
|
}
|
|
|
|
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 NestedDateTimeFilter = {
|
|
equals?: Date | string
|
|
in?: Enumerable<Date> | Enumerable<string>
|
|
notIn?: Enumerable<Date> | Enumerable<string>
|
|
lt?: Date | string
|
|
lte?: Date | string
|
|
gt?: Date | string
|
|
gte?: Date | string
|
|
not?: NestedDateTimeFilter | Date | string
|
|
}
|
|
|
|
export type NestedIntWithAggregatesFilter = {
|
|
equals?: number
|
|
in?: Enumerable<number>
|
|
notIn?: Enumerable<number>
|
|
lt?: number
|
|
lte?: number
|
|
gt?: number
|
|
gte?: number
|
|
not?: NestedIntWithAggregatesFilter | number
|
|
_count?: NestedIntFilter
|
|
_avg?: NestedFloatFilter
|
|
_sum?: NestedIntFilter
|
|
_min?: NestedIntFilter
|
|
_max?: NestedIntFilter
|
|
}
|
|
|
|
export type NestedFloatFilter = {
|
|
equals?: number
|
|
in?: Enumerable<number>
|
|
notIn?: Enumerable<number>
|
|
lt?: number
|
|
lte?: number
|
|
gt?: number
|
|
gte?: number
|
|
not?: NestedFloatFilter | number
|
|
}
|
|
|
|
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 NestedDateTimeWithAggregatesFilter = {
|
|
equals?: Date | string
|
|
in?: Enumerable<Date> | Enumerable<string>
|
|
notIn?: Enumerable<Date> | Enumerable<string>
|
|
lt?: Date | string
|
|
lte?: Date | string
|
|
gt?: Date | string
|
|
gte?: Date | string
|
|
not?: NestedDateTimeWithAggregatesFilter | Date | string
|
|
_count?: NestedIntFilter
|
|
_min?: NestedDateTimeFilter
|
|
_max?: NestedDateTimeFilter
|
|
}
|
|
|
|
export type MetricCreateWithoutProjectInput = {
|
|
path: string
|
|
uuid: string
|
|
remote_address: string
|
|
date_requested: Date | string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type MetricUncheckedCreateWithoutProjectInput = {
|
|
id?: number
|
|
path: string
|
|
uuid: string
|
|
remote_address: string
|
|
date_requested: Date | string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type MetricCreateOrConnectWithoutProjectInput = {
|
|
where: MetricWhereUniqueInput
|
|
create: XOR<MetricCreateWithoutProjectInput, MetricUncheckedCreateWithoutProjectInput>
|
|
}
|
|
|
|
export type MetricCreateManyProjectInputEnvelope = {
|
|
data: Enumerable<MetricCreateManyProjectInput>
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
export type MetricUpsertWithWhereUniqueWithoutProjectInput = {
|
|
where: MetricWhereUniqueInput
|
|
update: XOR<MetricUpdateWithoutProjectInput, MetricUncheckedUpdateWithoutProjectInput>
|
|
create: XOR<MetricCreateWithoutProjectInput, MetricUncheckedCreateWithoutProjectInput>
|
|
}
|
|
|
|
export type MetricUpdateWithWhereUniqueWithoutProjectInput = {
|
|
where: MetricWhereUniqueInput
|
|
data: XOR<MetricUpdateWithoutProjectInput, MetricUncheckedUpdateWithoutProjectInput>
|
|
}
|
|
|
|
export type MetricUpdateManyWithWhereWithoutProjectInput = {
|
|
where: MetricScalarWhereInput
|
|
data: XOR<MetricUpdateManyMutationInput, MetricUncheckedUpdateManyWithoutMetricsInput>
|
|
}
|
|
|
|
export type MetricScalarWhereInput = {
|
|
AND?: Enumerable<MetricScalarWhereInput>
|
|
OR?: Enumerable<MetricScalarWhereInput>
|
|
NOT?: Enumerable<MetricScalarWhereInput>
|
|
id?: IntFilter | number
|
|
path?: StringFilter | string
|
|
uuid?: StringFilter | string
|
|
remote_address?: StringFilter | string
|
|
date_requested?: DateTimeFilter | Date | string
|
|
projectId?: IntFilter | number
|
|
createdAt?: DateTimeFilter | Date | string
|
|
updatedAt?: DateTimeFilter | Date | string
|
|
}
|
|
|
|
export type ProjectCreateWithoutMetricsInput = {
|
|
title: string
|
|
uuid: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
network: string
|
|
}
|
|
|
|
export type ProjectUncheckedCreateWithoutMetricsInput = {
|
|
id?: number
|
|
title: string
|
|
uuid: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
network: string
|
|
}
|
|
|
|
export type ProjectCreateOrConnectWithoutMetricsInput = {
|
|
where: ProjectWhereUniqueInput
|
|
create: XOR<ProjectCreateWithoutMetricsInput, ProjectUncheckedCreateWithoutMetricsInput>
|
|
}
|
|
|
|
export type ProjectUpsertWithoutMetricsInput = {
|
|
update: XOR<ProjectUpdateWithoutMetricsInput, ProjectUncheckedUpdateWithoutMetricsInput>
|
|
create: XOR<ProjectCreateWithoutMetricsInput, ProjectUncheckedCreateWithoutMetricsInput>
|
|
}
|
|
|
|
export type ProjectUpdateWithoutMetricsInput = {
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
network?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type ProjectUncheckedUpdateWithoutMetricsInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
title?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
network?: StringFieldUpdateOperationsInput | string
|
|
}
|
|
|
|
export type MetricCreateManyProjectInput = {
|
|
id?: number
|
|
path: string
|
|
uuid: string
|
|
remote_address: string
|
|
date_requested: Date | string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type MetricUpdateWithoutProjectInput = {
|
|
path?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
remote_address?: StringFieldUpdateOperationsInput | string
|
|
date_requested?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type MetricUncheckedUpdateWithoutProjectInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
path?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
remote_address?: StringFieldUpdateOperationsInput | string
|
|
date_requested?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type MetricUncheckedUpdateManyWithoutMetricsInput = {
|
|
id?: IntFieldUpdateOperationsInput | number
|
|
path?: StringFieldUpdateOperationsInput | string
|
|
uuid?: StringFieldUpdateOperationsInput | string
|
|
remote_address?: StringFieldUpdateOperationsInput | string
|
|
date_requested?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Batch Payload for updateMany & deleteMany & createMany
|
|
*/
|
|
|
|
export type BatchPayload = {
|
|
count: number
|
|
}
|
|
|
|
/**
|
|
* DMMF
|
|
*/
|
|
export const dmmf: runtime.BaseDMMF
|
|
} |