
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `thread_sessions` 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.js"
import type * as Prisma from "../internal/prismaNamespace.js"

/**
 * Model thread_sessions
 * 
 */
export type thread_sessionsModel = runtime.Types.Result.DefaultSelection<Prisma.$thread_sessionsPayload>

export type AggregateThread_sessions = {
  _count: Thread_sessionsCountAggregateOutputType | null
  _min: Thread_sessionsMinAggregateOutputType | null
  _max: Thread_sessionsMaxAggregateOutputType | null
}

export type Thread_sessionsMinAggregateOutputType = {
  thread_id: string | null
  session_id: string | null
  created_at: Date | null
}

export type Thread_sessionsMaxAggregateOutputType = {
  thread_id: string | null
  session_id: string | null
  created_at: Date | null
}

export type Thread_sessionsCountAggregateOutputType = {
  thread_id: number
  session_id: number
  created_at: number
  _all: number
}


export type Thread_sessionsMinAggregateInputType = {
  thread_id?: true
  session_id?: true
  created_at?: true
}

export type Thread_sessionsMaxAggregateInputType = {
  thread_id?: true
  session_id?: true
  created_at?: true
}

export type Thread_sessionsCountAggregateInputType = {
  thread_id?: true
  session_id?: true
  created_at?: true
  _all?: true
}

export type Thread_sessionsAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which thread_sessions to aggregate.
   */
  where?: Prisma.thread_sessionsWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of thread_sessions to fetch.
   */
  orderBy?: Prisma.thread_sessionsOrderByWithRelationInput | Prisma.thread_sessionsOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.thread_sessionsWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` thread_sessions 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` thread_sessions.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned thread_sessions
  **/
  _count?: true | Thread_sessionsCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: Thread_sessionsMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: Thread_sessionsMaxAggregateInputType
}

export type GetThread_sessionsAggregateType<T extends Thread_sessionsAggregateArgs> = {
      [P in keyof T & keyof AggregateThread_sessions]: P extends '_count' | 'count'
    ? T[P] extends true
      ? number
      : Prisma.GetScalarType<T[P], AggregateThread_sessions[P]>
    : Prisma.GetScalarType<T[P], AggregateThread_sessions[P]>
}




export type thread_sessionsGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.thread_sessionsWhereInput
  orderBy?: Prisma.thread_sessionsOrderByWithAggregationInput | Prisma.thread_sessionsOrderByWithAggregationInput[]
  by: Prisma.Thread_sessionsScalarFieldEnum[] | Prisma.Thread_sessionsScalarFieldEnum
  having?: Prisma.thread_sessionsScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: Thread_sessionsCountAggregateInputType | true
  _min?: Thread_sessionsMinAggregateInputType
  _max?: Thread_sessionsMaxAggregateInputType
}

export type Thread_sessionsGroupByOutputType = {
  thread_id: string
  session_id: string
  created_at: Date | null
  _count: Thread_sessionsCountAggregateOutputType | null
  _min: Thread_sessionsMinAggregateOutputType | null
  _max: Thread_sessionsMaxAggregateOutputType | null
}

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



export type thread_sessionsWhereInput = {
  AND?: Prisma.thread_sessionsWhereInput | Prisma.thread_sessionsWhereInput[]
  OR?: Prisma.thread_sessionsWhereInput[]
  NOT?: Prisma.thread_sessionsWhereInput | Prisma.thread_sessionsWhereInput[]
  thread_id?: Prisma.StringFilter<"thread_sessions"> | string
  session_id?: Prisma.StringFilter<"thread_sessions"> | string
  created_at?: Prisma.DateTimeNullableFilter<"thread_sessions"> | Date | string | null
  part_messages?: Prisma.Part_messagesListRelationFilter
  session_events?: Prisma.Session_eventsListRelationFilter
  scheduled_tasks?: Prisma.Scheduled_tasksListRelationFilter
  thread_worktree?: Prisma.XOR<Prisma.Thread_worktreesNullableScalarRelationFilter, Prisma.thread_worktreesWhereInput> | null
  ipc_requests?: Prisma.Ipc_requestsListRelationFilter
}

export type thread_sessionsOrderByWithRelationInput = {
  thread_id?: Prisma.SortOrder
  session_id?: Prisma.SortOrder
  created_at?: Prisma.SortOrderInput | Prisma.SortOrder
  part_messages?: Prisma.part_messagesOrderByRelationAggregateInput
  session_events?: Prisma.session_eventsOrderByRelationAggregateInput
  scheduled_tasks?: Prisma.scheduled_tasksOrderByRelationAggregateInput
  thread_worktree?: Prisma.thread_worktreesOrderByWithRelationInput
  ipc_requests?: Prisma.ipc_requestsOrderByRelationAggregateInput
}

