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

/**
 * Model friendship
 * 
 */
export type friendshipModel = runtime.Types.Result.DefaultSelection<Prisma.$friendshipPayload>

export type AggregateFriendship = {
  _count: FriendshipCountAggregateOutputType | null
  _min: FriendshipMinAggregateOutputType | null
  _max: FriendshipMaxAggregateOutputType | null
}

export type FriendshipMinAggregateOutputType = {
  id: string | null
  senderId: string | null
  receiverId: string | null
  status: $Enums.FriendshipStatus | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type FriendshipMaxAggregateOutputType = {
  id: string | null
  senderId: string | null
  receiverId: string | null
  status: $Enums.FriendshipStatus | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type FriendshipCountAggregateOutputType = {
  id: number
  senderId: number
  receiverId: number
  status: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type FriendshipMinAggregateInputType = {
  id?: true
  senderId?: true
  receiverId?: true
  status?: true
  createdAt?: true
  updatedAt?: true
}

export type FriendshipMaxAggregateInputType = {
  id?: true
  senderId?: true
  receiverId?: true
  status?: true
  createdAt?: true
  updatedAt?: true
}

export type FriendshipCountAggregateInputType = {
  id?: true
  senderId?: true
  receiverId?: true
  status?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

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

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




export type friendshipGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.friendshipWhereInput
  orderBy?: Prisma.friendshipOrderByWithAggregationInput | Prisma.friendshipOrderByWithAggregationInput[]
  by: Prisma.FriendshipScalarFieldEnum[] | Prisma.FriendshipScalarFieldEnum
  having?: Prisma.friendshipScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: FriendshipCountAggregateInputType | true
  _min?: FriendshipMinAggregateInputType
  _max?: FriendshipMaxAggregateInputType
}

export type FriendshipGroupByOutputType = {
  id: string
  senderId: string
  receiverId: string
  status: $Enums.FriendshipStatus
  createdAt: Date
  updatedAt: Date
  _count: FriendshipCountAggregateOutputType | null
  _min: FriendshipMinAggregateOutputType | null
  _max: FriendshipMaxAggregateOutputType | null
}

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



export type friendshipWhereInput = {
  AND?: Prisma.friendshipWhereInput | Prisma.friendshipWhereInput[]
  OR?: Prisma.friendshipWhereInput[]
  NOT?: Prisma.friendshipWhereInput | Prisma.friendshipWhereInput[]
  id?: Prisma.StringFilter<"friendship"> | string
  senderId?: Prisma.StringFilter<"friendship"> | string
  receiverId?: Prisma.StringFilter<"friendship"> | string
  status?: Prisma.EnumFriendshipStatusFilter<"friendship"> | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFilter<"friendship"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"friendship"> | Date | string
  sender?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.userWhereInput>
  receiver?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.userWhereInput>
}

export type friendshipOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  senderId?: Prisma.SortOrder
  receiverId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  sender?: Prisma.userOrderByWithRelationInput
  receiver?: Prisma.userOrderByWithRelationInput
}

export type friendshipWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  senderId_receiverId?: Prisma.friendshipSenderIdReceiverIdCompoundUniqueInput
  AND?: Prisma.friendshipWhereInput | Prisma.friendshipWhereInput[]
  OR?: Prisma.friendshipWhereInput[]
  NOT?: Prisma.friendshipWhereInput | Prisma.friendshipWhereInput[]
  senderId?: Prisma.StringFilter<"friendship"> | string
  receiverId?: Prisma.StringFilter<"friendship"> | string
  status?: Prisma.EnumFriendshipStatusFilter<"friendship"> | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFilter<"friendship"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"friendship"> | Date | string
  sender?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.userWhereInput>
  receiver?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.userWhereInput>
}, "id" | "senderId_receiverId">

export type friendshipOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  senderId?: Prisma.SortOrder
  receiverId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.friendshipCountOrderByAggregateInput
  _max?: Prisma.friendshipMaxOrderByAggregateInput
  _min?: Prisma.friendshipMinOrderByAggregateInput
}

