
/**
 * Client
**/

import * as runtime from './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<T> = $Public.PrismaPromise<T>


/**
 * Model GeneralDocument
 * 
 */
export type GeneralDocument = $Result.DefaultSelection<Prisma.$GeneralDocumentPayload>
/**
 * Model FirmDocument
 * 
 */
export type FirmDocument = $Result.DefaultSelection<Prisma.$FirmDocumentPayload>
/**
 * Model Literals
 * 
 */
export type Literals = $Result.DefaultSelection<Prisma.$LiteralsPayload>
/**
 * Model TelegramUser
 * 
 */
export type TelegramUser = $Result.DefaultSelection<Prisma.$TelegramUserPayload>
/**
 * Model Conversation
 * 
 */
export type Conversation = $Result.DefaultSelection<Prisma.$ConversationPayload>
/**
 * Model Message
 * 
 */
export type Message = $Result.DefaultSelection<Prisma.$MessagePayload>
/**
 * Model Wallet
 * 
 */
export type Wallet = $Result.DefaultSelection<Prisma.$WalletPayload>
/**
 * Model Product
 * 
 */
export type Product = $Result.DefaultSelection<Prisma.$ProductPayload>
/**
 * Model UserProduct
 * 
 */
export type UserProduct = $Result.DefaultSelection<Prisma.$UserProductPayload>
/**
 * Model UserTransaction
 * 
 */
export type UserTransaction = $Result.DefaultSelection<Prisma.$UserTransactionPayload>
/**
 * Model UserBotState
 * 
 */
export type UserBotState = $Result.DefaultSelection<Prisma.$UserBotStatePayload>
/**
 * Model UserTicket
 * 
 */
export type UserTicket = $Result.DefaultSelection<Prisma.$UserTicketPayload>
/**
 * Model PanelSetting
 * 
 */
export type PanelSetting = $Result.DefaultSelection<Prisma.$PanelSettingPayload>

/**
 * Enums
 */
export namespace $Enums {
  export const RespondentType: {
  ai: 'ai',
  admin: 'admin'
};

export type RespondentType = (typeof RespondentType)[keyof typeof RespondentType]


export const ChallengeStatus: {
  CONFIRMED: 'CONFIRMED',
  FAILED: 'FAILED',
  PENDING: 'PENDING',
  WORKING: 'WORKING'
};

export type ChallengeStatus = (typeof ChallengeStatus)[keyof typeof ChallengeStatus]


export const TransactionNetwork: {
  TRC20: 'TRC20',
  BEP20: 'BEP20'
};

export type TransactionNetwork = (typeof TransactionNetwork)[keyof typeof TransactionNetwork]


export const TransactionStatus: {
  PENDING: 'PENDING',
  SUCCESS: 'SUCCESS',
  FAILED: 'FAILED'
};

export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus]

}

export type RespondentType = $Enums.RespondentType

export const RespondentType: typeof $Enums.RespondentType

export type ChallengeStatus = $Enums.ChallengeStatus

export const ChallengeStatus: typeof $Enums.ChallengeStatus

export type TransactionNetwork = $Enums.TransactionNetwork

export const TransactionNetwork: typeof $Enums.TransactionNetwork

export type TransactionStatus = $Enums.TransactionStatus

export const TransactionStatus: typeof $Enums.TransactionStatus

/**
 * ##  Prisma Client ʲˢ
 *
 * Type-safe database client for TypeScript & Node.js
 * @example
 * ```
 * const prisma = new PrismaClient()
 * // Fetch zero or more GeneralDocuments
 * const generalDocuments = await prisma.generalDocument.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,
  U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never,
  ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs
> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }

    /**
   * ##  Prisma Client ʲˢ
   *
   * Type-safe database client for TypeScript & Node.js
   * @example
   * ```
   * const prisma = new PrismaClient()
   * // Fetch zero or more GeneralDocuments
   * const generalDocuments = await prisma.generalDocument.findMany()
   * ```
   *
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
   */

  constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
  $on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;

  /**
   * Connect with the database
   */
  $connect(): $Utils.JsPromise<void>;

  /**
   * Disconnect from the database
   */
  $disconnect(): $Utils.JsPromise<void>;

  /**
   * Add a middleware
   * @deprecated since 4.16.0. For new code, prefer client extensions instead.
   * @see https://pris.ly/d/extensions
   */
  $use(cb: Prisma.Middleware): void

/**
   * Executes a prepared raw query and returns the number of affected rows.
   * @example
   * ```
   * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;

  /**
   * Executes a raw query and returns the number of affected rows.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;

  /**
   * Performs a prepared raw query and returns the `SELECT` data.
   * @example
   * ```
   * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;

  /**
   * Performs a raw query and returns the `SELECT` data.
   * Susceptible to SQL injections, see documentation.
   * @example
   * ```
   * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
   * ```
   *
   * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
   */
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;


  /**
   * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
   * @example
   * ```
   * const [george, bob, alice] = await prisma.$transaction([
   *   prisma.user.create({ data: { name: 'George' } }),
   *   prisma.user.create({ data: { name: 'Bob' } }),
   *   prisma.user.create({ data: { name: 'Alice' } }),
   * ])
   * ```
   * 
   * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
   */
  $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>

  $transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => $Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise<R>


  $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<ClientOptions>, ExtArgs, $Utils.Call<Prisma.TypeMapCb<ClientOptions>, {
    extArgs: ExtArgs
  }>>

      /**
   * `prisma.generalDocument`: Exposes CRUD operations for the **GeneralDocument** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more GeneralDocuments
    * const generalDocuments = await prisma.generalDocument.findMany()
    * ```
    */
  get generalDocument(): Prisma.GeneralDocumentDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.firmDocument`: Exposes CRUD operations for the **FirmDocument** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more FirmDocuments
    * const firmDocuments = await prisma.firmDocument.findMany()
    * ```
    */
  get firmDocument(): Prisma.FirmDocumentDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.literals`: Exposes CRUD operations for the **Literals** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Literals
    * const literals = await prisma.literals.findMany()
    * ```
    */
  get literals(): Prisma.LiteralsDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.telegramUser`: Exposes CRUD operations for the **TelegramUser** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more TelegramUsers
    * const telegramUsers = await prisma.telegramUser.findMany()
    * ```
    */
  get telegramUser(): Prisma.TelegramUserDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.conversation`: Exposes CRUD operations for the **Conversation** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Conversations
    * const conversations = await prisma.conversation.findMany()
    * ```
    */
  get conversation(): Prisma.ConversationDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.message`: Exposes CRUD operations for the **Message** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Messages
    * const messages = await prisma.message.findMany()
    * ```
    */
  get message(): Prisma.MessageDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.wallet`: Exposes CRUD operations for the **Wallet** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Wallets
    * const wallets = await prisma.wallet.findMany()
    * ```
    */
  get wallet(): Prisma.WalletDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.product`: Exposes CRUD operations for the **Product** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Products
    * const products = await prisma.product.findMany()
    * ```
    */
  get product(): Prisma.ProductDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.userProduct`: Exposes CRUD operations for the **UserProduct** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more UserProducts
    * const userProducts = await prisma.userProduct.findMany()
    * ```
    */
  get userProduct(): Prisma.UserProductDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.userTransaction`: Exposes CRUD operations for the **UserTransaction** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more UserTransactions
    * const userTransactions = await prisma.userTransaction.findMany()
    * ```
    */
  get userTransaction(): Prisma.UserTransactionDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.userBotState`: Exposes CRUD operations for the **UserBotState** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more UserBotStates
    * const userBotStates = await prisma.userBotState.findMany()
    * ```
    */
  get userBotState(): Prisma.UserBotStateDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.userTicket`: Exposes CRUD operations for the **UserTicket** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more UserTickets
    * const userTickets = await prisma.userTicket.findMany()
    * ```
    */
  get userTicket(): Prisma.UserTicketDelegate<ExtArgs, ClientOptions>;

  /**
   * `prisma.panelSetting`: Exposes CRUD operations for the **PanelSetting** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more PanelSettings
    * const panelSettings = await prisma.panelSetting.findMany()
    * ```
    */
  get panelSetting(): Prisma.PanelSettingDelegate<ExtArgs, ClientOptions>;
}

export namespace Prisma {
  export import DMMF = runtime.DMMF

  export type PrismaPromise<T> = $Public.PrismaPromise<T>

  /**
   * 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<T> = runtime.Metric<T>
  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.7.0
   * Query Engine version: 3cff47a7f5d65c3ea74883f1d736e41d68ce91ed
   */
  export type PrismaVersion = {
    client: string
  }

  export const prismaVersion: PrismaVersion

  /**
   * Utility Types
   */


  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<any>> = T extends PromiseLike<infer U> ? U : T;

  /**
   * Get the return type of a function which returns a Promise.
   */
  export type PromiseReturnType<T extends (...args: any) => $Utils.JsPromise<any>> = PromiseType<ReturnType<T>>

  /**
   * From T, pick a set of properties whose keys are in the union K
   */
  type Prisma__Pick<T, K extends keyof T> = {
      [P in K]: T[P];
  };


  export type Enumerable<T> = T | Array<T>;

  export type RequiredKeys<T> = {
    [K in keyof T]-?: {} extends Prisma__Pick<T, K> ? never : K
  }[keyof T]

  export type TruthyKeys<T> = keyof {
    [K in keyof T as T[K] extends false | undefined | null ? never : K]: K
  }

  export type TrueKeys<T> = TruthyKeys<Prisma__Pick<T, RequiredKeys<T>>>

  /**
   * Subset
   * @desc From `T` pick properties that exist in `U`. Simple version of Intersection
   */
  export type Subset<T, U> = {
    [key in keyof T]: key extends keyof U ? T[key] : never;
  };

  /**
   * SelectSubset
   * @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
   * Additionally, it validates, if both select and include are present. If the case, it errors.
   */
  export type SelectSubset<T, U> = {
    [key in keyof T]: key extends keyof U ? T[key] : never
  } &
    (T extends SelectAndInclude
      ? 'Please either choose `select` or `include`.'
      : 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<T, U, K> = {
    [key in keyof T]: key extends keyof U ? T[key] : never
  } &
    K

  type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };

  /**
   * XOR is needed to have a real mutually exclusive union type
   * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
   */
  type XOR<T, U> =
    T extends object ?
    U extends object ?
      (Without<T, U> & U) | (Without<U, T> & T)
    : U : T


  /**
   * Is T a Record?
   */
  type IsObject<T extends any> = T extends Array<any>
  ? False
  : T extends Date
  ? False
  : T extends Uint8Array
  ? False
  : T extends BigInt
  ? False
  : T extends object
  ? True
  : False


  /**
   * If it's T[], return T
   */
  export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T

  /**
   * From ts-toolbelt
   */

  type __Either<O extends object, K extends Key> = Omit<O, K> &
    {
      // Merge all but K
      [P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
    }[K]

  type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>

  type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>

  type _Either<
    O extends object,
    K extends Key,
    strict extends Boolean
  > = {
    1: EitherStrict<O, K>
    0: EitherLoose<O, K>
  }[strict]

  type Either<
    O extends object,
    K extends Key,
    strict extends Boolean = 1
  > = O extends unknown ? _Either<O, K, strict> : never

  export type Union = any

  type PatchUndefined<O extends object, O1 extends object> = {
    [K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
  } & {}

  /** Helper Types for "Merge" **/
  export type IntersectOf<U extends Union> = (
    U extends unknown ? (k: U) => void : never
  ) extends (k: infer I) => void
    ? I
    : never

  export type Overwrite<O extends object, O1 extends object> = {
      [K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
  } & {};

  type _Merge<U extends object> = IntersectOf<Overwrite<U, {
      [K in keyof U]-?: At<U, K>;
  }>>;

  type Key = string | number | symbol;
  type AtBasic<O extends object, K extends Key> = K extends keyof O ? O[K] : never;
  type AtStrict<O extends object, K extends Key> = O[K & keyof O];
  type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
  export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
      1: AtStrict<O, K>;
      0: AtLoose<O, K>;
  }[strict];

  export type ComputeRaw<A extends any> = A extends Function ? A : {
    [K in keyof A]: A[K];
  } & {};

  export type OptionalFlat<O> = {
    [K in keyof O]?: O[K];
  } & {};

  type _Record<K extends keyof any, T> = {
    [P in K]: T;
  };

  // cause typescript not to expand types and preserve names
  type NoExpand<T> = T extends unknown ? T : never;

  // this type assumes the passed object is entirely optional
  type AtLeast<O extends object, K extends string> = NoExpand<
    O extends unknown
    ? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
      | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O
    : never>;

  type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;

  export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
  /** End Helper Types for "Merge" **/

  export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;

  /**
  A [[Boolean]]
  */
  export type Boolean = True | False

  // /**
  // 1
  // */
  export type True = 1

  /**
  0
  */
  export type False = 0

  export type Not<B extends Boolean> = {
    0: 1
    1: 0
  }[B]

  export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
    ? 0 // anything `never` is false
    : A1 extends A2
    ? 1
    : 0

  export type Has<U extends Union, U1 extends Union> = Not<
    Extends<Exclude<U1, U>, U1>
  >

  export type Or<B1 extends Boolean, B2 extends Boolean> = {
    0: {
      0: 0
      1: 1
    }
    1: {
      0: 1
      1: 1
    }
  }[B1][B2]

  export type Keys<U extends Union> = U extends unknown ? keyof U : never

  type Cast<A, B> = A extends B ? A : B;

  export const type: unique symbol;



  /**
   * Used by group by
   */

  export type GetScalarType<T, O> = O extends object ? {
    [P in keyof T]: P extends keyof O
      ? O[P]
      : never
  } : never

  type FieldPaths<
    T,
    U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
  > = IsObject<T> extends True ? U : T

  type GetHavingFields<T> = {
    [K in keyof T]: Or<
      Or<Extends<'OR', K>, Extends<'AND', K>>,
      Extends<'NOT', K>
    > extends True
      ? // infer is only needed to not hit TS limit
        // based on the brilliant idea of Pierre-Antoine Mills
        // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
        T[K] extends infer TK
        ? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
        : never
      : {} extends FieldPaths<T[K]>
      ? never
      : K
  }[keyof T]

  /**
   * Convert tuple to union
   */
  type _TupleToUnion<T> = T extends (infer E)[] ? E : never
  type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
  type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T

  /**
   * Like `Pick`, but additionally can also accept an array of keys
   */
  type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>

  /**
   * Exclude all keys with underscores
   */
  type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T


  export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>

  type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>


  export const ModelName: {
    GeneralDocument: 'GeneralDocument',
    FirmDocument: 'FirmDocument',
    Literals: 'Literals',
    TelegramUser: 'TelegramUser',
    Conversation: 'Conversation',
    Message: 'Message',
    Wallet: 'Wallet',
    Product: 'Product',
    UserProduct: 'UserProduct',
    UserTransaction: 'UserTransaction',
    UserBotState: 'UserBotState',
    UserTicket: 'UserTicket',
    PanelSetting: 'PanelSetting'
  };

  export type ModelName = (typeof ModelName)[keyof typeof ModelName]


  export type Datasources = {
    db?: Datasource
  }

  interface TypeMapCb<ClientOptions = {}> extends $Utils.Fn<{extArgs: $Extensions.InternalArgs }, $Utils.Record<string, any>> {
    returns: Prisma.TypeMap<this['params']['extArgs'], ClientOptions extends { omit: infer OmitOptions } ? OmitOptions : {}>
  }

  export type TypeMap<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> = {
    globalOmitOptions: {
      omit: GlobalOmitOptions
    }
    meta: {
      modelProps: "generalDocument" | "firmDocument" | "literals" | "telegramUser" | "conversation" | "message" | "wallet" | "product" | "userProduct" | "userTransaction" | "userBotState" | "userTicket" | "panelSetting"
      txIsolationLevel: Prisma.TransactionIsolationLevel
    }
    model: {
      GeneralDocument: {
        payload: Prisma.$GeneralDocumentPayload<ExtArgs>
        fields: Prisma.GeneralDocumentFieldRefs
        operations: {
          findUnique: {
            args: Prisma.GeneralDocumentFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.GeneralDocumentFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>
          }
          findFirst: {
            args: Prisma.GeneralDocumentFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.GeneralDocumentFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>
          }
          findMany: {
            args: Prisma.GeneralDocumentFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>[]
          }
          create: {
            args: Prisma.GeneralDocumentCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>
          }
          createMany: {
            args: Prisma.GeneralDocumentCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.GeneralDocumentCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>[]
          }
          delete: {
            args: Prisma.GeneralDocumentDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>
          }
          update: {
            args: Prisma.GeneralDocumentUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>
          }
          deleteMany: {
            args: Prisma.GeneralDocumentDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.GeneralDocumentUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.GeneralDocumentUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>[]
          }
          upsert: {
            args: Prisma.GeneralDocumentUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$GeneralDocumentPayload>
          }
          aggregate: {
            args: Prisma.GeneralDocumentAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateGeneralDocument>
          }
          groupBy: {
            args: Prisma.GeneralDocumentGroupByArgs<ExtArgs>
            result: $Utils.Optional<GeneralDocumentGroupByOutputType>[]
          }
          count: {
            args: Prisma.GeneralDocumentCountArgs<ExtArgs>
            result: $Utils.Optional<GeneralDocumentCountAggregateOutputType> | number
          }
        }
      }
      FirmDocument: {
        payload: Prisma.$FirmDocumentPayload<ExtArgs>
        fields: Prisma.FirmDocumentFieldRefs
        operations: {
          findUnique: {
            args: Prisma.FirmDocumentFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.FirmDocumentFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>
          }
          findFirst: {
            args: Prisma.FirmDocumentFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.FirmDocumentFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>
          }
          findMany: {
            args: Prisma.FirmDocumentFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>[]
          }
          create: {
            args: Prisma.FirmDocumentCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>
          }
          createMany: {
            args: Prisma.FirmDocumentCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.FirmDocumentCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>[]
          }
          delete: {
            args: Prisma.FirmDocumentDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>
          }
          update: {
            args: Prisma.FirmDocumentUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>
          }
          deleteMany: {
            args: Prisma.FirmDocumentDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.FirmDocumentUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.FirmDocumentUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>[]
          }
          upsert: {
            args: Prisma.FirmDocumentUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$FirmDocumentPayload>
          }
          aggregate: {
            args: Prisma.FirmDocumentAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateFirmDocument>
          }
          groupBy: {
            args: Prisma.FirmDocumentGroupByArgs<ExtArgs>
            result: $Utils.Optional<FirmDocumentGroupByOutputType>[]
          }
          count: {
            args: Prisma.FirmDocumentCountArgs<ExtArgs>
            result: $Utils.Optional<FirmDocumentCountAggregateOutputType> | number
          }
        }
      }
      Literals: {
        payload: Prisma.$LiteralsPayload<ExtArgs>
        fields: Prisma.LiteralsFieldRefs
        operations: {
          findUnique: {
            args: Prisma.LiteralsFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.LiteralsFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>
          }
          findFirst: {
            args: Prisma.LiteralsFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.LiteralsFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>
          }
          findMany: {
            args: Prisma.LiteralsFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>[]
          }
          create: {
            args: Prisma.LiteralsCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>
          }
          createMany: {
            args: Prisma.LiteralsCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.LiteralsCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>[]
          }
          delete: {
            args: Prisma.LiteralsDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>
          }
          update: {
            args: Prisma.LiteralsUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>
          }
          deleteMany: {
            args: Prisma.LiteralsDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.LiteralsUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.LiteralsUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>[]
          }
          upsert: {
            args: Prisma.LiteralsUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$LiteralsPayload>
          }
          aggregate: {
            args: Prisma.LiteralsAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateLiterals>
          }
          groupBy: {
            args: Prisma.LiteralsGroupByArgs<ExtArgs>
            result: $Utils.Optional<LiteralsGroupByOutputType>[]
          }
          count: {
            args: Prisma.LiteralsCountArgs<ExtArgs>
            result: $Utils.Optional<LiteralsCountAggregateOutputType> | number
          }
        }
      }
      TelegramUser: {
        payload: Prisma.$TelegramUserPayload<ExtArgs>
        fields: Prisma.TelegramUserFieldRefs
        operations: {
          findUnique: {
            args: Prisma.TelegramUserFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.TelegramUserFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>
          }
          findFirst: {
            args: Prisma.TelegramUserFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.TelegramUserFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>
          }
          findMany: {
            args: Prisma.TelegramUserFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>[]
          }
          create: {
            args: Prisma.TelegramUserCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>
          }
          createMany: {
            args: Prisma.TelegramUserCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.TelegramUserCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>[]
          }
          delete: {
            args: Prisma.TelegramUserDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>
          }
          update: {
            args: Prisma.TelegramUserUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>
          }
          deleteMany: {
            args: Prisma.TelegramUserDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.TelegramUserUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.TelegramUserUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>[]
          }
          upsert: {
            args: Prisma.TelegramUserUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$TelegramUserPayload>
          }
          aggregate: {
            args: Prisma.TelegramUserAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateTelegramUser>
          }
          groupBy: {
            args: Prisma.TelegramUserGroupByArgs<ExtArgs>
            result: $Utils.Optional<TelegramUserGroupByOutputType>[]
          }
          count: {
            args: Prisma.TelegramUserCountArgs<ExtArgs>
            result: $Utils.Optional<TelegramUserCountAggregateOutputType> | number
          }
        }
      }
      Conversation: {
        payload: Prisma.$ConversationPayload<ExtArgs>
        fields: Prisma.ConversationFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ConversationFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ConversationFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>
          }
          findFirst: {
            args: Prisma.ConversationFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ConversationFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>
          }
          findMany: {
            args: Prisma.ConversationFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>[]
          }
          create: {
            args: Prisma.ConversationCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>
          }
          createMany: {
            args: Prisma.ConversationCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.ConversationCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>[]
          }
          delete: {
            args: Prisma.ConversationDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>
          }
          update: {
            args: Prisma.ConversationUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>
          }
          deleteMany: {
            args: Prisma.ConversationDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ConversationUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.ConversationUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>[]
          }
          upsert: {
            args: Prisma.ConversationUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ConversationPayload>
          }
          aggregate: {
            args: Prisma.ConversationAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateConversation>
          }
          groupBy: {
            args: Prisma.ConversationGroupByArgs<ExtArgs>
            result: $Utils.Optional<ConversationGroupByOutputType>[]
          }
          count: {
            args: Prisma.ConversationCountArgs<ExtArgs>
            result: $Utils.Optional<ConversationCountAggregateOutputType> | number
          }
        }
      }
      Message: {
        payload: Prisma.$MessagePayload<ExtArgs>
        fields: Prisma.MessageFieldRefs
        operations: {
          findUnique: {
            args: Prisma.MessageFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.MessageFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>
          }
          findFirst: {
            args: Prisma.MessageFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.MessageFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>
          }
          findMany: {
            args: Prisma.MessageFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>[]
          }
          create: {
            args: Prisma.MessageCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>
          }
          createMany: {
            args: Prisma.MessageCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.MessageCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>[]
          }
          delete: {
            args: Prisma.MessageDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>
          }
          update: {
            args: Prisma.MessageUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>
          }
          deleteMany: {
            args: Prisma.MessageDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.MessageUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.MessageUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>[]
          }
          upsert: {
            args: Prisma.MessageUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$MessagePayload>
          }
          aggregate: {
            args: Prisma.MessageAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateMessage>
          }
          groupBy: {
            args: Prisma.MessageGroupByArgs<ExtArgs>
            result: $Utils.Optional<MessageGroupByOutputType>[]
          }
          count: {
            args: Prisma.MessageCountArgs<ExtArgs>
            result: $Utils.Optional<MessageCountAggregateOutputType> | number
          }
        }
      }
      Wallet: {
        payload: Prisma.$WalletPayload<ExtArgs>
        fields: Prisma.WalletFieldRefs
        operations: {
          findUnique: {
            args: Prisma.WalletFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.WalletFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>
          }
          findFirst: {
            args: Prisma.WalletFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.WalletFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>
          }
          findMany: {
            args: Prisma.WalletFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>[]
          }
          create: {
            args: Prisma.WalletCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>
          }
          createMany: {
            args: Prisma.WalletCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.WalletCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>[]
          }
          delete: {
            args: Prisma.WalletDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>
          }
          update: {
            args: Prisma.WalletUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>
          }
          deleteMany: {
            args: Prisma.WalletDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.WalletUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.WalletUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>[]
          }
          upsert: {
            args: Prisma.WalletUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$WalletPayload>
          }
          aggregate: {
            args: Prisma.WalletAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateWallet>
          }
          groupBy: {
            args: Prisma.WalletGroupByArgs<ExtArgs>
            result: $Utils.Optional<WalletGroupByOutputType>[]
          }
          count: {
            args: Prisma.WalletCountArgs<ExtArgs>
            result: $Utils.Optional<WalletCountAggregateOutputType> | number
          }
        }
      }
      Product: {
        payload: Prisma.$ProductPayload<ExtArgs>
        fields: Prisma.ProductFieldRefs
        operations: {
          findUnique: {
            args: Prisma.ProductFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.ProductFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>
          }
          findFirst: {
            args: Prisma.ProductFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.ProductFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>
          }
          findMany: {
            args: Prisma.ProductFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>[]
          }
          create: {
            args: Prisma.ProductCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>
          }
          createMany: {
            args: Prisma.ProductCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.ProductCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>[]
          }
          delete: {
            args: Prisma.ProductDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>
          }
          update: {
            args: Prisma.ProductUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>
          }
          deleteMany: {
            args: Prisma.ProductDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.ProductUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.ProductUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>[]
          }
          upsert: {
            args: Prisma.ProductUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$ProductPayload>
          }
          aggregate: {
            args: Prisma.ProductAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateProduct>
          }
          groupBy: {
            args: Prisma.ProductGroupByArgs<ExtArgs>
            result: $Utils.Optional<ProductGroupByOutputType>[]
          }
          count: {
            args: Prisma.ProductCountArgs<ExtArgs>
            result: $Utils.Optional<ProductCountAggregateOutputType> | number
          }
        }
      }
      UserProduct: {
        payload: Prisma.$UserProductPayload<ExtArgs>
        fields: Prisma.UserProductFieldRefs
        operations: {
          findUnique: {
            args: Prisma.UserProductFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.UserProductFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>
          }
          findFirst: {
            args: Prisma.UserProductFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.UserProductFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>
          }
          findMany: {
            args: Prisma.UserProductFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>[]
          }
          create: {
            args: Prisma.UserProductCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>
          }
          createMany: {
            args: Prisma.UserProductCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.UserProductCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>[]
          }
          delete: {
            args: Prisma.UserProductDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>
          }
          update: {
            args: Prisma.UserProductUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>
          }
          deleteMany: {
            args: Prisma.UserProductDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.UserProductUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.UserProductUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>[]
          }
          upsert: {
            args: Prisma.UserProductUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserProductPayload>
          }
          aggregate: {
            args: Prisma.UserProductAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateUserProduct>
          }
          groupBy: {
            args: Prisma.UserProductGroupByArgs<ExtArgs>
            result: $Utils.Optional<UserProductGroupByOutputType>[]
          }
          count: {
            args: Prisma.UserProductCountArgs<ExtArgs>
            result: $Utils.Optional<UserProductCountAggregateOutputType> | number
          }
        }
      }
      UserTransaction: {
        payload: Prisma.$UserTransactionPayload<ExtArgs>
        fields: Prisma.UserTransactionFieldRefs
        operations: {
          findUnique: {
            args: Prisma.UserTransactionFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.UserTransactionFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>
          }
          findFirst: {
            args: Prisma.UserTransactionFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.UserTransactionFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>
          }
          findMany: {
            args: Prisma.UserTransactionFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>[]
          }
          create: {
            args: Prisma.UserTransactionCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>
          }
          createMany: {
            args: Prisma.UserTransactionCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.UserTransactionCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>[]
          }
          delete: {
            args: Prisma.UserTransactionDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>
          }
          update: {
            args: Prisma.UserTransactionUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>
          }
          deleteMany: {
            args: Prisma.UserTransactionDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.UserTransactionUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.UserTransactionUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>[]
          }
          upsert: {
            args: Prisma.UserTransactionUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTransactionPayload>
          }
          aggregate: {
            args: Prisma.UserTransactionAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateUserTransaction>
          }
          groupBy: {
            args: Prisma.UserTransactionGroupByArgs<ExtArgs>
            result: $Utils.Optional<UserTransactionGroupByOutputType>[]
          }
          count: {
            args: Prisma.UserTransactionCountArgs<ExtArgs>
            result: $Utils.Optional<UserTransactionCountAggregateOutputType> | number
          }
        }
      }
      UserBotState: {
        payload: Prisma.$UserBotStatePayload<ExtArgs>
        fields: Prisma.UserBotStateFieldRefs
        operations: {
          findUnique: {
            args: Prisma.UserBotStateFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.UserBotStateFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>
          }
          findFirst: {
            args: Prisma.UserBotStateFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.UserBotStateFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>
          }
          findMany: {
            args: Prisma.UserBotStateFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>[]
          }
          create: {
            args: Prisma.UserBotStateCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>
          }
          createMany: {
            args: Prisma.UserBotStateCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.UserBotStateCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>[]
          }
          delete: {
            args: Prisma.UserBotStateDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>
          }
          update: {
            args: Prisma.UserBotStateUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>
          }
          deleteMany: {
            args: Prisma.UserBotStateDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.UserBotStateUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.UserBotStateUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>[]
          }
          upsert: {
            args: Prisma.UserBotStateUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserBotStatePayload>
          }
          aggregate: {
            args: Prisma.UserBotStateAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateUserBotState>
          }
          groupBy: {
            args: Prisma.UserBotStateGroupByArgs<ExtArgs>
            result: $Utils.Optional<UserBotStateGroupByOutputType>[]
          }
          count: {
            args: Prisma.UserBotStateCountArgs<ExtArgs>
            result: $Utils.Optional<UserBotStateCountAggregateOutputType> | number
          }
        }
      }
      UserTicket: {
        payload: Prisma.$UserTicketPayload<ExtArgs>
        fields: Prisma.UserTicketFieldRefs
        operations: {
          findUnique: {
            args: Prisma.UserTicketFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.UserTicketFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>
          }
          findFirst: {
            args: Prisma.UserTicketFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.UserTicketFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>
          }
          findMany: {
            args: Prisma.UserTicketFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>[]
          }
          create: {
            args: Prisma.UserTicketCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>
          }
          createMany: {
            args: Prisma.UserTicketCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.UserTicketCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>[]
          }
          delete: {
            args: Prisma.UserTicketDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>
          }
          update: {
            args: Prisma.UserTicketUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>
          }
          deleteMany: {
            args: Prisma.UserTicketDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.UserTicketUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.UserTicketUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>[]
          }
          upsert: {
            args: Prisma.UserTicketUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$UserTicketPayload>
          }
          aggregate: {
            args: Prisma.UserTicketAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregateUserTicket>
          }
          groupBy: {
            args: Prisma.UserTicketGroupByArgs<ExtArgs>
            result: $Utils.Optional<UserTicketGroupByOutputType>[]
          }
          count: {
            args: Prisma.UserTicketCountArgs<ExtArgs>
            result: $Utils.Optional<UserTicketCountAggregateOutputType> | number
          }
        }
      }
      PanelSetting: {
        payload: Prisma.$PanelSettingPayload<ExtArgs>
        fields: Prisma.PanelSettingFieldRefs
        operations: {
          findUnique: {
            args: Prisma.PanelSettingFindUniqueArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload> | null
          }
          findUniqueOrThrow: {
            args: Prisma.PanelSettingFindUniqueOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>
          }
          findFirst: {
            args: Prisma.PanelSettingFindFirstArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload> | null
          }
          findFirstOrThrow: {
            args: Prisma.PanelSettingFindFirstOrThrowArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>
          }
          findMany: {
            args: Prisma.PanelSettingFindManyArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>[]
          }
          create: {
            args: Prisma.PanelSettingCreateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>
          }
          createMany: {
            args: Prisma.PanelSettingCreateManyArgs<ExtArgs>
            result: BatchPayload
          }
          createManyAndReturn: {
            args: Prisma.PanelSettingCreateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>[]
          }
          delete: {
            args: Prisma.PanelSettingDeleteArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>
          }
          update: {
            args: Prisma.PanelSettingUpdateArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>
          }
          deleteMany: {
            args: Prisma.PanelSettingDeleteManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateMany: {
            args: Prisma.PanelSettingUpdateManyArgs<ExtArgs>
            result: BatchPayload
          }
          updateManyAndReturn: {
            args: Prisma.PanelSettingUpdateManyAndReturnArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>[]
          }
          upsert: {
            args: Prisma.PanelSettingUpsertArgs<ExtArgs>
            result: $Utils.PayloadToResult<Prisma.$PanelSettingPayload>
          }
          aggregate: {
            args: Prisma.PanelSettingAggregateArgs<ExtArgs>
            result: $Utils.Optional<AggregatePanelSetting>
          }
          groupBy: {
            args: Prisma.PanelSettingGroupByArgs<ExtArgs>
            result: $Utils.Optional<PanelSettingGroupByOutputType>[]
          }
          count: {
            args: Prisma.PanelSettingCountArgs<ExtArgs>
            result: $Utils.Optional<PanelSettingCountAggregateOutputType> | 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
     * ```
     * // Defaults to stdout
     * log: ['query', 'info', 'warn', 'error']
     * 
     * // Emit as events
     * log: [
     *   { emit: 'stdout', level: 'query' },
     *   { emit: 'stdout', level: 'info' },
     *   { emit: 'stdout', level: 'warn' }
     *   { emit: 'stdout', level: 'error' }
     * ]
     * ```
     * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
     */
    log?: (LogLevel | LogDefinition)[]
    /**
     * The default values for transactionOptions
     * maxWait ?= 2000
     * timeout ?= 5000
     */
    transactionOptions?: {
      maxWait?: number
      timeout?: number
      isolationLevel?: Prisma.TransactionIsolationLevel
    }
    /**
     * Global configuration for omitting model fields by default.
     * 
     * @example
     * ```
     * const prisma = new PrismaClient({
     *   omit: {
     *     user: {
     *       password: true
     *     }
     *   }
     * })
     * ```
     */
    omit?: Prisma.GlobalOmitConfig
  }
  export type GlobalOmitConfig = {
    generalDocument?: GeneralDocumentOmit
    firmDocument?: FirmDocumentOmit
    literals?: LiteralsOmit
    telegramUser?: TelegramUserOmit
    conversation?: ConversationOmit
    message?: MessageOmit
    wallet?: WalletOmit
    product?: ProductOmit
    userProduct?: UserProductOmit
    userTransaction?: UserTransactionOmit
    userBotState?: UserBotStateOmit
    userTicket?: UserTicketOmit
    panelSetting?: PanelSettingOmit
  }

  /* Types for Logging */
  export type LogLevel = 'info' | 'query' | 'warn' | 'error'
  export type LogDefinition = {
    level: LogLevel
    emit: 'stdout' | 'event'
  }

  export type GetLogType<T extends LogLevel | LogDefinition> = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never
  export type GetEvents<T extends any> = T extends Array<LogLevel | LogDefinition> ?
    GetLogType<T[0]> | GetLogType<T[1]> | GetLogType<T[2]> | GetLogType<T[3]>
    : never

  export type QueryEvent = {
    timestamp: Date
    query: string
    params: string
    duration: number
    target: string
  }

  export type LogEvent = {
    timestamp: Date
    message: string
    target: string
  }
  /* End Types for Logging */


  export type PrismaAction =
    | 'findUnique'
    | 'findUniqueOrThrow'
    | 'findMany'
    | 'findFirst'
    | 'findFirstOrThrow'
    | 'create'
    | 'createMany'
    | 'createManyAndReturn'
    | 'update'
    | 'updateMany'
    | 'updateManyAndReturn'
    | 'upsert'
    | 'delete'
    | 'deleteMany'
    | 'executeRaw'
    | 'queryRaw'
    | 'aggregate'
    | 'count'
    | 'runCommandRaw'
    | 'findRaw'
    | 'groupBy'

  /**
   * These options are being passed into the middleware as "params"
   */
  export type MiddlewareParams = {
    model?: ModelName
    action: PrismaAction
    args: any
    dataPath: string[]
    runInTransaction: boolean
  }

  /**
   * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation
   */
  export type Middleware<T = any> = (
    params: MiddlewareParams,
    next: (params: MiddlewareParams) => $Utils.JsPromise<T>,
  ) => $Utils.JsPromise<T>

  // tested in getLogLevel.test.ts
  export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | undefined;

  /**
   * `PrismaClient` proxy available in interactive transactions.
   */
  export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClientDenyList>

  export type Datasource = {
    url?: string
  }

  /**
   * Count Types
   */


  /**
   * Count Type TelegramUserCountOutputType
   */

  export type TelegramUserCountOutputType = {
    conversations: number
    userProducts: number
    userTransactions: number
    UserBotStates: number
    UserTicket: number
  }

  export type TelegramUserCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    conversations?: boolean | TelegramUserCountOutputTypeCountConversationsArgs
    userProducts?: boolean | TelegramUserCountOutputTypeCountUserProductsArgs
    userTransactions?: boolean | TelegramUserCountOutputTypeCountUserTransactionsArgs
    UserBotStates?: boolean | TelegramUserCountOutputTypeCountUserBotStatesArgs
    UserTicket?: boolean | TelegramUserCountOutputTypeCountUserTicketArgs
  }

  // Custom InputTypes
  /**
   * TelegramUserCountOutputType without action
   */
  export type TelegramUserCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUserCountOutputType
     */
    select?: TelegramUserCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * TelegramUserCountOutputType without action
   */
  export type TelegramUserCountOutputTypeCountConversationsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ConversationWhereInput
  }

  /**
   * TelegramUserCountOutputType without action
   */
  export type TelegramUserCountOutputTypeCountUserProductsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserProductWhereInput
  }

  /**
   * TelegramUserCountOutputType without action
   */
  export type TelegramUserCountOutputTypeCountUserTransactionsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserTransactionWhereInput
  }

  /**
   * TelegramUserCountOutputType without action
   */
  export type TelegramUserCountOutputTypeCountUserBotStatesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserBotStateWhereInput
  }

  /**
   * TelegramUserCountOutputType without action
   */
  export type TelegramUserCountOutputTypeCountUserTicketArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserTicketWhereInput
  }


  /**
   * Count Type ConversationCountOutputType
   */

  export type ConversationCountOutputType = {
    messages: number
  }

  export type ConversationCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    messages?: boolean | ConversationCountOutputTypeCountMessagesArgs
  }

  // Custom InputTypes
  /**
   * ConversationCountOutputType without action
   */
  export type ConversationCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ConversationCountOutputType
     */
    select?: ConversationCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * ConversationCountOutputType without action
   */
  export type ConversationCountOutputTypeCountMessagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: MessageWhereInput
  }


  /**
   * Count Type ProductCountOutputType
   */

  export type ProductCountOutputType = {
    userProducts: number
  }

  export type ProductCountOutputTypeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    userProducts?: boolean | ProductCountOutputTypeCountUserProductsArgs
  }

  // Custom InputTypes
  /**
   * ProductCountOutputType without action
   */
  export type ProductCountOutputTypeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the ProductCountOutputType
     */
    select?: ProductCountOutputTypeSelect<ExtArgs> | null
  }

  /**
   * ProductCountOutputType without action
   */
  export type ProductCountOutputTypeCountUserProductsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserProductWhereInput
  }


  /**
   * Models
   */

  /**
   * Model GeneralDocument
   */

  export type AggregateGeneralDocument = {
    _count: GeneralDocumentCountAggregateOutputType | null
    _avg: GeneralDocumentAvgAggregateOutputType | null
    _sum: GeneralDocumentSumAggregateOutputType | null
    _min: GeneralDocumentMinAggregateOutputType | null
    _max: GeneralDocumentMaxAggregateOutputType | null
  }

  export type GeneralDocumentAvgAggregateOutputType = {
    id: number | null
  }

  export type GeneralDocumentSumAggregateOutputType = {
    id: number | null
  }

  export type GeneralDocumentMinAggregateOutputType = {
    id: number | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type GeneralDocumentMaxAggregateOutputType = {
    id: number | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type GeneralDocumentCountAggregateOutputType = {
    id: number
    document: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type GeneralDocumentAvgAggregateInputType = {
    id?: true
  }

  export type GeneralDocumentSumAggregateInputType = {
    id?: true
  }

  export type GeneralDocumentMinAggregateInputType = {
    id?: true
    createdAt?: true
    updatedAt?: true
  }

  export type GeneralDocumentMaxAggregateInputType = {
    id?: true
    createdAt?: true
    updatedAt?: true
  }

  export type GeneralDocumentCountAggregateInputType = {
    id?: true
    document?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type GeneralDocumentAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which GeneralDocument to aggregate.
     */
    where?: GeneralDocumentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of GeneralDocuments to fetch.
     */
    orderBy?: GeneralDocumentOrderByWithRelationInput | GeneralDocumentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: GeneralDocumentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` GeneralDocuments 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` GeneralDocuments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned GeneralDocuments
    **/
    _count?: true | GeneralDocumentCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: GeneralDocumentAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: GeneralDocumentSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: GeneralDocumentMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: GeneralDocumentMaxAggregateInputType
  }

  export type GetGeneralDocumentAggregateType<T extends GeneralDocumentAggregateArgs> = {
        [P in keyof T & keyof AggregateGeneralDocument]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateGeneralDocument[P]>
      : GetScalarType<T[P], AggregateGeneralDocument[P]>
  }




  export type GeneralDocumentGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: GeneralDocumentWhereInput
    orderBy?: GeneralDocumentOrderByWithAggregationInput | GeneralDocumentOrderByWithAggregationInput[]
    by: GeneralDocumentScalarFieldEnum[] | GeneralDocumentScalarFieldEnum
    having?: GeneralDocumentScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: GeneralDocumentCountAggregateInputType | true
    _avg?: GeneralDocumentAvgAggregateInputType
    _sum?: GeneralDocumentSumAggregateInputType
    _min?: GeneralDocumentMinAggregateInputType
    _max?: GeneralDocumentMaxAggregateInputType
  }

  export type GeneralDocumentGroupByOutputType = {
    id: number
    document: JsonValue
    createdAt: Date
    updatedAt: Date
    _count: GeneralDocumentCountAggregateOutputType | null
    _avg: GeneralDocumentAvgAggregateOutputType | null
    _sum: GeneralDocumentSumAggregateOutputType | null
    _min: GeneralDocumentMinAggregateOutputType | null
    _max: GeneralDocumentMaxAggregateOutputType | null
  }

  type GetGeneralDocumentGroupByPayload<T extends GeneralDocumentGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<GeneralDocumentGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof GeneralDocumentGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], GeneralDocumentGroupByOutputType[P]>
            : GetScalarType<T[P], GeneralDocumentGroupByOutputType[P]>
        }
      >
    >


  export type GeneralDocumentSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    document?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["generalDocument"]>

  export type GeneralDocumentSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    document?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["generalDocument"]>

  export type GeneralDocumentSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    document?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["generalDocument"]>

  export type GeneralDocumentSelectScalar = {
    id?: boolean
    document?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type GeneralDocumentOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "document" | "createdAt" | "updatedAt", ExtArgs["result"]["generalDocument"]>

  export type $GeneralDocumentPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "GeneralDocument"
    objects: {}
    scalars: $Extensions.GetPayloadResult<{
      id: number
      document: Prisma.JsonValue
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["generalDocument"]>
    composites: {}
  }

  type GeneralDocumentGetPayload<S extends boolean | null | undefined | GeneralDocumentDefaultArgs> = $Result.GetResult<Prisma.$GeneralDocumentPayload, S>

  type GeneralDocumentCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<GeneralDocumentFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: GeneralDocumentCountAggregateInputType | true
    }

  export interface GeneralDocumentDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['GeneralDocument'], meta: { name: 'GeneralDocument' } }
    /**
     * Find zero or one GeneralDocument that matches the filter.
     * @param {GeneralDocumentFindUniqueArgs} args - Arguments to find a GeneralDocument
     * @example
     * // Get one GeneralDocument
     * const generalDocument = await prisma.generalDocument.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends GeneralDocumentFindUniqueArgs>(args: SelectSubset<T, GeneralDocumentFindUniqueArgs<ExtArgs>>): Prisma__GeneralDocumentClient<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one GeneralDocument that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {GeneralDocumentFindUniqueOrThrowArgs} args - Arguments to find a GeneralDocument
     * @example
     * // Get one GeneralDocument
     * const generalDocument = await prisma.generalDocument.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends GeneralDocumentFindUniqueOrThrowArgs>(args: SelectSubset<T, GeneralDocumentFindUniqueOrThrowArgs<ExtArgs>>): Prisma__GeneralDocumentClient<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first GeneralDocument 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 {GeneralDocumentFindFirstArgs} args - Arguments to find a GeneralDocument
     * @example
     * // Get one GeneralDocument
     * const generalDocument = await prisma.generalDocument.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends GeneralDocumentFindFirstArgs>(args?: SelectSubset<T, GeneralDocumentFindFirstArgs<ExtArgs>>): Prisma__GeneralDocumentClient<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first GeneralDocument 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 {GeneralDocumentFindFirstOrThrowArgs} args - Arguments to find a GeneralDocument
     * @example
     * // Get one GeneralDocument
     * const generalDocument = await prisma.generalDocument.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends GeneralDocumentFindFirstOrThrowArgs>(args?: SelectSubset<T, GeneralDocumentFindFirstOrThrowArgs<ExtArgs>>): Prisma__GeneralDocumentClient<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more GeneralDocuments 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 {GeneralDocumentFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all GeneralDocuments
     * const generalDocuments = await prisma.generalDocument.findMany()
     * 
     * // Get first 10 GeneralDocuments
     * const generalDocuments = await prisma.generalDocument.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const generalDocumentWithIdOnly = await prisma.generalDocument.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends GeneralDocumentFindManyArgs>(args?: SelectSubset<T, GeneralDocumentFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a GeneralDocument.
     * @param {GeneralDocumentCreateArgs} args - Arguments to create a GeneralDocument.
     * @example
     * // Create one GeneralDocument
     * const GeneralDocument = await prisma.generalDocument.create({
     *   data: {
     *     // ... data to create a GeneralDocument
     *   }
     * })
     * 
     */
    create<T extends GeneralDocumentCreateArgs>(args: SelectSubset<T, GeneralDocumentCreateArgs<ExtArgs>>): Prisma__GeneralDocumentClient<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many GeneralDocuments.
     * @param {GeneralDocumentCreateManyArgs} args - Arguments to create many GeneralDocuments.
     * @example
     * // Create many GeneralDocuments
     * const generalDocument = await prisma.generalDocument.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends GeneralDocumentCreateManyArgs>(args?: SelectSubset<T, GeneralDocumentCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many GeneralDocuments and returns the data saved in the database.
     * @param {GeneralDocumentCreateManyAndReturnArgs} args - Arguments to create many GeneralDocuments.
     * @example
     * // Create many GeneralDocuments
     * const generalDocument = await prisma.generalDocument.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many GeneralDocuments and only return the `id`
     * const generalDocumentWithIdOnly = await prisma.generalDocument.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<T extends GeneralDocumentCreateManyAndReturnArgs>(args?: SelectSubset<T, GeneralDocumentCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a GeneralDocument.
     * @param {GeneralDocumentDeleteArgs} args - Arguments to delete one GeneralDocument.
     * @example
     * // Delete one GeneralDocument
     * const GeneralDocument = await prisma.generalDocument.delete({
     *   where: {
     *     // ... filter to delete one GeneralDocument
     *   }
     * })
     * 
     */
    delete<T extends GeneralDocumentDeleteArgs>(args: SelectSubset<T, GeneralDocumentDeleteArgs<ExtArgs>>): Prisma__GeneralDocumentClient<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one GeneralDocument.
     * @param {GeneralDocumentUpdateArgs} args - Arguments to update one GeneralDocument.
     * @example
     * // Update one GeneralDocument
     * const generalDocument = await prisma.generalDocument.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends GeneralDocumentUpdateArgs>(args: SelectSubset<T, GeneralDocumentUpdateArgs<ExtArgs>>): Prisma__GeneralDocumentClient<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more GeneralDocuments.
     * @param {GeneralDocumentDeleteManyArgs} args - Arguments to filter GeneralDocuments to delete.
     * @example
     * // Delete a few GeneralDocuments
     * const { count } = await prisma.generalDocument.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends GeneralDocumentDeleteManyArgs>(args?: SelectSubset<T, GeneralDocumentDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more GeneralDocuments.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {GeneralDocumentUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many GeneralDocuments
     * const generalDocument = await prisma.generalDocument.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends GeneralDocumentUpdateManyArgs>(args: SelectSubset<T, GeneralDocumentUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more GeneralDocuments and returns the data updated in the database.
     * @param {GeneralDocumentUpdateManyAndReturnArgs} args - Arguments to update many GeneralDocuments.
     * @example
     * // Update many GeneralDocuments
     * const generalDocument = await prisma.generalDocument.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more GeneralDocuments and only return the `id`
     * const generalDocumentWithIdOnly = await prisma.generalDocument.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<T extends GeneralDocumentUpdateManyAndReturnArgs>(args: SelectSubset<T, GeneralDocumentUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one GeneralDocument.
     * @param {GeneralDocumentUpsertArgs} args - Arguments to update or create a GeneralDocument.
     * @example
     * // Update or create a GeneralDocument
     * const generalDocument = await prisma.generalDocument.upsert({
     *   create: {
     *     // ... data to create a GeneralDocument
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the GeneralDocument we want to update
     *   }
     * })
     */
    upsert<T extends GeneralDocumentUpsertArgs>(args: SelectSubset<T, GeneralDocumentUpsertArgs<ExtArgs>>): Prisma__GeneralDocumentClient<$Result.GetResult<Prisma.$GeneralDocumentPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of GeneralDocuments.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {GeneralDocumentCountArgs} args - Arguments to filter GeneralDocuments to count.
     * @example
     * // Count the number of GeneralDocuments
     * const count = await prisma.generalDocument.count({
     *   where: {
     *     // ... the filter for the GeneralDocuments we want to count
     *   }
     * })
    **/
    count<T extends GeneralDocumentCountArgs>(
      args?: Subset<T, GeneralDocumentCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], GeneralDocumentCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a GeneralDocument.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {GeneralDocumentAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends GeneralDocumentAggregateArgs>(args: Subset<T, GeneralDocumentAggregateArgs>): Prisma.PrismaPromise<GetGeneralDocumentAggregateType<T>>

    /**
     * Group by GeneralDocument.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {GeneralDocumentGroupByArgs} 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 GeneralDocumentGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: GeneralDocumentGroupByArgs['orderBy'] }
        : { orderBy?: GeneralDocumentGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, GeneralDocumentGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetGeneralDocumentGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the GeneralDocument model
   */
  readonly fields: GeneralDocumentFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for GeneralDocument.
   * 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__GeneralDocumentClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    /**
     * Attaches callbacks for the resolution and/or rejection of the Promise.
     * @param onfulfilled The callback to execute when the Promise is resolved.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of which ever callback is executed.
     */
    then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the GeneralDocument model
   */
  interface GeneralDocumentFieldRefs {
    readonly id: FieldRef<"GeneralDocument", 'Int'>
    readonly document: FieldRef<"GeneralDocument", 'Json'>
    readonly createdAt: FieldRef<"GeneralDocument", 'DateTime'>
    readonly updatedAt: FieldRef<"GeneralDocument", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * GeneralDocument findUnique
   */
  export type GeneralDocumentFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * Filter, which GeneralDocument to fetch.
     */
    where: GeneralDocumentWhereUniqueInput
  }

  /**
   * GeneralDocument findUniqueOrThrow
   */
  export type GeneralDocumentFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * Filter, which GeneralDocument to fetch.
     */
    where: GeneralDocumentWhereUniqueInput
  }

  /**
   * GeneralDocument findFirst
   */
  export type GeneralDocumentFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * Filter, which GeneralDocument to fetch.
     */
    where?: GeneralDocumentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of GeneralDocuments to fetch.
     */
    orderBy?: GeneralDocumentOrderByWithRelationInput | GeneralDocumentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for GeneralDocuments.
     */
    cursor?: GeneralDocumentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` GeneralDocuments 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` GeneralDocuments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of GeneralDocuments.
     */
    distinct?: GeneralDocumentScalarFieldEnum | GeneralDocumentScalarFieldEnum[]
  }

  /**
   * GeneralDocument findFirstOrThrow
   */
  export type GeneralDocumentFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * Filter, which GeneralDocument to fetch.
     */
    where?: GeneralDocumentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of GeneralDocuments to fetch.
     */
    orderBy?: GeneralDocumentOrderByWithRelationInput | GeneralDocumentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for GeneralDocuments.
     */
    cursor?: GeneralDocumentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` GeneralDocuments 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` GeneralDocuments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of GeneralDocuments.
     */
    distinct?: GeneralDocumentScalarFieldEnum | GeneralDocumentScalarFieldEnum[]
  }

  /**
   * GeneralDocument findMany
   */
  export type GeneralDocumentFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * Filter, which GeneralDocuments to fetch.
     */
    where?: GeneralDocumentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of GeneralDocuments to fetch.
     */
    orderBy?: GeneralDocumentOrderByWithRelationInput | GeneralDocumentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing GeneralDocuments.
     */
    cursor?: GeneralDocumentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` GeneralDocuments 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` GeneralDocuments.
     */
    skip?: number
    distinct?: GeneralDocumentScalarFieldEnum | GeneralDocumentScalarFieldEnum[]
  }

  /**
   * GeneralDocument create
   */
  export type GeneralDocumentCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * The data needed to create a GeneralDocument.
     */
    data: XOR<GeneralDocumentCreateInput, GeneralDocumentUncheckedCreateInput>
  }

  /**
   * GeneralDocument createMany
   */
  export type GeneralDocumentCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many GeneralDocuments.
     */
    data: GeneralDocumentCreateManyInput | GeneralDocumentCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * GeneralDocument createManyAndReturn
   */
  export type GeneralDocumentCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * The data used to create many GeneralDocuments.
     */
    data: GeneralDocumentCreateManyInput | GeneralDocumentCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * GeneralDocument update
   */
  export type GeneralDocumentUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * The data needed to update a GeneralDocument.
     */
    data: XOR<GeneralDocumentUpdateInput, GeneralDocumentUncheckedUpdateInput>
    /**
     * Choose, which GeneralDocument to update.
     */
    where: GeneralDocumentWhereUniqueInput
  }

  /**
   * GeneralDocument updateMany
   */
  export type GeneralDocumentUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update GeneralDocuments.
     */
    data: XOR<GeneralDocumentUpdateManyMutationInput, GeneralDocumentUncheckedUpdateManyInput>
    /**
     * Filter which GeneralDocuments to update
     */
    where?: GeneralDocumentWhereInput
    /**
     * Limit how many GeneralDocuments to update.
     */
    limit?: number
  }

  /**
   * GeneralDocument updateManyAndReturn
   */
  export type GeneralDocumentUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * The data used to update GeneralDocuments.
     */
    data: XOR<GeneralDocumentUpdateManyMutationInput, GeneralDocumentUncheckedUpdateManyInput>
    /**
     * Filter which GeneralDocuments to update
     */
    where?: GeneralDocumentWhereInput
    /**
     * Limit how many GeneralDocuments to update.
     */
    limit?: number
  }

  /**
   * GeneralDocument upsert
   */
  export type GeneralDocumentUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * The filter to search for the GeneralDocument to update in case it exists.
     */
    where: GeneralDocumentWhereUniqueInput
    /**
     * In case the GeneralDocument found by the `where` argument doesn't exist, create a new GeneralDocument with this data.
     */
    create: XOR<GeneralDocumentCreateInput, GeneralDocumentUncheckedCreateInput>
    /**
     * In case the GeneralDocument was found with the provided `where` argument, update it with this data.
     */
    update: XOR<GeneralDocumentUpdateInput, GeneralDocumentUncheckedUpdateInput>
  }

  /**
   * GeneralDocument delete
   */
  export type GeneralDocumentDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
    /**
     * Filter which GeneralDocument to delete.
     */
    where: GeneralDocumentWhereUniqueInput
  }

  /**
   * GeneralDocument deleteMany
   */
  export type GeneralDocumentDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which GeneralDocuments to delete
     */
    where?: GeneralDocumentWhereInput
    /**
     * Limit how many GeneralDocuments to delete.
     */
    limit?: number
  }

  /**
   * GeneralDocument without action
   */
  export type GeneralDocumentDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the GeneralDocument
     */
    select?: GeneralDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the GeneralDocument
     */
    omit?: GeneralDocumentOmit<ExtArgs> | null
  }


  /**
   * Model FirmDocument
   */

  export type AggregateFirmDocument = {
    _count: FirmDocumentCountAggregateOutputType | null
    _avg: FirmDocumentAvgAggregateOutputType | null
    _sum: FirmDocumentSumAggregateOutputType | null
    _min: FirmDocumentMinAggregateOutputType | null
    _max: FirmDocumentMaxAggregateOutputType | null
  }

  export type FirmDocumentAvgAggregateOutputType = {
    id: number | null
  }

  export type FirmDocumentSumAggregateOutputType = {
    id: number | null
  }

  export type FirmDocumentMinAggregateOutputType = {
    id: number | null
    name: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type FirmDocumentMaxAggregateOutputType = {
    id: number | null
    name: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type FirmDocumentCountAggregateOutputType = {
    id: number
    name: number
    fields: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type FirmDocumentAvgAggregateInputType = {
    id?: true
  }

  export type FirmDocumentSumAggregateInputType = {
    id?: true
  }

  export type FirmDocumentMinAggregateInputType = {
    id?: true
    name?: true
    createdAt?: true
    updatedAt?: true
  }

  export type FirmDocumentMaxAggregateInputType = {
    id?: true
    name?: true
    createdAt?: true
    updatedAt?: true
  }

  export type FirmDocumentCountAggregateInputType = {
    id?: true
    name?: true
    fields?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type FirmDocumentAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which FirmDocument to aggregate.
     */
    where?: FirmDocumentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FirmDocuments to fetch.
     */
    orderBy?: FirmDocumentOrderByWithRelationInput | FirmDocumentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: FirmDocumentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FirmDocuments 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` FirmDocuments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned FirmDocuments
    **/
    _count?: true | FirmDocumentCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: FirmDocumentAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: FirmDocumentSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: FirmDocumentMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: FirmDocumentMaxAggregateInputType
  }

  export type GetFirmDocumentAggregateType<T extends FirmDocumentAggregateArgs> = {
        [P in keyof T & keyof AggregateFirmDocument]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateFirmDocument[P]>
      : GetScalarType<T[P], AggregateFirmDocument[P]>
  }




  export type FirmDocumentGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: FirmDocumentWhereInput
    orderBy?: FirmDocumentOrderByWithAggregationInput | FirmDocumentOrderByWithAggregationInput[]
    by: FirmDocumentScalarFieldEnum[] | FirmDocumentScalarFieldEnum
    having?: FirmDocumentScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: FirmDocumentCountAggregateInputType | true
    _avg?: FirmDocumentAvgAggregateInputType
    _sum?: FirmDocumentSumAggregateInputType
    _min?: FirmDocumentMinAggregateInputType
    _max?: FirmDocumentMaxAggregateInputType
  }

  export type FirmDocumentGroupByOutputType = {
    id: number
    name: string
    fields: JsonValue
    createdAt: Date
    updatedAt: Date
    _count: FirmDocumentCountAggregateOutputType | null
    _avg: FirmDocumentAvgAggregateOutputType | null
    _sum: FirmDocumentSumAggregateOutputType | null
    _min: FirmDocumentMinAggregateOutputType | null
    _max: FirmDocumentMaxAggregateOutputType | null
  }

  type GetFirmDocumentGroupByPayload<T extends FirmDocumentGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<FirmDocumentGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof FirmDocumentGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], FirmDocumentGroupByOutputType[P]>
            : GetScalarType<T[P], FirmDocumentGroupByOutputType[P]>
        }
      >
    >


  export type FirmDocumentSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    fields?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["firmDocument"]>

  export type FirmDocumentSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    fields?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["firmDocument"]>

  export type FirmDocumentSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    name?: boolean
    fields?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["firmDocument"]>

  export type FirmDocumentSelectScalar = {
    id?: boolean
    name?: boolean
    fields?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type FirmDocumentOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "name" | "fields" | "createdAt" | "updatedAt", ExtArgs["result"]["firmDocument"]>

  export type $FirmDocumentPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "FirmDocument"
    objects: {}
    scalars: $Extensions.GetPayloadResult<{
      id: number
      name: string
      fields: Prisma.JsonValue
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["firmDocument"]>
    composites: {}
  }

  type FirmDocumentGetPayload<S extends boolean | null | undefined | FirmDocumentDefaultArgs> = $Result.GetResult<Prisma.$FirmDocumentPayload, S>

  type FirmDocumentCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<FirmDocumentFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: FirmDocumentCountAggregateInputType | true
    }

  export interface FirmDocumentDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['FirmDocument'], meta: { name: 'FirmDocument' } }
    /**
     * Find zero or one FirmDocument that matches the filter.
     * @param {FirmDocumentFindUniqueArgs} args - Arguments to find a FirmDocument
     * @example
     * // Get one FirmDocument
     * const firmDocument = await prisma.firmDocument.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends FirmDocumentFindUniqueArgs>(args: SelectSubset<T, FirmDocumentFindUniqueArgs<ExtArgs>>): Prisma__FirmDocumentClient<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one FirmDocument that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {FirmDocumentFindUniqueOrThrowArgs} args - Arguments to find a FirmDocument
     * @example
     * // Get one FirmDocument
     * const firmDocument = await prisma.firmDocument.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends FirmDocumentFindUniqueOrThrowArgs>(args: SelectSubset<T, FirmDocumentFindUniqueOrThrowArgs<ExtArgs>>): Prisma__FirmDocumentClient<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first FirmDocument 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 {FirmDocumentFindFirstArgs} args - Arguments to find a FirmDocument
     * @example
     * // Get one FirmDocument
     * const firmDocument = await prisma.firmDocument.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends FirmDocumentFindFirstArgs>(args?: SelectSubset<T, FirmDocumentFindFirstArgs<ExtArgs>>): Prisma__FirmDocumentClient<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first FirmDocument 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 {FirmDocumentFindFirstOrThrowArgs} args - Arguments to find a FirmDocument
     * @example
     * // Get one FirmDocument
     * const firmDocument = await prisma.firmDocument.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends FirmDocumentFindFirstOrThrowArgs>(args?: SelectSubset<T, FirmDocumentFindFirstOrThrowArgs<ExtArgs>>): Prisma__FirmDocumentClient<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more FirmDocuments 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 {FirmDocumentFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all FirmDocuments
     * const firmDocuments = await prisma.firmDocument.findMany()
     * 
     * // Get first 10 FirmDocuments
     * const firmDocuments = await prisma.firmDocument.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const firmDocumentWithIdOnly = await prisma.firmDocument.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends FirmDocumentFindManyArgs>(args?: SelectSubset<T, FirmDocumentFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a FirmDocument.
     * @param {FirmDocumentCreateArgs} args - Arguments to create a FirmDocument.
     * @example
     * // Create one FirmDocument
     * const FirmDocument = await prisma.firmDocument.create({
     *   data: {
     *     // ... data to create a FirmDocument
     *   }
     * })
     * 
     */
    create<T extends FirmDocumentCreateArgs>(args: SelectSubset<T, FirmDocumentCreateArgs<ExtArgs>>): Prisma__FirmDocumentClient<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many FirmDocuments.
     * @param {FirmDocumentCreateManyArgs} args - Arguments to create many FirmDocuments.
     * @example
     * // Create many FirmDocuments
     * const firmDocument = await prisma.firmDocument.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends FirmDocumentCreateManyArgs>(args?: SelectSubset<T, FirmDocumentCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many FirmDocuments and returns the data saved in the database.
     * @param {FirmDocumentCreateManyAndReturnArgs} args - Arguments to create many FirmDocuments.
     * @example
     * // Create many FirmDocuments
     * const firmDocument = await prisma.firmDocument.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many FirmDocuments and only return the `id`
     * const firmDocumentWithIdOnly = await prisma.firmDocument.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<T extends FirmDocumentCreateManyAndReturnArgs>(args?: SelectSubset<T, FirmDocumentCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a FirmDocument.
     * @param {FirmDocumentDeleteArgs} args - Arguments to delete one FirmDocument.
     * @example
     * // Delete one FirmDocument
     * const FirmDocument = await prisma.firmDocument.delete({
     *   where: {
     *     // ... filter to delete one FirmDocument
     *   }
     * })
     * 
     */
    delete<T extends FirmDocumentDeleteArgs>(args: SelectSubset<T, FirmDocumentDeleteArgs<ExtArgs>>): Prisma__FirmDocumentClient<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one FirmDocument.
     * @param {FirmDocumentUpdateArgs} args - Arguments to update one FirmDocument.
     * @example
     * // Update one FirmDocument
     * const firmDocument = await prisma.firmDocument.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends FirmDocumentUpdateArgs>(args: SelectSubset<T, FirmDocumentUpdateArgs<ExtArgs>>): Prisma__FirmDocumentClient<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more FirmDocuments.
     * @param {FirmDocumentDeleteManyArgs} args - Arguments to filter FirmDocuments to delete.
     * @example
     * // Delete a few FirmDocuments
     * const { count } = await prisma.firmDocument.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends FirmDocumentDeleteManyArgs>(args?: SelectSubset<T, FirmDocumentDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more FirmDocuments.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FirmDocumentUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many FirmDocuments
     * const firmDocument = await prisma.firmDocument.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends FirmDocumentUpdateManyArgs>(args: SelectSubset<T, FirmDocumentUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more FirmDocuments and returns the data updated in the database.
     * @param {FirmDocumentUpdateManyAndReturnArgs} args - Arguments to update many FirmDocuments.
     * @example
     * // Update many FirmDocuments
     * const firmDocument = await prisma.firmDocument.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more FirmDocuments and only return the `id`
     * const firmDocumentWithIdOnly = await prisma.firmDocument.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<T extends FirmDocumentUpdateManyAndReturnArgs>(args: SelectSubset<T, FirmDocumentUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one FirmDocument.
     * @param {FirmDocumentUpsertArgs} args - Arguments to update or create a FirmDocument.
     * @example
     * // Update or create a FirmDocument
     * const firmDocument = await prisma.firmDocument.upsert({
     *   create: {
     *     // ... data to create a FirmDocument
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the FirmDocument we want to update
     *   }
     * })
     */
    upsert<T extends FirmDocumentUpsertArgs>(args: SelectSubset<T, FirmDocumentUpsertArgs<ExtArgs>>): Prisma__FirmDocumentClient<$Result.GetResult<Prisma.$FirmDocumentPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of FirmDocuments.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FirmDocumentCountArgs} args - Arguments to filter FirmDocuments to count.
     * @example
     * // Count the number of FirmDocuments
     * const count = await prisma.firmDocument.count({
     *   where: {
     *     // ... the filter for the FirmDocuments we want to count
     *   }
     * })
    **/
    count<T extends FirmDocumentCountArgs>(
      args?: Subset<T, FirmDocumentCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], FirmDocumentCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a FirmDocument.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FirmDocumentAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends FirmDocumentAggregateArgs>(args: Subset<T, FirmDocumentAggregateArgs>): Prisma.PrismaPromise<GetFirmDocumentAggregateType<T>>

    /**
     * Group by FirmDocument.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {FirmDocumentGroupByArgs} 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 FirmDocumentGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: FirmDocumentGroupByArgs['orderBy'] }
        : { orderBy?: FirmDocumentGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, FirmDocumentGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetFirmDocumentGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the FirmDocument model
   */
  readonly fields: FirmDocumentFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for FirmDocument.
   * 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__FirmDocumentClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    /**
     * Attaches callbacks for the resolution and/or rejection of the Promise.
     * @param onfulfilled The callback to execute when the Promise is resolved.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of which ever callback is executed.
     */
    then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the FirmDocument model
   */
  interface FirmDocumentFieldRefs {
    readonly id: FieldRef<"FirmDocument", 'Int'>
    readonly name: FieldRef<"FirmDocument", 'String'>
    readonly fields: FieldRef<"FirmDocument", 'Json'>
    readonly createdAt: FieldRef<"FirmDocument", 'DateTime'>
    readonly updatedAt: FieldRef<"FirmDocument", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * FirmDocument findUnique
   */
  export type FirmDocumentFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * Filter, which FirmDocument to fetch.
     */
    where: FirmDocumentWhereUniqueInput
  }

  /**
   * FirmDocument findUniqueOrThrow
   */
  export type FirmDocumentFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * Filter, which FirmDocument to fetch.
     */
    where: FirmDocumentWhereUniqueInput
  }

  /**
   * FirmDocument findFirst
   */
  export type FirmDocumentFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * Filter, which FirmDocument to fetch.
     */
    where?: FirmDocumentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FirmDocuments to fetch.
     */
    orderBy?: FirmDocumentOrderByWithRelationInput | FirmDocumentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for FirmDocuments.
     */
    cursor?: FirmDocumentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FirmDocuments 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` FirmDocuments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of FirmDocuments.
     */
    distinct?: FirmDocumentScalarFieldEnum | FirmDocumentScalarFieldEnum[]
  }

  /**
   * FirmDocument findFirstOrThrow
   */
  export type FirmDocumentFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * Filter, which FirmDocument to fetch.
     */
    where?: FirmDocumentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FirmDocuments to fetch.
     */
    orderBy?: FirmDocumentOrderByWithRelationInput | FirmDocumentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for FirmDocuments.
     */
    cursor?: FirmDocumentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FirmDocuments 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` FirmDocuments.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of FirmDocuments.
     */
    distinct?: FirmDocumentScalarFieldEnum | FirmDocumentScalarFieldEnum[]
  }

  /**
   * FirmDocument findMany
   */
  export type FirmDocumentFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * Filter, which FirmDocuments to fetch.
     */
    where?: FirmDocumentWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of FirmDocuments to fetch.
     */
    orderBy?: FirmDocumentOrderByWithRelationInput | FirmDocumentOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing FirmDocuments.
     */
    cursor?: FirmDocumentWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` FirmDocuments 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` FirmDocuments.
     */
    skip?: number
    distinct?: FirmDocumentScalarFieldEnum | FirmDocumentScalarFieldEnum[]
  }

  /**
   * FirmDocument create
   */
  export type FirmDocumentCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * The data needed to create a FirmDocument.
     */
    data: XOR<FirmDocumentCreateInput, FirmDocumentUncheckedCreateInput>
  }

  /**
   * FirmDocument createMany
   */
  export type FirmDocumentCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many FirmDocuments.
     */
    data: FirmDocumentCreateManyInput | FirmDocumentCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * FirmDocument createManyAndReturn
   */
  export type FirmDocumentCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * The data used to create many FirmDocuments.
     */
    data: FirmDocumentCreateManyInput | FirmDocumentCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * FirmDocument update
   */
  export type FirmDocumentUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * The data needed to update a FirmDocument.
     */
    data: XOR<FirmDocumentUpdateInput, FirmDocumentUncheckedUpdateInput>
    /**
     * Choose, which FirmDocument to update.
     */
    where: FirmDocumentWhereUniqueInput
  }

  /**
   * FirmDocument updateMany
   */
  export type FirmDocumentUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update FirmDocuments.
     */
    data: XOR<FirmDocumentUpdateManyMutationInput, FirmDocumentUncheckedUpdateManyInput>
    /**
     * Filter which FirmDocuments to update
     */
    where?: FirmDocumentWhereInput
    /**
     * Limit how many FirmDocuments to update.
     */
    limit?: number
  }

  /**
   * FirmDocument updateManyAndReturn
   */
  export type FirmDocumentUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * The data used to update FirmDocuments.
     */
    data: XOR<FirmDocumentUpdateManyMutationInput, FirmDocumentUncheckedUpdateManyInput>
    /**
     * Filter which FirmDocuments to update
     */
    where?: FirmDocumentWhereInput
    /**
     * Limit how many FirmDocuments to update.
     */
    limit?: number
  }

  /**
   * FirmDocument upsert
   */
  export type FirmDocumentUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * The filter to search for the FirmDocument to update in case it exists.
     */
    where: FirmDocumentWhereUniqueInput
    /**
     * In case the FirmDocument found by the `where` argument doesn't exist, create a new FirmDocument with this data.
     */
    create: XOR<FirmDocumentCreateInput, FirmDocumentUncheckedCreateInput>
    /**
     * In case the FirmDocument was found with the provided `where` argument, update it with this data.
     */
    update: XOR<FirmDocumentUpdateInput, FirmDocumentUncheckedUpdateInput>
  }

  /**
   * FirmDocument delete
   */
  export type FirmDocumentDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
    /**
     * Filter which FirmDocument to delete.
     */
    where: FirmDocumentWhereUniqueInput
  }

  /**
   * FirmDocument deleteMany
   */
  export type FirmDocumentDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which FirmDocuments to delete
     */
    where?: FirmDocumentWhereInput
    /**
     * Limit how many FirmDocuments to delete.
     */
    limit?: number
  }

  /**
   * FirmDocument without action
   */
  export type FirmDocumentDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the FirmDocument
     */
    select?: FirmDocumentSelect<ExtArgs> | null
    /**
     * Omit specific fields from the FirmDocument
     */
    omit?: FirmDocumentOmit<ExtArgs> | null
  }


  /**
   * Model Literals
   */

  export type AggregateLiterals = {
    _count: LiteralsCountAggregateOutputType | null
    _avg: LiteralsAvgAggregateOutputType | null
    _sum: LiteralsSumAggregateOutputType | null
    _min: LiteralsMinAggregateOutputType | null
    _max: LiteralsMaxAggregateOutputType | null
  }

  export type LiteralsAvgAggregateOutputType = {
    id: number | null
  }

  export type LiteralsSumAggregateOutputType = {
    id: number | null
  }

  export type LiteralsMinAggregateOutputType = {
    id: number | null
    aiModel: string | null
    finalPrompt: string | null
    introText: string | null
    strategiesText: string | null
    rulesText: string | null
    templateText: string | null
    welcomeText: string | null
    skillPrompt: string | null
    enthusiasmPrompt: string | null
    customerPrompt: string | null
    companyRankingPrompt: string | null
    createdAt: Date | null
  }

  export type LiteralsMaxAggregateOutputType = {
    id: number | null
    aiModel: string | null
    finalPrompt: string | null
    introText: string | null
    strategiesText: string | null
    rulesText: string | null
    templateText: string | null
    welcomeText: string | null
    skillPrompt: string | null
    enthusiasmPrompt: string | null
    customerPrompt: string | null
    companyRankingPrompt: string | null
    createdAt: Date | null
  }

  export type LiteralsCountAggregateOutputType = {
    id: number
    aiModel: number
    finalPrompt: number
    commands: number
    companies: number
    introText: number
    strategiesText: number
    rulesText: number
    templateText: number
    welcomeText: number
    skillPrompt: number
    enthusiasmPrompt: number
    customerPrompt: number
    companyRankingPrompt: number
    createdAt: number
    _all: number
  }


  export type LiteralsAvgAggregateInputType = {
    id?: true
  }

  export type LiteralsSumAggregateInputType = {
    id?: true
  }

  export type LiteralsMinAggregateInputType = {
    id?: true
    aiModel?: true
    finalPrompt?: true
    introText?: true
    strategiesText?: true
    rulesText?: true
    templateText?: true
    welcomeText?: true
    skillPrompt?: true
    enthusiasmPrompt?: true
    customerPrompt?: true
    companyRankingPrompt?: true
    createdAt?: true
  }

  export type LiteralsMaxAggregateInputType = {
    id?: true
    aiModel?: true
    finalPrompt?: true
    introText?: true
    strategiesText?: true
    rulesText?: true
    templateText?: true
    welcomeText?: true
    skillPrompt?: true
    enthusiasmPrompt?: true
    customerPrompt?: true
    companyRankingPrompt?: true
    createdAt?: true
  }

  export type LiteralsCountAggregateInputType = {
    id?: true
    aiModel?: true
    finalPrompt?: true
    commands?: true
    companies?: true
    introText?: true
    strategiesText?: true
    rulesText?: true
    templateText?: true
    welcomeText?: true
    skillPrompt?: true
    enthusiasmPrompt?: true
    customerPrompt?: true
    companyRankingPrompt?: true
    createdAt?: true
    _all?: true
  }

  export type LiteralsAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Literals to aggregate.
     */
    where?: LiteralsWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Literals to fetch.
     */
    orderBy?: LiteralsOrderByWithRelationInput | LiteralsOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: LiteralsWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Literals 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` Literals.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Literals
    **/
    _count?: true | LiteralsCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: LiteralsAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: LiteralsSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: LiteralsMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: LiteralsMaxAggregateInputType
  }

  export type GetLiteralsAggregateType<T extends LiteralsAggregateArgs> = {
        [P in keyof T & keyof AggregateLiterals]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateLiterals[P]>
      : GetScalarType<T[P], AggregateLiterals[P]>
  }




  export type LiteralsGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: LiteralsWhereInput
    orderBy?: LiteralsOrderByWithAggregationInput | LiteralsOrderByWithAggregationInput[]
    by: LiteralsScalarFieldEnum[] | LiteralsScalarFieldEnum
    having?: LiteralsScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: LiteralsCountAggregateInputType | true
    _avg?: LiteralsAvgAggregateInputType
    _sum?: LiteralsSumAggregateInputType
    _min?: LiteralsMinAggregateInputType
    _max?: LiteralsMaxAggregateInputType
  }

  export type LiteralsGroupByOutputType = {
    id: number
    aiModel: string
    finalPrompt: string
    commands: JsonValue
    companies: JsonValue
    introText: string | null
    strategiesText: string | null
    rulesText: string | null
    templateText: string | null
    welcomeText: string | null
    skillPrompt: string | null
    enthusiasmPrompt: string | null
    customerPrompt: string | null
    companyRankingPrompt: string | null
    createdAt: Date
    _count: LiteralsCountAggregateOutputType | null
    _avg: LiteralsAvgAggregateOutputType | null
    _sum: LiteralsSumAggregateOutputType | null
    _min: LiteralsMinAggregateOutputType | null
    _max: LiteralsMaxAggregateOutputType | null
  }

  type GetLiteralsGroupByPayload<T extends LiteralsGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<LiteralsGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof LiteralsGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], LiteralsGroupByOutputType[P]>
            : GetScalarType<T[P], LiteralsGroupByOutputType[P]>
        }
      >
    >


  export type LiteralsSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    aiModel?: boolean
    finalPrompt?: boolean
    commands?: boolean
    companies?: boolean
    introText?: boolean
    strategiesText?: boolean
    rulesText?: boolean
    templateText?: boolean
    welcomeText?: boolean
    skillPrompt?: boolean
    enthusiasmPrompt?: boolean
    customerPrompt?: boolean
    companyRankingPrompt?: boolean
    createdAt?: boolean
  }, ExtArgs["result"]["literals"]>

  export type LiteralsSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    aiModel?: boolean
    finalPrompt?: boolean
    commands?: boolean
    companies?: boolean
    introText?: boolean
    strategiesText?: boolean
    rulesText?: boolean
    templateText?: boolean
    welcomeText?: boolean
    skillPrompt?: boolean
    enthusiasmPrompt?: boolean
    customerPrompt?: boolean
    companyRankingPrompt?: boolean
    createdAt?: boolean
  }, ExtArgs["result"]["literals"]>

  export type LiteralsSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    aiModel?: boolean
    finalPrompt?: boolean
    commands?: boolean
    companies?: boolean
    introText?: boolean
    strategiesText?: boolean
    rulesText?: boolean
    templateText?: boolean
    welcomeText?: boolean
    skillPrompt?: boolean
    enthusiasmPrompt?: boolean
    customerPrompt?: boolean
    companyRankingPrompt?: boolean
    createdAt?: boolean
  }, ExtArgs["result"]["literals"]>

  export type LiteralsSelectScalar = {
    id?: boolean
    aiModel?: boolean
    finalPrompt?: boolean
    commands?: boolean
    companies?: boolean
    introText?: boolean
    strategiesText?: boolean
    rulesText?: boolean
    templateText?: boolean
    welcomeText?: boolean
    skillPrompt?: boolean
    enthusiasmPrompt?: boolean
    customerPrompt?: boolean
    companyRankingPrompt?: boolean
    createdAt?: boolean
  }

  export type LiteralsOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "aiModel" | "finalPrompt" | "commands" | "companies" | "introText" | "strategiesText" | "rulesText" | "templateText" | "welcomeText" | "skillPrompt" | "enthusiasmPrompt" | "customerPrompt" | "companyRankingPrompt" | "createdAt", ExtArgs["result"]["literals"]>

  export type $LiteralsPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Literals"
    objects: {}
    scalars: $Extensions.GetPayloadResult<{
      id: number
      aiModel: string
      finalPrompt: string
      commands: Prisma.JsonValue
      companies: Prisma.JsonValue
      introText: string | null
      strategiesText: string | null
      rulesText: string | null
      templateText: string | null
      welcomeText: string | null
      skillPrompt: string | null
      enthusiasmPrompt: string | null
      customerPrompt: string | null
      companyRankingPrompt: string | null
      createdAt: Date
    }, ExtArgs["result"]["literals"]>
    composites: {}
  }

  type LiteralsGetPayload<S extends boolean | null | undefined | LiteralsDefaultArgs> = $Result.GetResult<Prisma.$LiteralsPayload, S>

  type LiteralsCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<LiteralsFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: LiteralsCountAggregateInputType | true
    }

  export interface LiteralsDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Literals'], meta: { name: 'Literals' } }
    /**
     * Find zero or one Literals that matches the filter.
     * @param {LiteralsFindUniqueArgs} args - Arguments to find a Literals
     * @example
     * // Get one Literals
     * const literals = await prisma.literals.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends LiteralsFindUniqueArgs>(args: SelectSubset<T, LiteralsFindUniqueArgs<ExtArgs>>): Prisma__LiteralsClient<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Literals that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {LiteralsFindUniqueOrThrowArgs} args - Arguments to find a Literals
     * @example
     * // Get one Literals
     * const literals = await prisma.literals.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends LiteralsFindUniqueOrThrowArgs>(args: SelectSubset<T, LiteralsFindUniqueOrThrowArgs<ExtArgs>>): Prisma__LiteralsClient<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Literals 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 {LiteralsFindFirstArgs} args - Arguments to find a Literals
     * @example
     * // Get one Literals
     * const literals = await prisma.literals.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends LiteralsFindFirstArgs>(args?: SelectSubset<T, LiteralsFindFirstArgs<ExtArgs>>): Prisma__LiteralsClient<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Literals 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 {LiteralsFindFirstOrThrowArgs} args - Arguments to find a Literals
     * @example
     * // Get one Literals
     * const literals = await prisma.literals.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends LiteralsFindFirstOrThrowArgs>(args?: SelectSubset<T, LiteralsFindFirstOrThrowArgs<ExtArgs>>): Prisma__LiteralsClient<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Literals 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 {LiteralsFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Literals
     * const literals = await prisma.literals.findMany()
     * 
     * // Get first 10 Literals
     * const literals = await prisma.literals.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const literalsWithIdOnly = await prisma.literals.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends LiteralsFindManyArgs>(args?: SelectSubset<T, LiteralsFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Literals.
     * @param {LiteralsCreateArgs} args - Arguments to create a Literals.
     * @example
     * // Create one Literals
     * const Literals = await prisma.literals.create({
     *   data: {
     *     // ... data to create a Literals
     *   }
     * })
     * 
     */
    create<T extends LiteralsCreateArgs>(args: SelectSubset<T, LiteralsCreateArgs<ExtArgs>>): Prisma__LiteralsClient<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Literals.
     * @param {LiteralsCreateManyArgs} args - Arguments to create many Literals.
     * @example
     * // Create many Literals
     * const literals = await prisma.literals.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends LiteralsCreateManyArgs>(args?: SelectSubset<T, LiteralsCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many Literals and returns the data saved in the database.
     * @param {LiteralsCreateManyAndReturnArgs} args - Arguments to create many Literals.
     * @example
     * // Create many Literals
     * const literals = await prisma.literals.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many Literals and only return the `id`
     * const literalsWithIdOnly = await prisma.literals.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<T extends LiteralsCreateManyAndReturnArgs>(args?: SelectSubset<T, LiteralsCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a Literals.
     * @param {LiteralsDeleteArgs} args - Arguments to delete one Literals.
     * @example
     * // Delete one Literals
     * const Literals = await prisma.literals.delete({
     *   where: {
     *     // ... filter to delete one Literals
     *   }
     * })
     * 
     */
    delete<T extends LiteralsDeleteArgs>(args: SelectSubset<T, LiteralsDeleteArgs<ExtArgs>>): Prisma__LiteralsClient<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Literals.
     * @param {LiteralsUpdateArgs} args - Arguments to update one Literals.
     * @example
     * // Update one Literals
     * const literals = await prisma.literals.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends LiteralsUpdateArgs>(args: SelectSubset<T, LiteralsUpdateArgs<ExtArgs>>): Prisma__LiteralsClient<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Literals.
     * @param {LiteralsDeleteManyArgs} args - Arguments to filter Literals to delete.
     * @example
     * // Delete a few Literals
     * const { count } = await prisma.literals.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends LiteralsDeleteManyArgs>(args?: SelectSubset<T, LiteralsDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Literals.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {LiteralsUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Literals
     * const literals = await prisma.literals.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends LiteralsUpdateManyArgs>(args: SelectSubset<T, LiteralsUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Literals and returns the data updated in the database.
     * @param {LiteralsUpdateManyAndReturnArgs} args - Arguments to update many Literals.
     * @example
     * // Update many Literals
     * const literals = await prisma.literals.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more Literals and only return the `id`
     * const literalsWithIdOnly = await prisma.literals.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<T extends LiteralsUpdateManyAndReturnArgs>(args: SelectSubset<T, LiteralsUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one Literals.
     * @param {LiteralsUpsertArgs} args - Arguments to update or create a Literals.
     * @example
     * // Update or create a Literals
     * const literals = await prisma.literals.upsert({
     *   create: {
     *     // ... data to create a Literals
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Literals we want to update
     *   }
     * })
     */
    upsert<T extends LiteralsUpsertArgs>(args: SelectSubset<T, LiteralsUpsertArgs<ExtArgs>>): Prisma__LiteralsClient<$Result.GetResult<Prisma.$LiteralsPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Literals.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {LiteralsCountArgs} args - Arguments to filter Literals to count.
     * @example
     * // Count the number of Literals
     * const count = await prisma.literals.count({
     *   where: {
     *     // ... the filter for the Literals we want to count
     *   }
     * })
    **/
    count<T extends LiteralsCountArgs>(
      args?: Subset<T, LiteralsCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], LiteralsCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Literals.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {LiteralsAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends LiteralsAggregateArgs>(args: Subset<T, LiteralsAggregateArgs>): Prisma.PrismaPromise<GetLiteralsAggregateType<T>>

    /**
     * Group by Literals.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {LiteralsGroupByArgs} 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 LiteralsGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: LiteralsGroupByArgs['orderBy'] }
        : { orderBy?: LiteralsGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, LiteralsGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetLiteralsGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Literals model
   */
  readonly fields: LiteralsFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Literals.
   * 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__LiteralsClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    /**
     * Attaches callbacks for the resolution and/or rejection of the Promise.
     * @param onfulfilled The callback to execute when the Promise is resolved.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of which ever callback is executed.
     */
    then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Literals model
   */
  interface LiteralsFieldRefs {
    readonly id: FieldRef<"Literals", 'Int'>
    readonly aiModel: FieldRef<"Literals", 'String'>
    readonly finalPrompt: FieldRef<"Literals", 'String'>
    readonly commands: FieldRef<"Literals", 'Json'>
    readonly companies: FieldRef<"Literals", 'Json'>
    readonly introText: FieldRef<"Literals", 'String'>
    readonly strategiesText: FieldRef<"Literals", 'String'>
    readonly rulesText: FieldRef<"Literals", 'String'>
    readonly templateText: FieldRef<"Literals", 'String'>
    readonly welcomeText: FieldRef<"Literals", 'String'>
    readonly skillPrompt: FieldRef<"Literals", 'String'>
    readonly enthusiasmPrompt: FieldRef<"Literals", 'String'>
    readonly customerPrompt: FieldRef<"Literals", 'String'>
    readonly companyRankingPrompt: FieldRef<"Literals", 'String'>
    readonly createdAt: FieldRef<"Literals", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Literals findUnique
   */
  export type LiteralsFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * Filter, which Literals to fetch.
     */
    where: LiteralsWhereUniqueInput
  }

  /**
   * Literals findUniqueOrThrow
   */
  export type LiteralsFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * Filter, which Literals to fetch.
     */
    where: LiteralsWhereUniqueInput
  }

  /**
   * Literals findFirst
   */
  export type LiteralsFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * Filter, which Literals to fetch.
     */
    where?: LiteralsWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Literals to fetch.
     */
    orderBy?: LiteralsOrderByWithRelationInput | LiteralsOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Literals.
     */
    cursor?: LiteralsWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Literals 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` Literals.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Literals.
     */
    distinct?: LiteralsScalarFieldEnum | LiteralsScalarFieldEnum[]
  }

  /**
   * Literals findFirstOrThrow
   */
  export type LiteralsFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * Filter, which Literals to fetch.
     */
    where?: LiteralsWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Literals to fetch.
     */
    orderBy?: LiteralsOrderByWithRelationInput | LiteralsOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Literals.
     */
    cursor?: LiteralsWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Literals 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` Literals.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Literals.
     */
    distinct?: LiteralsScalarFieldEnum | LiteralsScalarFieldEnum[]
  }

  /**
   * Literals findMany
   */
  export type LiteralsFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * Filter, which Literals to fetch.
     */
    where?: LiteralsWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Literals to fetch.
     */
    orderBy?: LiteralsOrderByWithRelationInput | LiteralsOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Literals.
     */
    cursor?: LiteralsWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Literals 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` Literals.
     */
    skip?: number
    distinct?: LiteralsScalarFieldEnum | LiteralsScalarFieldEnum[]
  }

  /**
   * Literals create
   */
  export type LiteralsCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * The data needed to create a Literals.
     */
    data: XOR<LiteralsCreateInput, LiteralsUncheckedCreateInput>
  }

  /**
   * Literals createMany
   */
  export type LiteralsCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Literals.
     */
    data: LiteralsCreateManyInput | LiteralsCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Literals createManyAndReturn
   */
  export type LiteralsCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * The data used to create many Literals.
     */
    data: LiteralsCreateManyInput | LiteralsCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Literals update
   */
  export type LiteralsUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * The data needed to update a Literals.
     */
    data: XOR<LiteralsUpdateInput, LiteralsUncheckedUpdateInput>
    /**
     * Choose, which Literals to update.
     */
    where: LiteralsWhereUniqueInput
  }

  /**
   * Literals updateMany
   */
  export type LiteralsUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Literals.
     */
    data: XOR<LiteralsUpdateManyMutationInput, LiteralsUncheckedUpdateManyInput>
    /**
     * Filter which Literals to update
     */
    where?: LiteralsWhereInput
    /**
     * Limit how many Literals to update.
     */
    limit?: number
  }

  /**
   * Literals updateManyAndReturn
   */
  export type LiteralsUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * The data used to update Literals.
     */
    data: XOR<LiteralsUpdateManyMutationInput, LiteralsUncheckedUpdateManyInput>
    /**
     * Filter which Literals to update
     */
    where?: LiteralsWhereInput
    /**
     * Limit how many Literals to update.
     */
    limit?: number
  }

  /**
   * Literals upsert
   */
  export type LiteralsUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * The filter to search for the Literals to update in case it exists.
     */
    where: LiteralsWhereUniqueInput
    /**
     * In case the Literals found by the `where` argument doesn't exist, create a new Literals with this data.
     */
    create: XOR<LiteralsCreateInput, LiteralsUncheckedCreateInput>
    /**
     * In case the Literals was found with the provided `where` argument, update it with this data.
     */
    update: XOR<LiteralsUpdateInput, LiteralsUncheckedUpdateInput>
  }

  /**
   * Literals delete
   */
  export type LiteralsDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
    /**
     * Filter which Literals to delete.
     */
    where: LiteralsWhereUniqueInput
  }

  /**
   * Literals deleteMany
   */
  export type LiteralsDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Literals to delete
     */
    where?: LiteralsWhereInput
    /**
     * Limit how many Literals to delete.
     */
    limit?: number
  }

  /**
   * Literals without action
   */
  export type LiteralsDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Literals
     */
    select?: LiteralsSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Literals
     */
    omit?: LiteralsOmit<ExtArgs> | null
  }


  /**
   * Model TelegramUser
   */

  export type AggregateTelegramUser = {
    _count: TelegramUserCountAggregateOutputType | null
    _avg: TelegramUserAvgAggregateOutputType | null
    _sum: TelegramUserSumAggregateOutputType | null
    _min: TelegramUserMinAggregateOutputType | null
    _max: TelegramUserMaxAggregateOutputType | null
  }

  export type TelegramUserAvgAggregateOutputType = {
    balance: number | null
  }

  export type TelegramUserSumAggregateOutputType = {
    balance: number | null
  }

  export type TelegramUserMinAggregateOutputType = {
    id: string | null
    telegramId: string | null
    username: string | null
    firstName: string | null
    lastName: string | null
    balance: number | null
    lastInteraction: Date | null
    consultingRequest: string | null
    respondent: $Enums.RespondentType | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type TelegramUserMaxAggregateOutputType = {
    id: string | null
    telegramId: string | null
    username: string | null
    firstName: string | null
    lastName: string | null
    balance: number | null
    lastInteraction: Date | null
    consultingRequest: string | null
    respondent: $Enums.RespondentType | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type TelegramUserCountAggregateOutputType = {
    id: number
    telegramId: number
    username: number
    firstName: number
    lastName: number
    balance: number
    lastInteraction: number
    consultingRequest: number
    respondent: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type TelegramUserAvgAggregateInputType = {
    balance?: true
  }

  export type TelegramUserSumAggregateInputType = {
    balance?: true
  }

  export type TelegramUserMinAggregateInputType = {
    id?: true
    telegramId?: true
    username?: true
    firstName?: true
    lastName?: true
    balance?: true
    lastInteraction?: true
    consultingRequest?: true
    respondent?: true
    createdAt?: true
    updatedAt?: true
  }

  export type TelegramUserMaxAggregateInputType = {
    id?: true
    telegramId?: true
    username?: true
    firstName?: true
    lastName?: true
    balance?: true
    lastInteraction?: true
    consultingRequest?: true
    respondent?: true
    createdAt?: true
    updatedAt?: true
  }

  export type TelegramUserCountAggregateInputType = {
    id?: true
    telegramId?: true
    username?: true
    firstName?: true
    lastName?: true
    balance?: true
    lastInteraction?: true
    consultingRequest?: true
    respondent?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type TelegramUserAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which TelegramUser to aggregate.
     */
    where?: TelegramUserWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of TelegramUsers to fetch.
     */
    orderBy?: TelegramUserOrderByWithRelationInput | TelegramUserOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: TelegramUserWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` TelegramUsers 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` TelegramUsers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned TelegramUsers
    **/
    _count?: true | TelegramUserCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: TelegramUserAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: TelegramUserSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: TelegramUserMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: TelegramUserMaxAggregateInputType
  }

  export type GetTelegramUserAggregateType<T extends TelegramUserAggregateArgs> = {
        [P in keyof T & keyof AggregateTelegramUser]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateTelegramUser[P]>
      : GetScalarType<T[P], AggregateTelegramUser[P]>
  }




  export type TelegramUserGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: TelegramUserWhereInput
    orderBy?: TelegramUserOrderByWithAggregationInput | TelegramUserOrderByWithAggregationInput[]
    by: TelegramUserScalarFieldEnum[] | TelegramUserScalarFieldEnum
    having?: TelegramUserScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: TelegramUserCountAggregateInputType | true
    _avg?: TelegramUserAvgAggregateInputType
    _sum?: TelegramUserSumAggregateInputType
    _min?: TelegramUserMinAggregateInputType
    _max?: TelegramUserMaxAggregateInputType
  }

  export type TelegramUserGroupByOutputType = {
    id: string
    telegramId: string
    username: string | null
    firstName: string | null
    lastName: string | null
    balance: number
    lastInteraction: Date
    consultingRequest: string
    respondent: $Enums.RespondentType
    createdAt: Date
    updatedAt: Date
    _count: TelegramUserCountAggregateOutputType | null
    _avg: TelegramUserAvgAggregateOutputType | null
    _sum: TelegramUserSumAggregateOutputType | null
    _min: TelegramUserMinAggregateOutputType | null
    _max: TelegramUserMaxAggregateOutputType | null
  }

  type GetTelegramUserGroupByPayload<T extends TelegramUserGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<TelegramUserGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof TelegramUserGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], TelegramUserGroupByOutputType[P]>
            : GetScalarType<T[P], TelegramUserGroupByOutputType[P]>
        }
      >
    >


  export type TelegramUserSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramId?: boolean
    username?: boolean
    firstName?: boolean
    lastName?: boolean
    balance?: boolean
    lastInteraction?: boolean
    consultingRequest?: boolean
    respondent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    conversations?: boolean | TelegramUser$conversationsArgs<ExtArgs>
    userProducts?: boolean | TelegramUser$userProductsArgs<ExtArgs>
    userTransactions?: boolean | TelegramUser$userTransactionsArgs<ExtArgs>
    UserBotStates?: boolean | TelegramUser$UserBotStatesArgs<ExtArgs>
    UserTicket?: boolean | TelegramUser$UserTicketArgs<ExtArgs>
    _count?: boolean | TelegramUserCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["telegramUser"]>

  export type TelegramUserSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramId?: boolean
    username?: boolean
    firstName?: boolean
    lastName?: boolean
    balance?: boolean
    lastInteraction?: boolean
    consultingRequest?: boolean
    respondent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["telegramUser"]>

  export type TelegramUserSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramId?: boolean
    username?: boolean
    firstName?: boolean
    lastName?: boolean
    balance?: boolean
    lastInteraction?: boolean
    consultingRequest?: boolean
    respondent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["telegramUser"]>

  export type TelegramUserSelectScalar = {
    id?: boolean
    telegramId?: boolean
    username?: boolean
    firstName?: boolean
    lastName?: boolean
    balance?: boolean
    lastInteraction?: boolean
    consultingRequest?: boolean
    respondent?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type TelegramUserOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "telegramId" | "username" | "firstName" | "lastName" | "balance" | "lastInteraction" | "consultingRequest" | "respondent" | "createdAt" | "updatedAt", ExtArgs["result"]["telegramUser"]>
  export type TelegramUserInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    conversations?: boolean | TelegramUser$conversationsArgs<ExtArgs>
    userProducts?: boolean | TelegramUser$userProductsArgs<ExtArgs>
    userTransactions?: boolean | TelegramUser$userTransactionsArgs<ExtArgs>
    UserBotStates?: boolean | TelegramUser$UserBotStatesArgs<ExtArgs>
    UserTicket?: boolean | TelegramUser$UserTicketArgs<ExtArgs>
    _count?: boolean | TelegramUserCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type TelegramUserIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
  export type TelegramUserIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}

  export type $TelegramUserPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "TelegramUser"
    objects: {
      conversations: Prisma.$ConversationPayload<ExtArgs>[]
      userProducts: Prisma.$UserProductPayload<ExtArgs>[]
      userTransactions: Prisma.$UserTransactionPayload<ExtArgs>[]
      UserBotStates: Prisma.$UserBotStatePayload<ExtArgs>[]
      UserTicket: Prisma.$UserTicketPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      telegramId: string
      username: string | null
      firstName: string | null
      lastName: string | null
      balance: number
      lastInteraction: Date
      consultingRequest: string
      respondent: $Enums.RespondentType
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["telegramUser"]>
    composites: {}
  }

  type TelegramUserGetPayload<S extends boolean | null | undefined | TelegramUserDefaultArgs> = $Result.GetResult<Prisma.$TelegramUserPayload, S>

  type TelegramUserCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<TelegramUserFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: TelegramUserCountAggregateInputType | true
    }

  export interface TelegramUserDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['TelegramUser'], meta: { name: 'TelegramUser' } }
    /**
     * Find zero or one TelegramUser that matches the filter.
     * @param {TelegramUserFindUniqueArgs} args - Arguments to find a TelegramUser
     * @example
     * // Get one TelegramUser
     * const telegramUser = await prisma.telegramUser.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends TelegramUserFindUniqueArgs>(args: SelectSubset<T, TelegramUserFindUniqueArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one TelegramUser that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {TelegramUserFindUniqueOrThrowArgs} args - Arguments to find a TelegramUser
     * @example
     * // Get one TelegramUser
     * const telegramUser = await prisma.telegramUser.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends TelegramUserFindUniqueOrThrowArgs>(args: SelectSubset<T, TelegramUserFindUniqueOrThrowArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first TelegramUser 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 {TelegramUserFindFirstArgs} args - Arguments to find a TelegramUser
     * @example
     * // Get one TelegramUser
     * const telegramUser = await prisma.telegramUser.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends TelegramUserFindFirstArgs>(args?: SelectSubset<T, TelegramUserFindFirstArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first TelegramUser 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 {TelegramUserFindFirstOrThrowArgs} args - Arguments to find a TelegramUser
     * @example
     * // Get one TelegramUser
     * const telegramUser = await prisma.telegramUser.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends TelegramUserFindFirstOrThrowArgs>(args?: SelectSubset<T, TelegramUserFindFirstOrThrowArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more TelegramUsers 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 {TelegramUserFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all TelegramUsers
     * const telegramUsers = await prisma.telegramUser.findMany()
     * 
     * // Get first 10 TelegramUsers
     * const telegramUsers = await prisma.telegramUser.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const telegramUserWithIdOnly = await prisma.telegramUser.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends TelegramUserFindManyArgs>(args?: SelectSubset<T, TelegramUserFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a TelegramUser.
     * @param {TelegramUserCreateArgs} args - Arguments to create a TelegramUser.
     * @example
     * // Create one TelegramUser
     * const TelegramUser = await prisma.telegramUser.create({
     *   data: {
     *     // ... data to create a TelegramUser
     *   }
     * })
     * 
     */
    create<T extends TelegramUserCreateArgs>(args: SelectSubset<T, TelegramUserCreateArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many TelegramUsers.
     * @param {TelegramUserCreateManyArgs} args - Arguments to create many TelegramUsers.
     * @example
     * // Create many TelegramUsers
     * const telegramUser = await prisma.telegramUser.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends TelegramUserCreateManyArgs>(args?: SelectSubset<T, TelegramUserCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many TelegramUsers and returns the data saved in the database.
     * @param {TelegramUserCreateManyAndReturnArgs} args - Arguments to create many TelegramUsers.
     * @example
     * // Create many TelegramUsers
     * const telegramUser = await prisma.telegramUser.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many TelegramUsers and only return the `id`
     * const telegramUserWithIdOnly = await prisma.telegramUser.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<T extends TelegramUserCreateManyAndReturnArgs>(args?: SelectSubset<T, TelegramUserCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a TelegramUser.
     * @param {TelegramUserDeleteArgs} args - Arguments to delete one TelegramUser.
     * @example
     * // Delete one TelegramUser
     * const TelegramUser = await prisma.telegramUser.delete({
     *   where: {
     *     // ... filter to delete one TelegramUser
     *   }
     * })
     * 
     */
    delete<T extends TelegramUserDeleteArgs>(args: SelectSubset<T, TelegramUserDeleteArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one TelegramUser.
     * @param {TelegramUserUpdateArgs} args - Arguments to update one TelegramUser.
     * @example
     * // Update one TelegramUser
     * const telegramUser = await prisma.telegramUser.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends TelegramUserUpdateArgs>(args: SelectSubset<T, TelegramUserUpdateArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more TelegramUsers.
     * @param {TelegramUserDeleteManyArgs} args - Arguments to filter TelegramUsers to delete.
     * @example
     * // Delete a few TelegramUsers
     * const { count } = await prisma.telegramUser.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends TelegramUserDeleteManyArgs>(args?: SelectSubset<T, TelegramUserDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more TelegramUsers.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {TelegramUserUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many TelegramUsers
     * const telegramUser = await prisma.telegramUser.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends TelegramUserUpdateManyArgs>(args: SelectSubset<T, TelegramUserUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more TelegramUsers and returns the data updated in the database.
     * @param {TelegramUserUpdateManyAndReturnArgs} args - Arguments to update many TelegramUsers.
     * @example
     * // Update many TelegramUsers
     * const telegramUser = await prisma.telegramUser.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more TelegramUsers and only return the `id`
     * const telegramUserWithIdOnly = await prisma.telegramUser.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<T extends TelegramUserUpdateManyAndReturnArgs>(args: SelectSubset<T, TelegramUserUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one TelegramUser.
     * @param {TelegramUserUpsertArgs} args - Arguments to update or create a TelegramUser.
     * @example
     * // Update or create a TelegramUser
     * const telegramUser = await prisma.telegramUser.upsert({
     *   create: {
     *     // ... data to create a TelegramUser
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the TelegramUser we want to update
     *   }
     * })
     */
    upsert<T extends TelegramUserUpsertArgs>(args: SelectSubset<T, TelegramUserUpsertArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of TelegramUsers.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {TelegramUserCountArgs} args - Arguments to filter TelegramUsers to count.
     * @example
     * // Count the number of TelegramUsers
     * const count = await prisma.telegramUser.count({
     *   where: {
     *     // ... the filter for the TelegramUsers we want to count
     *   }
     * })
    **/
    count<T extends TelegramUserCountArgs>(
      args?: Subset<T, TelegramUserCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], TelegramUserCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a TelegramUser.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {TelegramUserAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends TelegramUserAggregateArgs>(args: Subset<T, TelegramUserAggregateArgs>): Prisma.PrismaPromise<GetTelegramUserAggregateType<T>>

    /**
     * Group by TelegramUser.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {TelegramUserGroupByArgs} 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 TelegramUserGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: TelegramUserGroupByArgs['orderBy'] }
        : { orderBy?: TelegramUserGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, TelegramUserGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetTelegramUserGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the TelegramUser model
   */
  readonly fields: TelegramUserFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for TelegramUser.
   * 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__TelegramUserClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    conversations<T extends TelegramUser$conversationsArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUser$conversationsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    userProducts<T extends TelegramUser$userProductsArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUser$userProductsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    userTransactions<T extends TelegramUser$userTransactionsArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUser$userTransactionsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    UserBotStates<T extends TelegramUser$UserBotStatesArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUser$UserBotStatesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
    UserTicket<T extends TelegramUser$UserTicketArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUser$UserTicketArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the TelegramUser model
   */
  interface TelegramUserFieldRefs {
    readonly id: FieldRef<"TelegramUser", 'String'>
    readonly telegramId: FieldRef<"TelegramUser", 'String'>
    readonly username: FieldRef<"TelegramUser", 'String'>
    readonly firstName: FieldRef<"TelegramUser", 'String'>
    readonly lastName: FieldRef<"TelegramUser", 'String'>
    readonly balance: FieldRef<"TelegramUser", 'Float'>
    readonly lastInteraction: FieldRef<"TelegramUser", 'DateTime'>
    readonly consultingRequest: FieldRef<"TelegramUser", 'String'>
    readonly respondent: FieldRef<"TelegramUser", 'RespondentType'>
    readonly createdAt: FieldRef<"TelegramUser", 'DateTime'>
    readonly updatedAt: FieldRef<"TelegramUser", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * TelegramUser findUnique
   */
  export type TelegramUserFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * Filter, which TelegramUser to fetch.
     */
    where: TelegramUserWhereUniqueInput
  }

  /**
   * TelegramUser findUniqueOrThrow
   */
  export type TelegramUserFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * Filter, which TelegramUser to fetch.
     */
    where: TelegramUserWhereUniqueInput
  }

  /**
   * TelegramUser findFirst
   */
  export type TelegramUserFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * Filter, which TelegramUser to fetch.
     */
    where?: TelegramUserWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of TelegramUsers to fetch.
     */
    orderBy?: TelegramUserOrderByWithRelationInput | TelegramUserOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for TelegramUsers.
     */
    cursor?: TelegramUserWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` TelegramUsers 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` TelegramUsers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of TelegramUsers.
     */
    distinct?: TelegramUserScalarFieldEnum | TelegramUserScalarFieldEnum[]
  }

  /**
   * TelegramUser findFirstOrThrow
   */
  export type TelegramUserFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * Filter, which TelegramUser to fetch.
     */
    where?: TelegramUserWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of TelegramUsers to fetch.
     */
    orderBy?: TelegramUserOrderByWithRelationInput | TelegramUserOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for TelegramUsers.
     */
    cursor?: TelegramUserWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` TelegramUsers 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` TelegramUsers.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of TelegramUsers.
     */
    distinct?: TelegramUserScalarFieldEnum | TelegramUserScalarFieldEnum[]
  }

  /**
   * TelegramUser findMany
   */
  export type TelegramUserFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * Filter, which TelegramUsers to fetch.
     */
    where?: TelegramUserWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of TelegramUsers to fetch.
     */
    orderBy?: TelegramUserOrderByWithRelationInput | TelegramUserOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing TelegramUsers.
     */
    cursor?: TelegramUserWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` TelegramUsers 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` TelegramUsers.
     */
    skip?: number
    distinct?: TelegramUserScalarFieldEnum | TelegramUserScalarFieldEnum[]
  }

  /**
   * TelegramUser create
   */
  export type TelegramUserCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * The data needed to create a TelegramUser.
     */
    data: XOR<TelegramUserCreateInput, TelegramUserUncheckedCreateInput>
  }

  /**
   * TelegramUser createMany
   */
  export type TelegramUserCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many TelegramUsers.
     */
    data: TelegramUserCreateManyInput | TelegramUserCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * TelegramUser createManyAndReturn
   */
  export type TelegramUserCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * The data used to create many TelegramUsers.
     */
    data: TelegramUserCreateManyInput | TelegramUserCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * TelegramUser update
   */
  export type TelegramUserUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * The data needed to update a TelegramUser.
     */
    data: XOR<TelegramUserUpdateInput, TelegramUserUncheckedUpdateInput>
    /**
     * Choose, which TelegramUser to update.
     */
    where: TelegramUserWhereUniqueInput
  }

  /**
   * TelegramUser updateMany
   */
  export type TelegramUserUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update TelegramUsers.
     */
    data: XOR<TelegramUserUpdateManyMutationInput, TelegramUserUncheckedUpdateManyInput>
    /**
     * Filter which TelegramUsers to update
     */
    where?: TelegramUserWhereInput
    /**
     * Limit how many TelegramUsers to update.
     */
    limit?: number
  }

  /**
   * TelegramUser updateManyAndReturn
   */
  export type TelegramUserUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * The data used to update TelegramUsers.
     */
    data: XOR<TelegramUserUpdateManyMutationInput, TelegramUserUncheckedUpdateManyInput>
    /**
     * Filter which TelegramUsers to update
     */
    where?: TelegramUserWhereInput
    /**
     * Limit how many TelegramUsers to update.
     */
    limit?: number
  }

  /**
   * TelegramUser upsert
   */
  export type TelegramUserUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * The filter to search for the TelegramUser to update in case it exists.
     */
    where: TelegramUserWhereUniqueInput
    /**
     * In case the TelegramUser found by the `where` argument doesn't exist, create a new TelegramUser with this data.
     */
    create: XOR<TelegramUserCreateInput, TelegramUserUncheckedCreateInput>
    /**
     * In case the TelegramUser was found with the provided `where` argument, update it with this data.
     */
    update: XOR<TelegramUserUpdateInput, TelegramUserUncheckedUpdateInput>
  }

  /**
   * TelegramUser delete
   */
  export type TelegramUserDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
    /**
     * Filter which TelegramUser to delete.
     */
    where: TelegramUserWhereUniqueInput
  }

  /**
   * TelegramUser deleteMany
   */
  export type TelegramUserDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which TelegramUsers to delete
     */
    where?: TelegramUserWhereInput
    /**
     * Limit how many TelegramUsers to delete.
     */
    limit?: number
  }

  /**
   * TelegramUser.conversations
   */
  export type TelegramUser$conversationsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    where?: ConversationWhereInput
    orderBy?: ConversationOrderByWithRelationInput | ConversationOrderByWithRelationInput[]
    cursor?: ConversationWhereUniqueInput
    take?: number
    skip?: number
    distinct?: ConversationScalarFieldEnum | ConversationScalarFieldEnum[]
  }

  /**
   * TelegramUser.userProducts
   */
  export type TelegramUser$userProductsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    where?: UserProductWhereInput
    orderBy?: UserProductOrderByWithRelationInput | UserProductOrderByWithRelationInput[]
    cursor?: UserProductWhereUniqueInput
    take?: number
    skip?: number
    distinct?: UserProductScalarFieldEnum | UserProductScalarFieldEnum[]
  }

  /**
   * TelegramUser.userTransactions
   */
  export type TelegramUser$userTransactionsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    where?: UserTransactionWhereInput
    orderBy?: UserTransactionOrderByWithRelationInput | UserTransactionOrderByWithRelationInput[]
    cursor?: UserTransactionWhereUniqueInput
    take?: number
    skip?: number
    distinct?: UserTransactionScalarFieldEnum | UserTransactionScalarFieldEnum[]
  }

  /**
   * TelegramUser.UserBotStates
   */
  export type TelegramUser$UserBotStatesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    where?: UserBotStateWhereInput
    orderBy?: UserBotStateOrderByWithRelationInput | UserBotStateOrderByWithRelationInput[]
    cursor?: UserBotStateWhereUniqueInput
    take?: number
    skip?: number
    distinct?: UserBotStateScalarFieldEnum | UserBotStateScalarFieldEnum[]
  }

  /**
   * TelegramUser.UserTicket
   */
  export type TelegramUser$UserTicketArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    where?: UserTicketWhereInput
    orderBy?: UserTicketOrderByWithRelationInput | UserTicketOrderByWithRelationInput[]
    cursor?: UserTicketWhereUniqueInput
    take?: number
    skip?: number
    distinct?: UserTicketScalarFieldEnum | UserTicketScalarFieldEnum[]
  }

  /**
   * TelegramUser without action
   */
  export type TelegramUserDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the TelegramUser
     */
    select?: TelegramUserSelect<ExtArgs> | null
    /**
     * Omit specific fields from the TelegramUser
     */
    omit?: TelegramUserOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: TelegramUserInclude<ExtArgs> | null
  }


  /**
   * Model Conversation
   */

  export type AggregateConversation = {
    _count: ConversationCountAggregateOutputType | null
    _min: ConversationMinAggregateOutputType | null
    _max: ConversationMaxAggregateOutputType | null
  }

  export type ConversationMinAggregateOutputType = {
    id: string | null
    telegramUserId: string | null
    telegramChatId: string | null
    title: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type ConversationMaxAggregateOutputType = {
    id: string | null
    telegramUserId: string | null
    telegramChatId: string | null
    title: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type ConversationCountAggregateOutputType = {
    id: number
    telegramUserId: number
    telegramChatId: number
    title: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type ConversationMinAggregateInputType = {
    id?: true
    telegramUserId?: true
    telegramChatId?: true
    title?: true
    createdAt?: true
    updatedAt?: true
  }

  export type ConversationMaxAggregateInputType = {
    id?: true
    telegramUserId?: true
    telegramChatId?: true
    title?: true
    createdAt?: true
    updatedAt?: true
  }

  export type ConversationCountAggregateInputType = {
    id?: true
    telegramUserId?: true
    telegramChatId?: true
    title?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type ConversationAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Conversation to aggregate.
     */
    where?: ConversationWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Conversations to fetch.
     */
    orderBy?: ConversationOrderByWithRelationInput | ConversationOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ConversationWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Conversations 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` Conversations.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Conversations
    **/
    _count?: true | ConversationCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ConversationMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ConversationMaxAggregateInputType
  }

  export type GetConversationAggregateType<T extends ConversationAggregateArgs> = {
        [P in keyof T & keyof AggregateConversation]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateConversation[P]>
      : GetScalarType<T[P], AggregateConversation[P]>
  }




  export type ConversationGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ConversationWhereInput
    orderBy?: ConversationOrderByWithAggregationInput | ConversationOrderByWithAggregationInput[]
    by: ConversationScalarFieldEnum[] | ConversationScalarFieldEnum
    having?: ConversationScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ConversationCountAggregateInputType | true
    _min?: ConversationMinAggregateInputType
    _max?: ConversationMaxAggregateInputType
  }

  export type ConversationGroupByOutputType = {
    id: string
    telegramUserId: string
    telegramChatId: string
    title: string | null
    createdAt: Date
    updatedAt: Date
    _count: ConversationCountAggregateOutputType | null
    _min: ConversationMinAggregateOutputType | null
    _max: ConversationMaxAggregateOutputType | null
  }

  type GetConversationGroupByPayload<T extends ConversationGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<ConversationGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof ConversationGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], ConversationGroupByOutputType[P]>
            : GetScalarType<T[P], ConversationGroupByOutputType[P]>
        }
      >
    >


  export type ConversationSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    telegramChatId?: boolean
    title?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
    messages?: boolean | Conversation$messagesArgs<ExtArgs>
    _count?: boolean | ConversationCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["conversation"]>

  export type ConversationSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    telegramChatId?: boolean
    title?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["conversation"]>

  export type ConversationSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    telegramChatId?: boolean
    title?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["conversation"]>

  export type ConversationSelectScalar = {
    id?: boolean
    telegramUserId?: boolean
    telegramChatId?: boolean
    title?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type ConversationOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "telegramUserId" | "telegramChatId" | "title" | "createdAt" | "updatedAt", ExtArgs["result"]["conversation"]>
  export type ConversationInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
    messages?: boolean | Conversation$messagesArgs<ExtArgs>
    _count?: boolean | ConversationCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type ConversationIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }
  export type ConversationIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }

  export type $ConversationPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Conversation"
    objects: {
      telegramUser: Prisma.$TelegramUserPayload<ExtArgs>
      messages: Prisma.$MessagePayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      telegramUserId: string
      telegramChatId: string
      title: string | null
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["conversation"]>
    composites: {}
  }

  type ConversationGetPayload<S extends boolean | null | undefined | ConversationDefaultArgs> = $Result.GetResult<Prisma.$ConversationPayload, S>

  type ConversationCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<ConversationFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: ConversationCountAggregateInputType | true
    }

  export interface ConversationDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Conversation'], meta: { name: 'Conversation' } }
    /**
     * Find zero or one Conversation that matches the filter.
     * @param {ConversationFindUniqueArgs} args - Arguments to find a Conversation
     * @example
     * // Get one Conversation
     * const conversation = await prisma.conversation.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends ConversationFindUniqueArgs>(args: SelectSubset<T, ConversationFindUniqueArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Conversation that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {ConversationFindUniqueOrThrowArgs} args - Arguments to find a Conversation
     * @example
     * // Get one Conversation
     * const conversation = await prisma.conversation.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends ConversationFindUniqueOrThrowArgs>(args: SelectSubset<T, ConversationFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Conversation 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 {ConversationFindFirstArgs} args - Arguments to find a Conversation
     * @example
     * // Get one Conversation
     * const conversation = await prisma.conversation.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends ConversationFindFirstArgs>(args?: SelectSubset<T, ConversationFindFirstArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Conversation 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 {ConversationFindFirstOrThrowArgs} args - Arguments to find a Conversation
     * @example
     * // Get one Conversation
     * const conversation = await prisma.conversation.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends ConversationFindFirstOrThrowArgs>(args?: SelectSubset<T, ConversationFindFirstOrThrowArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Conversations 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 {ConversationFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Conversations
     * const conversations = await prisma.conversation.findMany()
     * 
     * // Get first 10 Conversations
     * const conversations = await prisma.conversation.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const conversationWithIdOnly = await prisma.conversation.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends ConversationFindManyArgs>(args?: SelectSubset<T, ConversationFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Conversation.
     * @param {ConversationCreateArgs} args - Arguments to create a Conversation.
     * @example
     * // Create one Conversation
     * const Conversation = await prisma.conversation.create({
     *   data: {
     *     // ... data to create a Conversation
     *   }
     * })
     * 
     */
    create<T extends ConversationCreateArgs>(args: SelectSubset<T, ConversationCreateArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Conversations.
     * @param {ConversationCreateManyArgs} args - Arguments to create many Conversations.
     * @example
     * // Create many Conversations
     * const conversation = await prisma.conversation.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends ConversationCreateManyArgs>(args?: SelectSubset<T, ConversationCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many Conversations and returns the data saved in the database.
     * @param {ConversationCreateManyAndReturnArgs} args - Arguments to create many Conversations.
     * @example
     * // Create many Conversations
     * const conversation = await prisma.conversation.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many Conversations and only return the `id`
     * const conversationWithIdOnly = await prisma.conversation.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<T extends ConversationCreateManyAndReturnArgs>(args?: SelectSubset<T, ConversationCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a Conversation.
     * @param {ConversationDeleteArgs} args - Arguments to delete one Conversation.
     * @example
     * // Delete one Conversation
     * const Conversation = await prisma.conversation.delete({
     *   where: {
     *     // ... filter to delete one Conversation
     *   }
     * })
     * 
     */
    delete<T extends ConversationDeleteArgs>(args: SelectSubset<T, ConversationDeleteArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Conversation.
     * @param {ConversationUpdateArgs} args - Arguments to update one Conversation.
     * @example
     * // Update one Conversation
     * const conversation = await prisma.conversation.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ConversationUpdateArgs>(args: SelectSubset<T, ConversationUpdateArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Conversations.
     * @param {ConversationDeleteManyArgs} args - Arguments to filter Conversations to delete.
     * @example
     * // Delete a few Conversations
     * const { count } = await prisma.conversation.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends ConversationDeleteManyArgs>(args?: SelectSubset<T, ConversationDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Conversations.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ConversationUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Conversations
     * const conversation = await prisma.conversation.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends ConversationUpdateManyArgs>(args: SelectSubset<T, ConversationUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Conversations and returns the data updated in the database.
     * @param {ConversationUpdateManyAndReturnArgs} args - Arguments to update many Conversations.
     * @example
     * // Update many Conversations
     * const conversation = await prisma.conversation.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more Conversations and only return the `id`
     * const conversationWithIdOnly = await prisma.conversation.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<T extends ConversationUpdateManyAndReturnArgs>(args: SelectSubset<T, ConversationUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one Conversation.
     * @param {ConversationUpsertArgs} args - Arguments to update or create a Conversation.
     * @example
     * // Update or create a Conversation
     * const conversation = await prisma.conversation.upsert({
     *   create: {
     *     // ... data to create a Conversation
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Conversation we want to update
     *   }
     * })
     */
    upsert<T extends ConversationUpsertArgs>(args: SelectSubset<T, ConversationUpsertArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Conversations.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ConversationCountArgs} args - Arguments to filter Conversations to count.
     * @example
     * // Count the number of Conversations
     * const count = await prisma.conversation.count({
     *   where: {
     *     // ... the filter for the Conversations we want to count
     *   }
     * })
    **/
    count<T extends ConversationCountArgs>(
      args?: Subset<T, ConversationCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], ConversationCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Conversation.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ConversationAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends ConversationAggregateArgs>(args: Subset<T, ConversationAggregateArgs>): Prisma.PrismaPromise<GetConversationAggregateType<T>>

    /**
     * Group by Conversation.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ConversationGroupByArgs} 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 ConversationGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: ConversationGroupByArgs['orderBy'] }
        : { orderBy?: ConversationGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, ConversationGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetConversationGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Conversation model
   */
  readonly fields: ConversationFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Conversation.
   * 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__ConversationClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    telegramUser<T extends TelegramUserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUserDefaultArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    messages<T extends Conversation$messagesArgs<ExtArgs> = {}>(args?: Subset<T, Conversation$messagesArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Conversation model
   */
  interface ConversationFieldRefs {
    readonly id: FieldRef<"Conversation", 'String'>
    readonly telegramUserId: FieldRef<"Conversation", 'String'>
    readonly telegramChatId: FieldRef<"Conversation", 'String'>
    readonly title: FieldRef<"Conversation", 'String'>
    readonly createdAt: FieldRef<"Conversation", 'DateTime'>
    readonly updatedAt: FieldRef<"Conversation", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Conversation findUnique
   */
  export type ConversationFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * Filter, which Conversation to fetch.
     */
    where: ConversationWhereUniqueInput
  }

  /**
   * Conversation findUniqueOrThrow
   */
  export type ConversationFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * Filter, which Conversation to fetch.
     */
    where: ConversationWhereUniqueInput
  }

  /**
   * Conversation findFirst
   */
  export type ConversationFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * Filter, which Conversation to fetch.
     */
    where?: ConversationWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Conversations to fetch.
     */
    orderBy?: ConversationOrderByWithRelationInput | ConversationOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Conversations.
     */
    cursor?: ConversationWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Conversations 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` Conversations.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Conversations.
     */
    distinct?: ConversationScalarFieldEnum | ConversationScalarFieldEnum[]
  }

  /**
   * Conversation findFirstOrThrow
   */
  export type ConversationFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * Filter, which Conversation to fetch.
     */
    where?: ConversationWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Conversations to fetch.
     */
    orderBy?: ConversationOrderByWithRelationInput | ConversationOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Conversations.
     */
    cursor?: ConversationWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Conversations 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` Conversations.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Conversations.
     */
    distinct?: ConversationScalarFieldEnum | ConversationScalarFieldEnum[]
  }

  /**
   * Conversation findMany
   */
  export type ConversationFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * Filter, which Conversations to fetch.
     */
    where?: ConversationWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Conversations to fetch.
     */
    orderBy?: ConversationOrderByWithRelationInput | ConversationOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Conversations.
     */
    cursor?: ConversationWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Conversations 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` Conversations.
     */
    skip?: number
    distinct?: ConversationScalarFieldEnum | ConversationScalarFieldEnum[]
  }

  /**
   * Conversation create
   */
  export type ConversationCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * The data needed to create a Conversation.
     */
    data: XOR<ConversationCreateInput, ConversationUncheckedCreateInput>
  }

  /**
   * Conversation createMany
   */
  export type ConversationCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Conversations.
     */
    data: ConversationCreateManyInput | ConversationCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Conversation createManyAndReturn
   */
  export type ConversationCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * The data used to create many Conversations.
     */
    data: ConversationCreateManyInput | ConversationCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Conversation update
   */
  export type ConversationUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * The data needed to update a Conversation.
     */
    data: XOR<ConversationUpdateInput, ConversationUncheckedUpdateInput>
    /**
     * Choose, which Conversation to update.
     */
    where: ConversationWhereUniqueInput
  }

  /**
   * Conversation updateMany
   */
  export type ConversationUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Conversations.
     */
    data: XOR<ConversationUpdateManyMutationInput, ConversationUncheckedUpdateManyInput>
    /**
     * Filter which Conversations to update
     */
    where?: ConversationWhereInput
    /**
     * Limit how many Conversations to update.
     */
    limit?: number
  }

  /**
   * Conversation updateManyAndReturn
   */
  export type ConversationUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * The data used to update Conversations.
     */
    data: XOR<ConversationUpdateManyMutationInput, ConversationUncheckedUpdateManyInput>
    /**
     * Filter which Conversations to update
     */
    where?: ConversationWhereInput
    /**
     * Limit how many Conversations to update.
     */
    limit?: number
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationIncludeUpdateManyAndReturn<ExtArgs> | null
  }

  /**
   * Conversation upsert
   */
  export type ConversationUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * The filter to search for the Conversation to update in case it exists.
     */
    where: ConversationWhereUniqueInput
    /**
     * In case the Conversation found by the `where` argument doesn't exist, create a new Conversation with this data.
     */
    create: XOR<ConversationCreateInput, ConversationUncheckedCreateInput>
    /**
     * In case the Conversation was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ConversationUpdateInput, ConversationUncheckedUpdateInput>
  }

  /**
   * Conversation delete
   */
  export type ConversationDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
    /**
     * Filter which Conversation to delete.
     */
    where: ConversationWhereUniqueInput
  }

  /**
   * Conversation deleteMany
   */
  export type ConversationDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Conversations to delete
     */
    where?: ConversationWhereInput
    /**
     * Limit how many Conversations to delete.
     */
    limit?: number
  }

  /**
   * Conversation.messages
   */
  export type Conversation$messagesArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    where?: MessageWhereInput
    orderBy?: MessageOrderByWithRelationInput | MessageOrderByWithRelationInput[]
    cursor?: MessageWhereUniqueInput
    take?: number
    skip?: number
    distinct?: MessageScalarFieldEnum | MessageScalarFieldEnum[]
  }

  /**
   * Conversation without action
   */
  export type ConversationDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Conversation
     */
    select?: ConversationSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Conversation
     */
    omit?: ConversationOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ConversationInclude<ExtArgs> | null
  }


  /**
   * Model Message
   */

  export type AggregateMessage = {
    _count: MessageCountAggregateOutputType | null
    _min: MessageMinAggregateOutputType | null
    _max: MessageMaxAggregateOutputType | null
  }

  export type MessageMinAggregateOutputType = {
    id: string | null
    role: string | null
    content: string | null
    conversationId: string | null
    isRead: boolean | null
    createdAt: Date | null
  }

  export type MessageMaxAggregateOutputType = {
    id: string | null
    role: string | null
    content: string | null
    conversationId: string | null
    isRead: boolean | null
    createdAt: Date | null
  }

  export type MessageCountAggregateOutputType = {
    id: number
    role: number
    content: number
    conversationId: number
    isRead: number
    createdAt: number
    _all: number
  }


  export type MessageMinAggregateInputType = {
    id?: true
    role?: true
    content?: true
    conversationId?: true
    isRead?: true
    createdAt?: true
  }

  export type MessageMaxAggregateInputType = {
    id?: true
    role?: true
    content?: true
    conversationId?: true
    isRead?: true
    createdAt?: true
  }

  export type MessageCountAggregateInputType = {
    id?: true
    role?: true
    content?: true
    conversationId?: true
    isRead?: true
    createdAt?: true
    _all?: true
  }

  export type MessageAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Message to aggregate.
     */
    where?: MessageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Messages to fetch.
     */
    orderBy?: MessageOrderByWithRelationInput | MessageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: MessageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Messages from the position of the cursor.
     */
    take?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Skip the first `n` Messages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Messages
    **/
    _count?: true | MessageCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: MessageMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: MessageMaxAggregateInputType
  }

  export type GetMessageAggregateType<T extends MessageAggregateArgs> = {
        [P in keyof T & keyof AggregateMessage]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateMessage[P]>
      : GetScalarType<T[P], AggregateMessage[P]>
  }




  export type MessageGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: MessageWhereInput
    orderBy?: MessageOrderByWithAggregationInput | MessageOrderByWithAggregationInput[]
    by: MessageScalarFieldEnum[] | MessageScalarFieldEnum
    having?: MessageScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: MessageCountAggregateInputType | true
    _min?: MessageMinAggregateInputType
    _max?: MessageMaxAggregateInputType
  }

  export type MessageGroupByOutputType = {
    id: string
    role: string
    content: string
    conversationId: string
    isRead: boolean
    createdAt: Date
    _count: MessageCountAggregateOutputType | null
    _min: MessageMinAggregateOutputType | null
    _max: MessageMaxAggregateOutputType | null
  }

  type GetMessageGroupByPayload<T extends MessageGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<MessageGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof MessageGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], MessageGroupByOutputType[P]>
            : GetScalarType<T[P], MessageGroupByOutputType[P]>
        }
      >
    >


  export type MessageSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    role?: boolean
    content?: boolean
    conversationId?: boolean
    isRead?: boolean
    createdAt?: boolean
    conversation?: boolean | ConversationDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["message"]>

  export type MessageSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    role?: boolean
    content?: boolean
    conversationId?: boolean
    isRead?: boolean
    createdAt?: boolean
    conversation?: boolean | ConversationDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["message"]>

  export type MessageSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    role?: boolean
    content?: boolean
    conversationId?: boolean
    isRead?: boolean
    createdAt?: boolean
    conversation?: boolean | ConversationDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["message"]>

  export type MessageSelectScalar = {
    id?: boolean
    role?: boolean
    content?: boolean
    conversationId?: boolean
    isRead?: boolean
    createdAt?: boolean
  }

  export type MessageOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "role" | "content" | "conversationId" | "isRead" | "createdAt", ExtArgs["result"]["message"]>
  export type MessageInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    conversation?: boolean | ConversationDefaultArgs<ExtArgs>
  }
  export type MessageIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    conversation?: boolean | ConversationDefaultArgs<ExtArgs>
  }
  export type MessageIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    conversation?: boolean | ConversationDefaultArgs<ExtArgs>
  }

  export type $MessagePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Message"
    objects: {
      conversation: Prisma.$ConversationPayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      role: string
      content: string
      conversationId: string
      isRead: boolean
      createdAt: Date
    }, ExtArgs["result"]["message"]>
    composites: {}
  }

  type MessageGetPayload<S extends boolean | null | undefined | MessageDefaultArgs> = $Result.GetResult<Prisma.$MessagePayload, S>

  type MessageCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<MessageFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: MessageCountAggregateInputType | true
    }

  export interface MessageDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Message'], meta: { name: 'Message' } }
    /**
     * Find zero or one Message that matches the filter.
     * @param {MessageFindUniqueArgs} args - Arguments to find a Message
     * @example
     * // Get one Message
     * const message = await prisma.message.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends MessageFindUniqueArgs>(args: SelectSubset<T, MessageFindUniqueArgs<ExtArgs>>): Prisma__MessageClient<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Message that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {MessageFindUniqueOrThrowArgs} args - Arguments to find a Message
     * @example
     * // Get one Message
     * const message = await prisma.message.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends MessageFindUniqueOrThrowArgs>(args: SelectSubset<T, MessageFindUniqueOrThrowArgs<ExtArgs>>): Prisma__MessageClient<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Message that matches the filter.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {MessageFindFirstArgs} args - Arguments to find a Message
     * @example
     * // Get one Message
     * const message = await prisma.message.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends MessageFindFirstArgs>(args?: SelectSubset<T, MessageFindFirstArgs<ExtArgs>>): Prisma__MessageClient<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Message 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 {MessageFindFirstOrThrowArgs} args - Arguments to find a Message
     * @example
     * // Get one Message
     * const message = await prisma.message.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends MessageFindFirstOrThrowArgs>(args?: SelectSubset<T, MessageFindFirstOrThrowArgs<ExtArgs>>): Prisma__MessageClient<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Messages that matches the filter.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {MessageFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Messages
     * const messages = await prisma.message.findMany()
     * 
     * // Get first 10 Messages
     * const messages = await prisma.message.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const messageWithIdOnly = await prisma.message.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends MessageFindManyArgs>(args?: SelectSubset<T, MessageFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Message.
     * @param {MessageCreateArgs} args - Arguments to create a Message.
     * @example
     * // Create one Message
     * const Message = await prisma.message.create({
     *   data: {
     *     // ... data to create a Message
     *   }
     * })
     * 
     */
    create<T extends MessageCreateArgs>(args: SelectSubset<T, MessageCreateArgs<ExtArgs>>): Prisma__MessageClient<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Messages.
     * @param {MessageCreateManyArgs} args - Arguments to create many Messages.
     * @example
     * // Create many Messages
     * const message = await prisma.message.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends MessageCreateManyArgs>(args?: SelectSubset<T, MessageCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many Messages and returns the data saved in the database.
     * @param {MessageCreateManyAndReturnArgs} args - Arguments to create many Messages.
     * @example
     * // Create many Messages
     * const message = await prisma.message.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many Messages and only return the `id`
     * const messageWithIdOnly = await prisma.message.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<T extends MessageCreateManyAndReturnArgs>(args?: SelectSubset<T, MessageCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a Message.
     * @param {MessageDeleteArgs} args - Arguments to delete one Message.
     * @example
     * // Delete one Message
     * const Message = await prisma.message.delete({
     *   where: {
     *     // ... filter to delete one Message
     *   }
     * })
     * 
     */
    delete<T extends MessageDeleteArgs>(args: SelectSubset<T, MessageDeleteArgs<ExtArgs>>): Prisma__MessageClient<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Message.
     * @param {MessageUpdateArgs} args - Arguments to update one Message.
     * @example
     * // Update one Message
     * const message = await prisma.message.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends MessageUpdateArgs>(args: SelectSubset<T, MessageUpdateArgs<ExtArgs>>): Prisma__MessageClient<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Messages.
     * @param {MessageDeleteManyArgs} args - Arguments to filter Messages to delete.
     * @example
     * // Delete a few Messages
     * const { count } = await prisma.message.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends MessageDeleteManyArgs>(args?: SelectSubset<T, MessageDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Messages.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {MessageUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Messages
     * const message = await prisma.message.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends MessageUpdateManyArgs>(args: SelectSubset<T, MessageUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Messages and returns the data updated in the database.
     * @param {MessageUpdateManyAndReturnArgs} args - Arguments to update many Messages.
     * @example
     * // Update many Messages
     * const message = await prisma.message.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more Messages and only return the `id`
     * const messageWithIdOnly = await prisma.message.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<T extends MessageUpdateManyAndReturnArgs>(args: SelectSubset<T, MessageUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one Message.
     * @param {MessageUpsertArgs} args - Arguments to update or create a Message.
     * @example
     * // Update or create a Message
     * const message = await prisma.message.upsert({
     *   create: {
     *     // ... data to create a Message
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Message we want to update
     *   }
     * })
     */
    upsert<T extends MessageUpsertArgs>(args: SelectSubset<T, MessageUpsertArgs<ExtArgs>>): Prisma__MessageClient<$Result.GetResult<Prisma.$MessagePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Messages.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {MessageCountArgs} args - Arguments to filter Messages to count.
     * @example
     * // Count the number of Messages
     * const count = await prisma.message.count({
     *   where: {
     *     // ... the filter for the Messages we want to count
     *   }
     * })
    **/
    count<T extends MessageCountArgs>(
      args?: Subset<T, MessageCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], MessageCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Message.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {MessageAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends MessageAggregateArgs>(args: Subset<T, MessageAggregateArgs>): Prisma.PrismaPromise<GetMessageAggregateType<T>>

    /**
     * Group by Message.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {MessageGroupByArgs} args - Group by arguments.
     * @example
     * // Group by city, order by createdAt, get count
     * const result = await prisma.user.groupBy({
     *   by: ['city', 'createdAt'],
     *   orderBy: {
     *     createdAt: true
     *   },
     *   _count: {
     *     _all: true
     *   },
     * })
     * 
    **/
    groupBy<
      T extends MessageGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: MessageGroupByArgs['orderBy'] }
        : { orderBy?: MessageGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, MessageGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetMessageGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Message model
   */
  readonly fields: MessageFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Message.
   * Why is this prefixed with `Prisma__`?
   * Because we want to prevent naming conflicts as mentioned in
   * https://github.com/prisma/prisma-client-js/issues/707
   */
  export interface Prisma__MessageClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    conversation<T extends ConversationDefaultArgs<ExtArgs> = {}>(args?: Subset<T, ConversationDefaultArgs<ExtArgs>>): Prisma__ConversationClient<$Result.GetResult<Prisma.$ConversationPayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Message model
   */
  interface MessageFieldRefs {
    readonly id: FieldRef<"Message", 'String'>
    readonly role: FieldRef<"Message", 'String'>
    readonly content: FieldRef<"Message", 'String'>
    readonly conversationId: FieldRef<"Message", 'String'>
    readonly isRead: FieldRef<"Message", 'Boolean'>
    readonly createdAt: FieldRef<"Message", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Message findUnique
   */
  export type MessageFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * Filter, which Message to fetch.
     */
    where: MessageWhereUniqueInput
  }

  /**
   * Message findUniqueOrThrow
   */
  export type MessageFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * Filter, which Message to fetch.
     */
    where: MessageWhereUniqueInput
  }

  /**
   * Message findFirst
   */
  export type MessageFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * Filter, which Message to fetch.
     */
    where?: MessageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Messages to fetch.
     */
    orderBy?: MessageOrderByWithRelationInput | MessageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Messages.
     */
    cursor?: MessageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Messages from the position of the cursor.
     */
    take?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Skip the first `n` Messages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Messages.
     */
    distinct?: MessageScalarFieldEnum | MessageScalarFieldEnum[]
  }

  /**
   * Message findFirstOrThrow
   */
  export type MessageFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * Filter, which Message to fetch.
     */
    where?: MessageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Messages to fetch.
     */
    orderBy?: MessageOrderByWithRelationInput | MessageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Messages.
     */
    cursor?: MessageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Messages from the position of the cursor.
     */
    take?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Skip the first `n` Messages.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Messages.
     */
    distinct?: MessageScalarFieldEnum | MessageScalarFieldEnum[]
  }

  /**
   * Message findMany
   */
  export type MessageFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * Filter, which Messages to fetch.
     */
    where?: MessageWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Messages to fetch.
     */
    orderBy?: MessageOrderByWithRelationInput | MessageOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Messages.
     */
    cursor?: MessageWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Messages from the position of the cursor.
     */
    take?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Skip the first `n` Messages.
     */
    skip?: number
    distinct?: MessageScalarFieldEnum | MessageScalarFieldEnum[]
  }

  /**
   * Message create
   */
  export type MessageCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * The data needed to create a Message.
     */
    data: XOR<MessageCreateInput, MessageUncheckedCreateInput>
  }

  /**
   * Message createMany
   */
  export type MessageCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Messages.
     */
    data: MessageCreateManyInput | MessageCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Message createManyAndReturn
   */
  export type MessageCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * The data used to create many Messages.
     */
    data: MessageCreateManyInput | MessageCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * Message update
   */
  export type MessageUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * The data needed to update a Message.
     */
    data: XOR<MessageUpdateInput, MessageUncheckedUpdateInput>
    /**
     * Choose, which Message to update.
     */
    where: MessageWhereUniqueInput
  }

  /**
   * Message updateMany
   */
  export type MessageUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Messages.
     */
    data: XOR<MessageUpdateManyMutationInput, MessageUncheckedUpdateManyInput>
    /**
     * Filter which Messages to update
     */
    where?: MessageWhereInput
    /**
     * Limit how many Messages to update.
     */
    limit?: number
  }

  /**
   * Message updateManyAndReturn
   */
  export type MessageUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * The data used to update Messages.
     */
    data: XOR<MessageUpdateManyMutationInput, MessageUncheckedUpdateManyInput>
    /**
     * Filter which Messages to update
     */
    where?: MessageWhereInput
    /**
     * Limit how many Messages to update.
     */
    limit?: number
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageIncludeUpdateManyAndReturn<ExtArgs> | null
  }

  /**
   * Message upsert
   */
  export type MessageUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * The filter to search for the Message to update in case it exists.
     */
    where: MessageWhereUniqueInput
    /**
     * In case the Message found by the `where` argument doesn't exist, create a new Message with this data.
     */
    create: XOR<MessageCreateInput, MessageUncheckedCreateInput>
    /**
     * In case the Message was found with the provided `where` argument, update it with this data.
     */
    update: XOR<MessageUpdateInput, MessageUncheckedUpdateInput>
  }

  /**
   * Message delete
   */
  export type MessageDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
    /**
     * Filter which Message to delete.
     */
    where: MessageWhereUniqueInput
  }

  /**
   * Message deleteMany
   */
  export type MessageDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Messages to delete
     */
    where?: MessageWhereInput
    /**
     * Limit how many Messages to delete.
     */
    limit?: number
  }

  /**
   * Message without action
   */
  export type MessageDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Message
     */
    select?: MessageSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Message
     */
    omit?: MessageOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: MessageInclude<ExtArgs> | null
  }


  /**
   * Model Wallet
   */

  export type AggregateWallet = {
    _count: WalletCountAggregateOutputType | null
    _avg: WalletAvgAggregateOutputType | null
    _sum: WalletSumAggregateOutputType | null
    _min: WalletMinAggregateOutputType | null
    _max: WalletMaxAggregateOutputType | null
  }

  export type WalletAvgAggregateOutputType = {
    id: number | null
  }

  export type WalletSumAggregateOutputType = {
    id: number | null
  }

  export type WalletMinAggregateOutputType = {
    id: number | null
    network: $Enums.TransactionNetwork | null
    name: string | null
    address: string | null
    description: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type WalletMaxAggregateOutputType = {
    id: number | null
    network: $Enums.TransactionNetwork | null
    name: string | null
    address: string | null
    description: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type WalletCountAggregateOutputType = {
    id: number
    network: number
    name: number
    address: number
    description: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type WalletAvgAggregateInputType = {
    id?: true
  }

  export type WalletSumAggregateInputType = {
    id?: true
  }

  export type WalletMinAggregateInputType = {
    id?: true
    network?: true
    name?: true
    address?: true
    description?: true
    createdAt?: true
    updatedAt?: true
  }

  export type WalletMaxAggregateInputType = {
    id?: true
    network?: true
    name?: true
    address?: true
    description?: true
    createdAt?: true
    updatedAt?: true
  }

  export type WalletCountAggregateInputType = {
    id?: true
    network?: true
    name?: true
    address?: true
    description?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type WalletAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Wallet to aggregate.
     */
    where?: WalletWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Wallets to fetch.
     */
    orderBy?: WalletOrderByWithRelationInput | WalletOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: WalletWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Wallets 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` Wallets.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Wallets
    **/
    _count?: true | WalletCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: WalletAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: WalletSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: WalletMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: WalletMaxAggregateInputType
  }

  export type GetWalletAggregateType<T extends WalletAggregateArgs> = {
        [P in keyof T & keyof AggregateWallet]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateWallet[P]>
      : GetScalarType<T[P], AggregateWallet[P]>
  }




  export type WalletGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: WalletWhereInput
    orderBy?: WalletOrderByWithAggregationInput | WalletOrderByWithAggregationInput[]
    by: WalletScalarFieldEnum[] | WalletScalarFieldEnum
    having?: WalletScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: WalletCountAggregateInputType | true
    _avg?: WalletAvgAggregateInputType
    _sum?: WalletSumAggregateInputType
    _min?: WalletMinAggregateInputType
    _max?: WalletMaxAggregateInputType
  }

  export type WalletGroupByOutputType = {
    id: number
    network: $Enums.TransactionNetwork
    name: string
    address: string
    description: string | null
    createdAt: Date
    updatedAt: Date
    _count: WalletCountAggregateOutputType | null
    _avg: WalletAvgAggregateOutputType | null
    _sum: WalletSumAggregateOutputType | null
    _min: WalletMinAggregateOutputType | null
    _max: WalletMaxAggregateOutputType | null
  }

  type GetWalletGroupByPayload<T extends WalletGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<WalletGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof WalletGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], WalletGroupByOutputType[P]>
            : GetScalarType<T[P], WalletGroupByOutputType[P]>
        }
      >
    >


  export type WalletSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    network?: boolean
    name?: boolean
    address?: boolean
    description?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["wallet"]>

  export type WalletSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    network?: boolean
    name?: boolean
    address?: boolean
    description?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["wallet"]>

  export type WalletSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    network?: boolean
    name?: boolean
    address?: boolean
    description?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["wallet"]>

  export type WalletSelectScalar = {
    id?: boolean
    network?: boolean
    name?: boolean
    address?: boolean
    description?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type WalletOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "network" | "name" | "address" | "description" | "createdAt" | "updatedAt", ExtArgs["result"]["wallet"]>

  export type $WalletPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Wallet"
    objects: {}
    scalars: $Extensions.GetPayloadResult<{
      id: number
      network: $Enums.TransactionNetwork
      name: string
      address: string
      description: string | null
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["wallet"]>
    composites: {}
  }

  type WalletGetPayload<S extends boolean | null | undefined | WalletDefaultArgs> = $Result.GetResult<Prisma.$WalletPayload, S>

  type WalletCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<WalletFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: WalletCountAggregateInputType | true
    }

  export interface WalletDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Wallet'], meta: { name: 'Wallet' } }
    /**
     * Find zero or one Wallet that matches the filter.
     * @param {WalletFindUniqueArgs} args - Arguments to find a Wallet
     * @example
     * // Get one Wallet
     * const wallet = await prisma.wallet.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends WalletFindUniqueArgs>(args: SelectSubset<T, WalletFindUniqueArgs<ExtArgs>>): Prisma__WalletClient<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Wallet that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {WalletFindUniqueOrThrowArgs} args - Arguments to find a Wallet
     * @example
     * // Get one Wallet
     * const wallet = await prisma.wallet.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends WalletFindUniqueOrThrowArgs>(args: SelectSubset<T, WalletFindUniqueOrThrowArgs<ExtArgs>>): Prisma__WalletClient<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Wallet 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 {WalletFindFirstArgs} args - Arguments to find a Wallet
     * @example
     * // Get one Wallet
     * const wallet = await prisma.wallet.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends WalletFindFirstArgs>(args?: SelectSubset<T, WalletFindFirstArgs<ExtArgs>>): Prisma__WalletClient<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Wallet 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 {WalletFindFirstOrThrowArgs} args - Arguments to find a Wallet
     * @example
     * // Get one Wallet
     * const wallet = await prisma.wallet.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends WalletFindFirstOrThrowArgs>(args?: SelectSubset<T, WalletFindFirstOrThrowArgs<ExtArgs>>): Prisma__WalletClient<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Wallets 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 {WalletFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Wallets
     * const wallets = await prisma.wallet.findMany()
     * 
     * // Get first 10 Wallets
     * const wallets = await prisma.wallet.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const walletWithIdOnly = await prisma.wallet.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends WalletFindManyArgs>(args?: SelectSubset<T, WalletFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Wallet.
     * @param {WalletCreateArgs} args - Arguments to create a Wallet.
     * @example
     * // Create one Wallet
     * const Wallet = await prisma.wallet.create({
     *   data: {
     *     // ... data to create a Wallet
     *   }
     * })
     * 
     */
    create<T extends WalletCreateArgs>(args: SelectSubset<T, WalletCreateArgs<ExtArgs>>): Prisma__WalletClient<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Wallets.
     * @param {WalletCreateManyArgs} args - Arguments to create many Wallets.
     * @example
     * // Create many Wallets
     * const wallet = await prisma.wallet.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends WalletCreateManyArgs>(args?: SelectSubset<T, WalletCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many Wallets and returns the data saved in the database.
     * @param {WalletCreateManyAndReturnArgs} args - Arguments to create many Wallets.
     * @example
     * // Create many Wallets
     * const wallet = await prisma.wallet.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many Wallets and only return the `id`
     * const walletWithIdOnly = await prisma.wallet.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<T extends WalletCreateManyAndReturnArgs>(args?: SelectSubset<T, WalletCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a Wallet.
     * @param {WalletDeleteArgs} args - Arguments to delete one Wallet.
     * @example
     * // Delete one Wallet
     * const Wallet = await prisma.wallet.delete({
     *   where: {
     *     // ... filter to delete one Wallet
     *   }
     * })
     * 
     */
    delete<T extends WalletDeleteArgs>(args: SelectSubset<T, WalletDeleteArgs<ExtArgs>>): Prisma__WalletClient<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Wallet.
     * @param {WalletUpdateArgs} args - Arguments to update one Wallet.
     * @example
     * // Update one Wallet
     * const wallet = await prisma.wallet.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends WalletUpdateArgs>(args: SelectSubset<T, WalletUpdateArgs<ExtArgs>>): Prisma__WalletClient<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Wallets.
     * @param {WalletDeleteManyArgs} args - Arguments to filter Wallets to delete.
     * @example
     * // Delete a few Wallets
     * const { count } = await prisma.wallet.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends WalletDeleteManyArgs>(args?: SelectSubset<T, WalletDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Wallets.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {WalletUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Wallets
     * const wallet = await prisma.wallet.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends WalletUpdateManyArgs>(args: SelectSubset<T, WalletUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Wallets and returns the data updated in the database.
     * @param {WalletUpdateManyAndReturnArgs} args - Arguments to update many Wallets.
     * @example
     * // Update many Wallets
     * const wallet = await prisma.wallet.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more Wallets and only return the `id`
     * const walletWithIdOnly = await prisma.wallet.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<T extends WalletUpdateManyAndReturnArgs>(args: SelectSubset<T, WalletUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one Wallet.
     * @param {WalletUpsertArgs} args - Arguments to update or create a Wallet.
     * @example
     * // Update or create a Wallet
     * const wallet = await prisma.wallet.upsert({
     *   create: {
     *     // ... data to create a Wallet
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Wallet we want to update
     *   }
     * })
     */
    upsert<T extends WalletUpsertArgs>(args: SelectSubset<T, WalletUpsertArgs<ExtArgs>>): Prisma__WalletClient<$Result.GetResult<Prisma.$WalletPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Wallets.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {WalletCountArgs} args - Arguments to filter Wallets to count.
     * @example
     * // Count the number of Wallets
     * const count = await prisma.wallet.count({
     *   where: {
     *     // ... the filter for the Wallets we want to count
     *   }
     * })
    **/
    count<T extends WalletCountArgs>(
      args?: Subset<T, WalletCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], WalletCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Wallet.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {WalletAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends WalletAggregateArgs>(args: Subset<T, WalletAggregateArgs>): Prisma.PrismaPromise<GetWalletAggregateType<T>>

    /**
     * Group by Wallet.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {WalletGroupByArgs} 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 WalletGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: WalletGroupByArgs['orderBy'] }
        : { orderBy?: WalletGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, WalletGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetWalletGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Wallet model
   */
  readonly fields: WalletFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Wallet.
   * 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__WalletClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    /**
     * Attaches callbacks for the resolution and/or rejection of the Promise.
     * @param onfulfilled The callback to execute when the Promise is resolved.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of which ever callback is executed.
     */
    then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Wallet model
   */
  interface WalletFieldRefs {
    readonly id: FieldRef<"Wallet", 'Int'>
    readonly network: FieldRef<"Wallet", 'TransactionNetwork'>
    readonly name: FieldRef<"Wallet", 'String'>
    readonly address: FieldRef<"Wallet", 'String'>
    readonly description: FieldRef<"Wallet", 'String'>
    readonly createdAt: FieldRef<"Wallet", 'DateTime'>
    readonly updatedAt: FieldRef<"Wallet", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Wallet findUnique
   */
  export type WalletFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * Filter, which Wallet to fetch.
     */
    where: WalletWhereUniqueInput
  }

  /**
   * Wallet findUniqueOrThrow
   */
  export type WalletFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * Filter, which Wallet to fetch.
     */
    where: WalletWhereUniqueInput
  }

  /**
   * Wallet findFirst
   */
  export type WalletFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * Filter, which Wallet to fetch.
     */
    where?: WalletWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Wallets to fetch.
     */
    orderBy?: WalletOrderByWithRelationInput | WalletOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Wallets.
     */
    cursor?: WalletWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Wallets 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` Wallets.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Wallets.
     */
    distinct?: WalletScalarFieldEnum | WalletScalarFieldEnum[]
  }

  /**
   * Wallet findFirstOrThrow
   */
  export type WalletFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * Filter, which Wallet to fetch.
     */
    where?: WalletWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Wallets to fetch.
     */
    orderBy?: WalletOrderByWithRelationInput | WalletOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Wallets.
     */
    cursor?: WalletWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Wallets 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` Wallets.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Wallets.
     */
    distinct?: WalletScalarFieldEnum | WalletScalarFieldEnum[]
  }

  /**
   * Wallet findMany
   */
  export type WalletFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * Filter, which Wallets to fetch.
     */
    where?: WalletWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Wallets to fetch.
     */
    orderBy?: WalletOrderByWithRelationInput | WalletOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Wallets.
     */
    cursor?: WalletWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Wallets 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` Wallets.
     */
    skip?: number
    distinct?: WalletScalarFieldEnum | WalletScalarFieldEnum[]
  }

  /**
   * Wallet create
   */
  export type WalletCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * The data needed to create a Wallet.
     */
    data: XOR<WalletCreateInput, WalletUncheckedCreateInput>
  }

  /**
   * Wallet createMany
   */
  export type WalletCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Wallets.
     */
    data: WalletCreateManyInput | WalletCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Wallet createManyAndReturn
   */
  export type WalletCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * The data used to create many Wallets.
     */
    data: WalletCreateManyInput | WalletCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Wallet update
   */
  export type WalletUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * The data needed to update a Wallet.
     */
    data: XOR<WalletUpdateInput, WalletUncheckedUpdateInput>
    /**
     * Choose, which Wallet to update.
     */
    where: WalletWhereUniqueInput
  }

  /**
   * Wallet updateMany
   */
  export type WalletUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Wallets.
     */
    data: XOR<WalletUpdateManyMutationInput, WalletUncheckedUpdateManyInput>
    /**
     * Filter which Wallets to update
     */
    where?: WalletWhereInput
    /**
     * Limit how many Wallets to update.
     */
    limit?: number
  }

  /**
   * Wallet updateManyAndReturn
   */
  export type WalletUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * The data used to update Wallets.
     */
    data: XOR<WalletUpdateManyMutationInput, WalletUncheckedUpdateManyInput>
    /**
     * Filter which Wallets to update
     */
    where?: WalletWhereInput
    /**
     * Limit how many Wallets to update.
     */
    limit?: number
  }

  /**
   * Wallet upsert
   */
  export type WalletUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * The filter to search for the Wallet to update in case it exists.
     */
    where: WalletWhereUniqueInput
    /**
     * In case the Wallet found by the `where` argument doesn't exist, create a new Wallet with this data.
     */
    create: XOR<WalletCreateInput, WalletUncheckedCreateInput>
    /**
     * In case the Wallet was found with the provided `where` argument, update it with this data.
     */
    update: XOR<WalletUpdateInput, WalletUncheckedUpdateInput>
  }

  /**
   * Wallet delete
   */
  export type WalletDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
    /**
     * Filter which Wallet to delete.
     */
    where: WalletWhereUniqueInput
  }

  /**
   * Wallet deleteMany
   */
  export type WalletDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Wallets to delete
     */
    where?: WalletWhereInput
    /**
     * Limit how many Wallets to delete.
     */
    limit?: number
  }

  /**
   * Wallet without action
   */
  export type WalletDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Wallet
     */
    select?: WalletSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Wallet
     */
    omit?: WalletOmit<ExtArgs> | null
  }


  /**
   * Model Product
   */

  export type AggregateProduct = {
    _count: ProductCountAggregateOutputType | null
    _avg: ProductAvgAggregateOutputType | null
    _sum: ProductSumAggregateOutputType | null
    _min: ProductMinAggregateOutputType | null
    _max: ProductMaxAggregateOutputType | null
  }

  export type ProductAvgAggregateOutputType = {
    id: number | null
    price: number | null
  }

  export type ProductSumAggregateOutputType = {
    id: number | null
    price: number | null
  }

  export type ProductMinAggregateOutputType = {
    id: number | null
    plan: string | null
    description: string | null
    price: number | null
    firm: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type ProductMaxAggregateOutputType = {
    id: number | null
    plan: string | null
    description: string | null
    price: number | null
    firm: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type ProductCountAggregateOutputType = {
    id: number
    plan: number
    description: number
    price: number
    firm: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type ProductAvgAggregateInputType = {
    id?: true
    price?: true
  }

  export type ProductSumAggregateInputType = {
    id?: true
    price?: true
  }

  export type ProductMinAggregateInputType = {
    id?: true
    plan?: true
    description?: true
    price?: true
    firm?: true
    createdAt?: true
    updatedAt?: true
  }

  export type ProductMaxAggregateInputType = {
    id?: true
    plan?: true
    description?: true
    price?: true
    firm?: true
    createdAt?: true
    updatedAt?: true
  }

  export type ProductCountAggregateInputType = {
    id?: true
    plan?: true
    description?: true
    price?: true
    firm?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type ProductAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Product to aggregate.
     */
    where?: ProductWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Products to fetch.
     */
    orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: ProductWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Products 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` Products.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned Products
    **/
    _count?: true | ProductCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: ProductAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: ProductSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: ProductMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: ProductMaxAggregateInputType
  }

  export type GetProductAggregateType<T extends ProductAggregateArgs> = {
        [P in keyof T & keyof AggregateProduct]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateProduct[P]>
      : GetScalarType<T[P], AggregateProduct[P]>
  }




  export type ProductGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: ProductWhereInput
    orderBy?: ProductOrderByWithAggregationInput | ProductOrderByWithAggregationInput[]
    by: ProductScalarFieldEnum[] | ProductScalarFieldEnum
    having?: ProductScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: ProductCountAggregateInputType | true
    _avg?: ProductAvgAggregateInputType
    _sum?: ProductSumAggregateInputType
    _min?: ProductMinAggregateInputType
    _max?: ProductMaxAggregateInputType
  }

  export type ProductGroupByOutputType = {
    id: number
    plan: string
    description: string | null
    price: number
    firm: string
    createdAt: Date
    updatedAt: Date
    _count: ProductCountAggregateOutputType | null
    _avg: ProductAvgAggregateOutputType | null
    _sum: ProductSumAggregateOutputType | null
    _min: ProductMinAggregateOutputType | null
    _max: ProductMaxAggregateOutputType | null
  }

  type GetProductGroupByPayload<T extends ProductGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<ProductGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof ProductGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], ProductGroupByOutputType[P]>
            : GetScalarType<T[P], ProductGroupByOutputType[P]>
        }
      >
    >


  export type ProductSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    plan?: boolean
    description?: boolean
    price?: boolean
    firm?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    userProducts?: boolean | Product$userProductsArgs<ExtArgs>
    _count?: boolean | ProductCountOutputTypeDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["product"]>

  export type ProductSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    plan?: boolean
    description?: boolean
    price?: boolean
    firm?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["product"]>

  export type ProductSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    plan?: boolean
    description?: boolean
    price?: boolean
    firm?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }, ExtArgs["result"]["product"]>

  export type ProductSelectScalar = {
    id?: boolean
    plan?: boolean
    description?: boolean
    price?: boolean
    firm?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type ProductOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "plan" | "description" | "price" | "firm" | "createdAt" | "updatedAt", ExtArgs["result"]["product"]>
  export type ProductInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    userProducts?: boolean | Product$userProductsArgs<ExtArgs>
    _count?: boolean | ProductCountOutputTypeDefaultArgs<ExtArgs>
  }
  export type ProductIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}
  export type ProductIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {}

  export type $ProductPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "Product"
    objects: {
      userProducts: Prisma.$UserProductPayload<ExtArgs>[]
    }
    scalars: $Extensions.GetPayloadResult<{
      id: number
      plan: string
      description: string | null
      price: number
      firm: string
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["product"]>
    composites: {}
  }

  type ProductGetPayload<S extends boolean | null | undefined | ProductDefaultArgs> = $Result.GetResult<Prisma.$ProductPayload, S>

  type ProductCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<ProductFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: ProductCountAggregateInputType | true
    }

  export interface ProductDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Product'], meta: { name: 'Product' } }
    /**
     * Find zero or one Product that matches the filter.
     * @param {ProductFindUniqueArgs} args - Arguments to find a Product
     * @example
     * // Get one Product
     * const product = await prisma.product.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends ProductFindUniqueArgs>(args: SelectSubset<T, ProductFindUniqueArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one Product that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {ProductFindUniqueOrThrowArgs} args - Arguments to find a Product
     * @example
     * // Get one Product
     * const product = await prisma.product.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends ProductFindUniqueOrThrowArgs>(args: SelectSubset<T, ProductFindUniqueOrThrowArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Product 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 {ProductFindFirstArgs} args - Arguments to find a Product
     * @example
     * // Get one Product
     * const product = await prisma.product.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends ProductFindFirstArgs>(args?: SelectSubset<T, ProductFindFirstArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first Product 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 {ProductFindFirstOrThrowArgs} args - Arguments to find a Product
     * @example
     * // Get one Product
     * const product = await prisma.product.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends ProductFindFirstOrThrowArgs>(args?: SelectSubset<T, ProductFindFirstOrThrowArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more Products 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 {ProductFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Products
     * const products = await prisma.product.findMany()
     * 
     * // Get first 10 Products
     * const products = await prisma.product.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const productWithIdOnly = await prisma.product.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends ProductFindManyArgs>(args?: SelectSubset<T, ProductFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a Product.
     * @param {ProductCreateArgs} args - Arguments to create a Product.
     * @example
     * // Create one Product
     * const Product = await prisma.product.create({
     *   data: {
     *     // ... data to create a Product
     *   }
     * })
     * 
     */
    create<T extends ProductCreateArgs>(args: SelectSubset<T, ProductCreateArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many Products.
     * @param {ProductCreateManyArgs} args - Arguments to create many Products.
     * @example
     * // Create many Products
     * const product = await prisma.product.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends ProductCreateManyArgs>(args?: SelectSubset<T, ProductCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many Products and returns the data saved in the database.
     * @param {ProductCreateManyAndReturnArgs} args - Arguments to create many Products.
     * @example
     * // Create many Products
     * const product = await prisma.product.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many Products and only return the `id`
     * const productWithIdOnly = await prisma.product.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<T extends ProductCreateManyAndReturnArgs>(args?: SelectSubset<T, ProductCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a Product.
     * @param {ProductDeleteArgs} args - Arguments to delete one Product.
     * @example
     * // Delete one Product
     * const Product = await prisma.product.delete({
     *   where: {
     *     // ... filter to delete one Product
     *   }
     * })
     * 
     */
    delete<T extends ProductDeleteArgs>(args: SelectSubset<T, ProductDeleteArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one Product.
     * @param {ProductUpdateArgs} args - Arguments to update one Product.
     * @example
     * // Update one Product
     * const product = await prisma.product.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends ProductUpdateArgs>(args: SelectSubset<T, ProductUpdateArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more Products.
     * @param {ProductDeleteManyArgs} args - Arguments to filter Products to delete.
     * @example
     * // Delete a few Products
     * const { count } = await prisma.product.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends ProductDeleteManyArgs>(args?: SelectSubset<T, ProductDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Products.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ProductUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Products
     * const product = await prisma.product.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends ProductUpdateManyArgs>(args: SelectSubset<T, ProductUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more Products and returns the data updated in the database.
     * @param {ProductUpdateManyAndReturnArgs} args - Arguments to update many Products.
     * @example
     * // Update many Products
     * const product = await prisma.product.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more Products and only return the `id`
     * const productWithIdOnly = await prisma.product.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<T extends ProductUpdateManyAndReturnArgs>(args: SelectSubset<T, ProductUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one Product.
     * @param {ProductUpsertArgs} args - Arguments to update or create a Product.
     * @example
     * // Update or create a Product
     * const product = await prisma.product.upsert({
     *   create: {
     *     // ... data to create a Product
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Product we want to update
     *   }
     * })
     */
    upsert<T extends ProductUpsertArgs>(args: SelectSubset<T, ProductUpsertArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of Products.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ProductCountArgs} args - Arguments to filter Products to count.
     * @example
     * // Count the number of Products
     * const count = await prisma.product.count({
     *   where: {
     *     // ... the filter for the Products we want to count
     *   }
     * })
    **/
    count<T extends ProductCountArgs>(
      args?: Subset<T, ProductCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], ProductCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a Product.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ProductAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends ProductAggregateArgs>(args: Subset<T, ProductAggregateArgs>): Prisma.PrismaPromise<GetProductAggregateType<T>>

    /**
     * Group by Product.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {ProductGroupByArgs} 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 ProductGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: ProductGroupByArgs['orderBy'] }
        : { orderBy?: ProductGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, ProductGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetProductGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Product model
   */
  readonly fields: ProductFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for Product.
   * 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__ProductClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    userProducts<T extends Product$userProductsArgs<ExtArgs> = {}>(args?: Subset<T, Product$userProductsArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the Product model
   */
  interface ProductFieldRefs {
    readonly id: FieldRef<"Product", 'Int'>
    readonly plan: FieldRef<"Product", 'String'>
    readonly description: FieldRef<"Product", 'String'>
    readonly price: FieldRef<"Product", 'Float'>
    readonly firm: FieldRef<"Product", 'String'>
    readonly createdAt: FieldRef<"Product", 'DateTime'>
    readonly updatedAt: FieldRef<"Product", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * Product findUnique
   */
  export type ProductFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * Filter, which Product to fetch.
     */
    where: ProductWhereUniqueInput
  }

  /**
   * Product findUniqueOrThrow
   */
  export type ProductFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * Filter, which Product to fetch.
     */
    where: ProductWhereUniqueInput
  }

  /**
   * Product findFirst
   */
  export type ProductFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * Filter, which Product to fetch.
     */
    where?: ProductWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Products to fetch.
     */
    orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Products.
     */
    cursor?: ProductWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Products 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` Products.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Products.
     */
    distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[]
  }

  /**
   * Product findFirstOrThrow
   */
  export type ProductFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * Filter, which Product to fetch.
     */
    where?: ProductWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Products to fetch.
     */
    orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for Products.
     */
    cursor?: ProductWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Products 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` Products.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of Products.
     */
    distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[]
  }

  /**
   * Product findMany
   */
  export type ProductFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * Filter, which Products to fetch.
     */
    where?: ProductWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of Products to fetch.
     */
    orderBy?: ProductOrderByWithRelationInput | ProductOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing Products.
     */
    cursor?: ProductWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` Products 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` Products.
     */
    skip?: number
    distinct?: ProductScalarFieldEnum | ProductScalarFieldEnum[]
  }

  /**
   * Product create
   */
  export type ProductCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * The data needed to create a Product.
     */
    data: XOR<ProductCreateInput, ProductUncheckedCreateInput>
  }

  /**
   * Product createMany
   */
  export type ProductCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many Products.
     */
    data: ProductCreateManyInput | ProductCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Product createManyAndReturn
   */
  export type ProductCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * The data used to create many Products.
     */
    data: ProductCreateManyInput | ProductCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * Product update
   */
  export type ProductUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * The data needed to update a Product.
     */
    data: XOR<ProductUpdateInput, ProductUncheckedUpdateInput>
    /**
     * Choose, which Product to update.
     */
    where: ProductWhereUniqueInput
  }

  /**
   * Product updateMany
   */
  export type ProductUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update Products.
     */
    data: XOR<ProductUpdateManyMutationInput, ProductUncheckedUpdateManyInput>
    /**
     * Filter which Products to update
     */
    where?: ProductWhereInput
    /**
     * Limit how many Products to update.
     */
    limit?: number
  }

  /**
   * Product updateManyAndReturn
   */
  export type ProductUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * The data used to update Products.
     */
    data: XOR<ProductUpdateManyMutationInput, ProductUncheckedUpdateManyInput>
    /**
     * Filter which Products to update
     */
    where?: ProductWhereInput
    /**
     * Limit how many Products to update.
     */
    limit?: number
  }

  /**
   * Product upsert
   */
  export type ProductUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * The filter to search for the Product to update in case it exists.
     */
    where: ProductWhereUniqueInput
    /**
     * In case the Product found by the `where` argument doesn't exist, create a new Product with this data.
     */
    create: XOR<ProductCreateInput, ProductUncheckedCreateInput>
    /**
     * In case the Product was found with the provided `where` argument, update it with this data.
     */
    update: XOR<ProductUpdateInput, ProductUncheckedUpdateInput>
  }

  /**
   * Product delete
   */
  export type ProductDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
    /**
     * Filter which Product to delete.
     */
    where: ProductWhereUniqueInput
  }

  /**
   * Product deleteMany
   */
  export type ProductDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which Products to delete
     */
    where?: ProductWhereInput
    /**
     * Limit how many Products to delete.
     */
    limit?: number
  }

  /**
   * Product.userProducts
   */
  export type Product$userProductsArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    where?: UserProductWhereInput
    orderBy?: UserProductOrderByWithRelationInput | UserProductOrderByWithRelationInput[]
    cursor?: UserProductWhereUniqueInput
    take?: number
    skip?: number
    distinct?: UserProductScalarFieldEnum | UserProductScalarFieldEnum[]
  }

  /**
   * Product without action
   */
  export type ProductDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the Product
     */
    select?: ProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the Product
     */
    omit?: ProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: ProductInclude<ExtArgs> | null
  }


  /**
   * Model UserProduct
   */

  export type AggregateUserProduct = {
    _count: UserProductCountAggregateOutputType | null
    _avg: UserProductAvgAggregateOutputType | null
    _sum: UserProductSumAggregateOutputType | null
    _min: UserProductMinAggregateOutputType | null
    _max: UserProductMaxAggregateOutputType | null
  }

  export type UserProductAvgAggregateOutputType = {
    productId: number | null
  }

  export type UserProductSumAggregateOutputType = {
    productId: number | null
  }

  export type UserProductMinAggregateOutputType = {
    id: string | null
    userId: string | null
    productId: number | null
    challengeStatus: $Enums.ChallengeStatus | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type UserProductMaxAggregateOutputType = {
    id: string | null
    userId: string | null
    productId: number | null
    challengeStatus: $Enums.ChallengeStatus | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type UserProductCountAggregateOutputType = {
    id: number
    userId: number
    productId: number
    challengeStatus: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type UserProductAvgAggregateInputType = {
    productId?: true
  }

  export type UserProductSumAggregateInputType = {
    productId?: true
  }

  export type UserProductMinAggregateInputType = {
    id?: true
    userId?: true
    productId?: true
    challengeStatus?: true
    createdAt?: true
    updatedAt?: true
  }

  export type UserProductMaxAggregateInputType = {
    id?: true
    userId?: true
    productId?: true
    challengeStatus?: true
    createdAt?: true
    updatedAt?: true
  }

  export type UserProductCountAggregateInputType = {
    id?: true
    userId?: true
    productId?: true
    challengeStatus?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type UserProductAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which UserProduct to aggregate.
     */
    where?: UserProductWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserProducts to fetch.
     */
    orderBy?: UserProductOrderByWithRelationInput | UserProductOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: UserProductWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserProducts 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` UserProducts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned UserProducts
    **/
    _count?: true | UserProductCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: UserProductAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: UserProductSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: UserProductMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: UserProductMaxAggregateInputType
  }

  export type GetUserProductAggregateType<T extends UserProductAggregateArgs> = {
        [P in keyof T & keyof AggregateUserProduct]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateUserProduct[P]>
      : GetScalarType<T[P], AggregateUserProduct[P]>
  }




  export type UserProductGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserProductWhereInput
    orderBy?: UserProductOrderByWithAggregationInput | UserProductOrderByWithAggregationInput[]
    by: UserProductScalarFieldEnum[] | UserProductScalarFieldEnum
    having?: UserProductScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: UserProductCountAggregateInputType | true
    _avg?: UserProductAvgAggregateInputType
    _sum?: UserProductSumAggregateInputType
    _min?: UserProductMinAggregateInputType
    _max?: UserProductMaxAggregateInputType
  }

  export type UserProductGroupByOutputType = {
    id: string
    userId: string
    productId: number
    challengeStatus: $Enums.ChallengeStatus
    createdAt: Date
    updatedAt: Date
    _count: UserProductCountAggregateOutputType | null
    _avg: UserProductAvgAggregateOutputType | null
    _sum: UserProductSumAggregateOutputType | null
    _min: UserProductMinAggregateOutputType | null
    _max: UserProductMaxAggregateOutputType | null
  }

  type GetUserProductGroupByPayload<T extends UserProductGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<UserProductGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof UserProductGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], UserProductGroupByOutputType[P]>
            : GetScalarType<T[P], UserProductGroupByOutputType[P]>
        }
      >
    >


  export type UserProductSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    userId?: boolean
    productId?: boolean
    challengeStatus?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    user?: boolean | TelegramUserDefaultArgs<ExtArgs>
    product?: boolean | ProductDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userProduct"]>

  export type UserProductSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    userId?: boolean
    productId?: boolean
    challengeStatus?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    user?: boolean | TelegramUserDefaultArgs<ExtArgs>
    product?: boolean | ProductDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userProduct"]>

  export type UserProductSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    userId?: boolean
    productId?: boolean
    challengeStatus?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    user?: boolean | TelegramUserDefaultArgs<ExtArgs>
    product?: boolean | ProductDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userProduct"]>

  export type UserProductSelectScalar = {
    id?: boolean
    userId?: boolean
    productId?: boolean
    challengeStatus?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type UserProductOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "userId" | "productId" | "challengeStatus" | "createdAt" | "updatedAt", ExtArgs["result"]["userProduct"]>
  export type UserProductInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    user?: boolean | TelegramUserDefaultArgs<ExtArgs>
    product?: boolean | ProductDefaultArgs<ExtArgs>
  }
  export type UserProductIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    user?: boolean | TelegramUserDefaultArgs<ExtArgs>
    product?: boolean | ProductDefaultArgs<ExtArgs>
  }
  export type UserProductIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    user?: boolean | TelegramUserDefaultArgs<ExtArgs>
    product?: boolean | ProductDefaultArgs<ExtArgs>
  }

  export type $UserProductPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "UserProduct"
    objects: {
      user: Prisma.$TelegramUserPayload<ExtArgs>
      product: Prisma.$ProductPayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      userId: string
      productId: number
      challengeStatus: $Enums.ChallengeStatus
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["userProduct"]>
    composites: {}
  }

  type UserProductGetPayload<S extends boolean | null | undefined | UserProductDefaultArgs> = $Result.GetResult<Prisma.$UserProductPayload, S>

  type UserProductCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<UserProductFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: UserProductCountAggregateInputType | true
    }

  export interface UserProductDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['UserProduct'], meta: { name: 'UserProduct' } }
    /**
     * Find zero or one UserProduct that matches the filter.
     * @param {UserProductFindUniqueArgs} args - Arguments to find a UserProduct
     * @example
     * // Get one UserProduct
     * const userProduct = await prisma.userProduct.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends UserProductFindUniqueArgs>(args: SelectSubset<T, UserProductFindUniqueArgs<ExtArgs>>): Prisma__UserProductClient<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one UserProduct that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {UserProductFindUniqueOrThrowArgs} args - Arguments to find a UserProduct
     * @example
     * // Get one UserProduct
     * const userProduct = await prisma.userProduct.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends UserProductFindUniqueOrThrowArgs>(args: SelectSubset<T, UserProductFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserProductClient<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first UserProduct 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 {UserProductFindFirstArgs} args - Arguments to find a UserProduct
     * @example
     * // Get one UserProduct
     * const userProduct = await prisma.userProduct.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends UserProductFindFirstArgs>(args?: SelectSubset<T, UserProductFindFirstArgs<ExtArgs>>): Prisma__UserProductClient<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first UserProduct 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 {UserProductFindFirstOrThrowArgs} args - Arguments to find a UserProduct
     * @example
     * // Get one UserProduct
     * const userProduct = await prisma.userProduct.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends UserProductFindFirstOrThrowArgs>(args?: SelectSubset<T, UserProductFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserProductClient<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more UserProducts 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 {UserProductFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all UserProducts
     * const userProducts = await prisma.userProduct.findMany()
     * 
     * // Get first 10 UserProducts
     * const userProducts = await prisma.userProduct.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const userProductWithIdOnly = await prisma.userProduct.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends UserProductFindManyArgs>(args?: SelectSubset<T, UserProductFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a UserProduct.
     * @param {UserProductCreateArgs} args - Arguments to create a UserProduct.
     * @example
     * // Create one UserProduct
     * const UserProduct = await prisma.userProduct.create({
     *   data: {
     *     // ... data to create a UserProduct
     *   }
     * })
     * 
     */
    create<T extends UserProductCreateArgs>(args: SelectSubset<T, UserProductCreateArgs<ExtArgs>>): Prisma__UserProductClient<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many UserProducts.
     * @param {UserProductCreateManyArgs} args - Arguments to create many UserProducts.
     * @example
     * // Create many UserProducts
     * const userProduct = await prisma.userProduct.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends UserProductCreateManyArgs>(args?: SelectSubset<T, UserProductCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many UserProducts and returns the data saved in the database.
     * @param {UserProductCreateManyAndReturnArgs} args - Arguments to create many UserProducts.
     * @example
     * // Create many UserProducts
     * const userProduct = await prisma.userProduct.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many UserProducts and only return the `id`
     * const userProductWithIdOnly = await prisma.userProduct.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<T extends UserProductCreateManyAndReturnArgs>(args?: SelectSubset<T, UserProductCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a UserProduct.
     * @param {UserProductDeleteArgs} args - Arguments to delete one UserProduct.
     * @example
     * // Delete one UserProduct
     * const UserProduct = await prisma.userProduct.delete({
     *   where: {
     *     // ... filter to delete one UserProduct
     *   }
     * })
     * 
     */
    delete<T extends UserProductDeleteArgs>(args: SelectSubset<T, UserProductDeleteArgs<ExtArgs>>): Prisma__UserProductClient<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one UserProduct.
     * @param {UserProductUpdateArgs} args - Arguments to update one UserProduct.
     * @example
     * // Update one UserProduct
     * const userProduct = await prisma.userProduct.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends UserProductUpdateArgs>(args: SelectSubset<T, UserProductUpdateArgs<ExtArgs>>): Prisma__UserProductClient<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more UserProducts.
     * @param {UserProductDeleteManyArgs} args - Arguments to filter UserProducts to delete.
     * @example
     * // Delete a few UserProducts
     * const { count } = await prisma.userProduct.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends UserProductDeleteManyArgs>(args?: SelectSubset<T, UserProductDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more UserProducts.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserProductUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many UserProducts
     * const userProduct = await prisma.userProduct.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends UserProductUpdateManyArgs>(args: SelectSubset<T, UserProductUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more UserProducts and returns the data updated in the database.
     * @param {UserProductUpdateManyAndReturnArgs} args - Arguments to update many UserProducts.
     * @example
     * // Update many UserProducts
     * const userProduct = await prisma.userProduct.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more UserProducts and only return the `id`
     * const userProductWithIdOnly = await prisma.userProduct.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<T extends UserProductUpdateManyAndReturnArgs>(args: SelectSubset<T, UserProductUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one UserProduct.
     * @param {UserProductUpsertArgs} args - Arguments to update or create a UserProduct.
     * @example
     * // Update or create a UserProduct
     * const userProduct = await prisma.userProduct.upsert({
     *   create: {
     *     // ... data to create a UserProduct
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the UserProduct we want to update
     *   }
     * })
     */
    upsert<T extends UserProductUpsertArgs>(args: SelectSubset<T, UserProductUpsertArgs<ExtArgs>>): Prisma__UserProductClient<$Result.GetResult<Prisma.$UserProductPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of UserProducts.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserProductCountArgs} args - Arguments to filter UserProducts to count.
     * @example
     * // Count the number of UserProducts
     * const count = await prisma.userProduct.count({
     *   where: {
     *     // ... the filter for the UserProducts we want to count
     *   }
     * })
    **/
    count<T extends UserProductCountArgs>(
      args?: Subset<T, UserProductCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], UserProductCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a UserProduct.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserProductAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends UserProductAggregateArgs>(args: Subset<T, UserProductAggregateArgs>): Prisma.PrismaPromise<GetUserProductAggregateType<T>>

    /**
     * Group by UserProduct.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserProductGroupByArgs} 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 UserProductGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: UserProductGroupByArgs['orderBy'] }
        : { orderBy?: UserProductGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, UserProductGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserProductGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the UserProduct model
   */
  readonly fields: UserProductFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for UserProduct.
   * 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__UserProductClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    user<T extends TelegramUserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUserDefaultArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
    product<T extends ProductDefaultArgs<ExtArgs> = {}>(args?: Subset<T, ProductDefaultArgs<ExtArgs>>): Prisma__ProductClient<$Result.GetResult<Prisma.$ProductPayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the UserProduct model
   */
  interface UserProductFieldRefs {
    readonly id: FieldRef<"UserProduct", 'String'>
    readonly userId: FieldRef<"UserProduct", 'String'>
    readonly productId: FieldRef<"UserProduct", 'Int'>
    readonly challengeStatus: FieldRef<"UserProduct", 'ChallengeStatus'>
    readonly createdAt: FieldRef<"UserProduct", 'DateTime'>
    readonly updatedAt: FieldRef<"UserProduct", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * UserProduct findUnique
   */
  export type UserProductFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * Filter, which UserProduct to fetch.
     */
    where: UserProductWhereUniqueInput
  }

  /**
   * UserProduct findUniqueOrThrow
   */
  export type UserProductFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * Filter, which UserProduct to fetch.
     */
    where: UserProductWhereUniqueInput
  }

  /**
   * UserProduct findFirst
   */
  export type UserProductFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * Filter, which UserProduct to fetch.
     */
    where?: UserProductWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserProducts to fetch.
     */
    orderBy?: UserProductOrderByWithRelationInput | UserProductOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for UserProducts.
     */
    cursor?: UserProductWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserProducts 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` UserProducts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of UserProducts.
     */
    distinct?: UserProductScalarFieldEnum | UserProductScalarFieldEnum[]
  }

  /**
   * UserProduct findFirstOrThrow
   */
  export type UserProductFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * Filter, which UserProduct to fetch.
     */
    where?: UserProductWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserProducts to fetch.
     */
    orderBy?: UserProductOrderByWithRelationInput | UserProductOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for UserProducts.
     */
    cursor?: UserProductWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserProducts 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` UserProducts.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of UserProducts.
     */
    distinct?: UserProductScalarFieldEnum | UserProductScalarFieldEnum[]
  }

  /**
   * UserProduct findMany
   */
  export type UserProductFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * Filter, which UserProducts to fetch.
     */
    where?: UserProductWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserProducts to fetch.
     */
    orderBy?: UserProductOrderByWithRelationInput | UserProductOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing UserProducts.
     */
    cursor?: UserProductWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserProducts 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` UserProducts.
     */
    skip?: number
    distinct?: UserProductScalarFieldEnum | UserProductScalarFieldEnum[]
  }

  /**
   * UserProduct create
   */
  export type UserProductCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * The data needed to create a UserProduct.
     */
    data: XOR<UserProductCreateInput, UserProductUncheckedCreateInput>
  }

  /**
   * UserProduct createMany
   */
  export type UserProductCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many UserProducts.
     */
    data: UserProductCreateManyInput | UserProductCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * UserProduct createManyAndReturn
   */
  export type UserProductCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * The data used to create many UserProducts.
     */
    data: UserProductCreateManyInput | UserProductCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * UserProduct update
   */
  export type UserProductUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * The data needed to update a UserProduct.
     */
    data: XOR<UserProductUpdateInput, UserProductUncheckedUpdateInput>
    /**
     * Choose, which UserProduct to update.
     */
    where: UserProductWhereUniqueInput
  }

  /**
   * UserProduct updateMany
   */
  export type UserProductUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update UserProducts.
     */
    data: XOR<UserProductUpdateManyMutationInput, UserProductUncheckedUpdateManyInput>
    /**
     * Filter which UserProducts to update
     */
    where?: UserProductWhereInput
    /**
     * Limit how many UserProducts to update.
     */
    limit?: number
  }

  /**
   * UserProduct updateManyAndReturn
   */
  export type UserProductUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * The data used to update UserProducts.
     */
    data: XOR<UserProductUpdateManyMutationInput, UserProductUncheckedUpdateManyInput>
    /**
     * Filter which UserProducts to update
     */
    where?: UserProductWhereInput
    /**
     * Limit how many UserProducts to update.
     */
    limit?: number
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductIncludeUpdateManyAndReturn<ExtArgs> | null
  }

  /**
   * UserProduct upsert
   */
  export type UserProductUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * The filter to search for the UserProduct to update in case it exists.
     */
    where: UserProductWhereUniqueInput
    /**
     * In case the UserProduct found by the `where` argument doesn't exist, create a new UserProduct with this data.
     */
    create: XOR<UserProductCreateInput, UserProductUncheckedCreateInput>
    /**
     * In case the UserProduct was found with the provided `where` argument, update it with this data.
     */
    update: XOR<UserProductUpdateInput, UserProductUncheckedUpdateInput>
  }

  /**
   * UserProduct delete
   */
  export type UserProductDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
    /**
     * Filter which UserProduct to delete.
     */
    where: UserProductWhereUniqueInput
  }

  /**
   * UserProduct deleteMany
   */
  export type UserProductDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which UserProducts to delete
     */
    where?: UserProductWhereInput
    /**
     * Limit how many UserProducts to delete.
     */
    limit?: number
  }

  /**
   * UserProduct without action
   */
  export type UserProductDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserProduct
     */
    select?: UserProductSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserProduct
     */
    omit?: UserProductOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserProductInclude<ExtArgs> | null
  }


  /**
   * Model UserTransaction
   */

  export type AggregateUserTransaction = {
    _count: UserTransactionCountAggregateOutputType | null
    _avg: UserTransactionAvgAggregateOutputType | null
    _sum: UserTransactionSumAggregateOutputType | null
    _min: UserTransactionMinAggregateOutputType | null
    _max: UserTransactionMaxAggregateOutputType | null
  }

  export type UserTransactionAvgAggregateOutputType = {
    value: number | null
  }

  export type UserTransactionSumAggregateOutputType = {
    value: number | null
  }

  export type UserTransactionMinAggregateOutputType = {
    id: string | null
    telegramUserId: string | null
    transactionHash: string | null
    network: $Enums.TransactionNetwork | null
    value: number | null
    status: $Enums.TransactionStatus | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type UserTransactionMaxAggregateOutputType = {
    id: string | null
    telegramUserId: string | null
    transactionHash: string | null
    network: $Enums.TransactionNetwork | null
    value: number | null
    status: $Enums.TransactionStatus | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type UserTransactionCountAggregateOutputType = {
    id: number
    telegramUserId: number
    transactionHash: number
    network: number
    value: number
    status: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type UserTransactionAvgAggregateInputType = {
    value?: true
  }

  export type UserTransactionSumAggregateInputType = {
    value?: true
  }

  export type UserTransactionMinAggregateInputType = {
    id?: true
    telegramUserId?: true
    transactionHash?: true
    network?: true
    value?: true
    status?: true
    createdAt?: true
    updatedAt?: true
  }

  export type UserTransactionMaxAggregateInputType = {
    id?: true
    telegramUserId?: true
    transactionHash?: true
    network?: true
    value?: true
    status?: true
    createdAt?: true
    updatedAt?: true
  }

  export type UserTransactionCountAggregateInputType = {
    id?: true
    telegramUserId?: true
    transactionHash?: true
    network?: true
    value?: true
    status?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type UserTransactionAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which UserTransaction to aggregate.
     */
    where?: UserTransactionWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserTransactions to fetch.
     */
    orderBy?: UserTransactionOrderByWithRelationInput | UserTransactionOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: UserTransactionWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserTransactions 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` UserTransactions.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned UserTransactions
    **/
    _count?: true | UserTransactionCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: UserTransactionAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: UserTransactionSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: UserTransactionMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: UserTransactionMaxAggregateInputType
  }

  export type GetUserTransactionAggregateType<T extends UserTransactionAggregateArgs> = {
        [P in keyof T & keyof AggregateUserTransaction]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateUserTransaction[P]>
      : GetScalarType<T[P], AggregateUserTransaction[P]>
  }




  export type UserTransactionGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserTransactionWhereInput
    orderBy?: UserTransactionOrderByWithAggregationInput | UserTransactionOrderByWithAggregationInput[]
    by: UserTransactionScalarFieldEnum[] | UserTransactionScalarFieldEnum
    having?: UserTransactionScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: UserTransactionCountAggregateInputType | true
    _avg?: UserTransactionAvgAggregateInputType
    _sum?: UserTransactionSumAggregateInputType
    _min?: UserTransactionMinAggregateInputType
    _max?: UserTransactionMaxAggregateInputType
  }

  export type UserTransactionGroupByOutputType = {
    id: string
    telegramUserId: string
    transactionHash: string
    network: $Enums.TransactionNetwork
    value: number
    status: $Enums.TransactionStatus
    createdAt: Date
    updatedAt: Date
    _count: UserTransactionCountAggregateOutputType | null
    _avg: UserTransactionAvgAggregateOutputType | null
    _sum: UserTransactionSumAggregateOutputType | null
    _min: UserTransactionMinAggregateOutputType | null
    _max: UserTransactionMaxAggregateOutputType | null
  }

  type GetUserTransactionGroupByPayload<T extends UserTransactionGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<UserTransactionGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof UserTransactionGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], UserTransactionGroupByOutputType[P]>
            : GetScalarType<T[P], UserTransactionGroupByOutputType[P]>
        }
      >
    >


  export type UserTransactionSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    transactionHash?: boolean
    network?: boolean
    value?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userTransaction"]>

  export type UserTransactionSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    transactionHash?: boolean
    network?: boolean
    value?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userTransaction"]>

  export type UserTransactionSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    transactionHash?: boolean
    network?: boolean
    value?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userTransaction"]>

  export type UserTransactionSelectScalar = {
    id?: boolean
    telegramUserId?: boolean
    transactionHash?: boolean
    network?: boolean
    value?: boolean
    status?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type UserTransactionOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "telegramUserId" | "transactionHash" | "network" | "value" | "status" | "createdAt" | "updatedAt", ExtArgs["result"]["userTransaction"]>
  export type UserTransactionInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }
  export type UserTransactionIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }
  export type UserTransactionIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }

  export type $UserTransactionPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "UserTransaction"
    objects: {
      telegramUser: Prisma.$TelegramUserPayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      telegramUserId: string
      transactionHash: string
      network: $Enums.TransactionNetwork
      value: number
      status: $Enums.TransactionStatus
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["userTransaction"]>
    composites: {}
  }

  type UserTransactionGetPayload<S extends boolean | null | undefined | UserTransactionDefaultArgs> = $Result.GetResult<Prisma.$UserTransactionPayload, S>

  type UserTransactionCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<UserTransactionFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: UserTransactionCountAggregateInputType | true
    }

  export interface UserTransactionDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['UserTransaction'], meta: { name: 'UserTransaction' } }
    /**
     * Find zero or one UserTransaction that matches the filter.
     * @param {UserTransactionFindUniqueArgs} args - Arguments to find a UserTransaction
     * @example
     * // Get one UserTransaction
     * const userTransaction = await prisma.userTransaction.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends UserTransactionFindUniqueArgs>(args: SelectSubset<T, UserTransactionFindUniqueArgs<ExtArgs>>): Prisma__UserTransactionClient<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one UserTransaction that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {UserTransactionFindUniqueOrThrowArgs} args - Arguments to find a UserTransaction
     * @example
     * // Get one UserTransaction
     * const userTransaction = await prisma.userTransaction.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends UserTransactionFindUniqueOrThrowArgs>(args: SelectSubset<T, UserTransactionFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserTransactionClient<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first UserTransaction 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 {UserTransactionFindFirstArgs} args - Arguments to find a UserTransaction
     * @example
     * // Get one UserTransaction
     * const userTransaction = await prisma.userTransaction.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends UserTransactionFindFirstArgs>(args?: SelectSubset<T, UserTransactionFindFirstArgs<ExtArgs>>): Prisma__UserTransactionClient<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first UserTransaction 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 {UserTransactionFindFirstOrThrowArgs} args - Arguments to find a UserTransaction
     * @example
     * // Get one UserTransaction
     * const userTransaction = await prisma.userTransaction.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends UserTransactionFindFirstOrThrowArgs>(args?: SelectSubset<T, UserTransactionFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserTransactionClient<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more UserTransactions 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 {UserTransactionFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all UserTransactions
     * const userTransactions = await prisma.userTransaction.findMany()
     * 
     * // Get first 10 UserTransactions
     * const userTransactions = await prisma.userTransaction.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const userTransactionWithIdOnly = await prisma.userTransaction.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends UserTransactionFindManyArgs>(args?: SelectSubset<T, UserTransactionFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a UserTransaction.
     * @param {UserTransactionCreateArgs} args - Arguments to create a UserTransaction.
     * @example
     * // Create one UserTransaction
     * const UserTransaction = await prisma.userTransaction.create({
     *   data: {
     *     // ... data to create a UserTransaction
     *   }
     * })
     * 
     */
    create<T extends UserTransactionCreateArgs>(args: SelectSubset<T, UserTransactionCreateArgs<ExtArgs>>): Prisma__UserTransactionClient<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many UserTransactions.
     * @param {UserTransactionCreateManyArgs} args - Arguments to create many UserTransactions.
     * @example
     * // Create many UserTransactions
     * const userTransaction = await prisma.userTransaction.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends UserTransactionCreateManyArgs>(args?: SelectSubset<T, UserTransactionCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many UserTransactions and returns the data saved in the database.
     * @param {UserTransactionCreateManyAndReturnArgs} args - Arguments to create many UserTransactions.
     * @example
     * // Create many UserTransactions
     * const userTransaction = await prisma.userTransaction.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many UserTransactions and only return the `id`
     * const userTransactionWithIdOnly = await prisma.userTransaction.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<T extends UserTransactionCreateManyAndReturnArgs>(args?: SelectSubset<T, UserTransactionCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a UserTransaction.
     * @param {UserTransactionDeleteArgs} args - Arguments to delete one UserTransaction.
     * @example
     * // Delete one UserTransaction
     * const UserTransaction = await prisma.userTransaction.delete({
     *   where: {
     *     // ... filter to delete one UserTransaction
     *   }
     * })
     * 
     */
    delete<T extends UserTransactionDeleteArgs>(args: SelectSubset<T, UserTransactionDeleteArgs<ExtArgs>>): Prisma__UserTransactionClient<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one UserTransaction.
     * @param {UserTransactionUpdateArgs} args - Arguments to update one UserTransaction.
     * @example
     * // Update one UserTransaction
     * const userTransaction = await prisma.userTransaction.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends UserTransactionUpdateArgs>(args: SelectSubset<T, UserTransactionUpdateArgs<ExtArgs>>): Prisma__UserTransactionClient<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more UserTransactions.
     * @param {UserTransactionDeleteManyArgs} args - Arguments to filter UserTransactions to delete.
     * @example
     * // Delete a few UserTransactions
     * const { count } = await prisma.userTransaction.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends UserTransactionDeleteManyArgs>(args?: SelectSubset<T, UserTransactionDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more UserTransactions.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserTransactionUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many UserTransactions
     * const userTransaction = await prisma.userTransaction.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends UserTransactionUpdateManyArgs>(args: SelectSubset<T, UserTransactionUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more UserTransactions and returns the data updated in the database.
     * @param {UserTransactionUpdateManyAndReturnArgs} args - Arguments to update many UserTransactions.
     * @example
     * // Update many UserTransactions
     * const userTransaction = await prisma.userTransaction.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more UserTransactions and only return the `id`
     * const userTransactionWithIdOnly = await prisma.userTransaction.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<T extends UserTransactionUpdateManyAndReturnArgs>(args: SelectSubset<T, UserTransactionUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one UserTransaction.
     * @param {UserTransactionUpsertArgs} args - Arguments to update or create a UserTransaction.
     * @example
     * // Update or create a UserTransaction
     * const userTransaction = await prisma.userTransaction.upsert({
     *   create: {
     *     // ... data to create a UserTransaction
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the UserTransaction we want to update
     *   }
     * })
     */
    upsert<T extends UserTransactionUpsertArgs>(args: SelectSubset<T, UserTransactionUpsertArgs<ExtArgs>>): Prisma__UserTransactionClient<$Result.GetResult<Prisma.$UserTransactionPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of UserTransactions.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserTransactionCountArgs} args - Arguments to filter UserTransactions to count.
     * @example
     * // Count the number of UserTransactions
     * const count = await prisma.userTransaction.count({
     *   where: {
     *     // ... the filter for the UserTransactions we want to count
     *   }
     * })
    **/
    count<T extends UserTransactionCountArgs>(
      args?: Subset<T, UserTransactionCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], UserTransactionCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a UserTransaction.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserTransactionAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends UserTransactionAggregateArgs>(args: Subset<T, UserTransactionAggregateArgs>): Prisma.PrismaPromise<GetUserTransactionAggregateType<T>>

    /**
     * Group by UserTransaction.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserTransactionGroupByArgs} 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 UserTransactionGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: UserTransactionGroupByArgs['orderBy'] }
        : { orderBy?: UserTransactionGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, UserTransactionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserTransactionGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the UserTransaction model
   */
  readonly fields: UserTransactionFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for UserTransaction.
   * 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__UserTransactionClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    telegramUser<T extends TelegramUserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUserDefaultArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the UserTransaction model
   */
  interface UserTransactionFieldRefs {
    readonly id: FieldRef<"UserTransaction", 'String'>
    readonly telegramUserId: FieldRef<"UserTransaction", 'String'>
    readonly transactionHash: FieldRef<"UserTransaction", 'String'>
    readonly network: FieldRef<"UserTransaction", 'TransactionNetwork'>
    readonly value: FieldRef<"UserTransaction", 'Float'>
    readonly status: FieldRef<"UserTransaction", 'TransactionStatus'>
    readonly createdAt: FieldRef<"UserTransaction", 'DateTime'>
    readonly updatedAt: FieldRef<"UserTransaction", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * UserTransaction findUnique
   */
  export type UserTransactionFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * Filter, which UserTransaction to fetch.
     */
    where: UserTransactionWhereUniqueInput
  }

  /**
   * UserTransaction findUniqueOrThrow
   */
  export type UserTransactionFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * Filter, which UserTransaction to fetch.
     */
    where: UserTransactionWhereUniqueInput
  }

  /**
   * UserTransaction findFirst
   */
  export type UserTransactionFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * Filter, which UserTransaction to fetch.
     */
    where?: UserTransactionWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserTransactions to fetch.
     */
    orderBy?: UserTransactionOrderByWithRelationInput | UserTransactionOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for UserTransactions.
     */
    cursor?: UserTransactionWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserTransactions 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` UserTransactions.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of UserTransactions.
     */
    distinct?: UserTransactionScalarFieldEnum | UserTransactionScalarFieldEnum[]
  }

  /**
   * UserTransaction findFirstOrThrow
   */
  export type UserTransactionFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * Filter, which UserTransaction to fetch.
     */
    where?: UserTransactionWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserTransactions to fetch.
     */
    orderBy?: UserTransactionOrderByWithRelationInput | UserTransactionOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for UserTransactions.
     */
    cursor?: UserTransactionWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserTransactions 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` UserTransactions.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of UserTransactions.
     */
    distinct?: UserTransactionScalarFieldEnum | UserTransactionScalarFieldEnum[]
  }

  /**
   * UserTransaction findMany
   */
  export type UserTransactionFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * Filter, which UserTransactions to fetch.
     */
    where?: UserTransactionWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserTransactions to fetch.
     */
    orderBy?: UserTransactionOrderByWithRelationInput | UserTransactionOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing UserTransactions.
     */
    cursor?: UserTransactionWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserTransactions 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` UserTransactions.
     */
    skip?: number
    distinct?: UserTransactionScalarFieldEnum | UserTransactionScalarFieldEnum[]
  }

  /**
   * UserTransaction create
   */
  export type UserTransactionCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * The data needed to create a UserTransaction.
     */
    data: XOR<UserTransactionCreateInput, UserTransactionUncheckedCreateInput>
  }

  /**
   * UserTransaction createMany
   */
  export type UserTransactionCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many UserTransactions.
     */
    data: UserTransactionCreateManyInput | UserTransactionCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * UserTransaction createManyAndReturn
   */
  export type UserTransactionCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * The data used to create many UserTransactions.
     */
    data: UserTransactionCreateManyInput | UserTransactionCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * UserTransaction update
   */
  export type UserTransactionUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * The data needed to update a UserTransaction.
     */
    data: XOR<UserTransactionUpdateInput, UserTransactionUncheckedUpdateInput>
    /**
     * Choose, which UserTransaction to update.
     */
    where: UserTransactionWhereUniqueInput
  }

  /**
   * UserTransaction updateMany
   */
  export type UserTransactionUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update UserTransactions.
     */
    data: XOR<UserTransactionUpdateManyMutationInput, UserTransactionUncheckedUpdateManyInput>
    /**
     * Filter which UserTransactions to update
     */
    where?: UserTransactionWhereInput
    /**
     * Limit how many UserTransactions to update.
     */
    limit?: number
  }

  /**
   * UserTransaction updateManyAndReturn
   */
  export type UserTransactionUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * The data used to update UserTransactions.
     */
    data: XOR<UserTransactionUpdateManyMutationInput, UserTransactionUncheckedUpdateManyInput>
    /**
     * Filter which UserTransactions to update
     */
    where?: UserTransactionWhereInput
    /**
     * Limit how many UserTransactions to update.
     */
    limit?: number
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionIncludeUpdateManyAndReturn<ExtArgs> | null
  }

  /**
   * UserTransaction upsert
   */
  export type UserTransactionUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * The filter to search for the UserTransaction to update in case it exists.
     */
    where: UserTransactionWhereUniqueInput
    /**
     * In case the UserTransaction found by the `where` argument doesn't exist, create a new UserTransaction with this data.
     */
    create: XOR<UserTransactionCreateInput, UserTransactionUncheckedCreateInput>
    /**
     * In case the UserTransaction was found with the provided `where` argument, update it with this data.
     */
    update: XOR<UserTransactionUpdateInput, UserTransactionUncheckedUpdateInput>
  }

  /**
   * UserTransaction delete
   */
  export type UserTransactionDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
    /**
     * Filter which UserTransaction to delete.
     */
    where: UserTransactionWhereUniqueInput
  }

  /**
   * UserTransaction deleteMany
   */
  export type UserTransactionDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which UserTransactions to delete
     */
    where?: UserTransactionWhereInput
    /**
     * Limit how many UserTransactions to delete.
     */
    limit?: number
  }

  /**
   * UserTransaction without action
   */
  export type UserTransactionDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTransaction
     */
    select?: UserTransactionSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTransaction
     */
    omit?: UserTransactionOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTransactionInclude<ExtArgs> | null
  }


  /**
   * Model UserBotState
   */

  export type AggregateUserBotState = {
    _count: UserBotStateCountAggregateOutputType | null
    _avg: UserBotStateAvgAggregateOutputType | null
    _sum: UserBotStateSumAggregateOutputType | null
    _min: UserBotStateMinAggregateOutputType | null
    _max: UserBotStateMaxAggregateOutputType | null
  }

  export type UserBotStateAvgAggregateOutputType = {
    selectedProductId: number | null
  }

  export type UserBotStateSumAggregateOutputType = {
    selectedProductId: number | null
  }

  export type UserBotStateMinAggregateOutputType = {
    id: string | null
    telegramUserId: string | null
    state: string | null
    selectedProductId: number | null
    selectedNetwork: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type UserBotStateMaxAggregateOutputType = {
    id: string | null
    telegramUserId: string | null
    state: string | null
    selectedProductId: number | null
    selectedNetwork: string | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type UserBotStateCountAggregateOutputType = {
    id: number
    telegramUserId: number
    state: number
    selectedProductId: number
    selectedNetwork: number
    additionalData: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type UserBotStateAvgAggregateInputType = {
    selectedProductId?: true
  }

  export type UserBotStateSumAggregateInputType = {
    selectedProductId?: true
  }

  export type UserBotStateMinAggregateInputType = {
    id?: true
    telegramUserId?: true
    state?: true
    selectedProductId?: true
    selectedNetwork?: true
    createdAt?: true
    updatedAt?: true
  }

  export type UserBotStateMaxAggregateInputType = {
    id?: true
    telegramUserId?: true
    state?: true
    selectedProductId?: true
    selectedNetwork?: true
    createdAt?: true
    updatedAt?: true
  }

  export type UserBotStateCountAggregateInputType = {
    id?: true
    telegramUserId?: true
    state?: true
    selectedProductId?: true
    selectedNetwork?: true
    additionalData?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type UserBotStateAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which UserBotState to aggregate.
     */
    where?: UserBotStateWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserBotStates to fetch.
     */
    orderBy?: UserBotStateOrderByWithRelationInput | UserBotStateOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: UserBotStateWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserBotStates 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` UserBotStates.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned UserBotStates
    **/
    _count?: true | UserBotStateCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to average
    **/
    _avg?: UserBotStateAvgAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to sum
    **/
    _sum?: UserBotStateSumAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: UserBotStateMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: UserBotStateMaxAggregateInputType
  }

  export type GetUserBotStateAggregateType<T extends UserBotStateAggregateArgs> = {
        [P in keyof T & keyof AggregateUserBotState]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateUserBotState[P]>
      : GetScalarType<T[P], AggregateUserBotState[P]>
  }




  export type UserBotStateGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserBotStateWhereInput
    orderBy?: UserBotStateOrderByWithAggregationInput | UserBotStateOrderByWithAggregationInput[]
    by: UserBotStateScalarFieldEnum[] | UserBotStateScalarFieldEnum
    having?: UserBotStateScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: UserBotStateCountAggregateInputType | true
    _avg?: UserBotStateAvgAggregateInputType
    _sum?: UserBotStateSumAggregateInputType
    _min?: UserBotStateMinAggregateInputType
    _max?: UserBotStateMaxAggregateInputType
  }

  export type UserBotStateGroupByOutputType = {
    id: string
    telegramUserId: string
    state: string
    selectedProductId: number | null
    selectedNetwork: string | null
    additionalData: JsonValue | null
    createdAt: Date
    updatedAt: Date
    _count: UserBotStateCountAggregateOutputType | null
    _avg: UserBotStateAvgAggregateOutputType | null
    _sum: UserBotStateSumAggregateOutputType | null
    _min: UserBotStateMinAggregateOutputType | null
    _max: UserBotStateMaxAggregateOutputType | null
  }

  type GetUserBotStateGroupByPayload<T extends UserBotStateGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<UserBotStateGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof UserBotStateGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], UserBotStateGroupByOutputType[P]>
            : GetScalarType<T[P], UserBotStateGroupByOutputType[P]>
        }
      >
    >


  export type UserBotStateSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    state?: boolean
    selectedProductId?: boolean
    selectedNetwork?: boolean
    additionalData?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userBotState"]>

  export type UserBotStateSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    state?: boolean
    selectedProductId?: boolean
    selectedNetwork?: boolean
    additionalData?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userBotState"]>

  export type UserBotStateSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    state?: boolean
    selectedProductId?: boolean
    selectedNetwork?: boolean
    additionalData?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userBotState"]>

  export type UserBotStateSelectScalar = {
    id?: boolean
    telegramUserId?: boolean
    state?: boolean
    selectedProductId?: boolean
    selectedNetwork?: boolean
    additionalData?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type UserBotStateOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "telegramUserId" | "state" | "selectedProductId" | "selectedNetwork" | "additionalData" | "createdAt" | "updatedAt", ExtArgs["result"]["userBotState"]>
  export type UserBotStateInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }
  export type UserBotStateIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }
  export type UserBotStateIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }

  export type $UserBotStatePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "UserBotState"
    objects: {
      telegramUser: Prisma.$TelegramUserPayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      telegramUserId: string
      state: string
      selectedProductId: number | null
      selectedNetwork: string | null
      additionalData: Prisma.JsonValue | null
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["userBotState"]>
    composites: {}
  }

  type UserBotStateGetPayload<S extends boolean | null | undefined | UserBotStateDefaultArgs> = $Result.GetResult<Prisma.$UserBotStatePayload, S>

  type UserBotStateCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<UserBotStateFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: UserBotStateCountAggregateInputType | true
    }

  export interface UserBotStateDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['UserBotState'], meta: { name: 'UserBotState' } }
    /**
     * Find zero or one UserBotState that matches the filter.
     * @param {UserBotStateFindUniqueArgs} args - Arguments to find a UserBotState
     * @example
     * // Get one UserBotState
     * const userBotState = await prisma.userBotState.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends UserBotStateFindUniqueArgs>(args: SelectSubset<T, UserBotStateFindUniqueArgs<ExtArgs>>): Prisma__UserBotStateClient<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one UserBotState that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {UserBotStateFindUniqueOrThrowArgs} args - Arguments to find a UserBotState
     * @example
     * // Get one UserBotState
     * const userBotState = await prisma.userBotState.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends UserBotStateFindUniqueOrThrowArgs>(args: SelectSubset<T, UserBotStateFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserBotStateClient<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first UserBotState 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 {UserBotStateFindFirstArgs} args - Arguments to find a UserBotState
     * @example
     * // Get one UserBotState
     * const userBotState = await prisma.userBotState.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends UserBotStateFindFirstArgs>(args?: SelectSubset<T, UserBotStateFindFirstArgs<ExtArgs>>): Prisma__UserBotStateClient<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first UserBotState 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 {UserBotStateFindFirstOrThrowArgs} args - Arguments to find a UserBotState
     * @example
     * // Get one UserBotState
     * const userBotState = await prisma.userBotState.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends UserBotStateFindFirstOrThrowArgs>(args?: SelectSubset<T, UserBotStateFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserBotStateClient<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more UserBotStates 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 {UserBotStateFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all UserBotStates
     * const userBotStates = await prisma.userBotState.findMany()
     * 
     * // Get first 10 UserBotStates
     * const userBotStates = await prisma.userBotState.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const userBotStateWithIdOnly = await prisma.userBotState.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends UserBotStateFindManyArgs>(args?: SelectSubset<T, UserBotStateFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a UserBotState.
     * @param {UserBotStateCreateArgs} args - Arguments to create a UserBotState.
     * @example
     * // Create one UserBotState
     * const UserBotState = await prisma.userBotState.create({
     *   data: {
     *     // ... data to create a UserBotState
     *   }
     * })
     * 
     */
    create<T extends UserBotStateCreateArgs>(args: SelectSubset<T, UserBotStateCreateArgs<ExtArgs>>): Prisma__UserBotStateClient<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many UserBotStates.
     * @param {UserBotStateCreateManyArgs} args - Arguments to create many UserBotStates.
     * @example
     * // Create many UserBotStates
     * const userBotState = await prisma.userBotState.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends UserBotStateCreateManyArgs>(args?: SelectSubset<T, UserBotStateCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many UserBotStates and returns the data saved in the database.
     * @param {UserBotStateCreateManyAndReturnArgs} args - Arguments to create many UserBotStates.
     * @example
     * // Create many UserBotStates
     * const userBotState = await prisma.userBotState.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many UserBotStates and only return the `id`
     * const userBotStateWithIdOnly = await prisma.userBotState.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<T extends UserBotStateCreateManyAndReturnArgs>(args?: SelectSubset<T, UserBotStateCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a UserBotState.
     * @param {UserBotStateDeleteArgs} args - Arguments to delete one UserBotState.
     * @example
     * // Delete one UserBotState
     * const UserBotState = await prisma.userBotState.delete({
     *   where: {
     *     // ... filter to delete one UserBotState
     *   }
     * })
     * 
     */
    delete<T extends UserBotStateDeleteArgs>(args: SelectSubset<T, UserBotStateDeleteArgs<ExtArgs>>): Prisma__UserBotStateClient<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one UserBotState.
     * @param {UserBotStateUpdateArgs} args - Arguments to update one UserBotState.
     * @example
     * // Update one UserBotState
     * const userBotState = await prisma.userBotState.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends UserBotStateUpdateArgs>(args: SelectSubset<T, UserBotStateUpdateArgs<ExtArgs>>): Prisma__UserBotStateClient<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more UserBotStates.
     * @param {UserBotStateDeleteManyArgs} args - Arguments to filter UserBotStates to delete.
     * @example
     * // Delete a few UserBotStates
     * const { count } = await prisma.userBotState.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends UserBotStateDeleteManyArgs>(args?: SelectSubset<T, UserBotStateDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more UserBotStates.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserBotStateUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many UserBotStates
     * const userBotState = await prisma.userBotState.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends UserBotStateUpdateManyArgs>(args: SelectSubset<T, UserBotStateUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more UserBotStates and returns the data updated in the database.
     * @param {UserBotStateUpdateManyAndReturnArgs} args - Arguments to update many UserBotStates.
     * @example
     * // Update many UserBotStates
     * const userBotState = await prisma.userBotState.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more UserBotStates and only return the `id`
     * const userBotStateWithIdOnly = await prisma.userBotState.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<T extends UserBotStateUpdateManyAndReturnArgs>(args: SelectSubset<T, UserBotStateUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one UserBotState.
     * @param {UserBotStateUpsertArgs} args - Arguments to update or create a UserBotState.
     * @example
     * // Update or create a UserBotState
     * const userBotState = await prisma.userBotState.upsert({
     *   create: {
     *     // ... data to create a UserBotState
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the UserBotState we want to update
     *   }
     * })
     */
    upsert<T extends UserBotStateUpsertArgs>(args: SelectSubset<T, UserBotStateUpsertArgs<ExtArgs>>): Prisma__UserBotStateClient<$Result.GetResult<Prisma.$UserBotStatePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of UserBotStates.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserBotStateCountArgs} args - Arguments to filter UserBotStates to count.
     * @example
     * // Count the number of UserBotStates
     * const count = await prisma.userBotState.count({
     *   where: {
     *     // ... the filter for the UserBotStates we want to count
     *   }
     * })
    **/
    count<T extends UserBotStateCountArgs>(
      args?: Subset<T, UserBotStateCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], UserBotStateCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a UserBotState.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserBotStateAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends UserBotStateAggregateArgs>(args: Subset<T, UserBotStateAggregateArgs>): Prisma.PrismaPromise<GetUserBotStateAggregateType<T>>

    /**
     * Group by UserBotState.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserBotStateGroupByArgs} 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 UserBotStateGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: UserBotStateGroupByArgs['orderBy'] }
        : { orderBy?: UserBotStateGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, UserBotStateGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserBotStateGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the UserBotState model
   */
  readonly fields: UserBotStateFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for UserBotState.
   * 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__UserBotStateClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    telegramUser<T extends TelegramUserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUserDefaultArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the UserBotState model
   */
  interface UserBotStateFieldRefs {
    readonly id: FieldRef<"UserBotState", 'String'>
    readonly telegramUserId: FieldRef<"UserBotState", 'String'>
    readonly state: FieldRef<"UserBotState", 'String'>
    readonly selectedProductId: FieldRef<"UserBotState", 'Int'>
    readonly selectedNetwork: FieldRef<"UserBotState", 'String'>
    readonly additionalData: FieldRef<"UserBotState", 'Json'>
    readonly createdAt: FieldRef<"UserBotState", 'DateTime'>
    readonly updatedAt: FieldRef<"UserBotState", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * UserBotState findUnique
   */
  export type UserBotStateFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * Filter, which UserBotState to fetch.
     */
    where: UserBotStateWhereUniqueInput
  }

  /**
   * UserBotState findUniqueOrThrow
   */
  export type UserBotStateFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * Filter, which UserBotState to fetch.
     */
    where: UserBotStateWhereUniqueInput
  }

  /**
   * UserBotState findFirst
   */
  export type UserBotStateFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * Filter, which UserBotState to fetch.
     */
    where?: UserBotStateWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserBotStates to fetch.
     */
    orderBy?: UserBotStateOrderByWithRelationInput | UserBotStateOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for UserBotStates.
     */
    cursor?: UserBotStateWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserBotStates 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` UserBotStates.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of UserBotStates.
     */
    distinct?: UserBotStateScalarFieldEnum | UserBotStateScalarFieldEnum[]
  }

  /**
   * UserBotState findFirstOrThrow
   */
  export type UserBotStateFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * Filter, which UserBotState to fetch.
     */
    where?: UserBotStateWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserBotStates to fetch.
     */
    orderBy?: UserBotStateOrderByWithRelationInput | UserBotStateOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for UserBotStates.
     */
    cursor?: UserBotStateWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserBotStates 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` UserBotStates.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of UserBotStates.
     */
    distinct?: UserBotStateScalarFieldEnum | UserBotStateScalarFieldEnum[]
  }

  /**
   * UserBotState findMany
   */
  export type UserBotStateFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * Filter, which UserBotStates to fetch.
     */
    where?: UserBotStateWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserBotStates to fetch.
     */
    orderBy?: UserBotStateOrderByWithRelationInput | UserBotStateOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing UserBotStates.
     */
    cursor?: UserBotStateWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserBotStates 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` UserBotStates.
     */
    skip?: number
    distinct?: UserBotStateScalarFieldEnum | UserBotStateScalarFieldEnum[]
  }

  /**
   * UserBotState create
   */
  export type UserBotStateCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * The data needed to create a UserBotState.
     */
    data: XOR<UserBotStateCreateInput, UserBotStateUncheckedCreateInput>
  }

  /**
   * UserBotState createMany
   */
  export type UserBotStateCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many UserBotStates.
     */
    data: UserBotStateCreateManyInput | UserBotStateCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * UserBotState createManyAndReturn
   */
  export type UserBotStateCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * The data used to create many UserBotStates.
     */
    data: UserBotStateCreateManyInput | UserBotStateCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * UserBotState update
   */
  export type UserBotStateUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * The data needed to update a UserBotState.
     */
    data: XOR<UserBotStateUpdateInput, UserBotStateUncheckedUpdateInput>
    /**
     * Choose, which UserBotState to update.
     */
    where: UserBotStateWhereUniqueInput
  }

  /**
   * UserBotState updateMany
   */
  export type UserBotStateUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update UserBotStates.
     */
    data: XOR<UserBotStateUpdateManyMutationInput, UserBotStateUncheckedUpdateManyInput>
    /**
     * Filter which UserBotStates to update
     */
    where?: UserBotStateWhereInput
    /**
     * Limit how many UserBotStates to update.
     */
    limit?: number
  }

  /**
   * UserBotState updateManyAndReturn
   */
  export type UserBotStateUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * The data used to update UserBotStates.
     */
    data: XOR<UserBotStateUpdateManyMutationInput, UserBotStateUncheckedUpdateManyInput>
    /**
     * Filter which UserBotStates to update
     */
    where?: UserBotStateWhereInput
    /**
     * Limit how many UserBotStates to update.
     */
    limit?: number
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateIncludeUpdateManyAndReturn<ExtArgs> | null
  }

  /**
   * UserBotState upsert
   */
  export type UserBotStateUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * The filter to search for the UserBotState to update in case it exists.
     */
    where: UserBotStateWhereUniqueInput
    /**
     * In case the UserBotState found by the `where` argument doesn't exist, create a new UserBotState with this data.
     */
    create: XOR<UserBotStateCreateInput, UserBotStateUncheckedCreateInput>
    /**
     * In case the UserBotState was found with the provided `where` argument, update it with this data.
     */
    update: XOR<UserBotStateUpdateInput, UserBotStateUncheckedUpdateInput>
  }

  /**
   * UserBotState delete
   */
  export type UserBotStateDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
    /**
     * Filter which UserBotState to delete.
     */
    where: UserBotStateWhereUniqueInput
  }

  /**
   * UserBotState deleteMany
   */
  export type UserBotStateDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which UserBotStates to delete
     */
    where?: UserBotStateWhereInput
    /**
     * Limit how many UserBotStates to delete.
     */
    limit?: number
  }

  /**
   * UserBotState without action
   */
  export type UserBotStateDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserBotState
     */
    select?: UserBotStateSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserBotState
     */
    omit?: UserBotStateOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserBotStateInclude<ExtArgs> | null
  }


  /**
   * Model UserTicket
   */

  export type AggregateUserTicket = {
    _count: UserTicketCountAggregateOutputType | null
    _min: UserTicketMinAggregateOutputType | null
    _max: UserTicketMaxAggregateOutputType | null
  }

  export type UserTicketMinAggregateOutputType = {
    id: string | null
    telegramUserId: string | null
    content: string | null
    checked: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type UserTicketMaxAggregateOutputType = {
    id: string | null
    telegramUserId: string | null
    content: string | null
    checked: boolean | null
    createdAt: Date | null
    updatedAt: Date | null
  }

  export type UserTicketCountAggregateOutputType = {
    id: number
    telegramUserId: number
    content: number
    checked: number
    createdAt: number
    updatedAt: number
    _all: number
  }


  export type UserTicketMinAggregateInputType = {
    id?: true
    telegramUserId?: true
    content?: true
    checked?: true
    createdAt?: true
    updatedAt?: true
  }

  export type UserTicketMaxAggregateInputType = {
    id?: true
    telegramUserId?: true
    content?: true
    checked?: true
    createdAt?: true
    updatedAt?: true
  }

  export type UserTicketCountAggregateInputType = {
    id?: true
    telegramUserId?: true
    content?: true
    checked?: true
    createdAt?: true
    updatedAt?: true
    _all?: true
  }

  export type UserTicketAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which UserTicket to aggregate.
     */
    where?: UserTicketWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserTickets to fetch.
     */
    orderBy?: UserTicketOrderByWithRelationInput | UserTicketOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: UserTicketWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserTickets 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` UserTickets.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned UserTickets
    **/
    _count?: true | UserTicketCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: UserTicketMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: UserTicketMaxAggregateInputType
  }

  export type GetUserTicketAggregateType<T extends UserTicketAggregateArgs> = {
        [P in keyof T & keyof AggregateUserTicket]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregateUserTicket[P]>
      : GetScalarType<T[P], AggregateUserTicket[P]>
  }




  export type UserTicketGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: UserTicketWhereInput
    orderBy?: UserTicketOrderByWithAggregationInput | UserTicketOrderByWithAggregationInput[]
    by: UserTicketScalarFieldEnum[] | UserTicketScalarFieldEnum
    having?: UserTicketScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: UserTicketCountAggregateInputType | true
    _min?: UserTicketMinAggregateInputType
    _max?: UserTicketMaxAggregateInputType
  }

  export type UserTicketGroupByOutputType = {
    id: string
    telegramUserId: string
    content: string
    checked: boolean
    createdAt: Date
    updatedAt: Date
    _count: UserTicketCountAggregateOutputType | null
    _min: UserTicketMinAggregateOutputType | null
    _max: UserTicketMaxAggregateOutputType | null
  }

  type GetUserTicketGroupByPayload<T extends UserTicketGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<UserTicketGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof UserTicketGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], UserTicketGroupByOutputType[P]>
            : GetScalarType<T[P], UserTicketGroupByOutputType[P]>
        }
      >
    >


  export type UserTicketSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    content?: boolean
    checked?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userTicket"]>

  export type UserTicketSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    content?: boolean
    checked?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userTicket"]>

  export type UserTicketSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramUserId?: boolean
    content?: boolean
    checked?: boolean
    createdAt?: boolean
    updatedAt?: boolean
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }, ExtArgs["result"]["userTicket"]>

  export type UserTicketSelectScalar = {
    id?: boolean
    telegramUserId?: boolean
    content?: boolean
    checked?: boolean
    createdAt?: boolean
    updatedAt?: boolean
  }

  export type UserTicketOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "telegramUserId" | "content" | "checked" | "createdAt" | "updatedAt", ExtArgs["result"]["userTicket"]>
  export type UserTicketInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }
  export type UserTicketIncludeCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }
  export type UserTicketIncludeUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    telegramUser?: boolean | TelegramUserDefaultArgs<ExtArgs>
  }

  export type $UserTicketPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "UserTicket"
    objects: {
      telegramUser: Prisma.$TelegramUserPayload<ExtArgs>
    }
    scalars: $Extensions.GetPayloadResult<{
      id: string
      telegramUserId: string
      content: string
      checked: boolean
      createdAt: Date
      updatedAt: Date
    }, ExtArgs["result"]["userTicket"]>
    composites: {}
  }

  type UserTicketGetPayload<S extends boolean | null | undefined | UserTicketDefaultArgs> = $Result.GetResult<Prisma.$UserTicketPayload, S>

  type UserTicketCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<UserTicketFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: UserTicketCountAggregateInputType | true
    }

  export interface UserTicketDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['UserTicket'], meta: { name: 'UserTicket' } }
    /**
     * Find zero or one UserTicket that matches the filter.
     * @param {UserTicketFindUniqueArgs} args - Arguments to find a UserTicket
     * @example
     * // Get one UserTicket
     * const userTicket = await prisma.userTicket.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends UserTicketFindUniqueArgs>(args: SelectSubset<T, UserTicketFindUniqueArgs<ExtArgs>>): Prisma__UserTicketClient<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one UserTicket that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {UserTicketFindUniqueOrThrowArgs} args - Arguments to find a UserTicket
     * @example
     * // Get one UserTicket
     * const userTicket = await prisma.userTicket.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends UserTicketFindUniqueOrThrowArgs>(args: SelectSubset<T, UserTicketFindUniqueOrThrowArgs<ExtArgs>>): Prisma__UserTicketClient<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first UserTicket 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 {UserTicketFindFirstArgs} args - Arguments to find a UserTicket
     * @example
     * // Get one UserTicket
     * const userTicket = await prisma.userTicket.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends UserTicketFindFirstArgs>(args?: SelectSubset<T, UserTicketFindFirstArgs<ExtArgs>>): Prisma__UserTicketClient<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first UserTicket 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 {UserTicketFindFirstOrThrowArgs} args - Arguments to find a UserTicket
     * @example
     * // Get one UserTicket
     * const userTicket = await prisma.userTicket.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends UserTicketFindFirstOrThrowArgs>(args?: SelectSubset<T, UserTicketFindFirstOrThrowArgs<ExtArgs>>): Prisma__UserTicketClient<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more UserTickets 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 {UserTicketFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all UserTickets
     * const userTickets = await prisma.userTicket.findMany()
     * 
     * // Get first 10 UserTickets
     * const userTickets = await prisma.userTicket.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const userTicketWithIdOnly = await prisma.userTicket.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends UserTicketFindManyArgs>(args?: SelectSubset<T, UserTicketFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a UserTicket.
     * @param {UserTicketCreateArgs} args - Arguments to create a UserTicket.
     * @example
     * // Create one UserTicket
     * const UserTicket = await prisma.userTicket.create({
     *   data: {
     *     // ... data to create a UserTicket
     *   }
     * })
     * 
     */
    create<T extends UserTicketCreateArgs>(args: SelectSubset<T, UserTicketCreateArgs<ExtArgs>>): Prisma__UserTicketClient<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many UserTickets.
     * @param {UserTicketCreateManyArgs} args - Arguments to create many UserTickets.
     * @example
     * // Create many UserTickets
     * const userTicket = await prisma.userTicket.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends UserTicketCreateManyArgs>(args?: SelectSubset<T, UserTicketCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many UserTickets and returns the data saved in the database.
     * @param {UserTicketCreateManyAndReturnArgs} args - Arguments to create many UserTickets.
     * @example
     * // Create many UserTickets
     * const userTicket = await prisma.userTicket.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many UserTickets and only return the `id`
     * const userTicketWithIdOnly = await prisma.userTicket.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<T extends UserTicketCreateManyAndReturnArgs>(args?: SelectSubset<T, UserTicketCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a UserTicket.
     * @param {UserTicketDeleteArgs} args - Arguments to delete one UserTicket.
     * @example
     * // Delete one UserTicket
     * const UserTicket = await prisma.userTicket.delete({
     *   where: {
     *     // ... filter to delete one UserTicket
     *   }
     * })
     * 
     */
    delete<T extends UserTicketDeleteArgs>(args: SelectSubset<T, UserTicketDeleteArgs<ExtArgs>>): Prisma__UserTicketClient<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one UserTicket.
     * @param {UserTicketUpdateArgs} args - Arguments to update one UserTicket.
     * @example
     * // Update one UserTicket
     * const userTicket = await prisma.userTicket.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends UserTicketUpdateArgs>(args: SelectSubset<T, UserTicketUpdateArgs<ExtArgs>>): Prisma__UserTicketClient<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more UserTickets.
     * @param {UserTicketDeleteManyArgs} args - Arguments to filter UserTickets to delete.
     * @example
     * // Delete a few UserTickets
     * const { count } = await prisma.userTicket.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends UserTicketDeleteManyArgs>(args?: SelectSubset<T, UserTicketDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more UserTickets.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserTicketUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many UserTickets
     * const userTicket = await prisma.userTicket.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends UserTicketUpdateManyArgs>(args: SelectSubset<T, UserTicketUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more UserTickets and returns the data updated in the database.
     * @param {UserTicketUpdateManyAndReturnArgs} args - Arguments to update many UserTickets.
     * @example
     * // Update many UserTickets
     * const userTicket = await prisma.userTicket.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more UserTickets and only return the `id`
     * const userTicketWithIdOnly = await prisma.userTicket.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<T extends UserTicketUpdateManyAndReturnArgs>(args: SelectSubset<T, UserTicketUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one UserTicket.
     * @param {UserTicketUpsertArgs} args - Arguments to update or create a UserTicket.
     * @example
     * // Update or create a UserTicket
     * const userTicket = await prisma.userTicket.upsert({
     *   create: {
     *     // ... data to create a UserTicket
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the UserTicket we want to update
     *   }
     * })
     */
    upsert<T extends UserTicketUpsertArgs>(args: SelectSubset<T, UserTicketUpsertArgs<ExtArgs>>): Prisma__UserTicketClient<$Result.GetResult<Prisma.$UserTicketPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of UserTickets.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserTicketCountArgs} args - Arguments to filter UserTickets to count.
     * @example
     * // Count the number of UserTickets
     * const count = await prisma.userTicket.count({
     *   where: {
     *     // ... the filter for the UserTickets we want to count
     *   }
     * })
    **/
    count<T extends UserTicketCountArgs>(
      args?: Subset<T, UserTicketCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], UserTicketCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a UserTicket.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserTicketAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends UserTicketAggregateArgs>(args: Subset<T, UserTicketAggregateArgs>): Prisma.PrismaPromise<GetUserTicketAggregateType<T>>

    /**
     * Group by UserTicket.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {UserTicketGroupByArgs} 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 UserTicketGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: UserTicketGroupByArgs['orderBy'] }
        : { orderBy?: UserTicketGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, UserTicketGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserTicketGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the UserTicket model
   */
  readonly fields: UserTicketFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for UserTicket.
   * 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__UserTicketClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    telegramUser<T extends TelegramUserDefaultArgs<ExtArgs> = {}>(args?: Subset<T, TelegramUserDefaultArgs<ExtArgs>>): Prisma__TelegramUserClient<$Result.GetResult<Prisma.$TelegramUserPayload<ExtArgs>, 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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the UserTicket model
   */
  interface UserTicketFieldRefs {
    readonly id: FieldRef<"UserTicket", 'String'>
    readonly telegramUserId: FieldRef<"UserTicket", 'String'>
    readonly content: FieldRef<"UserTicket", 'String'>
    readonly checked: FieldRef<"UserTicket", 'Boolean'>
    readonly createdAt: FieldRef<"UserTicket", 'DateTime'>
    readonly updatedAt: FieldRef<"UserTicket", 'DateTime'>
  }
    

  // Custom InputTypes
  /**
   * UserTicket findUnique
   */
  export type UserTicketFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * Filter, which UserTicket to fetch.
     */
    where: UserTicketWhereUniqueInput
  }

  /**
   * UserTicket findUniqueOrThrow
   */
  export type UserTicketFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * Filter, which UserTicket to fetch.
     */
    where: UserTicketWhereUniqueInput
  }

  /**
   * UserTicket findFirst
   */
  export type UserTicketFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * Filter, which UserTicket to fetch.
     */
    where?: UserTicketWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserTickets to fetch.
     */
    orderBy?: UserTicketOrderByWithRelationInput | UserTicketOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for UserTickets.
     */
    cursor?: UserTicketWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserTickets 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` UserTickets.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of UserTickets.
     */
    distinct?: UserTicketScalarFieldEnum | UserTicketScalarFieldEnum[]
  }

  /**
   * UserTicket findFirstOrThrow
   */
  export type UserTicketFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * Filter, which UserTicket to fetch.
     */
    where?: UserTicketWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserTickets to fetch.
     */
    orderBy?: UserTicketOrderByWithRelationInput | UserTicketOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for UserTickets.
     */
    cursor?: UserTicketWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserTickets 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` UserTickets.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of UserTickets.
     */
    distinct?: UserTicketScalarFieldEnum | UserTicketScalarFieldEnum[]
  }

  /**
   * UserTicket findMany
   */
  export type UserTicketFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * Filter, which UserTickets to fetch.
     */
    where?: UserTicketWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of UserTickets to fetch.
     */
    orderBy?: UserTicketOrderByWithRelationInput | UserTicketOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing UserTickets.
     */
    cursor?: UserTicketWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` UserTickets 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` UserTickets.
     */
    skip?: number
    distinct?: UserTicketScalarFieldEnum | UserTicketScalarFieldEnum[]
  }

  /**
   * UserTicket create
   */
  export type UserTicketCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * The data needed to create a UserTicket.
     */
    data: XOR<UserTicketCreateInput, UserTicketUncheckedCreateInput>
  }

  /**
   * UserTicket createMany
   */
  export type UserTicketCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many UserTickets.
     */
    data: UserTicketCreateManyInput | UserTicketCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * UserTicket createManyAndReturn
   */
  export type UserTicketCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * The data used to create many UserTickets.
     */
    data: UserTicketCreateManyInput | UserTicketCreateManyInput[]
    skipDuplicates?: boolean
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketIncludeCreateManyAndReturn<ExtArgs> | null
  }

  /**
   * UserTicket update
   */
  export type UserTicketUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * The data needed to update a UserTicket.
     */
    data: XOR<UserTicketUpdateInput, UserTicketUncheckedUpdateInput>
    /**
     * Choose, which UserTicket to update.
     */
    where: UserTicketWhereUniqueInput
  }

  /**
   * UserTicket updateMany
   */
  export type UserTicketUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update UserTickets.
     */
    data: XOR<UserTicketUpdateManyMutationInput, UserTicketUncheckedUpdateManyInput>
    /**
     * Filter which UserTickets to update
     */
    where?: UserTicketWhereInput
    /**
     * Limit how many UserTickets to update.
     */
    limit?: number
  }

  /**
   * UserTicket updateManyAndReturn
   */
  export type UserTicketUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * The data used to update UserTickets.
     */
    data: XOR<UserTicketUpdateManyMutationInput, UserTicketUncheckedUpdateManyInput>
    /**
     * Filter which UserTickets to update
     */
    where?: UserTicketWhereInput
    /**
     * Limit how many UserTickets to update.
     */
    limit?: number
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketIncludeUpdateManyAndReturn<ExtArgs> | null
  }

  /**
   * UserTicket upsert
   */
  export type UserTicketUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * The filter to search for the UserTicket to update in case it exists.
     */
    where: UserTicketWhereUniqueInput
    /**
     * In case the UserTicket found by the `where` argument doesn't exist, create a new UserTicket with this data.
     */
    create: XOR<UserTicketCreateInput, UserTicketUncheckedCreateInput>
    /**
     * In case the UserTicket was found with the provided `where` argument, update it with this data.
     */
    update: XOR<UserTicketUpdateInput, UserTicketUncheckedUpdateInput>
  }

  /**
   * UserTicket delete
   */
  export type UserTicketDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
    /**
     * Filter which UserTicket to delete.
     */
    where: UserTicketWhereUniqueInput
  }

  /**
   * UserTicket deleteMany
   */
  export type UserTicketDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which UserTickets to delete
     */
    where?: UserTicketWhereInput
    /**
     * Limit how many UserTickets to delete.
     */
    limit?: number
  }

  /**
   * UserTicket without action
   */
  export type UserTicketDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the UserTicket
     */
    select?: UserTicketSelect<ExtArgs> | null
    /**
     * Omit specific fields from the UserTicket
     */
    omit?: UserTicketOmit<ExtArgs> | null
    /**
     * Choose, which related nodes to fetch as well
     */
    include?: UserTicketInclude<ExtArgs> | null
  }


  /**
   * Model PanelSetting
   */

  export type AggregatePanelSetting = {
    _count: PanelSettingCountAggregateOutputType | null
    _min: PanelSettingMinAggregateOutputType | null
    _max: PanelSettingMaxAggregateOutputType | null
  }

  export type PanelSettingMinAggregateOutputType = {
    id: string | null
    telegramBotToken: string | null
    pineconeIndexName: string | null
    pineconeNamespace: string | null
    pineconeHost: string | null
  }

  export type PanelSettingMaxAggregateOutputType = {
    id: string | null
    telegramBotToken: string | null
    pineconeIndexName: string | null
    pineconeNamespace: string | null
    pineconeHost: string | null
  }

  export type PanelSettingCountAggregateOutputType = {
    id: number
    telegramBotToken: number
    pineconeIndexName: number
    pineconeNamespace: number
    pineconeHost: number
    _all: number
  }


  export type PanelSettingMinAggregateInputType = {
    id?: true
    telegramBotToken?: true
    pineconeIndexName?: true
    pineconeNamespace?: true
    pineconeHost?: true
  }

  export type PanelSettingMaxAggregateInputType = {
    id?: true
    telegramBotToken?: true
    pineconeIndexName?: true
    pineconeNamespace?: true
    pineconeHost?: true
  }

  export type PanelSettingCountAggregateInputType = {
    id?: true
    telegramBotToken?: true
    pineconeIndexName?: true
    pineconeNamespace?: true
    pineconeHost?: true
    _all?: true
  }

  export type PanelSettingAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which PanelSetting to aggregate.
     */
    where?: PanelSettingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of PanelSettings to fetch.
     */
    orderBy?: PanelSettingOrderByWithRelationInput | PanelSettingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the start position
     */
    cursor?: PanelSettingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` PanelSettings 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` PanelSettings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Count returned PanelSettings
    **/
    _count?: true | PanelSettingCountAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the minimum value
    **/
    _min?: PanelSettingMinAggregateInputType
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
     * 
     * Select which fields to find the maximum value
    **/
    _max?: PanelSettingMaxAggregateInputType
  }

  export type GetPanelSettingAggregateType<T extends PanelSettingAggregateArgs> = {
        [P in keyof T & keyof AggregatePanelSetting]: P extends '_count' | 'count'
      ? T[P] extends true
        ? number
        : GetScalarType<T[P], AggregatePanelSetting[P]>
      : GetScalarType<T[P], AggregatePanelSetting[P]>
  }




  export type PanelSettingGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    where?: PanelSettingWhereInput
    orderBy?: PanelSettingOrderByWithAggregationInput | PanelSettingOrderByWithAggregationInput[]
    by: PanelSettingScalarFieldEnum[] | PanelSettingScalarFieldEnum
    having?: PanelSettingScalarWhereWithAggregatesInput
    take?: number
    skip?: number
    _count?: PanelSettingCountAggregateInputType | true
    _min?: PanelSettingMinAggregateInputType
    _max?: PanelSettingMaxAggregateInputType
  }

  export type PanelSettingGroupByOutputType = {
    id: string
    telegramBotToken: string | null
    pineconeIndexName: string | null
    pineconeNamespace: string | null
    pineconeHost: string | null
    _count: PanelSettingCountAggregateOutputType | null
    _min: PanelSettingMinAggregateOutputType | null
    _max: PanelSettingMaxAggregateOutputType | null
  }

  type GetPanelSettingGroupByPayload<T extends PanelSettingGroupByArgs> = Prisma.PrismaPromise<
    Array<
      PickEnumerable<PanelSettingGroupByOutputType, T['by']> &
        {
          [P in ((keyof T) & (keyof PanelSettingGroupByOutputType))]: P extends '_count'
            ? T[P] extends boolean
              ? number
              : GetScalarType<T[P], PanelSettingGroupByOutputType[P]>
            : GetScalarType<T[P], PanelSettingGroupByOutputType[P]>
        }
      >
    >


  export type PanelSettingSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramBotToken?: boolean
    pineconeIndexName?: boolean
    pineconeNamespace?: boolean
    pineconeHost?: boolean
  }, ExtArgs["result"]["panelSetting"]>

  export type PanelSettingSelectCreateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramBotToken?: boolean
    pineconeIndexName?: boolean
    pineconeNamespace?: boolean
    pineconeHost?: boolean
  }, ExtArgs["result"]["panelSetting"]>

  export type PanelSettingSelectUpdateManyAndReturn<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
    id?: boolean
    telegramBotToken?: boolean
    pineconeIndexName?: boolean
    pineconeNamespace?: boolean
    pineconeHost?: boolean
  }, ExtArgs["result"]["panelSetting"]>

  export type PanelSettingSelectScalar = {
    id?: boolean
    telegramBotToken?: boolean
    pineconeIndexName?: boolean
    pineconeNamespace?: boolean
    pineconeHost?: boolean
  }

  export type PanelSettingOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "telegramBotToken" | "pineconeIndexName" | "pineconeNamespace" | "pineconeHost", ExtArgs["result"]["panelSetting"]>

  export type $PanelSettingPayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    name: "PanelSetting"
    objects: {}
    scalars: $Extensions.GetPayloadResult<{
      id: string
      telegramBotToken: string | null
      pineconeIndexName: string | null
      pineconeNamespace: string | null
      pineconeHost: string | null
    }, ExtArgs["result"]["panelSetting"]>
    composites: {}
  }

  type PanelSettingGetPayload<S extends boolean | null | undefined | PanelSettingDefaultArgs> = $Result.GetResult<Prisma.$PanelSettingPayload, S>

  type PanelSettingCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
    Omit<PanelSettingFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
      select?: PanelSettingCountAggregateInputType | true
    }

  export interface PanelSettingDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
    [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['PanelSetting'], meta: { name: 'PanelSetting' } }
    /**
     * Find zero or one PanelSetting that matches the filter.
     * @param {PanelSettingFindUniqueArgs} args - Arguments to find a PanelSetting
     * @example
     * // Get one PanelSetting
     * const panelSetting = await prisma.panelSetting.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUnique<T extends PanelSettingFindUniqueArgs>(args: SelectSubset<T, PanelSettingFindUniqueArgs<ExtArgs>>): Prisma__PanelSettingClient<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find one PanelSetting that matches the filter or throw an error with `error.code='P2025'`
     * if no matches were found.
     * @param {PanelSettingFindUniqueOrThrowArgs} args - Arguments to find a PanelSetting
     * @example
     * // Get one PanelSetting
     * const panelSetting = await prisma.panelSetting.findUniqueOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findUniqueOrThrow<T extends PanelSettingFindUniqueOrThrowArgs>(args: SelectSubset<T, PanelSettingFindUniqueOrThrowArgs<ExtArgs>>): Prisma__PanelSettingClient<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first PanelSetting 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 {PanelSettingFindFirstArgs} args - Arguments to find a PanelSetting
     * @example
     * // Get one PanelSetting
     * const panelSetting = await prisma.panelSetting.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirst<T extends PanelSettingFindFirstArgs>(args?: SelectSubset<T, PanelSettingFindFirstArgs<ExtArgs>>): Prisma__PanelSettingClient<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

    /**
     * Find the first PanelSetting 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 {PanelSettingFindFirstOrThrowArgs} args - Arguments to find a PanelSetting
     * @example
     * // Get one PanelSetting
     * const panelSetting = await prisma.panelSetting.findFirstOrThrow({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     */
    findFirstOrThrow<T extends PanelSettingFindFirstOrThrowArgs>(args?: SelectSubset<T, PanelSettingFindFirstOrThrowArgs<ExtArgs>>): Prisma__PanelSettingClient<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Find zero or more PanelSettings 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 {PanelSettingFindManyArgs} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all PanelSettings
     * const panelSettings = await prisma.panelSetting.findMany()
     * 
     * // Get first 10 PanelSettings
     * const panelSettings = await prisma.panelSetting.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const panelSettingWithIdOnly = await prisma.panelSetting.findMany({ select: { id: true } })
     * 
     */
    findMany<T extends PanelSettingFindManyArgs>(args?: SelectSubset<T, PanelSettingFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

    /**
     * Create a PanelSetting.
     * @param {PanelSettingCreateArgs} args - Arguments to create a PanelSetting.
     * @example
     * // Create one PanelSetting
     * const PanelSetting = await prisma.panelSetting.create({
     *   data: {
     *     // ... data to create a PanelSetting
     *   }
     * })
     * 
     */
    create<T extends PanelSettingCreateArgs>(args: SelectSubset<T, PanelSettingCreateArgs<ExtArgs>>): Prisma__PanelSettingClient<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Create many PanelSettings.
     * @param {PanelSettingCreateManyArgs} args - Arguments to create many PanelSettings.
     * @example
     * // Create many PanelSettings
     * const panelSetting = await prisma.panelSetting.createMany({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     *     
     */
    createMany<T extends PanelSettingCreateManyArgs>(args?: SelectSubset<T, PanelSettingCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Create many PanelSettings and returns the data saved in the database.
     * @param {PanelSettingCreateManyAndReturnArgs} args - Arguments to create many PanelSettings.
     * @example
     * // Create many PanelSettings
     * const panelSetting = await prisma.panelSetting.createManyAndReturn({
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Create many PanelSettings and only return the `id`
     * const panelSettingWithIdOnly = await prisma.panelSetting.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<T extends PanelSettingCreateManyAndReturnArgs>(args?: SelectSubset<T, PanelSettingCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

    /**
     * Delete a PanelSetting.
     * @param {PanelSettingDeleteArgs} args - Arguments to delete one PanelSetting.
     * @example
     * // Delete one PanelSetting
     * const PanelSetting = await prisma.panelSetting.delete({
     *   where: {
     *     // ... filter to delete one PanelSetting
     *   }
     * })
     * 
     */
    delete<T extends PanelSettingDeleteArgs>(args: SelectSubset<T, PanelSettingDeleteArgs<ExtArgs>>): Prisma__PanelSettingClient<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Update one PanelSetting.
     * @param {PanelSettingUpdateArgs} args - Arguments to update one PanelSetting.
     * @example
     * // Update one PanelSetting
     * const panelSetting = await prisma.panelSetting.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    update<T extends PanelSettingUpdateArgs>(args: SelectSubset<T, PanelSettingUpdateArgs<ExtArgs>>): Prisma__PanelSettingClient<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

    /**
     * Delete zero or more PanelSettings.
     * @param {PanelSettingDeleteManyArgs} args - Arguments to filter PanelSettings to delete.
     * @example
     * // Delete a few PanelSettings
     * const { count } = await prisma.panelSetting.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
     */
    deleteMany<T extends PanelSettingDeleteManyArgs>(args?: SelectSubset<T, PanelSettingDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more PanelSettings.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PanelSettingUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many PanelSettings
     * const panelSetting = await prisma.panelSetting.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
     */
    updateMany<T extends PanelSettingUpdateManyArgs>(args: SelectSubset<T, PanelSettingUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>

    /**
     * Update zero or more PanelSettings and returns the data updated in the database.
     * @param {PanelSettingUpdateManyAndReturnArgs} args - Arguments to update many PanelSettings.
     * @example
     * // Update many PanelSettings
     * const panelSetting = await prisma.panelSetting.updateManyAndReturn({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: [
     *     // ... provide data here
     *   ]
     * })
     * 
     * // Update zero or more PanelSettings and only return the `id`
     * const panelSettingWithIdOnly = await prisma.panelSetting.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<T extends PanelSettingUpdateManyAndReturnArgs>(args: SelectSubset<T, PanelSettingUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

    /**
     * Create or update one PanelSetting.
     * @param {PanelSettingUpsertArgs} args - Arguments to update or create a PanelSetting.
     * @example
     * // Update or create a PanelSetting
     * const panelSetting = await prisma.panelSetting.upsert({
     *   create: {
     *     // ... data to create a PanelSetting
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the PanelSetting we want to update
     *   }
     * })
     */
    upsert<T extends PanelSettingUpsertArgs>(args: SelectSubset<T, PanelSettingUpsertArgs<ExtArgs>>): Prisma__PanelSettingClient<$Result.GetResult<Prisma.$PanelSettingPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


    /**
     * Count the number of PanelSettings.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PanelSettingCountArgs} args - Arguments to filter PanelSettings to count.
     * @example
     * // Count the number of PanelSettings
     * const count = await prisma.panelSetting.count({
     *   where: {
     *     // ... the filter for the PanelSettings we want to count
     *   }
     * })
    **/
    count<T extends PanelSettingCountArgs>(
      args?: Subset<T, PanelSettingCountArgs>,
    ): Prisma.PrismaPromise<
      T extends $Utils.Record<'select', any>
        ? T['select'] extends true
          ? number
          : GetScalarType<T['select'], PanelSettingCountAggregateOutputType>
        : number
    >

    /**
     * Allows you to perform aggregations operations on a PanelSetting.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PanelSettingAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
     * @example
     * // Ordered by age ascending
     * // Where email contains prisma.io
     * // Limited to the 10 users
     * const aggregations = await prisma.user.aggregate({
     *   _avg: {
     *     age: true,
     *   },
     *   where: {
     *     email: {
     *       contains: "prisma.io",
     *     },
     *   },
     *   orderBy: {
     *     age: "asc",
     *   },
     *   take: 10,
     * })
    **/
    aggregate<T extends PanelSettingAggregateArgs>(args: Subset<T, PanelSettingAggregateArgs>): Prisma.PrismaPromise<GetPanelSettingAggregateType<T>>

    /**
     * Group by PanelSetting.
     * Note, that providing `undefined` is treated as the value not being there.
     * Read more here: https://pris.ly/d/null-undefined
     * @param {PanelSettingGroupByArgs} 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 PanelSettingGroupByArgs,
      HasSelectOrTake extends Or<
        Extends<'skip', Keys<T>>,
        Extends<'take', Keys<T>>
      >,
      OrderByArg extends True extends HasSelectOrTake
        ? { orderBy: PanelSettingGroupByArgs['orderBy'] }
        : { orderBy?: PanelSettingGroupByArgs['orderBy'] },
      OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
      ByFields extends MaybeTupleToUnion<T['by']>,
      ByValid extends Has<ByFields, OrderFields>,
      HavingFields extends GetHavingFields<T['having']>,
      HavingValid extends Has<ByFields, HavingFields>,
      ByEmpty extends T['by'] extends never[] ? True : False,
      InputErrors extends ByEmpty extends True
      ? `Error: "by" must not be empty.`
      : HavingValid extends False
      ? {
          [P in HavingFields]: P extends ByFields
            ? never
            : P extends string
            ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
            : [
                Error,
                'Field ',
                P,
                ` in "having" needs to be provided in "by"`,
              ]
        }[HavingFields]
      : 'take' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "take", you also need to provide "orderBy"'
      : 'skip' extends Keys<T>
      ? 'orderBy' extends Keys<T>
        ? ByValid extends True
          ? {}
          : {
              [P in OrderFields]: P extends ByFields
                ? never
                : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
            }[OrderFields]
        : 'Error: If you provide "skip", you also need to provide "orderBy"'
      : ByValid extends True
      ? {}
      : {
          [P in OrderFields]: P extends ByFields
            ? never
            : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
        }[OrderFields]
    >(args: SubsetIntersection<T, PanelSettingGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetPanelSettingGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the PanelSetting model
   */
  readonly fields: PanelSettingFieldRefs;
  }

  /**
   * The delegate class that acts as a "Promise-like" for PanelSetting.
   * 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__PanelSettingClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
    readonly [Symbol.toStringTag]: "PrismaPromise"
    /**
     * Attaches callbacks for the resolution and/or rejection of the Promise.
     * @param onfulfilled The callback to execute when the Promise is resolved.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of which ever callback is executed.
     */
    then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
  }




  /**
   * Fields of the PanelSetting model
   */
  interface PanelSettingFieldRefs {
    readonly id: FieldRef<"PanelSetting", 'String'>
    readonly telegramBotToken: FieldRef<"PanelSetting", 'String'>
    readonly pineconeIndexName: FieldRef<"PanelSetting", 'String'>
    readonly pineconeNamespace: FieldRef<"PanelSetting", 'String'>
    readonly pineconeHost: FieldRef<"PanelSetting", 'String'>
  }
    

  // Custom InputTypes
  /**
   * PanelSetting findUnique
   */
  export type PanelSettingFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * Filter, which PanelSetting to fetch.
     */
    where: PanelSettingWhereUniqueInput
  }

  /**
   * PanelSetting findUniqueOrThrow
   */
  export type PanelSettingFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * Filter, which PanelSetting to fetch.
     */
    where: PanelSettingWhereUniqueInput
  }

  /**
   * PanelSetting findFirst
   */
  export type PanelSettingFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * Filter, which PanelSetting to fetch.
     */
    where?: PanelSettingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of PanelSettings to fetch.
     */
    orderBy?: PanelSettingOrderByWithRelationInput | PanelSettingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for PanelSettings.
     */
    cursor?: PanelSettingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` PanelSettings 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` PanelSettings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of PanelSettings.
     */
    distinct?: PanelSettingScalarFieldEnum | PanelSettingScalarFieldEnum[]
  }

  /**
   * PanelSetting findFirstOrThrow
   */
  export type PanelSettingFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * Filter, which PanelSetting to fetch.
     */
    where?: PanelSettingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of PanelSettings to fetch.
     */
    orderBy?: PanelSettingOrderByWithRelationInput | PanelSettingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for searching for PanelSettings.
     */
    cursor?: PanelSettingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` PanelSettings 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` PanelSettings.
     */
    skip?: number
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
     * 
     * Filter by unique combinations of PanelSettings.
     */
    distinct?: PanelSettingScalarFieldEnum | PanelSettingScalarFieldEnum[]
  }

  /**
   * PanelSetting findMany
   */
  export type PanelSettingFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * Filter, which PanelSettings to fetch.
     */
    where?: PanelSettingWhereInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
     * 
     * Determine the order of PanelSettings to fetch.
     */
    orderBy?: PanelSettingOrderByWithRelationInput | PanelSettingOrderByWithRelationInput[]
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
     * 
     * Sets the position for listing PanelSettings.
     */
    cursor?: PanelSettingWhereUniqueInput
    /**
     * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
     * 
     * Take `±n` PanelSettings 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` PanelSettings.
     */
    skip?: number
    distinct?: PanelSettingScalarFieldEnum | PanelSettingScalarFieldEnum[]
  }

  /**
   * PanelSetting create
   */
  export type PanelSettingCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * The data needed to create a PanelSetting.
     */
    data?: XOR<PanelSettingCreateInput, PanelSettingUncheckedCreateInput>
  }

  /**
   * PanelSetting createMany
   */
  export type PanelSettingCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to create many PanelSettings.
     */
    data: PanelSettingCreateManyInput | PanelSettingCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * PanelSetting createManyAndReturn
   */
  export type PanelSettingCreateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelectCreateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * The data used to create many PanelSettings.
     */
    data: PanelSettingCreateManyInput | PanelSettingCreateManyInput[]
    skipDuplicates?: boolean
  }

  /**
   * PanelSetting update
   */
  export type PanelSettingUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * The data needed to update a PanelSetting.
     */
    data: XOR<PanelSettingUpdateInput, PanelSettingUncheckedUpdateInput>
    /**
     * Choose, which PanelSetting to update.
     */
    where: PanelSettingWhereUniqueInput
  }

  /**
   * PanelSetting updateMany
   */
  export type PanelSettingUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * The data used to update PanelSettings.
     */
    data: XOR<PanelSettingUpdateManyMutationInput, PanelSettingUncheckedUpdateManyInput>
    /**
     * Filter which PanelSettings to update
     */
    where?: PanelSettingWhereInput
    /**
     * Limit how many PanelSettings to update.
     */
    limit?: number
  }

  /**
   * PanelSetting updateManyAndReturn
   */
  export type PanelSettingUpdateManyAndReturnArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelectUpdateManyAndReturn<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * The data used to update PanelSettings.
     */
    data: XOR<PanelSettingUpdateManyMutationInput, PanelSettingUncheckedUpdateManyInput>
    /**
     * Filter which PanelSettings to update
     */
    where?: PanelSettingWhereInput
    /**
     * Limit how many PanelSettings to update.
     */
    limit?: number
  }

  /**
   * PanelSetting upsert
   */
  export type PanelSettingUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * The filter to search for the PanelSetting to update in case it exists.
     */
    where: PanelSettingWhereUniqueInput
    /**
     * In case the PanelSetting found by the `where` argument doesn't exist, create a new PanelSetting with this data.
     */
    create: XOR<PanelSettingCreateInput, PanelSettingUncheckedCreateInput>
    /**
     * In case the PanelSetting was found with the provided `where` argument, update it with this data.
     */
    update: XOR<PanelSettingUpdateInput, PanelSettingUncheckedUpdateInput>
  }

  /**
   * PanelSetting delete
   */
  export type PanelSettingDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
    /**
     * Filter which PanelSetting to delete.
     */
    where: PanelSettingWhereUniqueInput
  }

  /**
   * PanelSetting deleteMany
   */
  export type PanelSettingDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Filter which PanelSettings to delete
     */
    where?: PanelSettingWhereInput
    /**
     * Limit how many PanelSettings to delete.
     */
    limit?: number
  }

  /**
   * PanelSetting without action
   */
  export type PanelSettingDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
    /**
     * Select specific fields to fetch from the PanelSetting
     */
    select?: PanelSettingSelect<ExtArgs> | null
    /**
     * Omit specific fields from the PanelSetting
     */
    omit?: PanelSettingOmit<ExtArgs> | null
  }


  /**
   * Enums
   */

  export const TransactionIsolationLevel: {
    ReadUncommitted: 'ReadUncommitted',
    ReadCommitted: 'ReadCommitted',
    RepeatableRead: 'RepeatableRead',
    Serializable: 'Serializable'
  };

  export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]


  export const GeneralDocumentScalarFieldEnum: {
    id: 'id',
    document: 'document',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type GeneralDocumentScalarFieldEnum = (typeof GeneralDocumentScalarFieldEnum)[keyof typeof GeneralDocumentScalarFieldEnum]


  export const FirmDocumentScalarFieldEnum: {
    id: 'id',
    name: 'name',
    fields: 'fields',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type FirmDocumentScalarFieldEnum = (typeof FirmDocumentScalarFieldEnum)[keyof typeof FirmDocumentScalarFieldEnum]


  export const LiteralsScalarFieldEnum: {
    id: 'id',
    aiModel: 'aiModel',
    finalPrompt: 'finalPrompt',
    commands: 'commands',
    companies: 'companies',
    introText: 'introText',
    strategiesText: 'strategiesText',
    rulesText: 'rulesText',
    templateText: 'templateText',
    welcomeText: 'welcomeText',
    skillPrompt: 'skillPrompt',
    enthusiasmPrompt: 'enthusiasmPrompt',
    customerPrompt: 'customerPrompt',
    companyRankingPrompt: 'companyRankingPrompt',
    createdAt: 'createdAt'
  };

  export type LiteralsScalarFieldEnum = (typeof LiteralsScalarFieldEnum)[keyof typeof LiteralsScalarFieldEnum]


  export const TelegramUserScalarFieldEnum: {
    id: 'id',
    telegramId: 'telegramId',
    username: 'username',
    firstName: 'firstName',
    lastName: 'lastName',
    balance: 'balance',
    lastInteraction: 'lastInteraction',
    consultingRequest: 'consultingRequest',
    respondent: 'respondent',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type TelegramUserScalarFieldEnum = (typeof TelegramUserScalarFieldEnum)[keyof typeof TelegramUserScalarFieldEnum]


  export const ConversationScalarFieldEnum: {
    id: 'id',
    telegramUserId: 'telegramUserId',
    telegramChatId: 'telegramChatId',
    title: 'title',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type ConversationScalarFieldEnum = (typeof ConversationScalarFieldEnum)[keyof typeof ConversationScalarFieldEnum]


  export const MessageScalarFieldEnum: {
    id: 'id',
    role: 'role',
    content: 'content',
    conversationId: 'conversationId',
    isRead: 'isRead',
    createdAt: 'createdAt'
  };

  export type MessageScalarFieldEnum = (typeof MessageScalarFieldEnum)[keyof typeof MessageScalarFieldEnum]


  export const WalletScalarFieldEnum: {
    id: 'id',
    network: 'network',
    name: 'name',
    address: 'address',
    description: 'description',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type WalletScalarFieldEnum = (typeof WalletScalarFieldEnum)[keyof typeof WalletScalarFieldEnum]


  export const ProductScalarFieldEnum: {
    id: 'id',
    plan: 'plan',
    description: 'description',
    price: 'price',
    firm: 'firm',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum]


  export const UserProductScalarFieldEnum: {
    id: 'id',
    userId: 'userId',
    productId: 'productId',
    challengeStatus: 'challengeStatus',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type UserProductScalarFieldEnum = (typeof UserProductScalarFieldEnum)[keyof typeof UserProductScalarFieldEnum]


  export const UserTransactionScalarFieldEnum: {
    id: 'id',
    telegramUserId: 'telegramUserId',
    transactionHash: 'transactionHash',
    network: 'network',
    value: 'value',
    status: 'status',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type UserTransactionScalarFieldEnum = (typeof UserTransactionScalarFieldEnum)[keyof typeof UserTransactionScalarFieldEnum]


  export const UserBotStateScalarFieldEnum: {
    id: 'id',
    telegramUserId: 'telegramUserId',
    state: 'state',
    selectedProductId: 'selectedProductId',
    selectedNetwork: 'selectedNetwork',
    additionalData: 'additionalData',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type UserBotStateScalarFieldEnum = (typeof UserBotStateScalarFieldEnum)[keyof typeof UserBotStateScalarFieldEnum]


  export const UserTicketScalarFieldEnum: {
    id: 'id',
    telegramUserId: 'telegramUserId',
    content: 'content',
    checked: 'checked',
    createdAt: 'createdAt',
    updatedAt: 'updatedAt'
  };

  export type UserTicketScalarFieldEnum = (typeof UserTicketScalarFieldEnum)[keyof typeof UserTicketScalarFieldEnum]


  export const PanelSettingScalarFieldEnum: {
    id: 'id',
    telegramBotToken: 'telegramBotToken',
    pineconeIndexName: 'pineconeIndexName',
    pineconeNamespace: 'pineconeNamespace',
    pineconeHost: 'pineconeHost'
  };

  export type PanelSettingScalarFieldEnum = (typeof PanelSettingScalarFieldEnum)[keyof typeof PanelSettingScalarFieldEnum]


  export const SortOrder: {
    asc: 'asc',
    desc: 'desc'
  };

  export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]


  export const JsonNullValueInput: {
    JsonNull: typeof JsonNull
  };

  export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]


  export const NullableJsonNullValueInput: {
    DbNull: typeof DbNull,
    JsonNull: typeof JsonNull
  };

  export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]


  export const JsonNullValueFilter: {
    DbNull: typeof DbNull,
    JsonNull: typeof JsonNull,
    AnyNull: typeof AnyNull
  };

  export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]


  export const QueryMode: {
    default: 'default',
    insensitive: 'insensitive'
  };

  export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]


  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 'Int[]'
   */
  export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
    


  /**
   * Reference to a field of type 'Json'
   */
  export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
    


  /**
   * Reference to a field of type 'QueryMode'
   */
  export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'>
    


  /**
   * Reference to a field of type 'String'
   */
  export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
    


  /**
   * Reference to a field of type 'DateTime'
   */
  export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
    


  /**
   * Reference to a field of type 'DateTime[]'
   */
  export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'>
    


  /**
   * Reference to a field of type 'String[]'
   */
  export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'>
    


  /**
   * Reference to a field of type 'Float'
   */
  export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
    


  /**
   * Reference to a field of type 'Float[]'
   */
  export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
    


  /**
   * Reference to a field of type 'RespondentType'
   */
  export type EnumRespondentTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'RespondentType'>
    


  /**
   * Reference to a field of type 'RespondentType[]'
   */
  export type ListEnumRespondentTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'RespondentType[]'>
    


  /**
   * Reference to a field of type 'Boolean'
   */
  export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
    


  /**
   * Reference to a field of type 'TransactionNetwork'
   */
  export type EnumTransactionNetworkFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TransactionNetwork'>
    


  /**
   * Reference to a field of type 'TransactionNetwork[]'
   */
  export type ListEnumTransactionNetworkFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TransactionNetwork[]'>
    


  /**
   * Reference to a field of type 'ChallengeStatus'
   */
  export type EnumChallengeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChallengeStatus'>
    


  /**
   * Reference to a field of type 'ChallengeStatus[]'
   */
  export type ListEnumChallengeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChallengeStatus[]'>
    


  /**
   * Reference to a field of type 'TransactionStatus'
   */
  export type EnumTransactionStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TransactionStatus'>
    


  /**
   * Reference to a field of type 'TransactionStatus[]'
   */
  export type ListEnumTransactionStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TransactionStatus[]'>
    
  /**
   * Deep Input Types
   */


  export type GeneralDocumentWhereInput = {
    AND?: GeneralDocumentWhereInput | GeneralDocumentWhereInput[]
    OR?: GeneralDocumentWhereInput[]
    NOT?: GeneralDocumentWhereInput | GeneralDocumentWhereInput[]
    id?: IntFilter<"GeneralDocument"> | number
    document?: JsonFilter<"GeneralDocument">
    createdAt?: DateTimeFilter<"GeneralDocument"> | Date | string
    updatedAt?: DateTimeFilter<"GeneralDocument"> | Date | string
  }

  export type GeneralDocumentOrderByWithRelationInput = {
    id?: SortOrder
    document?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type GeneralDocumentWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    AND?: GeneralDocumentWhereInput | GeneralDocumentWhereInput[]
    OR?: GeneralDocumentWhereInput[]
    NOT?: GeneralDocumentWhereInput | GeneralDocumentWhereInput[]
    document?: JsonFilter<"GeneralDocument">
    createdAt?: DateTimeFilter<"GeneralDocument"> | Date | string
    updatedAt?: DateTimeFilter<"GeneralDocument"> | Date | string
  }, "id">

  export type GeneralDocumentOrderByWithAggregationInput = {
    id?: SortOrder
    document?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: GeneralDocumentCountOrderByAggregateInput
    _avg?: GeneralDocumentAvgOrderByAggregateInput
    _max?: GeneralDocumentMaxOrderByAggregateInput
    _min?: GeneralDocumentMinOrderByAggregateInput
    _sum?: GeneralDocumentSumOrderByAggregateInput
  }

  export type GeneralDocumentScalarWhereWithAggregatesInput = {
    AND?: GeneralDocumentScalarWhereWithAggregatesInput | GeneralDocumentScalarWhereWithAggregatesInput[]
    OR?: GeneralDocumentScalarWhereWithAggregatesInput[]
    NOT?: GeneralDocumentScalarWhereWithAggregatesInput | GeneralDocumentScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"GeneralDocument"> | number
    document?: JsonWithAggregatesFilter<"GeneralDocument">
    createdAt?: DateTimeWithAggregatesFilter<"GeneralDocument"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"GeneralDocument"> | Date | string
  }

  export type FirmDocumentWhereInput = {
    AND?: FirmDocumentWhereInput | FirmDocumentWhereInput[]
    OR?: FirmDocumentWhereInput[]
    NOT?: FirmDocumentWhereInput | FirmDocumentWhereInput[]
    id?: IntFilter<"FirmDocument"> | number
    name?: StringFilter<"FirmDocument"> | string
    fields?: JsonFilter<"FirmDocument">
    createdAt?: DateTimeFilter<"FirmDocument"> | Date | string
    updatedAt?: DateTimeFilter<"FirmDocument"> | Date | string
  }

  export type FirmDocumentOrderByWithRelationInput = {
    id?: SortOrder
    name?: SortOrder
    fields?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type FirmDocumentWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    AND?: FirmDocumentWhereInput | FirmDocumentWhereInput[]
    OR?: FirmDocumentWhereInput[]
    NOT?: FirmDocumentWhereInput | FirmDocumentWhereInput[]
    name?: StringFilter<"FirmDocument"> | string
    fields?: JsonFilter<"FirmDocument">
    createdAt?: DateTimeFilter<"FirmDocument"> | Date | string
    updatedAt?: DateTimeFilter<"FirmDocument"> | Date | string
  }, "id">

  export type FirmDocumentOrderByWithAggregationInput = {
    id?: SortOrder
    name?: SortOrder
    fields?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: FirmDocumentCountOrderByAggregateInput
    _avg?: FirmDocumentAvgOrderByAggregateInput
    _max?: FirmDocumentMaxOrderByAggregateInput
    _min?: FirmDocumentMinOrderByAggregateInput
    _sum?: FirmDocumentSumOrderByAggregateInput
  }

  export type FirmDocumentScalarWhereWithAggregatesInput = {
    AND?: FirmDocumentScalarWhereWithAggregatesInput | FirmDocumentScalarWhereWithAggregatesInput[]
    OR?: FirmDocumentScalarWhereWithAggregatesInput[]
    NOT?: FirmDocumentScalarWhereWithAggregatesInput | FirmDocumentScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"FirmDocument"> | number
    name?: StringWithAggregatesFilter<"FirmDocument"> | string
    fields?: JsonWithAggregatesFilter<"FirmDocument">
    createdAt?: DateTimeWithAggregatesFilter<"FirmDocument"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"FirmDocument"> | Date | string
  }

  export type LiteralsWhereInput = {
    AND?: LiteralsWhereInput | LiteralsWhereInput[]
    OR?: LiteralsWhereInput[]
    NOT?: LiteralsWhereInput | LiteralsWhereInput[]
    id?: IntFilter<"Literals"> | number
    aiModel?: StringFilter<"Literals"> | string
    finalPrompt?: StringFilter<"Literals"> | string
    commands?: JsonFilter<"Literals">
    companies?: JsonFilter<"Literals">
    introText?: StringNullableFilter<"Literals"> | string | null
    strategiesText?: StringNullableFilter<"Literals"> | string | null
    rulesText?: StringNullableFilter<"Literals"> | string | null
    templateText?: StringNullableFilter<"Literals"> | string | null
    welcomeText?: StringNullableFilter<"Literals"> | string | null
    skillPrompt?: StringNullableFilter<"Literals"> | string | null
    enthusiasmPrompt?: StringNullableFilter<"Literals"> | string | null
    customerPrompt?: StringNullableFilter<"Literals"> | string | null
    companyRankingPrompt?: StringNullableFilter<"Literals"> | string | null
    createdAt?: DateTimeFilter<"Literals"> | Date | string
  }

  export type LiteralsOrderByWithRelationInput = {
    id?: SortOrder
    aiModel?: SortOrder
    finalPrompt?: SortOrder
    commands?: SortOrder
    companies?: SortOrder
    introText?: SortOrderInput | SortOrder
    strategiesText?: SortOrderInput | SortOrder
    rulesText?: SortOrderInput | SortOrder
    templateText?: SortOrderInput | SortOrder
    welcomeText?: SortOrderInput | SortOrder
    skillPrompt?: SortOrderInput | SortOrder
    enthusiasmPrompt?: SortOrderInput | SortOrder
    customerPrompt?: SortOrderInput | SortOrder
    companyRankingPrompt?: SortOrderInput | SortOrder
    createdAt?: SortOrder
  }

  export type LiteralsWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    AND?: LiteralsWhereInput | LiteralsWhereInput[]
    OR?: LiteralsWhereInput[]
    NOT?: LiteralsWhereInput | LiteralsWhereInput[]
    aiModel?: StringFilter<"Literals"> | string
    finalPrompt?: StringFilter<"Literals"> | string
    commands?: JsonFilter<"Literals">
    companies?: JsonFilter<"Literals">
    introText?: StringNullableFilter<"Literals"> | string | null
    strategiesText?: StringNullableFilter<"Literals"> | string | null
    rulesText?: StringNullableFilter<"Literals"> | string | null
    templateText?: StringNullableFilter<"Literals"> | string | null
    welcomeText?: StringNullableFilter<"Literals"> | string | null
    skillPrompt?: StringNullableFilter<"Literals"> | string | null
    enthusiasmPrompt?: StringNullableFilter<"Literals"> | string | null
    customerPrompt?: StringNullableFilter<"Literals"> | string | null
    companyRankingPrompt?: StringNullableFilter<"Literals"> | string | null
    createdAt?: DateTimeFilter<"Literals"> | Date | string
  }, "id">

  export type LiteralsOrderByWithAggregationInput = {
    id?: SortOrder
    aiModel?: SortOrder
    finalPrompt?: SortOrder
    commands?: SortOrder
    companies?: SortOrder
    introText?: SortOrderInput | SortOrder
    strategiesText?: SortOrderInput | SortOrder
    rulesText?: SortOrderInput | SortOrder
    templateText?: SortOrderInput | SortOrder
    welcomeText?: SortOrderInput | SortOrder
    skillPrompt?: SortOrderInput | SortOrder
    enthusiasmPrompt?: SortOrderInput | SortOrder
    customerPrompt?: SortOrderInput | SortOrder
    companyRankingPrompt?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    _count?: LiteralsCountOrderByAggregateInput
    _avg?: LiteralsAvgOrderByAggregateInput
    _max?: LiteralsMaxOrderByAggregateInput
    _min?: LiteralsMinOrderByAggregateInput
    _sum?: LiteralsSumOrderByAggregateInput
  }

  export type LiteralsScalarWhereWithAggregatesInput = {
    AND?: LiteralsScalarWhereWithAggregatesInput | LiteralsScalarWhereWithAggregatesInput[]
    OR?: LiteralsScalarWhereWithAggregatesInput[]
    NOT?: LiteralsScalarWhereWithAggregatesInput | LiteralsScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"Literals"> | number
    aiModel?: StringWithAggregatesFilter<"Literals"> | string
    finalPrompt?: StringWithAggregatesFilter<"Literals"> | string
    commands?: JsonWithAggregatesFilter<"Literals">
    companies?: JsonWithAggregatesFilter<"Literals">
    introText?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    strategiesText?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    rulesText?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    templateText?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    welcomeText?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    skillPrompt?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    enthusiasmPrompt?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    customerPrompt?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    companyRankingPrompt?: StringNullableWithAggregatesFilter<"Literals"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"Literals"> | Date | string
  }

  export type TelegramUserWhereInput = {
    AND?: TelegramUserWhereInput | TelegramUserWhereInput[]
    OR?: TelegramUserWhereInput[]
    NOT?: TelegramUserWhereInput | TelegramUserWhereInput[]
    id?: StringFilter<"TelegramUser"> | string
    telegramId?: StringFilter<"TelegramUser"> | string
    username?: StringNullableFilter<"TelegramUser"> | string | null
    firstName?: StringNullableFilter<"TelegramUser"> | string | null
    lastName?: StringNullableFilter<"TelegramUser"> | string | null
    balance?: FloatFilter<"TelegramUser"> | number
    lastInteraction?: DateTimeFilter<"TelegramUser"> | Date | string
    consultingRequest?: StringFilter<"TelegramUser"> | string
    respondent?: EnumRespondentTypeFilter<"TelegramUser"> | $Enums.RespondentType
    createdAt?: DateTimeFilter<"TelegramUser"> | Date | string
    updatedAt?: DateTimeFilter<"TelegramUser"> | Date | string
    conversations?: ConversationListRelationFilter
    userProducts?: UserProductListRelationFilter
    userTransactions?: UserTransactionListRelationFilter
    UserBotStates?: UserBotStateListRelationFilter
    UserTicket?: UserTicketListRelationFilter
  }

  export type TelegramUserOrderByWithRelationInput = {
    id?: SortOrder
    telegramId?: SortOrder
    username?: SortOrderInput | SortOrder
    firstName?: SortOrderInput | SortOrder
    lastName?: SortOrderInput | SortOrder
    balance?: SortOrder
    lastInteraction?: SortOrder
    consultingRequest?: SortOrder
    respondent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    conversations?: ConversationOrderByRelationAggregateInput
    userProducts?: UserProductOrderByRelationAggregateInput
    userTransactions?: UserTransactionOrderByRelationAggregateInput
    UserBotStates?: UserBotStateOrderByRelationAggregateInput
    UserTicket?: UserTicketOrderByRelationAggregateInput
  }

  export type TelegramUserWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    telegramId?: string
    AND?: TelegramUserWhereInput | TelegramUserWhereInput[]
    OR?: TelegramUserWhereInput[]
    NOT?: TelegramUserWhereInput | TelegramUserWhereInput[]
    username?: StringNullableFilter<"TelegramUser"> | string | null
    firstName?: StringNullableFilter<"TelegramUser"> | string | null
    lastName?: StringNullableFilter<"TelegramUser"> | string | null
    balance?: FloatFilter<"TelegramUser"> | number
    lastInteraction?: DateTimeFilter<"TelegramUser"> | Date | string
    consultingRequest?: StringFilter<"TelegramUser"> | string
    respondent?: EnumRespondentTypeFilter<"TelegramUser"> | $Enums.RespondentType
    createdAt?: DateTimeFilter<"TelegramUser"> | Date | string
    updatedAt?: DateTimeFilter<"TelegramUser"> | Date | string
    conversations?: ConversationListRelationFilter
    userProducts?: UserProductListRelationFilter
    userTransactions?: UserTransactionListRelationFilter
    UserBotStates?: UserBotStateListRelationFilter
    UserTicket?: UserTicketListRelationFilter
  }, "id" | "telegramId">

  export type TelegramUserOrderByWithAggregationInput = {
    id?: SortOrder
    telegramId?: SortOrder
    username?: SortOrderInput | SortOrder
    firstName?: SortOrderInput | SortOrder
    lastName?: SortOrderInput | SortOrder
    balance?: SortOrder
    lastInteraction?: SortOrder
    consultingRequest?: SortOrder
    respondent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: TelegramUserCountOrderByAggregateInput
    _avg?: TelegramUserAvgOrderByAggregateInput
    _max?: TelegramUserMaxOrderByAggregateInput
    _min?: TelegramUserMinOrderByAggregateInput
    _sum?: TelegramUserSumOrderByAggregateInput
  }

  export type TelegramUserScalarWhereWithAggregatesInput = {
    AND?: TelegramUserScalarWhereWithAggregatesInput | TelegramUserScalarWhereWithAggregatesInput[]
    OR?: TelegramUserScalarWhereWithAggregatesInput[]
    NOT?: TelegramUserScalarWhereWithAggregatesInput | TelegramUserScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"TelegramUser"> | string
    telegramId?: StringWithAggregatesFilter<"TelegramUser"> | string
    username?: StringNullableWithAggregatesFilter<"TelegramUser"> | string | null
    firstName?: StringNullableWithAggregatesFilter<"TelegramUser"> | string | null
    lastName?: StringNullableWithAggregatesFilter<"TelegramUser"> | string | null
    balance?: FloatWithAggregatesFilter<"TelegramUser"> | number
    lastInteraction?: DateTimeWithAggregatesFilter<"TelegramUser"> | Date | string
    consultingRequest?: StringWithAggregatesFilter<"TelegramUser"> | string
    respondent?: EnumRespondentTypeWithAggregatesFilter<"TelegramUser"> | $Enums.RespondentType
    createdAt?: DateTimeWithAggregatesFilter<"TelegramUser"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"TelegramUser"> | Date | string
  }

  export type ConversationWhereInput = {
    AND?: ConversationWhereInput | ConversationWhereInput[]
    OR?: ConversationWhereInput[]
    NOT?: ConversationWhereInput | ConversationWhereInput[]
    id?: StringFilter<"Conversation"> | string
    telegramUserId?: StringFilter<"Conversation"> | string
    telegramChatId?: StringFilter<"Conversation"> | string
    title?: StringNullableFilter<"Conversation"> | string | null
    createdAt?: DateTimeFilter<"Conversation"> | Date | string
    updatedAt?: DateTimeFilter<"Conversation"> | Date | string
    telegramUser?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
    messages?: MessageListRelationFilter
  }

  export type ConversationOrderByWithRelationInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    telegramChatId?: SortOrder
    title?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    telegramUser?: TelegramUserOrderByWithRelationInput
    messages?: MessageOrderByRelationAggregateInput
  }

  export type ConversationWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: ConversationWhereInput | ConversationWhereInput[]
    OR?: ConversationWhereInput[]
    NOT?: ConversationWhereInput | ConversationWhereInput[]
    telegramUserId?: StringFilter<"Conversation"> | string
    telegramChatId?: StringFilter<"Conversation"> | string
    title?: StringNullableFilter<"Conversation"> | string | null
    createdAt?: DateTimeFilter<"Conversation"> | Date | string
    updatedAt?: DateTimeFilter<"Conversation"> | Date | string
    telegramUser?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
    messages?: MessageListRelationFilter
  }, "id">

  export type ConversationOrderByWithAggregationInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    telegramChatId?: SortOrder
    title?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: ConversationCountOrderByAggregateInput
    _max?: ConversationMaxOrderByAggregateInput
    _min?: ConversationMinOrderByAggregateInput
  }

  export type ConversationScalarWhereWithAggregatesInput = {
    AND?: ConversationScalarWhereWithAggregatesInput | ConversationScalarWhereWithAggregatesInput[]
    OR?: ConversationScalarWhereWithAggregatesInput[]
    NOT?: ConversationScalarWhereWithAggregatesInput | ConversationScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"Conversation"> | string
    telegramUserId?: StringWithAggregatesFilter<"Conversation"> | string
    telegramChatId?: StringWithAggregatesFilter<"Conversation"> | string
    title?: StringNullableWithAggregatesFilter<"Conversation"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"Conversation"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Conversation"> | Date | string
  }

  export type MessageWhereInput = {
    AND?: MessageWhereInput | MessageWhereInput[]
    OR?: MessageWhereInput[]
    NOT?: MessageWhereInput | MessageWhereInput[]
    id?: StringFilter<"Message"> | string
    role?: StringFilter<"Message"> | string
    content?: StringFilter<"Message"> | string
    conversationId?: StringFilter<"Message"> | string
    isRead?: BoolFilter<"Message"> | boolean
    createdAt?: DateTimeFilter<"Message"> | Date | string
    conversation?: XOR<ConversationScalarRelationFilter, ConversationWhereInput>
  }

  export type MessageOrderByWithRelationInput = {
    id?: SortOrder
    role?: SortOrder
    content?: SortOrder
    conversationId?: SortOrder
    isRead?: SortOrder
    createdAt?: SortOrder
    conversation?: ConversationOrderByWithRelationInput
  }

  export type MessageWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: MessageWhereInput | MessageWhereInput[]
    OR?: MessageWhereInput[]
    NOT?: MessageWhereInput | MessageWhereInput[]
    role?: StringFilter<"Message"> | string
    content?: StringFilter<"Message"> | string
    conversationId?: StringFilter<"Message"> | string
    isRead?: BoolFilter<"Message"> | boolean
    createdAt?: DateTimeFilter<"Message"> | Date | string
    conversation?: XOR<ConversationScalarRelationFilter, ConversationWhereInput>
  }, "id">

  export type MessageOrderByWithAggregationInput = {
    id?: SortOrder
    role?: SortOrder
    content?: SortOrder
    conversationId?: SortOrder
    isRead?: SortOrder
    createdAt?: SortOrder
    _count?: MessageCountOrderByAggregateInput
    _max?: MessageMaxOrderByAggregateInput
    _min?: MessageMinOrderByAggregateInput
  }

  export type MessageScalarWhereWithAggregatesInput = {
    AND?: MessageScalarWhereWithAggregatesInput | MessageScalarWhereWithAggregatesInput[]
    OR?: MessageScalarWhereWithAggregatesInput[]
    NOT?: MessageScalarWhereWithAggregatesInput | MessageScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"Message"> | string
    role?: StringWithAggregatesFilter<"Message"> | string
    content?: StringWithAggregatesFilter<"Message"> | string
    conversationId?: StringWithAggregatesFilter<"Message"> | string
    isRead?: BoolWithAggregatesFilter<"Message"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"Message"> | Date | string
  }

  export type WalletWhereInput = {
    AND?: WalletWhereInput | WalletWhereInput[]
    OR?: WalletWhereInput[]
    NOT?: WalletWhereInput | WalletWhereInput[]
    id?: IntFilter<"Wallet"> | number
    network?: EnumTransactionNetworkFilter<"Wallet"> | $Enums.TransactionNetwork
    name?: StringFilter<"Wallet"> | string
    address?: StringFilter<"Wallet"> | string
    description?: StringNullableFilter<"Wallet"> | string | null
    createdAt?: DateTimeFilter<"Wallet"> | Date | string
    updatedAt?: DateTimeFilter<"Wallet"> | Date | string
  }

  export type WalletOrderByWithRelationInput = {
    id?: SortOrder
    network?: SortOrder
    name?: SortOrder
    address?: SortOrder
    description?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type WalletWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    AND?: WalletWhereInput | WalletWhereInput[]
    OR?: WalletWhereInput[]
    NOT?: WalletWhereInput | WalletWhereInput[]
    network?: EnumTransactionNetworkFilter<"Wallet"> | $Enums.TransactionNetwork
    name?: StringFilter<"Wallet"> | string
    address?: StringFilter<"Wallet"> | string
    description?: StringNullableFilter<"Wallet"> | string | null
    createdAt?: DateTimeFilter<"Wallet"> | Date | string
    updatedAt?: DateTimeFilter<"Wallet"> | Date | string
  }, "id">

  export type WalletOrderByWithAggregationInput = {
    id?: SortOrder
    network?: SortOrder
    name?: SortOrder
    address?: SortOrder
    description?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: WalletCountOrderByAggregateInput
    _avg?: WalletAvgOrderByAggregateInput
    _max?: WalletMaxOrderByAggregateInput
    _min?: WalletMinOrderByAggregateInput
    _sum?: WalletSumOrderByAggregateInput
  }

  export type WalletScalarWhereWithAggregatesInput = {
    AND?: WalletScalarWhereWithAggregatesInput | WalletScalarWhereWithAggregatesInput[]
    OR?: WalletScalarWhereWithAggregatesInput[]
    NOT?: WalletScalarWhereWithAggregatesInput | WalletScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"Wallet"> | number
    network?: EnumTransactionNetworkWithAggregatesFilter<"Wallet"> | $Enums.TransactionNetwork
    name?: StringWithAggregatesFilter<"Wallet"> | string
    address?: StringWithAggregatesFilter<"Wallet"> | string
    description?: StringNullableWithAggregatesFilter<"Wallet"> | string | null
    createdAt?: DateTimeWithAggregatesFilter<"Wallet"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Wallet"> | Date | string
  }

  export type ProductWhereInput = {
    AND?: ProductWhereInput | ProductWhereInput[]
    OR?: ProductWhereInput[]
    NOT?: ProductWhereInput | ProductWhereInput[]
    id?: IntFilter<"Product"> | number
    plan?: StringFilter<"Product"> | string
    description?: StringNullableFilter<"Product"> | string | null
    price?: FloatFilter<"Product"> | number
    firm?: StringFilter<"Product"> | string
    createdAt?: DateTimeFilter<"Product"> | Date | string
    updatedAt?: DateTimeFilter<"Product"> | Date | string
    userProducts?: UserProductListRelationFilter
  }

  export type ProductOrderByWithRelationInput = {
    id?: SortOrder
    plan?: SortOrder
    description?: SortOrderInput | SortOrder
    price?: SortOrder
    firm?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    userProducts?: UserProductOrderByRelationAggregateInput
  }

  export type ProductWhereUniqueInput = Prisma.AtLeast<{
    id?: number
    AND?: ProductWhereInput | ProductWhereInput[]
    OR?: ProductWhereInput[]
    NOT?: ProductWhereInput | ProductWhereInput[]
    plan?: StringFilter<"Product"> | string
    description?: StringNullableFilter<"Product"> | string | null
    price?: FloatFilter<"Product"> | number
    firm?: StringFilter<"Product"> | string
    createdAt?: DateTimeFilter<"Product"> | Date | string
    updatedAt?: DateTimeFilter<"Product"> | Date | string
    userProducts?: UserProductListRelationFilter
  }, "id">

  export type ProductOrderByWithAggregationInput = {
    id?: SortOrder
    plan?: SortOrder
    description?: SortOrderInput | SortOrder
    price?: SortOrder
    firm?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: ProductCountOrderByAggregateInput
    _avg?: ProductAvgOrderByAggregateInput
    _max?: ProductMaxOrderByAggregateInput
    _min?: ProductMinOrderByAggregateInput
    _sum?: ProductSumOrderByAggregateInput
  }

  export type ProductScalarWhereWithAggregatesInput = {
    AND?: ProductScalarWhereWithAggregatesInput | ProductScalarWhereWithAggregatesInput[]
    OR?: ProductScalarWhereWithAggregatesInput[]
    NOT?: ProductScalarWhereWithAggregatesInput | ProductScalarWhereWithAggregatesInput[]
    id?: IntWithAggregatesFilter<"Product"> | number
    plan?: StringWithAggregatesFilter<"Product"> | string
    description?: StringNullableWithAggregatesFilter<"Product"> | string | null
    price?: FloatWithAggregatesFilter<"Product"> | number
    firm?: StringWithAggregatesFilter<"Product"> | string
    createdAt?: DateTimeWithAggregatesFilter<"Product"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"Product"> | Date | string
  }

  export type UserProductWhereInput = {
    AND?: UserProductWhereInput | UserProductWhereInput[]
    OR?: UserProductWhereInput[]
    NOT?: UserProductWhereInput | UserProductWhereInput[]
    id?: StringFilter<"UserProduct"> | string
    userId?: StringFilter<"UserProduct"> | string
    productId?: IntFilter<"UserProduct"> | number
    challengeStatus?: EnumChallengeStatusFilter<"UserProduct"> | $Enums.ChallengeStatus
    createdAt?: DateTimeFilter<"UserProduct"> | Date | string
    updatedAt?: DateTimeFilter<"UserProduct"> | Date | string
    user?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
    product?: XOR<ProductScalarRelationFilter, ProductWhereInput>
  }

  export type UserProductOrderByWithRelationInput = {
    id?: SortOrder
    userId?: SortOrder
    productId?: SortOrder
    challengeStatus?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    user?: TelegramUserOrderByWithRelationInput
    product?: ProductOrderByWithRelationInput
  }

  export type UserProductWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    userId_productId?: UserProductUserIdProductIdCompoundUniqueInput
    AND?: UserProductWhereInput | UserProductWhereInput[]
    OR?: UserProductWhereInput[]
    NOT?: UserProductWhereInput | UserProductWhereInput[]
    userId?: StringFilter<"UserProduct"> | string
    productId?: IntFilter<"UserProduct"> | number
    challengeStatus?: EnumChallengeStatusFilter<"UserProduct"> | $Enums.ChallengeStatus
    createdAt?: DateTimeFilter<"UserProduct"> | Date | string
    updatedAt?: DateTimeFilter<"UserProduct"> | Date | string
    user?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
    product?: XOR<ProductScalarRelationFilter, ProductWhereInput>
  }, "id" | "userId_productId">

  export type UserProductOrderByWithAggregationInput = {
    id?: SortOrder
    userId?: SortOrder
    productId?: SortOrder
    challengeStatus?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: UserProductCountOrderByAggregateInput
    _avg?: UserProductAvgOrderByAggregateInput
    _max?: UserProductMaxOrderByAggregateInput
    _min?: UserProductMinOrderByAggregateInput
    _sum?: UserProductSumOrderByAggregateInput
  }

  export type UserProductScalarWhereWithAggregatesInput = {
    AND?: UserProductScalarWhereWithAggregatesInput | UserProductScalarWhereWithAggregatesInput[]
    OR?: UserProductScalarWhereWithAggregatesInput[]
    NOT?: UserProductScalarWhereWithAggregatesInput | UserProductScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"UserProduct"> | string
    userId?: StringWithAggregatesFilter<"UserProduct"> | string
    productId?: IntWithAggregatesFilter<"UserProduct"> | number
    challengeStatus?: EnumChallengeStatusWithAggregatesFilter<"UserProduct"> | $Enums.ChallengeStatus
    createdAt?: DateTimeWithAggregatesFilter<"UserProduct"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"UserProduct"> | Date | string
  }

  export type UserTransactionWhereInput = {
    AND?: UserTransactionWhereInput | UserTransactionWhereInput[]
    OR?: UserTransactionWhereInput[]
    NOT?: UserTransactionWhereInput | UserTransactionWhereInput[]
    id?: StringFilter<"UserTransaction"> | string
    telegramUserId?: StringFilter<"UserTransaction"> | string
    transactionHash?: StringFilter<"UserTransaction"> | string
    network?: EnumTransactionNetworkFilter<"UserTransaction"> | $Enums.TransactionNetwork
    value?: FloatFilter<"UserTransaction"> | number
    status?: EnumTransactionStatusFilter<"UserTransaction"> | $Enums.TransactionStatus
    createdAt?: DateTimeFilter<"UserTransaction"> | Date | string
    updatedAt?: DateTimeFilter<"UserTransaction"> | Date | string
    telegramUser?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
  }

  export type UserTransactionOrderByWithRelationInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    transactionHash?: SortOrder
    network?: SortOrder
    value?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    telegramUser?: TelegramUserOrderByWithRelationInput
  }

  export type UserTransactionWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    transactionHash?: string
    AND?: UserTransactionWhereInput | UserTransactionWhereInput[]
    OR?: UserTransactionWhereInput[]
    NOT?: UserTransactionWhereInput | UserTransactionWhereInput[]
    telegramUserId?: StringFilter<"UserTransaction"> | string
    network?: EnumTransactionNetworkFilter<"UserTransaction"> | $Enums.TransactionNetwork
    value?: FloatFilter<"UserTransaction"> | number
    status?: EnumTransactionStatusFilter<"UserTransaction"> | $Enums.TransactionStatus
    createdAt?: DateTimeFilter<"UserTransaction"> | Date | string
    updatedAt?: DateTimeFilter<"UserTransaction"> | Date | string
    telegramUser?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
  }, "id" | "transactionHash">

  export type UserTransactionOrderByWithAggregationInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    transactionHash?: SortOrder
    network?: SortOrder
    value?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: UserTransactionCountOrderByAggregateInput
    _avg?: UserTransactionAvgOrderByAggregateInput
    _max?: UserTransactionMaxOrderByAggregateInput
    _min?: UserTransactionMinOrderByAggregateInput
    _sum?: UserTransactionSumOrderByAggregateInput
  }

  export type UserTransactionScalarWhereWithAggregatesInput = {
    AND?: UserTransactionScalarWhereWithAggregatesInput | UserTransactionScalarWhereWithAggregatesInput[]
    OR?: UserTransactionScalarWhereWithAggregatesInput[]
    NOT?: UserTransactionScalarWhereWithAggregatesInput | UserTransactionScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"UserTransaction"> | string
    telegramUserId?: StringWithAggregatesFilter<"UserTransaction"> | string
    transactionHash?: StringWithAggregatesFilter<"UserTransaction"> | string
    network?: EnumTransactionNetworkWithAggregatesFilter<"UserTransaction"> | $Enums.TransactionNetwork
    value?: FloatWithAggregatesFilter<"UserTransaction"> | number
    status?: EnumTransactionStatusWithAggregatesFilter<"UserTransaction"> | $Enums.TransactionStatus
    createdAt?: DateTimeWithAggregatesFilter<"UserTransaction"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"UserTransaction"> | Date | string
  }

  export type UserBotStateWhereInput = {
    AND?: UserBotStateWhereInput | UserBotStateWhereInput[]
    OR?: UserBotStateWhereInput[]
    NOT?: UserBotStateWhereInput | UserBotStateWhereInput[]
    id?: StringFilter<"UserBotState"> | string
    telegramUserId?: StringFilter<"UserBotState"> | string
    state?: StringFilter<"UserBotState"> | string
    selectedProductId?: IntNullableFilter<"UserBotState"> | number | null
    selectedNetwork?: StringNullableFilter<"UserBotState"> | string | null
    additionalData?: JsonNullableFilter<"UserBotState">
    createdAt?: DateTimeFilter<"UserBotState"> | Date | string
    updatedAt?: DateTimeFilter<"UserBotState"> | Date | string
    telegramUser?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
  }

  export type UserBotStateOrderByWithRelationInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    state?: SortOrder
    selectedProductId?: SortOrderInput | SortOrder
    selectedNetwork?: SortOrderInput | SortOrder
    additionalData?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    telegramUser?: TelegramUserOrderByWithRelationInput
  }

  export type UserBotStateWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: UserBotStateWhereInput | UserBotStateWhereInput[]
    OR?: UserBotStateWhereInput[]
    NOT?: UserBotStateWhereInput | UserBotStateWhereInput[]
    telegramUserId?: StringFilter<"UserBotState"> | string
    state?: StringFilter<"UserBotState"> | string
    selectedProductId?: IntNullableFilter<"UserBotState"> | number | null
    selectedNetwork?: StringNullableFilter<"UserBotState"> | string | null
    additionalData?: JsonNullableFilter<"UserBotState">
    createdAt?: DateTimeFilter<"UserBotState"> | Date | string
    updatedAt?: DateTimeFilter<"UserBotState"> | Date | string
    telegramUser?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
  }, "id">

  export type UserBotStateOrderByWithAggregationInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    state?: SortOrder
    selectedProductId?: SortOrderInput | SortOrder
    selectedNetwork?: SortOrderInput | SortOrder
    additionalData?: SortOrderInput | SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: UserBotStateCountOrderByAggregateInput
    _avg?: UserBotStateAvgOrderByAggregateInput
    _max?: UserBotStateMaxOrderByAggregateInput
    _min?: UserBotStateMinOrderByAggregateInput
    _sum?: UserBotStateSumOrderByAggregateInput
  }

  export type UserBotStateScalarWhereWithAggregatesInput = {
    AND?: UserBotStateScalarWhereWithAggregatesInput | UserBotStateScalarWhereWithAggregatesInput[]
    OR?: UserBotStateScalarWhereWithAggregatesInput[]
    NOT?: UserBotStateScalarWhereWithAggregatesInput | UserBotStateScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"UserBotState"> | string
    telegramUserId?: StringWithAggregatesFilter<"UserBotState"> | string
    state?: StringWithAggregatesFilter<"UserBotState"> | string
    selectedProductId?: IntNullableWithAggregatesFilter<"UserBotState"> | number | null
    selectedNetwork?: StringNullableWithAggregatesFilter<"UserBotState"> | string | null
    additionalData?: JsonNullableWithAggregatesFilter<"UserBotState">
    createdAt?: DateTimeWithAggregatesFilter<"UserBotState"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"UserBotState"> | Date | string
  }

  export type UserTicketWhereInput = {
    AND?: UserTicketWhereInput | UserTicketWhereInput[]
    OR?: UserTicketWhereInput[]
    NOT?: UserTicketWhereInput | UserTicketWhereInput[]
    id?: StringFilter<"UserTicket"> | string
    telegramUserId?: StringFilter<"UserTicket"> | string
    content?: StringFilter<"UserTicket"> | string
    checked?: BoolFilter<"UserTicket"> | boolean
    createdAt?: DateTimeFilter<"UserTicket"> | Date | string
    updatedAt?: DateTimeFilter<"UserTicket"> | Date | string
    telegramUser?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
  }

  export type UserTicketOrderByWithRelationInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    content?: SortOrder
    checked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    telegramUser?: TelegramUserOrderByWithRelationInput
  }

  export type UserTicketWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: UserTicketWhereInput | UserTicketWhereInput[]
    OR?: UserTicketWhereInput[]
    NOT?: UserTicketWhereInput | UserTicketWhereInput[]
    telegramUserId?: StringFilter<"UserTicket"> | string
    content?: StringFilter<"UserTicket"> | string
    checked?: BoolFilter<"UserTicket"> | boolean
    createdAt?: DateTimeFilter<"UserTicket"> | Date | string
    updatedAt?: DateTimeFilter<"UserTicket"> | Date | string
    telegramUser?: XOR<TelegramUserScalarRelationFilter, TelegramUserWhereInput>
  }, "id">

  export type UserTicketOrderByWithAggregationInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    content?: SortOrder
    checked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
    _count?: UserTicketCountOrderByAggregateInput
    _max?: UserTicketMaxOrderByAggregateInput
    _min?: UserTicketMinOrderByAggregateInput
  }

  export type UserTicketScalarWhereWithAggregatesInput = {
    AND?: UserTicketScalarWhereWithAggregatesInput | UserTicketScalarWhereWithAggregatesInput[]
    OR?: UserTicketScalarWhereWithAggregatesInput[]
    NOT?: UserTicketScalarWhereWithAggregatesInput | UserTicketScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"UserTicket"> | string
    telegramUserId?: StringWithAggregatesFilter<"UserTicket"> | string
    content?: StringWithAggregatesFilter<"UserTicket"> | string
    checked?: BoolWithAggregatesFilter<"UserTicket"> | boolean
    createdAt?: DateTimeWithAggregatesFilter<"UserTicket"> | Date | string
    updatedAt?: DateTimeWithAggregatesFilter<"UserTicket"> | Date | string
  }

  export type PanelSettingWhereInput = {
    AND?: PanelSettingWhereInput | PanelSettingWhereInput[]
    OR?: PanelSettingWhereInput[]
    NOT?: PanelSettingWhereInput | PanelSettingWhereInput[]
    id?: StringFilter<"PanelSetting"> | string
    telegramBotToken?: StringNullableFilter<"PanelSetting"> | string | null
    pineconeIndexName?: StringNullableFilter<"PanelSetting"> | string | null
    pineconeNamespace?: StringNullableFilter<"PanelSetting"> | string | null
    pineconeHost?: StringNullableFilter<"PanelSetting"> | string | null
  }

  export type PanelSettingOrderByWithRelationInput = {
    id?: SortOrder
    telegramBotToken?: SortOrderInput | SortOrder
    pineconeIndexName?: SortOrderInput | SortOrder
    pineconeNamespace?: SortOrderInput | SortOrder
    pineconeHost?: SortOrderInput | SortOrder
  }

  export type PanelSettingWhereUniqueInput = Prisma.AtLeast<{
    id?: string
    AND?: PanelSettingWhereInput | PanelSettingWhereInput[]
    OR?: PanelSettingWhereInput[]
    NOT?: PanelSettingWhereInput | PanelSettingWhereInput[]
    telegramBotToken?: StringNullableFilter<"PanelSetting"> | string | null
    pineconeIndexName?: StringNullableFilter<"PanelSetting"> | string | null
    pineconeNamespace?: StringNullableFilter<"PanelSetting"> | string | null
    pineconeHost?: StringNullableFilter<"PanelSetting"> | string | null
  }, "id">

  export type PanelSettingOrderByWithAggregationInput = {
    id?: SortOrder
    telegramBotToken?: SortOrderInput | SortOrder
    pineconeIndexName?: SortOrderInput | SortOrder
    pineconeNamespace?: SortOrderInput | SortOrder
    pineconeHost?: SortOrderInput | SortOrder
    _count?: PanelSettingCountOrderByAggregateInput
    _max?: PanelSettingMaxOrderByAggregateInput
    _min?: PanelSettingMinOrderByAggregateInput
  }

  export type PanelSettingScalarWhereWithAggregatesInput = {
    AND?: PanelSettingScalarWhereWithAggregatesInput | PanelSettingScalarWhereWithAggregatesInput[]
    OR?: PanelSettingScalarWhereWithAggregatesInput[]
    NOT?: PanelSettingScalarWhereWithAggregatesInput | PanelSettingScalarWhereWithAggregatesInput[]
    id?: StringWithAggregatesFilter<"PanelSetting"> | string
    telegramBotToken?: StringNullableWithAggregatesFilter<"PanelSetting"> | string | null
    pineconeIndexName?: StringNullableWithAggregatesFilter<"PanelSetting"> | string | null
    pineconeNamespace?: StringNullableWithAggregatesFilter<"PanelSetting"> | string | null
    pineconeHost?: StringNullableWithAggregatesFilter<"PanelSetting"> | string | null
  }

  export type GeneralDocumentCreateInput = {
    document: JsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type GeneralDocumentUncheckedCreateInput = {
    id?: number
    document: JsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type GeneralDocumentUpdateInput = {
    document?: JsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type GeneralDocumentUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    document?: JsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type GeneralDocumentCreateManyInput = {
    id?: number
    document: JsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type GeneralDocumentUpdateManyMutationInput = {
    document?: JsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type GeneralDocumentUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    document?: JsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FirmDocumentCreateInput = {
    name: string
    fields: JsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type FirmDocumentUncheckedCreateInput = {
    id?: number
    name: string
    fields: JsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type FirmDocumentUpdateInput = {
    name?: StringFieldUpdateOperationsInput | string
    fields?: JsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FirmDocumentUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    fields?: JsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FirmDocumentCreateManyInput = {
    id?: number
    name: string
    fields: JsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type FirmDocumentUpdateManyMutationInput = {
    name?: StringFieldUpdateOperationsInput | string
    fields?: JsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type FirmDocumentUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    name?: StringFieldUpdateOperationsInput | string
    fields?: JsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type LiteralsCreateInput = {
    aiModel?: string
    finalPrompt: string
    commands: JsonNullValueInput | InputJsonValue
    companies: JsonNullValueInput | InputJsonValue
    introText?: string | null
    strategiesText?: string | null
    rulesText?: string | null
    templateText?: string | null
    welcomeText?: string | null
    skillPrompt?: string | null
    enthusiasmPrompt?: string | null
    customerPrompt?: string | null
    companyRankingPrompt?: string | null
    createdAt?: Date | string
  }

  export type LiteralsUncheckedCreateInput = {
    id?: number
    aiModel?: string
    finalPrompt: string
    commands: JsonNullValueInput | InputJsonValue
    companies: JsonNullValueInput | InputJsonValue
    introText?: string | null
    strategiesText?: string | null
    rulesText?: string | null
    templateText?: string | null
    welcomeText?: string | null
    skillPrompt?: string | null
    enthusiasmPrompt?: string | null
    customerPrompt?: string | null
    companyRankingPrompt?: string | null
    createdAt?: Date | string
  }

  export type LiteralsUpdateInput = {
    aiModel?: StringFieldUpdateOperationsInput | string
    finalPrompt?: StringFieldUpdateOperationsInput | string
    commands?: JsonNullValueInput | InputJsonValue
    companies?: JsonNullValueInput | InputJsonValue
    introText?: NullableStringFieldUpdateOperationsInput | string | null
    strategiesText?: NullableStringFieldUpdateOperationsInput | string | null
    rulesText?: NullableStringFieldUpdateOperationsInput | string | null
    templateText?: NullableStringFieldUpdateOperationsInput | string | null
    welcomeText?: NullableStringFieldUpdateOperationsInput | string | null
    skillPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    enthusiasmPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    customerPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    companyRankingPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type LiteralsUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    aiModel?: StringFieldUpdateOperationsInput | string
    finalPrompt?: StringFieldUpdateOperationsInput | string
    commands?: JsonNullValueInput | InputJsonValue
    companies?: JsonNullValueInput | InputJsonValue
    introText?: NullableStringFieldUpdateOperationsInput | string | null
    strategiesText?: NullableStringFieldUpdateOperationsInput | string | null
    rulesText?: NullableStringFieldUpdateOperationsInput | string | null
    templateText?: NullableStringFieldUpdateOperationsInput | string | null
    welcomeText?: NullableStringFieldUpdateOperationsInput | string | null
    skillPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    enthusiasmPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    customerPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    companyRankingPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type LiteralsCreateManyInput = {
    id?: number
    aiModel?: string
    finalPrompt: string
    commands: JsonNullValueInput | InputJsonValue
    companies: JsonNullValueInput | InputJsonValue
    introText?: string | null
    strategiesText?: string | null
    rulesText?: string | null
    templateText?: string | null
    welcomeText?: string | null
    skillPrompt?: string | null
    enthusiasmPrompt?: string | null
    customerPrompt?: string | null
    companyRankingPrompt?: string | null
    createdAt?: Date | string
  }

  export type LiteralsUpdateManyMutationInput = {
    aiModel?: StringFieldUpdateOperationsInput | string
    finalPrompt?: StringFieldUpdateOperationsInput | string
    commands?: JsonNullValueInput | InputJsonValue
    companies?: JsonNullValueInput | InputJsonValue
    introText?: NullableStringFieldUpdateOperationsInput | string | null
    strategiesText?: NullableStringFieldUpdateOperationsInput | string | null
    rulesText?: NullableStringFieldUpdateOperationsInput | string | null
    templateText?: NullableStringFieldUpdateOperationsInput | string | null
    welcomeText?: NullableStringFieldUpdateOperationsInput | string | null
    skillPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    enthusiasmPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    customerPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    companyRankingPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type LiteralsUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    aiModel?: StringFieldUpdateOperationsInput | string
    finalPrompt?: StringFieldUpdateOperationsInput | string
    commands?: JsonNullValueInput | InputJsonValue
    companies?: JsonNullValueInput | InputJsonValue
    introText?: NullableStringFieldUpdateOperationsInput | string | null
    strategiesText?: NullableStringFieldUpdateOperationsInput | string | null
    rulesText?: NullableStringFieldUpdateOperationsInput | string | null
    templateText?: NullableStringFieldUpdateOperationsInput | string | null
    welcomeText?: NullableStringFieldUpdateOperationsInput | string | null
    skillPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    enthusiasmPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    customerPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    companyRankingPrompt?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type TelegramUserCreateInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationCreateNestedManyWithoutTelegramUserInput
    userProducts?: UserProductCreateNestedManyWithoutUserInput
    userTransactions?: UserTransactionCreateNestedManyWithoutTelegramUserInput
    UserBotStates?: UserBotStateCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserUncheckedCreateInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationUncheckedCreateNestedManyWithoutTelegramUserInput
    userProducts?: UserProductUncheckedCreateNestedManyWithoutUserInput
    userTransactions?: UserTransactionUncheckedCreateNestedManyWithoutTelegramUserInput
    UserBotStates?: UserBotStateUncheckedCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketUncheckedCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUpdateManyWithoutTelegramUserNestedInput
    userProducts?: UserProductUpdateManyWithoutUserNestedInput
    userTransactions?: UserTransactionUpdateManyWithoutTelegramUserNestedInput
    UserBotStates?: UserBotStateUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUncheckedUpdateManyWithoutTelegramUserNestedInput
    userProducts?: UserProductUncheckedUpdateManyWithoutUserNestedInput
    userTransactions?: UserTransactionUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserBotStates?: UserBotStateUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUncheckedUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserCreateManyInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type TelegramUserUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type TelegramUserUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ConversationCreateInput = {
    id?: string
    telegramChatId: string
    title?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    telegramUser: TelegramUserCreateNestedOneWithoutConversationsInput
    messages?: MessageCreateNestedManyWithoutConversationInput
  }

  export type ConversationUncheckedCreateInput = {
    id?: string
    telegramUserId: string
    telegramChatId: string
    title?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    messages?: MessageUncheckedCreateNestedManyWithoutConversationInput
  }

  export type ConversationUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    telegramUser?: TelegramUserUpdateOneRequiredWithoutConversationsNestedInput
    messages?: MessageUpdateManyWithoutConversationNestedInput
  }

  export type ConversationUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    messages?: MessageUncheckedUpdateManyWithoutConversationNestedInput
  }

  export type ConversationCreateManyInput = {
    id?: string
    telegramUserId: string
    telegramChatId: string
    title?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ConversationUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ConversationUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type MessageCreateInput = {
    id?: string
    role: string
    content: string
    isRead?: boolean
    createdAt?: Date | string
    conversation: ConversationCreateNestedOneWithoutMessagesInput
  }

  export type MessageUncheckedCreateInput = {
    id?: string
    role: string
    content: string
    conversationId: string
    isRead?: boolean
    createdAt?: Date | string
  }

  export type MessageUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    role?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    isRead?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversation?: ConversationUpdateOneRequiredWithoutMessagesNestedInput
  }

  export type MessageUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    role?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    conversationId?: StringFieldUpdateOperationsInput | string
    isRead?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type MessageCreateManyInput = {
    id?: string
    role: string
    content: string
    conversationId: string
    isRead?: boolean
    createdAt?: Date | string
  }

  export type MessageUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    role?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    isRead?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type MessageUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    role?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    conversationId?: StringFieldUpdateOperationsInput | string
    isRead?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type WalletCreateInput = {
    network: $Enums.TransactionNetwork
    name: string
    address: string
    description?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type WalletUncheckedCreateInput = {
    id?: number
    network: $Enums.TransactionNetwork
    name: string
    address: string
    description?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type WalletUpdateInput = {
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    name?: StringFieldUpdateOperationsInput | string
    address?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type WalletUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    name?: StringFieldUpdateOperationsInput | string
    address?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type WalletCreateManyInput = {
    id?: number
    network: $Enums.TransactionNetwork
    name: string
    address: string
    description?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type WalletUpdateManyMutationInput = {
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    name?: StringFieldUpdateOperationsInput | string
    address?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type WalletUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    name?: StringFieldUpdateOperationsInput | string
    address?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ProductCreateInput = {
    plan: string
    description?: string | null
    price: number
    firm: string
    createdAt?: Date | string
    updatedAt?: Date | string
    userProducts?: UserProductCreateNestedManyWithoutProductInput
  }

  export type ProductUncheckedCreateInput = {
    id?: number
    plan: string
    description?: string | null
    price: number
    firm: string
    createdAt?: Date | string
    updatedAt?: Date | string
    userProducts?: UserProductUncheckedCreateNestedManyWithoutProductInput
  }

  export type ProductUpdateInput = {
    plan?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    price?: FloatFieldUpdateOperationsInput | number
    firm?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    userProducts?: UserProductUpdateManyWithoutProductNestedInput
  }

  export type ProductUncheckedUpdateInput = {
    id?: IntFieldUpdateOperationsInput | number
    plan?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    price?: FloatFieldUpdateOperationsInput | number
    firm?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    userProducts?: UserProductUncheckedUpdateManyWithoutProductNestedInput
  }

  export type ProductCreateManyInput = {
    id?: number
    plan: string
    description?: string | null
    price: number
    firm: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ProductUpdateManyMutationInput = {
    plan?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    price?: FloatFieldUpdateOperationsInput | number
    firm?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ProductUncheckedUpdateManyInput = {
    id?: IntFieldUpdateOperationsInput | number
    plan?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    price?: FloatFieldUpdateOperationsInput | number
    firm?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserProductCreateInput = {
    id?: string
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
    user: TelegramUserCreateNestedOneWithoutUserProductsInput
    product: ProductCreateNestedOneWithoutUserProductsInput
  }

  export type UserProductUncheckedCreateInput = {
    id?: string
    userId: string
    productId: number
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserProductUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    user?: TelegramUserUpdateOneRequiredWithoutUserProductsNestedInput
    product?: ProductUpdateOneRequiredWithoutUserProductsNestedInput
  }

  export type UserProductUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    userId?: StringFieldUpdateOperationsInput | string
    productId?: IntFieldUpdateOperationsInput | number
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserProductCreateManyInput = {
    id?: string
    userId: string
    productId: number
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserProductUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserProductUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    userId?: StringFieldUpdateOperationsInput | string
    productId?: IntFieldUpdateOperationsInput | number
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTransactionCreateInput = {
    id?: string
    transactionHash: string
    network: $Enums.TransactionNetwork
    value: number
    status?: $Enums.TransactionStatus
    createdAt?: Date | string
    updatedAt?: Date | string
    telegramUser: TelegramUserCreateNestedOneWithoutUserTransactionsInput
  }

  export type UserTransactionUncheckedCreateInput = {
    id?: string
    telegramUserId: string
    transactionHash: string
    network: $Enums.TransactionNetwork
    value: number
    status?: $Enums.TransactionStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTransactionUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    transactionHash?: StringFieldUpdateOperationsInput | string
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    value?: FloatFieldUpdateOperationsInput | number
    status?: EnumTransactionStatusFieldUpdateOperationsInput | $Enums.TransactionStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    telegramUser?: TelegramUserUpdateOneRequiredWithoutUserTransactionsNestedInput
  }

  export type UserTransactionUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    transactionHash?: StringFieldUpdateOperationsInput | string
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    value?: FloatFieldUpdateOperationsInput | number
    status?: EnumTransactionStatusFieldUpdateOperationsInput | $Enums.TransactionStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTransactionCreateManyInput = {
    id?: string
    telegramUserId: string
    transactionHash: string
    network: $Enums.TransactionNetwork
    value: number
    status?: $Enums.TransactionStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTransactionUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    transactionHash?: StringFieldUpdateOperationsInput | string
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    value?: FloatFieldUpdateOperationsInput | number
    status?: EnumTransactionStatusFieldUpdateOperationsInput | $Enums.TransactionStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTransactionUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    transactionHash?: StringFieldUpdateOperationsInput | string
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    value?: FloatFieldUpdateOperationsInput | number
    status?: EnumTransactionStatusFieldUpdateOperationsInput | $Enums.TransactionStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserBotStateCreateInput = {
    id?: string
    state?: string
    selectedProductId?: number | null
    selectedNetwork?: string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
    telegramUser: TelegramUserCreateNestedOneWithoutUserBotStatesInput
  }

  export type UserBotStateUncheckedCreateInput = {
    id?: string
    telegramUserId: string
    state?: string
    selectedProductId?: number | null
    selectedNetwork?: string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserBotStateUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    state?: StringFieldUpdateOperationsInput | string
    selectedProductId?: NullableIntFieldUpdateOperationsInput | number | null
    selectedNetwork?: NullableStringFieldUpdateOperationsInput | string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    telegramUser?: TelegramUserUpdateOneRequiredWithoutUserBotStatesNestedInput
  }

  export type UserBotStateUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    state?: StringFieldUpdateOperationsInput | string
    selectedProductId?: NullableIntFieldUpdateOperationsInput | number | null
    selectedNetwork?: NullableStringFieldUpdateOperationsInput | string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserBotStateCreateManyInput = {
    id?: string
    telegramUserId: string
    state?: string
    selectedProductId?: number | null
    selectedNetwork?: string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserBotStateUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    state?: StringFieldUpdateOperationsInput | string
    selectedProductId?: NullableIntFieldUpdateOperationsInput | number | null
    selectedNetwork?: NullableStringFieldUpdateOperationsInput | string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserBotStateUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    state?: StringFieldUpdateOperationsInput | string
    selectedProductId?: NullableIntFieldUpdateOperationsInput | number | null
    selectedNetwork?: NullableStringFieldUpdateOperationsInput | string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTicketCreateInput = {
    id?: string
    content: string
    checked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
    telegramUser: TelegramUserCreateNestedOneWithoutUserTicketInput
  }

  export type UserTicketUncheckedCreateInput = {
    id?: string
    telegramUserId: string
    content: string
    checked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTicketUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    checked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    telegramUser?: TelegramUserUpdateOneRequiredWithoutUserTicketNestedInput
  }

  export type UserTicketUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    checked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTicketCreateManyInput = {
    id?: string
    telegramUserId: string
    content: string
    checked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTicketUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    checked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTicketUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    checked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type PanelSettingCreateInput = {
    id?: string
    telegramBotToken?: string | null
    pineconeIndexName?: string | null
    pineconeNamespace?: string | null
    pineconeHost?: string | null
  }

  export type PanelSettingUncheckedCreateInput = {
    id?: string
    telegramBotToken?: string | null
    pineconeIndexName?: string | null
    pineconeNamespace?: string | null
    pineconeHost?: string | null
  }

  export type PanelSettingUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramBotToken?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeIndexName?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeNamespace?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeHost?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type PanelSettingUncheckedUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramBotToken?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeIndexName?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeNamespace?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeHost?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type PanelSettingCreateManyInput = {
    id?: string
    telegramBotToken?: string | null
    pineconeIndexName?: string | null
    pineconeNamespace?: string | null
    pineconeHost?: string | null
  }

  export type PanelSettingUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramBotToken?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeIndexName?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeNamespace?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeHost?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type PanelSettingUncheckedUpdateManyInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramBotToken?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeIndexName?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeNamespace?: NullableStringFieldUpdateOperationsInput | string | null
    pineconeHost?: NullableStringFieldUpdateOperationsInput | string | null
  }

  export type IntFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[] | ListIntFieldRefInput<$PrismaModel>
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntFilter<$PrismaModel> | number
  }
  export type JsonFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>

  export type JsonFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type DateTimeFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    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 GeneralDocumentCountOrderByAggregateInput = {
    id?: SortOrder
    document?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type GeneralDocumentAvgOrderByAggregateInput = {
    id?: SortOrder
  }

  export type GeneralDocumentMaxOrderByAggregateInput = {
    id?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type GeneralDocumentMinOrderByAggregateInput = {
    id?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type GeneralDocumentSumOrderByAggregateInput = {
    id?: SortOrder
  }

  export type IntWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[] | ListIntFieldRefInput<$PrismaModel>
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
    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 JsonWithAggregatesFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonWithAggregatesFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>

  export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedJsonFilter<$PrismaModel>
    _max?: NestedJsonFilter<$PrismaModel>
  }

  export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    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 StringFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[] | ListStringFieldRefInput<$PrismaModel>
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
    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>
    mode?: QueryMode
    not?: NestedStringFilter<$PrismaModel> | string
  }

  export type FirmDocumentCountOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    fields?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type FirmDocumentAvgOrderByAggregateInput = {
    id?: SortOrder
  }

  export type FirmDocumentMaxOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type FirmDocumentMinOrderByAggregateInput = {
    id?: SortOrder
    name?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type FirmDocumentSumOrderByAggregateInput = {
    id?: SortOrder
  }

  export type StringWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[] | ListStringFieldRefInput<$PrismaModel>
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
    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>
    mode?: QueryMode
    not?: NestedStringWithAggregatesFilter<$PrismaModel> | string
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedStringFilter<$PrismaModel>
    _max?: NestedStringFilter<$PrismaModel>
  }

  export type StringNullableFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | 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>
    mode?: QueryMode
    not?: NestedStringNullableFilter<$PrismaModel> | string | null
  }

  export type SortOrderInput = {
    sort: SortOrder
    nulls?: NullsOrder
  }

  export type LiteralsCountOrderByAggregateInput = {
    id?: SortOrder
    aiModel?: SortOrder
    finalPrompt?: SortOrder
    commands?: SortOrder
    companies?: SortOrder
    introText?: SortOrder
    strategiesText?: SortOrder
    rulesText?: SortOrder
    templateText?: SortOrder
    welcomeText?: SortOrder
    skillPrompt?: SortOrder
    enthusiasmPrompt?: SortOrder
    customerPrompt?: SortOrder
    companyRankingPrompt?: SortOrder
    createdAt?: SortOrder
  }

  export type LiteralsAvgOrderByAggregateInput = {
    id?: SortOrder
  }

  export type LiteralsMaxOrderByAggregateInput = {
    id?: SortOrder
    aiModel?: SortOrder
    finalPrompt?: SortOrder
    introText?: SortOrder
    strategiesText?: SortOrder
    rulesText?: SortOrder
    templateText?: SortOrder
    welcomeText?: SortOrder
    skillPrompt?: SortOrder
    enthusiasmPrompt?: SortOrder
    customerPrompt?: SortOrder
    companyRankingPrompt?: SortOrder
    createdAt?: SortOrder
  }

  export type LiteralsMinOrderByAggregateInput = {
    id?: SortOrder
    aiModel?: SortOrder
    finalPrompt?: SortOrder
    introText?: SortOrder
    strategiesText?: SortOrder
    rulesText?: SortOrder
    templateText?: SortOrder
    welcomeText?: SortOrder
    skillPrompt?: SortOrder
    enthusiasmPrompt?: SortOrder
    customerPrompt?: SortOrder
    companyRankingPrompt?: SortOrder
    createdAt?: SortOrder
  }

  export type LiteralsSumOrderByAggregateInput = {
    id?: SortOrder
  }

  export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | 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>
    mode?: QueryMode
    not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedStringNullableFilter<$PrismaModel>
    _max?: NestedStringNullableFilter<$PrismaModel>
  }

  export type FloatFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel>
    in?: number[] | ListFloatFieldRefInput<$PrismaModel>
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatFilter<$PrismaModel> | number
  }

  export type EnumRespondentTypeFilter<$PrismaModel = never> = {
    equals?: $Enums.RespondentType | EnumRespondentTypeFieldRefInput<$PrismaModel>
    in?: $Enums.RespondentType[] | ListEnumRespondentTypeFieldRefInput<$PrismaModel>
    notIn?: $Enums.RespondentType[] | ListEnumRespondentTypeFieldRefInput<$PrismaModel>
    not?: NestedEnumRespondentTypeFilter<$PrismaModel> | $Enums.RespondentType
  }

  export type ConversationListRelationFilter = {
    every?: ConversationWhereInput
    some?: ConversationWhereInput
    none?: ConversationWhereInput
  }

  export type UserProductListRelationFilter = {
    every?: UserProductWhereInput
    some?: UserProductWhereInput
    none?: UserProductWhereInput
  }

  export type UserTransactionListRelationFilter = {
    every?: UserTransactionWhereInput
    some?: UserTransactionWhereInput
    none?: UserTransactionWhereInput
  }

  export type UserBotStateListRelationFilter = {
    every?: UserBotStateWhereInput
    some?: UserBotStateWhereInput
    none?: UserBotStateWhereInput
  }

  export type UserTicketListRelationFilter = {
    every?: UserTicketWhereInput
    some?: UserTicketWhereInput
    none?: UserTicketWhereInput
  }

  export type ConversationOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type UserProductOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type UserTransactionOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type UserBotStateOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type UserTicketOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type TelegramUserCountOrderByAggregateInput = {
    id?: SortOrder
    telegramId?: SortOrder
    username?: SortOrder
    firstName?: SortOrder
    lastName?: SortOrder
    balance?: SortOrder
    lastInteraction?: SortOrder
    consultingRequest?: SortOrder
    respondent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type TelegramUserAvgOrderByAggregateInput = {
    balance?: SortOrder
  }

  export type TelegramUserMaxOrderByAggregateInput = {
    id?: SortOrder
    telegramId?: SortOrder
    username?: SortOrder
    firstName?: SortOrder
    lastName?: SortOrder
    balance?: SortOrder
    lastInteraction?: SortOrder
    consultingRequest?: SortOrder
    respondent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type TelegramUserMinOrderByAggregateInput = {
    id?: SortOrder
    telegramId?: SortOrder
    username?: SortOrder
    firstName?: SortOrder
    lastName?: SortOrder
    balance?: SortOrder
    lastInteraction?: SortOrder
    consultingRequest?: SortOrder
    respondent?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type TelegramUserSumOrderByAggregateInput = {
    balance?: SortOrder
  }

  export type FloatWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel>
    in?: number[] | ListFloatFieldRefInput<$PrismaModel>
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
    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 EnumRespondentTypeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.RespondentType | EnumRespondentTypeFieldRefInput<$PrismaModel>
    in?: $Enums.RespondentType[] | ListEnumRespondentTypeFieldRefInput<$PrismaModel>
    notIn?: $Enums.RespondentType[] | ListEnumRespondentTypeFieldRefInput<$PrismaModel>
    not?: NestedEnumRespondentTypeWithAggregatesFilter<$PrismaModel> | $Enums.RespondentType
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumRespondentTypeFilter<$PrismaModel>
    _max?: NestedEnumRespondentTypeFilter<$PrismaModel>
  }

  export type TelegramUserScalarRelationFilter = {
    is?: TelegramUserWhereInput
    isNot?: TelegramUserWhereInput
  }

  export type MessageListRelationFilter = {
    every?: MessageWhereInput
    some?: MessageWhereInput
    none?: MessageWhereInput
  }

  export type MessageOrderByRelationAggregateInput = {
    _count?: SortOrder
  }

  export type ConversationCountOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    telegramChatId?: SortOrder
    title?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type ConversationMaxOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    telegramChatId?: SortOrder
    title?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type ConversationMinOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    telegramChatId?: SortOrder
    title?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type BoolFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolFilter<$PrismaModel> | boolean
  }

  export type ConversationScalarRelationFilter = {
    is?: ConversationWhereInput
    isNot?: ConversationWhereInput
  }

  export type MessageCountOrderByAggregateInput = {
    id?: SortOrder
    role?: SortOrder
    content?: SortOrder
    conversationId?: SortOrder
    isRead?: SortOrder
    createdAt?: SortOrder
  }

  export type MessageMaxOrderByAggregateInput = {
    id?: SortOrder
    role?: SortOrder
    content?: SortOrder
    conversationId?: SortOrder
    isRead?: SortOrder
    createdAt?: SortOrder
  }

  export type MessageMinOrderByAggregateInput = {
    id?: SortOrder
    role?: SortOrder
    content?: SortOrder
    conversationId?: SortOrder
    isRead?: SortOrder
    createdAt?: SortOrder
  }

  export type BoolWithAggregatesFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedBoolFilter<$PrismaModel>
    _max?: NestedBoolFilter<$PrismaModel>
  }

  export type EnumTransactionNetworkFilter<$PrismaModel = never> = {
    equals?: $Enums.TransactionNetwork | EnumTransactionNetworkFieldRefInput<$PrismaModel>
    in?: $Enums.TransactionNetwork[] | ListEnumTransactionNetworkFieldRefInput<$PrismaModel>
    notIn?: $Enums.TransactionNetwork[] | ListEnumTransactionNetworkFieldRefInput<$PrismaModel>
    not?: NestedEnumTransactionNetworkFilter<$PrismaModel> | $Enums.TransactionNetwork
  }

  export type WalletCountOrderByAggregateInput = {
    id?: SortOrder
    network?: SortOrder
    name?: SortOrder
    address?: SortOrder
    description?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type WalletAvgOrderByAggregateInput = {
    id?: SortOrder
  }

  export type WalletMaxOrderByAggregateInput = {
    id?: SortOrder
    network?: SortOrder
    name?: SortOrder
    address?: SortOrder
    description?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type WalletMinOrderByAggregateInput = {
    id?: SortOrder
    network?: SortOrder
    name?: SortOrder
    address?: SortOrder
    description?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type WalletSumOrderByAggregateInput = {
    id?: SortOrder
  }

  export type EnumTransactionNetworkWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.TransactionNetwork | EnumTransactionNetworkFieldRefInput<$PrismaModel>
    in?: $Enums.TransactionNetwork[] | ListEnumTransactionNetworkFieldRefInput<$PrismaModel>
    notIn?: $Enums.TransactionNetwork[] | ListEnumTransactionNetworkFieldRefInput<$PrismaModel>
    not?: NestedEnumTransactionNetworkWithAggregatesFilter<$PrismaModel> | $Enums.TransactionNetwork
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumTransactionNetworkFilter<$PrismaModel>
    _max?: NestedEnumTransactionNetworkFilter<$PrismaModel>
  }

  export type ProductCountOrderByAggregateInput = {
    id?: SortOrder
    plan?: SortOrder
    description?: SortOrder
    price?: SortOrder
    firm?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type ProductAvgOrderByAggregateInput = {
    id?: SortOrder
    price?: SortOrder
  }

  export type ProductMaxOrderByAggregateInput = {
    id?: SortOrder
    plan?: SortOrder
    description?: SortOrder
    price?: SortOrder
    firm?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type ProductMinOrderByAggregateInput = {
    id?: SortOrder
    plan?: SortOrder
    description?: SortOrder
    price?: SortOrder
    firm?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type ProductSumOrderByAggregateInput = {
    id?: SortOrder
    price?: SortOrder
  }

  export type EnumChallengeStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.ChallengeStatus | EnumChallengeStatusFieldRefInput<$PrismaModel>
    in?: $Enums.ChallengeStatus[] | ListEnumChallengeStatusFieldRefInput<$PrismaModel>
    notIn?: $Enums.ChallengeStatus[] | ListEnumChallengeStatusFieldRefInput<$PrismaModel>
    not?: NestedEnumChallengeStatusFilter<$PrismaModel> | $Enums.ChallengeStatus
  }

  export type ProductScalarRelationFilter = {
    is?: ProductWhereInput
    isNot?: ProductWhereInput
  }

  export type UserProductUserIdProductIdCompoundUniqueInput = {
    userId: string
    productId: number
  }

  export type UserProductCountOrderByAggregateInput = {
    id?: SortOrder
    userId?: SortOrder
    productId?: SortOrder
    challengeStatus?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserProductAvgOrderByAggregateInput = {
    productId?: SortOrder
  }

  export type UserProductMaxOrderByAggregateInput = {
    id?: SortOrder
    userId?: SortOrder
    productId?: SortOrder
    challengeStatus?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserProductMinOrderByAggregateInput = {
    id?: SortOrder
    userId?: SortOrder
    productId?: SortOrder
    challengeStatus?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserProductSumOrderByAggregateInput = {
    productId?: SortOrder
  }

  export type EnumChallengeStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.ChallengeStatus | EnumChallengeStatusFieldRefInput<$PrismaModel>
    in?: $Enums.ChallengeStatus[] | ListEnumChallengeStatusFieldRefInput<$PrismaModel>
    notIn?: $Enums.ChallengeStatus[] | ListEnumChallengeStatusFieldRefInput<$PrismaModel>
    not?: NestedEnumChallengeStatusWithAggregatesFilter<$PrismaModel> | $Enums.ChallengeStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumChallengeStatusFilter<$PrismaModel>
    _max?: NestedEnumChallengeStatusFilter<$PrismaModel>
  }

  export type EnumTransactionStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.TransactionStatus | EnumTransactionStatusFieldRefInput<$PrismaModel>
    in?: $Enums.TransactionStatus[] | ListEnumTransactionStatusFieldRefInput<$PrismaModel>
    notIn?: $Enums.TransactionStatus[] | ListEnumTransactionStatusFieldRefInput<$PrismaModel>
    not?: NestedEnumTransactionStatusFilter<$PrismaModel> | $Enums.TransactionStatus
  }

  export type UserTransactionCountOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    transactionHash?: SortOrder
    network?: SortOrder
    value?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserTransactionAvgOrderByAggregateInput = {
    value?: SortOrder
  }

  export type UserTransactionMaxOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    transactionHash?: SortOrder
    network?: SortOrder
    value?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserTransactionMinOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    transactionHash?: SortOrder
    network?: SortOrder
    value?: SortOrder
    status?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserTransactionSumOrderByAggregateInput = {
    value?: SortOrder
  }

  export type EnumTransactionStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.TransactionStatus | EnumTransactionStatusFieldRefInput<$PrismaModel>
    in?: $Enums.TransactionStatus[] | ListEnumTransactionStatusFieldRefInput<$PrismaModel>
    notIn?: $Enums.TransactionStatus[] | ListEnumTransactionStatusFieldRefInput<$PrismaModel>
    not?: NestedEnumTransactionStatusWithAggregatesFilter<$PrismaModel> | $Enums.TransactionStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumTransactionStatusFilter<$PrismaModel>
    _max?: NestedEnumTransactionStatusFilter<$PrismaModel>
  }

  export type IntNullableFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel> | null
    in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntNullableFilter<$PrismaModel> | number | null
  }
  export type JsonNullableFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonNullableFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>

  export type JsonNullableFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type UserBotStateCountOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    state?: SortOrder
    selectedProductId?: SortOrder
    selectedNetwork?: SortOrder
    additionalData?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserBotStateAvgOrderByAggregateInput = {
    selectedProductId?: SortOrder
  }

  export type UserBotStateMaxOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    state?: SortOrder
    selectedProductId?: SortOrder
    selectedNetwork?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserBotStateMinOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    state?: SortOrder
    selectedProductId?: SortOrder
    selectedNetwork?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserBotStateSumOrderByAggregateInput = {
    selectedProductId?: SortOrder
  }

  export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel> | null
    in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedFloatNullableFilter<$PrismaModel>
    _sum?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedIntNullableFilter<$PrismaModel>
    _max?: NestedIntNullableFilter<$PrismaModel>
  }
  export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
        Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>

  export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    _count?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedJsonNullableFilter<$PrismaModel>
    _max?: NestedJsonNullableFilter<$PrismaModel>
  }

  export type UserTicketCountOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    content?: SortOrder
    checked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserTicketMaxOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    content?: SortOrder
    checked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type UserTicketMinOrderByAggregateInput = {
    id?: SortOrder
    telegramUserId?: SortOrder
    content?: SortOrder
    checked?: SortOrder
    createdAt?: SortOrder
    updatedAt?: SortOrder
  }

  export type PanelSettingCountOrderByAggregateInput = {
    id?: SortOrder
    telegramBotToken?: SortOrder
    pineconeIndexName?: SortOrder
    pineconeNamespace?: SortOrder
    pineconeHost?: SortOrder
  }

  export type PanelSettingMaxOrderByAggregateInput = {
    id?: SortOrder
    telegramBotToken?: SortOrder
    pineconeIndexName?: SortOrder
    pineconeNamespace?: SortOrder
    pineconeHost?: SortOrder
  }

  export type PanelSettingMinOrderByAggregateInput = {
    id?: SortOrder
    telegramBotToken?: SortOrder
    pineconeIndexName?: SortOrder
    pineconeNamespace?: SortOrder
    pineconeHost?: SortOrder
  }

  export type DateTimeFieldUpdateOperationsInput = {
    set?: Date | string
  }

  export type IntFieldUpdateOperationsInput = {
    set?: number
    increment?: number
    decrement?: number
    multiply?: number
    divide?: number
  }

  export type StringFieldUpdateOperationsInput = {
    set?: string
  }

  export type NullableStringFieldUpdateOperationsInput = {
    set?: string | null
  }

  export type ConversationCreateNestedManyWithoutTelegramUserInput = {
    create?: XOR<ConversationCreateWithoutTelegramUserInput, ConversationUncheckedCreateWithoutTelegramUserInput> | ConversationCreateWithoutTelegramUserInput[] | ConversationUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: ConversationCreateOrConnectWithoutTelegramUserInput | ConversationCreateOrConnectWithoutTelegramUserInput[]
    createMany?: ConversationCreateManyTelegramUserInputEnvelope
    connect?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
  }

  export type UserProductCreateNestedManyWithoutUserInput = {
    create?: XOR<UserProductCreateWithoutUserInput, UserProductUncheckedCreateWithoutUserInput> | UserProductCreateWithoutUserInput[] | UserProductUncheckedCreateWithoutUserInput[]
    connectOrCreate?: UserProductCreateOrConnectWithoutUserInput | UserProductCreateOrConnectWithoutUserInput[]
    createMany?: UserProductCreateManyUserInputEnvelope
    connect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
  }

  export type UserTransactionCreateNestedManyWithoutTelegramUserInput = {
    create?: XOR<UserTransactionCreateWithoutTelegramUserInput, UserTransactionUncheckedCreateWithoutTelegramUserInput> | UserTransactionCreateWithoutTelegramUserInput[] | UserTransactionUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserTransactionCreateOrConnectWithoutTelegramUserInput | UserTransactionCreateOrConnectWithoutTelegramUserInput[]
    createMany?: UserTransactionCreateManyTelegramUserInputEnvelope
    connect?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
  }

  export type UserBotStateCreateNestedManyWithoutTelegramUserInput = {
    create?: XOR<UserBotStateCreateWithoutTelegramUserInput, UserBotStateUncheckedCreateWithoutTelegramUserInput> | UserBotStateCreateWithoutTelegramUserInput[] | UserBotStateUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserBotStateCreateOrConnectWithoutTelegramUserInput | UserBotStateCreateOrConnectWithoutTelegramUserInput[]
    createMany?: UserBotStateCreateManyTelegramUserInputEnvelope
    connect?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
  }

  export type UserTicketCreateNestedManyWithoutTelegramUserInput = {
    create?: XOR<UserTicketCreateWithoutTelegramUserInput, UserTicketUncheckedCreateWithoutTelegramUserInput> | UserTicketCreateWithoutTelegramUserInput[] | UserTicketUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserTicketCreateOrConnectWithoutTelegramUserInput | UserTicketCreateOrConnectWithoutTelegramUserInput[]
    createMany?: UserTicketCreateManyTelegramUserInputEnvelope
    connect?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
  }

  export type ConversationUncheckedCreateNestedManyWithoutTelegramUserInput = {
    create?: XOR<ConversationCreateWithoutTelegramUserInput, ConversationUncheckedCreateWithoutTelegramUserInput> | ConversationCreateWithoutTelegramUserInput[] | ConversationUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: ConversationCreateOrConnectWithoutTelegramUserInput | ConversationCreateOrConnectWithoutTelegramUserInput[]
    createMany?: ConversationCreateManyTelegramUserInputEnvelope
    connect?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
  }

  export type UserProductUncheckedCreateNestedManyWithoutUserInput = {
    create?: XOR<UserProductCreateWithoutUserInput, UserProductUncheckedCreateWithoutUserInput> | UserProductCreateWithoutUserInput[] | UserProductUncheckedCreateWithoutUserInput[]
    connectOrCreate?: UserProductCreateOrConnectWithoutUserInput | UserProductCreateOrConnectWithoutUserInput[]
    createMany?: UserProductCreateManyUserInputEnvelope
    connect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
  }

  export type UserTransactionUncheckedCreateNestedManyWithoutTelegramUserInput = {
    create?: XOR<UserTransactionCreateWithoutTelegramUserInput, UserTransactionUncheckedCreateWithoutTelegramUserInput> | UserTransactionCreateWithoutTelegramUserInput[] | UserTransactionUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserTransactionCreateOrConnectWithoutTelegramUserInput | UserTransactionCreateOrConnectWithoutTelegramUserInput[]
    createMany?: UserTransactionCreateManyTelegramUserInputEnvelope
    connect?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
  }

  export type UserBotStateUncheckedCreateNestedManyWithoutTelegramUserInput = {
    create?: XOR<UserBotStateCreateWithoutTelegramUserInput, UserBotStateUncheckedCreateWithoutTelegramUserInput> | UserBotStateCreateWithoutTelegramUserInput[] | UserBotStateUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserBotStateCreateOrConnectWithoutTelegramUserInput | UserBotStateCreateOrConnectWithoutTelegramUserInput[]
    createMany?: UserBotStateCreateManyTelegramUserInputEnvelope
    connect?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
  }

  export type UserTicketUncheckedCreateNestedManyWithoutTelegramUserInput = {
    create?: XOR<UserTicketCreateWithoutTelegramUserInput, UserTicketUncheckedCreateWithoutTelegramUserInput> | UserTicketCreateWithoutTelegramUserInput[] | UserTicketUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserTicketCreateOrConnectWithoutTelegramUserInput | UserTicketCreateOrConnectWithoutTelegramUserInput[]
    createMany?: UserTicketCreateManyTelegramUserInputEnvelope
    connect?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
  }

  export type FloatFieldUpdateOperationsInput = {
    set?: number
    increment?: number
    decrement?: number
    multiply?: number
    divide?: number
  }

  export type EnumRespondentTypeFieldUpdateOperationsInput = {
    set?: $Enums.RespondentType
  }

  export type ConversationUpdateManyWithoutTelegramUserNestedInput = {
    create?: XOR<ConversationCreateWithoutTelegramUserInput, ConversationUncheckedCreateWithoutTelegramUserInput> | ConversationCreateWithoutTelegramUserInput[] | ConversationUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: ConversationCreateOrConnectWithoutTelegramUserInput | ConversationCreateOrConnectWithoutTelegramUserInput[]
    upsert?: ConversationUpsertWithWhereUniqueWithoutTelegramUserInput | ConversationUpsertWithWhereUniqueWithoutTelegramUserInput[]
    createMany?: ConversationCreateManyTelegramUserInputEnvelope
    set?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
    disconnect?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
    delete?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
    connect?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
    update?: ConversationUpdateWithWhereUniqueWithoutTelegramUserInput | ConversationUpdateWithWhereUniqueWithoutTelegramUserInput[]
    updateMany?: ConversationUpdateManyWithWhereWithoutTelegramUserInput | ConversationUpdateManyWithWhereWithoutTelegramUserInput[]
    deleteMany?: ConversationScalarWhereInput | ConversationScalarWhereInput[]
  }

  export type UserProductUpdateManyWithoutUserNestedInput = {
    create?: XOR<UserProductCreateWithoutUserInput, UserProductUncheckedCreateWithoutUserInput> | UserProductCreateWithoutUserInput[] | UserProductUncheckedCreateWithoutUserInput[]
    connectOrCreate?: UserProductCreateOrConnectWithoutUserInput | UserProductCreateOrConnectWithoutUserInput[]
    upsert?: UserProductUpsertWithWhereUniqueWithoutUserInput | UserProductUpsertWithWhereUniqueWithoutUserInput[]
    createMany?: UserProductCreateManyUserInputEnvelope
    set?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    disconnect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    delete?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    connect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    update?: UserProductUpdateWithWhereUniqueWithoutUserInput | UserProductUpdateWithWhereUniqueWithoutUserInput[]
    updateMany?: UserProductUpdateManyWithWhereWithoutUserInput | UserProductUpdateManyWithWhereWithoutUserInput[]
    deleteMany?: UserProductScalarWhereInput | UserProductScalarWhereInput[]
  }

  export type UserTransactionUpdateManyWithoutTelegramUserNestedInput = {
    create?: XOR<UserTransactionCreateWithoutTelegramUserInput, UserTransactionUncheckedCreateWithoutTelegramUserInput> | UserTransactionCreateWithoutTelegramUserInput[] | UserTransactionUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserTransactionCreateOrConnectWithoutTelegramUserInput | UserTransactionCreateOrConnectWithoutTelegramUserInput[]
    upsert?: UserTransactionUpsertWithWhereUniqueWithoutTelegramUserInput | UserTransactionUpsertWithWhereUniqueWithoutTelegramUserInput[]
    createMany?: UserTransactionCreateManyTelegramUserInputEnvelope
    set?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
    disconnect?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
    delete?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
    connect?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
    update?: UserTransactionUpdateWithWhereUniqueWithoutTelegramUserInput | UserTransactionUpdateWithWhereUniqueWithoutTelegramUserInput[]
    updateMany?: UserTransactionUpdateManyWithWhereWithoutTelegramUserInput | UserTransactionUpdateManyWithWhereWithoutTelegramUserInput[]
    deleteMany?: UserTransactionScalarWhereInput | UserTransactionScalarWhereInput[]
  }

  export type UserBotStateUpdateManyWithoutTelegramUserNestedInput = {
    create?: XOR<UserBotStateCreateWithoutTelegramUserInput, UserBotStateUncheckedCreateWithoutTelegramUserInput> | UserBotStateCreateWithoutTelegramUserInput[] | UserBotStateUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserBotStateCreateOrConnectWithoutTelegramUserInput | UserBotStateCreateOrConnectWithoutTelegramUserInput[]
    upsert?: UserBotStateUpsertWithWhereUniqueWithoutTelegramUserInput | UserBotStateUpsertWithWhereUniqueWithoutTelegramUserInput[]
    createMany?: UserBotStateCreateManyTelegramUserInputEnvelope
    set?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
    disconnect?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
    delete?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
    connect?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
    update?: UserBotStateUpdateWithWhereUniqueWithoutTelegramUserInput | UserBotStateUpdateWithWhereUniqueWithoutTelegramUserInput[]
    updateMany?: UserBotStateUpdateManyWithWhereWithoutTelegramUserInput | UserBotStateUpdateManyWithWhereWithoutTelegramUserInput[]
    deleteMany?: UserBotStateScalarWhereInput | UserBotStateScalarWhereInput[]
  }

  export type UserTicketUpdateManyWithoutTelegramUserNestedInput = {
    create?: XOR<UserTicketCreateWithoutTelegramUserInput, UserTicketUncheckedCreateWithoutTelegramUserInput> | UserTicketCreateWithoutTelegramUserInput[] | UserTicketUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserTicketCreateOrConnectWithoutTelegramUserInput | UserTicketCreateOrConnectWithoutTelegramUserInput[]
    upsert?: UserTicketUpsertWithWhereUniqueWithoutTelegramUserInput | UserTicketUpsertWithWhereUniqueWithoutTelegramUserInput[]
    createMany?: UserTicketCreateManyTelegramUserInputEnvelope
    set?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
    disconnect?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
    delete?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
    connect?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
    update?: UserTicketUpdateWithWhereUniqueWithoutTelegramUserInput | UserTicketUpdateWithWhereUniqueWithoutTelegramUserInput[]
    updateMany?: UserTicketUpdateManyWithWhereWithoutTelegramUserInput | UserTicketUpdateManyWithWhereWithoutTelegramUserInput[]
    deleteMany?: UserTicketScalarWhereInput | UserTicketScalarWhereInput[]
  }

  export type ConversationUncheckedUpdateManyWithoutTelegramUserNestedInput = {
    create?: XOR<ConversationCreateWithoutTelegramUserInput, ConversationUncheckedCreateWithoutTelegramUserInput> | ConversationCreateWithoutTelegramUserInput[] | ConversationUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: ConversationCreateOrConnectWithoutTelegramUserInput | ConversationCreateOrConnectWithoutTelegramUserInput[]
    upsert?: ConversationUpsertWithWhereUniqueWithoutTelegramUserInput | ConversationUpsertWithWhereUniqueWithoutTelegramUserInput[]
    createMany?: ConversationCreateManyTelegramUserInputEnvelope
    set?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
    disconnect?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
    delete?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
    connect?: ConversationWhereUniqueInput | ConversationWhereUniqueInput[]
    update?: ConversationUpdateWithWhereUniqueWithoutTelegramUserInput | ConversationUpdateWithWhereUniqueWithoutTelegramUserInput[]
    updateMany?: ConversationUpdateManyWithWhereWithoutTelegramUserInput | ConversationUpdateManyWithWhereWithoutTelegramUserInput[]
    deleteMany?: ConversationScalarWhereInput | ConversationScalarWhereInput[]
  }

  export type UserProductUncheckedUpdateManyWithoutUserNestedInput = {
    create?: XOR<UserProductCreateWithoutUserInput, UserProductUncheckedCreateWithoutUserInput> | UserProductCreateWithoutUserInput[] | UserProductUncheckedCreateWithoutUserInput[]
    connectOrCreate?: UserProductCreateOrConnectWithoutUserInput | UserProductCreateOrConnectWithoutUserInput[]
    upsert?: UserProductUpsertWithWhereUniqueWithoutUserInput | UserProductUpsertWithWhereUniqueWithoutUserInput[]
    createMany?: UserProductCreateManyUserInputEnvelope
    set?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    disconnect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    delete?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    connect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    update?: UserProductUpdateWithWhereUniqueWithoutUserInput | UserProductUpdateWithWhereUniqueWithoutUserInput[]
    updateMany?: UserProductUpdateManyWithWhereWithoutUserInput | UserProductUpdateManyWithWhereWithoutUserInput[]
    deleteMany?: UserProductScalarWhereInput | UserProductScalarWhereInput[]
  }

  export type UserTransactionUncheckedUpdateManyWithoutTelegramUserNestedInput = {
    create?: XOR<UserTransactionCreateWithoutTelegramUserInput, UserTransactionUncheckedCreateWithoutTelegramUserInput> | UserTransactionCreateWithoutTelegramUserInput[] | UserTransactionUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserTransactionCreateOrConnectWithoutTelegramUserInput | UserTransactionCreateOrConnectWithoutTelegramUserInput[]
    upsert?: UserTransactionUpsertWithWhereUniqueWithoutTelegramUserInput | UserTransactionUpsertWithWhereUniqueWithoutTelegramUserInput[]
    createMany?: UserTransactionCreateManyTelegramUserInputEnvelope
    set?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
    disconnect?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
    delete?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
    connect?: UserTransactionWhereUniqueInput | UserTransactionWhereUniqueInput[]
    update?: UserTransactionUpdateWithWhereUniqueWithoutTelegramUserInput | UserTransactionUpdateWithWhereUniqueWithoutTelegramUserInput[]
    updateMany?: UserTransactionUpdateManyWithWhereWithoutTelegramUserInput | UserTransactionUpdateManyWithWhereWithoutTelegramUserInput[]
    deleteMany?: UserTransactionScalarWhereInput | UserTransactionScalarWhereInput[]
  }

  export type UserBotStateUncheckedUpdateManyWithoutTelegramUserNestedInput = {
    create?: XOR<UserBotStateCreateWithoutTelegramUserInput, UserBotStateUncheckedCreateWithoutTelegramUserInput> | UserBotStateCreateWithoutTelegramUserInput[] | UserBotStateUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserBotStateCreateOrConnectWithoutTelegramUserInput | UserBotStateCreateOrConnectWithoutTelegramUserInput[]
    upsert?: UserBotStateUpsertWithWhereUniqueWithoutTelegramUserInput | UserBotStateUpsertWithWhereUniqueWithoutTelegramUserInput[]
    createMany?: UserBotStateCreateManyTelegramUserInputEnvelope
    set?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
    disconnect?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
    delete?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
    connect?: UserBotStateWhereUniqueInput | UserBotStateWhereUniqueInput[]
    update?: UserBotStateUpdateWithWhereUniqueWithoutTelegramUserInput | UserBotStateUpdateWithWhereUniqueWithoutTelegramUserInput[]
    updateMany?: UserBotStateUpdateManyWithWhereWithoutTelegramUserInput | UserBotStateUpdateManyWithWhereWithoutTelegramUserInput[]
    deleteMany?: UserBotStateScalarWhereInput | UserBotStateScalarWhereInput[]
  }

  export type UserTicketUncheckedUpdateManyWithoutTelegramUserNestedInput = {
    create?: XOR<UserTicketCreateWithoutTelegramUserInput, UserTicketUncheckedCreateWithoutTelegramUserInput> | UserTicketCreateWithoutTelegramUserInput[] | UserTicketUncheckedCreateWithoutTelegramUserInput[]
    connectOrCreate?: UserTicketCreateOrConnectWithoutTelegramUserInput | UserTicketCreateOrConnectWithoutTelegramUserInput[]
    upsert?: UserTicketUpsertWithWhereUniqueWithoutTelegramUserInput | UserTicketUpsertWithWhereUniqueWithoutTelegramUserInput[]
    createMany?: UserTicketCreateManyTelegramUserInputEnvelope
    set?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
    disconnect?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
    delete?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
    connect?: UserTicketWhereUniqueInput | UserTicketWhereUniqueInput[]
    update?: UserTicketUpdateWithWhereUniqueWithoutTelegramUserInput | UserTicketUpdateWithWhereUniqueWithoutTelegramUserInput[]
    updateMany?: UserTicketUpdateManyWithWhereWithoutTelegramUserInput | UserTicketUpdateManyWithWhereWithoutTelegramUserInput[]
    deleteMany?: UserTicketScalarWhereInput | UserTicketScalarWhereInput[]
  }

  export type TelegramUserCreateNestedOneWithoutConversationsInput = {
    create?: XOR<TelegramUserCreateWithoutConversationsInput, TelegramUserUncheckedCreateWithoutConversationsInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutConversationsInput
    connect?: TelegramUserWhereUniqueInput
  }

  export type MessageCreateNestedManyWithoutConversationInput = {
    create?: XOR<MessageCreateWithoutConversationInput, MessageUncheckedCreateWithoutConversationInput> | MessageCreateWithoutConversationInput[] | MessageUncheckedCreateWithoutConversationInput[]
    connectOrCreate?: MessageCreateOrConnectWithoutConversationInput | MessageCreateOrConnectWithoutConversationInput[]
    createMany?: MessageCreateManyConversationInputEnvelope
    connect?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
  }

  export type MessageUncheckedCreateNestedManyWithoutConversationInput = {
    create?: XOR<MessageCreateWithoutConversationInput, MessageUncheckedCreateWithoutConversationInput> | MessageCreateWithoutConversationInput[] | MessageUncheckedCreateWithoutConversationInput[]
    connectOrCreate?: MessageCreateOrConnectWithoutConversationInput | MessageCreateOrConnectWithoutConversationInput[]
    createMany?: MessageCreateManyConversationInputEnvelope
    connect?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
  }

  export type TelegramUserUpdateOneRequiredWithoutConversationsNestedInput = {
    create?: XOR<TelegramUserCreateWithoutConversationsInput, TelegramUserUncheckedCreateWithoutConversationsInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutConversationsInput
    upsert?: TelegramUserUpsertWithoutConversationsInput
    connect?: TelegramUserWhereUniqueInput
    update?: XOR<XOR<TelegramUserUpdateToOneWithWhereWithoutConversationsInput, TelegramUserUpdateWithoutConversationsInput>, TelegramUserUncheckedUpdateWithoutConversationsInput>
  }

  export type MessageUpdateManyWithoutConversationNestedInput = {
    create?: XOR<MessageCreateWithoutConversationInput, MessageUncheckedCreateWithoutConversationInput> | MessageCreateWithoutConversationInput[] | MessageUncheckedCreateWithoutConversationInput[]
    connectOrCreate?: MessageCreateOrConnectWithoutConversationInput | MessageCreateOrConnectWithoutConversationInput[]
    upsert?: MessageUpsertWithWhereUniqueWithoutConversationInput | MessageUpsertWithWhereUniqueWithoutConversationInput[]
    createMany?: MessageCreateManyConversationInputEnvelope
    set?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
    disconnect?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
    delete?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
    connect?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
    update?: MessageUpdateWithWhereUniqueWithoutConversationInput | MessageUpdateWithWhereUniqueWithoutConversationInput[]
    updateMany?: MessageUpdateManyWithWhereWithoutConversationInput | MessageUpdateManyWithWhereWithoutConversationInput[]
    deleteMany?: MessageScalarWhereInput | MessageScalarWhereInput[]
  }

  export type MessageUncheckedUpdateManyWithoutConversationNestedInput = {
    create?: XOR<MessageCreateWithoutConversationInput, MessageUncheckedCreateWithoutConversationInput> | MessageCreateWithoutConversationInput[] | MessageUncheckedCreateWithoutConversationInput[]
    connectOrCreate?: MessageCreateOrConnectWithoutConversationInput | MessageCreateOrConnectWithoutConversationInput[]
    upsert?: MessageUpsertWithWhereUniqueWithoutConversationInput | MessageUpsertWithWhereUniqueWithoutConversationInput[]
    createMany?: MessageCreateManyConversationInputEnvelope
    set?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
    disconnect?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
    delete?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
    connect?: MessageWhereUniqueInput | MessageWhereUniqueInput[]
    update?: MessageUpdateWithWhereUniqueWithoutConversationInput | MessageUpdateWithWhereUniqueWithoutConversationInput[]
    updateMany?: MessageUpdateManyWithWhereWithoutConversationInput | MessageUpdateManyWithWhereWithoutConversationInput[]
    deleteMany?: MessageScalarWhereInput | MessageScalarWhereInput[]
  }

  export type ConversationCreateNestedOneWithoutMessagesInput = {
    create?: XOR<ConversationCreateWithoutMessagesInput, ConversationUncheckedCreateWithoutMessagesInput>
    connectOrCreate?: ConversationCreateOrConnectWithoutMessagesInput
    connect?: ConversationWhereUniqueInput
  }

  export type BoolFieldUpdateOperationsInput = {
    set?: boolean
  }

  export type ConversationUpdateOneRequiredWithoutMessagesNestedInput = {
    create?: XOR<ConversationCreateWithoutMessagesInput, ConversationUncheckedCreateWithoutMessagesInput>
    connectOrCreate?: ConversationCreateOrConnectWithoutMessagesInput
    upsert?: ConversationUpsertWithoutMessagesInput
    connect?: ConversationWhereUniqueInput
    update?: XOR<XOR<ConversationUpdateToOneWithWhereWithoutMessagesInput, ConversationUpdateWithoutMessagesInput>, ConversationUncheckedUpdateWithoutMessagesInput>
  }

  export type EnumTransactionNetworkFieldUpdateOperationsInput = {
    set?: $Enums.TransactionNetwork
  }

  export type UserProductCreateNestedManyWithoutProductInput = {
    create?: XOR<UserProductCreateWithoutProductInput, UserProductUncheckedCreateWithoutProductInput> | UserProductCreateWithoutProductInput[] | UserProductUncheckedCreateWithoutProductInput[]
    connectOrCreate?: UserProductCreateOrConnectWithoutProductInput | UserProductCreateOrConnectWithoutProductInput[]
    createMany?: UserProductCreateManyProductInputEnvelope
    connect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
  }

  export type UserProductUncheckedCreateNestedManyWithoutProductInput = {
    create?: XOR<UserProductCreateWithoutProductInput, UserProductUncheckedCreateWithoutProductInput> | UserProductCreateWithoutProductInput[] | UserProductUncheckedCreateWithoutProductInput[]
    connectOrCreate?: UserProductCreateOrConnectWithoutProductInput | UserProductCreateOrConnectWithoutProductInput[]
    createMany?: UserProductCreateManyProductInputEnvelope
    connect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
  }

  export type UserProductUpdateManyWithoutProductNestedInput = {
    create?: XOR<UserProductCreateWithoutProductInput, UserProductUncheckedCreateWithoutProductInput> | UserProductCreateWithoutProductInput[] | UserProductUncheckedCreateWithoutProductInput[]
    connectOrCreate?: UserProductCreateOrConnectWithoutProductInput | UserProductCreateOrConnectWithoutProductInput[]
    upsert?: UserProductUpsertWithWhereUniqueWithoutProductInput | UserProductUpsertWithWhereUniqueWithoutProductInput[]
    createMany?: UserProductCreateManyProductInputEnvelope
    set?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    disconnect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    delete?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    connect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    update?: UserProductUpdateWithWhereUniqueWithoutProductInput | UserProductUpdateWithWhereUniqueWithoutProductInput[]
    updateMany?: UserProductUpdateManyWithWhereWithoutProductInput | UserProductUpdateManyWithWhereWithoutProductInput[]
    deleteMany?: UserProductScalarWhereInput | UserProductScalarWhereInput[]
  }

  export type UserProductUncheckedUpdateManyWithoutProductNestedInput = {
    create?: XOR<UserProductCreateWithoutProductInput, UserProductUncheckedCreateWithoutProductInput> | UserProductCreateWithoutProductInput[] | UserProductUncheckedCreateWithoutProductInput[]
    connectOrCreate?: UserProductCreateOrConnectWithoutProductInput | UserProductCreateOrConnectWithoutProductInput[]
    upsert?: UserProductUpsertWithWhereUniqueWithoutProductInput | UserProductUpsertWithWhereUniqueWithoutProductInput[]
    createMany?: UserProductCreateManyProductInputEnvelope
    set?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    disconnect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    delete?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    connect?: UserProductWhereUniqueInput | UserProductWhereUniqueInput[]
    update?: UserProductUpdateWithWhereUniqueWithoutProductInput | UserProductUpdateWithWhereUniqueWithoutProductInput[]
    updateMany?: UserProductUpdateManyWithWhereWithoutProductInput | UserProductUpdateManyWithWhereWithoutProductInput[]
    deleteMany?: UserProductScalarWhereInput | UserProductScalarWhereInput[]
  }

  export type TelegramUserCreateNestedOneWithoutUserProductsInput = {
    create?: XOR<TelegramUserCreateWithoutUserProductsInput, TelegramUserUncheckedCreateWithoutUserProductsInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutUserProductsInput
    connect?: TelegramUserWhereUniqueInput
  }

  export type ProductCreateNestedOneWithoutUserProductsInput = {
    create?: XOR<ProductCreateWithoutUserProductsInput, ProductUncheckedCreateWithoutUserProductsInput>
    connectOrCreate?: ProductCreateOrConnectWithoutUserProductsInput
    connect?: ProductWhereUniqueInput
  }

  export type EnumChallengeStatusFieldUpdateOperationsInput = {
    set?: $Enums.ChallengeStatus
  }

  export type TelegramUserUpdateOneRequiredWithoutUserProductsNestedInput = {
    create?: XOR<TelegramUserCreateWithoutUserProductsInput, TelegramUserUncheckedCreateWithoutUserProductsInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutUserProductsInput
    upsert?: TelegramUserUpsertWithoutUserProductsInput
    connect?: TelegramUserWhereUniqueInput
    update?: XOR<XOR<TelegramUserUpdateToOneWithWhereWithoutUserProductsInput, TelegramUserUpdateWithoutUserProductsInput>, TelegramUserUncheckedUpdateWithoutUserProductsInput>
  }

  export type ProductUpdateOneRequiredWithoutUserProductsNestedInput = {
    create?: XOR<ProductCreateWithoutUserProductsInput, ProductUncheckedCreateWithoutUserProductsInput>
    connectOrCreate?: ProductCreateOrConnectWithoutUserProductsInput
    upsert?: ProductUpsertWithoutUserProductsInput
    connect?: ProductWhereUniqueInput
    update?: XOR<XOR<ProductUpdateToOneWithWhereWithoutUserProductsInput, ProductUpdateWithoutUserProductsInput>, ProductUncheckedUpdateWithoutUserProductsInput>
  }

  export type TelegramUserCreateNestedOneWithoutUserTransactionsInput = {
    create?: XOR<TelegramUserCreateWithoutUserTransactionsInput, TelegramUserUncheckedCreateWithoutUserTransactionsInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutUserTransactionsInput
    connect?: TelegramUserWhereUniqueInput
  }

  export type EnumTransactionStatusFieldUpdateOperationsInput = {
    set?: $Enums.TransactionStatus
  }

  export type TelegramUserUpdateOneRequiredWithoutUserTransactionsNestedInput = {
    create?: XOR<TelegramUserCreateWithoutUserTransactionsInput, TelegramUserUncheckedCreateWithoutUserTransactionsInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutUserTransactionsInput
    upsert?: TelegramUserUpsertWithoutUserTransactionsInput
    connect?: TelegramUserWhereUniqueInput
    update?: XOR<XOR<TelegramUserUpdateToOneWithWhereWithoutUserTransactionsInput, TelegramUserUpdateWithoutUserTransactionsInput>, TelegramUserUncheckedUpdateWithoutUserTransactionsInput>
  }

  export type TelegramUserCreateNestedOneWithoutUserBotStatesInput = {
    create?: XOR<TelegramUserCreateWithoutUserBotStatesInput, TelegramUserUncheckedCreateWithoutUserBotStatesInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutUserBotStatesInput
    connect?: TelegramUserWhereUniqueInput
  }

  export type NullableIntFieldUpdateOperationsInput = {
    set?: number | null
    increment?: number
    decrement?: number
    multiply?: number
    divide?: number
  }

  export type TelegramUserUpdateOneRequiredWithoutUserBotStatesNestedInput = {
    create?: XOR<TelegramUserCreateWithoutUserBotStatesInput, TelegramUserUncheckedCreateWithoutUserBotStatesInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutUserBotStatesInput
    upsert?: TelegramUserUpsertWithoutUserBotStatesInput
    connect?: TelegramUserWhereUniqueInput
    update?: XOR<XOR<TelegramUserUpdateToOneWithWhereWithoutUserBotStatesInput, TelegramUserUpdateWithoutUserBotStatesInput>, TelegramUserUncheckedUpdateWithoutUserBotStatesInput>
  }

  export type TelegramUserCreateNestedOneWithoutUserTicketInput = {
    create?: XOR<TelegramUserCreateWithoutUserTicketInput, TelegramUserUncheckedCreateWithoutUserTicketInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutUserTicketInput
    connect?: TelegramUserWhereUniqueInput
  }

  export type TelegramUserUpdateOneRequiredWithoutUserTicketNestedInput = {
    create?: XOR<TelegramUserCreateWithoutUserTicketInput, TelegramUserUncheckedCreateWithoutUserTicketInput>
    connectOrCreate?: TelegramUserCreateOrConnectWithoutUserTicketInput
    upsert?: TelegramUserUpsertWithoutUserTicketInput
    connect?: TelegramUserWhereUniqueInput
    update?: XOR<XOR<TelegramUserUpdateToOneWithWhereWithoutUserTicketInput, TelegramUserUpdateWithoutUserTicketInput>, TelegramUserUncheckedUpdateWithoutUserTicketInput>
  }

  export type NestedIntFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel>
    in?: number[] | ListIntFieldRefInput<$PrismaModel>
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntFilter<$PrismaModel> | number
  }

  export type NestedDateTimeFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    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[] | ListIntFieldRefInput<$PrismaModel>
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel>
    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[] | ListFloatFieldRefInput<$PrismaModel>
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatFilter<$PrismaModel> | number
  }
  export type NestedJsonFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
        Required<NestedJsonFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>

  export type NestedJsonFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>
    in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>
    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 NestedStringFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[] | ListStringFieldRefInput<$PrismaModel>
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
    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 NestedStringWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel>
    in?: string[] | ListStringFieldRefInput<$PrismaModel>
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel>
    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 NestedStringNullableFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | 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 NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: string | StringFieldRefInput<$PrismaModel> | null
    in?: string[] | ListStringFieldRefInput<$PrismaModel> | null
    notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | 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[] | ListIntFieldRefInput<$PrismaModel> | null
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntNullableFilter<$PrismaModel> | number | null
  }

  export type NestedEnumRespondentTypeFilter<$PrismaModel = never> = {
    equals?: $Enums.RespondentType | EnumRespondentTypeFieldRefInput<$PrismaModel>
    in?: $Enums.RespondentType[] | ListEnumRespondentTypeFieldRefInput<$PrismaModel>
    notIn?: $Enums.RespondentType[] | ListEnumRespondentTypeFieldRefInput<$PrismaModel>
    not?: NestedEnumRespondentTypeFilter<$PrismaModel> | $Enums.RespondentType
  }

  export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel>
    in?: number[] | ListFloatFieldRefInput<$PrismaModel>
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>
    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 NestedEnumRespondentTypeWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.RespondentType | EnumRespondentTypeFieldRefInput<$PrismaModel>
    in?: $Enums.RespondentType[] | ListEnumRespondentTypeFieldRefInput<$PrismaModel>
    notIn?: $Enums.RespondentType[] | ListEnumRespondentTypeFieldRefInput<$PrismaModel>
    not?: NestedEnumRespondentTypeWithAggregatesFilter<$PrismaModel> | $Enums.RespondentType
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumRespondentTypeFilter<$PrismaModel>
    _max?: NestedEnumRespondentTypeFilter<$PrismaModel>
  }

  export type NestedBoolFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolFilter<$PrismaModel> | boolean
  }

  export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
    equals?: boolean | BooleanFieldRefInput<$PrismaModel>
    not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedBoolFilter<$PrismaModel>
    _max?: NestedBoolFilter<$PrismaModel>
  }

  export type NestedEnumTransactionNetworkFilter<$PrismaModel = never> = {
    equals?: $Enums.TransactionNetwork | EnumTransactionNetworkFieldRefInput<$PrismaModel>
    in?: $Enums.TransactionNetwork[] | ListEnumTransactionNetworkFieldRefInput<$PrismaModel>
    notIn?: $Enums.TransactionNetwork[] | ListEnumTransactionNetworkFieldRefInput<$PrismaModel>
    not?: NestedEnumTransactionNetworkFilter<$PrismaModel> | $Enums.TransactionNetwork
  }

  export type NestedEnumTransactionNetworkWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.TransactionNetwork | EnumTransactionNetworkFieldRefInput<$PrismaModel>
    in?: $Enums.TransactionNetwork[] | ListEnumTransactionNetworkFieldRefInput<$PrismaModel>
    notIn?: $Enums.TransactionNetwork[] | ListEnumTransactionNetworkFieldRefInput<$PrismaModel>
    not?: NestedEnumTransactionNetworkWithAggregatesFilter<$PrismaModel> | $Enums.TransactionNetwork
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumTransactionNetworkFilter<$PrismaModel>
    _max?: NestedEnumTransactionNetworkFilter<$PrismaModel>
  }

  export type NestedEnumChallengeStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.ChallengeStatus | EnumChallengeStatusFieldRefInput<$PrismaModel>
    in?: $Enums.ChallengeStatus[] | ListEnumChallengeStatusFieldRefInput<$PrismaModel>
    notIn?: $Enums.ChallengeStatus[] | ListEnumChallengeStatusFieldRefInput<$PrismaModel>
    not?: NestedEnumChallengeStatusFilter<$PrismaModel> | $Enums.ChallengeStatus
  }

  export type NestedEnumChallengeStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.ChallengeStatus | EnumChallengeStatusFieldRefInput<$PrismaModel>
    in?: $Enums.ChallengeStatus[] | ListEnumChallengeStatusFieldRefInput<$PrismaModel>
    notIn?: $Enums.ChallengeStatus[] | ListEnumChallengeStatusFieldRefInput<$PrismaModel>
    not?: NestedEnumChallengeStatusWithAggregatesFilter<$PrismaModel> | $Enums.ChallengeStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumChallengeStatusFilter<$PrismaModel>
    _max?: NestedEnumChallengeStatusFilter<$PrismaModel>
  }

  export type NestedEnumTransactionStatusFilter<$PrismaModel = never> = {
    equals?: $Enums.TransactionStatus | EnumTransactionStatusFieldRefInput<$PrismaModel>
    in?: $Enums.TransactionStatus[] | ListEnumTransactionStatusFieldRefInput<$PrismaModel>
    notIn?: $Enums.TransactionStatus[] | ListEnumTransactionStatusFieldRefInput<$PrismaModel>
    not?: NestedEnumTransactionStatusFilter<$PrismaModel> | $Enums.TransactionStatus
  }

  export type NestedEnumTransactionStatusWithAggregatesFilter<$PrismaModel = never> = {
    equals?: $Enums.TransactionStatus | EnumTransactionStatusFieldRefInput<$PrismaModel>
    in?: $Enums.TransactionStatus[] | ListEnumTransactionStatusFieldRefInput<$PrismaModel>
    notIn?: $Enums.TransactionStatus[] | ListEnumTransactionStatusFieldRefInput<$PrismaModel>
    not?: NestedEnumTransactionStatusWithAggregatesFilter<$PrismaModel> | $Enums.TransactionStatus
    _count?: NestedIntFilter<$PrismaModel>
    _min?: NestedEnumTransactionStatusFilter<$PrismaModel>
    _max?: NestedEnumTransactionStatusFilter<$PrismaModel>
  }

  export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
    equals?: number | IntFieldRefInput<$PrismaModel> | null
    in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
    lt?: number | IntFieldRefInput<$PrismaModel>
    lte?: number | IntFieldRefInput<$PrismaModel>
    gt?: number | IntFieldRefInput<$PrismaModel>
    gte?: number | IntFieldRefInput<$PrismaModel>
    not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
    _count?: NestedIntNullableFilter<$PrismaModel>
    _avg?: NestedFloatNullableFilter<$PrismaModel>
    _sum?: NestedIntNullableFilter<$PrismaModel>
    _min?: NestedIntNullableFilter<$PrismaModel>
    _max?: NestedIntNullableFilter<$PrismaModel>
  }

  export type NestedFloatNullableFilter<$PrismaModel = never> = {
    equals?: number | FloatFieldRefInput<$PrismaModel> | null
    in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
    notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
    lt?: number | FloatFieldRefInput<$PrismaModel>
    lte?: number | FloatFieldRefInput<$PrismaModel>
    gt?: number | FloatFieldRefInput<$PrismaModel>
    gte?: number | FloatFieldRefInput<$PrismaModel>
    not?: NestedFloatNullableFilter<$PrismaModel> | number | null
  }
  export type NestedJsonNullableFilter<$PrismaModel = never> =
    | PatchUndefined<
        Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
        Required<NestedJsonNullableFilterBase<$PrismaModel>>
      >
    | OptionalFlat<Omit<Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>

  export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
    equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
    path?: string[]
    mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
    string_contains?: string | StringFieldRefInput<$PrismaModel>
    string_starts_with?: string | StringFieldRefInput<$PrismaModel>
    string_ends_with?: string | StringFieldRefInput<$PrismaModel>
    array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
    lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
    not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
  }

  export type ConversationCreateWithoutTelegramUserInput = {
    id?: string
    telegramChatId: string
    title?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    messages?: MessageCreateNestedManyWithoutConversationInput
  }

  export type ConversationUncheckedCreateWithoutTelegramUserInput = {
    id?: string
    telegramChatId: string
    title?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    messages?: MessageUncheckedCreateNestedManyWithoutConversationInput
  }

  export type ConversationCreateOrConnectWithoutTelegramUserInput = {
    where: ConversationWhereUniqueInput
    create: XOR<ConversationCreateWithoutTelegramUserInput, ConversationUncheckedCreateWithoutTelegramUserInput>
  }

  export type ConversationCreateManyTelegramUserInputEnvelope = {
    data: ConversationCreateManyTelegramUserInput | ConversationCreateManyTelegramUserInput[]
    skipDuplicates?: boolean
  }

  export type UserProductCreateWithoutUserInput = {
    id?: string
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
    product: ProductCreateNestedOneWithoutUserProductsInput
  }

  export type UserProductUncheckedCreateWithoutUserInput = {
    id?: string
    productId: number
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserProductCreateOrConnectWithoutUserInput = {
    where: UserProductWhereUniqueInput
    create: XOR<UserProductCreateWithoutUserInput, UserProductUncheckedCreateWithoutUserInput>
  }

  export type UserProductCreateManyUserInputEnvelope = {
    data: UserProductCreateManyUserInput | UserProductCreateManyUserInput[]
    skipDuplicates?: boolean
  }

  export type UserTransactionCreateWithoutTelegramUserInput = {
    id?: string
    transactionHash: string
    network: $Enums.TransactionNetwork
    value: number
    status?: $Enums.TransactionStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTransactionUncheckedCreateWithoutTelegramUserInput = {
    id?: string
    transactionHash: string
    network: $Enums.TransactionNetwork
    value: number
    status?: $Enums.TransactionStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTransactionCreateOrConnectWithoutTelegramUserInput = {
    where: UserTransactionWhereUniqueInput
    create: XOR<UserTransactionCreateWithoutTelegramUserInput, UserTransactionUncheckedCreateWithoutTelegramUserInput>
  }

  export type UserTransactionCreateManyTelegramUserInputEnvelope = {
    data: UserTransactionCreateManyTelegramUserInput | UserTransactionCreateManyTelegramUserInput[]
    skipDuplicates?: boolean
  }

  export type UserBotStateCreateWithoutTelegramUserInput = {
    id?: string
    state?: string
    selectedProductId?: number | null
    selectedNetwork?: string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserBotStateUncheckedCreateWithoutTelegramUserInput = {
    id?: string
    state?: string
    selectedProductId?: number | null
    selectedNetwork?: string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserBotStateCreateOrConnectWithoutTelegramUserInput = {
    where: UserBotStateWhereUniqueInput
    create: XOR<UserBotStateCreateWithoutTelegramUserInput, UserBotStateUncheckedCreateWithoutTelegramUserInput>
  }

  export type UserBotStateCreateManyTelegramUserInputEnvelope = {
    data: UserBotStateCreateManyTelegramUserInput | UserBotStateCreateManyTelegramUserInput[]
    skipDuplicates?: boolean
  }

  export type UserTicketCreateWithoutTelegramUserInput = {
    id?: string
    content: string
    checked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTicketUncheckedCreateWithoutTelegramUserInput = {
    id?: string
    content: string
    checked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTicketCreateOrConnectWithoutTelegramUserInput = {
    where: UserTicketWhereUniqueInput
    create: XOR<UserTicketCreateWithoutTelegramUserInput, UserTicketUncheckedCreateWithoutTelegramUserInput>
  }

  export type UserTicketCreateManyTelegramUserInputEnvelope = {
    data: UserTicketCreateManyTelegramUserInput | UserTicketCreateManyTelegramUserInput[]
    skipDuplicates?: boolean
  }

  export type ConversationUpsertWithWhereUniqueWithoutTelegramUserInput = {
    where: ConversationWhereUniqueInput
    update: XOR<ConversationUpdateWithoutTelegramUserInput, ConversationUncheckedUpdateWithoutTelegramUserInput>
    create: XOR<ConversationCreateWithoutTelegramUserInput, ConversationUncheckedCreateWithoutTelegramUserInput>
  }

  export type ConversationUpdateWithWhereUniqueWithoutTelegramUserInput = {
    where: ConversationWhereUniqueInput
    data: XOR<ConversationUpdateWithoutTelegramUserInput, ConversationUncheckedUpdateWithoutTelegramUserInput>
  }

  export type ConversationUpdateManyWithWhereWithoutTelegramUserInput = {
    where: ConversationScalarWhereInput
    data: XOR<ConversationUpdateManyMutationInput, ConversationUncheckedUpdateManyWithoutTelegramUserInput>
  }

  export type ConversationScalarWhereInput = {
    AND?: ConversationScalarWhereInput | ConversationScalarWhereInput[]
    OR?: ConversationScalarWhereInput[]
    NOT?: ConversationScalarWhereInput | ConversationScalarWhereInput[]
    id?: StringFilter<"Conversation"> | string
    telegramUserId?: StringFilter<"Conversation"> | string
    telegramChatId?: StringFilter<"Conversation"> | string
    title?: StringNullableFilter<"Conversation"> | string | null
    createdAt?: DateTimeFilter<"Conversation"> | Date | string
    updatedAt?: DateTimeFilter<"Conversation"> | Date | string
  }

  export type UserProductUpsertWithWhereUniqueWithoutUserInput = {
    where: UserProductWhereUniqueInput
    update: XOR<UserProductUpdateWithoutUserInput, UserProductUncheckedUpdateWithoutUserInput>
    create: XOR<UserProductCreateWithoutUserInput, UserProductUncheckedCreateWithoutUserInput>
  }

  export type UserProductUpdateWithWhereUniqueWithoutUserInput = {
    where: UserProductWhereUniqueInput
    data: XOR<UserProductUpdateWithoutUserInput, UserProductUncheckedUpdateWithoutUserInput>
  }

  export type UserProductUpdateManyWithWhereWithoutUserInput = {
    where: UserProductScalarWhereInput
    data: XOR<UserProductUpdateManyMutationInput, UserProductUncheckedUpdateManyWithoutUserInput>
  }

  export type UserProductScalarWhereInput = {
    AND?: UserProductScalarWhereInput | UserProductScalarWhereInput[]
    OR?: UserProductScalarWhereInput[]
    NOT?: UserProductScalarWhereInput | UserProductScalarWhereInput[]
    id?: StringFilter<"UserProduct"> | string
    userId?: StringFilter<"UserProduct"> | string
    productId?: IntFilter<"UserProduct"> | number
    challengeStatus?: EnumChallengeStatusFilter<"UserProduct"> | $Enums.ChallengeStatus
    createdAt?: DateTimeFilter<"UserProduct"> | Date | string
    updatedAt?: DateTimeFilter<"UserProduct"> | Date | string
  }

  export type UserTransactionUpsertWithWhereUniqueWithoutTelegramUserInput = {
    where: UserTransactionWhereUniqueInput
    update: XOR<UserTransactionUpdateWithoutTelegramUserInput, UserTransactionUncheckedUpdateWithoutTelegramUserInput>
    create: XOR<UserTransactionCreateWithoutTelegramUserInput, UserTransactionUncheckedCreateWithoutTelegramUserInput>
  }

  export type UserTransactionUpdateWithWhereUniqueWithoutTelegramUserInput = {
    where: UserTransactionWhereUniqueInput
    data: XOR<UserTransactionUpdateWithoutTelegramUserInput, UserTransactionUncheckedUpdateWithoutTelegramUserInput>
  }

  export type UserTransactionUpdateManyWithWhereWithoutTelegramUserInput = {
    where: UserTransactionScalarWhereInput
    data: XOR<UserTransactionUpdateManyMutationInput, UserTransactionUncheckedUpdateManyWithoutTelegramUserInput>
  }

  export type UserTransactionScalarWhereInput = {
    AND?: UserTransactionScalarWhereInput | UserTransactionScalarWhereInput[]
    OR?: UserTransactionScalarWhereInput[]
    NOT?: UserTransactionScalarWhereInput | UserTransactionScalarWhereInput[]
    id?: StringFilter<"UserTransaction"> | string
    telegramUserId?: StringFilter<"UserTransaction"> | string
    transactionHash?: StringFilter<"UserTransaction"> | string
    network?: EnumTransactionNetworkFilter<"UserTransaction"> | $Enums.TransactionNetwork
    value?: FloatFilter<"UserTransaction"> | number
    status?: EnumTransactionStatusFilter<"UserTransaction"> | $Enums.TransactionStatus
    createdAt?: DateTimeFilter<"UserTransaction"> | Date | string
    updatedAt?: DateTimeFilter<"UserTransaction"> | Date | string
  }

  export type UserBotStateUpsertWithWhereUniqueWithoutTelegramUserInput = {
    where: UserBotStateWhereUniqueInput
    update: XOR<UserBotStateUpdateWithoutTelegramUserInput, UserBotStateUncheckedUpdateWithoutTelegramUserInput>
    create: XOR<UserBotStateCreateWithoutTelegramUserInput, UserBotStateUncheckedCreateWithoutTelegramUserInput>
  }

  export type UserBotStateUpdateWithWhereUniqueWithoutTelegramUserInput = {
    where: UserBotStateWhereUniqueInput
    data: XOR<UserBotStateUpdateWithoutTelegramUserInput, UserBotStateUncheckedUpdateWithoutTelegramUserInput>
  }

  export type UserBotStateUpdateManyWithWhereWithoutTelegramUserInput = {
    where: UserBotStateScalarWhereInput
    data: XOR<UserBotStateUpdateManyMutationInput, UserBotStateUncheckedUpdateManyWithoutTelegramUserInput>
  }

  export type UserBotStateScalarWhereInput = {
    AND?: UserBotStateScalarWhereInput | UserBotStateScalarWhereInput[]
    OR?: UserBotStateScalarWhereInput[]
    NOT?: UserBotStateScalarWhereInput | UserBotStateScalarWhereInput[]
    id?: StringFilter<"UserBotState"> | string
    telegramUserId?: StringFilter<"UserBotState"> | string
    state?: StringFilter<"UserBotState"> | string
    selectedProductId?: IntNullableFilter<"UserBotState"> | number | null
    selectedNetwork?: StringNullableFilter<"UserBotState"> | string | null
    additionalData?: JsonNullableFilter<"UserBotState">
    createdAt?: DateTimeFilter<"UserBotState"> | Date | string
    updatedAt?: DateTimeFilter<"UserBotState"> | Date | string
  }

  export type UserTicketUpsertWithWhereUniqueWithoutTelegramUserInput = {
    where: UserTicketWhereUniqueInput
    update: XOR<UserTicketUpdateWithoutTelegramUserInput, UserTicketUncheckedUpdateWithoutTelegramUserInput>
    create: XOR<UserTicketCreateWithoutTelegramUserInput, UserTicketUncheckedCreateWithoutTelegramUserInput>
  }

  export type UserTicketUpdateWithWhereUniqueWithoutTelegramUserInput = {
    where: UserTicketWhereUniqueInput
    data: XOR<UserTicketUpdateWithoutTelegramUserInput, UserTicketUncheckedUpdateWithoutTelegramUserInput>
  }

  export type UserTicketUpdateManyWithWhereWithoutTelegramUserInput = {
    where: UserTicketScalarWhereInput
    data: XOR<UserTicketUpdateManyMutationInput, UserTicketUncheckedUpdateManyWithoutTelegramUserInput>
  }

  export type UserTicketScalarWhereInput = {
    AND?: UserTicketScalarWhereInput | UserTicketScalarWhereInput[]
    OR?: UserTicketScalarWhereInput[]
    NOT?: UserTicketScalarWhereInput | UserTicketScalarWhereInput[]
    id?: StringFilter<"UserTicket"> | string
    telegramUserId?: StringFilter<"UserTicket"> | string
    content?: StringFilter<"UserTicket"> | string
    checked?: BoolFilter<"UserTicket"> | boolean
    createdAt?: DateTimeFilter<"UserTicket"> | Date | string
    updatedAt?: DateTimeFilter<"UserTicket"> | Date | string
  }

  export type TelegramUserCreateWithoutConversationsInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    userProducts?: UserProductCreateNestedManyWithoutUserInput
    userTransactions?: UserTransactionCreateNestedManyWithoutTelegramUserInput
    UserBotStates?: UserBotStateCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserUncheckedCreateWithoutConversationsInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    userProducts?: UserProductUncheckedCreateNestedManyWithoutUserInput
    userTransactions?: UserTransactionUncheckedCreateNestedManyWithoutTelegramUserInput
    UserBotStates?: UserBotStateUncheckedCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketUncheckedCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserCreateOrConnectWithoutConversationsInput = {
    where: TelegramUserWhereUniqueInput
    create: XOR<TelegramUserCreateWithoutConversationsInput, TelegramUserUncheckedCreateWithoutConversationsInput>
  }

  export type MessageCreateWithoutConversationInput = {
    id?: string
    role: string
    content: string
    isRead?: boolean
    createdAt?: Date | string
  }

  export type MessageUncheckedCreateWithoutConversationInput = {
    id?: string
    role: string
    content: string
    isRead?: boolean
    createdAt?: Date | string
  }

  export type MessageCreateOrConnectWithoutConversationInput = {
    where: MessageWhereUniqueInput
    create: XOR<MessageCreateWithoutConversationInput, MessageUncheckedCreateWithoutConversationInput>
  }

  export type MessageCreateManyConversationInputEnvelope = {
    data: MessageCreateManyConversationInput | MessageCreateManyConversationInput[]
    skipDuplicates?: boolean
  }

  export type TelegramUserUpsertWithoutConversationsInput = {
    update: XOR<TelegramUserUpdateWithoutConversationsInput, TelegramUserUncheckedUpdateWithoutConversationsInput>
    create: XOR<TelegramUserCreateWithoutConversationsInput, TelegramUserUncheckedCreateWithoutConversationsInput>
    where?: TelegramUserWhereInput
  }

  export type TelegramUserUpdateToOneWithWhereWithoutConversationsInput = {
    where?: TelegramUserWhereInput
    data: XOR<TelegramUserUpdateWithoutConversationsInput, TelegramUserUncheckedUpdateWithoutConversationsInput>
  }

  export type TelegramUserUpdateWithoutConversationsInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    userProducts?: UserProductUpdateManyWithoutUserNestedInput
    userTransactions?: UserTransactionUpdateManyWithoutTelegramUserNestedInput
    UserBotStates?: UserBotStateUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserUncheckedUpdateWithoutConversationsInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    userProducts?: UserProductUncheckedUpdateManyWithoutUserNestedInput
    userTransactions?: UserTransactionUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserBotStates?: UserBotStateUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUncheckedUpdateManyWithoutTelegramUserNestedInput
  }

  export type MessageUpsertWithWhereUniqueWithoutConversationInput = {
    where: MessageWhereUniqueInput
    update: XOR<MessageUpdateWithoutConversationInput, MessageUncheckedUpdateWithoutConversationInput>
    create: XOR<MessageCreateWithoutConversationInput, MessageUncheckedCreateWithoutConversationInput>
  }

  export type MessageUpdateWithWhereUniqueWithoutConversationInput = {
    where: MessageWhereUniqueInput
    data: XOR<MessageUpdateWithoutConversationInput, MessageUncheckedUpdateWithoutConversationInput>
  }

  export type MessageUpdateManyWithWhereWithoutConversationInput = {
    where: MessageScalarWhereInput
    data: XOR<MessageUpdateManyMutationInput, MessageUncheckedUpdateManyWithoutConversationInput>
  }

  export type MessageScalarWhereInput = {
    AND?: MessageScalarWhereInput | MessageScalarWhereInput[]
    OR?: MessageScalarWhereInput[]
    NOT?: MessageScalarWhereInput | MessageScalarWhereInput[]
    id?: StringFilter<"Message"> | string
    role?: StringFilter<"Message"> | string
    content?: StringFilter<"Message"> | string
    conversationId?: StringFilter<"Message"> | string
    isRead?: BoolFilter<"Message"> | boolean
    createdAt?: DateTimeFilter<"Message"> | Date | string
  }

  export type ConversationCreateWithoutMessagesInput = {
    id?: string
    telegramChatId: string
    title?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
    telegramUser: TelegramUserCreateNestedOneWithoutConversationsInput
  }

  export type ConversationUncheckedCreateWithoutMessagesInput = {
    id?: string
    telegramUserId: string
    telegramChatId: string
    title?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ConversationCreateOrConnectWithoutMessagesInput = {
    where: ConversationWhereUniqueInput
    create: XOR<ConversationCreateWithoutMessagesInput, ConversationUncheckedCreateWithoutMessagesInput>
  }

  export type ConversationUpsertWithoutMessagesInput = {
    update: XOR<ConversationUpdateWithoutMessagesInput, ConversationUncheckedUpdateWithoutMessagesInput>
    create: XOR<ConversationCreateWithoutMessagesInput, ConversationUncheckedCreateWithoutMessagesInput>
    where?: ConversationWhereInput
  }

  export type ConversationUpdateToOneWithWhereWithoutMessagesInput = {
    where?: ConversationWhereInput
    data: XOR<ConversationUpdateWithoutMessagesInput, ConversationUncheckedUpdateWithoutMessagesInput>
  }

  export type ConversationUpdateWithoutMessagesInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    telegramUser?: TelegramUserUpdateOneRequiredWithoutConversationsNestedInput
  }

  export type ConversationUncheckedUpdateWithoutMessagesInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramUserId?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserProductCreateWithoutProductInput = {
    id?: string
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
    user: TelegramUserCreateNestedOneWithoutUserProductsInput
  }

  export type UserProductUncheckedCreateWithoutProductInput = {
    id?: string
    userId: string
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserProductCreateOrConnectWithoutProductInput = {
    where: UserProductWhereUniqueInput
    create: XOR<UserProductCreateWithoutProductInput, UserProductUncheckedCreateWithoutProductInput>
  }

  export type UserProductCreateManyProductInputEnvelope = {
    data: UserProductCreateManyProductInput | UserProductCreateManyProductInput[]
    skipDuplicates?: boolean
  }

  export type UserProductUpsertWithWhereUniqueWithoutProductInput = {
    where: UserProductWhereUniqueInput
    update: XOR<UserProductUpdateWithoutProductInput, UserProductUncheckedUpdateWithoutProductInput>
    create: XOR<UserProductCreateWithoutProductInput, UserProductUncheckedCreateWithoutProductInput>
  }

  export type UserProductUpdateWithWhereUniqueWithoutProductInput = {
    where: UserProductWhereUniqueInput
    data: XOR<UserProductUpdateWithoutProductInput, UserProductUncheckedUpdateWithoutProductInput>
  }

  export type UserProductUpdateManyWithWhereWithoutProductInput = {
    where: UserProductScalarWhereInput
    data: XOR<UserProductUpdateManyMutationInput, UserProductUncheckedUpdateManyWithoutProductInput>
  }

  export type TelegramUserCreateWithoutUserProductsInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationCreateNestedManyWithoutTelegramUserInput
    userTransactions?: UserTransactionCreateNestedManyWithoutTelegramUserInput
    UserBotStates?: UserBotStateCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserUncheckedCreateWithoutUserProductsInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationUncheckedCreateNestedManyWithoutTelegramUserInput
    userTransactions?: UserTransactionUncheckedCreateNestedManyWithoutTelegramUserInput
    UserBotStates?: UserBotStateUncheckedCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketUncheckedCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserCreateOrConnectWithoutUserProductsInput = {
    where: TelegramUserWhereUniqueInput
    create: XOR<TelegramUserCreateWithoutUserProductsInput, TelegramUserUncheckedCreateWithoutUserProductsInput>
  }

  export type ProductCreateWithoutUserProductsInput = {
    plan: string
    description?: string | null
    price: number
    firm: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ProductUncheckedCreateWithoutUserProductsInput = {
    id?: number
    plan: string
    description?: string | null
    price: number
    firm: string
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ProductCreateOrConnectWithoutUserProductsInput = {
    where: ProductWhereUniqueInput
    create: XOR<ProductCreateWithoutUserProductsInput, ProductUncheckedCreateWithoutUserProductsInput>
  }

  export type TelegramUserUpsertWithoutUserProductsInput = {
    update: XOR<TelegramUserUpdateWithoutUserProductsInput, TelegramUserUncheckedUpdateWithoutUserProductsInput>
    create: XOR<TelegramUserCreateWithoutUserProductsInput, TelegramUserUncheckedCreateWithoutUserProductsInput>
    where?: TelegramUserWhereInput
  }

  export type TelegramUserUpdateToOneWithWhereWithoutUserProductsInput = {
    where?: TelegramUserWhereInput
    data: XOR<TelegramUserUpdateWithoutUserProductsInput, TelegramUserUncheckedUpdateWithoutUserProductsInput>
  }

  export type TelegramUserUpdateWithoutUserProductsInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUpdateManyWithoutTelegramUserNestedInput
    userTransactions?: UserTransactionUpdateManyWithoutTelegramUserNestedInput
    UserBotStates?: UserBotStateUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserUncheckedUpdateWithoutUserProductsInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUncheckedUpdateManyWithoutTelegramUserNestedInput
    userTransactions?: UserTransactionUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserBotStates?: UserBotStateUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUncheckedUpdateManyWithoutTelegramUserNestedInput
  }

  export type ProductUpsertWithoutUserProductsInput = {
    update: XOR<ProductUpdateWithoutUserProductsInput, ProductUncheckedUpdateWithoutUserProductsInput>
    create: XOR<ProductCreateWithoutUserProductsInput, ProductUncheckedCreateWithoutUserProductsInput>
    where?: ProductWhereInput
  }

  export type ProductUpdateToOneWithWhereWithoutUserProductsInput = {
    where?: ProductWhereInput
    data: XOR<ProductUpdateWithoutUserProductsInput, ProductUncheckedUpdateWithoutUserProductsInput>
  }

  export type ProductUpdateWithoutUserProductsInput = {
    plan?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    price?: FloatFieldUpdateOperationsInput | number
    firm?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type ProductUncheckedUpdateWithoutUserProductsInput = {
    id?: IntFieldUpdateOperationsInput | number
    plan?: StringFieldUpdateOperationsInput | string
    description?: NullableStringFieldUpdateOperationsInput | string | null
    price?: FloatFieldUpdateOperationsInput | number
    firm?: StringFieldUpdateOperationsInput | string
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type TelegramUserCreateWithoutUserTransactionsInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationCreateNestedManyWithoutTelegramUserInput
    userProducts?: UserProductCreateNestedManyWithoutUserInput
    UserBotStates?: UserBotStateCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserUncheckedCreateWithoutUserTransactionsInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationUncheckedCreateNestedManyWithoutTelegramUserInput
    userProducts?: UserProductUncheckedCreateNestedManyWithoutUserInput
    UserBotStates?: UserBotStateUncheckedCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketUncheckedCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserCreateOrConnectWithoutUserTransactionsInput = {
    where: TelegramUserWhereUniqueInput
    create: XOR<TelegramUserCreateWithoutUserTransactionsInput, TelegramUserUncheckedCreateWithoutUserTransactionsInput>
  }

  export type TelegramUserUpsertWithoutUserTransactionsInput = {
    update: XOR<TelegramUserUpdateWithoutUserTransactionsInput, TelegramUserUncheckedUpdateWithoutUserTransactionsInput>
    create: XOR<TelegramUserCreateWithoutUserTransactionsInput, TelegramUserUncheckedCreateWithoutUserTransactionsInput>
    where?: TelegramUserWhereInput
  }

  export type TelegramUserUpdateToOneWithWhereWithoutUserTransactionsInput = {
    where?: TelegramUserWhereInput
    data: XOR<TelegramUserUpdateWithoutUserTransactionsInput, TelegramUserUncheckedUpdateWithoutUserTransactionsInput>
  }

  export type TelegramUserUpdateWithoutUserTransactionsInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUpdateManyWithoutTelegramUserNestedInput
    userProducts?: UserProductUpdateManyWithoutUserNestedInput
    UserBotStates?: UserBotStateUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserUncheckedUpdateWithoutUserTransactionsInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUncheckedUpdateManyWithoutTelegramUserNestedInput
    userProducts?: UserProductUncheckedUpdateManyWithoutUserNestedInput
    UserBotStates?: UserBotStateUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUncheckedUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserCreateWithoutUserBotStatesInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationCreateNestedManyWithoutTelegramUserInput
    userProducts?: UserProductCreateNestedManyWithoutUserInput
    userTransactions?: UserTransactionCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserUncheckedCreateWithoutUserBotStatesInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationUncheckedCreateNestedManyWithoutTelegramUserInput
    userProducts?: UserProductUncheckedCreateNestedManyWithoutUserInput
    userTransactions?: UserTransactionUncheckedCreateNestedManyWithoutTelegramUserInput
    UserTicket?: UserTicketUncheckedCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserCreateOrConnectWithoutUserBotStatesInput = {
    where: TelegramUserWhereUniqueInput
    create: XOR<TelegramUserCreateWithoutUserBotStatesInput, TelegramUserUncheckedCreateWithoutUserBotStatesInput>
  }

  export type TelegramUserUpsertWithoutUserBotStatesInput = {
    update: XOR<TelegramUserUpdateWithoutUserBotStatesInput, TelegramUserUncheckedUpdateWithoutUserBotStatesInput>
    create: XOR<TelegramUserCreateWithoutUserBotStatesInput, TelegramUserUncheckedCreateWithoutUserBotStatesInput>
    where?: TelegramUserWhereInput
  }

  export type TelegramUserUpdateToOneWithWhereWithoutUserBotStatesInput = {
    where?: TelegramUserWhereInput
    data: XOR<TelegramUserUpdateWithoutUserBotStatesInput, TelegramUserUncheckedUpdateWithoutUserBotStatesInput>
  }

  export type TelegramUserUpdateWithoutUserBotStatesInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUpdateManyWithoutTelegramUserNestedInput
    userProducts?: UserProductUpdateManyWithoutUserNestedInput
    userTransactions?: UserTransactionUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserUncheckedUpdateWithoutUserBotStatesInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUncheckedUpdateManyWithoutTelegramUserNestedInput
    userProducts?: UserProductUncheckedUpdateManyWithoutUserNestedInput
    userTransactions?: UserTransactionUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserTicket?: UserTicketUncheckedUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserCreateWithoutUserTicketInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationCreateNestedManyWithoutTelegramUserInput
    userProducts?: UserProductCreateNestedManyWithoutUserInput
    userTransactions?: UserTransactionCreateNestedManyWithoutTelegramUserInput
    UserBotStates?: UserBotStateCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserUncheckedCreateWithoutUserTicketInput = {
    id?: string
    telegramId: string
    username?: string | null
    firstName?: string | null
    lastName?: string | null
    balance?: number
    lastInteraction?: Date | string
    consultingRequest?: string
    respondent?: $Enums.RespondentType
    createdAt?: Date | string
    updatedAt?: Date | string
    conversations?: ConversationUncheckedCreateNestedManyWithoutTelegramUserInput
    userProducts?: UserProductUncheckedCreateNestedManyWithoutUserInput
    userTransactions?: UserTransactionUncheckedCreateNestedManyWithoutTelegramUserInput
    UserBotStates?: UserBotStateUncheckedCreateNestedManyWithoutTelegramUserInput
  }

  export type TelegramUserCreateOrConnectWithoutUserTicketInput = {
    where: TelegramUserWhereUniqueInput
    create: XOR<TelegramUserCreateWithoutUserTicketInput, TelegramUserUncheckedCreateWithoutUserTicketInput>
  }

  export type TelegramUserUpsertWithoutUserTicketInput = {
    update: XOR<TelegramUserUpdateWithoutUserTicketInput, TelegramUserUncheckedUpdateWithoutUserTicketInput>
    create: XOR<TelegramUserCreateWithoutUserTicketInput, TelegramUserUncheckedCreateWithoutUserTicketInput>
    where?: TelegramUserWhereInput
  }

  export type TelegramUserUpdateToOneWithWhereWithoutUserTicketInput = {
    where?: TelegramUserWhereInput
    data: XOR<TelegramUserUpdateWithoutUserTicketInput, TelegramUserUncheckedUpdateWithoutUserTicketInput>
  }

  export type TelegramUserUpdateWithoutUserTicketInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUpdateManyWithoutTelegramUserNestedInput
    userProducts?: UserProductUpdateManyWithoutUserNestedInput
    userTransactions?: UserTransactionUpdateManyWithoutTelegramUserNestedInput
    UserBotStates?: UserBotStateUpdateManyWithoutTelegramUserNestedInput
  }

  export type TelegramUserUncheckedUpdateWithoutUserTicketInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramId?: StringFieldUpdateOperationsInput | string
    username?: NullableStringFieldUpdateOperationsInput | string | null
    firstName?: NullableStringFieldUpdateOperationsInput | string | null
    lastName?: NullableStringFieldUpdateOperationsInput | string | null
    balance?: FloatFieldUpdateOperationsInput | number
    lastInteraction?: DateTimeFieldUpdateOperationsInput | Date | string
    consultingRequest?: StringFieldUpdateOperationsInput | string
    respondent?: EnumRespondentTypeFieldUpdateOperationsInput | $Enums.RespondentType
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    conversations?: ConversationUncheckedUpdateManyWithoutTelegramUserNestedInput
    userProducts?: UserProductUncheckedUpdateManyWithoutUserNestedInput
    userTransactions?: UserTransactionUncheckedUpdateManyWithoutTelegramUserNestedInput
    UserBotStates?: UserBotStateUncheckedUpdateManyWithoutTelegramUserNestedInput
  }

  export type ConversationCreateManyTelegramUserInput = {
    id?: string
    telegramChatId: string
    title?: string | null
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserProductCreateManyUserInput = {
    id?: string
    productId: number
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTransactionCreateManyTelegramUserInput = {
    id?: string
    transactionHash: string
    network: $Enums.TransactionNetwork
    value: number
    status?: $Enums.TransactionStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserBotStateCreateManyTelegramUserInput = {
    id?: string
    state?: string
    selectedProductId?: number | null
    selectedNetwork?: string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserTicketCreateManyTelegramUserInput = {
    id?: string
    content: string
    checked?: boolean
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type ConversationUpdateWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    messages?: MessageUpdateManyWithoutConversationNestedInput
  }

  export type ConversationUncheckedUpdateWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    messages?: MessageUncheckedUpdateManyWithoutConversationNestedInput
  }

  export type ConversationUncheckedUpdateManyWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    telegramChatId?: StringFieldUpdateOperationsInput | string
    title?: NullableStringFieldUpdateOperationsInput | string | null
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserProductUpdateWithoutUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    product?: ProductUpdateOneRequiredWithoutUserProductsNestedInput
  }

  export type UserProductUncheckedUpdateWithoutUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    productId?: IntFieldUpdateOperationsInput | number
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserProductUncheckedUpdateManyWithoutUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    productId?: IntFieldUpdateOperationsInput | number
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTransactionUpdateWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    transactionHash?: StringFieldUpdateOperationsInput | string
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    value?: FloatFieldUpdateOperationsInput | number
    status?: EnumTransactionStatusFieldUpdateOperationsInput | $Enums.TransactionStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTransactionUncheckedUpdateWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    transactionHash?: StringFieldUpdateOperationsInput | string
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    value?: FloatFieldUpdateOperationsInput | number
    status?: EnumTransactionStatusFieldUpdateOperationsInput | $Enums.TransactionStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTransactionUncheckedUpdateManyWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    transactionHash?: StringFieldUpdateOperationsInput | string
    network?: EnumTransactionNetworkFieldUpdateOperationsInput | $Enums.TransactionNetwork
    value?: FloatFieldUpdateOperationsInput | number
    status?: EnumTransactionStatusFieldUpdateOperationsInput | $Enums.TransactionStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserBotStateUpdateWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    state?: StringFieldUpdateOperationsInput | string
    selectedProductId?: NullableIntFieldUpdateOperationsInput | number | null
    selectedNetwork?: NullableStringFieldUpdateOperationsInput | string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserBotStateUncheckedUpdateWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    state?: StringFieldUpdateOperationsInput | string
    selectedProductId?: NullableIntFieldUpdateOperationsInput | number | null
    selectedNetwork?: NullableStringFieldUpdateOperationsInput | string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserBotStateUncheckedUpdateManyWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    state?: StringFieldUpdateOperationsInput | string
    selectedProductId?: NullableIntFieldUpdateOperationsInput | number | null
    selectedNetwork?: NullableStringFieldUpdateOperationsInput | string | null
    additionalData?: NullableJsonNullValueInput | InputJsonValue
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTicketUpdateWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    checked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTicketUncheckedUpdateWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    checked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserTicketUncheckedUpdateManyWithoutTelegramUserInput = {
    id?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    checked?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type MessageCreateManyConversationInput = {
    id?: string
    role: string
    content: string
    isRead?: boolean
    createdAt?: Date | string
  }

  export type MessageUpdateWithoutConversationInput = {
    id?: StringFieldUpdateOperationsInput | string
    role?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    isRead?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type MessageUncheckedUpdateWithoutConversationInput = {
    id?: StringFieldUpdateOperationsInput | string
    role?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    isRead?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type MessageUncheckedUpdateManyWithoutConversationInput = {
    id?: StringFieldUpdateOperationsInput | string
    role?: StringFieldUpdateOperationsInput | string
    content?: StringFieldUpdateOperationsInput | string
    isRead?: BoolFieldUpdateOperationsInput | boolean
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserProductCreateManyProductInput = {
    id?: string
    userId: string
    challengeStatus?: $Enums.ChallengeStatus
    createdAt?: Date | string
    updatedAt?: Date | string
  }

  export type UserProductUpdateWithoutProductInput = {
    id?: StringFieldUpdateOperationsInput | string
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
    user?: TelegramUserUpdateOneRequiredWithoutUserProductsNestedInput
  }

  export type UserProductUncheckedUpdateWithoutProductInput = {
    id?: StringFieldUpdateOperationsInput | string
    userId?: StringFieldUpdateOperationsInput | string
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }

  export type UserProductUncheckedUpdateManyWithoutProductInput = {
    id?: StringFieldUpdateOperationsInput | string
    userId?: StringFieldUpdateOperationsInput | string
    challengeStatus?: EnumChallengeStatusFieldUpdateOperationsInput | $Enums.ChallengeStatus
    createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
    updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
  }



  /**
   * Batch Payload for updateMany & deleteMany & createMany
   */

  export type BatchPayload = {
    count: number
  }

  /**
   * DMMF
   */
  export const dmmf: runtime.BaseDMMF
}