export type thread_sessionsWhereUniqueInput = Prisma.AtLeast<{
  thread_id?: string
  AND?: Prisma.thread_sessionsWhereInput | Prisma.thread_sessionsWhereInput[]
  OR?: Prisma.thread_sessionsWhereInput[]
  NOT?: Prisma.thread_sessionsWhereInput | Prisma.thread_sessionsWhereInput[]
  session_id?: Prisma.StringFilter<"thread_sessions"> | string
  created_at?: Prisma.DateTimeNullableFilter<"thread_sessions"> | Date | string | null
  part_messages?: Prisma.Part_messagesListRelationFilter
  session_events?: Prisma.Session_eventsListRelationFilter
  scheduled_tasks?: Prisma.Scheduled_tasksListRelationFilter
  thread_worktree?: Prisma.XOR<Prisma.Thread_worktreesNullableScalarRelationFilter, Prisma.thread_worktreesWhereInput> | null
  ipc_requests?: Prisma.Ipc_requestsListRelationFilter
}, "thread_id">

export type thread_sessionsOrderByWithAggregationInput = {
  thread_id?: Prisma.SortOrder
  session_id?: Prisma.SortOrder
  created_at?: Prisma.SortOrderInput | Prisma.SortOrder
  _count?: Prisma.thread_sessionsCountOrderByAggregateInput
  _max?: Prisma.thread_sessionsMaxOrderByAggregateInput
  _min?: Prisma.thread_sessionsMinOrderByAggregateInput
}

export type thread_sessionsScalarWhereWithAggregatesInput = {
  AND?: Prisma.thread_sessionsScalarWhereWithAggregatesInput | Prisma.thread_sessionsScalarWhereWithAggregatesInput[]
  OR?: Prisma.thread_sessionsScalarWhereWithAggregatesInput[]
  NOT?: Prisma.thread_sessionsScalarWhereWithAggregatesInput | Prisma.thread_sessionsScalarWhereWithAggregatesInput[]
  thread_id?: Prisma.StringWithAggregatesFilter<"thread_sessions"> | string
  session_id?: Prisma.StringWithAggregatesFilter<"thread_sessions"> | string
  created_at?: Prisma.DateTimeNullableWithAggregatesFilter<"thread_sessions"> | Date | string | null
}

export type thread_sessionsCreateInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesCreateNestedManyWithoutThreadInput
  session_events?: Prisma.session_eventsCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesCreateNestedOneWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsCreateNestedManyWithoutThreadInput
}

export type thread_sessionsUncheckedCreateInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesUncheckedCreateNestedManyWithoutThreadInput
  session_events?: Prisma.session_eventsUncheckedCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesUncheckedCreateNestedOneWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsUncheckedCreateNestedManyWithoutThreadInput
}

export type thread_sessionsUpdateInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUpdateManyWithoutThreadNestedInput
  session_events?: Prisma.session_eventsUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUpdateOneWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsUncheckedUpdateInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUncheckedUpdateManyWithoutThreadNestedInput
  session_events?: Prisma.session_eventsUncheckedUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUncheckedUpdateOneWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUncheckedUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsCreateManyInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
}

export type thread_sessionsUpdateManyMutationInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type thread_sessionsUncheckedUpdateManyInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
}

export type thread_sessionsCountOrderByAggregateInput = {
  thread_id?: Prisma.SortOrder
  session_id?: Prisma.SortOrder
  created_at?: Prisma.SortOrder
}

export type thread_sessionsMaxOrderByAggregateInput = {
  thread_id?: Prisma.SortOrder
  session_id?: Prisma.SortOrder
  created_at?: Prisma.SortOrder
}

export type thread_sessionsMinOrderByAggregateInput = {
  thread_id?: Prisma.SortOrder
  session_id?: Prisma.SortOrder
  created_at?: Prisma.SortOrder
}

export type Thread_sessionsScalarRelationFilter = {
  is?: Prisma.thread_sessionsWhereInput
  isNot?: Prisma.thread_sessionsWhereInput
}

export type Thread_sessionsNullableScalarRelationFilter = {
  is?: Prisma.thread_sessionsWhereInput | null
  isNot?: Prisma.thread_sessionsWhereInput | null
}

export type StringFieldUpdateOperationsInput = {
  set?: string
}

export type NullableDateTimeFieldUpdateOperationsInput = {
  set?: Date | string | null
}

export type thread_sessionsCreateNestedOneWithoutSession_eventsInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutSession_eventsInput, Prisma.thread_sessionsUncheckedCreateWithoutSession_eventsInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutSession_eventsInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
}

export type thread_sessionsUpdateOneRequiredWithoutSession_eventsNestedInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutSession_eventsInput, Prisma.thread_sessionsUncheckedCreateWithoutSession_eventsInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutSession_eventsInput
  upsert?: Prisma.thread_sessionsUpsertWithoutSession_eventsInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.thread_sessionsUpdateToOneWithWhereWithoutSession_eventsInput, Prisma.thread_sessionsUpdateWithoutSession_eventsInput>, Prisma.thread_sessionsUncheckedUpdateWithoutSession_eventsInput>
}

export type thread_sessionsCreateNestedOneWithoutPart_messagesInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutPart_messagesInput, Prisma.thread_sessionsUncheckedCreateWithoutPart_messagesInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutPart_messagesInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
}

