
/**
 * Client
**/

import * as runtime from './runtime';

export import DMMF = runtime.DMMF

/**
 * Prisma Errors
 */
export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
export import PrismaClientInitializationError = runtime.PrismaClientInitializationError
export import PrismaClientValidationError = runtime.PrismaClientValidationError

/**
 * 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

/**
 * Prisma Client JS version: 2.13.1
 * Query Engine version: fcbc4bb2d306c86c28014f596b1e8c7980af8bd4
 */
export type PrismaVersion = {
  client: string
}

export const prismaVersion: PrismaVersion 

/**
 * Utility Types
 */

/**
 * From https://github.com/sindresorhus/type-fest/
 * Matches a JSON object.
 * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. 
 */
export type JsonObject = {[Key in string]?: JsonValue}
 
/**
 * From https://github.com/sindresorhus/type-fest/
 * Matches a JSON array.
 */
export interface JsonArray extends Array<JsonValue> {}
 
/**
 * From https://github.com/sindresorhus/type-fest/
 * Matches any valid JSON value.
 */
export type JsonValue = string | number | boolean | null | JsonObject | JsonArray

/**
 * Same as JsonObject, but allows undefined
 */
export type InputJsonObject = {[Key in string]?: JsonValue}
 
export interface InputJsonArray extends Array<JsonValue> {}
 
export type InputJsonValue = undefined |  string | number | boolean | null | InputJsonObject | InputJsonArray
 type SelectAndInclude = {
  select: any
  include: any
}
type HasSelect = {
  select: any
}
type HasInclude = {
  include: any
}
type CheckSelect<T, S, U> = T extends SelectAndInclude
  ? 'Please either choose `select` or `include`'
  : T extends HasSelect
  ? U
  : T extends HasInclude
  ? U
  : S

/**
 * Get the type of the value, that the Promise holds.
 */
export type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T;

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


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

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

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

export type TrueKeys<T> = TruthyKeys<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;
};

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 | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;



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

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

/**
 * Like `Pick`, but with an array
 */
type PickArray<T, K extends Array<keyof T>> = Pick<T, TupleToUnion<K>>





/**
 * Model Bundle
 */

export type Bundle = {
  id: string
  tree: Prisma.JsonValue
  meta: Prisma.JsonValue
}


/**
 * ##  Prisma Client ʲˢ
 * 
 * Type-safe database client for TypeScript & Node.js (ORM replacement)
 * @example
 * ```
 * const prisma = new PrismaClient()
 * // Fetch zero or more Bundles
 * const bundles = await prisma.bundle.findMany()
 * ```
 *
 * 
 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
 */
