
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `Conversation` model and its related types.
 *
 * 🟢 You can import this file directly.
 */
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums.ts"
import type * as Prisma from "../internal/prismaNamespace.ts"

/**
 * Model Conversation
 * 
 */
export type ConversationModel = runtime.Types.Result.DefaultSelection<Prisma.$ConversationPayload>

export type AggregateConversation = {
  _count: ConversationCountAggregateOutputType | null
  _avg: ConversationAvgAggregateOutputType | null
  _sum: ConversationSumAggregateOutputType | null
  _min: ConversationMinAggregateOutputType | null
  _max: ConversationMaxAggregateOutputType | null
}

export type ConversationAvgAggregateOutputType = {
  id: number | null
}

export type ConversationSumAggregateOutputType = {
  id: number | null
}

export type ConversationMinAggregateOutputType = {
  id: number | null
  remoteJid: string | null
  instance: string | null
  needsHuman: boolean | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type ConversationMaxAggregateOutputType = {
  id: number | null
  remoteJid: string | null
  instance: string | null
  needsHuman: boolean | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type ConversationCountAggregateOutputType = {
  id: number
  remoteJid: number
  instance: number
  needsHuman: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type ConversationAvgAggregateInputType = {
  id?: true
}

export type ConversationSumAggregateInputType = {
  id?: true
}

export type ConversationMinAggregateInputType = {
  id?: true
  remoteJid?: true
  instance?: true
  needsHuman?: true
  createdAt?: true
  updatedAt?: true
}

export type ConversationMaxAggregateInputType = {
  id?: true
  remoteJid?: true
  instance?: true
  needsHuman?: true
  createdAt?: true
  updatedAt?: true
}

export type ConversationCountAggregateInputType = {
  id?: true
  remoteJid?: true
  instance?: true
  needsHuman?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

export type ConversationAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Conversation to aggregate.
   */
  where?: Prisma.ConversationWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Conversations to fetch.
   */
  orderBy?: Prisma.ConversationOrderByWithRelationInput | Prisma.ConversationOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.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 average
  **/
  _avg?: ConversationAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: ConversationSumAggregateInputType
  /**
   * {@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
      : Prisma.GetScalarType<T[P], AggregateConversation[P]>
    : Prisma.GetScalarType<T[P], AggregateConversation[P]>
}




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

export type ConversationGroupByOutputType = {
  id: number
  remoteJid: string
  instance: string
  needsHuman: boolean
  createdAt: Date
  updatedAt: Date
  _count: ConversationCountAggregateOutputType | null
  _avg: ConversationAvgAggregateOutputType | null
  _sum: ConversationSumAggregateOutputType | null
  _min: ConversationMinAggregateOutputType | null
  _max: ConversationMaxAggregateOutputType | null
}

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



export type ConversationWhereInput = {
  AND?: Prisma.ConversationWhereInput | Prisma.ConversationWhereInput[]
  OR?: Prisma.ConversationWhereInput[]
  NOT?: Prisma.ConversationWhereInput | Prisma.ConversationWhereInput[]
  id?: Prisma.IntFilter<"Conversation"> | number
  remoteJid?: Prisma.StringFilter<"Conversation"> | string
  instance?: Prisma.StringFilter<"Conversation"> | string
  needsHuman?: Prisma.BoolFilter<"Conversation"> | boolean
  createdAt?: Prisma.DateTimeFilter<"Conversation"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Conversation"> | Date | string
  messages?: Prisma.MessageListRelationFilter
}

export type ConversationOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  remoteJid?: Prisma.SortOrder
  instance?: Prisma.SortOrder
  needsHuman?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  messages?: Prisma.MessageOrderByRelationAggregateInput
}

export type ConversationWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  remoteJid_instance?: Prisma.ConversationRemoteJidInstanceCompoundUniqueInput
  AND?: Prisma.ConversationWhereInput | Prisma.ConversationWhereInput[]
  OR?: Prisma.ConversationWhereInput[]
  NOT?: Prisma.ConversationWhereInput | Prisma.ConversationWhereInput[]
  remoteJid?: Prisma.StringFilter<"Conversation"> | string
  instance?: Prisma.StringFilter<"Conversation"> | string
  needsHuman?: Prisma.BoolFilter<"Conversation"> | boolean
  createdAt?: Prisma.DateTimeFilter<"Conversation"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Conversation"> | Date | string
  messages?: Prisma.MessageListRelationFilter
}, "id" | "remoteJid_instance">

export type ConversationOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  remoteJid?: Prisma.SortOrder
  instance?: Prisma.SortOrder
  needsHuman?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.ConversationCountOrderByAggregateInput
  _avg?: Prisma.ConversationAvgOrderByAggregateInput
  _max?: Prisma.ConversationMaxOrderByAggregateInput
  _min?: Prisma.ConversationMinOrderByAggregateInput
  _sum?: Prisma.ConversationSumOrderByAggregateInput
}

export type ConversationScalarWhereWithAggregatesInput = {
  AND?: Prisma.ConversationScalarWhereWithAggregatesInput | Prisma.ConversationScalarWhereWithAggregatesInput[]
  OR?: Prisma.ConversationScalarWhereWithAggregatesInput[]
  NOT?: Prisma.ConversationScalarWhereWithAggregatesInput | Prisma.ConversationScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"Conversation"> | number
  remoteJid?: Prisma.StringWithAggregatesFilter<"Conversation"> | string
  instance?: Prisma.StringWithAggregatesFilter<"Conversation"> | string
  needsHuman?: Prisma.BoolWithAggregatesFilter<"Conversation"> | boolean
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Conversation"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Conversation"> | Date | string
}

export type ConversationCreateInput = {
  remoteJid: string
  instance?: string
  needsHuman?: boolean
  createdAt?: Date | string
  updatedAt?: Date | string
  messages?: Prisma.MessageCreateNestedManyWithoutConversationInput
}

export type ConversationUncheckedCreateInput = {
  id?: number
  remoteJid: string
  instance?: string
  needsHuman?: boolean
  createdAt?: Date | string
  updatedAt?: Date | string
  messages?: Prisma.MessageUncheckedCreateNestedManyWithoutConversationInput
}

export type ConversationUpdateInput = {
  remoteJid?: Prisma.StringFieldUpdateOperationsInput | string
  instance?: Prisma.StringFieldUpdateOperationsInput | string
  needsHuman?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  messages?: Prisma.MessageUpdateManyWithoutConversationNestedInput
}

export type ConversationUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  remoteJid?: Prisma.StringFieldUpdateOperationsInput | string
  instance?: Prisma.StringFieldUpdateOperationsInput | string
  needsHuman?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  messages?: Prisma.MessageUncheckedUpdateManyWithoutConversationNestedInput
}

export type ConversationCreateManyInput = {
  id?: number
  remoteJid: string
  instance?: string
  needsHuman?: boolean
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type ConversationUpdateManyMutationInput = {
  remoteJid?: Prisma.StringFieldUpdateOperationsInput | string
  instance?: Prisma.StringFieldUpdateOperationsInput | string
  needsHuman?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type ConversationUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  remoteJid?: Prisma.StringFieldUpdateOperationsInput | string
  instance?: Prisma.StringFieldUpdateOperationsInput | string
  needsHuman?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type ConversationRemoteJidInstanceCompoundUniqueInput = {
  remoteJid: string
  instance: string
}

export type ConversationCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  remoteJid?: Prisma.SortOrder
  instance?: Prisma.SortOrder
  needsHuman?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type ConversationAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
}

export type ConversationMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  remoteJid?: Prisma.SortOrder
  instance?: Prisma.SortOrder
  needsHuman?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type ConversationMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  remoteJid?: Prisma.SortOrder
  instance?: Prisma.SortOrder
  needsHuman?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type ConversationSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
}

export type ConversationScalarRelationFilter = {
  is?: Prisma.ConversationWhereInput
  isNot?: Prisma.ConversationWhereInput
}

export type StringFieldUpdateOperationsInput = {
  set?: string
}

export type BoolFieldUpdateOperationsInput = {
  set?: boolean
}

export type DateTimeFieldUpdateOperationsInput = {
  set?: Date | string
}

export type IntFieldUpdateOperationsInput = {
  set?: number
  increment?: number
  decrement?: number
  multiply?: number
  divide?: number
}

export type ConversationCreateNestedOneWithoutMessagesInput = {
  create?: Prisma.XOR<Prisma.ConversationCreateWithoutMessagesInput, Prisma.ConversationUncheckedCreateWithoutMessagesInput>
  connectOrCreate?: Prisma.ConversationCreateOrConnectWithoutMessagesInput
  connect?: Prisma.ConversationWhereUniqueInput
}

export type ConversationUpdateOneRequiredWithoutMessagesNestedInput = {
  create?: Prisma.XOR<Prisma.ConversationCreateWithoutMessagesInput, Prisma.ConversationUncheckedCreateWithoutMessagesInput>
  connectOrCreate?: Prisma.ConversationCreateOrConnectWithoutMessagesInput
  upsert?: Prisma.ConversationUpsertWithoutMessagesInput
  connect?: Prisma.ConversationWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.ConversationUpdateToOneWithWhereWithoutMessagesInput, Prisma.ConversationUpdateWithoutMessagesInput>, Prisma.ConversationUncheckedUpdateWithoutMessagesInput>
}

export type ConversationCreateWithoutMessagesInput = {
  remoteJid: string
  instance?: string
  needsHuman?: boolean
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type ConversationUncheckedCreateWithoutMessagesInput = {
  id?: number
  remoteJid: string
  instance?: string
  needsHuman?: boolean
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type ConversationCreateOrConnectWithoutMessagesInput = {
  where: Prisma.ConversationWhereUniqueInput
  create: Prisma.XOR<Prisma.ConversationCreateWithoutMessagesInput, Prisma.ConversationUncheckedCreateWithoutMessagesInput>
}

export type ConversationUpsertWithoutMessagesInput = {
  update: Prisma.XOR<Prisma.ConversationUpdateWithoutMessagesInput, Prisma.ConversationUncheckedUpdateWithoutMessagesInput>
  create: Prisma.XOR<Prisma.ConversationCreateWithoutMessagesInput, Prisma.ConversationUncheckedCreateWithoutMessagesInput>
  where?: Prisma.ConversationWhereInput
}

export type ConversationUpdateToOneWithWhereWithoutMessagesInput = {
  where?: Prisma.ConversationWhereInput
  data: Prisma.XOR<Prisma.ConversationUpdateWithoutMessagesInput, Prisma.ConversationUncheckedUpdateWithoutMessagesInput>
}

export type ConversationUpdateWithoutMessagesInput = {
  remoteJid?: Prisma.StringFieldUpdateOperationsInput | string
  instance?: Prisma.StringFieldUpdateOperationsInput | string
  needsHuman?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type ConversationUncheckedUpdateWithoutMessagesInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  remoteJid?: Prisma.StringFieldUpdateOperationsInput | string
  instance?: Prisma.StringFieldUpdateOperationsInput | string
  needsHuman?: Prisma.BoolFieldUpdateOperationsInput | boolean
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}


/**
 * Count Type ConversationCountOutputType
 */

export type ConversationCountOutputType = {
  messages: number
}

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

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

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


export type ConversationSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  remoteJid?: boolean
  instance?: boolean
  needsHuman?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  messages?: boolean | Prisma.Conversation$messagesArgs<ExtArgs>
  _count?: boolean | Prisma.ConversationCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["conversation"]>

export type ConversationSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  remoteJid?: boolean
  instance?: boolean
  needsHuman?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}, ExtArgs["result"]["conversation"]>

export type ConversationSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  remoteJid?: boolean
  instance?: boolean
  needsHuman?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}, ExtArgs["result"]["conversation"]>

export type ConversationSelectScalar = {
  id?: boolean
  remoteJid?: boolean
  instance?: boolean
  needsHuman?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type ConversationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "remoteJid" | "instance" | "needsHuman" | "createdAt" | "updatedAt", ExtArgs["result"]["conversation"]>
export type ConversationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  messages?: boolean | Prisma.Conversation$messagesArgs<ExtArgs>
  _count?: boolean | Prisma.ConversationCountOutputTypeDefaultArgs<ExtArgs>
}
export type ConversationIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type ConversationIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}

export type $ConversationPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Conversation"
  objects: {
    messages: Prisma.$MessagePayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    remoteJid: string
    instance: string
    needsHuman: boolean
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["conversation"]>
  composites: {}
}

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

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

export interface ConversationDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.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: Prisma.SelectSubset<T, ConversationFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ConversationClient<runtime.Types.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: Prisma.SelectSubset<T, ConversationFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ConversationClient<runtime.Types.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?: Prisma.SelectSubset<T, ConversationFindFirstArgs<ExtArgs>>): Prisma.Prisma__ConversationClient<runtime.Types.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?: Prisma.SelectSubset<T, ConversationFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ConversationClient<runtime.Types.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?: Prisma.SelectSubset<T, ConversationFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.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: Prisma.SelectSubset<T, ConversationCreateArgs<ExtArgs>>): Prisma.Prisma__ConversationClient<runtime.Types.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?: Prisma.SelectSubset<T, ConversationCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.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?: Prisma.SelectSubset<T, ConversationCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.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: Prisma.SelectSubset<T, ConversationDeleteArgs<ExtArgs>>): Prisma.Prisma__ConversationClient<runtime.Types.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: Prisma.SelectSubset<T, ConversationUpdateArgs<ExtArgs>>): Prisma.Prisma__ConversationClient<runtime.Types.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?: Prisma.SelectSubset<T, ConversationDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.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: Prisma.SelectSubset<T, ConversationUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.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: Prisma.SelectSubset<T, ConversationUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.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: Prisma.SelectSubset<T, ConversationUpsertArgs<ExtArgs>>): Prisma.Prisma__ConversationClient<runtime.Types.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?: Prisma.Subset<T, ConversationCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.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: Prisma.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 Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: ConversationGroupByArgs['orderBy'] }
      : { orderBy?: ConversationGroupByArgs['orderBy'] },
    OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
    ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
    ByValid extends Prisma.Has<ByFields, OrderFields>,
    HavingFields extends Prisma.GetHavingFields<T['having']>,
    HavingValid extends Prisma.Has<ByFields, HavingFields>,
    ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
    InputErrors extends ByEmpty extends Prisma.True
    ? `Error: "by" must not be empty.`
    : HavingValid extends Prisma.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 Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.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 Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.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 Prisma.True
    ? {}
    : {
        [P in OrderFields]: P extends ByFields
          ? never
          : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
      }[OrderFields]
  >(args: Prisma.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 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  messages<T extends Prisma.Conversation$messagesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Conversation$messagesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise<T>
}