export type friendshipScalarWhereWithAggregatesInput = {
  AND?: Prisma.friendshipScalarWhereWithAggregatesInput | Prisma.friendshipScalarWhereWithAggregatesInput[]
  OR?: Prisma.friendshipScalarWhereWithAggregatesInput[]
  NOT?: Prisma.friendshipScalarWhereWithAggregatesInput | Prisma.friendshipScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"friendship"> | string
  senderId?: Prisma.StringWithAggregatesFilter<"friendship"> | string
  receiverId?: Prisma.StringWithAggregatesFilter<"friendship"> | string
  status?: Prisma.EnumFriendshipStatusWithAggregatesFilter<"friendship"> | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"friendship"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"friendship"> | Date | string
}

export type friendshipCreateInput = {
  id?: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
  sender: Prisma.userCreateNestedOneWithoutSentFriendRequestsInput
  receiver: Prisma.userCreateNestedOneWithoutReceivedFriendRequestsInput
}

export type friendshipUncheckedCreateInput = {
  id?: string
  senderId: string
  receiverId: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type friendshipUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  sender?: Prisma.userUpdateOneRequiredWithoutSentFriendRequestsNestedInput
  receiver?: Prisma.userUpdateOneRequiredWithoutReceivedFriendRequestsNestedInput
}