export class PrismaClient<
  T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
  U = 'log' extends keyof T ? T['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<T['log']> : never : never
      > {
      /**
       * @private
       */
      private fetcher;
      /**
       * @private
       */
      private readonly dmmf;
      /**
       * @private
       */
      private connectionPromise?;
      /**
       * @private
       */
      private disconnectionPromise?;
      /**
       * @private
       */
      private readonly engineConfig;
      /**
       * @private
       */
      private readonly measurePerformance;

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

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

  /**
   * Connect with the database
   */
  $connect(): Promise<void>;

  /**
   * Disconnect from the database
   */
  $disconnect(): Promise<any>;

  /**
   * Add a middleware
   */
  $use(cb: Prisma.Middleware): void

  /**
   * Executes a raw query and returns the number of affected rows
   * @example
   * ```
   * // With parameters use prisma.executeRaw``, values will be escaped automatically
   * const result = await prisma.executeRaw`UPDATE User SET cool = ${true} WHERE id = ${1};`
   * // Or
   * const result = await prisma.executeRaw('UPDATE User SET cool = $1 WHERE id = $2 ;', true, 1)
  * ```
  * 
  * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
  */
  $executeRaw < T = any > (query: string | TemplateStringsArray | Prisma.Sql, ...values: any[]): Promise<number>;

  /**
   * Performs a raw query and returns the SELECT data
   * @example
   * ```
   * // With parameters use prisma.queryRaw``, values will be escaped automatically
   * const result = await prisma.queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'ema.il'};`
   * // Or
   * const result = await prisma.queryRaw('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'ema.il')
  * ```
  * 
  * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
  */
  $queryRaw < T = any > (query: string | TemplateStringsArray | Prisma.Sql, ...values: any[]): Promise<T>;

  /**
   * Execute queries in a transaction
   * @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' } }),
   * ])
   * ```
   */
  $transaction: PromiseConstructor['all']

      /**
   * `prisma.bundle`: Exposes CRUD operations for the **Bundle** model.
    * Example usage:
    * ```ts
    * // Fetch zero or more Bundles
    * const bundles = await prisma.bundle.findMany()
    * ```
    */
  get bundle(): Prisma.BundleDelegate;
}

export namespace Prisma {
  export import DMMF = runtime.DMMF

  /**
   * Prisma Errors
   */
  export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
  export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
  export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
  export import PrismaClientInitializationError = runtime.PrismaClientInitializationError
  export import PrismaClientValidationError = runtime.PrismaClientValidationError

  /**
   * 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

  /**
   * Prisma Client JS version: 2.13.1
   * Query Engine version: fcbc4bb2d306c86c28014f596b1e8c7980af8bd4
   */
  export type PrismaVersion = {
    client: string
  }

  export const prismaVersion: PrismaVersion 

  /**
   * Utility Types
   */

  /**
   * From https://github.com/sindresorhus/type-fest/
   * Matches a JSON object.
   * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. 
   */
  export type JsonObject = {[Key in string]?: JsonValue}
 
  /**
   * From https://github.com/sindresorhus/type-fest/
   * Matches a JSON array.
   */
  export interface JsonArray extends Array<JsonValue> {}
 
  /**
   * From https://github.com/sindresorhus/type-fest/
   * Matches any valid JSON value.
   */
  export type JsonValue = string | number | boolean | null | JsonObject | JsonArray

  /**
   * Same as JsonObject, but allows undefined
   */
  export type InputJsonObject = {[Key in string]?: JsonValue}
 
  export interface InputJsonArray extends Array<JsonValue> {}
 
  export type InputJsonValue = undefined |  string | number | boolean | null | InputJsonObject | InputJsonArray
   type SelectAndInclude = {
    select: any
    include: any
  }
  type HasSelect = {
    select: any
  }
  type HasInclude = {
    include: any
  }
  type CheckSelect<T, S, U> = T extends SelectAndInclude
    ? 'Please either choose `select` or `include`'
    : T extends HasSelect
    ? U
    : T extends HasInclude
    ? U
    : S

  /**
   * Get the type of the value, that the Promise holds.
   */
  export type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T;

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


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

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

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

  export type TrueKeys<T> = TruthyKeys<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;
  };

  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 | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;



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

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

  /**
   * Like `Pick`, but with an array
   */
  type PickArray<T, K extends Array<keyof T>> = Pick<T, TupleToUnion<K>>

  class PrismaClientFetcher {
    private readonly prisma;
    private readonly debug;
    private readonly hooks?;
    constructor(prisma: PrismaClient<any, any>, debug?: boolean, hooks?: Hooks | undefined);
    request<T>(document: any, dataPath?: string[], rootField?: string, typeName?: string, isList?: boolean, callsite?: string): Promise<T>;
    sanitizeMessage(message: string): string;
    protected unpack(document: any, data: any, path: string[], rootField?: string, isList?: boolean): any;
  }

  export const ModelName: {
    Bundle: 'Bundle'
  };

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


  export type Datasources = {
    db?: Datasource
  }

  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'

  export interface PrismaClientOptions {
    /**
     * Overwrites the datasource url from your prisma.schema file
     */
    datasources?: Datasources

    /**
     * @default "colorless"
     */
    errorFormat?: ErrorFormat

    /**
     * @example
     * ```
     * // Defaults to stdout
     * log: ['query', 'info', 'warn', 'error']
     * 
     * // Emit as events
     * log: [
     *  { emit: 'stdout', level: 'query' },
     *  { emit: 'stdout', level: 'info' },
     *  { emit: 'stdout', level: 'warn' }
     *  { emit: 'stdout', level: 'error' }
     * ]
     * ```
     * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
     */
    log?: Array<LogLevel | LogDefinition>
  }

  export type Hooks = {
    beforeRequest?: (options: { query: string, path: string[], rootField?: string, typeName?: string, document: any }) => any
  }

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

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

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

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


  export type PrismaAction =
    | 'findUnique'
    | 'findMany'
    | 'findFirst'
    | 'create'
    | 'update'
    | 'updateMany'
    | 'upsert'
    | 'delete'
    | 'deleteMany'
    | 'executeRaw'
    | 'queryRaw'
    | 'aggregate'
    | 'count'

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

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

  // tested in getLogLevel.test.ts
  export function getLogLevel(log: Array<LogLevel | LogDefinition>): LogLevel | undefined; 
  export type Datasource = {
    url?: string
  }


  /**
   * Model Bundle
   */


  export type AggregateBundle = {
    count: number | null
    min: BundleMinAggregateOutputType | null
    max: BundleMaxAggregateOutputType | null
  }

  export type BundleMinAggregateOutputType = {
    id: string | null
    tree: JsonValue | null
    meta: JsonValue | null
  }

  export type BundleMaxAggregateOutputType = {
    id: string | null
    tree: JsonValue | null
    meta: JsonValue | null
  }

  export type BundleCountAggregateOutputType = {
    id: number | null
    tree: number | null
    meta: number | null
    _all: number
  }


  export type BundleMinAggregateInputType = {
    id?: true
    tree?: true
    meta?: true
  }

  export type BundleMaxAggregateInputType = {
    id?: true
    tree?: true
    meta?: true
  }

  export type BundleCountAggregateInputType = {
    id?: true
    tree?: true
    meta?: true
    _all?: true
  }

  export type AggregateBundleArgs = {
    where?: BundleWhereInput
    orderBy?: Enumerable<BundleOrderByInput>
    cursor?: BundleWhereUniqueInput
    take?: number
    skip?: number
    count?: true
    min?: BundleMinAggregateInputType
    max?: BundleMaxAggregateInputType
  }

  export type GetBundleAggregateType<T extends AggregateBundleArgs> = {
    [P in keyof T]: P extends 'count' ? number : never
  }



    



  export type BundleSelect = {
    id?: boolean
    tree?: boolean
    meta?: boolean
  }

  export type BundleGetPayload<
    S extends boolean | null | undefined | BundleArgs,
    U = keyof S
      > = S extends true
        ? Bundle
    : S extends undefined
    ? never
    : S extends BundleArgs | FindManyBundleArgs
    ?'include' extends U
    ? Bundle 
    : 'select' extends U
    ? {
    [P in TrueKeys<S['select']>]: P extends keyof Bundle ?Bundle [P]
  : 
     never
  } 
    : Bundle
  : Bundle


  export interface BundleDelegate {
    /**
     * Find zero or one Bundle that matches the filter.
     * @param {FindUniqueBundleArgs} args - Arguments to find a Bundle
     * @example
     * // Get one Bundle
     * const bundle = await prisma.bundle.findUnique({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
    **/
    findUnique<T extends FindUniqueBundleArgs>(
      args: Subset<T, FindUniqueBundleArgs>
    ): CheckSelect<T, Prisma__BundleClient<Bundle | null>, Prisma__BundleClient<BundleGetPayload<T> | null>>
    /**
     * Find the first Bundle that matches the filter.
     * @param {FindFirstBundleArgs} args - Arguments to find a Bundle
     * @example
     * // Get one Bundle
     * const bundle = await prisma.bundle.findFirst({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
    **/
    findFirst<T extends FindFirstBundleArgs>(
      args?: Subset<T, FindFirstBundleArgs>
    ): CheckSelect<T, Prisma__BundleClient<Bundle | null>, Prisma__BundleClient<BundleGetPayload<T> | null>>
    /**
     * Find zero or more Bundles that matches the filter.
     * @param {FindManyBundleArgs=} args - Arguments to filter and select certain fields only.
     * @example
     * // Get all Bundles
     * const bundles = await prisma.bundle.findMany()
     * 
     * // Get first 10 Bundles
     * const bundles = await prisma.bundle.findMany({ take: 10 })
     * 
     * // Only select the `id`
     * const bundleWithIdOnly = await prisma.bundle.findMany({ select: { id: true } })
     * 
    **/
    findMany<T extends FindManyBundleArgs>(
      args?: Subset<T, FindManyBundleArgs>
    ): CheckSelect<T, Promise<Array<Bundle>>, Promise<Array<BundleGetPayload<T>>>>
    /**
     * Create a Bundle.
     * @param {BundleCreateArgs} args - Arguments to create a Bundle.
     * @example
     * // Create one Bundle
     * const Bundle = await prisma.bundle.create({
     *   data: {
     *     // ... data to create a Bundle
     *   }
     * })
     * 
    **/
    create<T extends BundleCreateArgs>(
      args: Subset<T, BundleCreateArgs>
    ): CheckSelect<T, Prisma__BundleClient<Bundle>, Prisma__BundleClient<BundleGetPayload<T>>>
    /**
     * Delete a Bundle.
     * @param {BundleDeleteArgs} args - Arguments to delete one Bundle.
     * @example
     * // Delete one Bundle
     * const Bundle = await prisma.bundle.delete({
     *   where: {
     *     // ... filter to delete one Bundle
     *   }
     * })
     * 
    **/
    delete<T extends BundleDeleteArgs>(
      args: Subset<T, BundleDeleteArgs>
    ): CheckSelect<T, Prisma__BundleClient<Bundle>, Prisma__BundleClient<BundleGetPayload<T>>>
    /**
     * Update one Bundle.
     * @param {BundleUpdateArgs} args - Arguments to update one Bundle.
     * @example
     * // Update one Bundle
     * const bundle = await prisma.bundle.update({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
    **/
    update<T extends BundleUpdateArgs>(
      args: Subset<T, BundleUpdateArgs>
    ): CheckSelect<T, Prisma__BundleClient<Bundle>, Prisma__BundleClient<BundleGetPayload<T>>>
    /**
     * Delete zero or more Bundles.
     * @param {BundleDeleteManyArgs} args - Arguments to filter Bundles to delete.
     * @example
     * // Delete a few Bundles
     * const { count } = await prisma.bundle.deleteMany({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
     * 
    **/
    deleteMany<T extends BundleDeleteManyArgs>(
      args?: Subset<T, BundleDeleteManyArgs>
    ): Promise<BatchPayload>
    /**
     * Update zero or more Bundles.
     * @param {BundleUpdateManyArgs} args - Arguments to update one or more rows.
     * @example
     * // Update many Bundles
     * const bundle = await prisma.bundle.updateMany({
     *   where: {
     *     // ... provide filter here
     *   },
     *   data: {
     *     // ... provide data here
     *   }
     * })
     * 
    **/
    updateMany<T extends BundleUpdateManyArgs>(
      args: Subset<T, BundleUpdateManyArgs>
    ): Promise<BatchPayload>
    /**
     * Create or update one Bundle.
     * @param {BundleUpsertArgs} args - Arguments to update or create a Bundle.
     * @example
     * // Update or create a Bundle
     * const bundle = await prisma.bundle.upsert({
     *   create: {
     *     // ... data to create a Bundle
     *   },
     *   update: {
     *     // ... in case it already exists, update
     *   },
     *   where: {
     *     // ... the filter for the Bundle we want to update
     *   }
     * })
    **/
    upsert<T extends BundleUpsertArgs>(
      args: Subset<T, BundleUpsertArgs>
    ): CheckSelect<T, Prisma__BundleClient<Bundle>, Prisma__BundleClient<BundleGetPayload<T>>>
    /**
     * Find zero or one Bundle that matches the filter.
     * @param {FindUniqueBundleArgs} args - Arguments to find a Bundle
     * @deprecated This will be deprecated please use prisma.bundle.findUnique
     * @example
     * // Get one Bundle
     * const bundle = await prisma.bundle.findOne({
     *   where: {
     *     // ... provide filter here
     *   }
     * })
    **/
    findOne<T extends FindUniqueBundleArgs>(
      args: Subset<T, FindUniqueBundleArgs>
    ): CheckSelect<T, Prisma__BundleClient<Bundle | null>, Prisma__BundleClient<BundleGetPayload<T> | null>>
    /**
     * Count
     */
    count(args?: Omit<FindManyBundleArgs, 'select' | 'include'>): Promise<number>

  

    /**
     * Aggregate
     */
    aggregate<T extends AggregateBundleArgs>(args: Subset<T, AggregateBundleArgs>): Promise<GetBundleAggregateType<T>>
  }

  /**
   * The delegate class that acts as a "Promise-like" for Bundle.
   * Why is this prefixed with `Prisma__`?
   * Because we want to prevent naming conflicts as mentioned in 
   * https://github.com/prisma/prisma-client-js/issues/707
   */
  export class Prisma__BundleClient<T> implements Promise<T> {
    private readonly _dmmf;
    private readonly _fetcher;
    private readonly _queryType;
    private readonly _rootField;
    private readonly _clientMethod;
    private readonly _args;
    private readonly _dataPath;
    private readonly _errorFormat;
    private readonly _measurePerformance?;
    private _isList;
    private _callsite;
    private _requestPromise?;
    constructor(_dmmf: runtime.DMMFClass, _fetcher: PrismaClientFetcher, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean);
    readonly [Symbol.toStringTag]: 'PrismaClientPromise';


    private get _document();
    /**
     * Attaches callbacks for the resolution and/or rejection of the Promise.
     * @param onfulfilled The callback to execute when the Promise is resolved.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of which ever callback is executed.
     */
    then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | Promise<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | Promise<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
    /**
     * Attaches a callback for only the rejection of the Promise.
     * @param onrejected The callback to execute when the Promise is rejected.
     * @returns A Promise for the completion of the callback.
     */
    catch<TResult = never>(onrejected?: ((reason: any) => TResult | Promise<TResult>) | undefined | null): Promise<T | TResult>;
    /**
     * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
     * resolved value cannot be modified from the callback.
     * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
     * @returns A Promise for the completion of the callback.
     */
    finally(onfinally?: (() => void) | undefined | null): Promise<T>;
  }

  // Custom InputTypes

  /**
   * Bundle findUnique
   */
  export type FindUniqueBundleArgs = {
    /**
     * Select specific fields to fetch from the Bundle
    **/
    select?: BundleSelect | null
    /**
     * Filter, which Bundle to fetch.
    **/
    where: BundleWhereUniqueInput
  }


  /**
   * Bundle findFirst
   */
  export type FindFirstBundleArgs = {
    /**
     * Select specific fields to fetch from the Bundle
    **/
    select?: BundleSelect | null
    /**
     * Filter, which Bundle to fetch.
    **/
    where?: BundleWhereInput
    orderBy?: Enumerable<BundleOrderByInput>
    cursor?: BundleWhereUniqueInput
    take?: number
    skip?: number
    distinct?: Enumerable<BundleScalarFieldEnum>
  }


  /**
   * Bundle findMany
   */
  export type FindManyBundleArgs = {
    /**
     * Select specific fields to fetch from the Bundle
    **/
    select?: BundleSelect | null
    /**
     * Filter, which Bundles to fetch.
    **/
    where?: BundleWhereInput
    /**
     * Determine the order of the Bundles to fetch.
    **/
    orderBy?: Enumerable<BundleOrderByInput>
    /**
     * Sets the position for listing Bundles.
    **/
    cursor?: BundleWhereUniqueInput
    /**
     * The number of Bundles to fetch. If negative number, it will take Bundles before the `cursor`.
    **/
    take?: number
    /**
     * Skip the first `n` Bundles.
    **/
    skip?: number
    distinct?: Enumerable<BundleScalarFieldEnum>
  }


  /**
   * Bundle create
   */
  export type BundleCreateArgs = {
    /**
     * Select specific fields to fetch from the Bundle
    **/
    select?: BundleSelect | null
    /**
     * The data needed to create a Bundle.
    **/
    data: BundleCreateInput
  }


  /**
   * Bundle update
   */
  export type BundleUpdateArgs = {
    /**
     * Select specific fields to fetch from the Bundle
    **/
    select?: BundleSelect | null
    /**
     * The data needed to update a Bundle.
    **/
    data: BundleUpdateInput
    /**
     * Choose, which Bundle to update.
    **/
    where: BundleWhereUniqueInput
  }


  /**
   * Bundle updateMany
   */
  export type BundleUpdateManyArgs = {
    data: BundleUpdateManyMutationInput
    where?: BundleWhereInput
  }


  /**
   * Bundle upsert
   */
  export type BundleUpsertArgs = {
    /**
     * Select specific fields to fetch from the Bundle
    **/
    select?: BundleSelect | null
    /**
     * The filter to search for the Bundle to update in case it exists.
    **/
    where: BundleWhereUniqueInput
    /**
     * In case the Bundle found by the `where` argument doesn't exist, create a new Bundle with this data.
    **/
    create: BundleCreateInput
    /**
     * In case the Bundle was found with the provided `where` argument, update it with this data.
    **/
    update: BundleUpdateInput
  }


  /**
   * Bundle delete
   */
  export type BundleDeleteArgs = {
    /**
     * Select specific fields to fetch from the Bundle
    **/
    select?: BundleSelect | null
    /**
     * Filter which Bundle to delete.
    **/
    where: BundleWhereUniqueInput
  }


  /**
   * Bundle deleteMany
   */
  export type BundleDeleteManyArgs = {
    where?: BundleWhereInput
  }


  /**
   * Bundle without action
   */
  export type BundleArgs = {
    /**
     * Select specific fields to fetch from the Bundle
    **/
    select?: BundleSelect | null
  }



  /**
   * Enums
   */

  // Based on
  // https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275

  export const BundleScalarFieldEnum: {
    id: 'id',
    tree: 'tree',
    meta: 'meta'
  };

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


  export const SortOrder: {
    asc: 'asc',
    desc: 'desc'
  };

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


  export const QueryMode: {
    default: 'default',
    insensitive: 'insensitive'
  };

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


  /**
   * Deep Input Types
   */


  export type BundleWhereInput = {
    AND?: Enumerable<BundleWhereInput>
    OR?: Enumerable<BundleWhereInput>
    NOT?: Enumerable<BundleWhereInput>
    id?: StringFilter | string
    tree?: JsonFilter
    meta?: JsonFilter
  }

  export type BundleOrderByInput = {
    id?: SortOrder
    tree?: SortOrder
    meta?: SortOrder
  }

  export type BundleWhereUniqueInput = {
    id?: string
  }

  export type BundleCreateInput = {
    id?: string
    tree?: InputJsonValue
    meta?: InputJsonValue
  }

  export type BundleUpdateInput = {
    id?: StringFieldUpdateOperationsInput | string
    tree?: InputJsonValue
    meta?: InputJsonValue
  }

  export type BundleUpdateManyMutationInput = {
    id?: StringFieldUpdateOperationsInput | string
    tree?: InputJsonValue
    meta?: InputJsonValue
  }

  export type StringFilter = {
    equals?: string
    in?: Enumerable<string>
    notIn?: Enumerable<string>
    lt?: string
    lte?: string
    gt?: string
    gte?: string
    contains?: string
    startsWith?: string
    endsWith?: string
    mode?: QueryMode
    not?: NestedStringFilter | string
  }

  export type JsonFilter = {
    equals?: InputJsonValue
    not?: InputJsonValue
  }

  export type StringFieldUpdateOperationsInput = {
    set?: string
  }

  export type NestedStringFilter = {
    equals?: string
    in?: Enumerable<string>
    notIn?: Enumerable<string>
    lt?: string
    lte?: string
    gt?: string
    gte?: string
    contains?: string
    startsWith?: string
    endsWith?: string
    not?: NestedStringFilter | string
  }



  /**
   * Batch Payload for updateMany & deleteMany
   */

  export type BatchPayload = {
    count: number
  }

  /**
   * DMMF
   */
  export const dmmf: runtime.DMMF.Document;
}

