
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
 * This file exports the `User` 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 User
 *
 */
export type UserModel = runtime.Types.Result.DefaultSelection<Prisma.$UserPayload>

export type AggregateUser = {
  _count: UserCountAggregateOutputType | null
  _min: UserMinAggregateOutputType | null
  _max: UserMaxAggregateOutputType | null
}

export type UserMinAggregateOutputType = {
  id: string | null
  name: string | null
  email: string | null
  emailVerified: boolean | null
  image: string | null
  createdAt: Date | null
  updatedAt: Date | null
  role: string | null
  banned: boolean | null
  banReason: string | null
  banExpires: Date | null
  stripeCustomerId: string | null
}

export type UserMaxAggregateOutputType = {
  id: string | null
  name: string | null
  email: string | null
  emailVerified: boolean | null
  image: string | null
  createdAt: Date | null
  updatedAt: Date | null
  role: string | null
  banned: boolean | null
  banReason: string | null
  banExpires: Date | null
  stripeCustomerId: string | null
}

export type UserCountAggregateOutputType = {
  id: number
  name: number
  email: number
  emailVerified: number
  image: number
  createdAt: number
  updatedAt: number
  role: number
  banned: number
  banReason: number
  banExpires: number
  stripeCustomerId: number
  _all: number
}


export type UserMinAggregateInputType = {
  id?: true
  name?: true
  email?: true
  emailVerified?: true
  image?: true
  createdAt?: true
  updatedAt?: true
  role?: true
  banned?: true
  banReason?: true
  banExpires?: true
  stripeCustomerId?: true
}

export type UserMaxAggregateInputType = {
  id?: true
  name?: true
  email?: true
  emailVerified?: true
  image?: true
  createdAt?: true
  updatedAt?: true
  role?: true
  banned?: true
  banReason?: true
  banExpires?: true
  stripeCustomerId?: true
}

export type UserCountAggregateInputType = {
  id?: true
  name?: true
  email?: true
  emailVerified?: true
  image?: true
  createdAt?: true
  updatedAt?: true
  role?: true
  banned?: true
  banReason?: true
  banExpires?: true
  stripeCustomerId?: true
  _all?: true
}

export type UserAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which User to aggregate.
   */
  where?: Prisma.UserWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Users to fetch.
   */
  orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the start position
   */
  cursor?: Prisma.UserWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Users from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Skip the first `n` Users.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Count returned Users
  **/
  _count?: true | UserCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Select which fields to find the minimum value
  **/
  _min?: UserMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Select which fields to find the maximum value
  **/
  _max?: UserMaxAggregateInputType
}

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




export type UserGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.UserWhereInput
  orderBy?: Prisma.UserOrderByWithAggregationInput | Prisma.UserOrderByWithAggregationInput[]
  by: Prisma.UserScalarFieldEnum[] | Prisma.UserScalarFieldEnum
  having?: Prisma.UserScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: UserCountAggregateInputType | true
  _min?: UserMinAggregateInputType
  _max?: UserMaxAggregateInputType
}

export type UserGroupByOutputType = {
  id: string
  name: string
  email: string
  emailVerified: boolean
  image: string | null
  createdAt: Date
  updatedAt: Date
  role: string | null
  banned: boolean | null
  banReason: string | null
  banExpires: Date | null
  stripeCustomerId: string | null
  _count: UserCountAggregateOutputType | null
  _min: UserMinAggregateOutputType | null
  _max: UserMaxAggregateOutputType | null
}

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



export type UserWhereInput = {
  AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
  OR?: Prisma.UserWhereInput[]
  NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
  id?: Prisma.StringFilter<"User"> | string
  name?: Prisma.StringFilter<"User"> | string
  email?: Prisma.StringFilter<"User"> | string
  emailVerified?: Prisma.BoolFilter<"User"> | boolean
  image?: Prisma.StringNullableFilter<"User"> | string | null
  createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
  role?: Prisma.StringNullableFilter<"User"> | string | null
  banned?: Prisma.BoolNullableFilter<"User"> | boolean | null
  banReason?: Prisma.StringNullableFilter<"User"> | string | null
  banExpires?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null
  stripeCustomerId?: Prisma.StringNullableFilter<"User"> | string | null
  sessions?: Prisma.SessionListRelationFilter
  accounts?: Prisma.AccountListRelationFilter
  members?: Prisma.MemberListRelationFilter
  invitations?: Prisma.InvitationListRelationFilter
  phoneNumbers?: Prisma.PhoneNumberListRelationFilter
  agents?: Prisma.AgentListRelationFilter
  knowledgeSources?: Prisma.KnowledgeSourceListRelationFilter
  callLogs?: Prisma.CallLogListRelationFilter
  outboundCalls?: Prisma.OutboundCallListRelationFilter
  campaigns?: Prisma.CampaignListRelationFilter
  tools?: Prisma.ToolListRelationFilter
  mcpConnections?: Prisma.McpConnectionListRelationFilter
  secrets?: Prisma.SecretListRelationFilter
  auditLogs?: Prisma.AuditLogListRelationFilter
}

export type UserOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  email?: Prisma.SortOrder
  emailVerified?: Prisma.SortOrder
  image?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  role?: Prisma.SortOrderInput | Prisma.SortOrder
  banned?: Prisma.SortOrderInput | Prisma.SortOrder
  banReason?: Prisma.SortOrderInput | Prisma.SortOrder
  banExpires?: Prisma.SortOrderInput | Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrderInput | Prisma.SortOrder
  sessions?: Prisma.SessionOrderByRelationAggregateInput
  accounts?: Prisma.AccountOrderByRelationAggregateInput
  members?: Prisma.MemberOrderByRelationAggregateInput
  invitations?: Prisma.InvitationOrderByRelationAggregateInput
  phoneNumbers?: Prisma.PhoneNumberOrderByRelationAggregateInput
  agents?: Prisma.AgentOrderByRelationAggregateInput
  knowledgeSources?: Prisma.KnowledgeSourceOrderByRelationAggregateInput
  callLogs?: Prisma.CallLogOrderByRelationAggregateInput
  outboundCalls?: Prisma.OutboundCallOrderByRelationAggregateInput
  campaigns?: Prisma.CampaignOrderByRelationAggregateInput
  tools?: Prisma.ToolOrderByRelationAggregateInput
  mcpConnections?: Prisma.McpConnectionOrderByRelationAggregateInput
  secrets?: Prisma.SecretOrderByRelationAggregateInput
  auditLogs?: Prisma.AuditLogOrderByRelationAggregateInput
}

