/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `MessageUsage` 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 MessageUsage * */ export type MessageUsageModel = runtime.Types.Result.DefaultSelection export type AggregateMessageUsage = { _count: MessageUsageCountAggregateOutputType | null _avg: MessageUsageAvgAggregateOutputType | null _sum: MessageUsageSumAggregateOutputType | null _min: MessageUsageMinAggregateOutputType | null _max: MessageUsageMaxAggregateOutputType | null } export type MessageUsageAvgAggregateOutputType = { inputTokens: number | null outputTokens: number | null cacheCreationTokens: number | null cacheReadTokens: number | null costUSD: number | null } export type MessageUsageSumAggregateOutputType = { inputTokens: number | null outputTokens: number | null cacheCreationTokens: number | null cacheReadTokens: number | null costUSD: number | null } export type MessageUsageMinAggregateOutputType = { id: string | null sessionId: string | null messageId: string | null requestId: string | null model: string | null speed: string | null timestamp: Date | null date: string | null inputTokens: number | null outputTokens: number | null cacheCreationTokens: number | null cacheReadTokens: number | null costUSD: number | null createdAt: Date | null } export type MessageUsageMaxAggregateOutputType = { id: string | null sessionId: string | null messageId: string | null requestId: string | null model: string | null speed: string | null timestamp: Date | null date: string | null inputTokens: number | null outputTokens: number | null cacheCreationTokens: number | null cacheReadTokens: number | null costUSD: number | null createdAt: Date | null } export type MessageUsageCountAggregateOutputType = { id: number sessionId: number messageId: number requestId: number model: number speed: number timestamp: number date: number inputTokens: number outputTokens: number cacheCreationTokens: number cacheReadTokens: number costUSD: number createdAt: number _all: number } export type MessageUsageAvgAggregateInputType = { inputTokens?: true outputTokens?: true cacheCreationTokens?: true cacheReadTokens?: true costUSD?: true } export type MessageUsageSumAggregateInputType = { inputTokens?: true outputTokens?: true cacheCreationTokens?: true cacheReadTokens?: true costUSD?: true } export type MessageUsageMinAggregateInputType = { id?: true sessionId?: true messageId?: true requestId?: true model?: true speed?: true timestamp?: true date?: true inputTokens?: true outputTokens?: true cacheCreationTokens?: true cacheReadTokens?: true costUSD?: true createdAt?: true } export type MessageUsageMaxAggregateInputType = { id?: true sessionId?: true messageId?: true requestId?: true model?: true speed?: true timestamp?: true date?: true inputTokens?: true outputTokens?: true cacheCreationTokens?: true cacheReadTokens?: true costUSD?: true createdAt?: true } export type MessageUsageCountAggregateInputType = { id?: true sessionId?: true messageId?: true requestId?: true model?: true speed?: true timestamp?: true date?: true inputTokens?: true outputTokens?: true cacheCreationTokens?: true cacheReadTokens?: true costUSD?: true createdAt?: true _all?: true } export type MessageUsageAggregateArgs = { /** * Filter which MessageUsage to aggregate. */ where?: Prisma.MessageUsageWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of MessageUsages to fetch. */ orderBy?: Prisma.MessageUsageOrderByWithRelationInput | Prisma.MessageUsageOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.MessageUsageWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` MessageUsages 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` MessageUsages. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned MessageUsages **/ _count?: true | MessageUsageCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: MessageUsageAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: MessageUsageSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: MessageUsageMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: MessageUsageMaxAggregateInputType } export type GetMessageUsageAggregateType = { [P in keyof T & keyof AggregateMessageUsage]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type MessageUsageGroupByArgs = { where?: Prisma.MessageUsageWhereInput orderBy?: Prisma.MessageUsageOrderByWithAggregationInput | Prisma.MessageUsageOrderByWithAggregationInput[] by: Prisma.MessageUsageScalarFieldEnum[] | Prisma.MessageUsageScalarFieldEnum having?: Prisma.MessageUsageScalarWhereWithAggregatesInput take?: number skip?: number _count?: MessageUsageCountAggregateInputType | true _avg?: MessageUsageAvgAggregateInputType _sum?: MessageUsageSumAggregateInputType _min?: MessageUsageMinAggregateInputType _max?: MessageUsageMaxAggregateInputType } export type MessageUsageGroupByOutputType = { id: string sessionId: string messageId: string requestId: string model: string speed: string timestamp: Date date: string inputTokens: number outputTokens: number cacheCreationTokens: number cacheReadTokens: number costUSD: number createdAt: Date _count: MessageUsageCountAggregateOutputType | null _avg: MessageUsageAvgAggregateOutputType | null _sum: MessageUsageSumAggregateOutputType | null _min: MessageUsageMinAggregateOutputType | null _max: MessageUsageMaxAggregateOutputType | null } export type GetMessageUsageGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof MessageUsageGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type MessageUsageWhereInput = { AND?: Prisma.MessageUsageWhereInput | Prisma.MessageUsageWhereInput[] OR?: Prisma.MessageUsageWhereInput[] NOT?: Prisma.MessageUsageWhereInput | Prisma.MessageUsageWhereInput[] id?: Prisma.StringFilter<"MessageUsage"> | string sessionId?: Prisma.StringFilter<"MessageUsage"> | string messageId?: Prisma.StringFilter<"MessageUsage"> | string requestId?: Prisma.StringFilter<"MessageUsage"> | string model?: Prisma.StringFilter<"MessageUsage"> | string speed?: Prisma.StringFilter<"MessageUsage"> | string timestamp?: Prisma.DateTimeFilter<"MessageUsage"> | Date | string date?: Prisma.StringFilter<"MessageUsage"> | string inputTokens?: Prisma.IntFilter<"MessageUsage"> | number outputTokens?: Prisma.IntFilter<"MessageUsage"> | number cacheCreationTokens?: Prisma.IntFilter<"MessageUsage"> | number cacheReadTokens?: Prisma.IntFilter<"MessageUsage"> | number costUSD?: Prisma.FloatFilter<"MessageUsage"> | number createdAt?: Prisma.DateTimeFilter<"MessageUsage"> | Date | string } export type MessageUsageOrderByWithRelationInput = { id?: Prisma.SortOrder sessionId?: Prisma.SortOrder messageId?: Prisma.SortOrder requestId?: Prisma.SortOrder model?: Prisma.SortOrder speed?: Prisma.SortOrder timestamp?: Prisma.SortOrder date?: Prisma.SortOrder inputTokens?: Prisma.SortOrder outputTokens?: Prisma.SortOrder cacheCreationTokens?: Prisma.SortOrder cacheReadTokens?: Prisma.SortOrder costUSD?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type MessageUsageWhereUniqueInput = Prisma.AtLeast<{ id?: string messageId_requestId?: Prisma.MessageUsageMessageIdRequestIdCompoundUniqueInput AND?: Prisma.MessageUsageWhereInput | Prisma.MessageUsageWhereInput[] OR?: Prisma.MessageUsageWhereInput[] NOT?: Prisma.MessageUsageWhereInput | Prisma.MessageUsageWhereInput[] sessionId?: Prisma.StringFilter<"MessageUsage"> | string messageId?: Prisma.StringFilter<"MessageUsage"> | string requestId?: Prisma.StringFilter<"MessageUsage"> | string model?: Prisma.StringFilter<"MessageUsage"> | string speed?: Prisma.StringFilter<"MessageUsage"> | string timestamp?: Prisma.DateTimeFilter<"MessageUsage"> | Date | string date?: Prisma.StringFilter<"MessageUsage"> | string inputTokens?: Prisma.IntFilter<"MessageUsage"> | number outputTokens?: Prisma.IntFilter<"MessageUsage"> | number cacheCreationTokens?: Prisma.IntFilter<"MessageUsage"> | number cacheReadTokens?: Prisma.IntFilter<"MessageUsage"> | number costUSD?: Prisma.FloatFilter<"MessageUsage"> | number createdAt?: Prisma.DateTimeFilter<"MessageUsage"> | Date | string }, "id" | "messageId_requestId"> export type MessageUsageOrderByWithAggregationInput = { id?: Prisma.SortOrder sessionId?: Prisma.SortOrder messageId?: Prisma.SortOrder requestId?: Prisma.SortOrder model?: Prisma.SortOrder speed?: Prisma.SortOrder timestamp?: Prisma.SortOrder date?: Prisma.SortOrder inputTokens?: Prisma.SortOrder outputTokens?: Prisma.SortOrder cacheCreationTokens?: Prisma.SortOrder cacheReadTokens?: Prisma.SortOrder costUSD?: Prisma.SortOrder createdAt?: Prisma.SortOrder _count?: Prisma.MessageUsageCountOrderByAggregateInput _avg?: Prisma.MessageUsageAvgOrderByAggregateInput _max?: Prisma.MessageUsageMaxOrderByAggregateInput _min?: Prisma.MessageUsageMinOrderByAggregateInput _sum?: Prisma.MessageUsageSumOrderByAggregateInput } export type MessageUsageScalarWhereWithAggregatesInput = { AND?: Prisma.MessageUsageScalarWhereWithAggregatesInput | Prisma.MessageUsageScalarWhereWithAggregatesInput[] OR?: Prisma.MessageUsageScalarWhereWithAggregatesInput[] NOT?: Prisma.MessageUsageScalarWhereWithAggregatesInput | Prisma.MessageUsageScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"MessageUsage"> | string sessionId?: Prisma.StringWithAggregatesFilter<"MessageUsage"> | string messageId?: Prisma.StringWithAggregatesFilter<"MessageUsage"> | string requestId?: Prisma.StringWithAggregatesFilter<"MessageUsage"> | string model?: Prisma.StringWithAggregatesFilter<"MessageUsage"> | string speed?: Prisma.StringWithAggregatesFilter<"MessageUsage"> | string timestamp?: Prisma.DateTimeWithAggregatesFilter<"MessageUsage"> | Date | string date?: Prisma.StringWithAggregatesFilter<"MessageUsage"> | string inputTokens?: Prisma.IntWithAggregatesFilter<"MessageUsage"> | number outputTokens?: Prisma.IntWithAggregatesFilter<"MessageUsage"> | number cacheCreationTokens?: Prisma.IntWithAggregatesFilter<"MessageUsage"> | number cacheReadTokens?: Prisma.IntWithAggregatesFilter<"MessageUsage"> | number costUSD?: Prisma.FloatWithAggregatesFilter<"MessageUsage"> | number createdAt?: Prisma.DateTimeWithAggregatesFilter<"MessageUsage"> | Date | string } export type MessageUsageCreateInput = { id?: string sessionId: string messageId: string requestId: string model: string speed?: string timestamp: Date | string date: string inputTokens: number outputTokens: number cacheCreationTokens: number cacheReadTokens: number costUSD: number createdAt?: Date | string } export type MessageUsageUncheckedCreateInput = { id?: string sessionId: string messageId: string requestId: string model: string speed?: string timestamp: Date | string date: string inputTokens: number outputTokens: number cacheCreationTokens: number cacheReadTokens: number costUSD: number createdAt?: Date | string } export type MessageUsageUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string sessionId?: Prisma.StringFieldUpdateOperationsInput | string messageId?: Prisma.StringFieldUpdateOperationsInput | string requestId?: Prisma.StringFieldUpdateOperationsInput | string model?: Prisma.StringFieldUpdateOperationsInput | string speed?: Prisma.StringFieldUpdateOperationsInput | string timestamp?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string date?: Prisma.StringFieldUpdateOperationsInput | string inputTokens?: Prisma.IntFieldUpdateOperationsInput | number outputTokens?: Prisma.IntFieldUpdateOperationsInput | number cacheCreationTokens?: Prisma.IntFieldUpdateOperationsInput | number cacheReadTokens?: Prisma.IntFieldUpdateOperationsInput | number costUSD?: Prisma.FloatFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageUsageUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string sessionId?: Prisma.StringFieldUpdateOperationsInput | string messageId?: Prisma.StringFieldUpdateOperationsInput | string requestId?: Prisma.StringFieldUpdateOperationsInput | string model?: Prisma.StringFieldUpdateOperationsInput | string speed?: Prisma.StringFieldUpdateOperationsInput | string timestamp?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string date?: Prisma.StringFieldUpdateOperationsInput | string inputTokens?: Prisma.IntFieldUpdateOperationsInput | number outputTokens?: Prisma.IntFieldUpdateOperationsInput | number cacheCreationTokens?: Prisma.IntFieldUpdateOperationsInput | number cacheReadTokens?: Prisma.IntFieldUpdateOperationsInput | number costUSD?: Prisma.FloatFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageUsageCreateManyInput = { id?: string sessionId: string messageId: string requestId: string model: string speed?: string timestamp: Date | string date: string inputTokens: number outputTokens: number cacheCreationTokens: number cacheReadTokens: number costUSD: number createdAt?: Date | string } export type MessageUsageUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string sessionId?: Prisma.StringFieldUpdateOperationsInput | string messageId?: Prisma.StringFieldUpdateOperationsInput | string requestId?: Prisma.StringFieldUpdateOperationsInput | string model?: Prisma.StringFieldUpdateOperationsInput | string speed?: Prisma.StringFieldUpdateOperationsInput | string timestamp?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string date?: Prisma.StringFieldUpdateOperationsInput | string inputTokens?: Prisma.IntFieldUpdateOperationsInput | number outputTokens?: Prisma.IntFieldUpdateOperationsInput | number cacheCreationTokens?: Prisma.IntFieldUpdateOperationsInput | number cacheReadTokens?: Prisma.IntFieldUpdateOperationsInput | number costUSD?: Prisma.FloatFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageUsageUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string sessionId?: Prisma.StringFieldUpdateOperationsInput | string messageId?: Prisma.StringFieldUpdateOperationsInput | string requestId?: Prisma.StringFieldUpdateOperationsInput | string model?: Prisma.StringFieldUpdateOperationsInput | string speed?: Prisma.StringFieldUpdateOperationsInput | string timestamp?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string date?: Prisma.StringFieldUpdateOperationsInput | string inputTokens?: Prisma.IntFieldUpdateOperationsInput | number outputTokens?: Prisma.IntFieldUpdateOperationsInput | number cacheCreationTokens?: Prisma.IntFieldUpdateOperationsInput | number cacheReadTokens?: Prisma.IntFieldUpdateOperationsInput | number costUSD?: Prisma.FloatFieldUpdateOperationsInput | number createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type MessageUsageMessageIdRequestIdCompoundUniqueInput = { messageId: string requestId: string } export type MessageUsageCountOrderByAggregateInput = { id?: Prisma.SortOrder sessionId?: Prisma.SortOrder messageId?: Prisma.SortOrder requestId?: Prisma.SortOrder model?: Prisma.SortOrder speed?: Prisma.SortOrder timestamp?: Prisma.SortOrder date?: Prisma.SortOrder inputTokens?: Prisma.SortOrder outputTokens?: Prisma.SortOrder cacheCreationTokens?: Prisma.SortOrder cacheReadTokens?: Prisma.SortOrder costUSD?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type MessageUsageAvgOrderByAggregateInput = { inputTokens?: Prisma.SortOrder outputTokens?: Prisma.SortOrder cacheCreationTokens?: Prisma.SortOrder cacheReadTokens?: Prisma.SortOrder costUSD?: Prisma.SortOrder } export type MessageUsageMaxOrderByAggregateInput = { id?: Prisma.SortOrder sessionId?: Prisma.SortOrder messageId?: Prisma.SortOrder requestId?: Prisma.SortOrder model?: Prisma.SortOrder speed?: Prisma.SortOrder timestamp?: Prisma.SortOrder date?: Prisma.SortOrder inputTokens?: Prisma.SortOrder outputTokens?: Prisma.SortOrder cacheCreationTokens?: Prisma.SortOrder cacheReadTokens?: Prisma.SortOrder costUSD?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type MessageUsageMinOrderByAggregateInput = { id?: Prisma.SortOrder sessionId?: Prisma.SortOrder messageId?: Prisma.SortOrder requestId?: Prisma.SortOrder model?: Prisma.SortOrder speed?: Prisma.SortOrder timestamp?: Prisma.SortOrder date?: Prisma.SortOrder inputTokens?: Prisma.SortOrder outputTokens?: Prisma.SortOrder cacheCreationTokens?: Prisma.SortOrder cacheReadTokens?: Prisma.SortOrder costUSD?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type MessageUsageSumOrderByAggregateInput = { inputTokens?: Prisma.SortOrder outputTokens?: Prisma.SortOrder cacheCreationTokens?: Prisma.SortOrder cacheReadTokens?: Prisma.SortOrder costUSD?: Prisma.SortOrder } export type MessageUsageSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean sessionId?: boolean messageId?: boolean requestId?: boolean model?: boolean speed?: boolean timestamp?: boolean date?: boolean inputTokens?: boolean outputTokens?: boolean cacheCreationTokens?: boolean cacheReadTokens?: boolean costUSD?: boolean createdAt?: boolean }, ExtArgs["result"]["messageUsage"]> export type MessageUsageSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean sessionId?: boolean messageId?: boolean requestId?: boolean model?: boolean speed?: boolean timestamp?: boolean date?: boolean inputTokens?: boolean outputTokens?: boolean cacheCreationTokens?: boolean cacheReadTokens?: boolean costUSD?: boolean createdAt?: boolean }, ExtArgs["result"]["messageUsage"]> export type MessageUsageSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean sessionId?: boolean messageId?: boolean requestId?: boolean model?: boolean speed?: boolean timestamp?: boolean date?: boolean inputTokens?: boolean outputTokens?: boolean cacheCreationTokens?: boolean cacheReadTokens?: boolean costUSD?: boolean createdAt?: boolean }, ExtArgs["result"]["messageUsage"]> export type MessageUsageSelectScalar = { id?: boolean sessionId?: boolean messageId?: boolean requestId?: boolean model?: boolean speed?: boolean timestamp?: boolean date?: boolean inputTokens?: boolean outputTokens?: boolean cacheCreationTokens?: boolean cacheReadTokens?: boolean costUSD?: boolean createdAt?: boolean } export type MessageUsageOmit = runtime.Types.Extensions.GetOmit<"id" | "sessionId" | "messageId" | "requestId" | "model" | "speed" | "timestamp" | "date" | "inputTokens" | "outputTokens" | "cacheCreationTokens" | "cacheReadTokens" | "costUSD" | "createdAt", ExtArgs["result"]["messageUsage"]> export type $MessageUsagePayload = { name: "MessageUsage" objects: {} scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string sessionId: string messageId: string requestId: string model: string speed: string timestamp: Date date: string inputTokens: number outputTokens: number cacheCreationTokens: number cacheReadTokens: number costUSD: number createdAt: Date }, ExtArgs["result"]["messageUsage"]> composites: {} } export type MessageUsageGetPayload = runtime.Types.Result.GetResult export type MessageUsageCountArgs = Omit & { select?: MessageUsageCountAggregateInputType | true } export interface MessageUsageDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['MessageUsage'], meta: { name: 'MessageUsage' } } /** * Find zero or one MessageUsage that matches the filter. * @param {MessageUsageFindUniqueArgs} args - Arguments to find a MessageUsage * @example * // Get one MessageUsage * const messageUsage = await prisma.messageUsage.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__MessageUsageClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one MessageUsage that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {MessageUsageFindUniqueOrThrowArgs} args - Arguments to find a MessageUsage * @example * // Get one MessageUsage * const messageUsage = await prisma.messageUsage.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__MessageUsageClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first MessageUsage 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 {MessageUsageFindFirstArgs} args - Arguments to find a MessageUsage * @example * // Get one MessageUsage * const messageUsage = await prisma.messageUsage.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__MessageUsageClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first MessageUsage 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 {MessageUsageFindFirstOrThrowArgs} args - Arguments to find a MessageUsage * @example * // Get one MessageUsage * const messageUsage = await prisma.messageUsage.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__MessageUsageClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more MessageUsages 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 {MessageUsageFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all MessageUsages * const messageUsages = await prisma.messageUsage.findMany() * * // Get first 10 MessageUsages * const messageUsages = await prisma.messageUsage.findMany({ take: 10 }) * * // Only select the `id` * const messageUsageWithIdOnly = await prisma.messageUsage.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a MessageUsage. * @param {MessageUsageCreateArgs} args - Arguments to create a MessageUsage. * @example * // Create one MessageUsage * const MessageUsage = await prisma.messageUsage.create({ * data: { * // ... data to create a MessageUsage * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__MessageUsageClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many MessageUsages. * @param {MessageUsageCreateManyArgs} args - Arguments to create many MessageUsages. * @example * // Create many MessageUsages * const messageUsage = await prisma.messageUsage.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many MessageUsages and returns the data saved in the database. * @param {MessageUsageCreateManyAndReturnArgs} args - Arguments to create many MessageUsages. * @example * // Create many MessageUsages * const messageUsage = await prisma.messageUsage.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many MessageUsages and only return the `id` * const messageUsageWithIdOnly = await prisma.messageUsage.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 MessageUsage. * @param {MessageUsageDeleteArgs} args - Arguments to delete one MessageUsage. * @example * // Delete one MessageUsage * const MessageUsage = await prisma.messageUsage.delete({ * where: { * // ... filter to delete one MessageUsage * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__MessageUsageClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one MessageUsage. * @param {MessageUsageUpdateArgs} args - Arguments to update one MessageUsage. * @example * // Update one MessageUsage * const messageUsage = await prisma.messageUsage.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__MessageUsageClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more MessageUsages. * @param {MessageUsageDeleteManyArgs} args - Arguments to filter MessageUsages to delete. * @example * // Delete a few MessageUsages * const { count } = await prisma.messageUsage.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more MessageUsages. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MessageUsageUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many MessageUsages * const messageUsage = await prisma.messageUsage.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more MessageUsages and returns the data updated in the database. * @param {MessageUsageUpdateManyAndReturnArgs} args - Arguments to update many MessageUsages. * @example * // Update many MessageUsages * const messageUsage = await prisma.messageUsage.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more MessageUsages and only return the `id` * const messageUsageWithIdOnly = await prisma.messageUsage.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 MessageUsage. * @param {MessageUsageUpsertArgs} args - Arguments to update or create a MessageUsage. * @example * // Update or create a MessageUsage * const messageUsage = await prisma.messageUsage.upsert({ * create: { * // ... data to create a MessageUsage * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the MessageUsage we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__MessageUsageClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of MessageUsages. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MessageUsageCountArgs} args - Arguments to filter MessageUsages to count. * @example * // Count the number of MessageUsages * const count = await prisma.messageUsage.count({ * where: { * // ... the filter for the MessageUsages 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 MessageUsage. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MessageUsageAggregateArgs} 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 MessageUsage. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {MessageUsageGroupByArgs} 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 MessageUsageGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: MessageUsageGroupByArgs['orderBy'] } : { orderBy?: MessageUsageGroupByArgs['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 ? GetMessageUsageGroupByPayload : Prisma.PrismaPromise /** * Fields of the MessageUsage model */ readonly fields: MessageUsageFieldRefs; } /** * The delegate class that acts as a "Promise-like" for MessageUsage. * 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__MessageUsageClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" /** * 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 MessageUsage model */ export interface MessageUsageFieldRefs { readonly id: Prisma.FieldRef<"MessageUsage", 'String'> readonly sessionId: Prisma.FieldRef<"MessageUsage", 'String'> readonly messageId: Prisma.FieldRef<"MessageUsage", 'String'> readonly requestId: Prisma.FieldRef<"MessageUsage", 'String'> readonly model: Prisma.FieldRef<"MessageUsage", 'String'> readonly speed: Prisma.FieldRef<"MessageUsage", 'String'> readonly timestamp: Prisma.FieldRef<"MessageUsage", 'DateTime'> readonly date: Prisma.FieldRef<"MessageUsage", 'String'> readonly inputTokens: Prisma.FieldRef<"MessageUsage", 'Int'> readonly outputTokens: Prisma.FieldRef<"MessageUsage", 'Int'> readonly cacheCreationTokens: Prisma.FieldRef<"MessageUsage", 'Int'> readonly cacheReadTokens: Prisma.FieldRef<"MessageUsage", 'Int'> readonly costUSD: Prisma.FieldRef<"MessageUsage", 'Float'> readonly createdAt: Prisma.FieldRef<"MessageUsage", 'DateTime'> } // Custom InputTypes /** * MessageUsage findUnique */ export type MessageUsageFindUniqueArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * Filter, which MessageUsage to fetch. */ where: Prisma.MessageUsageWhereUniqueInput } /** * MessageUsage findUniqueOrThrow */ export type MessageUsageFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * Filter, which MessageUsage to fetch. */ where: Prisma.MessageUsageWhereUniqueInput } /** * MessageUsage findFirst */ export type MessageUsageFindFirstArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * Filter, which MessageUsage to fetch. */ where?: Prisma.MessageUsageWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of MessageUsages to fetch. */ orderBy?: Prisma.MessageUsageOrderByWithRelationInput | Prisma.MessageUsageOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for MessageUsages. */ cursor?: Prisma.MessageUsageWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` MessageUsages 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` MessageUsages. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of MessageUsages. */ distinct?: Prisma.MessageUsageScalarFieldEnum | Prisma.MessageUsageScalarFieldEnum[] } /** * MessageUsage findFirstOrThrow */ export type MessageUsageFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * Filter, which MessageUsage to fetch. */ where?: Prisma.MessageUsageWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of MessageUsages to fetch. */ orderBy?: Prisma.MessageUsageOrderByWithRelationInput | Prisma.MessageUsageOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for MessageUsages. */ cursor?: Prisma.MessageUsageWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` MessageUsages 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` MessageUsages. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of MessageUsages. */ distinct?: Prisma.MessageUsageScalarFieldEnum | Prisma.MessageUsageScalarFieldEnum[] } /** * MessageUsage findMany */ export type MessageUsageFindManyArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * Filter, which MessageUsages to fetch. */ where?: Prisma.MessageUsageWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of MessageUsages to fetch. */ orderBy?: Prisma.MessageUsageOrderByWithRelationInput | Prisma.MessageUsageOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing MessageUsages. */ cursor?: Prisma.MessageUsageWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` MessageUsages 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` MessageUsages. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of MessageUsages. */ distinct?: Prisma.MessageUsageScalarFieldEnum | Prisma.MessageUsageScalarFieldEnum[] } /** * MessageUsage create */ export type MessageUsageCreateArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * The data needed to create a MessageUsage. */ data: Prisma.XOR } /** * MessageUsage createMany */ export type MessageUsageCreateManyArgs = { /** * The data used to create many MessageUsages. */ data: Prisma.MessageUsageCreateManyInput | Prisma.MessageUsageCreateManyInput[] } /** * MessageUsage createManyAndReturn */ export type MessageUsageCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelectCreateManyAndReturn | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * The data used to create many MessageUsages. */ data: Prisma.MessageUsageCreateManyInput | Prisma.MessageUsageCreateManyInput[] } /** * MessageUsage update */ export type MessageUsageUpdateArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * The data needed to update a MessageUsage. */ data: Prisma.XOR /** * Choose, which MessageUsage to update. */ where: Prisma.MessageUsageWhereUniqueInput } /** * MessageUsage updateMany */ export type MessageUsageUpdateManyArgs = { /** * The data used to update MessageUsages. */ data: Prisma.XOR /** * Filter which MessageUsages to update */ where?: Prisma.MessageUsageWhereInput /** * Limit how many MessageUsages to update. */ limit?: number } /** * MessageUsage updateManyAndReturn */ export type MessageUsageUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelectUpdateManyAndReturn | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * The data used to update MessageUsages. */ data: Prisma.XOR /** * Filter which MessageUsages to update */ where?: Prisma.MessageUsageWhereInput /** * Limit how many MessageUsages to update. */ limit?: number } /** * MessageUsage upsert */ export type MessageUsageUpsertArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * The filter to search for the MessageUsage to update in case it exists. */ where: Prisma.MessageUsageWhereUniqueInput /** * In case the MessageUsage found by the `where` argument doesn't exist, create a new MessageUsage with this data. */ create: Prisma.XOR /** * In case the MessageUsage was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * MessageUsage delete */ export type MessageUsageDeleteArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null /** * Filter which MessageUsage to delete. */ where: Prisma.MessageUsageWhereUniqueInput } /** * MessageUsage deleteMany */ export type MessageUsageDeleteManyArgs = { /** * Filter which MessageUsages to delete */ where?: Prisma.MessageUsageWhereInput /** * Limit how many MessageUsages to delete. */ limit?: number } /** * MessageUsage without action */ export type MessageUsageDefaultArgs = { /** * Select specific fields to fetch from the MessageUsage */ select?: Prisma.MessageUsageSelect | null /** * Omit specific fields from the MessageUsage */ omit?: Prisma.MessageUsageOmit | null }