export type friendshipUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  senderId?: Prisma.StringFieldUpdateOperationsInput | string
  receiverId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type friendshipCreateManyInput = {
  id?: string
  senderId: string
  receiverId: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type friendshipUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type friendshipUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  senderId?: Prisma.StringFieldUpdateOperationsInput | string
  receiverId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type FriendshipListRelationFilter = {
  every?: Prisma.friendshipWhereInput
  some?: Prisma.friendshipWhereInput
  none?: Prisma.friendshipWhereInput
}

export type friendshipOrderByRelationAggregateInput = {
  _count?: Prisma.SortOrder
}

export type friendshipSenderIdReceiverIdCompoundUniqueInput = {
  senderId: string
  receiverId: string
}

export type friendshipCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  senderId?: Prisma.SortOrder
  receiverId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type friendshipMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  senderId?: Prisma.SortOrder
  receiverId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type friendshipMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  senderId?: Prisma.SortOrder
  receiverId?: Prisma.SortOrder
  status?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type friendshipCreateNestedManyWithoutSenderInput = {
  create?: Prisma.XOR<Prisma.friendshipCreateWithoutSenderInput, Prisma.friendshipUncheckedCreateWithoutSenderInput> | Prisma.friendshipCreateWithoutSenderInput[] | Prisma.friendshipUncheckedCreateWithoutSenderInput[]
  connectOrCreate?: Prisma.friendshipCreateOrConnectWithoutSenderInput | Prisma.friendshipCreateOrConnectWithoutSenderInput[]
  createMany?: Prisma.friendshipCreateManySenderInputEnvelope
  connect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
}

export type friendshipCreateNestedManyWithoutReceiverInput = {
  create?: Prisma.XOR<Prisma.friendshipCreateWithoutReceiverInput, Prisma.friendshipUncheckedCreateWithoutReceiverInput> | Prisma.friendshipCreateWithoutReceiverInput[] | Prisma.friendshipUncheckedCreateWithoutReceiverInput[]
  connectOrCreate?: Prisma.friendshipCreateOrConnectWithoutReceiverInput | Prisma.friendshipCreateOrConnectWithoutReceiverInput[]
  createMany?: Prisma.friendshipCreateManyReceiverInputEnvelope
  connect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
}

export type friendshipUncheckedCreateNestedManyWithoutSenderInput = {
  create?: Prisma.XOR<Prisma.friendshipCreateWithoutSenderInput, Prisma.friendshipUncheckedCreateWithoutSenderInput> | Prisma.friendshipCreateWithoutSenderInput[] | Prisma.friendshipUncheckedCreateWithoutSenderInput[]
  connectOrCreate?: Prisma.friendshipCreateOrConnectWithoutSenderInput | Prisma.friendshipCreateOrConnectWithoutSenderInput[]
  createMany?: Prisma.friendshipCreateManySenderInputEnvelope
  connect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
}

export type friendshipUncheckedCreateNestedManyWithoutReceiverInput = {
  create?: Prisma.XOR<Prisma.friendshipCreateWithoutReceiverInput, Prisma.friendshipUncheckedCreateWithoutReceiverInput> | Prisma.friendshipCreateWithoutReceiverInput[] | Prisma.friendshipUncheckedCreateWithoutReceiverInput[]
  connectOrCreate?: Prisma.friendshipCreateOrConnectWithoutReceiverInput | Prisma.friendshipCreateOrConnectWithoutReceiverInput[]
  createMany?: Prisma.friendshipCreateManyReceiverInputEnvelope
  connect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
}

export type friendshipUpdateManyWithoutSenderNestedInput = {
  create?: Prisma.XOR<Prisma.friendshipCreateWithoutSenderInput, Prisma.friendshipUncheckedCreateWithoutSenderInput> | Prisma.friendshipCreateWithoutSenderInput[] | Prisma.friendshipUncheckedCreateWithoutSenderInput[]
  connectOrCreate?: Prisma.friendshipCreateOrConnectWithoutSenderInput | Prisma.friendshipCreateOrConnectWithoutSenderInput[]
  upsert?: Prisma.friendshipUpsertWithWhereUniqueWithoutSenderInput | Prisma.friendshipUpsertWithWhereUniqueWithoutSenderInput[]
  createMany?: Prisma.friendshipCreateManySenderInputEnvelope
  set?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  disconnect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  delete?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  connect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  update?: Prisma.friendshipUpdateWithWhereUniqueWithoutSenderInput | Prisma.friendshipUpdateWithWhereUniqueWithoutSenderInput[]
  updateMany?: Prisma.friendshipUpdateManyWithWhereWithoutSenderInput | Prisma.friendshipUpdateManyWithWhereWithoutSenderInput[]
  deleteMany?: Prisma.friendshipScalarWhereInput | Prisma.friendshipScalarWhereInput[]
}

export type friendshipUpdateManyWithoutReceiverNestedInput = {
  create?: Prisma.XOR<Prisma.friendshipCreateWithoutReceiverInput, Prisma.friendshipUncheckedCreateWithoutReceiverInput> | Prisma.friendshipCreateWithoutReceiverInput[] | Prisma.friendshipUncheckedCreateWithoutReceiverInput[]
  connectOrCreate?: Prisma.friendshipCreateOrConnectWithoutReceiverInput | Prisma.friendshipCreateOrConnectWithoutReceiverInput[]
  upsert?: Prisma.friendshipUpsertWithWhereUniqueWithoutReceiverInput | Prisma.friendshipUpsertWithWhereUniqueWithoutReceiverInput[]
  createMany?: Prisma.friendshipCreateManyReceiverInputEnvelope
  set?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  disconnect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  delete?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  connect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  update?: Prisma.friendshipUpdateWithWhereUniqueWithoutReceiverInput | Prisma.friendshipUpdateWithWhereUniqueWithoutReceiverInput[]
  updateMany?: Prisma.friendshipUpdateManyWithWhereWithoutReceiverInput | Prisma.friendshipUpdateManyWithWhereWithoutReceiverInput[]
  deleteMany?: Prisma.friendshipScalarWhereInput | Prisma.friendshipScalarWhereInput[]
}

export type friendshipUncheckedUpdateManyWithoutSenderNestedInput = {
  create?: Prisma.XOR<Prisma.friendshipCreateWithoutSenderInput, Prisma.friendshipUncheckedCreateWithoutSenderInput> | Prisma.friendshipCreateWithoutSenderInput[] | Prisma.friendshipUncheckedCreateWithoutSenderInput[]
  connectOrCreate?: Prisma.friendshipCreateOrConnectWithoutSenderInput | Prisma.friendshipCreateOrConnectWithoutSenderInput[]
  upsert?: Prisma.friendshipUpsertWithWhereUniqueWithoutSenderInput | Prisma.friendshipUpsertWithWhereUniqueWithoutSenderInput[]
  createMany?: Prisma.friendshipCreateManySenderInputEnvelope
  set?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  disconnect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  delete?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  connect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  update?: Prisma.friendshipUpdateWithWhereUniqueWithoutSenderInput | Prisma.friendshipUpdateWithWhereUniqueWithoutSenderInput[]
  updateMany?: Prisma.friendshipUpdateManyWithWhereWithoutSenderInput | Prisma.friendshipUpdateManyWithWhereWithoutSenderInput[]
  deleteMany?: Prisma.friendshipScalarWhereInput | Prisma.friendshipScalarWhereInput[]
}

export type friendshipUncheckedUpdateManyWithoutReceiverNestedInput = {
  create?: Prisma.XOR<Prisma.friendshipCreateWithoutReceiverInput, Prisma.friendshipUncheckedCreateWithoutReceiverInput> | Prisma.friendshipCreateWithoutReceiverInput[] | Prisma.friendshipUncheckedCreateWithoutReceiverInput[]
  connectOrCreate?: Prisma.friendshipCreateOrConnectWithoutReceiverInput | Prisma.friendshipCreateOrConnectWithoutReceiverInput[]
  upsert?: Prisma.friendshipUpsertWithWhereUniqueWithoutReceiverInput | Prisma.friendshipUpsertWithWhereUniqueWithoutReceiverInput[]
  createMany?: Prisma.friendshipCreateManyReceiverInputEnvelope
  set?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  disconnect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  delete?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  connect?: Prisma.friendshipWhereUniqueInput | Prisma.friendshipWhereUniqueInput[]
  update?: Prisma.friendshipUpdateWithWhereUniqueWithoutReceiverInput | Prisma.friendshipUpdateWithWhereUniqueWithoutReceiverInput[]
  updateMany?: Prisma.friendshipUpdateManyWithWhereWithoutReceiverInput | Prisma.friendshipUpdateManyWithWhereWithoutReceiverInput[]
  deleteMany?: Prisma.friendshipScalarWhereInput | Prisma.friendshipScalarWhereInput[]
}

export type EnumFriendshipStatusFieldUpdateOperationsInput = {
  set?: $Enums.FriendshipStatus
}

export type friendshipCreateWithoutSenderInput = {
  id?: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
  receiver: Prisma.userCreateNestedOneWithoutReceivedFriendRequestsInput
}

export type friendshipUncheckedCreateWithoutSenderInput = {
  id?: string
  receiverId: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type friendshipCreateOrConnectWithoutSenderInput = {
  where: Prisma.friendshipWhereUniqueInput
  create: Prisma.XOR<Prisma.friendshipCreateWithoutSenderInput, Prisma.friendshipUncheckedCreateWithoutSenderInput>
}

export type friendshipCreateManySenderInputEnvelope = {
  data: Prisma.friendshipCreateManySenderInput | Prisma.friendshipCreateManySenderInput[]
  skipDuplicates?: boolean
}

export type friendshipCreateWithoutReceiverInput = {
  id?: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
  sender: Prisma.userCreateNestedOneWithoutSentFriendRequestsInput
}

export type friendshipUncheckedCreateWithoutReceiverInput = {
  id?: string
  senderId: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type friendshipCreateOrConnectWithoutReceiverInput = {
  where: Prisma.friendshipWhereUniqueInput
  create: Prisma.XOR<Prisma.friendshipCreateWithoutReceiverInput, Prisma.friendshipUncheckedCreateWithoutReceiverInput>
}

export type friendshipCreateManyReceiverInputEnvelope = {
  data: Prisma.friendshipCreateManyReceiverInput | Prisma.friendshipCreateManyReceiverInput[]
  skipDuplicates?: boolean
}

export type friendshipUpsertWithWhereUniqueWithoutSenderInput = {
  where: Prisma.friendshipWhereUniqueInput
  update: Prisma.XOR<Prisma.friendshipUpdateWithoutSenderInput, Prisma.friendshipUncheckedUpdateWithoutSenderInput>
  create: Prisma.XOR<Prisma.friendshipCreateWithoutSenderInput, Prisma.friendshipUncheckedCreateWithoutSenderInput>
}

export type friendshipUpdateWithWhereUniqueWithoutSenderInput = {
  where: Prisma.friendshipWhereUniqueInput
  data: Prisma.XOR<Prisma.friendshipUpdateWithoutSenderInput, Prisma.friendshipUncheckedUpdateWithoutSenderInput>
}

export type friendshipUpdateManyWithWhereWithoutSenderInput = {
  where: Prisma.friendshipScalarWhereInput
  data: Prisma.XOR<Prisma.friendshipUpdateManyMutationInput, Prisma.friendshipUncheckedUpdateManyWithoutSenderInput>
}

export type friendshipScalarWhereInput = {
  AND?: Prisma.friendshipScalarWhereInput | Prisma.friendshipScalarWhereInput[]
  OR?: Prisma.friendshipScalarWhereInput[]
  NOT?: Prisma.friendshipScalarWhereInput | Prisma.friendshipScalarWhereInput[]
  id?: Prisma.StringFilter<"friendship"> | string
  senderId?: Prisma.StringFilter<"friendship"> | string
  receiverId?: Prisma.StringFilter<"friendship"> | string
  status?: Prisma.EnumFriendshipStatusFilter<"friendship"> | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFilter<"friendship"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"friendship"> | Date | string
}

export type friendshipUpsertWithWhereUniqueWithoutReceiverInput = {
  where: Prisma.friendshipWhereUniqueInput
  update: Prisma.XOR<Prisma.friendshipUpdateWithoutReceiverInput, Prisma.friendshipUncheckedUpdateWithoutReceiverInput>
  create: Prisma.XOR<Prisma.friendshipCreateWithoutReceiverInput, Prisma.friendshipUncheckedCreateWithoutReceiverInput>
}

export type friendshipUpdateWithWhereUniqueWithoutReceiverInput = {
  where: Prisma.friendshipWhereUniqueInput
  data: Prisma.XOR<Prisma.friendshipUpdateWithoutReceiverInput, Prisma.friendshipUncheckedUpdateWithoutReceiverInput>
}

export type friendshipUpdateManyWithWhereWithoutReceiverInput = {
  where: Prisma.friendshipScalarWhereInput
  data: Prisma.XOR<Prisma.friendshipUpdateManyMutationInput, Prisma.friendshipUncheckedUpdateManyWithoutReceiverInput>
}

export type friendshipCreateManySenderInput = {
  id?: string
  receiverId: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type friendshipCreateManyReceiverInput = {
  id?: string
  senderId: string
  status?: $Enums.FriendshipStatus
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type friendshipUpdateWithoutSenderInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  receiver?: Prisma.userUpdateOneRequiredWithoutReceivedFriendRequestsNestedInput
}

export type friendshipUncheckedUpdateWithoutSenderInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  receiverId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type friendshipUncheckedUpdateManyWithoutSenderInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  receiverId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type friendshipUpdateWithoutReceiverInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  sender?: Prisma.userUpdateOneRequiredWithoutSentFriendRequestsNestedInput
}

export type friendshipUncheckedUpdateWithoutReceiverInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  senderId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type friendshipUncheckedUpdateManyWithoutReceiverInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  senderId?: Prisma.StringFieldUpdateOperationsInput | string
  status?: Prisma.EnumFriendshipStatusFieldUpdateOperationsInput | $Enums.FriendshipStatus
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}



export type friendshipSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  senderId?: boolean
  receiverId?: boolean
  status?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  sender?: boolean | Prisma.userDefaultArgs<ExtArgs>
  receiver?: boolean | Prisma.userDefaultArgs<ExtArgs>
}, ExtArgs["result"]["friendship"]>

export type friendshipSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  senderId?: boolean
  receiverId?: boolean
  status?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  sender?: boolean | Prisma.userDefaultArgs<ExtArgs>
  receiver?: boolean | Prisma.userDefaultArgs<ExtArgs>
}, ExtArgs["result"]["friendship"]>