export type thread_sessionsUpdateOneRequiredWithoutPart_messagesNestedInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutPart_messagesInput, Prisma.thread_sessionsUncheckedCreateWithoutPart_messagesInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutPart_messagesInput
  upsert?: Prisma.thread_sessionsUpsertWithoutPart_messagesInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.thread_sessionsUpdateToOneWithWhereWithoutPart_messagesInput, Prisma.thread_sessionsUpdateWithoutPart_messagesInput>, Prisma.thread_sessionsUncheckedUpdateWithoutPart_messagesInput>
}

export type thread_sessionsCreateNestedOneWithoutThread_worktreeInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutThread_worktreeInput, Prisma.thread_sessionsUncheckedCreateWithoutThread_worktreeInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutThread_worktreeInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
}

export type thread_sessionsUpdateOneRequiredWithoutThread_worktreeNestedInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutThread_worktreeInput, Prisma.thread_sessionsUncheckedCreateWithoutThread_worktreeInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutThread_worktreeInput
  upsert?: Prisma.thread_sessionsUpsertWithoutThread_worktreeInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.thread_sessionsUpdateToOneWithWhereWithoutThread_worktreeInput, Prisma.thread_sessionsUpdateWithoutThread_worktreeInput>, Prisma.thread_sessionsUncheckedUpdateWithoutThread_worktreeInput>
}

export type thread_sessionsCreateNestedOneWithoutScheduled_tasksInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutScheduled_tasksInput, Prisma.thread_sessionsUncheckedCreateWithoutScheduled_tasksInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutScheduled_tasksInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
}

export type thread_sessionsUpdateOneWithoutScheduled_tasksNestedInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutScheduled_tasksInput, Prisma.thread_sessionsUncheckedCreateWithoutScheduled_tasksInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutScheduled_tasksInput
  upsert?: Prisma.thread_sessionsUpsertWithoutScheduled_tasksInput
  disconnect?: Prisma.thread_sessionsWhereInput | boolean
  delete?: Prisma.thread_sessionsWhereInput | boolean
  connect?: Prisma.thread_sessionsWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.thread_sessionsUpdateToOneWithWhereWithoutScheduled_tasksInput, Prisma.thread_sessionsUpdateWithoutScheduled_tasksInput>, Prisma.thread_sessionsUncheckedUpdateWithoutScheduled_tasksInput>
}

export type thread_sessionsCreateNestedOneWithoutIpc_requestsInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutIpc_requestsInput, Prisma.thread_sessionsUncheckedCreateWithoutIpc_requestsInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutIpc_requestsInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
}

export type thread_sessionsUpdateOneRequiredWithoutIpc_requestsNestedInput = {
  create?: Prisma.XOR<Prisma.thread_sessionsCreateWithoutIpc_requestsInput, Prisma.thread_sessionsUncheckedCreateWithoutIpc_requestsInput>
  connectOrCreate?: Prisma.thread_sessionsCreateOrConnectWithoutIpc_requestsInput
  upsert?: Prisma.thread_sessionsUpsertWithoutIpc_requestsInput
  connect?: Prisma.thread_sessionsWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.thread_sessionsUpdateToOneWithWhereWithoutIpc_requestsInput, Prisma.thread_sessionsUpdateWithoutIpc_requestsInput>, Prisma.thread_sessionsUncheckedUpdateWithoutIpc_requestsInput>
}

export type thread_sessionsCreateWithoutSession_eventsInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesCreateNestedOneWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsCreateNestedManyWithoutThreadInput
}

export type thread_sessionsUncheckedCreateWithoutSession_eventsInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesUncheckedCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesUncheckedCreateNestedOneWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsUncheckedCreateNestedManyWithoutThreadInput
}

export type thread_sessionsCreateOrConnectWithoutSession_eventsInput = {
  where: Prisma.thread_sessionsWhereUniqueInput
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutSession_eventsInput, Prisma.thread_sessionsUncheckedCreateWithoutSession_eventsInput>
}

export type thread_sessionsUpsertWithoutSession_eventsInput = {
  update: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutSession_eventsInput, Prisma.thread_sessionsUncheckedUpdateWithoutSession_eventsInput>
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutSession_eventsInput, Prisma.thread_sessionsUncheckedCreateWithoutSession_eventsInput>
  where?: Prisma.thread_sessionsWhereInput
}

export type thread_sessionsUpdateToOneWithWhereWithoutSession_eventsInput = {
  where?: Prisma.thread_sessionsWhereInput
  data: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutSession_eventsInput, Prisma.thread_sessionsUncheckedUpdateWithoutSession_eventsInput>
}

export type thread_sessionsUpdateWithoutSession_eventsInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUpdateOneWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsUncheckedUpdateWithoutSession_eventsInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUncheckedUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUncheckedUpdateOneWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUncheckedUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsCreateWithoutPart_messagesInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  session_events?: Prisma.session_eventsCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesCreateNestedOneWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsCreateNestedManyWithoutThreadInput
}