export type UserWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  email?: string
  AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
  OR?: Prisma.UserWhereInput[]
  NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
  name?: Prisma.StringFilter<"User"> | string
  emailVerified?: Prisma.BoolFilter<"User"> | boolean
  image?: Prisma.StringNullableFilter<"User"> | string | null
  createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
  role?: Prisma.StringNullableFilter<"User"> | string | null
  banned?: Prisma.BoolNullableFilter<"User"> | boolean | null
  banReason?: Prisma.StringNullableFilter<"User"> | string | null
  banExpires?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null
  stripeCustomerId?: Prisma.StringNullableFilter<"User"> | string | null
  sessions?: Prisma.SessionListRelationFilter
  accounts?: Prisma.AccountListRelationFilter
  members?: Prisma.MemberListRelationFilter
  invitations?: Prisma.InvitationListRelationFilter
  phoneNumbers?: Prisma.PhoneNumberListRelationFilter
  agents?: Prisma.AgentListRelationFilter
  knowledgeSources?: Prisma.KnowledgeSourceListRelationFilter
  callLogs?: Prisma.CallLogListRelationFilter
  outboundCalls?: Prisma.OutboundCallListRelationFilter
  campaigns?: Prisma.CampaignListRelationFilter
  tools?: Prisma.ToolListRelationFilter
  mcpConnections?: Prisma.McpConnectionListRelationFilter
  secrets?: Prisma.SecretListRelationFilter
  auditLogs?: Prisma.AuditLogListRelationFilter
}, "id" | "email">

export type UserOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  email?: Prisma.SortOrder
  emailVerified?: Prisma.SortOrder
  image?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  role?: Prisma.SortOrderInput | Prisma.SortOrder
  banned?: Prisma.SortOrderInput | Prisma.SortOrder
  banReason?: Prisma.SortOrderInput | Prisma.SortOrder
  banExpires?: Prisma.SortOrderInput | Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrderInput | Prisma.SortOrder
  _count?: Prisma.UserCountOrderByAggregateInput
  _max?: Prisma.UserMaxOrderByAggregateInput
  _min?: Prisma.UserMinOrderByAggregateInput
}

export type UserScalarWhereWithAggregatesInput = {
  AND?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[]
  OR?: Prisma.UserScalarWhereWithAggregatesInput[]
  NOT?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"User"> | string
  name?: Prisma.StringWithAggregatesFilter<"User"> | string
  email?: Prisma.StringWithAggregatesFilter<"User"> | string
  emailVerified?: Prisma.BoolWithAggregatesFilter<"User"> | boolean
  image?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string
  role?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null
  banned?: Prisma.BoolNullableWithAggregatesFilter<"User"> | boolean | null
  banReason?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null
  banExpires?: Prisma.DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null
  stripeCustomerId?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null
}

export type UserCreateInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateManyInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
}

export type UserUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type UserUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type UserCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  email?: Prisma.SortOrder
  emailVerified?: Prisma.SortOrder
  image?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  role?: Prisma.SortOrder
  banned?: Prisma.SortOrder
  banReason?: Prisma.SortOrder
  banExpires?: Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrder
}

export type UserMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  email?: Prisma.SortOrder
  emailVerified?: Prisma.SortOrder
  image?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  role?: Prisma.SortOrder
  banned?: Prisma.SortOrder
  banReason?: Prisma.SortOrder
  banExpires?: Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrder
}

export type UserMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  email?: Prisma.SortOrder
  emailVerified?: Prisma.SortOrder
  image?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  role?: Prisma.SortOrder
  banned?: Prisma.SortOrder
  banReason?: Prisma.SortOrder
  banExpires?: Prisma.SortOrder
  stripeCustomerId?: Prisma.SortOrder
}

export type UserScalarRelationFilter = {
  is?: Prisma.UserWhereInput
  isNot?: Prisma.UserWhereInput
}

export type UserNullableScalarRelationFilter = {
  is?: Prisma.UserWhereInput | null
  isNot?: Prisma.UserWhereInput | null
}

export type StringFieldUpdateOperationsInput = {
  set?: string
}

export type BoolFieldUpdateOperationsInput = {
  set?: boolean
}

export type NullableStringFieldUpdateOperationsInput = {
  set?: string | null
}

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

export type NullableBoolFieldUpdateOperationsInput = {
  set?: boolean | null
}

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

export type UserCreateNestedOneWithoutSessionsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutSessionsInput, Prisma.UserUncheckedCreateWithoutSessionsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutSessionsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneRequiredWithoutSessionsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutSessionsInput, Prisma.UserUncheckedCreateWithoutSessionsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutSessionsInput
  upsert?: Prisma.UserUpsertWithoutSessionsInput
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutSessionsInput, Prisma.UserUpdateWithoutSessionsInput>, Prisma.UserUncheckedUpdateWithoutSessionsInput>
}

export type UserCreateNestedOneWithoutAccountsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutAccountsInput, Prisma.UserUncheckedCreateWithoutAccountsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutAccountsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneRequiredWithoutAccountsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutAccountsInput, Prisma.UserUncheckedCreateWithoutAccountsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutAccountsInput
  upsert?: Prisma.UserUpsertWithoutAccountsInput
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutAccountsInput, Prisma.UserUpdateWithoutAccountsInput>, Prisma.UserUncheckedUpdateWithoutAccountsInput>
}

export type UserCreateNestedOneWithoutMembersInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutMembersInput, Prisma.UserUncheckedCreateWithoutMembersInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutMembersInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneRequiredWithoutMembersNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutMembersInput, Prisma.UserUncheckedCreateWithoutMembersInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutMembersInput
  upsert?: Prisma.UserUpsertWithoutMembersInput
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutMembersInput, Prisma.UserUpdateWithoutMembersInput>, Prisma.UserUncheckedUpdateWithoutMembersInput>
}

export type UserCreateNestedOneWithoutInvitationsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutInvitationsInput, Prisma.UserUncheckedCreateWithoutInvitationsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutInvitationsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneRequiredWithoutInvitationsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutInvitationsInput, Prisma.UserUncheckedCreateWithoutInvitationsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutInvitationsInput
  upsert?: Prisma.UserUpsertWithoutInvitationsInput
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutInvitationsInput, Prisma.UserUpdateWithoutInvitationsInput>, Prisma.UserUncheckedUpdateWithoutInvitationsInput>
}