/*
* Exports for compatibility introduced in 2.12.0
* Please import from the Prisma namespace instead
*/

/**
 * @deprecated Renamed to `Prisma.BundleScalarFieldEnum`
 */
export type BundleScalarFieldEnum = Prisma.BundleScalarFieldEnum

/**
 * @deprecated Renamed to `Prisma.SortOrder`
 */
export type SortOrder = Prisma.SortOrder

/**
 * @deprecated Renamed to `Prisma.QueryMode`
 */
export type QueryMode = Prisma.QueryMode

/**
 * @deprecated Renamed to `Prisma.ModelName`
 */
export type ModelName = Prisma.ModelName

/**
 * @deprecated Renamed to `Prisma.AggregateBundle`
 */
export type AggregateBundle = Prisma.AggregateBundle

/**
 * @deprecated Renamed to `Prisma.BundleMinAggregateOutputType`
 */
export type BundleMinAggregateOutputType = Prisma.BundleMinAggregateOutputType

/**
 * @deprecated Renamed to `Prisma.BundleMaxAggregateOutputType`
 */
export type BundleMaxAggregateOutputType = Prisma.BundleMaxAggregateOutputType

/**
 * @deprecated Renamed to `Prisma.BundleCountAggregateOutputType`
 */
export type BundleCountAggregateOutputType = Prisma.BundleCountAggregateOutputType