export type thread_sessionsUncheckedCreateWithoutPart_messagesInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  session_events?: Prisma.session_eventsUncheckedCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesUncheckedCreateNestedOneWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsUncheckedCreateNestedManyWithoutThreadInput
}

export type thread_sessionsCreateOrConnectWithoutPart_messagesInput = {
  where: Prisma.thread_sessionsWhereUniqueInput
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutPart_messagesInput, Prisma.thread_sessionsUncheckedCreateWithoutPart_messagesInput>
}

export type thread_sessionsUpsertWithoutPart_messagesInput = {
  update: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutPart_messagesInput, Prisma.thread_sessionsUncheckedUpdateWithoutPart_messagesInput>
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutPart_messagesInput, Prisma.thread_sessionsUncheckedCreateWithoutPart_messagesInput>
  where?: Prisma.thread_sessionsWhereInput
}

export type thread_sessionsUpdateToOneWithWhereWithoutPart_messagesInput = {
  where?: Prisma.thread_sessionsWhereInput
  data: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutPart_messagesInput, Prisma.thread_sessionsUncheckedUpdateWithoutPart_messagesInput>
}

export type thread_sessionsUpdateWithoutPart_messagesInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  session_events?: Prisma.session_eventsUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUpdateOneWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsUncheckedUpdateWithoutPart_messagesInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  session_events?: Prisma.session_eventsUncheckedUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUncheckedUpdateOneWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUncheckedUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsCreateWithoutThread_worktreeInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesCreateNestedManyWithoutThreadInput
  session_events?: Prisma.session_eventsCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksCreateNestedManyWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsCreateNestedManyWithoutThreadInput
}

export type thread_sessionsUncheckedCreateWithoutThread_worktreeInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesUncheckedCreateNestedManyWithoutThreadInput
  session_events?: Prisma.session_eventsUncheckedCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedCreateNestedManyWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsUncheckedCreateNestedManyWithoutThreadInput
}

export type thread_sessionsCreateOrConnectWithoutThread_worktreeInput = {
  where: Prisma.thread_sessionsWhereUniqueInput
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutThread_worktreeInput, Prisma.thread_sessionsUncheckedCreateWithoutThread_worktreeInput>
}

export type thread_sessionsUpsertWithoutThread_worktreeInput = {
  update: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutThread_worktreeInput, Prisma.thread_sessionsUncheckedUpdateWithoutThread_worktreeInput>
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutThread_worktreeInput, Prisma.thread_sessionsUncheckedCreateWithoutThread_worktreeInput>
  where?: Prisma.thread_sessionsWhereInput
}

export type thread_sessionsUpdateToOneWithWhereWithoutThread_worktreeInput = {
  where?: Prisma.thread_sessionsWhereInput
  data: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutThread_worktreeInput, Prisma.thread_sessionsUncheckedUpdateWithoutThread_worktreeInput>
}

export type thread_sessionsUpdateWithoutThread_worktreeInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUpdateManyWithoutThreadNestedInput
  session_events?: Prisma.session_eventsUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUpdateManyWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsUncheckedUpdateWithoutThread_worktreeInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUncheckedUpdateManyWithoutThreadNestedInput
  session_events?: Prisma.session_eventsUncheckedUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedUpdateManyWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUncheckedUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsCreateWithoutScheduled_tasksInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesCreateNestedManyWithoutThreadInput
  session_events?: Prisma.session_eventsCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesCreateNestedOneWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsCreateNestedManyWithoutThreadInput
}

export type thread_sessionsUncheckedCreateWithoutScheduled_tasksInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesUncheckedCreateNestedManyWithoutThreadInput
  session_events?: Prisma.session_eventsUncheckedCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesUncheckedCreateNestedOneWithoutThreadInput
  ipc_requests?: Prisma.ipc_requestsUncheckedCreateNestedManyWithoutThreadInput
}

export type thread_sessionsCreateOrConnectWithoutScheduled_tasksInput = {
  where: Prisma.thread_sessionsWhereUniqueInput
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutScheduled_tasksInput, Prisma.thread_sessionsUncheckedCreateWithoutScheduled_tasksInput>
}

export type thread_sessionsUpsertWithoutScheduled_tasksInput = {
  update: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutScheduled_tasksInput, Prisma.thread_sessionsUncheckedUpdateWithoutScheduled_tasksInput>
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutScheduled_tasksInput, Prisma.thread_sessionsUncheckedCreateWithoutScheduled_tasksInput>
  where?: Prisma.thread_sessionsWhereInput
}

export type thread_sessionsUpdateToOneWithWhereWithoutScheduled_tasksInput = {
  where?: Prisma.thread_sessionsWhereInput
  data: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutScheduled_tasksInput, Prisma.thread_sessionsUncheckedUpdateWithoutScheduled_tasksInput>
}