export type friendshipSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  senderId?: boolean
  receiverId?: boolean
  status?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  sender?: boolean | Prisma.userDefaultArgs<ExtArgs>
  receiver?: boolean | Prisma.userDefaultArgs<ExtArgs>
}, ExtArgs["result"]["friendship"]>

export type friendshipSelectScalar = {
  id?: boolean
  senderId?: boolean
  receiverId?: boolean
  status?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type friendshipOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "senderId" | "receiverId" | "status" | "createdAt" | "updatedAt", ExtArgs["result"]["friendship"]>
export type friendshipInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  sender?: boolean | Prisma.userDefaultArgs<ExtArgs>
  receiver?: boolean | Prisma.userDefaultArgs<ExtArgs>
}
export type friendshipIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  sender?: boolean | Prisma.userDefaultArgs<ExtArgs>
  receiver?: boolean | Prisma.userDefaultArgs<ExtArgs>
}
export type friendshipIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  sender?: boolean | Prisma.userDefaultArgs<ExtArgs>
  receiver?: boolean | Prisma.userDefaultArgs<ExtArgs>
}

export type $friendshipPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "friendship"
  objects: {
    sender: Prisma.$userPayload<ExtArgs>
    receiver: Prisma.$userPayload<ExtArgs>
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    senderId: string
    receiverId: string
    status: $Enums.FriendshipStatus
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["friendship"]>
  composites: {}
}