export type UserCreateNestedOneWithoutPhoneNumbersInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutPhoneNumbersInput, Prisma.UserUncheckedCreateWithoutPhoneNumbersInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutPhoneNumbersInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutPhoneNumbersNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutPhoneNumbersInput, Prisma.UserUncheckedCreateWithoutPhoneNumbersInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutPhoneNumbersInput
  upsert?: Prisma.UserUpsertWithoutPhoneNumbersInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutPhoneNumbersInput, Prisma.UserUpdateWithoutPhoneNumbersInput>, Prisma.UserUncheckedUpdateWithoutPhoneNumbersInput>
}

export type UserCreateNestedOneWithoutAgentsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutAgentsInput, Prisma.UserUncheckedCreateWithoutAgentsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutAgentsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutAgentsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutAgentsInput, Prisma.UserUncheckedCreateWithoutAgentsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutAgentsInput
  upsert?: Prisma.UserUpsertWithoutAgentsInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutAgentsInput, Prisma.UserUpdateWithoutAgentsInput>, Prisma.UserUncheckedUpdateWithoutAgentsInput>
}

export type UserCreateNestedOneWithoutKnowledgeSourcesInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutKnowledgeSourcesInput, Prisma.UserUncheckedCreateWithoutKnowledgeSourcesInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutKnowledgeSourcesInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutKnowledgeSourcesNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutKnowledgeSourcesInput, Prisma.UserUncheckedCreateWithoutKnowledgeSourcesInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutKnowledgeSourcesInput
  upsert?: Prisma.UserUpsertWithoutKnowledgeSourcesInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutKnowledgeSourcesInput, Prisma.UserUpdateWithoutKnowledgeSourcesInput>, Prisma.UserUncheckedUpdateWithoutKnowledgeSourcesInput>
}

export type UserCreateNestedOneWithoutCallLogsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutCallLogsInput, Prisma.UserUncheckedCreateWithoutCallLogsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutCallLogsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutCallLogsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutCallLogsInput, Prisma.UserUncheckedCreateWithoutCallLogsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutCallLogsInput
  upsert?: Prisma.UserUpsertWithoutCallLogsInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutCallLogsInput, Prisma.UserUpdateWithoutCallLogsInput>, Prisma.UserUncheckedUpdateWithoutCallLogsInput>
}

export type UserCreateNestedOneWithoutOutboundCallsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutOutboundCallsInput, Prisma.UserUncheckedCreateWithoutOutboundCallsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutOutboundCallsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutOutboundCallsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutOutboundCallsInput, Prisma.UserUncheckedCreateWithoutOutboundCallsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutOutboundCallsInput
  upsert?: Prisma.UserUpsertWithoutOutboundCallsInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutOutboundCallsInput, Prisma.UserUpdateWithoutOutboundCallsInput>, Prisma.UserUncheckedUpdateWithoutOutboundCallsInput>
}

export type UserCreateNestedOneWithoutCampaignsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutCampaignsInput, Prisma.UserUncheckedCreateWithoutCampaignsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutCampaignsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutCampaignsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutCampaignsInput, Prisma.UserUncheckedCreateWithoutCampaignsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutCampaignsInput
  upsert?: Prisma.UserUpsertWithoutCampaignsInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutCampaignsInput, Prisma.UserUpdateWithoutCampaignsInput>, Prisma.UserUncheckedUpdateWithoutCampaignsInput>
}

export type UserCreateNestedOneWithoutToolsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutToolsInput, Prisma.UserUncheckedCreateWithoutToolsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutToolsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutToolsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutToolsInput, Prisma.UserUncheckedCreateWithoutToolsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutToolsInput
  upsert?: Prisma.UserUpsertWithoutToolsInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutToolsInput, Prisma.UserUpdateWithoutToolsInput>, Prisma.UserUncheckedUpdateWithoutToolsInput>
}

export type UserCreateNestedOneWithoutMcpConnectionsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutMcpConnectionsInput, Prisma.UserUncheckedCreateWithoutMcpConnectionsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutMcpConnectionsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutMcpConnectionsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutMcpConnectionsInput, Prisma.UserUncheckedCreateWithoutMcpConnectionsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutMcpConnectionsInput
  upsert?: Prisma.UserUpsertWithoutMcpConnectionsInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutMcpConnectionsInput, Prisma.UserUpdateWithoutMcpConnectionsInput>, Prisma.UserUncheckedUpdateWithoutMcpConnectionsInput>
}

export type UserCreateNestedOneWithoutSecretsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutSecretsInput, Prisma.UserUncheckedCreateWithoutSecretsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutSecretsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutSecretsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutSecretsInput, Prisma.UserUncheckedCreateWithoutSecretsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutSecretsInput
  upsert?: Prisma.UserUpsertWithoutSecretsInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutSecretsInput, Prisma.UserUpdateWithoutSecretsInput>, Prisma.UserUncheckedUpdateWithoutSecretsInput>
}

export type UserCreateNestedOneWithoutAuditLogsInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutAuditLogsInput, Prisma.UserUncheckedCreateWithoutAuditLogsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutAuditLogsInput
  connect?: Prisma.UserWhereUniqueInput
}

export type UserUpdateOneWithoutAuditLogsNestedInput = {
  create?: Prisma.XOR<Prisma.UserCreateWithoutAuditLogsInput, Prisma.UserUncheckedCreateWithoutAuditLogsInput>
  connectOrCreate?: Prisma.UserCreateOrConnectWithoutAuditLogsInput
  upsert?: Prisma.UserUpsertWithoutAuditLogsInput
  disconnect?: Prisma.UserWhereInput | boolean
  delete?: Prisma.UserWhereInput | boolean
  connect?: Prisma.UserWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutAuditLogsInput, Prisma.UserUpdateWithoutAuditLogsInput>, Prisma.UserUncheckedUpdateWithoutAuditLogsInput>
}

export type UserCreateWithoutSessionsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutSessionsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutSessionsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutSessionsInput, Prisma.UserUncheckedCreateWithoutSessionsInput>
}

export type UserUpsertWithoutSessionsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutSessionsInput, Prisma.UserUncheckedUpdateWithoutSessionsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutSessionsInput, Prisma.UserUncheckedCreateWithoutSessionsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutSessionsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutSessionsInput, Prisma.UserUncheckedUpdateWithoutSessionsInput>
}

export type UserUpdateWithoutSessionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutSessionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutAccountsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutAccountsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutAccountsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutAccountsInput, Prisma.UserUncheckedCreateWithoutAccountsInput>
}

export type UserUpsertWithoutAccountsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutAccountsInput, Prisma.UserUncheckedUpdateWithoutAccountsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutAccountsInput, Prisma.UserUncheckedCreateWithoutAccountsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutAccountsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutAccountsInput, Prisma.UserUncheckedUpdateWithoutAccountsInput>
}

export type UserUpdateWithoutAccountsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutAccountsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutMembersInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutMembersInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutMembersInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutMembersInput, Prisma.UserUncheckedCreateWithoutMembersInput>
}

export type UserUpsertWithoutMembersInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutMembersInput, Prisma.UserUncheckedUpdateWithoutMembersInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutMembersInput, Prisma.UserUncheckedCreateWithoutMembersInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutMembersInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutMembersInput, Prisma.UserUncheckedUpdateWithoutMembersInput>
}

export type UserUpdateWithoutMembersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutMembersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutInvitationsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutInvitationsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutInvitationsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutInvitationsInput, Prisma.UserUncheckedCreateWithoutInvitationsInput>
}

export type UserUpsertWithoutInvitationsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutInvitationsInput, Prisma.UserUncheckedUpdateWithoutInvitationsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutInvitationsInput, Prisma.UserUncheckedCreateWithoutInvitationsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutInvitationsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutInvitationsInput, Prisma.UserUncheckedUpdateWithoutInvitationsInput>
}

export type UserUpdateWithoutInvitationsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutInvitationsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutPhoneNumbersInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutPhoneNumbersInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutPhoneNumbersInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutPhoneNumbersInput, Prisma.UserUncheckedCreateWithoutPhoneNumbersInput>
}

export type UserUpsertWithoutPhoneNumbersInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutPhoneNumbersInput, Prisma.UserUncheckedUpdateWithoutPhoneNumbersInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutPhoneNumbersInput, Prisma.UserUncheckedCreateWithoutPhoneNumbersInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutPhoneNumbersInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutPhoneNumbersInput, Prisma.UserUncheckedUpdateWithoutPhoneNumbersInput>
}

export type UserUpdateWithoutPhoneNumbersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutPhoneNumbersInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutAgentsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutAgentsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutAgentsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutAgentsInput, Prisma.UserUncheckedCreateWithoutAgentsInput>
}

export type UserUpsertWithoutAgentsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutAgentsInput, Prisma.UserUncheckedUpdateWithoutAgentsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutAgentsInput, Prisma.UserUncheckedCreateWithoutAgentsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutAgentsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutAgentsInput, Prisma.UserUncheckedUpdateWithoutAgentsInput>
}

export type UserUpdateWithoutAgentsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutAgentsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutKnowledgeSourcesInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutKnowledgeSourcesInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutKnowledgeSourcesInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutKnowledgeSourcesInput, Prisma.UserUncheckedCreateWithoutKnowledgeSourcesInput>
}

export type UserUpsertWithoutKnowledgeSourcesInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutKnowledgeSourcesInput, Prisma.UserUncheckedUpdateWithoutKnowledgeSourcesInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutKnowledgeSourcesInput, Prisma.UserUncheckedCreateWithoutKnowledgeSourcesInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutKnowledgeSourcesInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutKnowledgeSourcesInput, Prisma.UserUncheckedUpdateWithoutKnowledgeSourcesInput>
}

export type UserUpdateWithoutKnowledgeSourcesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutKnowledgeSourcesInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutCallLogsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutCallLogsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutCallLogsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutCallLogsInput, Prisma.UserUncheckedCreateWithoutCallLogsInput>
}

export type UserUpsertWithoutCallLogsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutCallLogsInput, Prisma.UserUncheckedUpdateWithoutCallLogsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutCallLogsInput, Prisma.UserUncheckedCreateWithoutCallLogsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutCallLogsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutCallLogsInput, Prisma.UserUncheckedUpdateWithoutCallLogsInput>
}

export type UserUpdateWithoutCallLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutCallLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutOutboundCallsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutOutboundCallsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutOutboundCallsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutOutboundCallsInput, Prisma.UserUncheckedCreateWithoutOutboundCallsInput>
}

export type UserUpsertWithoutOutboundCallsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutOutboundCallsInput, Prisma.UserUncheckedUpdateWithoutOutboundCallsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutOutboundCallsInput, Prisma.UserUncheckedCreateWithoutOutboundCallsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutOutboundCallsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutOutboundCallsInput, Prisma.UserUncheckedUpdateWithoutOutboundCallsInput>
}

export type UserUpdateWithoutOutboundCallsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutOutboundCallsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutCampaignsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutCampaignsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutCampaignsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutCampaignsInput, Prisma.UserUncheckedCreateWithoutCampaignsInput>
}

export type UserUpsertWithoutCampaignsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutCampaignsInput, Prisma.UserUncheckedUpdateWithoutCampaignsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutCampaignsInput, Prisma.UserUncheckedCreateWithoutCampaignsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutCampaignsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutCampaignsInput, Prisma.UserUncheckedUpdateWithoutCampaignsInput>
}

export type UserUpdateWithoutCampaignsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutCampaignsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutToolsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutToolsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutToolsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutToolsInput, Prisma.UserUncheckedCreateWithoutToolsInput>
}

export type UserUpsertWithoutToolsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutToolsInput, Prisma.UserUncheckedUpdateWithoutToolsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutToolsInput, Prisma.UserUncheckedCreateWithoutToolsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutToolsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutToolsInput, Prisma.UserUncheckedUpdateWithoutToolsInput>
}

export type UserUpdateWithoutToolsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutToolsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutMcpConnectionsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutMcpConnectionsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutMcpConnectionsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutMcpConnectionsInput, Prisma.UserUncheckedCreateWithoutMcpConnectionsInput>
}

export type UserUpsertWithoutMcpConnectionsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutMcpConnectionsInput, Prisma.UserUncheckedUpdateWithoutMcpConnectionsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutMcpConnectionsInput, Prisma.UserUncheckedCreateWithoutMcpConnectionsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutMcpConnectionsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutMcpConnectionsInput, Prisma.UserUncheckedUpdateWithoutMcpConnectionsInput>
}

export type UserUpdateWithoutMcpConnectionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutMcpConnectionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutSecretsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutSecretsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutSecretsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutSecretsInput, Prisma.UserUncheckedCreateWithoutSecretsInput>
}

export type UserUpsertWithoutSecretsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutSecretsInput, Prisma.UserUncheckedUpdateWithoutSecretsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutSecretsInput, Prisma.UserUncheckedCreateWithoutSecretsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutSecretsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutSecretsInput, Prisma.UserUncheckedUpdateWithoutSecretsInput>
}

export type UserUpdateWithoutSecretsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutSecretsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutUserNestedInput
}

export type UserCreateWithoutAuditLogsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
  members?: Prisma.MemberCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretCreateNestedManyWithoutUserInput
}

