Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

User.ts

1,323 lines35.4 KB

1/* !!! This is code generated by Prisma. Do not edit directly. !!! */
2/* eslint-disable */
3// biome-ignore-all lint: generated file
4// @ts-nocheck
5/*
6 * This file exports the `User` model and its related types.
7 *
8 * 🟢 You can import this file directly.
9 */
10import type * as runtime from '@prisma/client/runtime/client'
11import type * as $Enums from '../enums'
12import type * as Prisma from '../internal/prismaNamespace'
13​
14/**
15 * Model User
16 *
17 */
18export type UserModel =
19 runtime.Types.Result.DefaultSelection<Prisma.$UserPayload>
20​
21export type AggregateUser = {
22 _count: UserCountAggregateOutputType | null
23 _min: UserMinAggregateOutputType | null
24 _max: UserMaxAggregateOutputType | null
26​
27export type UserMinAggregateOutputType = {
28 email: string | null
29 password: string | null
31​
32export type UserMaxAggregateOutputType = {
33 email: string | null
34 password: string | null
36​
37export type UserCountAggregateOutputType = {
38 email: number
39 password: number
40 _all: number
42​
43export type UserMinAggregateInputType = {
44 email?: true
45 password?: true
47​
48export type UserMaxAggregateInputType = {
49 email?: true
50 password?: true
52​
53export type UserCountAggregateInputType = {
54 email?: true
55 password?: true
56 _all?: true
58​
59export type UserAggregateArgs<
60 ExtArgs extends
61 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
62> = {
63 /**
64 * Filter which User to aggregate.
65 */
66 where?: Prisma.UserWhereInput
67 /**
68 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
69 *
70 * Determine the order of Users to fetch.
71 */
72 orderBy?:
73 | Prisma.UserOrderByWithRelationInput
74 | Prisma.UserOrderByWithRelationInput[]
75 /**
76 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
77 *
78 * Sets the start position
79 */
80 cursor?: Prisma.UserWhereUniqueInput
81 /**
82 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
83 *
84 * Take `±n` Users from the position of the cursor.
85 */
86 take?: number
87 /**
88 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
89 *
90 * Skip the first `n` Users.
91 */
92 skip?: number
93 /**
94 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
95 *
96 * Count returned Users
97 **/
98 _count?: true | UserCountAggregateInputType
99 /**
100 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
101 *
102 * Select which fields to find the minimum value
103 **/
104 _min?: UserMinAggregateInputType
105 /**
106 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
107 *
108 * Select which fields to find the maximum value
109 **/
110 _max?: UserMaxAggregateInputType
112​
113export type GetUserAggregateType<T extends UserAggregateArgs> = {
114 [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count'
115 ? T[P] extends true
116 ? number
117 : Prisma.GetScalarType<T[P], AggregateUser[P]>
118 : Prisma.GetScalarType<T[P], AggregateUser[P]>
120​
121export type UserGroupByArgs<
122 ExtArgs extends
123 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
124> = {
125 where?: Prisma.UserWhereInput
126 orderBy?:
127 | Prisma.UserOrderByWithAggregationInput
128 | Prisma.UserOrderByWithAggregationInput[]
129 by: Prisma.UserScalarFieldEnum[] | Prisma.UserScalarFieldEnum
130 having?: Prisma.UserScalarWhereWithAggregatesInput
131 take?: number
132 skip?: number
133 _count?: UserCountAggregateInputType | true
134 _min?: UserMinAggregateInputType
135 _max?: UserMaxAggregateInputType
137​
138export type UserGroupByOutputType = {
139 email: string
140 password: string
141 _count: UserCountAggregateOutputType | null
142 _min: UserMinAggregateOutputType | null
143 _max: UserMaxAggregateOutputType | null
145​
146type GetUserGroupByPayload<T extends UserGroupByArgs> = Prisma.PrismaPromise<
147 Array<
148 Prisma.PickEnumerable<UserGroupByOutputType, T['by']> & {
149 [P in keyof T & keyof UserGroupByOutputType]: P extends '_count'
150 ? T[P] extends boolean
151 ? number
152 : Prisma.GetScalarType<T[P], UserGroupByOutputType[P]>
153 : Prisma.GetScalarType<T[P], UserGroupByOutputType[P]>
154 }
155 >
157​
158export type UserWhereInput = {
159 AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
160 OR?: Prisma.UserWhereInput[]
161 NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
162 email?: Prisma.StringFilter<'User'> | string
163 password?: Prisma.StringFilter<'User'> | string
165​
166export type UserOrderByWithRelationInput = {
167 email?: Prisma.SortOrder
168 password?: Prisma.SortOrder
170​
171export type UserWhereUniqueInput = Prisma.AtLeast<
172 {
173 email?: string
174 AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
175 OR?: Prisma.UserWhereInput[]
176 NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[]
177 password?: Prisma.StringFilter<'User'> | string
178 },
179 'email' | 'email'
181​
182export type UserOrderByWithAggregationInput = {
183 email?: Prisma.SortOrder
184 password?: Prisma.SortOrder
185 _count?: Prisma.UserCountOrderByAggregateInput
186 _max?: Prisma.UserMaxOrderByAggregateInput
187 _min?: Prisma.UserMinOrderByAggregateInput
189​
190export type UserScalarWhereWithAggregatesInput = {
191 AND?:
192 | Prisma.UserScalarWhereWithAggregatesInput
193 | Prisma.UserScalarWhereWithAggregatesInput[]
194 OR?: Prisma.UserScalarWhereWithAggregatesInput[]
195 NOT?:
196 | Prisma.UserScalarWhereWithAggregatesInput
197 | Prisma.UserScalarWhereWithAggregatesInput[]
198 email?: Prisma.StringWithAggregatesFilter<'User'> | string
199 password?: Prisma.StringWithAggregatesFilter<'User'> | string
201​
202export type UserCreateInput = {
203 email: string
204 password: string
206​
207export type UserUncheckedCreateInput = {
208 email: string
209 password: string
211​
212export type UserUpdateInput = {
213 email?: Prisma.StringFieldUpdateOperationsInput | string
214 password?: Prisma.StringFieldUpdateOperationsInput | string
216​
217export type UserUncheckedUpdateInput = {
218 email?: Prisma.StringFieldUpdateOperationsInput | string
219 password?: Prisma.StringFieldUpdateOperationsInput | string
221​
222export type UserCreateManyInput = {
223 email: string
224 password: string
226​
227export type UserUpdateManyMutationInput = {
228 email?: Prisma.StringFieldUpdateOperationsInput | string
229 password?: Prisma.StringFieldUpdateOperationsInput | string
231​
232export type UserUncheckedUpdateManyInput = {
233 email?: Prisma.StringFieldUpdateOperationsInput | string
234 password?: Prisma.StringFieldUpdateOperationsInput | string
236​
237export type UserCountOrderByAggregateInput = {
238 email?: Prisma.SortOrder
239 password?: Prisma.SortOrder
241​
242export type UserMaxOrderByAggregateInput = {
243 email?: Prisma.SortOrder
244 password?: Prisma.SortOrder
246​
247export type UserMinOrderByAggregateInput = {
248 email?: Prisma.SortOrder
249 password?: Prisma.SortOrder
251​
252export type StringFieldUpdateOperationsInput = {
253 set?: string
255​
256export type UserSelect<
257 ExtArgs extends
258 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
259> = runtime.Types.Extensions.GetSelect<
260 {
261 email?: boolean
262 password?: boolean
263 },
264 ExtArgs['result']['user']
266​
267export type UserSelectCreateManyAndReturn<
268 ExtArgs extends
269 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
270> = runtime.Types.Extensions.GetSelect<
271 {
272 email?: boolean
273 password?: boolean
274 },
275 ExtArgs['result']['user']
277​
278export type UserSelectUpdateManyAndReturn<
279 ExtArgs extends
280 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
281> = runtime.Types.Extensions.GetSelect<
282 {
283 email?: boolean
284 password?: boolean
285 },
286 ExtArgs['result']['user']
288​
289export type UserSelectScalar = {
290 email?: boolean
291 password?: boolean
293​
294export type UserOmit<
295 ExtArgs extends
296 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
297> = runtime.Types.Extensions.GetOmit<
298 'email' | 'password',
299 ExtArgs['result']['user']
301​
302export type $UserPayload<
303 ExtArgs extends
304 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
305> = {
306 name: 'User'
307 objects: {}
308 scalars: runtime.Types.Extensions.GetPayloadResult<
309 {
310 email: string
311 password: string
312 },
313 ExtArgs['result']['user']
314 >
315 composites: {}
317​
318export type UserGetPayload<
319 S extends boolean | null | undefined | UserDefaultArgs,
320> = runtime.Types.Result.GetResult<Prisma.$UserPayload, S>
321​
322export type UserCountArgs<
323 ExtArgs extends
324 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
325> = Omit<UserFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
326 select?: UserCountAggregateInputType | true
328​
329export interface UserDelegate<
330 ExtArgs extends
331 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
332 GlobalOmitOptions = {},
333> {
334 [K: symbol]: {
335 types: Prisma.TypeMap<ExtArgs>['model']['User']
336 meta: { name: 'User' }
337 }
338 /**
339 * Find zero or one User that matches the filter.
340 * @param {UserFindUniqueArgs} args - Arguments to find a User
341 * @example
342 * // Get one User
343 * const user = await prisma.user.findUnique({
344 * where: {
345 * // ... provide filter here
346 * }
347 * })
348 */
349 findUnique<T extends UserFindUniqueArgs>(
350 args: Prisma.SelectSubset<T, UserFindUniqueArgs<ExtArgs>>,
351 ): Prisma.Prisma__UserClient<
352 runtime.Types.Result.GetResult<
353 Prisma.$UserPayload<ExtArgs>,
354 T,
355 'findUnique',
356 GlobalOmitOptions
357 > | null,
358 null,
359 ExtArgs,
360 GlobalOmitOptions
361 >
362​
363 /**
364 * Find one User that matches the filter or throw an error with `error.code='P2025'`
365 * if no matches were found.
366 * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User
367 * @example
368 * // Get one User
369 * const user = await prisma.user.findUniqueOrThrow({
370 * where: {
371 * // ... provide filter here
372 * }
373 * })
374 */
375 findUniqueOrThrow<T extends UserFindUniqueOrThrowArgs>(
376 args: Prisma.SelectSubset<T, UserFindUniqueOrThrowArgs<ExtArgs>>,
377 ): Prisma.Prisma__UserClient<
378 runtime.Types.Result.GetResult<
379 Prisma.$UserPayload<ExtArgs>,
380 T,
381 'findUniqueOrThrow',
382 GlobalOmitOptions
383 >,
384 never,
385 ExtArgs,
386 GlobalOmitOptions
387 >
388​
389 /**
390 * Find the first User that matches the filter.
391 * Note, that providing `undefined` is treated as the value not being there.
392 * Read more here: https://pris.ly/d/null-undefined
393 * @param {UserFindFirstArgs} args - Arguments to find a User
394 * @example
395 * // Get one User
396 * const user = await prisma.user.findFirst({
397 * where: {
398 * // ... provide filter here
399 * }
400 * })
401 */
402 findFirst<T extends UserFindFirstArgs>(
403 args?: Prisma.SelectSubset<T, UserFindFirstArgs<ExtArgs>>,
404 ): Prisma.Prisma__UserClient<
405 runtime.Types.Result.GetResult<
406 Prisma.$UserPayload<ExtArgs>,
407 T,
408 'findFirst',
409 GlobalOmitOptions
410 > | null,
411 null,
412 ExtArgs,
413 GlobalOmitOptions
414 >
415​
416 /**
417 * Find the first User that matches the filter or
418 * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
419 * Note, that providing `undefined` is treated as the value not being there.
420 * Read more here: https://pris.ly/d/null-undefined
421 * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User
422 * @example
423 * // Get one User
424 * const user = await prisma.user.findFirstOrThrow({
425 * where: {
426 * // ... provide filter here
427 * }
428 * })
429 */
430 findFirstOrThrow<T extends UserFindFirstOrThrowArgs>(
431 args?: Prisma.SelectSubset<T, UserFindFirstOrThrowArgs<ExtArgs>>,
432 ): Prisma.Prisma__UserClient<
433 runtime.Types.Result.GetResult<
434 Prisma.$UserPayload<ExtArgs>,
435 T,
436 'findFirstOrThrow',
437 GlobalOmitOptions
438 >,
439 never,
440 ExtArgs,
441 GlobalOmitOptions
442 >
443​
444 /**
445 * Find zero or more Users that matches the filter.
446 * Note, that providing `undefined` is treated as the value not being there.
447 * Read more here: https://pris.ly/d/null-undefined
448 * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only.
449 * @example
450 * // Get all Users
451 * const users = await prisma.user.findMany()
452 *
453 * // Get first 10 Users
454 * const users = await prisma.user.findMany({ take: 10 })
455 *
456 * // Only select the `email`
457 * const userWithEmailOnly = await prisma.user.findMany({ select: { email: true } })
458 *
459 */
460 findMany<T extends UserFindManyArgs>(
461 args?: Prisma.SelectSubset<T, UserFindManyArgs<ExtArgs>>,
462 ): Prisma.PrismaPromise<
463 runtime.Types.Result.GetResult<
464 Prisma.$UserPayload<ExtArgs>,
465 T,
466 'findMany',
467 GlobalOmitOptions
468 >
469 >
470​
471 /**
472 * Create a User.
473 * @param {UserCreateArgs} args - Arguments to create a User.
474 * @example
475 * // Create one User
476 * const User = await prisma.user.create({
477 * data: {
478 * // ... data to create a User
479 * }
480 * })
481 *
482 */
483 create<T extends UserCreateArgs>(
484 args: Prisma.SelectSubset<T, UserCreateArgs<ExtArgs>>,
485 ): Prisma.Prisma__UserClient<
486 runtime.Types.Result.GetResult<
487 Prisma.$UserPayload<ExtArgs>,
488 T,
489 'create',
490 GlobalOmitOptions
491 >,
492 never,
493 ExtArgs,
494 GlobalOmitOptions
495 >
496​
497 /**
498 * Create many Users.
499 * @param {UserCreateManyArgs} args - Arguments to create many Users.
500 * @example
501 * // Create many Users
502 * const user = await prisma.user.createMany({
503 * data: [
504 * // ... provide data here
505 * ]
506 * })
507 *
508 */
509 createMany<T extends UserCreateManyArgs>(
510 args?: Prisma.SelectSubset<T, UserCreateManyArgs<ExtArgs>>,
511 ): Prisma.PrismaPromise<Prisma.BatchPayload>
512​
513 /**
514 * Create many Users and returns the data saved in the database.
515 * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users.
516 * @example
517 * // Create many Users
518 * const user = await prisma.user.createManyAndReturn({
519 * data: [
520 * // ... provide data here
521 * ]
522 * })
523 *
524 * // Create many Users and only return the `email`
525 * const userWithEmailOnly = await prisma.user.createManyAndReturn({
526 * select: { email: true },
527 * data: [
528 * // ... provide data here
529 * ]
530 * })
531 * Note, that providing `undefined` is treated as the value not being there.
532 * Read more here: https://pris.ly/d/null-undefined
533 *
534 */
535 createManyAndReturn<T extends UserCreateManyAndReturnArgs>(
536 args?: Prisma.SelectSubset<T, UserCreateManyAndReturnArgs<ExtArgs>>,
537 ): Prisma.PrismaPromise<
538 runtime.Types.Result.GetResult<
539 Prisma.$UserPayload<ExtArgs>,
540 T,
541 'createManyAndReturn',
542 GlobalOmitOptions
543 >
544 >
545​
546 /**
547 * Delete a User.
548 * @param {UserDeleteArgs} args - Arguments to delete one User.
549 * @example
550 * // Delete one User
551 * const User = await prisma.user.delete({
552 * where: {
553 * // ... filter to delete one User
554 * }
555 * })
556 *
557 */
558 delete<T extends UserDeleteArgs>(
559 args: Prisma.SelectSubset<T, UserDeleteArgs<ExtArgs>>,
560 ): Prisma.Prisma__UserClient<
561 runtime.Types.Result.GetResult<
562 Prisma.$UserPayload<ExtArgs>,
563 T,
564 'delete',
565 GlobalOmitOptions
566 >,
567 never,
568 ExtArgs,
569 GlobalOmitOptions
570 >
571​
572 /**
573 * Update one User.
574 * @param {UserUpdateArgs} args - Arguments to update one User.
575 * @example
576 * // Update one User
577 * const user = await prisma.user.update({
578 * where: {
579 * // ... provide filter here
580 * },
581 * data: {
582 * // ... provide data here
583 * }
584 * })
585 *
586 */
587 update<T extends UserUpdateArgs>(
588 args: Prisma.SelectSubset<T, UserUpdateArgs<ExtArgs>>,
589 ): Prisma.Prisma__UserClient<
590 runtime.Types.Result.GetResult<
591 Prisma.$UserPayload<ExtArgs>,
592 T,
593 'update',
594 GlobalOmitOptions
595 >,
596 never,
597 ExtArgs,
598 GlobalOmitOptions
599 >
600​
601 /**
602 * Delete zero or more Users.
603 * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete.
604 * @example
605 * // Delete a few Users
606 * const { count } = await prisma.user.deleteMany({
607 * where: {
608 * // ... provide filter here
609 * }
610 * })
611 *
612 */
613 deleteMany<T extends UserDeleteManyArgs>(
614 args?: Prisma.SelectSubset<T, UserDeleteManyArgs<ExtArgs>>,
615 ): Prisma.PrismaPromise<Prisma.BatchPayload>
616​
617 /**
618 * Update zero or more Users.
619 * Note, that providing `undefined` is treated as the value not being there.
620 * Read more here: https://pris.ly/d/null-undefined
621 * @param {UserUpdateManyArgs} args - Arguments to update one or more rows.
622 * @example
623 * // Update many Users
624 * const user = await prisma.user.updateMany({
625 * where: {
626 * // ... provide filter here
627 * },
628 * data: {
629 * // ... provide data here
630 * }
631 * })
632 *
633 */
634 updateMany<T extends UserUpdateManyArgs>(
635 args: Prisma.SelectSubset<T, UserUpdateManyArgs<ExtArgs>>,
636 ): Prisma.PrismaPromise<Prisma.BatchPayload>
637​
638 /**
639 * Update zero or more Users and returns the data updated in the database.
640 * @param {UserUpdateManyAndReturnArgs} args - Arguments to update many Users.
641 * @example
642 * // Update many Users
643 * const user = await prisma.user.updateManyAndReturn({
644 * where: {
645 * // ... provide filter here
646 * },
647 * data: [
648 * // ... provide data here
649 * ]
650 * })
651 *
652 * // Update zero or more Users and only return the `email`
653 * const userWithEmailOnly = await prisma.user.updateManyAndReturn({
654 * select: { email: true },
655 * where: {
656 * // ... provide filter here
657 * },
658 * data: [
659 * // ... provide data here
660 * ]
661 * })
662 * Note, that providing `undefined` is treated as the value not being there.
663 * Read more here: https://pris.ly/d/null-undefined
664 *
665 */
666 updateManyAndReturn<T extends UserUpdateManyAndReturnArgs>(
667 args: Prisma.SelectSubset<T, UserUpdateManyAndReturnArgs<ExtArgs>>,
668 ): Prisma.PrismaPromise<
669 runtime.Types.Result.GetResult<
670 Prisma.$UserPayload<ExtArgs>,
671 T,
672 'updateManyAndReturn',
673 GlobalOmitOptions
674 >
675 >
676​
677 /**
678 * Create or update one User.
679 * @param {UserUpsertArgs} args - Arguments to update or create a User.
680 * @example
681 * // Update or create a User
682 * const user = await prisma.user.upsert({
683 * create: {
684 * // ... data to create a User
685 * },
686 * update: {
687 * // ... in case it already exists, update
688 * },
689 * where: {
690 * // ... the filter for the User we want to update
691 * }
692 * })
693 */
694 upsert<T extends UserUpsertArgs>(
695 args: Prisma.SelectSubset<T, UserUpsertArgs<ExtArgs>>,
696 ): Prisma.Prisma__UserClient<
697 runtime.Types.Result.GetResult<
698 Prisma.$UserPayload<ExtArgs>,
699 T,
700 'upsert',
701 GlobalOmitOptions
702 >,
703 never,
704 ExtArgs,
705 GlobalOmitOptions
706 >
707​
708 /**
709 * Count the number of Users.
710 * Note, that providing `undefined` is treated as the value not being there.
711 * Read more here: https://pris.ly/d/null-undefined
712 * @param {UserCountArgs} args - Arguments to filter Users to count.
713 * @example
714 * // Count the number of Users
715 * const count = await prisma.user.count({
716 * where: {
717 * // ... the filter for the Users we want to count
718 * }
719 * })
720 **/
721 count<T extends UserCountArgs>(
722 args?: Prisma.Subset<T, UserCountArgs>,
723 ): Prisma.PrismaPromise<
724 T extends runtime.Types.Utils.Record<'select', any>
725 ? T['select'] extends true
726 ? number
727 : Prisma.GetScalarType<T['select'], UserCountAggregateOutputType>
728 : number
729 >
730​
731 /**
732 * Allows you to perform aggregations operations on a User.
733 * Note, that providing `undefined` is treated as the value not being there.
734 * Read more here: https://pris.ly/d/null-undefined
735 * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
736 * @example
737 * // Ordered by age ascending
738 * // Where email contains prisma.io
739 * // Limited to the 10 users
740 * const aggregations = await prisma.user.aggregate({
741 * _avg: {
742 * age: true,
743 * },
744 * where: {
745 * email: {
746 * contains: "prisma.io",
747 * },
748 * },
749 * orderBy: {
750 * age: "asc",
751 * },
752 * take: 10,
753 * })
754 **/
755 aggregate<T extends UserAggregateArgs>(
756 args: Prisma.Subset<T, UserAggregateArgs>,
757 ): Prisma.PrismaPromise<GetUserAggregateType<T>>
758​
759 /**
760 * Group by User.
761 * Note, that providing `undefined` is treated as the value not being there.
762 * Read more here: https://pris.ly/d/null-undefined
763 * @param {UserGroupByArgs} args - Group by arguments.
764 * @example
765 * // Group by city, order by createdAt, get count
766 * const result = await prisma.user.groupBy({
767 * by: ['city', 'createdAt'],
768 * orderBy: {
769 * createdAt: true
770 * },
771 * _count: {
772 * _all: true
773 * },
774 * })
775 *
776 **/
777 groupBy<
778 T extends UserGroupByArgs,
779 HasSelectOrTake extends Prisma.Or<
780 Prisma.Extends<'skip', Prisma.Keys<T>>,
781 Prisma.Extends<'take', Prisma.Keys<T>>
782 >,
783 OrderByArg extends Prisma.True extends HasSelectOrTake
784 ? { orderBy: UserGroupByArgs['orderBy'] }
785 : { orderBy?: UserGroupByArgs['orderBy'] },
786 OrderFields extends Prisma.ExcludeUnderscoreKeys<
787 Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>
788 >,
789 ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
790 ByValid extends Prisma.Has<ByFields, OrderFields>,
791 HavingFields extends Prisma.GetHavingFields<T['having']>,
792 HavingValid extends Prisma.Has<ByFields, HavingFields>,
793 ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
794 InputErrors extends ByEmpty extends Prisma.True
795 ? `Error: "by" must not be empty.`
796 : HavingValid extends Prisma.False
797 ? {
798 [P in HavingFields]: P extends ByFields
799 ? never
800 : P extends string
801 ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
802 : [
803 Error,
804 'Field ',
805 P,
806 ` in "having" needs to be provided in "by"`,
807 ]
808 }[HavingFields]
809 : 'take' extends Prisma.Keys<T>
810 ? 'orderBy' extends Prisma.Keys<T>
811 ? ByValid extends Prisma.True
812 ? {}
813 : {
814 [P in OrderFields]: P extends ByFields
815 ? never
816 : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
817 }[OrderFields]
818 : 'Error: If you provide "take", you also need to provide "orderBy"'
819 : 'skip' extends Prisma.Keys<T>
820 ? 'orderBy' extends Prisma.Keys<T>
821 ? ByValid extends Prisma.True
822 ? {}
823 : {
824 [P in OrderFields]: P extends ByFields
825 ? never
826 : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
827 }[OrderFields]
828 : 'Error: If you provide "skip", you also need to provide "orderBy"'
829 : ByValid extends Prisma.True
830 ? {}
831 : {
832 [P in OrderFields]: P extends ByFields
833 ? never
834 : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
835 }[OrderFields],
836 >(
837 args: Prisma.SubsetIntersection<T, UserGroupByArgs, OrderByArg> &
838 InputErrors,
839 ): {} extends InputErrors
840 ? GetUserGroupByPayload<T>
841 : Prisma.PrismaPromise<InputErrors>
842 /**
843 * Fields of the User model
844 */
845 readonly fields: UserFieldRefs
847​
848/**
849 * The delegate class that acts as a "Promise-like" for User.
850 * Why is this prefixed with `Prisma__`?
851 * Because we want to prevent naming conflicts as mentioned in
852 * https://github.com/prisma/prisma-client-js/issues/707
853 */
854export interface Prisma__UserClient<
855 T,
856 Null = never,
857 ExtArgs extends
858 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
859 GlobalOmitOptions = {},
860> extends Prisma.PrismaPromise<T> {
861 readonly [Symbol.toStringTag]: 'PrismaPromise'
862 /**
863 * Attaches callbacks for the resolution and/or rejection of the Promise.
864 * @param onfulfilled The callback to execute when the Promise is resolved.
865 * @param onrejected The callback to execute when the Promise is rejected.
866 * @returns A Promise for the completion of which ever callback is executed.
867 */
868 then<TResult1 = T, TResult2 = never>(
869 onfulfilled?:
870 | ((value: T) => TResult1 | PromiseLike<TResult1>)
871 | undefined
872 | null,
873 onrejected?:
874 | ((reason: any) => TResult2 | PromiseLike<TResult2>)
875 | undefined
876 | null,
877 ): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
878 /**
879 * Attaches a callback for only the rejection of the Promise.
880 * @param onrejected The callback to execute when the Promise is rejected.
881 * @returns A Promise for the completion of the callback.
882 */
883 catch<TResult = never>(
884 onrejected?:
885 | ((reason: any) => TResult | PromiseLike<TResult>)
886 | undefined
887 | null,
888 ): runtime.Types.Utils.JsPromise<T | TResult>
889 /**
890 * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
891 * resolved value cannot be modified from the callback.
892 * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
893 * @returns A Promise for the completion of the callback.
894 */
895 finally(
896 onfinally?: (() => void) | undefined | null,
897 ): runtime.Types.Utils.JsPromise<T>
899​
900/**
901 * Fields of the User model
902 */
903export interface UserFieldRefs {
904 readonly email: Prisma.FieldRef<'User', 'String'>
905 readonly password: Prisma.FieldRef<'User', 'String'>
907​
908// Custom InputTypes
909/**
910 * User findUnique
911 */
912export type UserFindUniqueArgs<
913 ExtArgs extends
914 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
915> = {
916 /**
917 * Select specific fields to fetch from the User
918 */
919 select?: Prisma.UserSelect<ExtArgs> | null
920 /**
921 * Omit specific fields from the User
922 */
923 omit?: Prisma.UserOmit<ExtArgs> | null
924 /**
925 * Filter, which User to fetch.
926 */
927 where: Prisma.UserWhereUniqueInput
929​
930/**
931 * User findUniqueOrThrow
932 */
933export type UserFindUniqueOrThrowArgs<
934 ExtArgs extends
935 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
936> = {
937 /**
938 * Select specific fields to fetch from the User
939 */
940 select?: Prisma.UserSelect<ExtArgs> | null
941 /**
942 * Omit specific fields from the User
943 */
944 omit?: Prisma.UserOmit<ExtArgs> | null
945 /**
946 * Filter, which User to fetch.
947 */
948 where: Prisma.UserWhereUniqueInput
950​
951/**
952 * User findFirst
953 */
954export type UserFindFirstArgs<
955 ExtArgs extends
956 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
957> = {
958 /**
959 * Select specific fields to fetch from the User
960 */
961 select?: Prisma.UserSelect<ExtArgs> | null
962 /**
963 * Omit specific fields from the User
964 */
965 omit?: Prisma.UserOmit<ExtArgs> | null
966 /**
967 * Filter, which User to fetch.
968 */
969 where?: Prisma.UserWhereInput
970 /**
971 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
972 *
973 * Determine the order of Users to fetch.
974 */
975 orderBy?:
976 | Prisma.UserOrderByWithRelationInput
977 | Prisma.UserOrderByWithRelationInput[]
978 /**
979 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
980 *
981 * Sets the position for searching for Users.
982 */
983 cursor?: Prisma.UserWhereUniqueInput
984 /**
985 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
986 *
987 * Take `±n` Users from the position of the cursor.
988 */
989 take?: number
990 /**
991 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
992 *
993 * Skip the first `n` Users.
994 */
995 skip?: number
996 /**
997 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
998 *
999 * Filter by unique combinations of Users.
1000 */
1001 distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[]
1003​
1004/**
1005 * User findFirstOrThrow
1006 */
1007export type UserFindFirstOrThrowArgs<
1008 ExtArgs extends
1009 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1010> = {
1011 /**
1012 * Select specific fields to fetch from the User
1013 */
1014 select?: Prisma.UserSelect<ExtArgs> | null
1015 /**
1016 * Omit specific fields from the User
1017 */
1018 omit?: Prisma.UserOmit<ExtArgs> | null
1019 /**
1020 * Filter, which User to fetch.
1021 */
1022 where?: Prisma.UserWhereInput
1023 /**
1024 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1026 * Determine the order of Users to fetch.
1027 */
1028 orderBy?:
1029 | Prisma.UserOrderByWithRelationInput
1030 | Prisma.UserOrderByWithRelationInput[]
1031 /**
1032 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1034 * Sets the position for searching for Users.
1035 */
1036 cursor?: Prisma.UserWhereUniqueInput
1037 /**
1038 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1040 * Take `±n` Users from the position of the cursor.
1041 */
1042 take?: number
1043 /**
1044 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1046 * Skip the first `n` Users.
1047 */
1048 skip?: number
1049 /**
1050 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1052 * Filter by unique combinations of Users.
1053 */
1054 distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[]
1056​
1057/**
1058 * User findMany
1059 */
1060export type UserFindManyArgs<
1061 ExtArgs extends
1062 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1063> = {
1064 /**
1065 * Select specific fields to fetch from the User
1066 */
1067 select?: Prisma.UserSelect<ExtArgs> | null
1068 /**
1069 * Omit specific fields from the User
1070 */
1071 omit?: Prisma.UserOmit<ExtArgs> | null
1072 /**
1073 * Filter, which Users to fetch.
1074 */
1075 where?: Prisma.UserWhereInput
1076 /**
1077 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1079 * Determine the order of Users to fetch.
1080 */
1081 orderBy?:
1082 | Prisma.UserOrderByWithRelationInput
1083 | Prisma.UserOrderByWithRelationInput[]
1084 /**
1085 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1087 * Sets the position for listing Users.
1088 */
1089 cursor?: Prisma.UserWhereUniqueInput
1090 /**
1091 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1093 * Take `±n` Users from the position of the cursor.
1094 */
1095 take?: number
1096 /**
1097 * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1099 * Skip the first `n` Users.
1100 */
1101 skip?: number
1102 distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[]
1104​
1105/**
1106 * User create
1107 */
1108export type UserCreateArgs<
1109 ExtArgs extends
1110 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1111> = {
1112 /**
1113 * Select specific fields to fetch from the User
1114 */
1115 select?: Prisma.UserSelect<ExtArgs> | null
1116 /**
1117 * Omit specific fields from the User
1118 */
1119 omit?: Prisma.UserOmit<ExtArgs> | null
1120 /**
1121 * The data needed to create a User.
1122 */
1123 data: Prisma.XOR<Prisma.UserCreateInput, Prisma.UserUncheckedCreateInput>
1125​
1126/**
1127 * User createMany
1128 */
1129export type UserCreateManyArgs<
1130 ExtArgs extends
1131 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1132> = {
1133 /**
1134 * The data used to create many Users.
1135 */
1136 data: Prisma.UserCreateManyInput | Prisma.UserCreateManyInput[]
1138​
1139/**
1140 * User createManyAndReturn
1141 */
1142export type UserCreateManyAndReturnArgs<
1143 ExtArgs extends
1144 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1145> = {
1146 /**
1147 * Select specific fields to fetch from the User
1148 */
1149 select?: Prisma.UserSelectCreateManyAndReturn<ExtArgs> | null
1150 /**
1151 * Omit specific fields from the User
1152 */
1153 omit?: Prisma.UserOmit<ExtArgs> | null
1154 /**
1155 * The data used to create many Users.
1156 */
1157 data: Prisma.UserCreateManyInput | Prisma.UserCreateManyInput[]
1159​
1160/**
1161 * User update
1162 */
1163export type UserUpdateArgs<
1164 ExtArgs extends
1165 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1166> = {
1167 /**
1168 * Select specific fields to fetch from the User
1169 */
1170 select?: Prisma.UserSelect<ExtArgs> | null
1171 /**
1172 * Omit specific fields from the User
1173 */
1174 omit?: Prisma.UserOmit<ExtArgs> | null
1175 /**
1176 * The data needed to update a User.
1177 */
1178 data: Prisma.XOR<Prisma.UserUpdateInput, Prisma.UserUncheckedUpdateInput>
1179 /**
1180 * Choose, which User to update.
1181 */
1182 where: Prisma.UserWhereUniqueInput
1184​
1185/**
1186 * User updateMany
1187 */
1188export type UserUpdateManyArgs<
1189 ExtArgs extends
1190 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1191> = {
1192 /**
1193 * The data used to update Users.
1194 */
1195 data: Prisma.XOR<
1196 Prisma.UserUpdateManyMutationInput,
1197 Prisma.UserUncheckedUpdateManyInput
1199 /**
1200 * Filter which Users to update
1201 */
1202 where?: Prisma.UserWhereInput
1203 /**
1204 * Limit how many Users to update.
1205 */
1206 limit?: number
1208​
1209/**
1210 * User updateManyAndReturn
1211 */
1212export type UserUpdateManyAndReturnArgs<
1213 ExtArgs extends
1214 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1215> = {
1216 /**
1217 * Select specific fields to fetch from the User
1218 */
1219 select?: Prisma.UserSelectUpdateManyAndReturn<ExtArgs> | null
1220 /**
1221 * Omit specific fields from the User
1222 */
1223 omit?: Prisma.UserOmit<ExtArgs> | null
1224 /**
1225 * The data used to update Users.
1226 */
1227 data: Prisma.XOR<
1228 Prisma.UserUpdateManyMutationInput,
1229 Prisma.UserUncheckedUpdateManyInput
1231 /**
1232 * Filter which Users to update
1233 */
1234 where?: Prisma.UserWhereInput
1235 /**
1236 * Limit how many Users to update.
1237 */
1238 limit?: number
1240​
1241/**
1242 * User upsert
1243 */
1244export type UserUpsertArgs<
1245 ExtArgs extends
1246 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1247> = {
1248 /**
1249 * Select specific fields to fetch from the User
1250 */
1251 select?: Prisma.UserSelect<ExtArgs> | null
1252 /**
1253 * Omit specific fields from the User
1254 */
1255 omit?: Prisma.UserOmit<ExtArgs> | null
1256 /**
1257 * The filter to search for the User to update in case it exists.
1258 */
1259 where: Prisma.UserWhereUniqueInput
1260 /**
1261 * In case the User found by the `where` argument doesn't exist, create a new User with this data.
1262 */
1263 create: Prisma.XOR<Prisma.UserCreateInput, Prisma.UserUncheckedCreateInput>
1264 /**
1265 * In case the User was found with the provided `where` argument, update it with this data.
1266 */
1267 update: Prisma.XOR<Prisma.UserUpdateInput, Prisma.UserUncheckedUpdateInput>
1269​
1270/**
1271 * User delete
1272 */
1273export type UserDeleteArgs<
1274 ExtArgs extends
1275 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1276> = {
1277 /**
1278 * Select specific fields to fetch from the User
1279 */
1280 select?: Prisma.UserSelect<ExtArgs> | null
1281 /**
1282 * Omit specific fields from the User
1283 */
1284 omit?: Prisma.UserOmit<ExtArgs> | null
1285 /**
1286 * Filter which User to delete.
1287 */
1288 where: Prisma.UserWhereUniqueInput
1290​
1291/**
1292 * User deleteMany
1293 */
1294export type UserDeleteManyArgs<
1295 ExtArgs extends
1296 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1297> = {
1298 /**
1299 * Filter which Users to delete
1300 */
1301 where?: Prisma.UserWhereInput
1302 /**
1303 * Limit how many Users to delete.
1304 */
1305 limit?: number
1307​
1308/**
1309 * User without action
1310 */
1311export type UserDefaultArgs<
1312 ExtArgs extends
1313 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
1314> = {
1315 /**
1316 * Select specific fields to fetch from the User
1317 */
1318 select?: Prisma.UserSelect<ExtArgs> | null
1319 /**
1320 * Omit specific fields from the User
1321 */
1322 omit?: Prisma.UserOmit<ExtArgs> | null