export type friendshipGetPayload<S extends boolean | null | undefined | friendshipDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$friendshipPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for friendship.
 * 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__friendshipClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  sender<T extends Prisma.userDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.userDefaultArgs<ExtArgs>>): Prisma.Prisma__userClient<runtime.Types.Result.GetResult<Prisma.$userPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  receiver<T extends Prisma.userDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.userDefaultArgs<ExtArgs>>): Prisma.Prisma__userClient<runtime.Types.Result.GetResult<Prisma.$userPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  /**
   * Attaches callbacks for the resolution and/or rejection of the Promise.
   * @param onfulfilled The callback to execute when the Promise is resolved.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of which ever callback is executed.
   */
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): 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 friendship model
 */
export interface friendshipFieldRefs {
  readonly id: Prisma.FieldRef<"friendship", 'String'>
  readonly senderId: Prisma.FieldRef<"friendship", 'String'>
  readonly receiverId: Prisma.FieldRef<"friendship", 'String'>
  readonly status: Prisma.FieldRef<"friendship", 'FriendshipStatus'>
  readonly createdAt: Prisma.FieldRef<"friendship", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"friendship", 'DateTime'>
}
    

// Custom InputTypes
/**
 * friendship findUnique
 */
export type friendshipFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the friendship
   */
  select?: Prisma.friendshipSelect<ExtArgs> | null
  /**
   * Omit specific fields from the friendship
   */
  omit?: Prisma.friendshipOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.friendshipInclude<ExtArgs> | null
  /**
   * Filter, which friendship to fetch.
   */
  where: Prisma.friendshipWhereUniqueInput
}