export type UserUncheckedCreateWithoutAuditLogsInput = {
  id: string
  name: string
  email: string
  emailVerified?: boolean
  image?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  role?: string | null
  banned?: boolean | null
  banReason?: string | null
  banExpires?: Date | string | null
  stripeCustomerId?: string | null
  sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
  accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
  members?: Prisma.MemberUncheckedCreateNestedManyWithoutUserInput
  invitations?: Prisma.InvitationUncheckedCreateNestedManyWithoutUserInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedCreateNestedManyWithoutUserInput
  agents?: Prisma.AgentUncheckedCreateNestedManyWithoutUserInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedCreateNestedManyWithoutUserInput
  callLogs?: Prisma.CallLogUncheckedCreateNestedManyWithoutUserInput
  outboundCalls?: Prisma.OutboundCallUncheckedCreateNestedManyWithoutUserInput
  campaigns?: Prisma.CampaignUncheckedCreateNestedManyWithoutUserInput
  tools?: Prisma.ToolUncheckedCreateNestedManyWithoutUserInput
  mcpConnections?: Prisma.McpConnectionUncheckedCreateNestedManyWithoutUserInput
  secrets?: Prisma.SecretUncheckedCreateNestedManyWithoutUserInput
}

export type UserCreateOrConnectWithoutAuditLogsInput = {
  where: Prisma.UserWhereUniqueInput
  create: Prisma.XOR<Prisma.UserCreateWithoutAuditLogsInput, Prisma.UserUncheckedCreateWithoutAuditLogsInput>
}

export type UserUpsertWithoutAuditLogsInput = {
  update: Prisma.XOR<Prisma.UserUpdateWithoutAuditLogsInput, Prisma.UserUncheckedUpdateWithoutAuditLogsInput>
  create: Prisma.XOR<Prisma.UserCreateWithoutAuditLogsInput, Prisma.UserUncheckedCreateWithoutAuditLogsInput>
  where?: Prisma.UserWhereInput
}

export type UserUpdateToOneWithWhereWithoutAuditLogsInput = {
  where?: Prisma.UserWhereInput
  data: Prisma.XOR<Prisma.UserUpdateWithoutAuditLogsInput, Prisma.UserUncheckedUpdateWithoutAuditLogsInput>
}

export type UserUpdateWithoutAuditLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUpdateManyWithoutUserNestedInput
}

export type UserUncheckedUpdateWithoutAuditLogsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
  image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  role?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banned?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
  banReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  banExpires?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
  accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
  members?: Prisma.MemberUncheckedUpdateManyWithoutUserNestedInput
  invitations?: Prisma.InvitationUncheckedUpdateManyWithoutUserNestedInput
  phoneNumbers?: Prisma.PhoneNumberUncheckedUpdateManyWithoutUserNestedInput
  agents?: Prisma.AgentUncheckedUpdateManyWithoutUserNestedInput
  knowledgeSources?: Prisma.KnowledgeSourceUncheckedUpdateManyWithoutUserNestedInput
  callLogs?: Prisma.CallLogUncheckedUpdateManyWithoutUserNestedInput
  outboundCalls?: Prisma.OutboundCallUncheckedUpdateManyWithoutUserNestedInput
  campaigns?: Prisma.CampaignUncheckedUpdateManyWithoutUserNestedInput
  tools?: Prisma.ToolUncheckedUpdateManyWithoutUserNestedInput
  mcpConnections?: Prisma.McpConnectionUncheckedUpdateManyWithoutUserNestedInput
  secrets?: Prisma.SecretUncheckedUpdateManyWithoutUserNestedInput
}


/**
 * Count Type UserCountOutputType
 */

export type UserCountOutputType = {
  sessions: number
  accounts: number
  members: number
  invitations: number
  phoneNumbers: number
  agents: number
  knowledgeSources: number
  callLogs: number
  outboundCalls: number
  campaigns: number
  tools: number
  mcpConnections: number
  secrets: number
  auditLogs: number
}

export type UserCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  sessions?: boolean | UserCountOutputTypeCountSessionsArgs
  accounts?: boolean | UserCountOutputTypeCountAccountsArgs
  members?: boolean | UserCountOutputTypeCountMembersArgs
  invitations?: boolean | UserCountOutputTypeCountInvitationsArgs
  phoneNumbers?: boolean | UserCountOutputTypeCountPhoneNumbersArgs
  agents?: boolean | UserCountOutputTypeCountAgentsArgs
  knowledgeSources?: boolean | UserCountOutputTypeCountKnowledgeSourcesArgs
  callLogs?: boolean | UserCountOutputTypeCountCallLogsArgs
  outboundCalls?: boolean | UserCountOutputTypeCountOutboundCallsArgs
  campaigns?: boolean | UserCountOutputTypeCountCampaignsArgs
  tools?: boolean | UserCountOutputTypeCountToolsArgs
  mcpConnections?: boolean | UserCountOutputTypeCountMcpConnectionsArgs
  secrets?: boolean | UserCountOutputTypeCountSecretsArgs
  auditLogs?: boolean | UserCountOutputTypeCountAuditLogsArgs
}

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

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountSessionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.SessionWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountAccountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AccountWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountMembersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.MemberWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountInvitationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.InvitationWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountPhoneNumbersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.PhoneNumberWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountAgentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AgentWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountKnowledgeSourcesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.KnowledgeSourceWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountCallLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.CallLogWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountOutboundCallsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.OutboundCallWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountCampaignsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.CampaignWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountToolsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.ToolWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountMcpConnectionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.McpConnectionWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountSecretsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.SecretWhereInput
}

/**
 * UserCountOutputType without action
 */
export type UserCountOutputTypeCountAuditLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.AuditLogWhereInput
}


export type UserSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  email?: boolean
  emailVerified?: boolean
  image?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  role?: boolean
  banned?: boolean
  banReason?: boolean
  banExpires?: boolean
  stripeCustomerId?: boolean
  sessions?: boolean | Prisma.User$sessionsArgs<ExtArgs>
  accounts?: boolean | Prisma.User$accountsArgs<ExtArgs>
  members?: boolean | Prisma.User$membersArgs<ExtArgs>
  invitations?: boolean | Prisma.User$invitationsArgs<ExtArgs>
  phoneNumbers?: boolean | Prisma.User$phoneNumbersArgs<ExtArgs>
  agents?: boolean | Prisma.User$agentsArgs<ExtArgs>
  knowledgeSources?: boolean | Prisma.User$knowledgeSourcesArgs<ExtArgs>
  callLogs?: boolean | Prisma.User$callLogsArgs<ExtArgs>
  outboundCalls?: boolean | Prisma.User$outboundCallsArgs<ExtArgs>
  campaigns?: boolean | Prisma.User$campaignsArgs<ExtArgs>
  tools?: boolean | Prisma.User$toolsArgs<ExtArgs>
  mcpConnections?: boolean | Prisma.User$mcpConnectionsArgs<ExtArgs>
  secrets?: boolean | Prisma.User$secretsArgs<ExtArgs>
  auditLogs?: boolean | Prisma.User$auditLogsArgs<ExtArgs>
  _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["user"]>