export type thread_sessionsUpdateWithoutScheduled_tasksInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUpdateManyWithoutThreadNestedInput
  session_events?: Prisma.session_eventsUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUpdateOneWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsUncheckedUpdateWithoutScheduled_tasksInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUncheckedUpdateManyWithoutThreadNestedInput
  session_events?: Prisma.session_eventsUncheckedUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUncheckedUpdateOneWithoutThreadNestedInput
  ipc_requests?: Prisma.ipc_requestsUncheckedUpdateManyWithoutThreadNestedInput
}

export type thread_sessionsCreateWithoutIpc_requestsInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesCreateNestedManyWithoutThreadInput
  session_events?: Prisma.session_eventsCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesCreateNestedOneWithoutThreadInput
}

export type thread_sessionsUncheckedCreateWithoutIpc_requestsInput = {
  thread_id: string
  session_id: string
  created_at?: Date | string | null
  part_messages?: Prisma.part_messagesUncheckedCreateNestedManyWithoutThreadInput
  session_events?: Prisma.session_eventsUncheckedCreateNestedManyWithoutThreadInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedCreateNestedManyWithoutThreadInput
  thread_worktree?: Prisma.thread_worktreesUncheckedCreateNestedOneWithoutThreadInput
}

export type thread_sessionsCreateOrConnectWithoutIpc_requestsInput = {
  where: Prisma.thread_sessionsWhereUniqueInput
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutIpc_requestsInput, Prisma.thread_sessionsUncheckedCreateWithoutIpc_requestsInput>
}

export type thread_sessionsUpsertWithoutIpc_requestsInput = {
  update: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutIpc_requestsInput, Prisma.thread_sessionsUncheckedUpdateWithoutIpc_requestsInput>
  create: Prisma.XOR<Prisma.thread_sessionsCreateWithoutIpc_requestsInput, Prisma.thread_sessionsUncheckedCreateWithoutIpc_requestsInput>
  where?: Prisma.thread_sessionsWhereInput
}

export type thread_sessionsUpdateToOneWithWhereWithoutIpc_requestsInput = {
  where?: Prisma.thread_sessionsWhereInput
  data: Prisma.XOR<Prisma.thread_sessionsUpdateWithoutIpc_requestsInput, Prisma.thread_sessionsUncheckedUpdateWithoutIpc_requestsInput>
}

export type thread_sessionsUpdateWithoutIpc_requestsInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUpdateManyWithoutThreadNestedInput
  session_events?: Prisma.session_eventsUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUpdateOneWithoutThreadNestedInput
}

export type thread_sessionsUncheckedUpdateWithoutIpc_requestsInput = {
  thread_id?: Prisma.StringFieldUpdateOperationsInput | string
  session_id?: Prisma.StringFieldUpdateOperationsInput | string
  created_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  part_messages?: Prisma.part_messagesUncheckedUpdateManyWithoutThreadNestedInput
  session_events?: Prisma.session_eventsUncheckedUpdateManyWithoutThreadNestedInput
  scheduled_tasks?: Prisma.scheduled_tasksUncheckedUpdateManyWithoutThreadNestedInput
  thread_worktree?: Prisma.thread_worktreesUncheckedUpdateOneWithoutThreadNestedInput
}


/**
 * Count Type Thread_sessionsCountOutputType
 */

export type Thread_sessionsCountOutputType = {
  part_messages: number
  session_events: number
  scheduled_tasks: number
  ipc_requests: number
}

export type Thread_sessionsCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  part_messages?: boolean | Thread_sessionsCountOutputTypeCountPart_messagesArgs
  session_events?: boolean | Thread_sessionsCountOutputTypeCountSession_eventsArgs
  scheduled_tasks?: boolean | Thread_sessionsCountOutputTypeCountScheduled_tasksArgs
  ipc_requests?: boolean | Thread_sessionsCountOutputTypeCountIpc_requestsArgs
}

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

/**
 * Thread_sessionsCountOutputType without action
 */
export type Thread_sessionsCountOutputTypeCountPart_messagesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.part_messagesWhereInput
}

/**
 * Thread_sessionsCountOutputType without action
 */
export type Thread_sessionsCountOutputTypeCountSession_eventsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.session_eventsWhereInput
}

/**
 * Thread_sessionsCountOutputType without action
 */
export type Thread_sessionsCountOutputTypeCountScheduled_tasksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.scheduled_tasksWhereInput
}

/**
 * Thread_sessionsCountOutputType without action
 */
export type Thread_sessionsCountOutputTypeCountIpc_requestsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ipc_requestsWhereInput
}


export type thread_sessionsSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  thread_id?: boolean
  session_id?: boolean
  created_at?: boolean
  part_messages?: boolean | Prisma.thread_sessions$part_messagesArgs<ExtArgs>
  session_events?: boolean | Prisma.thread_sessions$session_eventsArgs<ExtArgs>
  scheduled_tasks?: boolean | Prisma.thread_sessions$scheduled_tasksArgs<ExtArgs>
  thread_worktree?: boolean | Prisma.thread_sessions$thread_worktreeArgs<ExtArgs>
  ipc_requests?: boolean | Prisma.thread_sessions$ipc_requestsArgs<ExtArgs>
  _count?: boolean | Prisma.Thread_sessionsCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["thread_sessions"]>

