/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `ApiKey` 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.ts'; import type * as Prisma from '../internal/prismaNamespace.ts'; /** * Model ApiKey * */ export type ApiKeyModel = runtime.Types.Result.DefaultSelection; export type AggregateApiKey = { _count: ApiKeyCountAggregateOutputType | null; _min: ApiKeyMinAggregateOutputType | null; _max: ApiKeyMaxAggregateOutputType | null; }; export type ApiKeyMinAggregateOutputType = { id: string | null; keyPrefix: string | null; keyHash: string | null; createdAt: Date | null; expiresAt: Date | null; revokedAt: Date | null; }; export type ApiKeyMaxAggregateOutputType = { id: string | null; keyPrefix: string | null; keyHash: string | null; createdAt: Date | null; expiresAt: Date | null; revokedAt: Date | null; }; export type ApiKeyCountAggregateOutputType = { id: number; keyPrefix: number; keyHash: number; createdAt: number; expiresAt: number; revokedAt: number; _all: number; }; export type ApiKeyMinAggregateInputType = { id?: true; keyPrefix?: true; keyHash?: true; createdAt?: true; expiresAt?: true; revokedAt?: true; }; export type ApiKeyMaxAggregateInputType = { id?: true; keyPrefix?: true; keyHash?: true; createdAt?: true; expiresAt?: true; revokedAt?: true; }; export type ApiKeyCountAggregateInputType = { id?: true; keyPrefix?: true; keyHash?: true; createdAt?: true; expiresAt?: true; revokedAt?: true; _all?: true; }; export type ApiKeyAggregateArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Filter which ApiKey to aggregate. */ where?: Prisma.ApiKeyWhereInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of ApiKeys to fetch. */ orderBy?: Prisma.ApiKeyOrderByWithRelationInput | Prisma.ApiKeyOrderByWithRelationInput[]; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.ApiKeyWhereUniqueInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` ApiKeys 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` ApiKeys. */ skip?: number; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned ApiKeys **/ _count?: true | ApiKeyCountAggregateInputType; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: ApiKeyMinAggregateInputType; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: ApiKeyMaxAggregateInputType; }; export type GetApiKeyAggregateType = { [P in keyof T & keyof AggregateApiKey]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType; }; export type ApiKeyGroupByArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { where?: Prisma.ApiKeyWhereInput; orderBy?: Prisma.ApiKeyOrderByWithAggregationInput | Prisma.ApiKeyOrderByWithAggregationInput[]; by: Prisma.ApiKeyScalarFieldEnum[] | Prisma.ApiKeyScalarFieldEnum; having?: Prisma.ApiKeyScalarWhereWithAggregatesInput; take?: number; skip?: number; _count?: ApiKeyCountAggregateInputType | true; _min?: ApiKeyMinAggregateInputType; _max?: ApiKeyMaxAggregateInputType; }; export type ApiKeyGroupByOutputType = { id: string; keyPrefix: string; keyHash: string; createdAt: Date; expiresAt: Date | null; revokedAt: Date | null; _count: ApiKeyCountAggregateOutputType | null; _min: ApiKeyMinAggregateOutputType | null; _max: ApiKeyMaxAggregateOutputType | null; }; export type GetApiKeyGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in keyof T & keyof ApiKeyGroupByOutputType]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType; } > >; export type ApiKeyWhereInput = { AND?: Prisma.ApiKeyWhereInput | Prisma.ApiKeyWhereInput[]; OR?: Prisma.ApiKeyWhereInput[]; NOT?: Prisma.ApiKeyWhereInput | Prisma.ApiKeyWhereInput[]; id?: Prisma.StringFilter<'ApiKey'> | string; keyPrefix?: Prisma.StringFilter<'ApiKey'> | string; keyHash?: Prisma.StringFilter<'ApiKey'> | string; createdAt?: Prisma.DateTimeFilter<'ApiKey'> | Date | string; expiresAt?: Prisma.DateTimeNullableFilter<'ApiKey'> | Date | string | null; revokedAt?: Prisma.DateTimeNullableFilter<'ApiKey'> | Date | string | null; }; export type ApiKeyOrderByWithRelationInput = { id?: Prisma.SortOrder; keyPrefix?: Prisma.SortOrder; keyHash?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; expiresAt?: Prisma.SortOrderInput | Prisma.SortOrder; revokedAt?: Prisma.SortOrderInput | Prisma.SortOrder; }; export type ApiKeyWhereUniqueInput = Prisma.AtLeast< { id?: string; keyHash?: string; AND?: Prisma.ApiKeyWhereInput | Prisma.ApiKeyWhereInput[]; OR?: Prisma.ApiKeyWhereInput[]; NOT?: Prisma.ApiKeyWhereInput | Prisma.ApiKeyWhereInput[]; keyPrefix?: Prisma.StringFilter<'ApiKey'> | string; createdAt?: Prisma.DateTimeFilter<'ApiKey'> | Date | string; expiresAt?: Prisma.DateTimeNullableFilter<'ApiKey'> | Date | string | null; revokedAt?: Prisma.DateTimeNullableFilter<'ApiKey'> | Date | string | null; }, 'id' | 'keyHash' >; export type ApiKeyOrderByWithAggregationInput = { id?: Prisma.SortOrder; keyPrefix?: Prisma.SortOrder; keyHash?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; expiresAt?: Prisma.SortOrderInput | Prisma.SortOrder; revokedAt?: Prisma.SortOrderInput | Prisma.SortOrder; _count?: Prisma.ApiKeyCountOrderByAggregateInput; _max?: Prisma.ApiKeyMaxOrderByAggregateInput; _min?: Prisma.ApiKeyMinOrderByAggregateInput; }; export type ApiKeyScalarWhereWithAggregatesInput = { AND?: Prisma.ApiKeyScalarWhereWithAggregatesInput | Prisma.ApiKeyScalarWhereWithAggregatesInput[]; OR?: Prisma.ApiKeyScalarWhereWithAggregatesInput[]; NOT?: Prisma.ApiKeyScalarWhereWithAggregatesInput | Prisma.ApiKeyScalarWhereWithAggregatesInput[]; id?: Prisma.StringWithAggregatesFilter<'ApiKey'> | string; keyPrefix?: Prisma.StringWithAggregatesFilter<'ApiKey'> | string; keyHash?: Prisma.StringWithAggregatesFilter<'ApiKey'> | string; createdAt?: Prisma.DateTimeWithAggregatesFilter<'ApiKey'> | Date | string; expiresAt?: Prisma.DateTimeNullableWithAggregatesFilter<'ApiKey'> | Date | string | null; revokedAt?: Prisma.DateTimeNullableWithAggregatesFilter<'ApiKey'> | Date | string | null; }; export type ApiKeyCreateInput = { id?: string; keyPrefix: string; keyHash: string; createdAt?: Date | string; expiresAt?: Date | string | null; revokedAt?: Date | string | null; }; export type ApiKeyUncheckedCreateInput = { id?: string; keyPrefix: string; keyHash: string; createdAt?: Date | string; expiresAt?: Date | string | null; revokedAt?: Date | string | null; }; export type ApiKeyUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string; keyPrefix?: Prisma.StringFieldUpdateOperationsInput | string; keyHash?: Prisma.StringFieldUpdateOperationsInput | string; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type ApiKeyUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string; keyPrefix?: Prisma.StringFieldUpdateOperationsInput | string; keyHash?: Prisma.StringFieldUpdateOperationsInput | string; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type ApiKeyCreateManyInput = { id?: string; keyPrefix: string; keyHash: string; createdAt?: Date | string; expiresAt?: Date | string | null; revokedAt?: Date | string | null; }; export type ApiKeyUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string; keyPrefix?: Prisma.StringFieldUpdateOperationsInput | string; keyHash?: Prisma.StringFieldUpdateOperationsInput | string; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type ApiKeyUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string; keyPrefix?: Prisma.StringFieldUpdateOperationsInput | string; keyHash?: Prisma.StringFieldUpdateOperationsInput | string; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type ApiKeyCountOrderByAggregateInput = { id?: Prisma.SortOrder; keyPrefix?: Prisma.SortOrder; keyHash?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; expiresAt?: Prisma.SortOrder; revokedAt?: Prisma.SortOrder; }; export type ApiKeyMaxOrderByAggregateInput = { id?: Prisma.SortOrder; keyPrefix?: Prisma.SortOrder; keyHash?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; expiresAt?: Prisma.SortOrder; revokedAt?: Prisma.SortOrder; }; export type ApiKeyMinOrderByAggregateInput = { id?: Prisma.SortOrder; keyPrefix?: Prisma.SortOrder; keyHash?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; expiresAt?: Prisma.SortOrder; revokedAt?: Prisma.SortOrder; }; export type ApiKeySelect< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = runtime.Types.Extensions.GetSelect< { id?: boolean; keyPrefix?: boolean; keyHash?: boolean; createdAt?: boolean; expiresAt?: boolean; revokedAt?: boolean; }, ExtArgs['result']['apiKey'] >; export type ApiKeySelectCreateManyAndReturn< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = runtime.Types.Extensions.GetSelect< { id?: boolean; keyPrefix?: boolean; keyHash?: boolean; createdAt?: boolean; expiresAt?: boolean; revokedAt?: boolean; }, ExtArgs['result']['apiKey'] >; export type ApiKeySelectUpdateManyAndReturn< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = runtime.Types.Extensions.GetSelect< { id?: boolean; keyPrefix?: boolean; keyHash?: boolean; createdAt?: boolean; expiresAt?: boolean; revokedAt?: boolean; }, ExtArgs['result']['apiKey'] >; export type ApiKeySelectScalar = { id?: boolean; keyPrefix?: boolean; keyHash?: boolean; createdAt?: boolean; expiresAt?: boolean; revokedAt?: boolean; }; export type ApiKeyOmit< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = runtime.Types.Extensions.GetOmit< 'id' | 'keyPrefix' | 'keyHash' | 'createdAt' | 'expiresAt' | 'revokedAt', ExtArgs['result']['apiKey'] >; export type $ApiKeyPayload< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { name: 'ApiKey'; objects: {}; scalars: runtime.Types.Extensions.GetPayloadResult< { id: string; keyPrefix: string; keyHash: string; createdAt: Date; expiresAt: Date | null; revokedAt: Date | null; }, ExtArgs['result']['apiKey'] >; composites: {}; }; export type ApiKeyGetPayload = runtime.Types.Result.GetResult; export type ApiKeyCountArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = Omit & { select?: ApiKeyCountAggregateInputType | true; }; export interface ApiKeyDelegate< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {} > { [K: symbol]: { types: Prisma.TypeMap['model']['ApiKey']; meta: { name: 'ApiKey' } }; /** * Find zero or one ApiKey that matches the filter. * @param {ApiKeyFindUniqueArgs} args - Arguments to find a ApiKey * @example * // Get one ApiKey * const apiKey = await prisma.apiKey.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique( args: Prisma.SelectSubset> ): Prisma.Prisma__ApiKeyClient< runtime.Types.Result.GetResult< Prisma.$ApiKeyPayload, T, 'findUnique', GlobalOmitOptions > | null, null, ExtArgs, GlobalOmitOptions >; /** * Find one ApiKey that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {ApiKeyFindUniqueOrThrowArgs} args - Arguments to find a ApiKey * @example * // Get one ApiKey * const apiKey = await prisma.apiKey.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow( args: Prisma.SelectSubset> ): Prisma.Prisma__ApiKeyClient< runtime.Types.Result.GetResult< Prisma.$ApiKeyPayload, T, 'findUniqueOrThrow', GlobalOmitOptions >, never, ExtArgs, GlobalOmitOptions >; /** * Find the first ApiKey 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 {ApiKeyFindFirstArgs} args - Arguments to find a ApiKey * @example * // Get one ApiKey * const apiKey = await prisma.apiKey.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst( args?: Prisma.SelectSubset> ): Prisma.Prisma__ApiKeyClient< runtime.Types.Result.GetResult< Prisma.$ApiKeyPayload, T, 'findFirst', GlobalOmitOptions > | null, null, ExtArgs, GlobalOmitOptions >; /** * Find the first ApiKey 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 {ApiKeyFindFirstOrThrowArgs} args - Arguments to find a ApiKey * @example * // Get one ApiKey * const apiKey = await prisma.apiKey.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow( args?: Prisma.SelectSubset> ): Prisma.Prisma__ApiKeyClient< runtime.Types.Result.GetResult< Prisma.$ApiKeyPayload, T, 'findFirstOrThrow', GlobalOmitOptions >, never, ExtArgs, GlobalOmitOptions >; /** * Find zero or more ApiKeys 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 {ApiKeyFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all ApiKeys * const apiKeys = await prisma.apiKey.findMany() * * // Get first 10 ApiKeys * const apiKeys = await prisma.apiKey.findMany({ take: 10 }) * * // Only select the `id` * const apiKeyWithIdOnly = await prisma.apiKey.findMany({ select: { id: true } }) * */ findMany( args?: Prisma.SelectSubset> ): Prisma.PrismaPromise< runtime.Types.Result.GetResult, T, 'findMany', GlobalOmitOptions> >; /** * Create a ApiKey. * @param {ApiKeyCreateArgs} args - Arguments to create a ApiKey. * @example * // Create one ApiKey * const ApiKey = await prisma.apiKey.create({ * data: { * // ... data to create a ApiKey * } * }) * */ create( args: Prisma.SelectSubset> ): Prisma.Prisma__ApiKeyClient< runtime.Types.Result.GetResult, T, 'create', GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions >; /** * Create many ApiKeys. * @param {ApiKeyCreateManyArgs} args - Arguments to create many ApiKeys. * @example * // Create many ApiKeys * const apiKey = await prisma.apiKey.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany( args?: Prisma.SelectSubset> ): Prisma.PrismaPromise; /** * Create many ApiKeys and returns the data saved in the database. * @param {ApiKeyCreateManyAndReturnArgs} args - Arguments to create many ApiKeys. * @example * // Create many ApiKeys * const apiKey = await prisma.apiKey.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many ApiKeys and only return the `id` * const apiKeyWithIdOnly = await prisma.apiKey.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< runtime.Types.Result.GetResult< Prisma.$ApiKeyPayload, T, 'createManyAndReturn', GlobalOmitOptions > >; /** * Delete a ApiKey. * @param {ApiKeyDeleteArgs} args - Arguments to delete one ApiKey. * @example * // Delete one ApiKey * const ApiKey = await prisma.apiKey.delete({ * where: { * // ... filter to delete one ApiKey * } * }) * */ delete( args: Prisma.SelectSubset> ): Prisma.Prisma__ApiKeyClient< runtime.Types.Result.GetResult, T, 'delete', GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions >; /** * Update one ApiKey. * @param {ApiKeyUpdateArgs} args - Arguments to update one ApiKey. * @example * // Update one ApiKey * const apiKey = await prisma.apiKey.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update( args: Prisma.SelectSubset> ): Prisma.Prisma__ApiKeyClient< runtime.Types.Result.GetResult, T, 'update', GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions >; /** * Delete zero or more ApiKeys. * @param {ApiKeyDeleteManyArgs} args - Arguments to filter ApiKeys to delete. * @example * // Delete a few ApiKeys * const { count } = await prisma.apiKey.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany( args?: Prisma.SelectSubset> ): Prisma.PrismaPromise; /** * Update zero or more ApiKeys. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ApiKeyUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many ApiKeys * const apiKey = await prisma.apiKey.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany( args: Prisma.SelectSubset> ): Prisma.PrismaPromise; /** * Update zero or more ApiKeys and returns the data updated in the database. * @param {ApiKeyUpdateManyAndReturnArgs} args - Arguments to update many ApiKeys. * @example * // Update many ApiKeys * const apiKey = await prisma.apiKey.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more ApiKeys and only return the `id` * const apiKeyWithIdOnly = await prisma.apiKey.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< runtime.Types.Result.GetResult< Prisma.$ApiKeyPayload, T, 'updateManyAndReturn', GlobalOmitOptions > >; /** * Create or update one ApiKey. * @param {ApiKeyUpsertArgs} args - Arguments to update or create a ApiKey. * @example * // Update or create a ApiKey * const apiKey = await prisma.apiKey.upsert({ * create: { * // ... data to create a ApiKey * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the ApiKey we want to update * } * }) */ upsert( args: Prisma.SelectSubset> ): Prisma.Prisma__ApiKeyClient< runtime.Types.Result.GetResult, T, 'upsert', GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions >; /** * Count the number of ApiKeys. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ApiKeyCountArgs} args - Arguments to filter ApiKeys to count. * @example * // Count the number of ApiKeys * const count = await prisma.apiKey.count({ * where: { * // ... the filter for the ApiKeys 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 ApiKey. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ApiKeyAggregateArgs} 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 ApiKey. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {ApiKeyGroupByArgs} 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 ApiKeyGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: ApiKeyGroupByArgs['orderBy'] } : { orderBy?: ApiKeyGroupByArgs['orderBy'] }, OrderFields extends Prisma.ExcludeUnderscoreKeys< Prisma.Keys> >, 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 ? GetApiKeyGroupByPayload : Prisma.PrismaPromise; /** * Fields of the ApiKey model */ readonly fields: ApiKeyFieldRefs; } /** * The delegate class that acts as a "Promise-like" for ApiKey. * 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__ApiKeyClient< T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {} > 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 ApiKey model */ export interface ApiKeyFieldRefs { readonly id: Prisma.FieldRef<'ApiKey', 'String'>; readonly keyPrefix: Prisma.FieldRef<'ApiKey', 'String'>; readonly keyHash: Prisma.FieldRef<'ApiKey', 'String'>; readonly createdAt: Prisma.FieldRef<'ApiKey', 'DateTime'>; readonly expiresAt: Prisma.FieldRef<'ApiKey', 'DateTime'>; readonly revokedAt: Prisma.FieldRef<'ApiKey', 'DateTime'>; } // Custom InputTypes /** * ApiKey findUnique */ export type ApiKeyFindUniqueArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * Filter, which ApiKey to fetch. */ where: Prisma.ApiKeyWhereUniqueInput; }; /** * ApiKey findUniqueOrThrow */ export type ApiKeyFindUniqueOrThrowArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * Filter, which ApiKey to fetch. */ where: Prisma.ApiKeyWhereUniqueInput; }; /** * ApiKey findFirst */ export type ApiKeyFindFirstArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * Filter, which ApiKey to fetch. */ where?: Prisma.ApiKeyWhereInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of ApiKeys to fetch. */ orderBy?: Prisma.ApiKeyOrderByWithRelationInput | Prisma.ApiKeyOrderByWithRelationInput[]; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for ApiKeys. */ cursor?: Prisma.ApiKeyWhereUniqueInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` ApiKeys 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` ApiKeys. */ skip?: number; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of ApiKeys. */ distinct?: Prisma.ApiKeyScalarFieldEnum | Prisma.ApiKeyScalarFieldEnum[]; }; /** * ApiKey findFirstOrThrow */ export type ApiKeyFindFirstOrThrowArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * Filter, which ApiKey to fetch. */ where?: Prisma.ApiKeyWhereInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of ApiKeys to fetch. */ orderBy?: Prisma.ApiKeyOrderByWithRelationInput | Prisma.ApiKeyOrderByWithRelationInput[]; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for ApiKeys. */ cursor?: Prisma.ApiKeyWhereUniqueInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` ApiKeys 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` ApiKeys. */ skip?: number; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of ApiKeys. */ distinct?: Prisma.ApiKeyScalarFieldEnum | Prisma.ApiKeyScalarFieldEnum[]; }; /** * ApiKey findMany */ export type ApiKeyFindManyArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * Filter, which ApiKeys to fetch. */ where?: Prisma.ApiKeyWhereInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of ApiKeys to fetch. */ orderBy?: Prisma.ApiKeyOrderByWithRelationInput | Prisma.ApiKeyOrderByWithRelationInput[]; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing ApiKeys. */ cursor?: Prisma.ApiKeyWhereUniqueInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` ApiKeys 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` ApiKeys. */ skip?: number; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of ApiKeys. */ distinct?: Prisma.ApiKeyScalarFieldEnum | Prisma.ApiKeyScalarFieldEnum[]; }; /** * ApiKey create */ export type ApiKeyCreateArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * The data needed to create a ApiKey. */ data: Prisma.XOR; }; /** * ApiKey createMany */ export type ApiKeyCreateManyArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * The data used to create many ApiKeys. */ data: Prisma.ApiKeyCreateManyInput | Prisma.ApiKeyCreateManyInput[]; skipDuplicates?: boolean; }; /** * ApiKey createManyAndReturn */ export type ApiKeyCreateManyAndReturnArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelectCreateManyAndReturn | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * The data used to create many ApiKeys. */ data: Prisma.ApiKeyCreateManyInput | Prisma.ApiKeyCreateManyInput[]; skipDuplicates?: boolean; }; /** * ApiKey update */ export type ApiKeyUpdateArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * The data needed to update a ApiKey. */ data: Prisma.XOR; /** * Choose, which ApiKey to update. */ where: Prisma.ApiKeyWhereUniqueInput; }; /** * ApiKey updateMany */ export type ApiKeyUpdateManyArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * The data used to update ApiKeys. */ data: Prisma.XOR; /** * Filter which ApiKeys to update */ where?: Prisma.ApiKeyWhereInput; /** * Limit how many ApiKeys to update. */ limit?: number; }; /** * ApiKey updateManyAndReturn */ export type ApiKeyUpdateManyAndReturnArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelectUpdateManyAndReturn | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * The data used to update ApiKeys. */ data: Prisma.XOR; /** * Filter which ApiKeys to update */ where?: Prisma.ApiKeyWhereInput; /** * Limit how many ApiKeys to update. */ limit?: number; }; /** * ApiKey upsert */ export type ApiKeyUpsertArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * The filter to search for the ApiKey to update in case it exists. */ where: Prisma.ApiKeyWhereUniqueInput; /** * In case the ApiKey found by the `where` argument doesn't exist, create a new ApiKey with this data. */ create: Prisma.XOR; /** * In case the ApiKey was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR; }; /** * ApiKey delete */ export type ApiKeyDeleteArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; /** * Filter which ApiKey to delete. */ where: Prisma.ApiKeyWhereUniqueInput; }; /** * ApiKey deleteMany */ export type ApiKeyDeleteManyArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Filter which ApiKeys to delete */ where?: Prisma.ApiKeyWhereInput; /** * Limit how many ApiKeys to delete. */ limit?: number; }; /** * ApiKey without action */ export type ApiKeyDefaultArgs< ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs > = { /** * Select specific fields to fetch from the ApiKey */ select?: Prisma.ApiKeySelect | null; /** * Omit specific fields from the ApiKey */ omit?: Prisma.ApiKeyOmit | null; };