export type UserSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  email?: boolean
  emailVerified?: boolean
  image?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  role?: boolean
  banned?: boolean
  banReason?: boolean
  banExpires?: boolean
  stripeCustomerId?: boolean
}, ExtArgs["result"]["user"]>

export type UserSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  name?: boolean
  email?: boolean
  emailVerified?: boolean
  image?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  role?: boolean
  banned?: boolean
  banReason?: boolean
  banExpires?: boolean
  stripeCustomerId?: boolean
}, ExtArgs["result"]["user"]>

export type UserSelectScalar = {
  id?: boolean
  name?: boolean
  email?: boolean
  emailVerified?: boolean
  image?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  role?: boolean
  banned?: boolean
  banReason?: boolean
  banExpires?: boolean
  stripeCustomerId?: boolean
}

export type UserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt" | "role" | "banned" | "banReason" | "banExpires" | "stripeCustomerId", ExtArgs["result"]["user"]>
export type UserInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  sessions?: boolean | Prisma.User$sessionsArgs<ExtArgs>
  accounts?: boolean | Prisma.User$accountsArgs<ExtArgs>
  members?: boolean | Prisma.User$membersArgs<ExtArgs>
  invitations?: boolean | Prisma.User$invitationsArgs<ExtArgs>
  phoneNumbers?: boolean | Prisma.User$phoneNumbersArgs<ExtArgs>
  agents?: boolean | Prisma.User$agentsArgs<ExtArgs>
  knowledgeSources?: boolean | Prisma.User$knowledgeSourcesArgs<ExtArgs>
  callLogs?: boolean | Prisma.User$callLogsArgs<ExtArgs>
  outboundCalls?: boolean | Prisma.User$outboundCallsArgs<ExtArgs>
  campaigns?: boolean | Prisma.User$campaignsArgs<ExtArgs>
  tools?: boolean | Prisma.User$toolsArgs<ExtArgs>
  mcpConnections?: boolean | Prisma.User$mcpConnectionsArgs<ExtArgs>
  secrets?: boolean | Prisma.User$secretsArgs<ExtArgs>
  auditLogs?: boolean | Prisma.User$auditLogsArgs<ExtArgs>
  _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
}
export type UserIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type UserIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}

export type $UserPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "User"
  objects: {
    sessions: Prisma.$SessionPayload<ExtArgs>[]
    accounts: Prisma.$AccountPayload<ExtArgs>[]
    members: Prisma.$MemberPayload<ExtArgs>[]
    invitations: Prisma.$InvitationPayload<ExtArgs>[]
    phoneNumbers: Prisma.$PhoneNumberPayload<ExtArgs>[]
    agents: Prisma.$AgentPayload<ExtArgs>[]
    knowledgeSources: Prisma.$KnowledgeSourcePayload<ExtArgs>[]
    callLogs: Prisma.$CallLogPayload<ExtArgs>[]
    outboundCalls: Prisma.$OutboundCallPayload<ExtArgs>[]
    campaigns: Prisma.$CampaignPayload<ExtArgs>[]
    tools: Prisma.$ToolPayload<ExtArgs>[]
    mcpConnections: Prisma.$McpConnectionPayload<ExtArgs>[]
    secrets: Prisma.$SecretPayload<ExtArgs>[]
    auditLogs: Prisma.$AuditLogPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    name: string
    email: string
    emailVerified: boolean
    image: string | null
    createdAt: Date
    updatedAt: Date
    role: string | null
    banned: boolean | null
    banReason: string | null
    banExpires: Date | null
    stripeCustomerId: string | null
  }, ExtArgs["result"]["user"]>
  composites: {}
}

export type UserGetPayload<S extends boolean | null | undefined | UserDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$UserPayload, S>

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

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

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

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

  /**
   * Find the first User that matches the filter or
   * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User
   * @example
   * // Get one User
   * const user = await prisma.user.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends UserFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, UserFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

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

  /**
   * Create many Users and returns the data saved in the database.
   * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users.
   * @example
   * // Create many Users
   * const user = await prisma.user.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *
   * // Create many Users and only return the `id`
   * const userWithIdOnly = await prisma.user.createManyAndReturn({
   *   select: { id: true },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   *
   */
  createManyAndReturn<T extends UserCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, UserCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

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

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

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

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

  /**
   * Update zero or more Users and returns the data updated in the database.
   * @param {UserUpdateManyAndReturnArgs} args - Arguments to update many Users.
   * @example
   * // Update many Users
   * const user = await prisma.user.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *
   * // Update zero or more Users and only return the `id`
   * const userWithIdOnly = await prisma.user.updateManyAndReturn({
   *   select: { id: true },
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   *
   */
  updateManyAndReturn<T extends UserUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, UserUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

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


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

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

  /**
   * Group by User.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {UserGroupByArgs} args - Group by arguments.
   * @example
   * // Group by city, order by createdAt, get count
   * const result = await prisma.user.groupBy({
   *   by: ['city', 'createdAt'],
   *   orderBy: {
   *     createdAt: true
   *   },
   *   _count: {
   *     _all: true
   *   },
   * })
   *
  **/
  groupBy<
    T extends UserGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: UserGroupByArgs['orderBy'] }
      : { orderBy?: UserGroupByArgs['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, UserGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetUserGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the User model
 */
readonly fields: UserFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for User.
 * Why is this prefixed with `Prisma__`?
 * Because we want to prevent naming conflicts as mentioned in
 * https://github.com/prisma/prisma-client-js/issues/707
 */
export interface Prisma__UserClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  sessions<T extends Prisma.User$sessionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$sessionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SessionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  accounts<T extends Prisma.User$accountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$accountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  members<T extends Prisma.User$membersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$membersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MemberPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  invitations<T extends Prisma.User$invitationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$invitationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InvitationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  phoneNumbers<T extends Prisma.User$phoneNumbersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$phoneNumbersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PhoneNumberPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  agents<T extends Prisma.User$agentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$agentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  knowledgeSources<T extends Prisma.User$knowledgeSourcesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$knowledgeSourcesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeSourcePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  callLogs<T extends Prisma.User$callLogsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$callLogsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CallLogPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  outboundCalls<T extends Prisma.User$outboundCallsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$outboundCallsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OutboundCallPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  campaigns<T extends Prisma.User$campaignsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$campaignsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CampaignPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  tools<T extends Prisma.User$toolsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$toolsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ToolPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  mcpConnections<T extends Prisma.User$mcpConnectionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$mcpConnectionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$McpConnectionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  secrets<T extends Prisma.User$secretsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$secretsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SecretPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  auditLogs<T extends Prisma.User$auditLogsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$auditLogsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AuditLogPayload<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 User model
 */
export interface UserFieldRefs {
  readonly id: Prisma.FieldRef<"User", 'String'>
  readonly name: Prisma.FieldRef<"User", 'String'>
  readonly email: Prisma.FieldRef<"User", 'String'>
  readonly emailVerified: Prisma.FieldRef<"User", 'Boolean'>
  readonly image: Prisma.FieldRef<"User", 'String'>
  readonly createdAt: Prisma.FieldRef<"User", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"User", 'DateTime'>
  readonly role: Prisma.FieldRef<"User", 'String'>
  readonly banned: Prisma.FieldRef<"User", 'Boolean'>
  readonly banReason: Prisma.FieldRef<"User", 'String'>
  readonly banExpires: Prisma.FieldRef<"User", 'DateTime'>
  readonly stripeCustomerId: Prisma.FieldRef<"User", 'String'>
}


// Custom InputTypes
/**
 * User findUnique
 */
export type UserFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * Filter, which User to fetch.
   */
  where: Prisma.UserWhereUniqueInput
}

/**
 * User findUniqueOrThrow
 */
export type UserFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * Filter, which User to fetch.
   */
  where: Prisma.UserWhereUniqueInput
}