export type thread_sessionsSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  thread_id?: boolean
  session_id?: boolean
  created_at?: boolean
}, ExtArgs["result"]["thread_sessions"]>

export type thread_sessionsSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  thread_id?: boolean
  session_id?: boolean
  created_at?: boolean
}, ExtArgs["result"]["thread_sessions"]>

export type thread_sessionsSelectScalar = {
  thread_id?: boolean
  session_id?: boolean
  created_at?: boolean
}

export type thread_sessionsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"thread_id" | "session_id" | "created_at", ExtArgs["result"]["thread_sessions"]>
export type thread_sessionsInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  part_messages?: boolean | Prisma.thread_sessions$part_messagesArgs<ExtArgs>
  session_events?: boolean | Prisma.thread_sessions$session_eventsArgs<ExtArgs>
  scheduled_tasks?: boolean | Prisma.thread_sessions$scheduled_tasksArgs<ExtArgs>
  thread_worktree?: boolean | Prisma.thread_sessions$thread_worktreeArgs<ExtArgs>
  ipc_requests?: boolean | Prisma.thread_sessions$ipc_requestsArgs<ExtArgs>
  _count?: boolean | Prisma.Thread_sessionsCountOutputTypeDefaultArgs<ExtArgs>
}
export type thread_sessionsIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type thread_sessionsIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}

export type $thread_sessionsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "thread_sessions"
  objects: {
    part_messages: Prisma.$part_messagesPayload<ExtArgs>[]
    session_events: Prisma.$session_eventsPayload<ExtArgs>[]
    scheduled_tasks: Prisma.$scheduled_tasksPayload<ExtArgs>[]
    thread_worktree: Prisma.$thread_worktreesPayload<ExtArgs> | null
    ipc_requests: Prisma.$ipc_requestsPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    thread_id: string
    session_id: string
    created_at: Date | null
  }, ExtArgs["result"]["thread_sessions"]>
  composites: {}
}

export type thread_sessionsGetPayload<S extends boolean | null | undefined | thread_sessionsDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$thread_sessionsPayload, S>

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

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

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

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

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

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

  /**
   * Create a Thread_sessions.
   * @param {thread_sessionsCreateArgs} args - Arguments to create a Thread_sessions.
   * @example
   * // Create one Thread_sessions
   * const Thread_sessions = await prisma.thread_sessions.create({
   *   data: {
   *     // ... data to create a Thread_sessions
   *   }
   * })
   * 
   */
  create<T extends thread_sessionsCreateArgs>(args: Prisma.SelectSubset<T, thread_sessionsCreateArgs<ExtArgs>>): Prisma.Prisma__thread_sessionsClient<runtime.Types.Result.GetResult<Prisma.$thread_sessionsPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

  /**
   * Create many Thread_sessions and returns the data saved in the database.
   * @param {thread_sessionsCreateManyAndReturnArgs} args - Arguments to create many Thread_sessions.
   * @example
   * // Create many Thread_sessions
   * const thread_sessions = await prisma.thread_sessions.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Create many Thread_sessions and only return the `thread_id`
   * const thread_sessionsWithThread_idOnly = await prisma.thread_sessions.createManyAndReturn({
   *   select: { thread_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 thread_sessionsCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, thread_sessionsCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$thread_sessionsPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

  /**
   * Delete a Thread_sessions.
   * @param {thread_sessionsDeleteArgs} args - Arguments to delete one Thread_sessions.
   * @example
   * // Delete one Thread_sessions
   * const Thread_sessions = await prisma.thread_sessions.delete({
   *   where: {
   *     // ... filter to delete one Thread_sessions
   *   }
   * })
   * 
   */
  delete<T extends thread_sessionsDeleteArgs>(args: Prisma.SelectSubset<T, thread_sessionsDeleteArgs<ExtArgs>>): Prisma.Prisma__thread_sessionsClient<runtime.Types.Result.GetResult<Prisma.$thread_sessionsPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Update one Thread_sessions.
   * @param {thread_sessionsUpdateArgs} args - Arguments to update one Thread_sessions.
   * @example
   * // Update one Thread_sessions
   * const thread_sessions = await prisma.thread_sessions.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  update<T extends thread_sessionsUpdateArgs>(args: Prisma.SelectSubset<T, thread_sessionsUpdateArgs<ExtArgs>>): Prisma.Prisma__thread_sessionsClient<runtime.Types.Result.GetResult<Prisma.$thread_sessionsPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

  /**
   * Update zero or more Thread_sessions and returns the data updated in the database.
   * @param {thread_sessionsUpdateManyAndReturnArgs} args - Arguments to update many Thread_sessions.
   * @example
   * // Update many Thread_sessions
   * const thread_sessions = await prisma.thread_sessions.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Update zero or more Thread_sessions and only return the `thread_id`
   * const thread_sessionsWithThread_idOnly = await prisma.thread_sessions.updateManyAndReturn({
   *   select: { thread_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 thread_sessionsUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, thread_sessionsUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$thread_sessionsPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

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


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

  /**
   * Allows you to perform aggregations operations on a Thread_sessions.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {Thread_sessionsAggregateArgs} 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 Thread_sessionsAggregateArgs>(args: Prisma.Subset<T, Thread_sessionsAggregateArgs>): Prisma.PrismaPromise<GetThread_sessionsAggregateType<T>>

  /**
   * Group by Thread_sessions.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {thread_sessionsGroupByArgs} 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 thread_sessionsGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: thread_sessionsGroupByArgs['orderBy'] }
      : { orderBy?: thread_sessionsGroupByArgs['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, thread_sessionsGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetThread_sessionsGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the thread_sessions model
 */
