diff --git "a/backend/node_modules/.prisma/client/index.d.ts" "b/backend/node_modules/.prisma/client/index.d.ts" new file mode 100644--- /dev/null +++ "b/backend/node_modules/.prisma/client/index.d.ts" @@ -0,0 +1,12309 @@ + +/** + * Client +**/ + +import * as runtime from '@prisma/client/runtime/library.js'; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions +import $Result = runtime.Types.Result + +export type PrismaPromise = $Public.PrismaPromise + + +/** + * Model User + * + */ +export type User = $Result.DefaultSelection +/** + * Model Market + * + */ +export type Market = $Result.DefaultSelection +/** + * Model AISignal + * + */ +export type AISignal = $Result.DefaultSelection +/** + * Model Position + * + */ +export type Position = $Result.DefaultSelection +/** + * Model Watchlist + * + */ +export type Watchlist = $Result.DefaultSelection +/** + * Model Alert + * + */ +export type Alert = $Result.DefaultSelection + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ +export class PrismaClient< + ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + const U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, + ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + /** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ + + constructor(optionsArg ?: Prisma.Subset); + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): $Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): $Utils.JsPromise; + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise + + + $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, $Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `prisma.user`: Exposes CRUD operations for the **User** model. + * Example usage: + * ```ts + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + */ + get user(): Prisma.UserDelegate; + + /** + * `prisma.market`: Exposes CRUD operations for the **Market** model. + * Example usage: + * ```ts + * // Fetch zero or more Markets + * const markets = await prisma.market.findMany() + * ``` + */ + get market(): Prisma.MarketDelegate; + + /** + * `prisma.aISignal`: Exposes CRUD operations for the **AISignal** model. + * Example usage: + * ```ts + * // Fetch zero or more AISignals + * const aISignals = await prisma.aISignal.findMany() + * ``` + */ + get aISignal(): Prisma.AISignalDelegate; + + /** + * `prisma.position`: Exposes CRUD operations for the **Position** model. + * Example usage: + * ```ts + * // Fetch zero or more Positions + * const positions = await prisma.position.findMany() + * ``` + */ + get position(): Prisma.PositionDelegate; + + /** + * `prisma.watchlist`: Exposes CRUD operations for the **Watchlist** model. + * Example usage: + * ```ts + * // Fetch zero or more Watchlists + * const watchlists = await prisma.watchlist.findMany() + * ``` + */ + get watchlist(): Prisma.WatchlistDelegate; + + /** + * `prisma.alert`: Exposes CRUD operations for the **Alert** model. + * Example usage: + * ```ts + * // Fetch zero or more Alerts + * const alerts = await prisma.alert.findMany() + * ``` + */ + get alert(): Prisma.AlertDelegate; +} + +export namespace Prisma { + export import DMMF = runtime.DMMF + + export type PrismaPromise = $Public.PrismaPromise + + /** + * Validator + */ + export import validator = runtime.Public.validator + + /** + * Prisma Errors + */ + export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + export import PrismaClientInitializationError = runtime.PrismaClientInitializationError + export import PrismaClientValidationError = runtime.PrismaClientValidationError + + /** + * Re-export of sql-template-tag + */ + export import sql = runtime.sqltag + export import empty = runtime.empty + export import join = runtime.join + export import raw = runtime.raw + export import Sql = runtime.Sql + + + + /** + * Decimal.js + */ + export import Decimal = runtime.Decimal + + export type DecimalJsLike = runtime.DecimalJsLike + + /** + * Metrics + */ + export type Metrics = runtime.Metrics + export type Metric = runtime.Metric + export type MetricHistogram = runtime.MetricHistogram + export type MetricHistogramBucket = runtime.MetricHistogramBucket + + /** + * Extensions + */ + export import Extension = $Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export import Args = $Public.Args + export import Payload = $Public.Payload + export import Result = $Public.Result + export import Exact = $Public.Exact + + /** + * Prisma Client JS version: 6.19.3 + * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7 + */ + export type PrismaVersion = { + client: string + } + + export const prismaVersion: PrismaVersion + + /** + * Utility Types + */ + + + export import Bytes = runtime.Bytes + export import JsonObject = runtime.JsonObject + export import JsonArray = runtime.JsonArray + export import JsonValue = runtime.JsonValue + export import InputJsonObject = runtime.InputJsonObject + export import InputJsonArray = runtime.InputJsonArray + export import InputJsonValue = runtime.InputJsonValue + + /** + * Types of the values used to represent different kinds of `null` values when working with JSON fields. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + namespace NullTypes { + /** + * Type of `Prisma.DbNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class DbNull { + private DbNull: never + private constructor() + } + + /** + * Type of `Prisma.JsonNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class JsonNull { + private JsonNull: never + private constructor() + } + + /** + * Type of `Prisma.AnyNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class AnyNull { + private AnyNull: never + private constructor() + } + } + + /** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const DbNull: NullTypes.DbNull + + /** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const JsonNull: NullTypes.JsonNull + + /** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const AnyNull: NullTypes.AnyNull + + type SelectAndInclude = { + select: any + include: any + } + + type SelectAndOmit = { + select: any + omit: any + } + + /** + * Get the type of the value, that the Promise holds. + */ + export type PromiseType> = T extends PromiseLike ? U : T; + + /** + * Get the return type of a function which returns a Promise. + */ + export type PromiseReturnType $Utils.JsPromise> = PromiseType> + + /** + * From T, pick a set of properties whose keys are in the union K + */ + type Prisma__Pick = { + [P in K]: T[P]; + }; + + + export type Enumerable = T | Array; + + export type RequiredKeys = { + [K in keyof T]-?: {} extends Prisma__Pick ? never : K + }[keyof T] + + export type TruthyKeys = keyof { + [K in keyof T as T[K] extends false | undefined | null ? never : K]: K + } + + export type TrueKeys = TruthyKeys>> + + /** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ + export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; + }; + + /** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ + export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) + + /** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ + export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + K + + type Without = { [P in Exclude]?: never }; + + /** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ + type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + + /** + * Is T a Record? + */ + type IsObject = T extends Array + ? False + : T extends Date + ? False + : T extends Uint8Array + ? False + : T extends BigInt + ? False + : T extends object + ? True + : False + + + /** + * If it's T[], return T + */ + export type UnEnumerate = T extends Array ? U : T + + /** + * From ts-toolbelt + */ + + type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + + type EitherStrict = Strict<__Either> + + type EitherLoose = ComputeRaw<__Either> + + type _Either< + O extends object, + K extends Key, + strict extends Boolean + > = { + 1: EitherStrict + 0: EitherLoose + }[strict] + + type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 + > = O extends unknown ? _Either : never + + export type Union = any + + type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] + } & {} + + /** Helper Types for "Merge" **/ + export type IntersectOf = ( + U extends unknown ? (k: U) => void : never + ) extends (k: infer I) => void + ? I + : never + + export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; + + type _Merge = IntersectOf; + }>>; + + type Key = string | number | symbol; + type AtBasic = K extends keyof O ? O[K] : never; + type AtStrict = O[K & keyof O]; + type AtLoose = O extends unknown ? AtStrict : never; + export type At = { + 1: AtStrict; + 0: AtLoose; + }[strict]; + + export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; + } & {}; + + export type OptionalFlat = { + [K in keyof O]?: O[K]; + } & {}; + + type _Record = { + [P in K]: T; + }; + + // cause typescript not to expand types and preserve names + type NoExpand = T extends unknown ? T : never; + + // this type assumes the passed object is entirely optional + type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O + : never>; + + type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + + export type Strict = ComputeRaw<_Strict>; + /** End Helper Types for "Merge" **/ + + export type Merge = ComputeRaw<_Merge>>; + + /** + A [[Boolean]] + */ + export type Boolean = True | False + + // /** + // 1 + // */ + export type True = 1 + + /** + 0 + */ + export type False = 0 + + export type Not = { + 0: 1 + 1: 0 + }[B] + + export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + + export type Has = Not< + Extends, U1> + > + + export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } + }[B1][B2] + + export type Keys = U extends unknown ? keyof U : never + + type Cast = A extends B ? A : B; + + export const type: unique symbol; + + + + /** + * Used by group by + */ + + export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never + } : never + + type FieldPaths< + T, + U = Omit + > = IsObject extends True ? U : T + + type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K + }[keyof T] + + /** + * Convert tuple to union + */ + type _TupleToUnion = T extends (infer E)[] ? E : never + type TupleToUnion = _TupleToUnion + type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + + /** + * Like `Pick`, but additionally can also accept an array of keys + */ + type PickEnumerable | keyof T> = Prisma__Pick> + + /** + * Exclude all keys with underscores + */ + type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + + export type FieldRef = runtime.FieldRef + + type FieldRefInputType = Model extends never ? never : FieldRef + + + export const ModelName: { + User: 'User', + Market: 'Market', + AISignal: 'AISignal', + Position: 'Position', + Watchlist: 'Watchlist', + Alert: 'Alert' + }; + + export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + export type Datasources = { + db?: Datasource + } + + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record> { + returns: Prisma.TypeMap + } + + export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "user" | "market" | "aISignal" | "position" | "watchlist" | "alert" + txIsolationLevel: Prisma.TransactionIsolationLevel + } + model: { + User: { + payload: Prisma.$UserPayload + fields: Prisma.UserFieldRefs + operations: { + findUnique: { + args: Prisma.UserFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.UserFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.UserFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.UserFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.UserFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.UserCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.UserCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.UserCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.UserDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.UserUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.UserDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.UserUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.UserUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.UserUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.UserAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.UserGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.UserCountArgs + result: $Utils.Optional | number + } + } + } + Market: { + payload: Prisma.$MarketPayload + fields: Prisma.MarketFieldRefs + operations: { + findUnique: { + args: Prisma.MarketFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.MarketFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.MarketFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.MarketFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.MarketFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.MarketCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.MarketCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.MarketCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.MarketDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.MarketUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.MarketDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.MarketUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.MarketUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.MarketUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.MarketAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.MarketGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.MarketCountArgs + result: $Utils.Optional | number + } + } + } + AISignal: { + payload: Prisma.$AISignalPayload + fields: Prisma.AISignalFieldRefs + operations: { + findUnique: { + args: Prisma.AISignalFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AISignalFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AISignalFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AISignalFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AISignalFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AISignalCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AISignalCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AISignalCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AISignalDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AISignalUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AISignalDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AISignalUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AISignalUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AISignalUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AISignalAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AISignalGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AISignalCountArgs + result: $Utils.Optional | number + } + } + } + Position: { + payload: Prisma.$PositionPayload + fields: Prisma.PositionFieldRefs + operations: { + findUnique: { + args: Prisma.PositionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PositionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PositionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PositionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PositionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PositionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PositionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PositionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PositionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PositionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PositionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PositionUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PositionUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PositionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PositionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PositionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PositionCountArgs + result: $Utils.Optional | number + } + } + } + Watchlist: { + payload: Prisma.$WatchlistPayload + fields: Prisma.WatchlistFieldRefs + operations: { + findUnique: { + args: Prisma.WatchlistFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.WatchlistFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.WatchlistFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.WatchlistFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.WatchlistFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.WatchlistCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.WatchlistCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.WatchlistCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.WatchlistDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.WatchlistUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.WatchlistDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.WatchlistUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.WatchlistUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.WatchlistUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.WatchlistAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.WatchlistGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.WatchlistCountArgs + result: $Utils.Optional | number + } + } + } + Alert: { + payload: Prisma.$AlertPayload + fields: Prisma.AlertFieldRefs + operations: { + findUnique: { + args: Prisma.AlertFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AlertFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AlertFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AlertFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AlertFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AlertCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AlertCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AlertCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AlertDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AlertUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AlertDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AlertUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AlertUpdateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AlertUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AlertAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AlertGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AlertCountArgs + result: $Utils.Optional | number + } + } + } + } + } & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } + } + export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> + export type DefaultPrismaClient = PrismaClient + export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' + export interface PrismaClientOptions { + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasourceUrl?: string + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Shorthand for `emit: 'stdout'` + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events only + * log: [ + * { emit: 'event', level: 'query' }, + * { emit: 'event', level: 'info' }, + * { emit: 'event', level: 'warn' } + * { emit: 'event', level: 'error' } + * ] + * + * / Emit as events and log to stdout + * og: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * + * ``` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: Prisma.TransactionIsolationLevel + } + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale` + */ + adapter?: runtime.SqlDriverAdapterFactory | null + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: Prisma.GlobalOmitConfig + } + export type GlobalOmitConfig = { + user?: UserOmit + market?: MarketOmit + aISignal?: AISignalOmit + position?: PositionOmit + watchlist?: WatchlistOmit + alert?: AlertOmit + } + + /* Types for Logging */ + export type LogLevel = 'info' | 'query' | 'warn' | 'error' + export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' + } + + export type CheckIsLogLevel = T extends LogLevel ? T : never; + + export type GetLogType = CheckIsLogLevel< + T extends LogDefinition ? T['level'] : T + >; + + export type GetEvents = T extends Array + ? GetLogType + : never; + + export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string + } + + export type LogEvent = { + timestamp: Date + message: string + target: string + } + /* End Types for Logging */ + + + export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'updateManyAndReturn' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + + // tested in getLogLevel.test.ts + export function getLogLevel(log: Array): LogLevel | undefined; + + /** + * `PrismaClient` proxy available in interactive transactions. + */ + export type TransactionClient = Omit + + export type Datasource = { + url?: string + } + + /** + * Count Types + */ + + + /** + * Count Type UserCountOutputType + */ + + export type UserCountOutputType = { + positions: number + watchlist: number + alerts: number + } + + export type UserCountOutputTypeSelect = { + positions?: boolean | UserCountOutputTypeCountPositionsArgs + watchlist?: boolean | UserCountOutputTypeCountWatchlistArgs + alerts?: boolean | UserCountOutputTypeCountAlertsArgs + } + + // Custom InputTypes + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the UserCountOutputType + */ + select?: UserCountOutputTypeSelect | null + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountPositionsArgs = { + where?: PositionWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountWatchlistArgs = { + where?: WatchlistWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountAlertsArgs = { + where?: AlertWhereInput + } + + + /** + * Count Type MarketCountOutputType + */ + + export type MarketCountOutputType = { + signals: number + positions: number + watchlist: number + alerts: number + } + + export type MarketCountOutputTypeSelect = { + signals?: boolean | MarketCountOutputTypeCountSignalsArgs + positions?: boolean | MarketCountOutputTypeCountPositionsArgs + watchlist?: boolean | MarketCountOutputTypeCountWatchlistArgs + alerts?: boolean | MarketCountOutputTypeCountAlertsArgs + } + + // Custom InputTypes + /** + * MarketCountOutputType without action + */ + export type MarketCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the MarketCountOutputType + */ + select?: MarketCountOutputTypeSelect | null + } + + /** + * MarketCountOutputType without action + */ + export type MarketCountOutputTypeCountSignalsArgs = { + where?: AISignalWhereInput + } + + /** + * MarketCountOutputType without action + */ + export type MarketCountOutputTypeCountPositionsArgs = { + where?: PositionWhereInput + } + + /** + * MarketCountOutputType without action + */ + export type MarketCountOutputTypeCountWatchlistArgs = { + where?: WatchlistWhereInput + } + + /** + * MarketCountOutputType without action + */ + export type MarketCountOutputTypeCountAlertsArgs = { + where?: AlertWhereInput + } + + + /** + * Models + */ + + /** + * Model User + */ + + export type AggregateUser = { + _count: UserCountAggregateOutputType | null + _avg: UserAvgAggregateOutputType | null + _sum: UserSumAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null + } + + export type UserAvgAggregateOutputType = { + id: number | null + } + + export type UserSumAggregateOutputType = { + id: number | null + } + + export type UserMinAggregateOutputType = { + id: number | null + email: string | null + passwordHash: string | null + isActive: boolean | null + telegramChatId: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type UserMaxAggregateOutputType = { + id: number | null + email: string | null + passwordHash: string | null + isActive: boolean | null + telegramChatId: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type UserCountAggregateOutputType = { + id: number + email: number + passwordHash: number + isActive: number + telegramChatId: number + createdAt: number + updatedAt: number + _all: number + } + + + export type UserAvgAggregateInputType = { + id?: true + } + + export type UserSumAggregateInputType = { + id?: true + } + + export type UserMinAggregateInputType = { + id?: true + email?: true + passwordHash?: true + isActive?: true + telegramChatId?: true + createdAt?: true + updatedAt?: true + } + + export type UserMaxAggregateInputType = { + id?: true + email?: true + passwordHash?: true + isActive?: true + telegramChatId?: true + createdAt?: true + updatedAt?: true + } + + export type UserCountAggregateInputType = { + id?: true + email?: true + passwordHash?: true + isActive?: true + telegramChatId?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type UserAggregateArgs = { + /** + * Filter which User to aggregate. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Users + **/ + _count?: true | UserCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: UserAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: UserSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: UserMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: UserMaxAggregateInputType + } + + export type GetUserAggregateType = { + [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type UserGroupByArgs = { + where?: UserWhereInput + orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[] + by: UserScalarFieldEnum[] | UserScalarFieldEnum + having?: UserScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: UserCountAggregateInputType | true + _avg?: UserAvgAggregateInputType + _sum?: UserSumAggregateInputType + _min?: UserMinAggregateInputType + _max?: UserMaxAggregateInputType + } + + export type UserGroupByOutputType = { + id: number + email: string + passwordHash: string + isActive: boolean + telegramChatId: string | null + createdAt: Date + updatedAt: Date + _count: UserCountAggregateOutputType | null + _avg: UserAvgAggregateOutputType | null + _sum: UserSumAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null + } + + type GetUserGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type UserSelect = $Extensions.GetSelect<{ + id?: boolean + email?: boolean + passwordHash?: boolean + isActive?: boolean + telegramChatId?: boolean + createdAt?: boolean + updatedAt?: boolean + positions?: boolean | User$positionsArgs + watchlist?: boolean | User$watchlistArgs + alerts?: boolean | User$alertsArgs + _count?: boolean | UserCountOutputTypeDefaultArgs + }, ExtArgs["result"]["user"]> + + export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + email?: boolean + passwordHash?: boolean + isActive?: boolean + telegramChatId?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["user"]> + + export type UserSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + email?: boolean + passwordHash?: boolean + isActive?: boolean + telegramChatId?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["user"]> + + export type UserSelectScalar = { + id?: boolean + email?: boolean + passwordHash?: boolean + isActive?: boolean + telegramChatId?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type UserOmit = $Extensions.GetOmit<"id" | "email" | "passwordHash" | "isActive" | "telegramChatId" | "createdAt" | "updatedAt", ExtArgs["result"]["user"]> + export type UserInclude = { + positions?: boolean | User$positionsArgs + watchlist?: boolean | User$watchlistArgs + alerts?: boolean | User$alertsArgs + _count?: boolean | UserCountOutputTypeDefaultArgs + } + export type UserIncludeCreateManyAndReturn = {} + export type UserIncludeUpdateManyAndReturn = {} + + export type $UserPayload = { + name: "User" + objects: { + positions: Prisma.$PositionPayload[] + watchlist: Prisma.$WatchlistPayload[] + alerts: Prisma.$AlertPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: number + email: string + passwordHash: string + isActive: boolean + telegramChatId: string | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["user"]> + composites: {} + } + + type UserGetPayload = $Result.GetResult + + type UserCountArgs = + Omit & { + select?: UserCountAggregateInputType | true + } + + export interface UserDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } + /** + * Find zero or one User that matches the filter. + * @param {UserFindUniqueArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one User that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first User that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindFirstArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first User that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Users that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Users + * const users = await prisma.user.findMany() + * + * // Get first 10 Users + * const users = await prisma.user.findMany({ take: 10 }) + * + * // Only select the `id` + * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a User. + * @param {UserCreateArgs} args - Arguments to create a User. + * @example + * // Create one User + * const User = await prisma.user.create({ + * data: { + * // ... data to create a User + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Users. + * @param {UserCreateManyArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Users and returns the data saved in the database. + * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Users and only return the `id` + * const userWithIdOnly = await prisma.user.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a User. + * @param {UserDeleteArgs} args - Arguments to delete one User. + * @example + * // Delete one User + * const User = await prisma.user.delete({ + * where: { + * // ... filter to delete one User + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one User. + * @param {UserUpdateArgs} args - Arguments to update one User. + * @example + * // Update one User + * const user = await prisma.user.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Users. + * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. + * @example + * // Delete a few Users + * const { count } = await prisma.user.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Users. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Users + * const user = await prisma.user.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Users and returns the data updated in the database. + * @param {UserUpdateManyAndReturnArgs} args - Arguments to update many Users. + * @example + * // Update many Users + * const user = await prisma.user.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Users and only return the `id` + * const userWithIdOnly = await prisma.user.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one User. + * @param {UserUpsertArgs} args - Arguments to update or create a User. + * @example + * // Update or create a User + * const user = await prisma.user.upsert({ + * create: { + * // ... data to create a User + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the User we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Users. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCountArgs} args - Arguments to filter Users to count. + * @example + * // Count the number of Users + * const count = await prisma.user.count({ + * where: { + * // ... the filter for the Users we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a User. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by User. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends UserGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: UserGroupByArgs['orderBy'] } + : { orderBy?: UserGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the User model + */ + readonly fields: UserFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for User. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__UserClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + positions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + watchlist = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + alerts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the User model + */ + interface UserFieldRefs { + readonly id: FieldRef<"User", 'Int'> + readonly email: FieldRef<"User", 'String'> + readonly passwordHash: FieldRef<"User", 'String'> + readonly isActive: FieldRef<"User", 'Boolean'> + readonly telegramChatId: FieldRef<"User", 'String'> + readonly createdAt: FieldRef<"User", 'DateTime'> + readonly updatedAt: FieldRef<"User", 'DateTime'> + } + + + // Custom InputTypes + /** + * User findUnique + */ + export type UserFindUniqueArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where: UserWhereUniqueInput + } + + /** + * User findUniqueOrThrow + */ + export type UserFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where: UserWhereUniqueInput + } + + /** + * User findFirst + */ + export type UserFindFirstArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Users. + */ + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User findFirstOrThrow + */ + export type UserFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Users. + */ + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User findMany + */ + export type UserFindManyArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which Users to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User create + */ + export type UserCreateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The data needed to create a User. + */ + data: XOR + } + + /** + * User createMany + */ + export type UserCreateManyArgs = { + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + } + + /** + * User createManyAndReturn + */ + export type UserCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelectCreateManyAndReturn | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + } + + /** + * User update + */ + export type UserUpdateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The data needed to update a User. + */ + data: XOR + /** + * Choose, which User to update. + */ + where: UserWhereUniqueInput + } + + /** + * User updateMany + */ + export type UserUpdateManyArgs = { + /** + * The data used to update Users. + */ + data: XOR + /** + * Filter which Users to update + */ + where?: UserWhereInput + /** + * Limit how many Users to update. + */ + limit?: number + } + + /** + * User updateManyAndReturn + */ + export type UserUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * The data used to update Users. + */ + data: XOR + /** + * Filter which Users to update + */ + where?: UserWhereInput + /** + * Limit how many Users to update. + */ + limit?: number + } + + /** + * User upsert + */ + export type UserUpsertArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The filter to search for the User to update in case it exists. + */ + where: UserWhereUniqueInput + /** + * In case the User found by the `where` argument doesn't exist, create a new User with this data. + */ + create: XOR + /** + * In case the User was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * User delete + */ + export type UserDeleteArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter which User to delete. + */ + where: UserWhereUniqueInput + } + + /** + * User deleteMany + */ + export type UserDeleteManyArgs = { + /** + * Filter which Users to delete + */ + where?: UserWhereInput + /** + * Limit how many Users to delete. + */ + limit?: number + } + + /** + * User.positions + */ + export type User$positionsArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + where?: PositionWhereInput + orderBy?: PositionOrderByWithRelationInput | PositionOrderByWithRelationInput[] + cursor?: PositionWhereUniqueInput + take?: number + skip?: number + distinct?: PositionScalarFieldEnum | PositionScalarFieldEnum[] + } + + /** + * User.watchlist + */ + export type User$watchlistArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + where?: WatchlistWhereInput + orderBy?: WatchlistOrderByWithRelationInput | WatchlistOrderByWithRelationInput[] + cursor?: WatchlistWhereUniqueInput + take?: number + skip?: number + distinct?: WatchlistScalarFieldEnum | WatchlistScalarFieldEnum[] + } + + /** + * User.alerts + */ + export type User$alertsArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + where?: AlertWhereInput + orderBy?: AlertOrderByWithRelationInput | AlertOrderByWithRelationInput[] + cursor?: AlertWhereUniqueInput + take?: number + skip?: number + distinct?: AlertScalarFieldEnum | AlertScalarFieldEnum[] + } + + /** + * User without action + */ + export type UserDefaultArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Omit specific fields from the User + */ + omit?: UserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + } + + + /** + * Model Market + */ + + export type AggregateMarket = { + _count: MarketCountAggregateOutputType | null + _avg: MarketAvgAggregateOutputType | null + _sum: MarketSumAggregateOutputType | null + _min: MarketMinAggregateOutputType | null + _max: MarketMaxAggregateOutputType | null + } + + export type MarketAvgAggregateOutputType = { + yesPrice: number | null + noPrice: number | null + volumeEur: number | null + liquidityEur: number | null + spread: number | null + bestBid: number | null + bestAsk: number | null + } + + export type MarketSumAggregateOutputType = { + yesPrice: number | null + noPrice: number | null + volumeEur: number | null + liquidityEur: number | null + spread: number | null + bestBid: number | null + bestAsk: number | null + } + + export type MarketMinAggregateOutputType = { + id: string | null + question: string | null + category: string | null + countryCode: string | null + yesPrice: number | null + noPrice: number | null + volumeEur: number | null + liquidityEur: number | null + spread: number | null + bestBid: number | null + bestAsk: number | null + clobTokenId: string | null + analyzable: boolean | null + status: string | null + closesAt: Date | null + lastSynced: Date | null + } + + export type MarketMaxAggregateOutputType = { + id: string | null + question: string | null + category: string | null + countryCode: string | null + yesPrice: number | null + noPrice: number | null + volumeEur: number | null + liquidityEur: number | null + spread: number | null + bestBid: number | null + bestAsk: number | null + clobTokenId: string | null + analyzable: boolean | null + status: string | null + closesAt: Date | null + lastSynced: Date | null + } + + export type MarketCountAggregateOutputType = { + id: number + question: number + category: number + countryCode: number + yesPrice: number + noPrice: number + volumeEur: number + liquidityEur: number + spread: number + bestBid: number + bestAsk: number + clobTokenId: number + analyzable: number + status: number + closesAt: number + lastSynced: number + _all: number + } + + + export type MarketAvgAggregateInputType = { + yesPrice?: true + noPrice?: true + volumeEur?: true + liquidityEur?: true + spread?: true + bestBid?: true + bestAsk?: true + } + + export type MarketSumAggregateInputType = { + yesPrice?: true + noPrice?: true + volumeEur?: true + liquidityEur?: true + spread?: true + bestBid?: true + bestAsk?: true + } + + export type MarketMinAggregateInputType = { + id?: true + question?: true + category?: true + countryCode?: true + yesPrice?: true + noPrice?: true + volumeEur?: true + liquidityEur?: true + spread?: true + bestBid?: true + bestAsk?: true + clobTokenId?: true + analyzable?: true + status?: true + closesAt?: true + lastSynced?: true + } + + export type MarketMaxAggregateInputType = { + id?: true + question?: true + category?: true + countryCode?: true + yesPrice?: true + noPrice?: true + volumeEur?: true + liquidityEur?: true + spread?: true + bestBid?: true + bestAsk?: true + clobTokenId?: true + analyzable?: true + status?: true + closesAt?: true + lastSynced?: true + } + + export type MarketCountAggregateInputType = { + id?: true + question?: true + category?: true + countryCode?: true + yesPrice?: true + noPrice?: true + volumeEur?: true + liquidityEur?: true + spread?: true + bestBid?: true + bestAsk?: true + clobTokenId?: true + analyzable?: true + status?: true + closesAt?: true + lastSynced?: true + _all?: true + } + + export type MarketAggregateArgs = { + /** + * Filter which Market to aggregate. + */ + where?: MarketWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Markets to fetch. + */ + orderBy?: MarketOrderByWithRelationInput | MarketOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: MarketWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Markets 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` Markets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Markets + **/ + _count?: true | MarketCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: MarketAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: MarketSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: MarketMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: MarketMaxAggregateInputType + } + + export type GetMarketAggregateType = { + [P in keyof T & keyof AggregateMarket]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type MarketGroupByArgs = { + where?: MarketWhereInput + orderBy?: MarketOrderByWithAggregationInput | MarketOrderByWithAggregationInput[] + by: MarketScalarFieldEnum[] | MarketScalarFieldEnum + having?: MarketScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: MarketCountAggregateInputType | true + _avg?: MarketAvgAggregateInputType + _sum?: MarketSumAggregateInputType + _min?: MarketMinAggregateInputType + _max?: MarketMaxAggregateInputType + } + + export type MarketGroupByOutputType = { + id: string + question: string + category: string | null + countryCode: string | null + yesPrice: number | null + noPrice: number | null + volumeEur: number | null + liquidityEur: number | null + spread: number | null + bestBid: number | null + bestAsk: number | null + clobTokenId: string | null + analyzable: boolean + status: string + closesAt: Date | null + lastSynced: Date + _count: MarketCountAggregateOutputType | null + _avg: MarketAvgAggregateOutputType | null + _sum: MarketSumAggregateOutputType | null + _min: MarketMinAggregateOutputType | null + _max: MarketMaxAggregateOutputType | null + } + + type GetMarketGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof MarketGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type MarketSelect = $Extensions.GetSelect<{ + id?: boolean + question?: boolean + category?: boolean + countryCode?: boolean + yesPrice?: boolean + noPrice?: boolean + volumeEur?: boolean + liquidityEur?: boolean + spread?: boolean + bestBid?: boolean + bestAsk?: boolean + clobTokenId?: boolean + analyzable?: boolean + status?: boolean + closesAt?: boolean + lastSynced?: boolean + signals?: boolean | Market$signalsArgs + positions?: boolean | Market$positionsArgs + watchlist?: boolean | Market$watchlistArgs + alerts?: boolean | Market$alertsArgs + _count?: boolean | MarketCountOutputTypeDefaultArgs + }, ExtArgs["result"]["market"]> + + export type MarketSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + question?: boolean + category?: boolean + countryCode?: boolean + yesPrice?: boolean + noPrice?: boolean + volumeEur?: boolean + liquidityEur?: boolean + spread?: boolean + bestBid?: boolean + bestAsk?: boolean + clobTokenId?: boolean + analyzable?: boolean + status?: boolean + closesAt?: boolean + lastSynced?: boolean + }, ExtArgs["result"]["market"]> + + export type MarketSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + question?: boolean + category?: boolean + countryCode?: boolean + yesPrice?: boolean + noPrice?: boolean + volumeEur?: boolean + liquidityEur?: boolean + spread?: boolean + bestBid?: boolean + bestAsk?: boolean + clobTokenId?: boolean + analyzable?: boolean + status?: boolean + closesAt?: boolean + lastSynced?: boolean + }, ExtArgs["result"]["market"]> + + export type MarketSelectScalar = { + id?: boolean + question?: boolean + category?: boolean + countryCode?: boolean + yesPrice?: boolean + noPrice?: boolean + volumeEur?: boolean + liquidityEur?: boolean + spread?: boolean + bestBid?: boolean + bestAsk?: boolean + clobTokenId?: boolean + analyzable?: boolean + status?: boolean + closesAt?: boolean + lastSynced?: boolean + } + + export type MarketOmit = $Extensions.GetOmit<"id" | "question" | "category" | "countryCode" | "yesPrice" | "noPrice" | "volumeEur" | "liquidityEur" | "spread" | "bestBid" | "bestAsk" | "clobTokenId" | "analyzable" | "status" | "closesAt" | "lastSynced", ExtArgs["result"]["market"]> + export type MarketInclude = { + signals?: boolean | Market$signalsArgs + positions?: boolean | Market$positionsArgs + watchlist?: boolean | Market$watchlistArgs + alerts?: boolean | Market$alertsArgs + _count?: boolean | MarketCountOutputTypeDefaultArgs + } + export type MarketIncludeCreateManyAndReturn = {} + export type MarketIncludeUpdateManyAndReturn = {} + + export type $MarketPayload = { + name: "Market" + objects: { + signals: Prisma.$AISignalPayload[] + positions: Prisma.$PositionPayload[] + watchlist: Prisma.$WatchlistPayload[] + alerts: Prisma.$AlertPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + question: string + category: string | null + countryCode: string | null + yesPrice: number | null + noPrice: number | null + volumeEur: number | null + liquidityEur: number | null + spread: number | null + bestBid: number | null + bestAsk: number | null + clobTokenId: string | null + analyzable: boolean + status: string + closesAt: Date | null + lastSynced: Date + }, ExtArgs["result"]["market"]> + composites: {} + } + + type MarketGetPayload = $Result.GetResult + + type MarketCountArgs = + Omit & { + select?: MarketCountAggregateInputType | true + } + + export interface MarketDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Market'], meta: { name: 'Market' } } + /** + * Find zero or one Market that matches the filter. + * @param {MarketFindUniqueArgs} args - Arguments to find a Market + * @example + * // Get one Market + * const market = await prisma.market.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__MarketClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Market that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {MarketFindUniqueOrThrowArgs} args - Arguments to find a Market + * @example + * // Get one Market + * const market = await prisma.market.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__MarketClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Market 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 {MarketFindFirstArgs} args - Arguments to find a Market + * @example + * // Get one Market + * const market = await prisma.market.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__MarketClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Market that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MarketFindFirstOrThrowArgs} args - Arguments to find a Market + * @example + * // Get one Market + * const market = await prisma.market.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__MarketClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Markets 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 {MarketFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Markets + * const markets = await prisma.market.findMany() + * + * // Get first 10 Markets + * const markets = await prisma.market.findMany({ take: 10 }) + * + * // Only select the `id` + * const marketWithIdOnly = await prisma.market.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Market. + * @param {MarketCreateArgs} args - Arguments to create a Market. + * @example + * // Create one Market + * const Market = await prisma.market.create({ + * data: { + * // ... data to create a Market + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__MarketClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Markets. + * @param {MarketCreateManyArgs} args - Arguments to create many Markets. + * @example + * // Create many Markets + * const market = await prisma.market.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Markets and returns the data saved in the database. + * @param {MarketCreateManyAndReturnArgs} args - Arguments to create many Markets. + * @example + * // Create many Markets + * const market = await prisma.market.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Markets and only return the `id` + * const marketWithIdOnly = await prisma.market.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Market. + * @param {MarketDeleteArgs} args - Arguments to delete one Market. + * @example + * // Delete one Market + * const Market = await prisma.market.delete({ + * where: { + * // ... filter to delete one Market + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__MarketClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Market. + * @param {MarketUpdateArgs} args - Arguments to update one Market. + * @example + * // Update one Market + * const market = await prisma.market.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__MarketClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Markets. + * @param {MarketDeleteManyArgs} args - Arguments to filter Markets to delete. + * @example + * // Delete a few Markets + * const { count } = await prisma.market.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Markets. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MarketUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Markets + * const market = await prisma.market.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Markets and returns the data updated in the database. + * @param {MarketUpdateManyAndReturnArgs} args - Arguments to update many Markets. + * @example + * // Update many Markets + * const market = await prisma.market.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Markets and only return the `id` + * const marketWithIdOnly = await prisma.market.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Market. + * @param {MarketUpsertArgs} args - Arguments to update or create a Market. + * @example + * // Update or create a Market + * const market = await prisma.market.upsert({ + * create: { + * // ... data to create a Market + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Market we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__MarketClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Markets. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MarketCountArgs} args - Arguments to filter Markets to count. + * @example + * // Count the number of Markets + * const count = await prisma.market.count({ + * where: { + * // ... the filter for the Markets we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Market. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MarketAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Market. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {MarketGroupByArgs} 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 MarketGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: MarketGroupByArgs['orderBy'] } + : { orderBy?: MarketGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetMarketGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Market model + */ + readonly fields: MarketFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Market. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__MarketClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + signals = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + positions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + watchlist = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + alerts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Market model + */ + interface MarketFieldRefs { + readonly id: FieldRef<"Market", 'String'> + readonly question: FieldRef<"Market", 'String'> + readonly category: FieldRef<"Market", 'String'> + readonly countryCode: FieldRef<"Market", 'String'> + readonly yesPrice: FieldRef<"Market", 'Float'> + readonly noPrice: FieldRef<"Market", 'Float'> + readonly volumeEur: FieldRef<"Market", 'Float'> + readonly liquidityEur: FieldRef<"Market", 'Float'> + readonly spread: FieldRef<"Market", 'Float'> + readonly bestBid: FieldRef<"Market", 'Float'> + readonly bestAsk: FieldRef<"Market", 'Float'> + readonly clobTokenId: FieldRef<"Market", 'String'> + readonly analyzable: FieldRef<"Market", 'Boolean'> + readonly status: FieldRef<"Market", 'String'> + readonly closesAt: FieldRef<"Market", 'DateTime'> + readonly lastSynced: FieldRef<"Market", 'DateTime'> + } + + + // Custom InputTypes + /** + * Market findUnique + */ + export type MarketFindUniqueArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * Filter, which Market to fetch. + */ + where: MarketWhereUniqueInput + } + + /** + * Market findUniqueOrThrow + */ + export type MarketFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * Filter, which Market to fetch. + */ + where: MarketWhereUniqueInput + } + + /** + * Market findFirst + */ + export type MarketFindFirstArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * Filter, which Market to fetch. + */ + where?: MarketWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Markets to fetch. + */ + orderBy?: MarketOrderByWithRelationInput | MarketOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Markets. + */ + cursor?: MarketWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Markets 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` Markets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Markets. + */ + distinct?: MarketScalarFieldEnum | MarketScalarFieldEnum[] + } + + /** + * Market findFirstOrThrow + */ + export type MarketFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * Filter, which Market to fetch. + */ + where?: MarketWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Markets to fetch. + */ + orderBy?: MarketOrderByWithRelationInput | MarketOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Markets. + */ + cursor?: MarketWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Markets 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` Markets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Markets. + */ + distinct?: MarketScalarFieldEnum | MarketScalarFieldEnum[] + } + + /** + * Market findMany + */ + export type MarketFindManyArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * Filter, which Markets to fetch. + */ + where?: MarketWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Markets to fetch. + */ + orderBy?: MarketOrderByWithRelationInput | MarketOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Markets. + */ + cursor?: MarketWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Markets 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` Markets. + */ + skip?: number + distinct?: MarketScalarFieldEnum | MarketScalarFieldEnum[] + } + + /** + * Market create + */ + export type MarketCreateArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * The data needed to create a Market. + */ + data: XOR + } + + /** + * Market createMany + */ + export type MarketCreateManyArgs = { + /** + * The data used to create many Markets. + */ + data: MarketCreateManyInput | MarketCreateManyInput[] + } + + /** + * Market createManyAndReturn + */ + export type MarketCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * The data used to create many Markets. + */ + data: MarketCreateManyInput | MarketCreateManyInput[] + } + + /** + * Market update + */ + export type MarketUpdateArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * The data needed to update a Market. + */ + data: XOR + /** + * Choose, which Market to update. + */ + where: MarketWhereUniqueInput + } + + /** + * Market updateMany + */ + export type MarketUpdateManyArgs = { + /** + * The data used to update Markets. + */ + data: XOR + /** + * Filter which Markets to update + */ + where?: MarketWhereInput + /** + * Limit how many Markets to update. + */ + limit?: number + } + + /** + * Market updateManyAndReturn + */ + export type MarketUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * The data used to update Markets. + */ + data: XOR + /** + * Filter which Markets to update + */ + where?: MarketWhereInput + /** + * Limit how many Markets to update. + */ + limit?: number + } + + /** + * Market upsert + */ + export type MarketUpsertArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * The filter to search for the Market to update in case it exists. + */ + where: MarketWhereUniqueInput + /** + * In case the Market found by the `where` argument doesn't exist, create a new Market with this data. + */ + create: XOR + /** + * In case the Market was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Market delete + */ + export type MarketDeleteArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + /** + * Filter which Market to delete. + */ + where: MarketWhereUniqueInput + } + + /** + * Market deleteMany + */ + export type MarketDeleteManyArgs = { + /** + * Filter which Markets to delete + */ + where?: MarketWhereInput + /** + * Limit how many Markets to delete. + */ + limit?: number + } + + /** + * Market.signals + */ + export type Market$signalsArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + where?: AISignalWhereInput + orderBy?: AISignalOrderByWithRelationInput | AISignalOrderByWithRelationInput[] + cursor?: AISignalWhereUniqueInput + take?: number + skip?: number + distinct?: AISignalScalarFieldEnum | AISignalScalarFieldEnum[] + } + + /** + * Market.positions + */ + export type Market$positionsArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + where?: PositionWhereInput + orderBy?: PositionOrderByWithRelationInput | PositionOrderByWithRelationInput[] + cursor?: PositionWhereUniqueInput + take?: number + skip?: number + distinct?: PositionScalarFieldEnum | PositionScalarFieldEnum[] + } + + /** + * Market.watchlist + */ + export type Market$watchlistArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + where?: WatchlistWhereInput + orderBy?: WatchlistOrderByWithRelationInput | WatchlistOrderByWithRelationInput[] + cursor?: WatchlistWhereUniqueInput + take?: number + skip?: number + distinct?: WatchlistScalarFieldEnum | WatchlistScalarFieldEnum[] + } + + /** + * Market.alerts + */ + export type Market$alertsArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + where?: AlertWhereInput + orderBy?: AlertOrderByWithRelationInput | AlertOrderByWithRelationInput[] + cursor?: AlertWhereUniqueInput + take?: number + skip?: number + distinct?: AlertScalarFieldEnum | AlertScalarFieldEnum[] + } + + /** + * Market without action + */ + export type MarketDefaultArgs = { + /** + * Select specific fields to fetch from the Market + */ + select?: MarketSelect | null + /** + * Omit specific fields from the Market + */ + omit?: MarketOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: MarketInclude | null + } + + + /** + * Model AISignal + */ + + export type AggregateAISignal = { + _count: AISignalCountAggregateOutputType | null + _avg: AISignalAvgAggregateOutputType | null + _sum: AISignalSumAggregateOutputType | null + _min: AISignalMinAggregateOutputType | null + _max: AISignalMaxAggregateOutputType | null + } + + export type AISignalAvgAggregateOutputType = { + id: number | null + confidence: number | null + newsCount: number | null + impliedProb: number | null + fairProb: number | null + edgePoints: number | null + } + + export type AISignalSumAggregateOutputType = { + id: number | null + confidence: number | null + newsCount: number | null + impliedProb: number | null + fairProb: number | null + edgePoints: number | null + } + + export type AISignalMinAggregateOutputType = { + id: number | null + marketId: string | null + signal: string | null + confidence: number | null + summary: string | null + keyRisk: string | null + newsCount: number | null + modelVersion: string | null + impliedProb: number | null + fairProb: number | null + edgePoints: number | null + generatedAt: Date | null + } + + export type AISignalMaxAggregateOutputType = { + id: number | null + marketId: string | null + signal: string | null + confidence: number | null + summary: string | null + keyRisk: string | null + newsCount: number | null + modelVersion: string | null + impliedProb: number | null + fairProb: number | null + edgePoints: number | null + generatedAt: Date | null + } + + export type AISignalCountAggregateOutputType = { + id: number + marketId: number + signal: number + confidence: number + summary: number + keyRisk: number + newsCount: number + modelVersion: number + impliedProb: number + fairProb: number + edgePoints: number + generatedAt: number + _all: number + } + + + export type AISignalAvgAggregateInputType = { + id?: true + confidence?: true + newsCount?: true + impliedProb?: true + fairProb?: true + edgePoints?: true + } + + export type AISignalSumAggregateInputType = { + id?: true + confidence?: true + newsCount?: true + impliedProb?: true + fairProb?: true + edgePoints?: true + } + + export type AISignalMinAggregateInputType = { + id?: true + marketId?: true + signal?: true + confidence?: true + summary?: true + keyRisk?: true + newsCount?: true + modelVersion?: true + impliedProb?: true + fairProb?: true + edgePoints?: true + generatedAt?: true + } + + export type AISignalMaxAggregateInputType = { + id?: true + marketId?: true + signal?: true + confidence?: true + summary?: true + keyRisk?: true + newsCount?: true + modelVersion?: true + impliedProb?: true + fairProb?: true + edgePoints?: true + generatedAt?: true + } + + export type AISignalCountAggregateInputType = { + id?: true + marketId?: true + signal?: true + confidence?: true + summary?: true + keyRisk?: true + newsCount?: true + modelVersion?: true + impliedProb?: true + fairProb?: true + edgePoints?: true + generatedAt?: true + _all?: true + } + + export type AISignalAggregateArgs = { + /** + * Filter which AISignal to aggregate. + */ + where?: AISignalWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AISignals to fetch. + */ + orderBy?: AISignalOrderByWithRelationInput | AISignalOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AISignalWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AISignals 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` AISignals. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AISignals + **/ + _count?: true | AISignalCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: AISignalAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: AISignalSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AISignalMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AISignalMaxAggregateInputType + } + + export type GetAISignalAggregateType = { + [P in keyof T & keyof AggregateAISignal]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AISignalGroupByArgs = { + where?: AISignalWhereInput + orderBy?: AISignalOrderByWithAggregationInput | AISignalOrderByWithAggregationInput[] + by: AISignalScalarFieldEnum[] | AISignalScalarFieldEnum + having?: AISignalScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AISignalCountAggregateInputType | true + _avg?: AISignalAvgAggregateInputType + _sum?: AISignalSumAggregateInputType + _min?: AISignalMinAggregateInputType + _max?: AISignalMaxAggregateInputType + } + + export type AISignalGroupByOutputType = { + id: number + marketId: string + signal: string + confidence: number + summary: string | null + keyRisk: string | null + newsCount: number + modelVersion: string + impliedProb: number | null + fairProb: number | null + edgePoints: number | null + generatedAt: Date + _count: AISignalCountAggregateOutputType | null + _avg: AISignalAvgAggregateOutputType | null + _sum: AISignalSumAggregateOutputType | null + _min: AISignalMinAggregateOutputType | null + _max: AISignalMaxAggregateOutputType | null + } + + type GetAISignalGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AISignalGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AISignalSelect = $Extensions.GetSelect<{ + id?: boolean + marketId?: boolean + signal?: boolean + confidence?: boolean + summary?: boolean + keyRisk?: boolean + newsCount?: boolean + modelVersion?: boolean + impliedProb?: boolean + fairProb?: boolean + edgePoints?: boolean + generatedAt?: boolean + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["aISignal"]> + + export type AISignalSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + marketId?: boolean + signal?: boolean + confidence?: boolean + summary?: boolean + keyRisk?: boolean + newsCount?: boolean + modelVersion?: boolean + impliedProb?: boolean + fairProb?: boolean + edgePoints?: boolean + generatedAt?: boolean + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["aISignal"]> + + export type AISignalSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + marketId?: boolean + signal?: boolean + confidence?: boolean + summary?: boolean + keyRisk?: boolean + newsCount?: boolean + modelVersion?: boolean + impliedProb?: boolean + fairProb?: boolean + edgePoints?: boolean + generatedAt?: boolean + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["aISignal"]> + + export type AISignalSelectScalar = { + id?: boolean + marketId?: boolean + signal?: boolean + confidence?: boolean + summary?: boolean + keyRisk?: boolean + newsCount?: boolean + modelVersion?: boolean + impliedProb?: boolean + fairProb?: boolean + edgePoints?: boolean + generatedAt?: boolean + } + + export type AISignalOmit = $Extensions.GetOmit<"id" | "marketId" | "signal" | "confidence" | "summary" | "keyRisk" | "newsCount" | "modelVersion" | "impliedProb" | "fairProb" | "edgePoints" | "generatedAt", ExtArgs["result"]["aISignal"]> + export type AISignalInclude = { + market?: boolean | MarketDefaultArgs + } + export type AISignalIncludeCreateManyAndReturn = { + market?: boolean | MarketDefaultArgs + } + export type AISignalIncludeUpdateManyAndReturn = { + market?: boolean | MarketDefaultArgs + } + + export type $AISignalPayload = { + name: "AISignal" + objects: { + market: Prisma.$MarketPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: number + marketId: string + signal: string + confidence: number + summary: string | null + keyRisk: string | null + newsCount: number + modelVersion: string + impliedProb: number | null + fairProb: number | null + edgePoints: number | null + generatedAt: Date + }, ExtArgs["result"]["aISignal"]> + composites: {} + } + + type AISignalGetPayload = $Result.GetResult + + type AISignalCountArgs = + Omit & { + select?: AISignalCountAggregateInputType | true + } + + export interface AISignalDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AISignal'], meta: { name: 'AISignal' } } + /** + * Find zero or one AISignal that matches the filter. + * @param {AISignalFindUniqueArgs} args - Arguments to find a AISignal + * @example + * // Get one AISignal + * const aISignal = await prisma.aISignal.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AISignalClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one AISignal that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AISignalFindUniqueOrThrowArgs} args - Arguments to find a AISignal + * @example + * // Get one AISignal + * const aISignal = await prisma.aISignal.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AISignalClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first AISignal 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 {AISignalFindFirstArgs} args - Arguments to find a AISignal + * @example + * // Get one AISignal + * const aISignal = await prisma.aISignal.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AISignalClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first AISignal that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AISignalFindFirstOrThrowArgs} args - Arguments to find a AISignal + * @example + * // Get one AISignal + * const aISignal = await prisma.aISignal.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AISignalClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more AISignals 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 {AISignalFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AISignals + * const aISignals = await prisma.aISignal.findMany() + * + * // Get first 10 AISignals + * const aISignals = await prisma.aISignal.findMany({ take: 10 }) + * + * // Only select the `id` + * const aISignalWithIdOnly = await prisma.aISignal.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a AISignal. + * @param {AISignalCreateArgs} args - Arguments to create a AISignal. + * @example + * // Create one AISignal + * const AISignal = await prisma.aISignal.create({ + * data: { + * // ... data to create a AISignal + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AISignalClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many AISignals. + * @param {AISignalCreateManyArgs} args - Arguments to create many AISignals. + * @example + * // Create many AISignals + * const aISignal = await prisma.aISignal.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AISignals and returns the data saved in the database. + * @param {AISignalCreateManyAndReturnArgs} args - Arguments to create many AISignals. + * @example + * // Create many AISignals + * const aISignal = await prisma.aISignal.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AISignals and only return the `id` + * const aISignalWithIdOnly = await prisma.aISignal.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a AISignal. + * @param {AISignalDeleteArgs} args - Arguments to delete one AISignal. + * @example + * // Delete one AISignal + * const AISignal = await prisma.aISignal.delete({ + * where: { + * // ... filter to delete one AISignal + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AISignalClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one AISignal. + * @param {AISignalUpdateArgs} args - Arguments to update one AISignal. + * @example + * // Update one AISignal + * const aISignal = await prisma.aISignal.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AISignalClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more AISignals. + * @param {AISignalDeleteManyArgs} args - Arguments to filter AISignals to delete. + * @example + * // Delete a few AISignals + * const { count } = await prisma.aISignal.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AISignals. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AISignalUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AISignals + * const aISignal = await prisma.aISignal.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AISignals and returns the data updated in the database. + * @param {AISignalUpdateManyAndReturnArgs} args - Arguments to update many AISignals. + * @example + * // Update many AISignals + * const aISignal = await prisma.aISignal.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more AISignals and only return the `id` + * const aISignalWithIdOnly = await prisma.aISignal.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one AISignal. + * @param {AISignalUpsertArgs} args - Arguments to update or create a AISignal. + * @example + * // Update or create a AISignal + * const aISignal = await prisma.aISignal.upsert({ + * create: { + * // ... data to create a AISignal + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AISignal we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AISignalClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of AISignals. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AISignalCountArgs} args - Arguments to filter AISignals to count. + * @example + * // Count the number of AISignals + * const count = await prisma.aISignal.count({ + * where: { + * // ... the filter for the AISignals we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AISignal. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AISignalAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by AISignal. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AISignalGroupByArgs} 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 AISignalGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AISignalGroupByArgs['orderBy'] } + : { orderBy?: AISignalGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAISignalGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AISignal model + */ + readonly fields: AISignalFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AISignal. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AISignalClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + market = {}>(args?: Subset>): Prisma__MarketClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the AISignal model + */ + interface AISignalFieldRefs { + readonly id: FieldRef<"AISignal", 'Int'> + readonly marketId: FieldRef<"AISignal", 'String'> + readonly signal: FieldRef<"AISignal", 'String'> + readonly confidence: FieldRef<"AISignal", 'Float'> + readonly summary: FieldRef<"AISignal", 'String'> + readonly keyRisk: FieldRef<"AISignal", 'String'> + readonly newsCount: FieldRef<"AISignal", 'Int'> + readonly modelVersion: FieldRef<"AISignal", 'String'> + readonly impliedProb: FieldRef<"AISignal", 'Float'> + readonly fairProb: FieldRef<"AISignal", 'Float'> + readonly edgePoints: FieldRef<"AISignal", 'Float'> + readonly generatedAt: FieldRef<"AISignal", 'DateTime'> + } + + + // Custom InputTypes + /** + * AISignal findUnique + */ + export type AISignalFindUniqueArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * Filter, which AISignal to fetch. + */ + where: AISignalWhereUniqueInput + } + + /** + * AISignal findUniqueOrThrow + */ + export type AISignalFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * Filter, which AISignal to fetch. + */ + where: AISignalWhereUniqueInput + } + + /** + * AISignal findFirst + */ + export type AISignalFindFirstArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * Filter, which AISignal to fetch. + */ + where?: AISignalWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AISignals to fetch. + */ + orderBy?: AISignalOrderByWithRelationInput | AISignalOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AISignals. + */ + cursor?: AISignalWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AISignals 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` AISignals. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AISignals. + */ + distinct?: AISignalScalarFieldEnum | AISignalScalarFieldEnum[] + } + + /** + * AISignal findFirstOrThrow + */ + export type AISignalFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * Filter, which AISignal to fetch. + */ + where?: AISignalWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AISignals to fetch. + */ + orderBy?: AISignalOrderByWithRelationInput | AISignalOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AISignals. + */ + cursor?: AISignalWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AISignals 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` AISignals. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AISignals. + */ + distinct?: AISignalScalarFieldEnum | AISignalScalarFieldEnum[] + } + + /** + * AISignal findMany + */ + export type AISignalFindManyArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * Filter, which AISignals to fetch. + */ + where?: AISignalWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AISignals to fetch. + */ + orderBy?: AISignalOrderByWithRelationInput | AISignalOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AISignals. + */ + cursor?: AISignalWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AISignals 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` AISignals. + */ + skip?: number + distinct?: AISignalScalarFieldEnum | AISignalScalarFieldEnum[] + } + + /** + * AISignal create + */ + export type AISignalCreateArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * The data needed to create a AISignal. + */ + data: XOR + } + + /** + * AISignal createMany + */ + export type AISignalCreateManyArgs = { + /** + * The data used to create many AISignals. + */ + data: AISignalCreateManyInput | AISignalCreateManyInput[] + } + + /** + * AISignal createManyAndReturn + */ + export type AISignalCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelectCreateManyAndReturn | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * The data used to create many AISignals. + */ + data: AISignalCreateManyInput | AISignalCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalIncludeCreateManyAndReturn | null + } + + /** + * AISignal update + */ + export type AISignalUpdateArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * The data needed to update a AISignal. + */ + data: XOR + /** + * Choose, which AISignal to update. + */ + where: AISignalWhereUniqueInput + } + + /** + * AISignal updateMany + */ + export type AISignalUpdateManyArgs = { + /** + * The data used to update AISignals. + */ + data: XOR + /** + * Filter which AISignals to update + */ + where?: AISignalWhereInput + /** + * Limit how many AISignals to update. + */ + limit?: number + } + + /** + * AISignal updateManyAndReturn + */ + export type AISignalUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * The data used to update AISignals. + */ + data: XOR + /** + * Filter which AISignals to update + */ + where?: AISignalWhereInput + /** + * Limit how many AISignals to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalIncludeUpdateManyAndReturn | null + } + + /** + * AISignal upsert + */ + export type AISignalUpsertArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * The filter to search for the AISignal to update in case it exists. + */ + where: AISignalWhereUniqueInput + /** + * In case the AISignal found by the `where` argument doesn't exist, create a new AISignal with this data. + */ + create: XOR + /** + * In case the AISignal was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AISignal delete + */ + export type AISignalDeleteArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + /** + * Filter which AISignal to delete. + */ + where: AISignalWhereUniqueInput + } + + /** + * AISignal deleteMany + */ + export type AISignalDeleteManyArgs = { + /** + * Filter which AISignals to delete + */ + where?: AISignalWhereInput + /** + * Limit how many AISignals to delete. + */ + limit?: number + } + + /** + * AISignal without action + */ + export type AISignalDefaultArgs = { + /** + * Select specific fields to fetch from the AISignal + */ + select?: AISignalSelect | null + /** + * Omit specific fields from the AISignal + */ + omit?: AISignalOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AISignalInclude | null + } + + + /** + * Model Position + */ + + export type AggregatePosition = { + _count: PositionCountAggregateOutputType | null + _avg: PositionAvgAggregateOutputType | null + _sum: PositionSumAggregateOutputType | null + _min: PositionMinAggregateOutputType | null + _max: PositionMaxAggregateOutputType | null + } + + export type PositionAvgAggregateOutputType = { + id: number | null + userId: number | null + amountEur: number | null + entryPrice: number | null + currentPrice: number | null + pnl: number | null + kellyFraction: number | null + } + + export type PositionSumAggregateOutputType = { + id: number | null + userId: number | null + amountEur: number | null + entryPrice: number | null + currentPrice: number | null + pnl: number | null + kellyFraction: number | null + } + + export type PositionMinAggregateOutputType = { + id: number | null + userId: number | null + marketId: string | null + outcome: string | null + amountEur: number | null + entryPrice: number | null + currentPrice: number | null + pnl: number | null + kellyFraction: number | null + status: string | null + openedAt: Date | null + closedAt: Date | null + } + + export type PositionMaxAggregateOutputType = { + id: number | null + userId: number | null + marketId: string | null + outcome: string | null + amountEur: number | null + entryPrice: number | null + currentPrice: number | null + pnl: number | null + kellyFraction: number | null + status: string | null + openedAt: Date | null + closedAt: Date | null + } + + export type PositionCountAggregateOutputType = { + id: number + userId: number + marketId: number + outcome: number + amountEur: number + entryPrice: number + currentPrice: number + pnl: number + kellyFraction: number + status: number + openedAt: number + closedAt: number + _all: number + } + + + export type PositionAvgAggregateInputType = { + id?: true + userId?: true + amountEur?: true + entryPrice?: true + currentPrice?: true + pnl?: true + kellyFraction?: true + } + + export type PositionSumAggregateInputType = { + id?: true + userId?: true + amountEur?: true + entryPrice?: true + currentPrice?: true + pnl?: true + kellyFraction?: true + } + + export type PositionMinAggregateInputType = { + id?: true + userId?: true + marketId?: true + outcome?: true + amountEur?: true + entryPrice?: true + currentPrice?: true + pnl?: true + kellyFraction?: true + status?: true + openedAt?: true + closedAt?: true + } + + export type PositionMaxAggregateInputType = { + id?: true + userId?: true + marketId?: true + outcome?: true + amountEur?: true + entryPrice?: true + currentPrice?: true + pnl?: true + kellyFraction?: true + status?: true + openedAt?: true + closedAt?: true + } + + export type PositionCountAggregateInputType = { + id?: true + userId?: true + marketId?: true + outcome?: true + amountEur?: true + entryPrice?: true + currentPrice?: true + pnl?: true + kellyFraction?: true + status?: true + openedAt?: true + closedAt?: true + _all?: true + } + + export type PositionAggregateArgs = { + /** + * Filter which Position to aggregate. + */ + where?: PositionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Positions to fetch. + */ + orderBy?: PositionOrderByWithRelationInput | PositionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PositionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Positions 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` Positions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Positions + **/ + _count?: true | PositionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PositionAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PositionSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PositionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PositionMaxAggregateInputType + } + + export type GetPositionAggregateType = { + [P in keyof T & keyof AggregatePosition]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PositionGroupByArgs = { + where?: PositionWhereInput + orderBy?: PositionOrderByWithAggregationInput | PositionOrderByWithAggregationInput[] + by: PositionScalarFieldEnum[] | PositionScalarFieldEnum + having?: PositionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PositionCountAggregateInputType | true + _avg?: PositionAvgAggregateInputType + _sum?: PositionSumAggregateInputType + _min?: PositionMinAggregateInputType + _max?: PositionMaxAggregateInputType + } + + export type PositionGroupByOutputType = { + id: number + userId: number + marketId: string + outcome: string + amountEur: number + entryPrice: number + currentPrice: number | null + pnl: number + kellyFraction: number | null + status: string + openedAt: Date + closedAt: Date | null + _count: PositionCountAggregateOutputType | null + _avg: PositionAvgAggregateOutputType | null + _sum: PositionSumAggregateOutputType | null + _min: PositionMinAggregateOutputType | null + _max: PositionMaxAggregateOutputType | null + } + + type GetPositionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PositionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PositionSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + outcome?: boolean + amountEur?: boolean + entryPrice?: boolean + currentPrice?: boolean + pnl?: boolean + kellyFraction?: boolean + status?: boolean + openedAt?: boolean + closedAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["position"]> + + export type PositionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + outcome?: boolean + amountEur?: boolean + entryPrice?: boolean + currentPrice?: boolean + pnl?: boolean + kellyFraction?: boolean + status?: boolean + openedAt?: boolean + closedAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["position"]> + + export type PositionSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + outcome?: boolean + amountEur?: boolean + entryPrice?: boolean + currentPrice?: boolean + pnl?: boolean + kellyFraction?: boolean + status?: boolean + openedAt?: boolean + closedAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["position"]> + + export type PositionSelectScalar = { + id?: boolean + userId?: boolean + marketId?: boolean + outcome?: boolean + amountEur?: boolean + entryPrice?: boolean + currentPrice?: boolean + pnl?: boolean + kellyFraction?: boolean + status?: boolean + openedAt?: boolean + closedAt?: boolean + } + + export type PositionOmit = $Extensions.GetOmit<"id" | "userId" | "marketId" | "outcome" | "amountEur" | "entryPrice" | "currentPrice" | "pnl" | "kellyFraction" | "status" | "openedAt" | "closedAt", ExtArgs["result"]["position"]> + export type PositionInclude = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + export type PositionIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + export type PositionIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + + export type $PositionPayload = { + name: "Position" + objects: { + user: Prisma.$UserPayload + market: Prisma.$MarketPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: number + userId: number + marketId: string + outcome: string + amountEur: number + entryPrice: number + currentPrice: number | null + pnl: number + kellyFraction: number | null + status: string + openedAt: Date + closedAt: Date | null + }, ExtArgs["result"]["position"]> + composites: {} + } + + type PositionGetPayload = $Result.GetResult + + type PositionCountArgs = + Omit & { + select?: PositionCountAggregateInputType | true + } + + export interface PositionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Position'], meta: { name: 'Position' } } + /** + * Find zero or one Position that matches the filter. + * @param {PositionFindUniqueArgs} args - Arguments to find a Position + * @example + * // Get one Position + * const position = await prisma.position.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PositionClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Position that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PositionFindUniqueOrThrowArgs} args - Arguments to find a Position + * @example + * // Get one Position + * const position = await prisma.position.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PositionClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Position 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 {PositionFindFirstArgs} args - Arguments to find a Position + * @example + * // Get one Position + * const position = await prisma.position.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PositionClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Position that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PositionFindFirstOrThrowArgs} args - Arguments to find a Position + * @example + * // Get one Position + * const position = await prisma.position.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PositionClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Positions 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 {PositionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Positions + * const positions = await prisma.position.findMany() + * + * // Get first 10 Positions + * const positions = await prisma.position.findMany({ take: 10 }) + * + * // Only select the `id` + * const positionWithIdOnly = await prisma.position.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Position. + * @param {PositionCreateArgs} args - Arguments to create a Position. + * @example + * // Create one Position + * const Position = await prisma.position.create({ + * data: { + * // ... data to create a Position + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PositionClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Positions. + * @param {PositionCreateManyArgs} args - Arguments to create many Positions. + * @example + * // Create many Positions + * const position = await prisma.position.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Positions and returns the data saved in the database. + * @param {PositionCreateManyAndReturnArgs} args - Arguments to create many Positions. + * @example + * // Create many Positions + * const position = await prisma.position.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Positions and only return the `id` + * const positionWithIdOnly = await prisma.position.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Position. + * @param {PositionDeleteArgs} args - Arguments to delete one Position. + * @example + * // Delete one Position + * const Position = await prisma.position.delete({ + * where: { + * // ... filter to delete one Position + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PositionClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Position. + * @param {PositionUpdateArgs} args - Arguments to update one Position. + * @example + * // Update one Position + * const position = await prisma.position.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PositionClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Positions. + * @param {PositionDeleteManyArgs} args - Arguments to filter Positions to delete. + * @example + * // Delete a few Positions + * const { count } = await prisma.position.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Positions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PositionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Positions + * const position = await prisma.position.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Positions and returns the data updated in the database. + * @param {PositionUpdateManyAndReturnArgs} args - Arguments to update many Positions. + * @example + * // Update many Positions + * const position = await prisma.position.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Positions and only return the `id` + * const positionWithIdOnly = await prisma.position.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Position. + * @param {PositionUpsertArgs} args - Arguments to update or create a Position. + * @example + * // Update or create a Position + * const position = await prisma.position.upsert({ + * create: { + * // ... data to create a Position + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Position we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PositionClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Positions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PositionCountArgs} args - Arguments to filter Positions to count. + * @example + * // Count the number of Positions + * const count = await prisma.position.count({ + * where: { + * // ... the filter for the Positions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Position. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PositionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Position. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PositionGroupByArgs} 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 PositionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PositionGroupByArgs['orderBy'] } + : { orderBy?: PositionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPositionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Position model + */ + readonly fields: PositionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Position. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__PositionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + market = {}>(args?: Subset>): Prisma__MarketClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Position model + */ + interface PositionFieldRefs { + readonly id: FieldRef<"Position", 'Int'> + readonly userId: FieldRef<"Position", 'Int'> + readonly marketId: FieldRef<"Position", 'String'> + readonly outcome: FieldRef<"Position", 'String'> + readonly amountEur: FieldRef<"Position", 'Float'> + readonly entryPrice: FieldRef<"Position", 'Float'> + readonly currentPrice: FieldRef<"Position", 'Float'> + readonly pnl: FieldRef<"Position", 'Float'> + readonly kellyFraction: FieldRef<"Position", 'Float'> + readonly status: FieldRef<"Position", 'String'> + readonly openedAt: FieldRef<"Position", 'DateTime'> + readonly closedAt: FieldRef<"Position", 'DateTime'> + } + + + // Custom InputTypes + /** + * Position findUnique + */ + export type PositionFindUniqueArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * Filter, which Position to fetch. + */ + where: PositionWhereUniqueInput + } + + /** + * Position findUniqueOrThrow + */ + export type PositionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * Filter, which Position to fetch. + */ + where: PositionWhereUniqueInput + } + + /** + * Position findFirst + */ + export type PositionFindFirstArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * Filter, which Position to fetch. + */ + where?: PositionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Positions to fetch. + */ + orderBy?: PositionOrderByWithRelationInput | PositionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Positions. + */ + cursor?: PositionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Positions 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` Positions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Positions. + */ + distinct?: PositionScalarFieldEnum | PositionScalarFieldEnum[] + } + + /** + * Position findFirstOrThrow + */ + export type PositionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * Filter, which Position to fetch. + */ + where?: PositionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Positions to fetch. + */ + orderBy?: PositionOrderByWithRelationInput | PositionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Positions. + */ + cursor?: PositionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Positions 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` Positions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Positions. + */ + distinct?: PositionScalarFieldEnum | PositionScalarFieldEnum[] + } + + /** + * Position findMany + */ + export type PositionFindManyArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * Filter, which Positions to fetch. + */ + where?: PositionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Positions to fetch. + */ + orderBy?: PositionOrderByWithRelationInput | PositionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Positions. + */ + cursor?: PositionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Positions 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` Positions. + */ + skip?: number + distinct?: PositionScalarFieldEnum | PositionScalarFieldEnum[] + } + + /** + * Position create + */ + export type PositionCreateArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * The data needed to create a Position. + */ + data: XOR + } + + /** + * Position createMany + */ + export type PositionCreateManyArgs = { + /** + * The data used to create many Positions. + */ + data: PositionCreateManyInput | PositionCreateManyInput[] + } + + /** + * Position createManyAndReturn + */ + export type PositionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * The data used to create many Positions. + */ + data: PositionCreateManyInput | PositionCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionIncludeCreateManyAndReturn | null + } + + /** + * Position update + */ + export type PositionUpdateArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * The data needed to update a Position. + */ + data: XOR + /** + * Choose, which Position to update. + */ + where: PositionWhereUniqueInput + } + + /** + * Position updateMany + */ + export type PositionUpdateManyArgs = { + /** + * The data used to update Positions. + */ + data: XOR + /** + * Filter which Positions to update + */ + where?: PositionWhereInput + /** + * Limit how many Positions to update. + */ + limit?: number + } + + /** + * Position updateManyAndReturn + */ + export type PositionUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * The data used to update Positions. + */ + data: XOR + /** + * Filter which Positions to update + */ + where?: PositionWhereInput + /** + * Limit how many Positions to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionIncludeUpdateManyAndReturn | null + } + + /** + * Position upsert + */ + export type PositionUpsertArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * The filter to search for the Position to update in case it exists. + */ + where: PositionWhereUniqueInput + /** + * In case the Position found by the `where` argument doesn't exist, create a new Position with this data. + */ + create: XOR + /** + * In case the Position was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Position delete + */ + export type PositionDeleteArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + /** + * Filter which Position to delete. + */ + where: PositionWhereUniqueInput + } + + /** + * Position deleteMany + */ + export type PositionDeleteManyArgs = { + /** + * Filter which Positions to delete + */ + where?: PositionWhereInput + /** + * Limit how many Positions to delete. + */ + limit?: number + } + + /** + * Position without action + */ + export type PositionDefaultArgs = { + /** + * Select specific fields to fetch from the Position + */ + select?: PositionSelect | null + /** + * Omit specific fields from the Position + */ + omit?: PositionOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PositionInclude | null + } + + + /** + * Model Watchlist + */ + + export type AggregateWatchlist = { + _count: WatchlistCountAggregateOutputType | null + _avg: WatchlistAvgAggregateOutputType | null + _sum: WatchlistSumAggregateOutputType | null + _min: WatchlistMinAggregateOutputType | null + _max: WatchlistMaxAggregateOutputType | null + } + + export type WatchlistAvgAggregateOutputType = { + id: number | null + userId: number | null + alertThreshold: number | null + } + + export type WatchlistSumAggregateOutputType = { + id: number | null + userId: number | null + alertThreshold: number | null + } + + export type WatchlistMinAggregateOutputType = { + id: number | null + userId: number | null + marketId: string | null + alertThreshold: number | null + createdAt: Date | null + } + + export type WatchlistMaxAggregateOutputType = { + id: number | null + userId: number | null + marketId: string | null + alertThreshold: number | null + createdAt: Date | null + } + + export type WatchlistCountAggregateOutputType = { + id: number + userId: number + marketId: number + alertThreshold: number + createdAt: number + _all: number + } + + + export type WatchlistAvgAggregateInputType = { + id?: true + userId?: true + alertThreshold?: true + } + + export type WatchlistSumAggregateInputType = { + id?: true + userId?: true + alertThreshold?: true + } + + export type WatchlistMinAggregateInputType = { + id?: true + userId?: true + marketId?: true + alertThreshold?: true + createdAt?: true + } + + export type WatchlistMaxAggregateInputType = { + id?: true + userId?: true + marketId?: true + alertThreshold?: true + createdAt?: true + } + + export type WatchlistCountAggregateInputType = { + id?: true + userId?: true + marketId?: true + alertThreshold?: true + createdAt?: true + _all?: true + } + + export type WatchlistAggregateArgs = { + /** + * Filter which Watchlist to aggregate. + */ + where?: WatchlistWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Watchlists to fetch. + */ + orderBy?: WatchlistOrderByWithRelationInput | WatchlistOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: WatchlistWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Watchlists 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` Watchlists. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Watchlists + **/ + _count?: true | WatchlistCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: WatchlistAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: WatchlistSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: WatchlistMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: WatchlistMaxAggregateInputType + } + + export type GetWatchlistAggregateType = { + [P in keyof T & keyof AggregateWatchlist]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type WatchlistGroupByArgs = { + where?: WatchlistWhereInput + orderBy?: WatchlistOrderByWithAggregationInput | WatchlistOrderByWithAggregationInput[] + by: WatchlistScalarFieldEnum[] | WatchlistScalarFieldEnum + having?: WatchlistScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: WatchlistCountAggregateInputType | true + _avg?: WatchlistAvgAggregateInputType + _sum?: WatchlistSumAggregateInputType + _min?: WatchlistMinAggregateInputType + _max?: WatchlistMaxAggregateInputType + } + + export type WatchlistGroupByOutputType = { + id: number + userId: number + marketId: string + alertThreshold: number | null + createdAt: Date + _count: WatchlistCountAggregateOutputType | null + _avg: WatchlistAvgAggregateOutputType | null + _sum: WatchlistSumAggregateOutputType | null + _min: WatchlistMinAggregateOutputType | null + _max: WatchlistMaxAggregateOutputType | null + } + + type GetWatchlistGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof WatchlistGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type WatchlistSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + alertThreshold?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["watchlist"]> + + export type WatchlistSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + alertThreshold?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["watchlist"]> + + export type WatchlistSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + alertThreshold?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["watchlist"]> + + export type WatchlistSelectScalar = { + id?: boolean + userId?: boolean + marketId?: boolean + alertThreshold?: boolean + createdAt?: boolean + } + + export type WatchlistOmit = $Extensions.GetOmit<"id" | "userId" | "marketId" | "alertThreshold" | "createdAt", ExtArgs["result"]["watchlist"]> + export type WatchlistInclude = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + export type WatchlistIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + export type WatchlistIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + + export type $WatchlistPayload = { + name: "Watchlist" + objects: { + user: Prisma.$UserPayload + market: Prisma.$MarketPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: number + userId: number + marketId: string + alertThreshold: number | null + createdAt: Date + }, ExtArgs["result"]["watchlist"]> + composites: {} + } + + type WatchlistGetPayload = $Result.GetResult + + type WatchlistCountArgs = + Omit & { + select?: WatchlistCountAggregateInputType | true + } + + export interface WatchlistDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Watchlist'], meta: { name: 'Watchlist' } } + /** + * Find zero or one Watchlist that matches the filter. + * @param {WatchlistFindUniqueArgs} args - Arguments to find a Watchlist + * @example + * // Get one Watchlist + * const watchlist = await prisma.watchlist.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__WatchlistClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Watchlist that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {WatchlistFindUniqueOrThrowArgs} args - Arguments to find a Watchlist + * @example + * // Get one Watchlist + * const watchlist = await prisma.watchlist.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__WatchlistClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Watchlist 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 {WatchlistFindFirstArgs} args - Arguments to find a Watchlist + * @example + * // Get one Watchlist + * const watchlist = await prisma.watchlist.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__WatchlistClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Watchlist that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WatchlistFindFirstOrThrowArgs} args - Arguments to find a Watchlist + * @example + * // Get one Watchlist + * const watchlist = await prisma.watchlist.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__WatchlistClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Watchlists 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 {WatchlistFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Watchlists + * const watchlists = await prisma.watchlist.findMany() + * + * // Get first 10 Watchlists + * const watchlists = await prisma.watchlist.findMany({ take: 10 }) + * + * // Only select the `id` + * const watchlistWithIdOnly = await prisma.watchlist.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Watchlist. + * @param {WatchlistCreateArgs} args - Arguments to create a Watchlist. + * @example + * // Create one Watchlist + * const Watchlist = await prisma.watchlist.create({ + * data: { + * // ... data to create a Watchlist + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__WatchlistClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Watchlists. + * @param {WatchlistCreateManyArgs} args - Arguments to create many Watchlists. + * @example + * // Create many Watchlists + * const watchlist = await prisma.watchlist.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Watchlists and returns the data saved in the database. + * @param {WatchlistCreateManyAndReturnArgs} args - Arguments to create many Watchlists. + * @example + * // Create many Watchlists + * const watchlist = await prisma.watchlist.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Watchlists and only return the `id` + * const watchlistWithIdOnly = await prisma.watchlist.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Watchlist. + * @param {WatchlistDeleteArgs} args - Arguments to delete one Watchlist. + * @example + * // Delete one Watchlist + * const Watchlist = await prisma.watchlist.delete({ + * where: { + * // ... filter to delete one Watchlist + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__WatchlistClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Watchlist. + * @param {WatchlistUpdateArgs} args - Arguments to update one Watchlist. + * @example + * // Update one Watchlist + * const watchlist = await prisma.watchlist.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__WatchlistClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Watchlists. + * @param {WatchlistDeleteManyArgs} args - Arguments to filter Watchlists to delete. + * @example + * // Delete a few Watchlists + * const { count } = await prisma.watchlist.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Watchlists. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WatchlistUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Watchlists + * const watchlist = await prisma.watchlist.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Watchlists and returns the data updated in the database. + * @param {WatchlistUpdateManyAndReturnArgs} args - Arguments to update many Watchlists. + * @example + * // Update many Watchlists + * const watchlist = await prisma.watchlist.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Watchlists and only return the `id` + * const watchlistWithIdOnly = await prisma.watchlist.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Watchlist. + * @param {WatchlistUpsertArgs} args - Arguments to update or create a Watchlist. + * @example + * // Update or create a Watchlist + * const watchlist = await prisma.watchlist.upsert({ + * create: { + * // ... data to create a Watchlist + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Watchlist we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__WatchlistClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Watchlists. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WatchlistCountArgs} args - Arguments to filter Watchlists to count. + * @example + * // Count the number of Watchlists + * const count = await prisma.watchlist.count({ + * where: { + * // ... the filter for the Watchlists we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Watchlist. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WatchlistAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Watchlist. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {WatchlistGroupByArgs} 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 WatchlistGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: WatchlistGroupByArgs['orderBy'] } + : { orderBy?: WatchlistGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetWatchlistGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Watchlist model + */ + readonly fields: WatchlistFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Watchlist. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__WatchlistClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + market = {}>(args?: Subset>): Prisma__MarketClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Watchlist model + */ + interface WatchlistFieldRefs { + readonly id: FieldRef<"Watchlist", 'Int'> + readonly userId: FieldRef<"Watchlist", 'Int'> + readonly marketId: FieldRef<"Watchlist", 'String'> + readonly alertThreshold: FieldRef<"Watchlist", 'Float'> + readonly createdAt: FieldRef<"Watchlist", 'DateTime'> + } + + + // Custom InputTypes + /** + * Watchlist findUnique + */ + export type WatchlistFindUniqueArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * Filter, which Watchlist to fetch. + */ + where: WatchlistWhereUniqueInput + } + + /** + * Watchlist findUniqueOrThrow + */ + export type WatchlistFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * Filter, which Watchlist to fetch. + */ + where: WatchlistWhereUniqueInput + } + + /** + * Watchlist findFirst + */ + export type WatchlistFindFirstArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * Filter, which Watchlist to fetch. + */ + where?: WatchlistWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Watchlists to fetch. + */ + orderBy?: WatchlistOrderByWithRelationInput | WatchlistOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Watchlists. + */ + cursor?: WatchlistWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Watchlists 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` Watchlists. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Watchlists. + */ + distinct?: WatchlistScalarFieldEnum | WatchlistScalarFieldEnum[] + } + + /** + * Watchlist findFirstOrThrow + */ + export type WatchlistFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * Filter, which Watchlist to fetch. + */ + where?: WatchlistWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Watchlists to fetch. + */ + orderBy?: WatchlistOrderByWithRelationInput | WatchlistOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Watchlists. + */ + cursor?: WatchlistWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Watchlists 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` Watchlists. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Watchlists. + */ + distinct?: WatchlistScalarFieldEnum | WatchlistScalarFieldEnum[] + } + + /** + * Watchlist findMany + */ + export type WatchlistFindManyArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * Filter, which Watchlists to fetch. + */ + where?: WatchlistWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Watchlists to fetch. + */ + orderBy?: WatchlistOrderByWithRelationInput | WatchlistOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Watchlists. + */ + cursor?: WatchlistWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Watchlists 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` Watchlists. + */ + skip?: number + distinct?: WatchlistScalarFieldEnum | WatchlistScalarFieldEnum[] + } + + /** + * Watchlist create + */ + export type WatchlistCreateArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * The data needed to create a Watchlist. + */ + data: XOR + } + + /** + * Watchlist createMany + */ + export type WatchlistCreateManyArgs = { + /** + * The data used to create many Watchlists. + */ + data: WatchlistCreateManyInput | WatchlistCreateManyInput[] + } + + /** + * Watchlist createManyAndReturn + */ + export type WatchlistCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * The data used to create many Watchlists. + */ + data: WatchlistCreateManyInput | WatchlistCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistIncludeCreateManyAndReturn | null + } + + /** + * Watchlist update + */ + export type WatchlistUpdateArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * The data needed to update a Watchlist. + */ + data: XOR + /** + * Choose, which Watchlist to update. + */ + where: WatchlistWhereUniqueInput + } + + /** + * Watchlist updateMany + */ + export type WatchlistUpdateManyArgs = { + /** + * The data used to update Watchlists. + */ + data: XOR + /** + * Filter which Watchlists to update + */ + where?: WatchlistWhereInput + /** + * Limit how many Watchlists to update. + */ + limit?: number + } + + /** + * Watchlist updateManyAndReturn + */ + export type WatchlistUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * The data used to update Watchlists. + */ + data: XOR + /** + * Filter which Watchlists to update + */ + where?: WatchlistWhereInput + /** + * Limit how many Watchlists to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistIncludeUpdateManyAndReturn | null + } + + /** + * Watchlist upsert + */ + export type WatchlistUpsertArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * The filter to search for the Watchlist to update in case it exists. + */ + where: WatchlistWhereUniqueInput + /** + * In case the Watchlist found by the `where` argument doesn't exist, create a new Watchlist with this data. + */ + create: XOR + /** + * In case the Watchlist was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Watchlist delete + */ + export type WatchlistDeleteArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + /** + * Filter which Watchlist to delete. + */ + where: WatchlistWhereUniqueInput + } + + /** + * Watchlist deleteMany + */ + export type WatchlistDeleteManyArgs = { + /** + * Filter which Watchlists to delete + */ + where?: WatchlistWhereInput + /** + * Limit how many Watchlists to delete. + */ + limit?: number + } + + /** + * Watchlist without action + */ + export type WatchlistDefaultArgs = { + /** + * Select specific fields to fetch from the Watchlist + */ + select?: WatchlistSelect | null + /** + * Omit specific fields from the Watchlist + */ + omit?: WatchlistOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: WatchlistInclude | null + } + + + /** + * Model Alert + */ + + export type AggregateAlert = { + _count: AlertCountAggregateOutputType | null + _avg: AlertAvgAggregateOutputType | null + _sum: AlertSumAggregateOutputType | null + _min: AlertMinAggregateOutputType | null + _max: AlertMaxAggregateOutputType | null + } + + export type AlertAvgAggregateOutputType = { + id: number | null + userId: number | null + } + + export type AlertSumAggregateOutputType = { + id: number | null + userId: number | null + } + + export type AlertMinAggregateOutputType = { + id: number | null + userId: number | null + marketId: string | null + type: string | null + message: string | null + sentAt: Date | null + } + + export type AlertMaxAggregateOutputType = { + id: number | null + userId: number | null + marketId: string | null + type: string | null + message: string | null + sentAt: Date | null + } + + export type AlertCountAggregateOutputType = { + id: number + userId: number + marketId: number + type: number + message: number + sentAt: number + _all: number + } + + + export type AlertAvgAggregateInputType = { + id?: true + userId?: true + } + + export type AlertSumAggregateInputType = { + id?: true + userId?: true + } + + export type AlertMinAggregateInputType = { + id?: true + userId?: true + marketId?: true + type?: true + message?: true + sentAt?: true + } + + export type AlertMaxAggregateInputType = { + id?: true + userId?: true + marketId?: true + type?: true + message?: true + sentAt?: true + } + + export type AlertCountAggregateInputType = { + id?: true + userId?: true + marketId?: true + type?: true + message?: true + sentAt?: true + _all?: true + } + + export type AlertAggregateArgs = { + /** + * Filter which Alert to aggregate. + */ + where?: AlertWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Alerts to fetch. + */ + orderBy?: AlertOrderByWithRelationInput | AlertOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AlertWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Alerts 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` Alerts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Alerts + **/ + _count?: true | AlertCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: AlertAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: AlertSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AlertMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AlertMaxAggregateInputType + } + + export type GetAlertAggregateType = { + [P in keyof T & keyof AggregateAlert]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AlertGroupByArgs = { + where?: AlertWhereInput + orderBy?: AlertOrderByWithAggregationInput | AlertOrderByWithAggregationInput[] + by: AlertScalarFieldEnum[] | AlertScalarFieldEnum + having?: AlertScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AlertCountAggregateInputType | true + _avg?: AlertAvgAggregateInputType + _sum?: AlertSumAggregateInputType + _min?: AlertMinAggregateInputType + _max?: AlertMaxAggregateInputType + } + + export type AlertGroupByOutputType = { + id: number + userId: number + marketId: string + type: string + message: string + sentAt: Date + _count: AlertCountAggregateOutputType | null + _avg: AlertAvgAggregateOutputType | null + _sum: AlertSumAggregateOutputType | null + _min: AlertMinAggregateOutputType | null + _max: AlertMaxAggregateOutputType | null + } + + type GetAlertGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AlertGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AlertSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + type?: boolean + message?: boolean + sentAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["alert"]> + + export type AlertSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + type?: boolean + message?: boolean + sentAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["alert"]> + + export type AlertSelectUpdateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + marketId?: boolean + type?: boolean + message?: boolean + sentAt?: boolean + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + }, ExtArgs["result"]["alert"]> + + export type AlertSelectScalar = { + id?: boolean + userId?: boolean + marketId?: boolean + type?: boolean + message?: boolean + sentAt?: boolean + } + + export type AlertOmit = $Extensions.GetOmit<"id" | "userId" | "marketId" | "type" | "message" | "sentAt", ExtArgs["result"]["alert"]> + export type AlertInclude = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + export type AlertIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + export type AlertIncludeUpdateManyAndReturn = { + user?: boolean | UserDefaultArgs + market?: boolean | MarketDefaultArgs + } + + export type $AlertPayload = { + name: "Alert" + objects: { + user: Prisma.$UserPayload + market: Prisma.$MarketPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: number + userId: number + marketId: string + type: string + message: string + sentAt: Date + }, ExtArgs["result"]["alert"]> + composites: {} + } + + type AlertGetPayload = $Result.GetResult + + type AlertCountArgs = + Omit & { + select?: AlertCountAggregateInputType | true + } + + export interface AlertDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Alert'], meta: { name: 'Alert' } } + /** + * Find zero or one Alert that matches the filter. + * @param {AlertFindUniqueArgs} args - Arguments to find a Alert + * @example + * // Get one Alert + * const alert = await prisma.alert.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AlertClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Alert that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AlertFindUniqueOrThrowArgs} args - Arguments to find a Alert + * @example + * // Get one Alert + * const alert = await prisma.alert.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AlertClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Alert 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 {AlertFindFirstArgs} args - Arguments to find a Alert + * @example + * // Get one Alert + * const alert = await prisma.alert.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AlertClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Alert that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AlertFindFirstOrThrowArgs} args - Arguments to find a Alert + * @example + * // Get one Alert + * const alert = await prisma.alert.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AlertClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Alerts 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 {AlertFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Alerts + * const alerts = await prisma.alert.findMany() + * + * // Get first 10 Alerts + * const alerts = await prisma.alert.findMany({ take: 10 }) + * + * // Only select the `id` + * const alertWithIdOnly = await prisma.alert.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Alert. + * @param {AlertCreateArgs} args - Arguments to create a Alert. + * @example + * // Create one Alert + * const Alert = await prisma.alert.create({ + * data: { + * // ... data to create a Alert + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AlertClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Alerts. + * @param {AlertCreateManyArgs} args - Arguments to create many Alerts. + * @example + * // Create many Alerts + * const alert = await prisma.alert.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Alerts and returns the data saved in the database. + * @param {AlertCreateManyAndReturnArgs} args - Arguments to create many Alerts. + * @example + * // Create many Alerts + * const alert = await prisma.alert.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Alerts and only return the `id` + * const alertWithIdOnly = await prisma.alert.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Alert. + * @param {AlertDeleteArgs} args - Arguments to delete one Alert. + * @example + * // Delete one Alert + * const Alert = await prisma.alert.delete({ + * where: { + * // ... filter to delete one Alert + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AlertClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Alert. + * @param {AlertUpdateArgs} args - Arguments to update one Alert. + * @example + * // Update one Alert + * const alert = await prisma.alert.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AlertClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Alerts. + * @param {AlertDeleteManyArgs} args - Arguments to filter Alerts to delete. + * @example + * // Delete a few Alerts + * const { count } = await prisma.alert.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Alerts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AlertUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Alerts + * const alert = await prisma.alert.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Alerts and returns the data updated in the database. + * @param {AlertUpdateManyAndReturnArgs} args - Arguments to update many Alerts. + * @example + * // Update many Alerts + * const alert = await prisma.alert.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Alerts and only return the `id` + * const alertWithIdOnly = await prisma.alert.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Alert. + * @param {AlertUpsertArgs} args - Arguments to update or create a Alert. + * @example + * // Update or create a Alert + * const alert = await prisma.alert.upsert({ + * create: { + * // ... data to create a Alert + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Alert we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AlertClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Alerts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AlertCountArgs} args - Arguments to filter Alerts to count. + * @example + * // Count the number of Alerts + * const count = await prisma.alert.count({ + * where: { + * // ... the filter for the Alerts we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Alert. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AlertAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Alert. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AlertGroupByArgs} 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 AlertGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AlertGroupByArgs['orderBy'] } + : { orderBy?: AlertGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAlertGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Alert model + */ + readonly fields: AlertFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Alert. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AlertClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + market = {}>(args?: Subset>): Prisma__MarketClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Alert model + */ + interface AlertFieldRefs { + readonly id: FieldRef<"Alert", 'Int'> + readonly userId: FieldRef<"Alert", 'Int'> + readonly marketId: FieldRef<"Alert", 'String'> + readonly type: FieldRef<"Alert", 'String'> + readonly message: FieldRef<"Alert", 'String'> + readonly sentAt: FieldRef<"Alert", 'DateTime'> + } + + + // Custom InputTypes + /** + * Alert findUnique + */ + export type AlertFindUniqueArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * Filter, which Alert to fetch. + */ + where: AlertWhereUniqueInput + } + + /** + * Alert findUniqueOrThrow + */ + export type AlertFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * Filter, which Alert to fetch. + */ + where: AlertWhereUniqueInput + } + + /** + * Alert findFirst + */ + export type AlertFindFirstArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * Filter, which Alert to fetch. + */ + where?: AlertWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Alerts to fetch. + */ + orderBy?: AlertOrderByWithRelationInput | AlertOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Alerts. + */ + cursor?: AlertWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Alerts 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` Alerts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Alerts. + */ + distinct?: AlertScalarFieldEnum | AlertScalarFieldEnum[] + } + + /** + * Alert findFirstOrThrow + */ + export type AlertFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * Filter, which Alert to fetch. + */ + where?: AlertWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Alerts to fetch. + */ + orderBy?: AlertOrderByWithRelationInput | AlertOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Alerts. + */ + cursor?: AlertWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Alerts 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` Alerts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Alerts. + */ + distinct?: AlertScalarFieldEnum | AlertScalarFieldEnum[] + } + + /** + * Alert findMany + */ + export type AlertFindManyArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * Filter, which Alerts to fetch. + */ + where?: AlertWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Alerts to fetch. + */ + orderBy?: AlertOrderByWithRelationInput | AlertOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Alerts. + */ + cursor?: AlertWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Alerts 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` Alerts. + */ + skip?: number + distinct?: AlertScalarFieldEnum | AlertScalarFieldEnum[] + } + + /** + * Alert create + */ + export type AlertCreateArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * The data needed to create a Alert. + */ + data: XOR + } + + /** + * Alert createMany + */ + export type AlertCreateManyArgs = { + /** + * The data used to create many Alerts. + */ + data: AlertCreateManyInput | AlertCreateManyInput[] + } + + /** + * Alert createManyAndReturn + */ + export type AlertCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * The data used to create many Alerts. + */ + data: AlertCreateManyInput | AlertCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertIncludeCreateManyAndReturn | null + } + + /** + * Alert update + */ + export type AlertUpdateArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * The data needed to update a Alert. + */ + data: XOR + /** + * Choose, which Alert to update. + */ + where: AlertWhereUniqueInput + } + + /** + * Alert updateMany + */ + export type AlertUpdateManyArgs = { + /** + * The data used to update Alerts. + */ + data: XOR + /** + * Filter which Alerts to update + */ + where?: AlertWhereInput + /** + * Limit how many Alerts to update. + */ + limit?: number + } + + /** + * Alert updateManyAndReturn + */ + export type AlertUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * The data used to update Alerts. + */ + data: XOR + /** + * Filter which Alerts to update + */ + where?: AlertWhereInput + /** + * Limit how many Alerts to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertIncludeUpdateManyAndReturn | null + } + + /** + * Alert upsert + */ + export type AlertUpsertArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * The filter to search for the Alert to update in case it exists. + */ + where: AlertWhereUniqueInput + /** + * In case the Alert found by the `where` argument doesn't exist, create a new Alert with this data. + */ + create: XOR + /** + * In case the Alert was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Alert delete + */ + export type AlertDeleteArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + /** + * Filter which Alert to delete. + */ + where: AlertWhereUniqueInput + } + + /** + * Alert deleteMany + */ + export type AlertDeleteManyArgs = { + /** + * Filter which Alerts to delete + */ + where?: AlertWhereInput + /** + * Limit how many Alerts to delete. + */ + limit?: number + } + + /** + * Alert without action + */ + export type AlertDefaultArgs = { + /** + * Select specific fields to fetch from the Alert + */ + select?: AlertSelect | null + /** + * Omit specific fields from the Alert + */ + omit?: AlertOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AlertInclude | null + } + + + /** + * Enums + */ + + export const TransactionIsolationLevel: { + Serializable: 'Serializable' + }; + + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + + export const UserScalarFieldEnum: { + id: 'id', + email: 'email', + passwordHash: 'passwordHash', + isActive: 'isActive', + telegramChatId: 'telegramChatId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + + + export const MarketScalarFieldEnum: { + id: 'id', + question: 'question', + category: 'category', + countryCode: 'countryCode', + yesPrice: 'yesPrice', + noPrice: 'noPrice', + volumeEur: 'volumeEur', + liquidityEur: 'liquidityEur', + spread: 'spread', + bestBid: 'bestBid', + bestAsk: 'bestAsk', + clobTokenId: 'clobTokenId', + analyzable: 'analyzable', + status: 'status', + closesAt: 'closesAt', + lastSynced: 'lastSynced' + }; + + export type MarketScalarFieldEnum = (typeof MarketScalarFieldEnum)[keyof typeof MarketScalarFieldEnum] + + + export const AISignalScalarFieldEnum: { + id: 'id', + marketId: 'marketId', + signal: 'signal', + confidence: 'confidence', + summary: 'summary', + keyRisk: 'keyRisk', + newsCount: 'newsCount', + modelVersion: 'modelVersion', + impliedProb: 'impliedProb', + fairProb: 'fairProb', + edgePoints: 'edgePoints', + generatedAt: 'generatedAt' + }; + + export type AISignalScalarFieldEnum = (typeof AISignalScalarFieldEnum)[keyof typeof AISignalScalarFieldEnum] + + + export const PositionScalarFieldEnum: { + id: 'id', + userId: 'userId', + marketId: 'marketId', + outcome: 'outcome', + amountEur: 'amountEur', + entryPrice: 'entryPrice', + currentPrice: 'currentPrice', + pnl: 'pnl', + kellyFraction: 'kellyFraction', + status: 'status', + openedAt: 'openedAt', + closedAt: 'closedAt' + }; + + export type PositionScalarFieldEnum = (typeof PositionScalarFieldEnum)[keyof typeof PositionScalarFieldEnum] + + + export const WatchlistScalarFieldEnum: { + id: 'id', + userId: 'userId', + marketId: 'marketId', + alertThreshold: 'alertThreshold', + createdAt: 'createdAt' + }; + + export type WatchlistScalarFieldEnum = (typeof WatchlistScalarFieldEnum)[keyof typeof WatchlistScalarFieldEnum] + + + export const AlertScalarFieldEnum: { + id: 'id', + userId: 'userId', + marketId: 'marketId', + type: 'type', + message: 'message', + sentAt: 'sentAt' + }; + + export type AlertScalarFieldEnum = (typeof AlertScalarFieldEnum)[keyof typeof AlertScalarFieldEnum] + + + export const SortOrder: { + asc: 'asc', + desc: 'desc' + }; + + export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + + export const NullsOrder: { + first: 'first', + last: 'last' + }; + + export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + /** + * Field references + */ + + + /** + * Reference to a field of type 'Int' + */ + export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + + /** + * Reference to a field of type 'String' + */ + export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + + /** + * Reference to a field of type 'Boolean' + */ + export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + + /** + * Reference to a field of type 'DateTime' + */ + export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + + /** + * Reference to a field of type 'Float' + */ + export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + /** + * Deep Input Types + */ + + + export type UserWhereInput = { + AND?: UserWhereInput | UserWhereInput[] + OR?: UserWhereInput[] + NOT?: UserWhereInput | UserWhereInput[] + id?: IntFilter<"User"> | number + email?: StringFilter<"User"> | string + passwordHash?: StringFilter<"User"> | string + isActive?: BoolFilter<"User"> | boolean + telegramChatId?: StringNullableFilter<"User"> | string | null + createdAt?: DateTimeFilter<"User"> | Date | string + updatedAt?: DateTimeFilter<"User"> | Date | string + positions?: PositionListRelationFilter + watchlist?: WatchlistListRelationFilter + alerts?: AlertListRelationFilter + } + + export type UserOrderByWithRelationInput = { + id?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + isActive?: SortOrder + telegramChatId?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + positions?: PositionOrderByRelationAggregateInput + watchlist?: WatchlistOrderByRelationAggregateInput + alerts?: AlertOrderByRelationAggregateInput + } + + export type UserWhereUniqueInput = Prisma.AtLeast<{ + id?: number + email?: string + AND?: UserWhereInput | UserWhereInput[] + OR?: UserWhereInput[] + NOT?: UserWhereInput | UserWhereInput[] + passwordHash?: StringFilter<"User"> | string + isActive?: BoolFilter<"User"> | boolean + telegramChatId?: StringNullableFilter<"User"> | string | null + createdAt?: DateTimeFilter<"User"> | Date | string + updatedAt?: DateTimeFilter<"User"> | Date | string + positions?: PositionListRelationFilter + watchlist?: WatchlistListRelationFilter + alerts?: AlertListRelationFilter + }, "id" | "email"> + + export type UserOrderByWithAggregationInput = { + id?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + isActive?: SortOrder + telegramChatId?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: UserCountOrderByAggregateInput + _avg?: UserAvgOrderByAggregateInput + _max?: UserMaxOrderByAggregateInput + _min?: UserMinOrderByAggregateInput + _sum?: UserSumOrderByAggregateInput + } + + export type UserScalarWhereWithAggregatesInput = { + AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] + OR?: UserScalarWhereWithAggregatesInput[] + NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] + id?: IntWithAggregatesFilter<"User"> | number + email?: StringWithAggregatesFilter<"User"> | string + passwordHash?: StringWithAggregatesFilter<"User"> | string + isActive?: BoolWithAggregatesFilter<"User"> | boolean + telegramChatId?: StringNullableWithAggregatesFilter<"User"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string + } + + export type MarketWhereInput = { + AND?: MarketWhereInput | MarketWhereInput[] + OR?: MarketWhereInput[] + NOT?: MarketWhereInput | MarketWhereInput[] + id?: StringFilter<"Market"> | string + question?: StringFilter<"Market"> | string + category?: StringNullableFilter<"Market"> | string | null + countryCode?: StringNullableFilter<"Market"> | string | null + yesPrice?: FloatNullableFilter<"Market"> | number | null + noPrice?: FloatNullableFilter<"Market"> | number | null + volumeEur?: FloatNullableFilter<"Market"> | number | null + liquidityEur?: FloatNullableFilter<"Market"> | number | null + spread?: FloatNullableFilter<"Market"> | number | null + bestBid?: FloatNullableFilter<"Market"> | number | null + bestAsk?: FloatNullableFilter<"Market"> | number | null + clobTokenId?: StringNullableFilter<"Market"> | string | null + analyzable?: BoolFilter<"Market"> | boolean + status?: StringFilter<"Market"> | string + closesAt?: DateTimeNullableFilter<"Market"> | Date | string | null + lastSynced?: DateTimeFilter<"Market"> | Date | string + signals?: AISignalListRelationFilter + positions?: PositionListRelationFilter + watchlist?: WatchlistListRelationFilter + alerts?: AlertListRelationFilter + } + + export type MarketOrderByWithRelationInput = { + id?: SortOrder + question?: SortOrder + category?: SortOrderInput | SortOrder + countryCode?: SortOrderInput | SortOrder + yesPrice?: SortOrderInput | SortOrder + noPrice?: SortOrderInput | SortOrder + volumeEur?: SortOrderInput | SortOrder + liquidityEur?: SortOrderInput | SortOrder + spread?: SortOrderInput | SortOrder + bestBid?: SortOrderInput | SortOrder + bestAsk?: SortOrderInput | SortOrder + clobTokenId?: SortOrderInput | SortOrder + analyzable?: SortOrder + status?: SortOrder + closesAt?: SortOrderInput | SortOrder + lastSynced?: SortOrder + signals?: AISignalOrderByRelationAggregateInput + positions?: PositionOrderByRelationAggregateInput + watchlist?: WatchlistOrderByRelationAggregateInput + alerts?: AlertOrderByRelationAggregateInput + } + + export type MarketWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: MarketWhereInput | MarketWhereInput[] + OR?: MarketWhereInput[] + NOT?: MarketWhereInput | MarketWhereInput[] + question?: StringFilter<"Market"> | string + category?: StringNullableFilter<"Market"> | string | null + countryCode?: StringNullableFilter<"Market"> | string | null + yesPrice?: FloatNullableFilter<"Market"> | number | null + noPrice?: FloatNullableFilter<"Market"> | number | null + volumeEur?: FloatNullableFilter<"Market"> | number | null + liquidityEur?: FloatNullableFilter<"Market"> | number | null + spread?: FloatNullableFilter<"Market"> | number | null + bestBid?: FloatNullableFilter<"Market"> | number | null + bestAsk?: FloatNullableFilter<"Market"> | number | null + clobTokenId?: StringNullableFilter<"Market"> | string | null + analyzable?: BoolFilter<"Market"> | boolean + status?: StringFilter<"Market"> | string + closesAt?: DateTimeNullableFilter<"Market"> | Date | string | null + lastSynced?: DateTimeFilter<"Market"> | Date | string + signals?: AISignalListRelationFilter + positions?: PositionListRelationFilter + watchlist?: WatchlistListRelationFilter + alerts?: AlertListRelationFilter + }, "id"> + + export type MarketOrderByWithAggregationInput = { + id?: SortOrder + question?: SortOrder + category?: SortOrderInput | SortOrder + countryCode?: SortOrderInput | SortOrder + yesPrice?: SortOrderInput | SortOrder + noPrice?: SortOrderInput | SortOrder + volumeEur?: SortOrderInput | SortOrder + liquidityEur?: SortOrderInput | SortOrder + spread?: SortOrderInput | SortOrder + bestBid?: SortOrderInput | SortOrder + bestAsk?: SortOrderInput | SortOrder + clobTokenId?: SortOrderInput | SortOrder + analyzable?: SortOrder + status?: SortOrder + closesAt?: SortOrderInput | SortOrder + lastSynced?: SortOrder + _count?: MarketCountOrderByAggregateInput + _avg?: MarketAvgOrderByAggregateInput + _max?: MarketMaxOrderByAggregateInput + _min?: MarketMinOrderByAggregateInput + _sum?: MarketSumOrderByAggregateInput + } + + export type MarketScalarWhereWithAggregatesInput = { + AND?: MarketScalarWhereWithAggregatesInput | MarketScalarWhereWithAggregatesInput[] + OR?: MarketScalarWhereWithAggregatesInput[] + NOT?: MarketScalarWhereWithAggregatesInput | MarketScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Market"> | string + question?: StringWithAggregatesFilter<"Market"> | string + category?: StringNullableWithAggregatesFilter<"Market"> | string | null + countryCode?: StringNullableWithAggregatesFilter<"Market"> | string | null + yesPrice?: FloatNullableWithAggregatesFilter<"Market"> | number | null + noPrice?: FloatNullableWithAggregatesFilter<"Market"> | number | null + volumeEur?: FloatNullableWithAggregatesFilter<"Market"> | number | null + liquidityEur?: FloatNullableWithAggregatesFilter<"Market"> | number | null + spread?: FloatNullableWithAggregatesFilter<"Market"> | number | null + bestBid?: FloatNullableWithAggregatesFilter<"Market"> | number | null + bestAsk?: FloatNullableWithAggregatesFilter<"Market"> | number | null + clobTokenId?: StringNullableWithAggregatesFilter<"Market"> | string | null + analyzable?: BoolWithAggregatesFilter<"Market"> | boolean + status?: StringWithAggregatesFilter<"Market"> | string + closesAt?: DateTimeNullableWithAggregatesFilter<"Market"> | Date | string | null + lastSynced?: DateTimeWithAggregatesFilter<"Market"> | Date | string + } + + export type AISignalWhereInput = { + AND?: AISignalWhereInput | AISignalWhereInput[] + OR?: AISignalWhereInput[] + NOT?: AISignalWhereInput | AISignalWhereInput[] + id?: IntFilter<"AISignal"> | number + marketId?: StringFilter<"AISignal"> | string + signal?: StringFilter<"AISignal"> | string + confidence?: FloatFilter<"AISignal"> | number + summary?: StringNullableFilter<"AISignal"> | string | null + keyRisk?: StringNullableFilter<"AISignal"> | string | null + newsCount?: IntFilter<"AISignal"> | number + modelVersion?: StringFilter<"AISignal"> | string + impliedProb?: FloatNullableFilter<"AISignal"> | number | null + fairProb?: FloatNullableFilter<"AISignal"> | number | null + edgePoints?: FloatNullableFilter<"AISignal"> | number | null + generatedAt?: DateTimeFilter<"AISignal"> | Date | string + market?: XOR + } + + export type AISignalOrderByWithRelationInput = { + id?: SortOrder + marketId?: SortOrder + signal?: SortOrder + confidence?: SortOrder + summary?: SortOrderInput | SortOrder + keyRisk?: SortOrderInput | SortOrder + newsCount?: SortOrder + modelVersion?: SortOrder + impliedProb?: SortOrderInput | SortOrder + fairProb?: SortOrderInput | SortOrder + edgePoints?: SortOrderInput | SortOrder + generatedAt?: SortOrder + market?: MarketOrderByWithRelationInput + } + + export type AISignalWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: AISignalWhereInput | AISignalWhereInput[] + OR?: AISignalWhereInput[] + NOT?: AISignalWhereInput | AISignalWhereInput[] + marketId?: StringFilter<"AISignal"> | string + signal?: StringFilter<"AISignal"> | string + confidence?: FloatFilter<"AISignal"> | number + summary?: StringNullableFilter<"AISignal"> | string | null + keyRisk?: StringNullableFilter<"AISignal"> | string | null + newsCount?: IntFilter<"AISignal"> | number + modelVersion?: StringFilter<"AISignal"> | string + impliedProb?: FloatNullableFilter<"AISignal"> | number | null + fairProb?: FloatNullableFilter<"AISignal"> | number | null + edgePoints?: FloatNullableFilter<"AISignal"> | number | null + generatedAt?: DateTimeFilter<"AISignal"> | Date | string + market?: XOR + }, "id"> + + export type AISignalOrderByWithAggregationInput = { + id?: SortOrder + marketId?: SortOrder + signal?: SortOrder + confidence?: SortOrder + summary?: SortOrderInput | SortOrder + keyRisk?: SortOrderInput | SortOrder + newsCount?: SortOrder + modelVersion?: SortOrder + impliedProb?: SortOrderInput | SortOrder + fairProb?: SortOrderInput | SortOrder + edgePoints?: SortOrderInput | SortOrder + generatedAt?: SortOrder + _count?: AISignalCountOrderByAggregateInput + _avg?: AISignalAvgOrderByAggregateInput + _max?: AISignalMaxOrderByAggregateInput + _min?: AISignalMinOrderByAggregateInput + _sum?: AISignalSumOrderByAggregateInput + } + + export type AISignalScalarWhereWithAggregatesInput = { + AND?: AISignalScalarWhereWithAggregatesInput | AISignalScalarWhereWithAggregatesInput[] + OR?: AISignalScalarWhereWithAggregatesInput[] + NOT?: AISignalScalarWhereWithAggregatesInput | AISignalScalarWhereWithAggregatesInput[] + id?: IntWithAggregatesFilter<"AISignal"> | number + marketId?: StringWithAggregatesFilter<"AISignal"> | string + signal?: StringWithAggregatesFilter<"AISignal"> | string + confidence?: FloatWithAggregatesFilter<"AISignal"> | number + summary?: StringNullableWithAggregatesFilter<"AISignal"> | string | null + keyRisk?: StringNullableWithAggregatesFilter<"AISignal"> | string | null + newsCount?: IntWithAggregatesFilter<"AISignal"> | number + modelVersion?: StringWithAggregatesFilter<"AISignal"> | string + impliedProb?: FloatNullableWithAggregatesFilter<"AISignal"> | number | null + fairProb?: FloatNullableWithAggregatesFilter<"AISignal"> | number | null + edgePoints?: FloatNullableWithAggregatesFilter<"AISignal"> | number | null + generatedAt?: DateTimeWithAggregatesFilter<"AISignal"> | Date | string + } + + export type PositionWhereInput = { + AND?: PositionWhereInput | PositionWhereInput[] + OR?: PositionWhereInput[] + NOT?: PositionWhereInput | PositionWhereInput[] + id?: IntFilter<"Position"> | number + userId?: IntFilter<"Position"> | number + marketId?: StringFilter<"Position"> | string + outcome?: StringFilter<"Position"> | string + amountEur?: FloatFilter<"Position"> | number + entryPrice?: FloatFilter<"Position"> | number + currentPrice?: FloatNullableFilter<"Position"> | number | null + pnl?: FloatFilter<"Position"> | number + kellyFraction?: FloatNullableFilter<"Position"> | number | null + status?: StringFilter<"Position"> | string + openedAt?: DateTimeFilter<"Position"> | Date | string + closedAt?: DateTimeNullableFilter<"Position"> | Date | string | null + user?: XOR + market?: XOR + } + + export type PositionOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + outcome?: SortOrder + amountEur?: SortOrder + entryPrice?: SortOrder + currentPrice?: SortOrderInput | SortOrder + pnl?: SortOrder + kellyFraction?: SortOrderInput | SortOrder + status?: SortOrder + openedAt?: SortOrder + closedAt?: SortOrderInput | SortOrder + user?: UserOrderByWithRelationInput + market?: MarketOrderByWithRelationInput + } + + export type PositionWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: PositionWhereInput | PositionWhereInput[] + OR?: PositionWhereInput[] + NOT?: PositionWhereInput | PositionWhereInput[] + userId?: IntFilter<"Position"> | number + marketId?: StringFilter<"Position"> | string + outcome?: StringFilter<"Position"> | string + amountEur?: FloatFilter<"Position"> | number + entryPrice?: FloatFilter<"Position"> | number + currentPrice?: FloatNullableFilter<"Position"> | number | null + pnl?: FloatFilter<"Position"> | number + kellyFraction?: FloatNullableFilter<"Position"> | number | null + status?: StringFilter<"Position"> | string + openedAt?: DateTimeFilter<"Position"> | Date | string + closedAt?: DateTimeNullableFilter<"Position"> | Date | string | null + user?: XOR + market?: XOR + }, "id"> + + export type PositionOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + outcome?: SortOrder + amountEur?: SortOrder + entryPrice?: SortOrder + currentPrice?: SortOrderInput | SortOrder + pnl?: SortOrder + kellyFraction?: SortOrderInput | SortOrder + status?: SortOrder + openedAt?: SortOrder + closedAt?: SortOrderInput | SortOrder + _count?: PositionCountOrderByAggregateInput + _avg?: PositionAvgOrderByAggregateInput + _max?: PositionMaxOrderByAggregateInput + _min?: PositionMinOrderByAggregateInput + _sum?: PositionSumOrderByAggregateInput + } + + export type PositionScalarWhereWithAggregatesInput = { + AND?: PositionScalarWhereWithAggregatesInput | PositionScalarWhereWithAggregatesInput[] + OR?: PositionScalarWhereWithAggregatesInput[] + NOT?: PositionScalarWhereWithAggregatesInput | PositionScalarWhereWithAggregatesInput[] + id?: IntWithAggregatesFilter<"Position"> | number + userId?: IntWithAggregatesFilter<"Position"> | number + marketId?: StringWithAggregatesFilter<"Position"> | string + outcome?: StringWithAggregatesFilter<"Position"> | string + amountEur?: FloatWithAggregatesFilter<"Position"> | number + entryPrice?: FloatWithAggregatesFilter<"Position"> | number + currentPrice?: FloatNullableWithAggregatesFilter<"Position"> | number | null + pnl?: FloatWithAggregatesFilter<"Position"> | number + kellyFraction?: FloatNullableWithAggregatesFilter<"Position"> | number | null + status?: StringWithAggregatesFilter<"Position"> | string + openedAt?: DateTimeWithAggregatesFilter<"Position"> | Date | string + closedAt?: DateTimeNullableWithAggregatesFilter<"Position"> | Date | string | null + } + + export type WatchlistWhereInput = { + AND?: WatchlistWhereInput | WatchlistWhereInput[] + OR?: WatchlistWhereInput[] + NOT?: WatchlistWhereInput | WatchlistWhereInput[] + id?: IntFilter<"Watchlist"> | number + userId?: IntFilter<"Watchlist"> | number + marketId?: StringFilter<"Watchlist"> | string + alertThreshold?: FloatNullableFilter<"Watchlist"> | number | null + createdAt?: DateTimeFilter<"Watchlist"> | Date | string + user?: XOR + market?: XOR + } + + export type WatchlistOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + alertThreshold?: SortOrderInput | SortOrder + createdAt?: SortOrder + user?: UserOrderByWithRelationInput + market?: MarketOrderByWithRelationInput + } + + export type WatchlistWhereUniqueInput = Prisma.AtLeast<{ + id?: number + userId_marketId?: WatchlistUserIdMarketIdCompoundUniqueInput + AND?: WatchlistWhereInput | WatchlistWhereInput[] + OR?: WatchlistWhereInput[] + NOT?: WatchlistWhereInput | WatchlistWhereInput[] + userId?: IntFilter<"Watchlist"> | number + marketId?: StringFilter<"Watchlist"> | string + alertThreshold?: FloatNullableFilter<"Watchlist"> | number | null + createdAt?: DateTimeFilter<"Watchlist"> | Date | string + user?: XOR + market?: XOR + }, "id" | "userId_marketId"> + + export type WatchlistOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + alertThreshold?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: WatchlistCountOrderByAggregateInput + _avg?: WatchlistAvgOrderByAggregateInput + _max?: WatchlistMaxOrderByAggregateInput + _min?: WatchlistMinOrderByAggregateInput + _sum?: WatchlistSumOrderByAggregateInput + } + + export type WatchlistScalarWhereWithAggregatesInput = { + AND?: WatchlistScalarWhereWithAggregatesInput | WatchlistScalarWhereWithAggregatesInput[] + OR?: WatchlistScalarWhereWithAggregatesInput[] + NOT?: WatchlistScalarWhereWithAggregatesInput | WatchlistScalarWhereWithAggregatesInput[] + id?: IntWithAggregatesFilter<"Watchlist"> | number + userId?: IntWithAggregatesFilter<"Watchlist"> | number + marketId?: StringWithAggregatesFilter<"Watchlist"> | string + alertThreshold?: FloatNullableWithAggregatesFilter<"Watchlist"> | number | null + createdAt?: DateTimeWithAggregatesFilter<"Watchlist"> | Date | string + } + + export type AlertWhereInput = { + AND?: AlertWhereInput | AlertWhereInput[] + OR?: AlertWhereInput[] + NOT?: AlertWhereInput | AlertWhereInput[] + id?: IntFilter<"Alert"> | number + userId?: IntFilter<"Alert"> | number + marketId?: StringFilter<"Alert"> | string + type?: StringFilter<"Alert"> | string + message?: StringFilter<"Alert"> | string + sentAt?: DateTimeFilter<"Alert"> | Date | string + user?: XOR + market?: XOR + } + + export type AlertOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + type?: SortOrder + message?: SortOrder + sentAt?: SortOrder + user?: UserOrderByWithRelationInput + market?: MarketOrderByWithRelationInput + } + + export type AlertWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: AlertWhereInput | AlertWhereInput[] + OR?: AlertWhereInput[] + NOT?: AlertWhereInput | AlertWhereInput[] + userId?: IntFilter<"Alert"> | number + marketId?: StringFilter<"Alert"> | string + type?: StringFilter<"Alert"> | string + message?: StringFilter<"Alert"> | string + sentAt?: DateTimeFilter<"Alert"> | Date | string + user?: XOR + market?: XOR + }, "id"> + + export type AlertOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + type?: SortOrder + message?: SortOrder + sentAt?: SortOrder + _count?: AlertCountOrderByAggregateInput + _avg?: AlertAvgOrderByAggregateInput + _max?: AlertMaxOrderByAggregateInput + _min?: AlertMinOrderByAggregateInput + _sum?: AlertSumOrderByAggregateInput + } + + export type AlertScalarWhereWithAggregatesInput = { + AND?: AlertScalarWhereWithAggregatesInput | AlertScalarWhereWithAggregatesInput[] + OR?: AlertScalarWhereWithAggregatesInput[] + NOT?: AlertScalarWhereWithAggregatesInput | AlertScalarWhereWithAggregatesInput[] + id?: IntWithAggregatesFilter<"Alert"> | number + userId?: IntWithAggregatesFilter<"Alert"> | number + marketId?: StringWithAggregatesFilter<"Alert"> | string + type?: StringWithAggregatesFilter<"Alert"> | string + message?: StringWithAggregatesFilter<"Alert"> | string + sentAt?: DateTimeWithAggregatesFilter<"Alert"> | Date | string + } + + export type UserCreateInput = { + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + positions?: PositionCreateNestedManyWithoutUserInput + watchlist?: WatchlistCreateNestedManyWithoutUserInput + alerts?: AlertCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateInput = { + id?: number + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + positions?: PositionUncheckedCreateNestedManyWithoutUserInput + watchlist?: WatchlistUncheckedCreateNestedManyWithoutUserInput + alerts?: AlertUncheckedCreateNestedManyWithoutUserInput + } + + export type UserUpdateInput = { + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + positions?: PositionUpdateManyWithoutUserNestedInput + watchlist?: WatchlistUpdateManyWithoutUserNestedInput + alerts?: AlertUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateInput = { + id?: IntFieldUpdateOperationsInput | number + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + positions?: PositionUncheckedUpdateManyWithoutUserNestedInput + watchlist?: WatchlistUncheckedUpdateManyWithoutUserNestedInput + alerts?: AlertUncheckedUpdateManyWithoutUserNestedInput + } + + export type UserCreateManyInput = { + id?: number + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type UserUpdateManyMutationInput = { + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserUncheckedUpdateManyInput = { + id?: IntFieldUpdateOperationsInput | number + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MarketCreateInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + signals?: AISignalCreateNestedManyWithoutMarketInput + positions?: PositionCreateNestedManyWithoutMarketInput + watchlist?: WatchlistCreateNestedManyWithoutMarketInput + alerts?: AlertCreateNestedManyWithoutMarketInput + } + + export type MarketUncheckedCreateInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + signals?: AISignalUncheckedCreateNestedManyWithoutMarketInput + positions?: PositionUncheckedCreateNestedManyWithoutMarketInput + watchlist?: WatchlistUncheckedCreateNestedManyWithoutMarketInput + alerts?: AlertUncheckedCreateNestedManyWithoutMarketInput + } + + export type MarketUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + signals?: AISignalUpdateManyWithoutMarketNestedInput + positions?: PositionUpdateManyWithoutMarketNestedInput + watchlist?: WatchlistUpdateManyWithoutMarketNestedInput + alerts?: AlertUpdateManyWithoutMarketNestedInput + } + + export type MarketUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + signals?: AISignalUncheckedUpdateManyWithoutMarketNestedInput + positions?: PositionUncheckedUpdateManyWithoutMarketNestedInput + watchlist?: WatchlistUncheckedUpdateManyWithoutMarketNestedInput + alerts?: AlertUncheckedUpdateManyWithoutMarketNestedInput + } + + export type MarketCreateManyInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + } + + export type MarketUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type MarketUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AISignalCreateInput = { + signal: string + confidence: number + summary?: string | null + keyRisk?: string | null + newsCount?: number + modelVersion?: string + impliedProb?: number | null + fairProb?: number | null + edgePoints?: number | null + generatedAt?: Date | string + market: MarketCreateNestedOneWithoutSignalsInput + } + + export type AISignalUncheckedCreateInput = { + id?: number + marketId: string + signal: string + confidence: number + summary?: string | null + keyRisk?: string | null + newsCount?: number + modelVersion?: string + impliedProb?: number | null + fairProb?: number | null + edgePoints?: number | null + generatedAt?: Date | string + } + + export type AISignalUpdateInput = { + signal?: StringFieldUpdateOperationsInput | string + confidence?: FloatFieldUpdateOperationsInput | number + summary?: NullableStringFieldUpdateOperationsInput | string | null + keyRisk?: NullableStringFieldUpdateOperationsInput | string | null + newsCount?: IntFieldUpdateOperationsInput | number + modelVersion?: StringFieldUpdateOperationsInput | string + impliedProb?: NullableFloatFieldUpdateOperationsInput | number | null + fairProb?: NullableFloatFieldUpdateOperationsInput | number | null + edgePoints?: NullableFloatFieldUpdateOperationsInput | number | null + generatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + market?: MarketUpdateOneRequiredWithoutSignalsNestedInput + } + + export type AISignalUncheckedUpdateInput = { + id?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + signal?: StringFieldUpdateOperationsInput | string + confidence?: FloatFieldUpdateOperationsInput | number + summary?: NullableStringFieldUpdateOperationsInput | string | null + keyRisk?: NullableStringFieldUpdateOperationsInput | string | null + newsCount?: IntFieldUpdateOperationsInput | number + modelVersion?: StringFieldUpdateOperationsInput | string + impliedProb?: NullableFloatFieldUpdateOperationsInput | number | null + fairProb?: NullableFloatFieldUpdateOperationsInput | number | null + edgePoints?: NullableFloatFieldUpdateOperationsInput | number | null + generatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AISignalCreateManyInput = { + id?: number + marketId: string + signal: string + confidence: number + summary?: string | null + keyRisk?: string | null + newsCount?: number + modelVersion?: string + impliedProb?: number | null + fairProb?: number | null + edgePoints?: number | null + generatedAt?: Date | string + } + + export type AISignalUpdateManyMutationInput = { + signal?: StringFieldUpdateOperationsInput | string + confidence?: FloatFieldUpdateOperationsInput | number + summary?: NullableStringFieldUpdateOperationsInput | string | null + keyRisk?: NullableStringFieldUpdateOperationsInput | string | null + newsCount?: IntFieldUpdateOperationsInput | number + modelVersion?: StringFieldUpdateOperationsInput | string + impliedProb?: NullableFloatFieldUpdateOperationsInput | number | null + fairProb?: NullableFloatFieldUpdateOperationsInput | number | null + edgePoints?: NullableFloatFieldUpdateOperationsInput | number | null + generatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AISignalUncheckedUpdateManyInput = { + id?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + signal?: StringFieldUpdateOperationsInput | string + confidence?: FloatFieldUpdateOperationsInput | number + summary?: NullableStringFieldUpdateOperationsInput | string | null + keyRisk?: NullableStringFieldUpdateOperationsInput | string | null + newsCount?: IntFieldUpdateOperationsInput | number + modelVersion?: StringFieldUpdateOperationsInput | string + impliedProb?: NullableFloatFieldUpdateOperationsInput | number | null + fairProb?: NullableFloatFieldUpdateOperationsInput | number | null + edgePoints?: NullableFloatFieldUpdateOperationsInput | number | null + generatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PositionCreateInput = { + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + user: UserCreateNestedOneWithoutPositionsInput + market: MarketCreateNestedOneWithoutPositionsInput + } + + export type PositionUncheckedCreateInput = { + id?: number + userId: number + marketId: string + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + } + + export type PositionUpdateInput = { + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutPositionsNestedInput + market?: MarketUpdateOneRequiredWithoutPositionsNestedInput + } + + export type PositionUncheckedUpdateInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type PositionCreateManyInput = { + id?: number + userId: number + marketId: string + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + } + + export type PositionUpdateManyMutationInput = { + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type PositionUncheckedUpdateManyInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type WatchlistCreateInput = { + alertThreshold?: number | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutWatchlistInput + market: MarketCreateNestedOneWithoutWatchlistInput + } + + export type WatchlistUncheckedCreateInput = { + id?: number + userId: number + marketId: string + alertThreshold?: number | null + createdAt?: Date | string + } + + export type WatchlistUpdateInput = { + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutWatchlistNestedInput + market?: MarketUpdateOneRequiredWithoutWatchlistNestedInput + } + + export type WatchlistUncheckedUpdateInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WatchlistCreateManyInput = { + id?: number + userId: number + marketId: string + alertThreshold?: number | null + createdAt?: Date | string + } + + export type WatchlistUpdateManyMutationInput = { + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WatchlistUncheckedUpdateManyInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AlertCreateInput = { + type: string + message: string + sentAt?: Date | string + user: UserCreateNestedOneWithoutAlertsInput + market: MarketCreateNestedOneWithoutAlertsInput + } + + export type AlertUncheckedCreateInput = { + id?: number + userId: number + marketId: string + type: string + message: string + sentAt?: Date | string + } + + export type AlertUpdateInput = { + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutAlertsNestedInput + market?: MarketUpdateOneRequiredWithoutAlertsNestedInput + } + + export type AlertUncheckedUpdateInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AlertCreateManyInput = { + id?: number + userId: number + marketId: string + type: string + message: string + sentAt?: Date | string + } + + export type AlertUpdateManyMutationInput = { + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AlertUncheckedUpdateManyInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type IntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type StringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringFilter<$PrismaModel> | string + } + + export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type PositionListRelationFilter = { + every?: PositionWhereInput + some?: PositionWhereInput + none?: PositionWhereInput + } + + export type WatchlistListRelationFilter = { + every?: WatchlistWhereInput + some?: WatchlistWhereInput + none?: WatchlistWhereInput + } + + export type AlertListRelationFilter = { + every?: AlertWhereInput + some?: AlertWhereInput + none?: AlertWhereInput + } + + export type SortOrderInput = { + sort: SortOrder + nulls?: NullsOrder + } + + export type PositionOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type WatchlistOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type AlertOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type UserCountOrderByAggregateInput = { + id?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + isActive?: SortOrder + telegramChatId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type UserAvgOrderByAggregateInput = { + id?: SortOrder + } + + export type UserMaxOrderByAggregateInput = { + id?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + isActive?: SortOrder + telegramChatId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type UserMinOrderByAggregateInput = { + id?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + isActive?: SortOrder + telegramChatId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type UserSumOrderByAggregateInput = { + id?: SortOrder + } + + export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type FloatNullableFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type AISignalListRelationFilter = { + every?: AISignalWhereInput + some?: AISignalWhereInput + none?: AISignalWhereInput + } + + export type AISignalOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type MarketCountOrderByAggregateInput = { + id?: SortOrder + question?: SortOrder + category?: SortOrder + countryCode?: SortOrder + yesPrice?: SortOrder + noPrice?: SortOrder + volumeEur?: SortOrder + liquidityEur?: SortOrder + spread?: SortOrder + bestBid?: SortOrder + bestAsk?: SortOrder + clobTokenId?: SortOrder + analyzable?: SortOrder + status?: SortOrder + closesAt?: SortOrder + lastSynced?: SortOrder + } + + export type MarketAvgOrderByAggregateInput = { + yesPrice?: SortOrder + noPrice?: SortOrder + volumeEur?: SortOrder + liquidityEur?: SortOrder + spread?: SortOrder + bestBid?: SortOrder + bestAsk?: SortOrder + } + + export type MarketMaxOrderByAggregateInput = { + id?: SortOrder + question?: SortOrder + category?: SortOrder + countryCode?: SortOrder + yesPrice?: SortOrder + noPrice?: SortOrder + volumeEur?: SortOrder + liquidityEur?: SortOrder + spread?: SortOrder + bestBid?: SortOrder + bestAsk?: SortOrder + clobTokenId?: SortOrder + analyzable?: SortOrder + status?: SortOrder + closesAt?: SortOrder + lastSynced?: SortOrder + } + + export type MarketMinOrderByAggregateInput = { + id?: SortOrder + question?: SortOrder + category?: SortOrder + countryCode?: SortOrder + yesPrice?: SortOrder + noPrice?: SortOrder + volumeEur?: SortOrder + liquidityEur?: SortOrder + spread?: SortOrder + bestBid?: SortOrder + bestAsk?: SortOrder + clobTokenId?: SortOrder + analyzable?: SortOrder + status?: SortOrder + closesAt?: SortOrder + lastSynced?: SortOrder + } + + export type MarketSumOrderByAggregateInput = { + yesPrice?: SortOrder + noPrice?: SortOrder + volumeEur?: SortOrder + liquidityEur?: SortOrder + spread?: SortOrder + bestBid?: SortOrder + bestAsk?: SortOrder + } + + export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedFloatNullableFilter<$PrismaModel> + _min?: NestedFloatNullableFilter<$PrismaModel> + _max?: NestedFloatNullableFilter<$PrismaModel> + } + + export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type FloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type MarketScalarRelationFilter = { + is?: MarketWhereInput + isNot?: MarketWhereInput + } + + export type AISignalCountOrderByAggregateInput = { + id?: SortOrder + marketId?: SortOrder + signal?: SortOrder + confidence?: SortOrder + summary?: SortOrder + keyRisk?: SortOrder + newsCount?: SortOrder + modelVersion?: SortOrder + impliedProb?: SortOrder + fairProb?: SortOrder + edgePoints?: SortOrder + generatedAt?: SortOrder + } + + export type AISignalAvgOrderByAggregateInput = { + id?: SortOrder + confidence?: SortOrder + newsCount?: SortOrder + impliedProb?: SortOrder + fairProb?: SortOrder + edgePoints?: SortOrder + } + + export type AISignalMaxOrderByAggregateInput = { + id?: SortOrder + marketId?: SortOrder + signal?: SortOrder + confidence?: SortOrder + summary?: SortOrder + keyRisk?: SortOrder + newsCount?: SortOrder + modelVersion?: SortOrder + impliedProb?: SortOrder + fairProb?: SortOrder + edgePoints?: SortOrder + generatedAt?: SortOrder + } + + export type AISignalMinOrderByAggregateInput = { + id?: SortOrder + marketId?: SortOrder + signal?: SortOrder + confidence?: SortOrder + summary?: SortOrder + keyRisk?: SortOrder + newsCount?: SortOrder + modelVersion?: SortOrder + impliedProb?: SortOrder + fairProb?: SortOrder + edgePoints?: SortOrder + generatedAt?: SortOrder + } + + export type AISignalSumOrderByAggregateInput = { + id?: SortOrder + confidence?: SortOrder + newsCount?: SortOrder + impliedProb?: SortOrder + fairProb?: SortOrder + edgePoints?: SortOrder + } + + export type FloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedFloatFilter<$PrismaModel> + _min?: NestedFloatFilter<$PrismaModel> + _max?: NestedFloatFilter<$PrismaModel> + } + + export type UserScalarRelationFilter = { + is?: UserWhereInput + isNot?: UserWhereInput + } + + export type PositionCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + outcome?: SortOrder + amountEur?: SortOrder + entryPrice?: SortOrder + currentPrice?: SortOrder + pnl?: SortOrder + kellyFraction?: SortOrder + status?: SortOrder + openedAt?: SortOrder + closedAt?: SortOrder + } + + export type PositionAvgOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + amountEur?: SortOrder + entryPrice?: SortOrder + currentPrice?: SortOrder + pnl?: SortOrder + kellyFraction?: SortOrder + } + + export type PositionMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + outcome?: SortOrder + amountEur?: SortOrder + entryPrice?: SortOrder + currentPrice?: SortOrder + pnl?: SortOrder + kellyFraction?: SortOrder + status?: SortOrder + openedAt?: SortOrder + closedAt?: SortOrder + } + + export type PositionMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + outcome?: SortOrder + amountEur?: SortOrder + entryPrice?: SortOrder + currentPrice?: SortOrder + pnl?: SortOrder + kellyFraction?: SortOrder + status?: SortOrder + openedAt?: SortOrder + closedAt?: SortOrder + } + + export type PositionSumOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + amountEur?: SortOrder + entryPrice?: SortOrder + currentPrice?: SortOrder + pnl?: SortOrder + kellyFraction?: SortOrder + } + + export type WatchlistUserIdMarketIdCompoundUniqueInput = { + userId: number + marketId: string + } + + export type WatchlistCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + alertThreshold?: SortOrder + createdAt?: SortOrder + } + + export type WatchlistAvgOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + alertThreshold?: SortOrder + } + + export type WatchlistMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + alertThreshold?: SortOrder + createdAt?: SortOrder + } + + export type WatchlistMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + alertThreshold?: SortOrder + createdAt?: SortOrder + } + + export type WatchlistSumOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + alertThreshold?: SortOrder + } + + export type AlertCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + type?: SortOrder + message?: SortOrder + sentAt?: SortOrder + } + + export type AlertAvgOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + } + + export type AlertMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + type?: SortOrder + message?: SortOrder + sentAt?: SortOrder + } + + export type AlertMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + marketId?: SortOrder + type?: SortOrder + message?: SortOrder + sentAt?: SortOrder + } + + export type AlertSumOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + } + + export type PositionCreateNestedManyWithoutUserInput = { + create?: XOR | PositionCreateWithoutUserInput[] | PositionUncheckedCreateWithoutUserInput[] + connectOrCreate?: PositionCreateOrConnectWithoutUserInput | PositionCreateOrConnectWithoutUserInput[] + createMany?: PositionCreateManyUserInputEnvelope + connect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + } + + export type WatchlistCreateNestedManyWithoutUserInput = { + create?: XOR | WatchlistCreateWithoutUserInput[] | WatchlistUncheckedCreateWithoutUserInput[] + connectOrCreate?: WatchlistCreateOrConnectWithoutUserInput | WatchlistCreateOrConnectWithoutUserInput[] + createMany?: WatchlistCreateManyUserInputEnvelope + connect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + } + + export type AlertCreateNestedManyWithoutUserInput = { + create?: XOR | AlertCreateWithoutUserInput[] | AlertUncheckedCreateWithoutUserInput[] + connectOrCreate?: AlertCreateOrConnectWithoutUserInput | AlertCreateOrConnectWithoutUserInput[] + createMany?: AlertCreateManyUserInputEnvelope + connect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + } + + export type PositionUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | PositionCreateWithoutUserInput[] | PositionUncheckedCreateWithoutUserInput[] + connectOrCreate?: PositionCreateOrConnectWithoutUserInput | PositionCreateOrConnectWithoutUserInput[] + createMany?: PositionCreateManyUserInputEnvelope + connect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + } + + export type WatchlistUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | WatchlistCreateWithoutUserInput[] | WatchlistUncheckedCreateWithoutUserInput[] + connectOrCreate?: WatchlistCreateOrConnectWithoutUserInput | WatchlistCreateOrConnectWithoutUserInput[] + createMany?: WatchlistCreateManyUserInputEnvelope + connect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + } + + export type AlertUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | AlertCreateWithoutUserInput[] | AlertUncheckedCreateWithoutUserInput[] + connectOrCreate?: AlertCreateOrConnectWithoutUserInput | AlertCreateOrConnectWithoutUserInput[] + createMany?: AlertCreateManyUserInputEnvelope + connect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + } + + export type StringFieldUpdateOperationsInput = { + set?: string + } + + export type BoolFieldUpdateOperationsInput = { + set?: boolean + } + + export type NullableStringFieldUpdateOperationsInput = { + set?: string | null + } + + export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string + } + + export type PositionUpdateManyWithoutUserNestedInput = { + create?: XOR | PositionCreateWithoutUserInput[] | PositionUncheckedCreateWithoutUserInput[] + connectOrCreate?: PositionCreateOrConnectWithoutUserInput | PositionCreateOrConnectWithoutUserInput[] + upsert?: PositionUpsertWithWhereUniqueWithoutUserInput | PositionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: PositionCreateManyUserInputEnvelope + set?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + disconnect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + delete?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + connect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + update?: PositionUpdateWithWhereUniqueWithoutUserInput | PositionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: PositionUpdateManyWithWhereWithoutUserInput | PositionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: PositionScalarWhereInput | PositionScalarWhereInput[] + } + + export type WatchlistUpdateManyWithoutUserNestedInput = { + create?: XOR | WatchlistCreateWithoutUserInput[] | WatchlistUncheckedCreateWithoutUserInput[] + connectOrCreate?: WatchlistCreateOrConnectWithoutUserInput | WatchlistCreateOrConnectWithoutUserInput[] + upsert?: WatchlistUpsertWithWhereUniqueWithoutUserInput | WatchlistUpsertWithWhereUniqueWithoutUserInput[] + createMany?: WatchlistCreateManyUserInputEnvelope + set?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + disconnect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + delete?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + connect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + update?: WatchlistUpdateWithWhereUniqueWithoutUserInput | WatchlistUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: WatchlistUpdateManyWithWhereWithoutUserInput | WatchlistUpdateManyWithWhereWithoutUserInput[] + deleteMany?: WatchlistScalarWhereInput | WatchlistScalarWhereInput[] + } + + export type AlertUpdateManyWithoutUserNestedInput = { + create?: XOR | AlertCreateWithoutUserInput[] | AlertUncheckedCreateWithoutUserInput[] + connectOrCreate?: AlertCreateOrConnectWithoutUserInput | AlertCreateOrConnectWithoutUserInput[] + upsert?: AlertUpsertWithWhereUniqueWithoutUserInput | AlertUpsertWithWhereUniqueWithoutUserInput[] + createMany?: AlertCreateManyUserInputEnvelope + set?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + disconnect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + delete?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + connect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + update?: AlertUpdateWithWhereUniqueWithoutUserInput | AlertUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: AlertUpdateManyWithWhereWithoutUserInput | AlertUpdateManyWithWhereWithoutUserInput[] + deleteMany?: AlertScalarWhereInput | AlertScalarWhereInput[] + } + + export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type PositionUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | PositionCreateWithoutUserInput[] | PositionUncheckedCreateWithoutUserInput[] + connectOrCreate?: PositionCreateOrConnectWithoutUserInput | PositionCreateOrConnectWithoutUserInput[] + upsert?: PositionUpsertWithWhereUniqueWithoutUserInput | PositionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: PositionCreateManyUserInputEnvelope + set?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + disconnect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + delete?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + connect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + update?: PositionUpdateWithWhereUniqueWithoutUserInput | PositionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: PositionUpdateManyWithWhereWithoutUserInput | PositionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: PositionScalarWhereInput | PositionScalarWhereInput[] + } + + export type WatchlistUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | WatchlistCreateWithoutUserInput[] | WatchlistUncheckedCreateWithoutUserInput[] + connectOrCreate?: WatchlistCreateOrConnectWithoutUserInput | WatchlistCreateOrConnectWithoutUserInput[] + upsert?: WatchlistUpsertWithWhereUniqueWithoutUserInput | WatchlistUpsertWithWhereUniqueWithoutUserInput[] + createMany?: WatchlistCreateManyUserInputEnvelope + set?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + disconnect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + delete?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + connect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + update?: WatchlistUpdateWithWhereUniqueWithoutUserInput | WatchlistUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: WatchlistUpdateManyWithWhereWithoutUserInput | WatchlistUpdateManyWithWhereWithoutUserInput[] + deleteMany?: WatchlistScalarWhereInput | WatchlistScalarWhereInput[] + } + + export type AlertUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | AlertCreateWithoutUserInput[] | AlertUncheckedCreateWithoutUserInput[] + connectOrCreate?: AlertCreateOrConnectWithoutUserInput | AlertCreateOrConnectWithoutUserInput[] + upsert?: AlertUpsertWithWhereUniqueWithoutUserInput | AlertUpsertWithWhereUniqueWithoutUserInput[] + createMany?: AlertCreateManyUserInputEnvelope + set?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + disconnect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + delete?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + connect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + update?: AlertUpdateWithWhereUniqueWithoutUserInput | AlertUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: AlertUpdateManyWithWhereWithoutUserInput | AlertUpdateManyWithWhereWithoutUserInput[] + deleteMany?: AlertScalarWhereInput | AlertScalarWhereInput[] + } + + export type AISignalCreateNestedManyWithoutMarketInput = { + create?: XOR | AISignalCreateWithoutMarketInput[] | AISignalUncheckedCreateWithoutMarketInput[] + connectOrCreate?: AISignalCreateOrConnectWithoutMarketInput | AISignalCreateOrConnectWithoutMarketInput[] + createMany?: AISignalCreateManyMarketInputEnvelope + connect?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + } + + export type PositionCreateNestedManyWithoutMarketInput = { + create?: XOR | PositionCreateWithoutMarketInput[] | PositionUncheckedCreateWithoutMarketInput[] + connectOrCreate?: PositionCreateOrConnectWithoutMarketInput | PositionCreateOrConnectWithoutMarketInput[] + createMany?: PositionCreateManyMarketInputEnvelope + connect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + } + + export type WatchlistCreateNestedManyWithoutMarketInput = { + create?: XOR | WatchlistCreateWithoutMarketInput[] | WatchlistUncheckedCreateWithoutMarketInput[] + connectOrCreate?: WatchlistCreateOrConnectWithoutMarketInput | WatchlistCreateOrConnectWithoutMarketInput[] + createMany?: WatchlistCreateManyMarketInputEnvelope + connect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + } + + export type AlertCreateNestedManyWithoutMarketInput = { + create?: XOR | AlertCreateWithoutMarketInput[] | AlertUncheckedCreateWithoutMarketInput[] + connectOrCreate?: AlertCreateOrConnectWithoutMarketInput | AlertCreateOrConnectWithoutMarketInput[] + createMany?: AlertCreateManyMarketInputEnvelope + connect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + } + + export type AISignalUncheckedCreateNestedManyWithoutMarketInput = { + create?: XOR | AISignalCreateWithoutMarketInput[] | AISignalUncheckedCreateWithoutMarketInput[] + connectOrCreate?: AISignalCreateOrConnectWithoutMarketInput | AISignalCreateOrConnectWithoutMarketInput[] + createMany?: AISignalCreateManyMarketInputEnvelope + connect?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + } + + export type PositionUncheckedCreateNestedManyWithoutMarketInput = { + create?: XOR | PositionCreateWithoutMarketInput[] | PositionUncheckedCreateWithoutMarketInput[] + connectOrCreate?: PositionCreateOrConnectWithoutMarketInput | PositionCreateOrConnectWithoutMarketInput[] + createMany?: PositionCreateManyMarketInputEnvelope + connect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + } + + export type WatchlistUncheckedCreateNestedManyWithoutMarketInput = { + create?: XOR | WatchlistCreateWithoutMarketInput[] | WatchlistUncheckedCreateWithoutMarketInput[] + connectOrCreate?: WatchlistCreateOrConnectWithoutMarketInput | WatchlistCreateOrConnectWithoutMarketInput[] + createMany?: WatchlistCreateManyMarketInputEnvelope + connect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + } + + export type AlertUncheckedCreateNestedManyWithoutMarketInput = { + create?: XOR | AlertCreateWithoutMarketInput[] | AlertUncheckedCreateWithoutMarketInput[] + connectOrCreate?: AlertCreateOrConnectWithoutMarketInput | AlertCreateOrConnectWithoutMarketInput[] + createMany?: AlertCreateManyMarketInputEnvelope + connect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + } + + export type NullableFloatFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null + } + + export type AISignalUpdateManyWithoutMarketNestedInput = { + create?: XOR | AISignalCreateWithoutMarketInput[] | AISignalUncheckedCreateWithoutMarketInput[] + connectOrCreate?: AISignalCreateOrConnectWithoutMarketInput | AISignalCreateOrConnectWithoutMarketInput[] + upsert?: AISignalUpsertWithWhereUniqueWithoutMarketInput | AISignalUpsertWithWhereUniqueWithoutMarketInput[] + createMany?: AISignalCreateManyMarketInputEnvelope + set?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + disconnect?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + delete?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + connect?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + update?: AISignalUpdateWithWhereUniqueWithoutMarketInput | AISignalUpdateWithWhereUniqueWithoutMarketInput[] + updateMany?: AISignalUpdateManyWithWhereWithoutMarketInput | AISignalUpdateManyWithWhereWithoutMarketInput[] + deleteMany?: AISignalScalarWhereInput | AISignalScalarWhereInput[] + } + + export type PositionUpdateManyWithoutMarketNestedInput = { + create?: XOR | PositionCreateWithoutMarketInput[] | PositionUncheckedCreateWithoutMarketInput[] + connectOrCreate?: PositionCreateOrConnectWithoutMarketInput | PositionCreateOrConnectWithoutMarketInput[] + upsert?: PositionUpsertWithWhereUniqueWithoutMarketInput | PositionUpsertWithWhereUniqueWithoutMarketInput[] + createMany?: PositionCreateManyMarketInputEnvelope + set?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + disconnect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + delete?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + connect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + update?: PositionUpdateWithWhereUniqueWithoutMarketInput | PositionUpdateWithWhereUniqueWithoutMarketInput[] + updateMany?: PositionUpdateManyWithWhereWithoutMarketInput | PositionUpdateManyWithWhereWithoutMarketInput[] + deleteMany?: PositionScalarWhereInput | PositionScalarWhereInput[] + } + + export type WatchlistUpdateManyWithoutMarketNestedInput = { + create?: XOR | WatchlistCreateWithoutMarketInput[] | WatchlistUncheckedCreateWithoutMarketInput[] + connectOrCreate?: WatchlistCreateOrConnectWithoutMarketInput | WatchlistCreateOrConnectWithoutMarketInput[] + upsert?: WatchlistUpsertWithWhereUniqueWithoutMarketInput | WatchlistUpsertWithWhereUniqueWithoutMarketInput[] + createMany?: WatchlistCreateManyMarketInputEnvelope + set?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + disconnect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + delete?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + connect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + update?: WatchlistUpdateWithWhereUniqueWithoutMarketInput | WatchlistUpdateWithWhereUniqueWithoutMarketInput[] + updateMany?: WatchlistUpdateManyWithWhereWithoutMarketInput | WatchlistUpdateManyWithWhereWithoutMarketInput[] + deleteMany?: WatchlistScalarWhereInput | WatchlistScalarWhereInput[] + } + + export type AlertUpdateManyWithoutMarketNestedInput = { + create?: XOR | AlertCreateWithoutMarketInput[] | AlertUncheckedCreateWithoutMarketInput[] + connectOrCreate?: AlertCreateOrConnectWithoutMarketInput | AlertCreateOrConnectWithoutMarketInput[] + upsert?: AlertUpsertWithWhereUniqueWithoutMarketInput | AlertUpsertWithWhereUniqueWithoutMarketInput[] + createMany?: AlertCreateManyMarketInputEnvelope + set?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + disconnect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + delete?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + connect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + update?: AlertUpdateWithWhereUniqueWithoutMarketInput | AlertUpdateWithWhereUniqueWithoutMarketInput[] + updateMany?: AlertUpdateManyWithWhereWithoutMarketInput | AlertUpdateManyWithWhereWithoutMarketInput[] + deleteMany?: AlertScalarWhereInput | AlertScalarWhereInput[] + } + + export type AISignalUncheckedUpdateManyWithoutMarketNestedInput = { + create?: XOR | AISignalCreateWithoutMarketInput[] | AISignalUncheckedCreateWithoutMarketInput[] + connectOrCreate?: AISignalCreateOrConnectWithoutMarketInput | AISignalCreateOrConnectWithoutMarketInput[] + upsert?: AISignalUpsertWithWhereUniqueWithoutMarketInput | AISignalUpsertWithWhereUniqueWithoutMarketInput[] + createMany?: AISignalCreateManyMarketInputEnvelope + set?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + disconnect?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + delete?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + connect?: AISignalWhereUniqueInput | AISignalWhereUniqueInput[] + update?: AISignalUpdateWithWhereUniqueWithoutMarketInput | AISignalUpdateWithWhereUniqueWithoutMarketInput[] + updateMany?: AISignalUpdateManyWithWhereWithoutMarketInput | AISignalUpdateManyWithWhereWithoutMarketInput[] + deleteMany?: AISignalScalarWhereInput | AISignalScalarWhereInput[] + } + + export type PositionUncheckedUpdateManyWithoutMarketNestedInput = { + create?: XOR | PositionCreateWithoutMarketInput[] | PositionUncheckedCreateWithoutMarketInput[] + connectOrCreate?: PositionCreateOrConnectWithoutMarketInput | PositionCreateOrConnectWithoutMarketInput[] + upsert?: PositionUpsertWithWhereUniqueWithoutMarketInput | PositionUpsertWithWhereUniqueWithoutMarketInput[] + createMany?: PositionCreateManyMarketInputEnvelope + set?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + disconnect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + delete?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + connect?: PositionWhereUniqueInput | PositionWhereUniqueInput[] + update?: PositionUpdateWithWhereUniqueWithoutMarketInput | PositionUpdateWithWhereUniqueWithoutMarketInput[] + updateMany?: PositionUpdateManyWithWhereWithoutMarketInput | PositionUpdateManyWithWhereWithoutMarketInput[] + deleteMany?: PositionScalarWhereInput | PositionScalarWhereInput[] + } + + export type WatchlistUncheckedUpdateManyWithoutMarketNestedInput = { + create?: XOR | WatchlistCreateWithoutMarketInput[] | WatchlistUncheckedCreateWithoutMarketInput[] + connectOrCreate?: WatchlistCreateOrConnectWithoutMarketInput | WatchlistCreateOrConnectWithoutMarketInput[] + upsert?: WatchlistUpsertWithWhereUniqueWithoutMarketInput | WatchlistUpsertWithWhereUniqueWithoutMarketInput[] + createMany?: WatchlistCreateManyMarketInputEnvelope + set?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + disconnect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + delete?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + connect?: WatchlistWhereUniqueInput | WatchlistWhereUniqueInput[] + update?: WatchlistUpdateWithWhereUniqueWithoutMarketInput | WatchlistUpdateWithWhereUniqueWithoutMarketInput[] + updateMany?: WatchlistUpdateManyWithWhereWithoutMarketInput | WatchlistUpdateManyWithWhereWithoutMarketInput[] + deleteMany?: WatchlistScalarWhereInput | WatchlistScalarWhereInput[] + } + + export type AlertUncheckedUpdateManyWithoutMarketNestedInput = { + create?: XOR | AlertCreateWithoutMarketInput[] | AlertUncheckedCreateWithoutMarketInput[] + connectOrCreate?: AlertCreateOrConnectWithoutMarketInput | AlertCreateOrConnectWithoutMarketInput[] + upsert?: AlertUpsertWithWhereUniqueWithoutMarketInput | AlertUpsertWithWhereUniqueWithoutMarketInput[] + createMany?: AlertCreateManyMarketInputEnvelope + set?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + disconnect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + delete?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + connect?: AlertWhereUniqueInput | AlertWhereUniqueInput[] + update?: AlertUpdateWithWhereUniqueWithoutMarketInput | AlertUpdateWithWhereUniqueWithoutMarketInput[] + updateMany?: AlertUpdateManyWithWhereWithoutMarketInput | AlertUpdateManyWithWhereWithoutMarketInput[] + deleteMany?: AlertScalarWhereInput | AlertScalarWhereInput[] + } + + export type MarketCreateNestedOneWithoutSignalsInput = { + create?: XOR + connectOrCreate?: MarketCreateOrConnectWithoutSignalsInput + connect?: MarketWhereUniqueInput + } + + export type FloatFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type MarketUpdateOneRequiredWithoutSignalsNestedInput = { + create?: XOR + connectOrCreate?: MarketCreateOrConnectWithoutSignalsInput + upsert?: MarketUpsertWithoutSignalsInput + connect?: MarketWhereUniqueInput + update?: XOR, MarketUncheckedUpdateWithoutSignalsInput> + } + + export type UserCreateNestedOneWithoutPositionsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutPositionsInput + connect?: UserWhereUniqueInput + } + + export type MarketCreateNestedOneWithoutPositionsInput = { + create?: XOR + connectOrCreate?: MarketCreateOrConnectWithoutPositionsInput + connect?: MarketWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutPositionsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutPositionsInput + upsert?: UserUpsertWithoutPositionsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutPositionsInput> + } + + export type MarketUpdateOneRequiredWithoutPositionsNestedInput = { + create?: XOR + connectOrCreate?: MarketCreateOrConnectWithoutPositionsInput + upsert?: MarketUpsertWithoutPositionsInput + connect?: MarketWhereUniqueInput + update?: XOR, MarketUncheckedUpdateWithoutPositionsInput> + } + + export type UserCreateNestedOneWithoutWatchlistInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutWatchlistInput + connect?: UserWhereUniqueInput + } + + export type MarketCreateNestedOneWithoutWatchlistInput = { + create?: XOR + connectOrCreate?: MarketCreateOrConnectWithoutWatchlistInput + connect?: MarketWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutWatchlistNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutWatchlistInput + upsert?: UserUpsertWithoutWatchlistInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutWatchlistInput> + } + + export type MarketUpdateOneRequiredWithoutWatchlistNestedInput = { + create?: XOR + connectOrCreate?: MarketCreateOrConnectWithoutWatchlistInput + upsert?: MarketUpsertWithoutWatchlistInput + connect?: MarketWhereUniqueInput + update?: XOR, MarketUncheckedUpdateWithoutWatchlistInput> + } + + export type UserCreateNestedOneWithoutAlertsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutAlertsInput + connect?: UserWhereUniqueInput + } + + export type MarketCreateNestedOneWithoutAlertsInput = { + create?: XOR + connectOrCreate?: MarketCreateOrConnectWithoutAlertsInput + connect?: MarketWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutAlertsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutAlertsInput + upsert?: UserUpsertWithoutAlertsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutAlertsInput> + } + + export type MarketUpdateOneRequiredWithoutAlertsNestedInput = { + create?: XOR + connectOrCreate?: MarketCreateOrConnectWithoutAlertsInput + upsert?: MarketUpsertWithoutAlertsInput + connect?: MarketWhereUniqueInput + update?: XOR, MarketUncheckedUpdateWithoutAlertsInput> + } + + export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringFilter<$PrismaModel> | string + } + + export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type NestedFloatNullableFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedFloatNullableFilter<$PrismaModel> + _min?: NestedFloatNullableFilter<$PrismaModel> + _max?: NestedFloatNullableFilter<$PrismaModel> + } + + export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedFloatFilter<$PrismaModel> + _min?: NestedFloatFilter<$PrismaModel> + _max?: NestedFloatFilter<$PrismaModel> + } + + export type PositionCreateWithoutUserInput = { + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + market: MarketCreateNestedOneWithoutPositionsInput + } + + export type PositionUncheckedCreateWithoutUserInput = { + id?: number + marketId: string + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + } + + export type PositionCreateOrConnectWithoutUserInput = { + where: PositionWhereUniqueInput + create: XOR + } + + export type PositionCreateManyUserInputEnvelope = { + data: PositionCreateManyUserInput | PositionCreateManyUserInput[] + } + + export type WatchlistCreateWithoutUserInput = { + alertThreshold?: number | null + createdAt?: Date | string + market: MarketCreateNestedOneWithoutWatchlistInput + } + + export type WatchlistUncheckedCreateWithoutUserInput = { + id?: number + marketId: string + alertThreshold?: number | null + createdAt?: Date | string + } + + export type WatchlistCreateOrConnectWithoutUserInput = { + where: WatchlistWhereUniqueInput + create: XOR + } + + export type WatchlistCreateManyUserInputEnvelope = { + data: WatchlistCreateManyUserInput | WatchlistCreateManyUserInput[] + } + + export type AlertCreateWithoutUserInput = { + type: string + message: string + sentAt?: Date | string + market: MarketCreateNestedOneWithoutAlertsInput + } + + export type AlertUncheckedCreateWithoutUserInput = { + id?: number + marketId: string + type: string + message: string + sentAt?: Date | string + } + + export type AlertCreateOrConnectWithoutUserInput = { + where: AlertWhereUniqueInput + create: XOR + } + + export type AlertCreateManyUserInputEnvelope = { + data: AlertCreateManyUserInput | AlertCreateManyUserInput[] + } + + export type PositionUpsertWithWhereUniqueWithoutUserInput = { + where: PositionWhereUniqueInput + update: XOR + create: XOR + } + + export type PositionUpdateWithWhereUniqueWithoutUserInput = { + where: PositionWhereUniqueInput + data: XOR + } + + export type PositionUpdateManyWithWhereWithoutUserInput = { + where: PositionScalarWhereInput + data: XOR + } + + export type PositionScalarWhereInput = { + AND?: PositionScalarWhereInput | PositionScalarWhereInput[] + OR?: PositionScalarWhereInput[] + NOT?: PositionScalarWhereInput | PositionScalarWhereInput[] + id?: IntFilter<"Position"> | number + userId?: IntFilter<"Position"> | number + marketId?: StringFilter<"Position"> | string + outcome?: StringFilter<"Position"> | string + amountEur?: FloatFilter<"Position"> | number + entryPrice?: FloatFilter<"Position"> | number + currentPrice?: FloatNullableFilter<"Position"> | number | null + pnl?: FloatFilter<"Position"> | number + kellyFraction?: FloatNullableFilter<"Position"> | number | null + status?: StringFilter<"Position"> | string + openedAt?: DateTimeFilter<"Position"> | Date | string + closedAt?: DateTimeNullableFilter<"Position"> | Date | string | null + } + + export type WatchlistUpsertWithWhereUniqueWithoutUserInput = { + where: WatchlistWhereUniqueInput + update: XOR + create: XOR + } + + export type WatchlistUpdateWithWhereUniqueWithoutUserInput = { + where: WatchlistWhereUniqueInput + data: XOR + } + + export type WatchlistUpdateManyWithWhereWithoutUserInput = { + where: WatchlistScalarWhereInput + data: XOR + } + + export type WatchlistScalarWhereInput = { + AND?: WatchlistScalarWhereInput | WatchlistScalarWhereInput[] + OR?: WatchlistScalarWhereInput[] + NOT?: WatchlistScalarWhereInput | WatchlistScalarWhereInput[] + id?: IntFilter<"Watchlist"> | number + userId?: IntFilter<"Watchlist"> | number + marketId?: StringFilter<"Watchlist"> | string + alertThreshold?: FloatNullableFilter<"Watchlist"> | number | null + createdAt?: DateTimeFilter<"Watchlist"> | Date | string + } + + export type AlertUpsertWithWhereUniqueWithoutUserInput = { + where: AlertWhereUniqueInput + update: XOR + create: XOR + } + + export type AlertUpdateWithWhereUniqueWithoutUserInput = { + where: AlertWhereUniqueInput + data: XOR + } + + export type AlertUpdateManyWithWhereWithoutUserInput = { + where: AlertScalarWhereInput + data: XOR + } + + export type AlertScalarWhereInput = { + AND?: AlertScalarWhereInput | AlertScalarWhereInput[] + OR?: AlertScalarWhereInput[] + NOT?: AlertScalarWhereInput | AlertScalarWhereInput[] + id?: IntFilter<"Alert"> | number + userId?: IntFilter<"Alert"> | number + marketId?: StringFilter<"Alert"> | string + type?: StringFilter<"Alert"> | string + message?: StringFilter<"Alert"> | string + sentAt?: DateTimeFilter<"Alert"> | Date | string + } + + export type AISignalCreateWithoutMarketInput = { + signal: string + confidence: number + summary?: string | null + keyRisk?: string | null + newsCount?: number + modelVersion?: string + impliedProb?: number | null + fairProb?: number | null + edgePoints?: number | null + generatedAt?: Date | string + } + + export type AISignalUncheckedCreateWithoutMarketInput = { + id?: number + signal: string + confidence: number + summary?: string | null + keyRisk?: string | null + newsCount?: number + modelVersion?: string + impliedProb?: number | null + fairProb?: number | null + edgePoints?: number | null + generatedAt?: Date | string + } + + export type AISignalCreateOrConnectWithoutMarketInput = { + where: AISignalWhereUniqueInput + create: XOR + } + + export type AISignalCreateManyMarketInputEnvelope = { + data: AISignalCreateManyMarketInput | AISignalCreateManyMarketInput[] + } + + export type PositionCreateWithoutMarketInput = { + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + user: UserCreateNestedOneWithoutPositionsInput + } + + export type PositionUncheckedCreateWithoutMarketInput = { + id?: number + userId: number + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + } + + export type PositionCreateOrConnectWithoutMarketInput = { + where: PositionWhereUniqueInput + create: XOR + } + + export type PositionCreateManyMarketInputEnvelope = { + data: PositionCreateManyMarketInput | PositionCreateManyMarketInput[] + } + + export type WatchlistCreateWithoutMarketInput = { + alertThreshold?: number | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutWatchlistInput + } + + export type WatchlistUncheckedCreateWithoutMarketInput = { + id?: number + userId: number + alertThreshold?: number | null + createdAt?: Date | string + } + + export type WatchlistCreateOrConnectWithoutMarketInput = { + where: WatchlistWhereUniqueInput + create: XOR + } + + export type WatchlistCreateManyMarketInputEnvelope = { + data: WatchlistCreateManyMarketInput | WatchlistCreateManyMarketInput[] + } + + export type AlertCreateWithoutMarketInput = { + type: string + message: string + sentAt?: Date | string + user: UserCreateNestedOneWithoutAlertsInput + } + + export type AlertUncheckedCreateWithoutMarketInput = { + id?: number + userId: number + type: string + message: string + sentAt?: Date | string + } + + export type AlertCreateOrConnectWithoutMarketInput = { + where: AlertWhereUniqueInput + create: XOR + } + + export type AlertCreateManyMarketInputEnvelope = { + data: AlertCreateManyMarketInput | AlertCreateManyMarketInput[] + } + + export type AISignalUpsertWithWhereUniqueWithoutMarketInput = { + where: AISignalWhereUniqueInput + update: XOR + create: XOR + } + + export type AISignalUpdateWithWhereUniqueWithoutMarketInput = { + where: AISignalWhereUniqueInput + data: XOR + } + + export type AISignalUpdateManyWithWhereWithoutMarketInput = { + where: AISignalScalarWhereInput + data: XOR + } + + export type AISignalScalarWhereInput = { + AND?: AISignalScalarWhereInput | AISignalScalarWhereInput[] + OR?: AISignalScalarWhereInput[] + NOT?: AISignalScalarWhereInput | AISignalScalarWhereInput[] + id?: IntFilter<"AISignal"> | number + marketId?: StringFilter<"AISignal"> | string + signal?: StringFilter<"AISignal"> | string + confidence?: FloatFilter<"AISignal"> | number + summary?: StringNullableFilter<"AISignal"> | string | null + keyRisk?: StringNullableFilter<"AISignal"> | string | null + newsCount?: IntFilter<"AISignal"> | number + modelVersion?: StringFilter<"AISignal"> | string + impliedProb?: FloatNullableFilter<"AISignal"> | number | null + fairProb?: FloatNullableFilter<"AISignal"> | number | null + edgePoints?: FloatNullableFilter<"AISignal"> | number | null + generatedAt?: DateTimeFilter<"AISignal"> | Date | string + } + + export type PositionUpsertWithWhereUniqueWithoutMarketInput = { + where: PositionWhereUniqueInput + update: XOR + create: XOR + } + + export type PositionUpdateWithWhereUniqueWithoutMarketInput = { + where: PositionWhereUniqueInput + data: XOR + } + + export type PositionUpdateManyWithWhereWithoutMarketInput = { + where: PositionScalarWhereInput + data: XOR + } + + export type WatchlistUpsertWithWhereUniqueWithoutMarketInput = { + where: WatchlistWhereUniqueInput + update: XOR + create: XOR + } + + export type WatchlistUpdateWithWhereUniqueWithoutMarketInput = { + where: WatchlistWhereUniqueInput + data: XOR + } + + export type WatchlistUpdateManyWithWhereWithoutMarketInput = { + where: WatchlistScalarWhereInput + data: XOR + } + + export type AlertUpsertWithWhereUniqueWithoutMarketInput = { + where: AlertWhereUniqueInput + update: XOR + create: XOR + } + + export type AlertUpdateWithWhereUniqueWithoutMarketInput = { + where: AlertWhereUniqueInput + data: XOR + } + + export type AlertUpdateManyWithWhereWithoutMarketInput = { + where: AlertScalarWhereInput + data: XOR + } + + export type MarketCreateWithoutSignalsInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + positions?: PositionCreateNestedManyWithoutMarketInput + watchlist?: WatchlistCreateNestedManyWithoutMarketInput + alerts?: AlertCreateNestedManyWithoutMarketInput + } + + export type MarketUncheckedCreateWithoutSignalsInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + positions?: PositionUncheckedCreateNestedManyWithoutMarketInput + watchlist?: WatchlistUncheckedCreateNestedManyWithoutMarketInput + alerts?: AlertUncheckedCreateNestedManyWithoutMarketInput + } + + export type MarketCreateOrConnectWithoutSignalsInput = { + where: MarketWhereUniqueInput + create: XOR + } + + export type MarketUpsertWithoutSignalsInput = { + update: XOR + create: XOR + where?: MarketWhereInput + } + + export type MarketUpdateToOneWithWhereWithoutSignalsInput = { + where?: MarketWhereInput + data: XOR + } + + export type MarketUpdateWithoutSignalsInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + positions?: PositionUpdateManyWithoutMarketNestedInput + watchlist?: WatchlistUpdateManyWithoutMarketNestedInput + alerts?: AlertUpdateManyWithoutMarketNestedInput + } + + export type MarketUncheckedUpdateWithoutSignalsInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + positions?: PositionUncheckedUpdateManyWithoutMarketNestedInput + watchlist?: WatchlistUncheckedUpdateManyWithoutMarketNestedInput + alerts?: AlertUncheckedUpdateManyWithoutMarketNestedInput + } + + export type UserCreateWithoutPositionsInput = { + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + watchlist?: WatchlistCreateNestedManyWithoutUserInput + alerts?: AlertCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutPositionsInput = { + id?: number + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + watchlist?: WatchlistUncheckedCreateNestedManyWithoutUserInput + alerts?: AlertUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutPositionsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type MarketCreateWithoutPositionsInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + signals?: AISignalCreateNestedManyWithoutMarketInput + watchlist?: WatchlistCreateNestedManyWithoutMarketInput + alerts?: AlertCreateNestedManyWithoutMarketInput + } + + export type MarketUncheckedCreateWithoutPositionsInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + signals?: AISignalUncheckedCreateNestedManyWithoutMarketInput + watchlist?: WatchlistUncheckedCreateNestedManyWithoutMarketInput + alerts?: AlertUncheckedCreateNestedManyWithoutMarketInput + } + + export type MarketCreateOrConnectWithoutPositionsInput = { + where: MarketWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutPositionsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutPositionsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutPositionsInput = { + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + watchlist?: WatchlistUpdateManyWithoutUserNestedInput + alerts?: AlertUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutPositionsInput = { + id?: IntFieldUpdateOperationsInput | number + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + watchlist?: WatchlistUncheckedUpdateManyWithoutUserNestedInput + alerts?: AlertUncheckedUpdateManyWithoutUserNestedInput + } + + export type MarketUpsertWithoutPositionsInput = { + update: XOR + create: XOR + where?: MarketWhereInput + } + + export type MarketUpdateToOneWithWhereWithoutPositionsInput = { + where?: MarketWhereInput + data: XOR + } + + export type MarketUpdateWithoutPositionsInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + signals?: AISignalUpdateManyWithoutMarketNestedInput + watchlist?: WatchlistUpdateManyWithoutMarketNestedInput + alerts?: AlertUpdateManyWithoutMarketNestedInput + } + + export type MarketUncheckedUpdateWithoutPositionsInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + signals?: AISignalUncheckedUpdateManyWithoutMarketNestedInput + watchlist?: WatchlistUncheckedUpdateManyWithoutMarketNestedInput + alerts?: AlertUncheckedUpdateManyWithoutMarketNestedInput + } + + export type UserCreateWithoutWatchlistInput = { + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + positions?: PositionCreateNestedManyWithoutUserInput + alerts?: AlertCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutWatchlistInput = { + id?: number + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + positions?: PositionUncheckedCreateNestedManyWithoutUserInput + alerts?: AlertUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutWatchlistInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type MarketCreateWithoutWatchlistInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + signals?: AISignalCreateNestedManyWithoutMarketInput + positions?: PositionCreateNestedManyWithoutMarketInput + alerts?: AlertCreateNestedManyWithoutMarketInput + } + + export type MarketUncheckedCreateWithoutWatchlistInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + signals?: AISignalUncheckedCreateNestedManyWithoutMarketInput + positions?: PositionUncheckedCreateNestedManyWithoutMarketInput + alerts?: AlertUncheckedCreateNestedManyWithoutMarketInput + } + + export type MarketCreateOrConnectWithoutWatchlistInput = { + where: MarketWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutWatchlistInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutWatchlistInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutWatchlistInput = { + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + positions?: PositionUpdateManyWithoutUserNestedInput + alerts?: AlertUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutWatchlistInput = { + id?: IntFieldUpdateOperationsInput | number + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + positions?: PositionUncheckedUpdateManyWithoutUserNestedInput + alerts?: AlertUncheckedUpdateManyWithoutUserNestedInput + } + + export type MarketUpsertWithoutWatchlistInput = { + update: XOR + create: XOR + where?: MarketWhereInput + } + + export type MarketUpdateToOneWithWhereWithoutWatchlistInput = { + where?: MarketWhereInput + data: XOR + } + + export type MarketUpdateWithoutWatchlistInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + signals?: AISignalUpdateManyWithoutMarketNestedInput + positions?: PositionUpdateManyWithoutMarketNestedInput + alerts?: AlertUpdateManyWithoutMarketNestedInput + } + + export type MarketUncheckedUpdateWithoutWatchlistInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + signals?: AISignalUncheckedUpdateManyWithoutMarketNestedInput + positions?: PositionUncheckedUpdateManyWithoutMarketNestedInput + alerts?: AlertUncheckedUpdateManyWithoutMarketNestedInput + } + + export type UserCreateWithoutAlertsInput = { + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + positions?: PositionCreateNestedManyWithoutUserInput + watchlist?: WatchlistCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutAlertsInput = { + id?: number + email: string + passwordHash: string + isActive?: boolean + telegramChatId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + positions?: PositionUncheckedCreateNestedManyWithoutUserInput + watchlist?: WatchlistUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutAlertsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type MarketCreateWithoutAlertsInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + signals?: AISignalCreateNestedManyWithoutMarketInput + positions?: PositionCreateNestedManyWithoutMarketInput + watchlist?: WatchlistCreateNestedManyWithoutMarketInput + } + + export type MarketUncheckedCreateWithoutAlertsInput = { + id: string + question: string + category?: string | null + countryCode?: string | null + yesPrice?: number | null + noPrice?: number | null + volumeEur?: number | null + liquidityEur?: number | null + spread?: number | null + bestBid?: number | null + bestAsk?: number | null + clobTokenId?: string | null + analyzable?: boolean + status?: string + closesAt?: Date | string | null + lastSynced?: Date | string + signals?: AISignalUncheckedCreateNestedManyWithoutMarketInput + positions?: PositionUncheckedCreateNestedManyWithoutMarketInput + watchlist?: WatchlistUncheckedCreateNestedManyWithoutMarketInput + } + + export type MarketCreateOrConnectWithoutAlertsInput = { + where: MarketWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutAlertsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutAlertsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutAlertsInput = { + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + positions?: PositionUpdateManyWithoutUserNestedInput + watchlist?: WatchlistUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutAlertsInput = { + id?: IntFieldUpdateOperationsInput | number + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + isActive?: BoolFieldUpdateOperationsInput | boolean + telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + positions?: PositionUncheckedUpdateManyWithoutUserNestedInput + watchlist?: WatchlistUncheckedUpdateManyWithoutUserNestedInput + } + + export type MarketUpsertWithoutAlertsInput = { + update: XOR + create: XOR + where?: MarketWhereInput + } + + export type MarketUpdateToOneWithWhereWithoutAlertsInput = { + where?: MarketWhereInput + data: XOR + } + + export type MarketUpdateWithoutAlertsInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + signals?: AISignalUpdateManyWithoutMarketNestedInput + positions?: PositionUpdateManyWithoutMarketNestedInput + watchlist?: WatchlistUpdateManyWithoutMarketNestedInput + } + + export type MarketUncheckedUpdateWithoutAlertsInput = { + id?: StringFieldUpdateOperationsInput | string + question?: StringFieldUpdateOperationsInput | string + category?: NullableStringFieldUpdateOperationsInput | string | null + countryCode?: NullableStringFieldUpdateOperationsInput | string | null + yesPrice?: NullableFloatFieldUpdateOperationsInput | number | null + noPrice?: NullableFloatFieldUpdateOperationsInput | number | null + volumeEur?: NullableFloatFieldUpdateOperationsInput | number | null + liquidityEur?: NullableFloatFieldUpdateOperationsInput | number | null + spread?: NullableFloatFieldUpdateOperationsInput | number | null + bestBid?: NullableFloatFieldUpdateOperationsInput | number | null + bestAsk?: NullableFloatFieldUpdateOperationsInput | number | null + clobTokenId?: NullableStringFieldUpdateOperationsInput | string | null + analyzable?: BoolFieldUpdateOperationsInput | boolean + status?: StringFieldUpdateOperationsInput | string + closesAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSynced?: DateTimeFieldUpdateOperationsInput | Date | string + signals?: AISignalUncheckedUpdateManyWithoutMarketNestedInput + positions?: PositionUncheckedUpdateManyWithoutMarketNestedInput + watchlist?: WatchlistUncheckedUpdateManyWithoutMarketNestedInput + } + + export type PositionCreateManyUserInput = { + id?: number + marketId: string + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + } + + export type WatchlistCreateManyUserInput = { + id?: number + marketId: string + alertThreshold?: number | null + createdAt?: Date | string + } + + export type AlertCreateManyUserInput = { + id?: number + marketId: string + type: string + message: string + sentAt?: Date | string + } + + export type PositionUpdateWithoutUserInput = { + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + market?: MarketUpdateOneRequiredWithoutPositionsNestedInput + } + + export type PositionUncheckedUpdateWithoutUserInput = { + id?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type PositionUncheckedUpdateManyWithoutUserInput = { + id?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type WatchlistUpdateWithoutUserInput = { + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + market?: MarketUpdateOneRequiredWithoutWatchlistNestedInput + } + + export type WatchlistUncheckedUpdateWithoutUserInput = { + id?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WatchlistUncheckedUpdateManyWithoutUserInput = { + id?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AlertUpdateWithoutUserInput = { + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + market?: MarketUpdateOneRequiredWithoutAlertsNestedInput + } + + export type AlertUncheckedUpdateWithoutUserInput = { + id?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AlertUncheckedUpdateManyWithoutUserInput = { + id?: IntFieldUpdateOperationsInput | number + marketId?: StringFieldUpdateOperationsInput | string + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AISignalCreateManyMarketInput = { + id?: number + signal: string + confidence: number + summary?: string | null + keyRisk?: string | null + newsCount?: number + modelVersion?: string + impliedProb?: number | null + fairProb?: number | null + edgePoints?: number | null + generatedAt?: Date | string + } + + export type PositionCreateManyMarketInput = { + id?: number + userId: number + outcome: string + amountEur: number + entryPrice: number + currentPrice?: number | null + pnl?: number + kellyFraction?: number | null + status?: string + openedAt?: Date | string + closedAt?: Date | string | null + } + + export type WatchlistCreateManyMarketInput = { + id?: number + userId: number + alertThreshold?: number | null + createdAt?: Date | string + } + + export type AlertCreateManyMarketInput = { + id?: number + userId: number + type: string + message: string + sentAt?: Date | string + } + + export type AISignalUpdateWithoutMarketInput = { + signal?: StringFieldUpdateOperationsInput | string + confidence?: FloatFieldUpdateOperationsInput | number + summary?: NullableStringFieldUpdateOperationsInput | string | null + keyRisk?: NullableStringFieldUpdateOperationsInput | string | null + newsCount?: IntFieldUpdateOperationsInput | number + modelVersion?: StringFieldUpdateOperationsInput | string + impliedProb?: NullableFloatFieldUpdateOperationsInput | number | null + fairProb?: NullableFloatFieldUpdateOperationsInput | number | null + edgePoints?: NullableFloatFieldUpdateOperationsInput | number | null + generatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AISignalUncheckedUpdateWithoutMarketInput = { + id?: IntFieldUpdateOperationsInput | number + signal?: StringFieldUpdateOperationsInput | string + confidence?: FloatFieldUpdateOperationsInput | number + summary?: NullableStringFieldUpdateOperationsInput | string | null + keyRisk?: NullableStringFieldUpdateOperationsInput | string | null + newsCount?: IntFieldUpdateOperationsInput | number + modelVersion?: StringFieldUpdateOperationsInput | string + impliedProb?: NullableFloatFieldUpdateOperationsInput | number | null + fairProb?: NullableFloatFieldUpdateOperationsInput | number | null + edgePoints?: NullableFloatFieldUpdateOperationsInput | number | null + generatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AISignalUncheckedUpdateManyWithoutMarketInput = { + id?: IntFieldUpdateOperationsInput | number + signal?: StringFieldUpdateOperationsInput | string + confidence?: FloatFieldUpdateOperationsInput | number + summary?: NullableStringFieldUpdateOperationsInput | string | null + keyRisk?: NullableStringFieldUpdateOperationsInput | string | null + newsCount?: IntFieldUpdateOperationsInput | number + modelVersion?: StringFieldUpdateOperationsInput | string + impliedProb?: NullableFloatFieldUpdateOperationsInput | number | null + fairProb?: NullableFloatFieldUpdateOperationsInput | number | null + edgePoints?: NullableFloatFieldUpdateOperationsInput | number | null + generatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PositionUpdateWithoutMarketInput = { + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutPositionsNestedInput + } + + export type PositionUncheckedUpdateWithoutMarketInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type PositionUncheckedUpdateManyWithoutMarketInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + outcome?: StringFieldUpdateOperationsInput | string + amountEur?: FloatFieldUpdateOperationsInput | number + entryPrice?: FloatFieldUpdateOperationsInput | number + currentPrice?: NullableFloatFieldUpdateOperationsInput | number | null + pnl?: FloatFieldUpdateOperationsInput | number + kellyFraction?: NullableFloatFieldUpdateOperationsInput | number | null + status?: StringFieldUpdateOperationsInput | string + openedAt?: DateTimeFieldUpdateOperationsInput | Date | string + closedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type WatchlistUpdateWithoutMarketInput = { + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutWatchlistNestedInput + } + + export type WatchlistUncheckedUpdateWithoutMarketInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type WatchlistUncheckedUpdateManyWithoutMarketInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + alertThreshold?: NullableFloatFieldUpdateOperationsInput | number | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AlertUpdateWithoutMarketInput = { + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutAlertsNestedInput + } + + export type AlertUncheckedUpdateWithoutMarketInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AlertUncheckedUpdateManyWithoutMarketInput = { + id?: IntFieldUpdateOperationsInput | number + userId?: IntFieldUpdateOperationsInput | number + type?: StringFieldUpdateOperationsInput | string + message?: StringFieldUpdateOperationsInput | string + sentAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + + + /** + * Batch Payload for updateMany & deleteMany & createMany + */ + + export type BatchPayload = { + count: number + } + + /** + * DMMF + */ + export const dmmf: runtime.BaseDMMF +} \ No newline at end of file