/**
 * User findFirst
 */
export type UserFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * Filter, which User to fetch.
   */
  where?: Prisma.UserWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Users to fetch.
   */
  orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for searching for Users.
   */
  cursor?: Prisma.UserWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Users from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Skip the first `n` Users.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   *
   * Filter by unique combinations of Users.
   */
  distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[]
}

/**
 * User findFirstOrThrow
 */
export type UserFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * Filter, which User to fetch.
   */
  where?: Prisma.UserWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Users to fetch.
   */
  orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for searching for Users.
   */
  cursor?: Prisma.UserWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Users from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Skip the first `n` Users.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   *
   * Filter by unique combinations of Users.
   */
  distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[]
}

/**
 * User findMany
 */
export type UserFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * Filter, which Users to fetch.
   */
  where?: Prisma.UserWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Users to fetch.
   */
  orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for listing Users.
   */
  cursor?: Prisma.UserWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Users from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Skip the first `n` Users.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   *
   * Filter by unique combinations of Users.
   */
  distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[]
}

/**
 * User create
 */
export type UserCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * The data needed to create a User.
   */
  data: Prisma.XOR<Prisma.UserCreateInput, Prisma.UserUncheckedCreateInput>
}

/**
 * User createMany
 */
export type UserCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many Users.
   */
  data: Prisma.UserCreateManyInput | Prisma.UserCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * User createManyAndReturn
 */
export type UserCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * The data used to create many Users.
   */
  data: Prisma.UserCreateManyInput | Prisma.UserCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * User update
 */
export type UserUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * The data needed to update a User.
   */
  data: Prisma.XOR<Prisma.UserUpdateInput, Prisma.UserUncheckedUpdateInput>
  /**
   * Choose, which User to update.
   */
  where: Prisma.UserWhereUniqueInput
}

/**
 * User updateMany
 */
export type UserUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Users.
   */
  data: Prisma.XOR<Prisma.UserUpdateManyMutationInput, Prisma.UserUncheckedUpdateManyInput>
  /**
   * Filter which Users to update
   */
  where?: Prisma.UserWhereInput
  /**
   * Limit how many Users to update.
   */
  limit?: number
}

/**
 * User updateManyAndReturn
 */
export type UserUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * The data used to update Users.
   */
  data: Prisma.XOR<Prisma.UserUpdateManyMutationInput, Prisma.UserUncheckedUpdateManyInput>
  /**
   * Filter which Users to update
   */
  where?: Prisma.UserWhereInput
  /**
   * Limit how many Users to update.
   */
  limit?: number
}

/**
 * User upsert
 */
export type UserUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * The filter to search for the User to update in case it exists.
   */
  where: Prisma.UserWhereUniqueInput
  /**
   * In case the User found by the `where` argument doesn't exist, create a new User with this data.
   */
  create: Prisma.XOR<Prisma.UserCreateInput, Prisma.UserUncheckedCreateInput>
  /**
   * In case the User was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.UserUpdateInput, Prisma.UserUncheckedUpdateInput>
}

/**
 * User delete
 */
export type UserDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the User
   */
  select?: Prisma.UserSelect<ExtArgs> | null
  /**
   * Omit specific fields from the User
   */
  omit?: Prisma.UserOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.UserInclude<ExtArgs> | null
  /**
   * Filter which User to delete.
   */
  where: Prisma.UserWhereUniqueInput
}

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

/**
 * User.sessions
 */
export type User$sessionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Session
   */
  select?: Prisma.SessionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Session
   */
  omit?: Prisma.SessionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.SessionInclude<ExtArgs> | null
  where?: Prisma.SessionWhereInput
  orderBy?: Prisma.SessionOrderByWithRelationInput | Prisma.SessionOrderByWithRelationInput[]
  cursor?: Prisma.SessionWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.SessionScalarFieldEnum | Prisma.SessionScalarFieldEnum[]
}

/**
 * User.accounts
 */
export type User$accountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Account
   */
  select?: Prisma.AccountSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Account
   */
  omit?: Prisma.AccountOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AccountInclude<ExtArgs> | null
  where?: Prisma.AccountWhereInput
  orderBy?: Prisma.AccountOrderByWithRelationInput | Prisma.AccountOrderByWithRelationInput[]
  cursor?: Prisma.AccountWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.AccountScalarFieldEnum | Prisma.AccountScalarFieldEnum[]
}

/**
 * User.members
 */
export type User$membersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Member
   */
  select?: Prisma.MemberSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Member
   */
  omit?: Prisma.MemberOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.MemberInclude<ExtArgs> | null
  where?: Prisma.MemberWhereInput
  orderBy?: Prisma.MemberOrderByWithRelationInput | Prisma.MemberOrderByWithRelationInput[]
  cursor?: Prisma.MemberWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.MemberScalarFieldEnum | Prisma.MemberScalarFieldEnum[]
}