readonly fields: thread_sessionsFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for thread_sessions.
 * 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__thread_sessionsClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  part_messages<T extends Prisma.thread_sessions$part_messagesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.thread_sessions$part_messagesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$part_messagesPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  session_events<T extends Prisma.thread_sessions$session_eventsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.thread_sessions$session_eventsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$session_eventsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  scheduled_tasks<T extends Prisma.thread_sessions$scheduled_tasksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.thread_sessions$scheduled_tasksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$scheduled_tasksPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  thread_worktree<T extends Prisma.thread_sessions$thread_worktreeArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.thread_sessions$thread_worktreeArgs<ExtArgs>>): Prisma.Prisma__thread_worktreesClient<runtime.Types.Result.GetResult<Prisma.$thread_worktreesPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
  ipc_requests<T extends Prisma.thread_sessions$ipc_requestsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.thread_sessions$ipc_requestsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ipc_requestsPayload<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 thread_sessions model
 */
export interface thread_sessionsFieldRefs {
  readonly thread_id: Prisma.FieldRef<"thread_sessions", 'String'>
  readonly session_id: Prisma.FieldRef<"thread_sessions", 'String'>
  readonly created_at: Prisma.FieldRef<"thread_sessions", 'DateTime'>
}
    

// Custom InputTypes
/**
 * thread_sessions findUnique
 */
export type thread_sessionsFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * Filter, which thread_sessions to fetch.
   */
  where: Prisma.thread_sessionsWhereUniqueInput
}

/**
 * thread_sessions findUniqueOrThrow
 */
export type thread_sessionsFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * Filter, which thread_sessions to fetch.
   */
  where: Prisma.thread_sessionsWhereUniqueInput
}

/**
 * thread_sessions findFirst
 */
export type thread_sessionsFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * Filter, which thread_sessions to fetch.
   */
  where?: Prisma.thread_sessionsWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of thread_sessions to fetch.
   */
  orderBy?: Prisma.thread_sessionsOrderByWithRelationInput | Prisma.thread_sessionsOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for thread_sessions.
   */
  cursor?: Prisma.thread_sessionsWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` thread_sessions 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` thread_sessions.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of thread_sessions.
   */
  distinct?: Prisma.Thread_sessionsScalarFieldEnum | Prisma.Thread_sessionsScalarFieldEnum[]
}

/**
 * thread_sessions findFirstOrThrow
 */
export type thread_sessionsFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * Filter, which thread_sessions to fetch.
   */
  where?: Prisma.thread_sessionsWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of thread_sessions to fetch.
   */
  orderBy?: Prisma.thread_sessionsOrderByWithRelationInput | Prisma.thread_sessionsOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for thread_sessions.
   */
  cursor?: Prisma.thread_sessionsWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` thread_sessions 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` thread_sessions.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of thread_sessions.
   */
  distinct?: Prisma.Thread_sessionsScalarFieldEnum | Prisma.Thread_sessionsScalarFieldEnum[]
}

/**
 * thread_sessions findMany
 */
export type thread_sessionsFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * Filter, which thread_sessions to fetch.
   */
  where?: Prisma.thread_sessionsWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of thread_sessions to fetch.
   */
  orderBy?: Prisma.thread_sessionsOrderByWithRelationInput | Prisma.thread_sessionsOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing thread_sessions.
   */
  cursor?: Prisma.thread_sessionsWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` thread_sessions 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` thread_sessions.
   */
  skip?: number
  distinct?: Prisma.Thread_sessionsScalarFieldEnum | Prisma.Thread_sessionsScalarFieldEnum[]
}

/**
 * thread_sessions create
 */
export type thread_sessionsCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * The data needed to create a thread_sessions.
   */
  data: Prisma.XOR<Prisma.thread_sessionsCreateInput, Prisma.thread_sessionsUncheckedCreateInput>
}

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

/**
 * thread_sessions createManyAndReturn
 */
export type thread_sessionsCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * The data used to create many thread_sessions.
   */
  data: Prisma.thread_sessionsCreateManyInput | Prisma.thread_sessionsCreateManyInput[]
}

/**
 * thread_sessions update
 */
export type thread_sessionsUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * The data needed to update a thread_sessions.
   */
  data: Prisma.XOR<Prisma.thread_sessionsUpdateInput, Prisma.thread_sessionsUncheckedUpdateInput>
  /**
   * Choose, which thread_sessions to update.
   */
  where: Prisma.thread_sessionsWhereUniqueInput
}