/**
 * @deprecated Renamed to `Prisma.AggregateBundleArgs`
 */
export type AggregateBundleArgs = Prisma.AggregateBundleArgs

/**
 * @deprecated Renamed to `Prisma.BundleMinAggregateInputType`
 */
export type BundleMinAggregateInputType = Prisma.BundleMinAggregateInputType

/**
 * @deprecated Renamed to `Prisma.BundleMaxAggregateInputType`
 */
export type BundleMaxAggregateInputType = Prisma.BundleMaxAggregateInputType

/**
 * @deprecated Renamed to `Prisma.BundleCountAggregateInputType`
 */
export type BundleCountAggregateInputType = Prisma.BundleCountAggregateInputType

/**
 * @deprecated Renamed to `Prisma.BundleSelect`
 */
export type BundleSelect = Prisma.BundleSelect

/**
 * @deprecated Renamed to `Prisma.FindUniqueBundleArgs`
 */
export type FindUniqueBundleArgs = Prisma.FindUniqueBundleArgs

/**
 * @deprecated Renamed to `Prisma.FindFirstBundleArgs`
 */
export type FindFirstBundleArgs = Prisma.FindFirstBundleArgs

/**
 * @deprecated Renamed to `Prisma.FindManyBundleArgs`
 */
export type FindManyBundleArgs = Prisma.FindManyBundleArgs

