/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `Message` 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 Message * */ export type MessageModel = runtime.Types.Result.DefaultSelection export type AggregateMessage = { _count: MessageCountAggregateOutputType | null _min: MessageMinAggregateOutputType | null _max: MessageMaxAggregateOutputType | null } export type MessageMinAggregateOutputType = { id: string | null conversationId: string | null senderId: string | null content: string | null createdAt: Date | null } export type MessageMaxAggregateOutputType = { id: string | null conversationId: string | null senderId: string | null content: string | null createdAt: Date | null } export type MessageCountAggregateOutputType = { id: number conversationId: number senderId: number content: number createdAt: number _all: number } export type MessageMinAggregateInputType = { id?: true conversationId?: true senderId?: true content?: true createdAt?: true } export type MessageMaxAggregateInputType = { id?: true conversationId?: true senderId?: true content?: true createdAt?: true } export type MessageCountAggregateInputType = { id?: true conversationId?: true senderId?: true content?: true createdAt?: true _all?: true } export type MessageAggregateArgs = { /** * Filter which Message to aggregate. */ where?: Prisma.MessageWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Messages to fetch. */ orderBy?: Prisma.MessageOrderByWithRelationInput | Prisma.MessageOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.MessageWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Messages 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` Messages. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Messages **/ _count?: true | MessageCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: MessageMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: MessageMaxAggregateInputType } export type GetMessageAggregateType = { [P in keyof T & keyof AggregateMessage]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type MessageGroupByArgs = { where?: Prisma.MessageWhereInput orderBy?: Prisma.MessageOrderByWithAggregationInput | Prisma.MessageOrderByWithAggregationInput[] by: Prisma.MessageScalarFieldEnum[] | Prisma.MessageScalarFieldEnum having?: Prisma.MessageScalarWhereWithAggregatesInput take?: number skip?: number _count?: MessageCountAggregateInputType | true _min?: MessageMinAggregateInputType _max?: MessageMaxAggregateInputType } export type MessageGroupByOutputType = { id: string conversationId: string senderId: string content: string createdAt: Date _count: MessageCountAggregateOutputType | null _min: MessageMinAggregateOutputType | null _max: MessageMaxAggregateOutputType | null } type GetMessageGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof MessageGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type MessageWhereInput = { AND?: Prisma.MessageWhereInput | Prisma.MessageWhereInput[] OR?: Prisma.MessageWhereInput[] NOT?: Prisma.MessageWhereInput | Prisma.MessageWhereInput[] id?: Prisma.StringFilter<"Message"> | string conversationId?: Prisma.StringFilter<"Message"> | string senderId?: Prisma.StringFilter<"Message"> | string content?: Prisma.StringFilter<"Message"> | string createdAt?: Prisma.DateTimeFilter<"Message"> | Date | string conversation?: Prisma.XOR sender?: Prisma.XOR } export type MessageOrderByWithRelationInput = { id?: Prisma.SortOrder conversationId?: Prisma.SortOrder senderId?: Prisma.SortOrder content?: Prisma.SortOrder createdAt?: Prisma.SortOrder conversation?: Prisma.ConversationOrderByWithRelationInput sender?: Prisma.UserOrderByWithRelationInput } export type MessageWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: Prisma.MessageWhereInput | Prisma.MessageWhereInput[] OR?: Prisma.MessageWhereInput[] NOT?: Prisma.MessageWhereInput | Prisma.MessageWhereInput[] conversationId?: Prisma.StringFilter<"Message"> | string senderId?: Prisma.StringFilter<"Message"> | string content?: Prisma.StringFilter<"Message"> | string createdAt?: Prisma.DateTimeFilter<"Message"> | Date | string conversation?: Prisma.XOR sender?: Prisma.XOR }, "id"> export type MessageOrderByWithAggregationInput = { id?: Prisma.SortOrder conversationId?: Prisma.SortOrder senderId?: Prisma.SortOrder content?: Prisma.SortOrder createdAt?: Prisma.SortOrder _count?: Prisma.MessageCountOrderByAggregateInput _max?: Prisma.MessageMaxOrderByAggregateInput _min?: Prisma.MessageMinOrderByAggregateInput } export type MessageScalarWhereWithAggregatesInput = { AND?: Prisma.MessageScalarWhereWithAggregatesInput | Prisma.MessageScalarWhereWithAggregatesInput[] OR?: Prisma.MessageScalarWhereWithAggregatesInput[] NOT?: Prisma.MessageScalarWhereWithAggregatesInput | Prisma.MessageScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"Message"> | string conversationId?: Prisma.StringWithAggregatesFilter<"Message"> | string senderId?: Prisma.StringWithAggregatesFilter<"Message"> | string content?: Prisma.StringWithAggregatesFilter<"Message"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"Message"> | Date | string } export type MessageCreateInput = { id?: string content: string createdAt?: Date | string conversation: Prisma.ConversationCreateNestedOneWithoutMessagesInput sender: Prisma.UserCreateNestedOneWithoutMessagesInput } export type MessageUncheckedCreateInput = { id?: string conversationId: string senderId: string content: string createdAt?: Date | string } export type MessageUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string conversation?: Prisma.ConversationUpdateOneRequiredWithoutMessagesNestedInput sender?: Prisma.UserUpdateOneRequiredWithoutMessagesNestedInput } export type MessageUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string conversationId?: Prisma.StringFieldUpdateOperationsInput | string senderId?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageCreateManyInput = { id?: string conversationId: string senderId: string content: string createdAt?: Date | string } export type MessageUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string conversationId?: Prisma.StringFieldUpdateOperationsInput | string senderId?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageListRelationFilter = { every?: Prisma.MessageWhereInput some?: Prisma.MessageWhereInput none?: Prisma.MessageWhereInput } export type MessageOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } export type MessageCountOrderByAggregateInput = { id?: Prisma.SortOrder conversationId?: Prisma.SortOrder senderId?: Prisma.SortOrder content?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type MessageMaxOrderByAggregateInput = { id?: Prisma.SortOrder conversationId?: Prisma.SortOrder senderId?: Prisma.SortOrder content?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type MessageMinOrderByAggregateInput = { id?: Prisma.SortOrder conversationId?: Prisma.SortOrder senderId?: Prisma.SortOrder content?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type MessageCreateNestedManyWithoutSenderInput = { create?: Prisma.XOR | Prisma.MessageCreateWithoutSenderInput[] | Prisma.MessageUncheckedCreateWithoutSenderInput[] connectOrCreate?: Prisma.MessageCreateOrConnectWithoutSenderInput | Prisma.MessageCreateOrConnectWithoutSenderInput[] createMany?: Prisma.MessageCreateManySenderInputEnvelope connect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] } export type MessageUncheckedCreateNestedManyWithoutSenderInput = { create?: Prisma.XOR | Prisma.MessageCreateWithoutSenderInput[] | Prisma.MessageUncheckedCreateWithoutSenderInput[] connectOrCreate?: Prisma.MessageCreateOrConnectWithoutSenderInput | Prisma.MessageCreateOrConnectWithoutSenderInput[] createMany?: Prisma.MessageCreateManySenderInputEnvelope connect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] } export type MessageUpdateManyWithoutSenderNestedInput = { create?: Prisma.XOR | Prisma.MessageCreateWithoutSenderInput[] | Prisma.MessageUncheckedCreateWithoutSenderInput[] connectOrCreate?: Prisma.MessageCreateOrConnectWithoutSenderInput | Prisma.MessageCreateOrConnectWithoutSenderInput[] upsert?: Prisma.MessageUpsertWithWhereUniqueWithoutSenderInput | Prisma.MessageUpsertWithWhereUniqueWithoutSenderInput[] createMany?: Prisma.MessageCreateManySenderInputEnvelope set?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] disconnect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] delete?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] connect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] update?: Prisma.MessageUpdateWithWhereUniqueWithoutSenderInput | Prisma.MessageUpdateWithWhereUniqueWithoutSenderInput[] updateMany?: Prisma.MessageUpdateManyWithWhereWithoutSenderInput | Prisma.MessageUpdateManyWithWhereWithoutSenderInput[] deleteMany?: Prisma.MessageScalarWhereInput | Prisma.MessageScalarWhereInput[] } export type MessageUncheckedUpdateManyWithoutSenderNestedInput = { create?: Prisma.XOR | Prisma.MessageCreateWithoutSenderInput[] | Prisma.MessageUncheckedCreateWithoutSenderInput[] connectOrCreate?: Prisma.MessageCreateOrConnectWithoutSenderInput | Prisma.MessageCreateOrConnectWithoutSenderInput[] upsert?: Prisma.MessageUpsertWithWhereUniqueWithoutSenderInput | Prisma.MessageUpsertWithWhereUniqueWithoutSenderInput[] createMany?: Prisma.MessageCreateManySenderInputEnvelope set?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] disconnect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] delete?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] connect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] update?: Prisma.MessageUpdateWithWhereUniqueWithoutSenderInput | Prisma.MessageUpdateWithWhereUniqueWithoutSenderInput[] updateMany?: Prisma.MessageUpdateManyWithWhereWithoutSenderInput | Prisma.MessageUpdateManyWithWhereWithoutSenderInput[] deleteMany?: Prisma.MessageScalarWhereInput | Prisma.MessageScalarWhereInput[] } export type MessageCreateNestedManyWithoutConversationInput = { create?: Prisma.XOR | Prisma.MessageCreateWithoutConversationInput[] | Prisma.MessageUncheckedCreateWithoutConversationInput[] connectOrCreate?: Prisma.MessageCreateOrConnectWithoutConversationInput | Prisma.MessageCreateOrConnectWithoutConversationInput[] createMany?: Prisma.MessageCreateManyConversationInputEnvelope connect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] } export type MessageUncheckedCreateNestedManyWithoutConversationInput = { create?: Prisma.XOR | Prisma.MessageCreateWithoutConversationInput[] | Prisma.MessageUncheckedCreateWithoutConversationInput[] connectOrCreate?: Prisma.MessageCreateOrConnectWithoutConversationInput | Prisma.MessageCreateOrConnectWithoutConversationInput[] createMany?: Prisma.MessageCreateManyConversationInputEnvelope connect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] } export type MessageUpdateManyWithoutConversationNestedInput = { create?: Prisma.XOR | Prisma.MessageCreateWithoutConversationInput[] | Prisma.MessageUncheckedCreateWithoutConversationInput[] connectOrCreate?: Prisma.MessageCreateOrConnectWithoutConversationInput | Prisma.MessageCreateOrConnectWithoutConversationInput[] upsert?: Prisma.MessageUpsertWithWhereUniqueWithoutConversationInput | Prisma.MessageUpsertWithWhereUniqueWithoutConversationInput[] createMany?: Prisma.MessageCreateManyConversationInputEnvelope set?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] disconnect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] delete?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] connect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] update?: Prisma.MessageUpdateWithWhereUniqueWithoutConversationInput | Prisma.MessageUpdateWithWhereUniqueWithoutConversationInput[] updateMany?: Prisma.MessageUpdateManyWithWhereWithoutConversationInput | Prisma.MessageUpdateManyWithWhereWithoutConversationInput[] deleteMany?: Prisma.MessageScalarWhereInput | Prisma.MessageScalarWhereInput[] } export type MessageUncheckedUpdateManyWithoutConversationNestedInput = { create?: Prisma.XOR | Prisma.MessageCreateWithoutConversationInput[] | Prisma.MessageUncheckedCreateWithoutConversationInput[] connectOrCreate?: Prisma.MessageCreateOrConnectWithoutConversationInput | Prisma.MessageCreateOrConnectWithoutConversationInput[] upsert?: Prisma.MessageUpsertWithWhereUniqueWithoutConversationInput | Prisma.MessageUpsertWithWhereUniqueWithoutConversationInput[] createMany?: Prisma.MessageCreateManyConversationInputEnvelope set?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] disconnect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] delete?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] connect?: Prisma.MessageWhereUniqueInput | Prisma.MessageWhereUniqueInput[] update?: Prisma.MessageUpdateWithWhereUniqueWithoutConversationInput | Prisma.MessageUpdateWithWhereUniqueWithoutConversationInput[] updateMany?: Prisma.MessageUpdateManyWithWhereWithoutConversationInput | Prisma.MessageUpdateManyWithWhereWithoutConversationInput[] deleteMany?: Prisma.MessageScalarWhereInput | Prisma.MessageScalarWhereInput[] } export type MessageCreateWithoutSenderInput = { id?: string content: string createdAt?: Date | string conversation: Prisma.ConversationCreateNestedOneWithoutMessagesInput } export type MessageUncheckedCreateWithoutSenderInput = { id?: string conversationId: string content: string createdAt?: Date | string } export type MessageCreateOrConnectWithoutSenderInput = { where: Prisma.MessageWhereUniqueInput create: Prisma.XOR } export type MessageCreateManySenderInputEnvelope = { data: Prisma.MessageCreateManySenderInput | Prisma.MessageCreateManySenderInput[] } export type MessageUpsertWithWhereUniqueWithoutSenderInput = { where: Prisma.MessageWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type MessageUpdateWithWhereUniqueWithoutSenderInput = { where: Prisma.MessageWhereUniqueInput data: Prisma.XOR } export type MessageUpdateManyWithWhereWithoutSenderInput = { where: Prisma.MessageScalarWhereInput data: Prisma.XOR } export type MessageScalarWhereInput = { AND?: Prisma.MessageScalarWhereInput | Prisma.MessageScalarWhereInput[] OR?: Prisma.MessageScalarWhereInput[] NOT?: Prisma.MessageScalarWhereInput | Prisma.MessageScalarWhereInput[] id?: Prisma.StringFilter<"Message"> | string conversationId?: Prisma.StringFilter<"Message"> | string senderId?: Prisma.StringFilter<"Message"> | string content?: Prisma.StringFilter<"Message"> | string createdAt?: Prisma.DateTimeFilter<"Message"> | Date | string } export type MessageCreateWithoutConversationInput = { id?: string content: string createdAt?: Date | string sender: Prisma.UserCreateNestedOneWithoutMessagesInput } export type MessageUncheckedCreateWithoutConversationInput = { id?: string senderId: string content: string createdAt?: Date | string } export type MessageCreateOrConnectWithoutConversationInput = { where: Prisma.MessageWhereUniqueInput create: Prisma.XOR } export type MessageCreateManyConversationInputEnvelope = { data: Prisma.MessageCreateManyConversationInput | Prisma.MessageCreateManyConversationInput[] } export type MessageUpsertWithWhereUniqueWithoutConversationInput = { where: Prisma.MessageWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type MessageUpdateWithWhereUniqueWithoutConversationInput = { where: Prisma.MessageWhereUniqueInput data: Prisma.XOR } export type MessageUpdateManyWithWhereWithoutConversationInput = { where: Prisma.MessageScalarWhereInput data: Prisma.XOR } export type MessageCreateManySenderInput = { id?: string conversationId: string content: string createdAt?: Date | string } export type MessageUpdateWithoutSenderInput = { id?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string conversation?: Prisma.ConversationUpdateOneRequiredWithoutMessagesNestedInput } export type MessageUncheckedUpdateWithoutSenderInput = { id?: Prisma.StringFieldUpdateOperationsInput | string conversationId?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageUncheckedUpdateManyWithoutSenderInput = { id?: Prisma.StringFieldUpdateOperationsInput | string conversationId?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageCreateManyConversationInput = { id?: string senderId: string content: string createdAt?: Date | string } export type MessageUpdateWithoutConversationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string sender?: Prisma.UserUpdateOneRequiredWithoutMessagesNestedInput } export type MessageUncheckedUpdateWithoutConversationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string senderId?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageUncheckedUpdateManyWithoutConversationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string senderId?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean conversationId?: boolean senderId?: boolean content?: boolean createdAt?: boolean conversation?: boolean | Prisma.ConversationDefaultArgs sender?: boolean | Prisma.UserDefaultArgs }, ExtArgs["result"]["message"]> export type MessageSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean conversationId?: boolean senderId?: boolean content?: boolean createdAt?: boolean conversation?: boolean | Prisma.ConversationDefaultArgs sender?: boolean | Prisma.UserDefaultArgs }, ExtArgs["result"]["message"]> export type MessageSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean conversationId?: boolean senderId?: boolean content?: boolean createdAt?: boolean conversation?: boolean | Prisma.ConversationDefaultArgs sender?: boolean | Prisma.UserDefaultArgs }, ExtArgs["result"]["message"]> export type MessageSelectScalar = { id?: boolean conversationId?: boolean senderId?: boolean content?: boolean createdAt?: boolean } export type MessageOmit = runtime.Types.Extensions.GetOmit<"id" | "conversationId" | "senderId" | "content" | "createdAt", ExtArgs["result"]["message"]> export type MessageInclude = { conversation?: boolean | Prisma.ConversationDefaultArgs sender?: boolean | Prisma.UserDefaultArgs } export type MessageIncludeCreateManyAndReturn = { conversation?: boolean | Prisma.ConversationDefaultArgs sender?: boolean | Prisma.UserDefaultArgs } export type MessageIncludeUpdateManyAndReturn = { conversation?: boolean | Prisma.ConversationDefaultArgs sender?: boolean | Prisma.UserDefaultArgs } export type $MessagePayload = { name: "Message" objects: { conversation: Prisma.$ConversationPayload sender: Prisma.$UserPayload } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string conversationId: string senderId: string content: string createdAt: Date }, ExtArgs["result"]["message"]> composites: {} } export type MessageGetPayload = runtime.Types.Result.GetResult export type MessageCountArgs = Omit & { select?: MessageCountAggregateInputType | true } export interface MessageDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Message'], meta: { name: 'Message' } } /** * Find zero or one Message that matches the filter. * @param {MessageFindUniqueArgs} args - Arguments to find a Message * @example * // Get one Message * const message = await prisma.message.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__MessageClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Message that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {MessageFindUniqueOrThrowArgs} args - Arguments to find a Message * @example * // Get one Message * const message = await prisma.message.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__MessageClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Message 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 {MessageFindFirstArgs} args - Arguments to find a Message * @example * // Get one Message * const message = await prisma.message.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__MessageClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Message 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 {MessageFindFirstOrThrowArgs} args - Arguments to find a Message * @example * // Get one Message * const message = await prisma.message.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__MessageClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Messages 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 {MessageFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Messages * const messages = await prisma.message.findMany() * * // Get first 10 Messages * const messages = await prisma.message.findMany({ take: 10 }) * * // Only select the `id` * const messageWithIdOnly = await prisma.message.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Message. * @param {MessageCreateArgs} args - Arguments to create a Message. * @example * // Create one Message * const Message = await prisma.message.create({ * data: { * // ... data to create a Message * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__MessageClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Messages. * @param {MessageCreateManyArgs} args - Arguments to create many Messages. * @example * // Create many Messages * const message = await prisma.message.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many Messages and returns the data saved in the database. * @param {MessageCreateManyAndReturnArgs} args - Arguments to create many Messages. * @example * // Create many Messages * const message = await prisma.message.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Messages and only return the `id` * const messageWithIdOnly = await prisma.message.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(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> /** * Delete a Message. * @param {MessageDeleteArgs} args - Arguments to delete one Message. * @example * // Delete one Message * const Message = await prisma.message.delete({ * where: { * // ... filter to delete one Message * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__MessageClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Message. * @param {MessageUpdateArgs} args - Arguments to update one Message. * @example * // Update one Message * const message = await prisma.message.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__MessageClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Messages. * @param {MessageDeleteManyArgs} args - Arguments to filter Messages to delete. * @example * // Delete a few Messages * const { count } = await prisma.message.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Messages. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MessageUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Messages * const message = await prisma.message.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Messages and returns the data updated in the database. * @param {MessageUpdateManyAndReturnArgs} args - Arguments to update many Messages. * @example * // Update many Messages * const message = await prisma.message.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Messages and only return the `id` * const messageWithIdOnly = await prisma.message.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(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one Message. * @param {MessageUpsertArgs} args - Arguments to update or create a Message. * @example * // Update or create a Message * const message = await prisma.message.upsert({ * create: { * // ... data to create a Message * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Message we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__MessageClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Messages. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MessageCountArgs} args - Arguments to filter Messages to count. * @example * // Count the number of Messages * const count = await prisma.message.count({ * where: { * // ... the filter for the Messages we want to count * } * }) **/ count( args?: Prisma.Subset, ): Prisma.PrismaPromise< T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType : number > /** * Allows you to perform aggregations operations on a Message. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MessageAggregateArgs} 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(args: Prisma.Subset): Prisma.PrismaPromise> /** * Group by Message. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MessageGroupByArgs} 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 MessageGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: MessageGroupByArgs['orderBy'] } : { orderBy?: MessageGroupByArgs['orderBy'] }, OrderFields extends Prisma.ExcludeUnderscoreKeys>>, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, 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 ? 'orderBy' extends Prisma.Keys ? 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 ? 'orderBy' extends Prisma.Keys ? 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 & InputErrors): {} extends InputErrors ? GetMessageGroupByPayload : Prisma.PrismaPromise /** * Fields of the Message model */ readonly fields: MessageFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Message. * 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__MessageClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" conversation = {}>(args?: Prisma.Subset>): Prisma.Prisma__ConversationClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> sender = {}>(args?: Prisma.Subset>): Prisma.Prisma__UserClient, 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(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * 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(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * 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 } /** * Fields of the Message model */ export interface MessageFieldRefs { readonly id: Prisma.FieldRef<"Message", 'String'> readonly conversationId: Prisma.FieldRef<"Message", 'String'> readonly senderId: Prisma.FieldRef<"Message", 'String'> readonly content: Prisma.FieldRef<"Message", 'String'> readonly createdAt: Prisma.FieldRef<"Message", 'DateTime'> } // Custom InputTypes /** * Message findUnique */ export type MessageFindUniqueArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * Filter, which Message to fetch. */ where: Prisma.MessageWhereUniqueInput } /** * Message findUniqueOrThrow */ export type MessageFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * Filter, which Message to fetch. */ where: Prisma.MessageWhereUniqueInput } /** * Message findFirst */ export type MessageFindFirstArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * Filter, which Message to fetch. */ where?: Prisma.MessageWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Messages to fetch. */ orderBy?: Prisma.MessageOrderByWithRelationInput | Prisma.MessageOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Messages. */ cursor?: Prisma.MessageWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Messages 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` Messages. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Messages. */ distinct?: Prisma.MessageScalarFieldEnum | Prisma.MessageScalarFieldEnum[] } /** * Message findFirstOrThrow */ export type MessageFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * Filter, which Message to fetch. */ where?: Prisma.MessageWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Messages to fetch. */ orderBy?: Prisma.MessageOrderByWithRelationInput | Prisma.MessageOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Messages. */ cursor?: Prisma.MessageWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Messages 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` Messages. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Messages. */ distinct?: Prisma.MessageScalarFieldEnum | Prisma.MessageScalarFieldEnum[] } /** * Message findMany */ export type MessageFindManyArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * Filter, which Messages to fetch. */ where?: Prisma.MessageWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Messages to fetch. */ orderBy?: Prisma.MessageOrderByWithRelationInput | Prisma.MessageOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Messages. */ cursor?: Prisma.MessageWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Messages 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` Messages. */ skip?: number distinct?: Prisma.MessageScalarFieldEnum | Prisma.MessageScalarFieldEnum[] } /** * Message create */ export type MessageCreateArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * The data needed to create a Message. */ data: Prisma.XOR } /** * Message createMany */ export type MessageCreateManyArgs = { /** * The data used to create many Messages. */ data: Prisma.MessageCreateManyInput | Prisma.MessageCreateManyInput[] } /** * Message createManyAndReturn */ export type MessageCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelectCreateManyAndReturn | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * The data used to create many Messages. */ data: Prisma.MessageCreateManyInput | Prisma.MessageCreateManyInput[] /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageIncludeCreateManyAndReturn | null } /** * Message update */ export type MessageUpdateArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * The data needed to update a Message. */ data: Prisma.XOR /** * Choose, which Message to update. */ where: Prisma.MessageWhereUniqueInput } /** * Message updateMany */ export type MessageUpdateManyArgs = { /** * The data used to update Messages. */ data: Prisma.XOR /** * Filter which Messages to update */ where?: Prisma.MessageWhereInput /** * Limit how many Messages to update. */ limit?: number } /** * Message updateManyAndReturn */ export type MessageUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelectUpdateManyAndReturn | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * The data used to update Messages. */ data: Prisma.XOR /** * Filter which Messages to update */ where?: Prisma.MessageWhereInput /** * Limit how many Messages to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageIncludeUpdateManyAndReturn | null } /** * Message upsert */ export type MessageUpsertArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * The filter to search for the Message to update in case it exists. */ where: Prisma.MessageWhereUniqueInput /** * In case the Message found by the `where` argument doesn't exist, create a new Message with this data. */ create: Prisma.XOR /** * In case the Message was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * Message delete */ export type MessageDeleteArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null /** * Filter which Message to delete. */ where: Prisma.MessageWhereUniqueInput } /** * Message deleteMany */ export type MessageDeleteManyArgs = { /** * Filter which Messages to delete */ where?: Prisma.MessageWhereInput /** * Limit how many Messages to delete. */ limit?: number } /** * Message without action */ export type MessageDefaultArgs = { /** * Select specific fields to fetch from the Message */ select?: Prisma.MessageSelect | null /** * Omit specific fields from the Message */ omit?: Prisma.MessageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.MessageInclude | null }