/**
 * Fields of the Conversation model
 */
export interface ConversationFieldRefs {
  readonly id: Prisma.FieldRef<"Conversation", 'Int'>
  readonly remoteJid: Prisma.FieldRef<"Conversation", 'String'>
  readonly instance: Prisma.FieldRef<"Conversation", 'String'>
  readonly needsHuman: Prisma.FieldRef<"Conversation", 'Boolean'>
  readonly createdAt: Prisma.FieldRef<"Conversation", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"Conversation", 'DateTime'>
}
    

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

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

/**
 * Conversation findFirst
 */
export type ConversationFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Conversation
   */
  select?: Prisma.ConversationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Conversation
   */
  omit?: Prisma.ConversationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ConversationInclude<ExtArgs> | null
  /**
   * Filter, which Conversation to fetch.
   */
  where?: Prisma.ConversationWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Conversations to fetch.
   */
  orderBy?: Prisma.ConversationOrderByWithRelationInput | Prisma.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?: Prisma.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?: Prisma.ConversationScalarFieldEnum | Prisma.ConversationScalarFieldEnum[]
}

/**
 * Conversation findFirstOrThrow
 */
export type ConversationFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Conversation
   */
  select?: Prisma.ConversationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Conversation
   */
  omit?: Prisma.ConversationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ConversationInclude<ExtArgs> | null
  /**
   * Filter, which Conversation to fetch.
   */
  where?: Prisma.ConversationWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Conversations to fetch.
   */
  orderBy?: Prisma.ConversationOrderByWithRelationInput | Prisma.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?: Prisma.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?: Prisma.ConversationScalarFieldEnum | Prisma.ConversationScalarFieldEnum[]
}

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

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

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

/**
 * Conversation createManyAndReturn
 */
export type ConversationCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Conversation
   */
  select?: Prisma.ConversationSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Conversation
   */
  omit?: Prisma.ConversationOmit<ExtArgs> | null
  /**
   * The data used to create many Conversations.
   */
  data: Prisma.ConversationCreateManyInput | Prisma.ConversationCreateManyInput[]
}

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

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

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

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

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

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

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

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