/**
 * @deprecated Renamed to `Prisma.BundleCreateArgs`
 */
export type BundleCreateArgs = Prisma.BundleCreateArgs

/**
 * @deprecated Renamed to `Prisma.BundleUpdateArgs`
 */
export type BundleUpdateArgs = Prisma.BundleUpdateArgs

/**
 * @deprecated Renamed to `Prisma.BundleUpdateManyArgs`
 */
export type BundleUpdateManyArgs = Prisma.BundleUpdateManyArgs

/**
 * @deprecated Renamed to `Prisma.BundleUpsertArgs`
 */
export type BundleUpsertArgs = Prisma.BundleUpsertArgs

/**
 * @deprecated Renamed to `Prisma.BundleDeleteArgs`
 */
export type BundleDeleteArgs = Prisma.BundleDeleteArgs

/**
 * @deprecated Renamed to `Prisma.BundleDeleteManyArgs`
 */
export type BundleDeleteManyArgs = Prisma.BundleDeleteManyArgs

/**
 * @deprecated Renamed to `Prisma.BundleWhereInput`
 */
export type BundleWhereInput = Prisma.BundleWhereInput

/**
 * @deprecated Renamed to `Prisma.BundleOrderByInput`
 */
export type BundleOrderByInput = Prisma.BundleOrderByInput

/**
 * @deprecated Renamed to `Prisma.BundleWhereUniqueInput`
 */
export type BundleWhereUniqueInput = Prisma.BundleWhereUniqueInput

/**
 * @deprecated Renamed to `Prisma.BundleCreateInput`
 */
export type BundleCreateInput = Prisma.BundleCreateInput

/**
 * @deprecated Renamed to `Prisma.BundleUpdateInput`
 */
export type BundleUpdateInput = Prisma.BundleUpdateInput

/**
 * @deprecated Renamed to `Prisma.BundleUpdateManyMutationInput`
 */
export type BundleUpdateManyMutationInput = Prisma.BundleUpdateManyMutationInput

/**
 * @deprecated Renamed to `Prisma.StringFilter`
 */
export type StringFilter = Prisma.StringFilter

/**
 * @deprecated Renamed to `Prisma.JsonFilter`
 */
export type JsonFilter = Prisma.JsonFilter

/**
 * @deprecated Renamed to `Prisma.StringFieldUpdateOperationsInput`
 */
export type StringFieldUpdateOperationsInput = Prisma.StringFieldUpdateOperationsInput

/**
 * @deprecated Renamed to `Prisma.NestedStringFilter`
 */
export type NestedStringFilter = Prisma.NestedStringFilter