/**
 * friendship findUniqueOrThrow
 */
export type friendshipFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the friendship
   */
  select?: Prisma.friendshipSelect<ExtArgs> | null
  /**
   * Omit specific fields from the friendship
   */
  omit?: Prisma.friendshipOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.friendshipInclude<ExtArgs> | null
  /**
   * Filter, which friendship to fetch.
   */
  where: Prisma.friendshipWhereUniqueInput
}

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

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

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

/**
 * friendship create
 */
export type friendshipCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the friendship
   */
  select?: Prisma.friendshipSelect<ExtArgs> | null
  /**
   * Omit specific fields from the friendship
   */
  omit?: Prisma.friendshipOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.friendshipInclude<ExtArgs> | null
  /**
   * The data needed to create a friendship.
   */
  data: Prisma.XOR<Prisma.friendshipCreateInput, Prisma.friendshipUncheckedCreateInput>
}

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

/**
 * friendship createManyAndReturn
 */
export type friendshipCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the friendship
   */
  select?: Prisma.friendshipSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the friendship
   */
  omit?: Prisma.friendshipOmit<ExtArgs> | null
  /**
   * The data used to create many friendships.
   */
  data: Prisma.friendshipCreateManyInput | Prisma.friendshipCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.friendshipIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * friendship update
 */