/**
 * User.invitations
 */
export type User$invitationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Invitation
   */
  select?: Prisma.InvitationSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Invitation
   */
  omit?: Prisma.InvitationOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.InvitationInclude<ExtArgs> | null
  where?: Prisma.InvitationWhereInput
  orderBy?: Prisma.InvitationOrderByWithRelationInput | Prisma.InvitationOrderByWithRelationInput[]
  cursor?: Prisma.InvitationWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.InvitationScalarFieldEnum | Prisma.InvitationScalarFieldEnum[]
}

/**
 * User.phoneNumbers
 */
export type User$phoneNumbersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the PhoneNumber
   */
  select?: Prisma.PhoneNumberSelect<ExtArgs> | null
  /**
   * Omit specific fields from the PhoneNumber
   */
  omit?: Prisma.PhoneNumberOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.PhoneNumberInclude<ExtArgs> | null
  where?: Prisma.PhoneNumberWhereInput
  orderBy?: Prisma.PhoneNumberOrderByWithRelationInput | Prisma.PhoneNumberOrderByWithRelationInput[]
  cursor?: Prisma.PhoneNumberWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.PhoneNumberScalarFieldEnum | Prisma.PhoneNumberScalarFieldEnum[]
}

/**
 * User.agents
 */
export type User$agentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Agent
   */
  select?: Prisma.AgentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Agent
   */
  omit?: Prisma.AgentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AgentInclude<ExtArgs> | null
  where?: Prisma.AgentWhereInput
  orderBy?: Prisma.AgentOrderByWithRelationInput | Prisma.AgentOrderByWithRelationInput[]
  cursor?: Prisma.AgentWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.AgentScalarFieldEnum | Prisma.AgentScalarFieldEnum[]
}

/**
 * User.knowledgeSources
 */
export type User$knowledgeSourcesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the KnowledgeSource
   */
  select?: Prisma.KnowledgeSourceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the KnowledgeSource
   */
  omit?: Prisma.KnowledgeSourceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.KnowledgeSourceInclude<ExtArgs> | null
  where?: Prisma.KnowledgeSourceWhereInput
  orderBy?: Prisma.KnowledgeSourceOrderByWithRelationInput | Prisma.KnowledgeSourceOrderByWithRelationInput[]
  cursor?: Prisma.KnowledgeSourceWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.KnowledgeSourceScalarFieldEnum | Prisma.KnowledgeSourceScalarFieldEnum[]
}

/**
 * User.callLogs
 */
export type User$callLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the CallLog
   */
  select?: Prisma.CallLogSelect<ExtArgs> | null
  /**
   * Omit specific fields from the CallLog
   */
  omit?: Prisma.CallLogOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CallLogInclude<ExtArgs> | null
  where?: Prisma.CallLogWhereInput
  orderBy?: Prisma.CallLogOrderByWithRelationInput | Prisma.CallLogOrderByWithRelationInput[]
  cursor?: Prisma.CallLogWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.CallLogScalarFieldEnum | Prisma.CallLogScalarFieldEnum[]
}

/**
 * User.outboundCalls
 */
export type User$outboundCallsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the OutboundCall
   */
  select?: Prisma.OutboundCallSelect<ExtArgs> | null
  /**
   * Omit specific fields from the OutboundCall
   */
  omit?: Prisma.OutboundCallOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.OutboundCallInclude<ExtArgs> | null
  where?: Prisma.OutboundCallWhereInput
  orderBy?: Prisma.OutboundCallOrderByWithRelationInput | Prisma.OutboundCallOrderByWithRelationInput[]
  cursor?: Prisma.OutboundCallWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.OutboundCallScalarFieldEnum | Prisma.OutboundCallScalarFieldEnum[]
}

/**
 * User.campaigns
 */
export type User$campaignsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Campaign
   */
  select?: Prisma.CampaignSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Campaign
   */
  omit?: Prisma.CampaignOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CampaignInclude<ExtArgs> | null
  where?: Prisma.CampaignWhereInput
  orderBy?: Prisma.CampaignOrderByWithRelationInput | Prisma.CampaignOrderByWithRelationInput[]
  cursor?: Prisma.CampaignWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.CampaignScalarFieldEnum | Prisma.CampaignScalarFieldEnum[]
}

/**
 * User.tools
 */
export type User$toolsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Tool
   */
  select?: Prisma.ToolSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tool
   */
  omit?: Prisma.ToolOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ToolInclude<ExtArgs> | null
  where?: Prisma.ToolWhereInput
  orderBy?: Prisma.ToolOrderByWithRelationInput | Prisma.ToolOrderByWithRelationInput[]
  cursor?: Prisma.ToolWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.ToolScalarFieldEnum | Prisma.ToolScalarFieldEnum[]
}

/**
 * User.mcpConnections
 */
export type User$mcpConnectionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the McpConnection
   */
  select?: Prisma.McpConnectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the McpConnection
   */
  omit?: Prisma.McpConnectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.McpConnectionInclude<ExtArgs> | null
  where?: Prisma.McpConnectionWhereInput
  orderBy?: Prisma.McpConnectionOrderByWithRelationInput | Prisma.McpConnectionOrderByWithRelationInput[]
  cursor?: Prisma.McpConnectionWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.McpConnectionScalarFieldEnum | Prisma.McpConnectionScalarFieldEnum[]
}

/**
 * User.secrets
 */
export type User$secretsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Secret
   */
  select?: Prisma.SecretSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Secret
   */
  omit?: Prisma.SecretOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.SecretInclude<ExtArgs> | null
  where?: Prisma.SecretWhereInput
  orderBy?: Prisma.SecretOrderByWithRelationInput | Prisma.SecretOrderByWithRelationInput[]
  cursor?: Prisma.SecretWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.SecretScalarFieldEnum | Prisma.SecretScalarFieldEnum[]
}

/**
 * User.auditLogs
 */
export type User$auditLogsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the AuditLog
   */
  select?: Prisma.AuditLogSelect<ExtArgs> | null
  /**
   * Omit specific fields from the AuditLog
   */
  omit?: Prisma.AuditLogOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.AuditLogInclude<ExtArgs> | null
  where?: Prisma.AuditLogWhereInput
  orderBy?: Prisma.AuditLogOrderByWithRelationInput | Prisma.AuditLogOrderByWithRelationInput[]
  cursor?: Prisma.AuditLogWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.AuditLogScalarFieldEnum | Prisma.AuditLogScalarFieldEnum[]
}

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