/**
 * thread_sessions updateMany
 */
export type thread_sessionsUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update thread_sessions.
   */
  data: Prisma.XOR<Prisma.thread_sessionsUpdateManyMutationInput, Prisma.thread_sessionsUncheckedUpdateManyInput>
  /**
   * Filter which thread_sessions to update
   */
  where?: Prisma.thread_sessionsWhereInput
  /**
   * Limit how many thread_sessions to update.
   */
  limit?: number
}

/**
 * thread_sessions updateManyAndReturn
 */
export type thread_sessionsUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * The data used to update thread_sessions.
   */
  data: Prisma.XOR<Prisma.thread_sessionsUpdateManyMutationInput, Prisma.thread_sessionsUncheckedUpdateManyInput>
  /**
   * Filter which thread_sessions to update
   */
  where?: Prisma.thread_sessionsWhereInput
  /**
   * Limit how many thread_sessions to update.
   */
  limit?: number
}

/**
 * thread_sessions upsert
 */
export type thread_sessionsUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * The filter to search for the thread_sessions to update in case it exists.
   */
  where: Prisma.thread_sessionsWhereUniqueInput
  /**
   * In case the thread_sessions found by the `where` argument doesn't exist, create a new thread_sessions with this data.
   */
  create: Prisma.XOR<Prisma.thread_sessionsCreateInput, Prisma.thread_sessionsUncheckedCreateInput>
  /**
   * In case the thread_sessions was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.thread_sessionsUpdateInput, Prisma.thread_sessionsUncheckedUpdateInput>
}

/**
 * thread_sessions delete
 */
export type thread_sessionsDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_sessions
   */
  select?: Prisma.thread_sessionsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_sessions
   */
  omit?: Prisma.thread_sessionsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_sessionsInclude<ExtArgs> | null
  /**
   * Filter which thread_sessions to delete.
   */
  where: Prisma.thread_sessionsWhereUniqueInput
}

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

/**
 * thread_sessions.part_messages
 */
export type thread_sessions$part_messagesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the part_messages
   */
  select?: Prisma.part_messagesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the part_messages
   */
  omit?: Prisma.part_messagesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.part_messagesInclude<ExtArgs> | null
  where?: Prisma.part_messagesWhereInput
  orderBy?: Prisma.part_messagesOrderByWithRelationInput | Prisma.part_messagesOrderByWithRelationInput[]
  cursor?: Prisma.part_messagesWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.Part_messagesScalarFieldEnum | Prisma.Part_messagesScalarFieldEnum[]
}

/**
 * thread_sessions.session_events
 */
export type thread_sessions$session_eventsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the session_events
   */
  select?: Prisma.session_eventsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the session_events
   */
  omit?: Prisma.session_eventsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.session_eventsInclude<ExtArgs> | null
  where?: Prisma.session_eventsWhereInput
  orderBy?: Prisma.session_eventsOrderByWithRelationInput | Prisma.session_eventsOrderByWithRelationInput[]
  cursor?: Prisma.session_eventsWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.Session_eventsScalarFieldEnum | Prisma.Session_eventsScalarFieldEnum[]
}

/**
 * thread_sessions.scheduled_tasks
 */
export type thread_sessions$scheduled_tasksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the scheduled_tasks
   */
  select?: Prisma.scheduled_tasksSelect<ExtArgs> | null
  /**
   * Omit specific fields from the scheduled_tasks
   */
  omit?: Prisma.scheduled_tasksOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.scheduled_tasksInclude<ExtArgs> | null
  where?: Prisma.scheduled_tasksWhereInput
  orderBy?: Prisma.scheduled_tasksOrderByWithRelationInput | Prisma.scheduled_tasksOrderByWithRelationInput[]
  cursor?: Prisma.scheduled_tasksWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.Scheduled_tasksScalarFieldEnum | Prisma.Scheduled_tasksScalarFieldEnum[]
}

/**
 * thread_sessions.thread_worktree
 */
export type thread_sessions$thread_worktreeArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the thread_worktrees
   */
  select?: Prisma.thread_worktreesSelect<ExtArgs> | null
  /**
   * Omit specific fields from the thread_worktrees
   */
  omit?: Prisma.thread_worktreesOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.thread_worktreesInclude<ExtArgs> | null
  where?: Prisma.thread_worktreesWhereInput
}

/**
 * thread_sessions.ipc_requests
 */
export type thread_sessions$ipc_requestsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the ipc_requests
   */
  select?: Prisma.ipc_requestsSelect<ExtArgs> | null
  /**
   * Omit specific fields from the ipc_requests
   */
  omit?: Prisma.ipc_requestsOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ipc_requestsInclude<ExtArgs> | null
  where?: Prisma.ipc_requestsWhereInput
  orderBy?: Prisma.ipc_requestsOrderByWithRelationInput | Prisma.ipc_requestsOrderByWithRelationInput[]
  cursor?: Prisma.ipc_requestsWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.Ipc_requestsScalarFieldEnum | Prisma.Ipc_requestsScalarFieldEnum[]
}

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