export type friendshipUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the friendship
   */
  select?: Prisma.friendshipSelect<ExtArgs> | null
  /**
   * Omit specific fields from the friendship
   */
  omit?: Prisma.friendshipOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.friendshipInclude<ExtArgs> | null
  /**
   * The data needed to update a friendship.
   */
  data: Prisma.XOR<Prisma.friendshipUpdateInput, Prisma.friendshipUncheckedUpdateInput>
  /**
   * Choose, which friendship to update.
   */
  where: Prisma.friendshipWhereUniqueInput
}

/**
 * friendship updateMany
 */
export type friendshipUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update friendships.
   */
  data: Prisma.XOR<Prisma.friendshipUpdateManyMutationInput, Prisma.friendshipUncheckedUpdateManyInput>
  /**
   * Filter which friendships to update
   */
  where?: Prisma.friendshipWhereInput
  /**
   * Limit how many friendships to update.
   */
  limit?: number
}

/**
 * friendship updateManyAndReturn
 */
export type friendshipUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the friendship
   */
  select?: Prisma.friendshipSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the friendship
   */
  omit?: Prisma.friendshipOmit<ExtArgs> | null
  /**
   * The data used to update friendships.
   */
  data: Prisma.XOR<Prisma.friendshipUpdateManyMutationInput, Prisma.friendshipUncheckedUpdateManyInput>
  /**
   * Filter which friendships to update
   */
  where?: Prisma.friendshipWhereInput
  /**
   * Limit how many friendships to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.friendshipIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * friendship upsert
 */
export type friendshipUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the friendship
   */
  select?: Prisma.friendshipSelect<ExtArgs> | null
  /**
   * Omit specific fields from the friendship
   */
  omit?: Prisma.friendshipOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.friendshipInclude<ExtArgs> | null
  /**
   * The filter to search for the friendship to update in case it exists.
   */
  where: Prisma.friendshipWhereUniqueInput
  /**
   * In case the friendship found by the `where` argument doesn't exist, create a new friendship with this data.
   */
  create: Prisma.XOR<Prisma.friendshipCreateInput, Prisma.friendshipUncheckedCreateInput>
  /**
   * In case the friendship was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.friendshipUpdateInput, Prisma.friendshipUncheckedUpdateInput>
}

/**
 * friendship delete
 */
export type friendshipDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the friendship
   */
  select?: Prisma.friendshipSelect<ExtArgs> | null
  /**
   * Omit specific fields from the friendship
   */
  omit?: Prisma.friendshipOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.friendshipInclude<ExtArgs> | null
  /**
   * Filter which friendship to delete.
   */
  where: Prisma.friendshipWhereUniqueInput
}

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

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